* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #121220;
    color: #e0e0e0;
    padding: 20px;
    min-height: 100vh;
}

h1 { text-align: center; color: #ffd700; margin-bottom: 6px; font-size: 1.6rem; }
.subtitle { text-align: center; color: #999; margin-bottom: 24px; font-size: 0.9rem; }

/* Hidden utility */
.hidden { display: none !important; }

/* Step labels */
.step-label {
    max-width: 600px;
    margin: 0 auto 8px;
    color: #ffd700;
    font-weight: 600;
    font-size: 0.95rem;
}

/* Upload Areas */
.drop-zone {
    max-width: 600px;
    margin: 0 auto 24px;
    border: 2px dashed #555;
    border-radius: 12px;
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.drop-zone:hover, .drop-zone.drag-over {
    border-color: #ffd700;
    background: rgba(255, 215, 0, 0.05);
}
.drop-zone p { color: #aaa; margin-top: 8px; }
.drop-zone .icon { font-size: 2.5rem; }
.drop-zone input[type="file"] { display: none; }

/* Fill status */
.fill-status {
    max-width: 600px;
    margin: 0 auto 12px;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
}
.fill-status.success { background: #1a3a1a; color: #7cfc7c; }
.fill-status.error { background: #3a1a1a; color: #fc7c7c; }

/* Fill section */
#fill-section {
    text-align: center;
    margin-bottom: 24px;
}
#fill-section .btn-primary { margin-top: 8px; }

/* Config Section */
#config-section {
    max-width: 900px;
    margin: 0 auto 24px;
    display: none;
}
.config-row {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    flex-wrap: wrap;
}
.config-panel {
    background: #1e1e30;
    border-radius: 8px;
    padding: 16px;
    flex: 1;
    min-width: 280px;
}
details { margin-bottom: 12px; }
details summary {
    cursor: pointer;
    color: #ffd700;
    font-weight: 600;
    padding: 8px 0;
}
.rates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 4px 12px;
    max-height: 300px;
    overflow-y: auto;
    padding: 8px;
}
.rate-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
}
.rate-item input {
    width: 65px;
    background: #2a2a40;
    border: 1px solid #444;
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    text-align: right;
}

/* Status */
#status {
    max-width: 900px;
    margin: 0 auto 16px;
    padding: 10px 16px;
    border-radius: 6px;
    display: none;
    font-size: 0.9rem;
}
#status.success { display: block; background: #1a3a1a; color: #7cfc7c; }
#status.error { display: block; background: #3a1a1a; color: #fc7c7c; }

/* Primary Download Button */
#download-all-section {
    text-align: center;
    margin: 0 auto 24px;
    display: none;
}
.btn-primary {
    padding: 14px 32px;
    background: #ffd700;
    color: #121220;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-primary:hover { background: #ffed4a; transform: scale(1.02); }
.btn-primary.done { background: #2ecc71; color: #fff; }

/* Employee Tabs */
#employee-tabs {
    max-width: 100%;
    margin: 0 auto 4px;
    display: none;
    flex-wrap: wrap;
    gap: 2px;
    padding: 0 8px;
}
.emp-tab {
    padding: 8px 16px;
    background: #1e1e30;
    border: 1px solid #333;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    color: #aaa;
    font-size: 0.85rem;
    transition: all 0.15s;
}
.emp-tab:hover { color: #fff; background: #2a2a40; }
.emp-tab.active { background: #2a2a40; color: #ffd700; border-color: #ffd700; font-weight: 600; }

/* Paysheet Output */
#output-section { display: none; }
.paysheet-wrapper {
    background: #1e1e30;
    border-radius: 0 8px 8px 8px;
    padding: 16px;
    margin-bottom: 24px;
    overflow-x: auto;
}
.paysheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}
.paysheet-header h2 { color: #ffd700; font-size: 1.1rem; }
.btn-group { display: flex; gap: 6px; }
.btn {
    padding: 6px 14px;
    border: 1px solid #ffd700;
    background: transparent;
    color: #ffd700;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.82rem;
    transition: all 0.15s;
}
.btn:hover { background: #ffd700; color: #121220; }
.btn.copied { background: #2ecc71; border-color: #2ecc71; color: #fff; }

/* Paysheet Table */
.paysheet-table {
    border-collapse: collapse;
    font-size: 0.78rem;
    font-family: 'Consolas', 'Courier New', monospace;
    width: 100%;
    min-width: 800px;
}
.paysheet-table th, .paysheet-table td {
    border: 1px solid #8B7500;
    padding: 3px 6px;
    text-align: right;
    white-space: nowrap;
}
.paysheet-table .name-header {
    background: #DAA520;
    color: #000;
    font-weight: 700;
    text-align: left;
    font-size: 0.85rem;
}
.paysheet-table .day-header {
    background: #DAA520;
    color: #000;
    font-weight: 700;
    text-align: center;
}
.paysheet-table .unit-row td {
    background: #FFD700;
    color: #000;
    font-weight: 600;
}
.paysheet-table .code-label {
    background: #FFF8DC;
    color: #000;
    text-align: left;
    font-weight: 600;
}
.paysheet-table .qty-cell {
    background: #FFFACD;
    color: #000;
}
.paysheet-table .rate-cell {
    background: #FFF8DC;
    color: #000;
}
.paysheet-table .total-row td {
    background: #DAA520;
    color: #000;
    font-weight: 700;
}
.paysheet-table .daily-total-row td {
    background: #B8860B;
    color: #fff;
    font-weight: 700;
}

/* Copy All Section */
#copy-all-section {
    text-align: center;
    margin: 12px 0 20px;
    display: none;
}
#copy-all-section .btn { padding: 8px 20px; font-size: 0.9rem; }

@media (max-width: 768px) {
    body { padding: 10px; }
    .drop-zone { padding: 24px 12px; }
    .config-row { flex-direction: column; }
}
