/* ============================================================
   EEC Solutions Travel Management System - Stylesheet
   Colors: Navy Blue, Black, White, Gold accents
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --navy: #0a1628;
    --navy-light: #132240;
    --navy-mid: #1a3058;
    --blue: #2563eb;
    --blue-light: #3b82f6;
    --gold: #d4a843;
    --gold-light: #e8c36a;
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --green: #059669;
    --green-light: #d1fae5;
    --red: #dc2626;
    --red-light: #fee2e2;
    --orange: #ea580c;
    --orange-light: #ffedd5;
    --radius: 10px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
    --shadow-lg: 0 4px 20px rgba(0,0,0,0.1), 0 8px 32px rgba(0,0,0,0.06);
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'DM Sans', -apple-system, sans-serif;
    background: var(--gray-50);
    color: var(--gray-700);
    line-height: 1.6;
    min-height: 100vh;
}

/* ========== AUTH SCREENS ========== */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 50%, var(--navy-mid) 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.auth-container::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 80%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.auth-container::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 50%;
    height: 80%;
    background: radial-gradient(ellipse, rgba(212, 168, 67, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.auth-card {
    background: var(--white);
    border-radius: 16px;
    padding: 48px 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    position: relative;
    z-index: 1;
}

.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo .logo-icon {
    width: 56px;
    height: 56px;
    background: var(--navy);
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    position: relative;
}

.auth-logo .logo-icon::after {
    content: 'EEC';
    color: var(--gold);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 1px;
}

.auth-logo h1 {
    font-size: 20px;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: -0.3px;
}

.auth-logo p {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 4px;
}

.auth-tabs {
    display: flex;
    background: var(--gray-100);
    border-radius: 8px;
    padding: 3px;
    margin-bottom: 28px;
}

.auth-tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    border: none;
    background: none;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-500);
    cursor: pointer;
    border-radius: 6px;
    transition: var(--transition);
}

.auth-tab.active {
    background: var(--white);
    color: var(--navy);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--gray-200);
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    color: var(--gray-700);
    transition: var(--transition);
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--blue);
    color: var(--white);
    width: 100%;
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-navy {
    background: var(--navy);
    color: var(--white);
}

.btn-navy:hover {
    background: var(--navy-light);
}

.btn-success {
    background: var(--green);
    color: var(--white);
}

.btn-success:hover { background: #047857; }

.btn-danger {
    background: var(--red);
    color: var(--white);
}

.btn-danger:hover { background: #b91c1c; }

.btn-warning {
    background: var(--orange);
    color: var(--white);
}

.btn-warning:hover { background: #c2410c; }

.btn-ghost {
    background: transparent;
    color: var(--gray-600);
    border: 1.5px solid var(--gray-200);
}

.btn-ghost:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
}

.btn-sm {
    padding: 7px 14px;
    font-size: 12px;
}

/* btn-gold defined below */

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ========== ALERT / NOTIFICATION ========== */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.alert-error {
    background: var(--red-light);
    color: var(--red);
    border: 1px solid #fca5a5;
}

.alert-success {
    background: var(--green-light);
    color: var(--green);
    border: 1px solid #6ee7b7;
}

.alert-warning {
    background: var(--orange-light);
    color: var(--orange);
    border: 1px solid #fdba74;
}

.alert-info {
    background: #eff6ff;
    color: var(--blue);
    border: 1px solid #93c5fd;
}

/* ========== PENDING SCREEN ========== */
.pending-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-50);
    padding: 20px;
}

.pending-card {
    text-align: center;
    background: var(--white);
    padding: 48px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    max-width: 480px;
}

.pending-card .pending-icon {
    width: 72px;
    height: 72px;
    background: var(--orange-light);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 20px;
}

.pending-card h2 {
    font-size: 22px;
    color: var(--navy);
    margin-bottom: 10px;
}

.pending-card p {
    color: var(--gray-500);
    font-size: 14px;
    margin-bottom: 24px;
}

/* ========== APP LAYOUT ========== */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--navy);
    color: var(--white);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-header .brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-header .brand-icon {
    width: 40px;
    height: 40px;
    background: rgba(212, 168, 67, 0.15);
    border: 1.5px solid var(--gold);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    color: var(--gold);
    letter-spacing: 1px;
}

.sidebar-header .brand-text h2 {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.sidebar-header .brand-text span {
    font-size: 11px;
    color: var(--gray-400);
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 20px;
}

.nav-section-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--gray-500);
    padding: 0 12px;
    margin-bottom: 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--gray-400);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.nav-item:hover {
    background: rgba(255,255,255,0.06);
    color: var(--white);
}

.nav-item.active {
    background: rgba(37, 99, 235, 0.15);
    color: var(--blue-light);
}

.nav-item .nav-icon {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.nav-item .badge {
    margin-left: auto;
    background: var(--red);
    color: var(--white);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    color: var(--white);
}

.user-details .user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--white);
}

.user-details .user-role {
    font-size: 11px;
    color: var(--gray-400);
    text-transform: capitalize;
}

/* ========== MAIN CONTENT ========== */
.main-content {
    margin-left: 260px;
    flex: 1;
    min-height: 100vh;
}

.page-header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 20px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.page-header h1 {
    font-size: 20px;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: -0.3px;
}

.page-header .header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.page-body {
    padding: 28px 32px;
}

/* ========== CARDS ========== */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
}

.card-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--navy);
}

.card-body {
    padding: 22px;
}

/* ========== STAT CARDS ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.stat-icon.blue { background: #eff6ff; color: var(--blue); }
.stat-icon.green { background: var(--green-light); color: var(--green); }
.stat-icon.gold { background: #fffbeb; color: var(--gold); }
.stat-icon.red { background: var(--red-light); color: var(--red); }
.stat-icon.purple { background: #f3e8ff; color: #7c3aed; }

.stat-info h4 {
    font-size: 24px;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.2;
}

.stat-info p {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 2px;
}

/* ========== TABLES ========== */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    text-align: left;
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-500);
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    white-space: nowrap;
}

tbody td {
    padding: 12px 16px;
    font-size: 13px;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-600);
}

tbody tr:hover {
    background: var(--gray-50);
}

tbody tr.clickable {
    cursor: pointer;
}

/* ========== STATUS BADGES ========== */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.status-draft { background: var(--gray-100); color: var(--gray-600); }
.status-submitted { background: #eff6ff; color: var(--blue); }
.status-approved { background: var(--green-light); color: var(--green); }
.status-rejected { background: var(--red-light); color: var(--red); }
.status-revision_requested { background: var(--orange-light); color: var(--orange); }
.status-pending { background: #fffbeb; color: #b45309; }

.role-badge {
    display: inline-flex;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.role-employee { background: #eff6ff; color: var(--blue); }
.role-admin { background: #f3e8ff; color: #7c3aed; }
.role-superadmin { background: linear-gradient(135deg, #fffbeb, #fef3c7); color: #92400e; border: 1px solid #fcd34d; }
.role-pending { background: var(--gray-100); color: var(--gray-500); }

/* ========== EXPENSE FORM ========== */
.expense-grid {
    display: grid;
    grid-template-columns: 160px repeat(7, 1fr) 100px 100px;
    gap: 1px;
    background: var(--gray-200);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    overflow: hidden;
    font-size: 12px;
}

.expense-grid .eg-cell {
    background: var(--white);
    padding: 8px 6px;
    display: flex;
    align-items: center;
}

.expense-grid .eg-header {
    background: var(--navy);
    color: var(--white);
    font-weight: 600;
    font-size: 11px;
    padding: 10px 6px;
}

.expense-grid .eg-label {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-700);
    font-size: 11px;
    padding: 8px 8px;
}

.expense-grid .eg-total {
    background: #fffbeb;
    font-weight: 700;
    color: var(--navy);
}

.expense-grid input {
    width: 100%;
    border: 1px solid var(--gray-200);
    border-radius: 4px;
    padding: 5px 4px;
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
    text-align: right;
    color: var(--gray-700);
    background: var(--white);
}

.expense-grid input:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.expense-grid .computed {
    font-family: 'JetBrains Mono', monospace;
    text-align: right;
    color: var(--navy);
    font-weight: 600;
    padding-right: 6px;
}

/* ========== FILE UPLOAD ========== */
.upload-zone {
    border: 2px dashed var(--gray-300);
    border-radius: 10px;
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--gray-50);
}

.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--blue);
    background: #eff6ff;
}

.upload-zone .upload-icon {
    font-size: 36px;
    margin-bottom: 10px;
}

.upload-zone p {
    font-size: 14px;
    color: var(--gray-500);
}

.upload-zone .upload-hint {
    font-size: 11px;
    color: var(--gray-400);
    margin-top: 4px;
}

.file-list {
    margin-top: 14px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--gray-50);
    border-radius: 8px;
    margin-bottom: 6px;
    font-size: 13px;
}

.file-item .file-icon { font-size: 18px; }
.file-item .file-name { flex: 1; font-weight: 500; color: var(--gray-700); }
.file-item .file-size { color: var(--gray-400); font-size: 11px; }
.file-item .file-remove {
    background: none;
    border: none;
    color: var(--red);
    cursor: pointer;
    font-size: 16px;
    padding: 2px 6px;
    border-radius: 4px;
}
.file-item .file-remove:hover { background: var(--red-light); }

/* ========== AI PANEL ========== */
.ai-panel {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-radius: var(--radius);
    padding: 22px;
    color: var(--white);
    margin-top: 20px;
}

.ai-panel h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    margin-bottom: 14px;
    color: var(--gold);
}

.ai-panel .ai-content {
    font-size: 13px;
    line-height: 1.7;
    color: var(--gray-300);
}

.ai-panel .ai-flags {
    margin-top: 12px;
}

.ai-panel .ai-flag {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(234, 88, 12, 0.15);
    border-radius: 6px;
    margin-bottom: 6px;
    font-size: 12px;
    color: #fbbf24;
}

.ai-panel .ai-recommendation {
    margin-top: 14px;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
}

.ai-panel .ai-recommendation.approve { background: rgba(5, 150, 105, 0.2); color: #6ee7b7; }
.ai-panel .ai-recommendation.revision { background: rgba(234, 88, 12, 0.2); color: #fbbf24; }
.ai-panel .ai-recommendation.flag { background: rgba(220, 38, 38, 0.2); color: #fca5a5; }

.ai-chat-input {
    margin-top: 16px;
    display: flex;
    gap: 8px;
}

.ai-chat-input input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    color: var(--white);
    font-family: inherit;
    font-size: 13px;
}

.ai-chat-input input::placeholder { color: var(--gray-500); }
.ai-chat-input input:focus { outline: none; border-color: var(--gold); }

/* ========== REPORT DETAIL VIEW ========== */
.report-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.meta-item {
    padding: 14px 16px;
    background: var(--gray-50);
    border-radius: 8px;
}

.meta-item label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-500);
    display: block;
    margin-bottom: 4px;
}

.meta-item span {
    font-size: 15px;
    font-weight: 600;
    color: var(--navy);
}

.summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-top: 20px;
}

.summary-item {
    padding: 16px;
    background: var(--gray-50);
    border-radius: 8px;
    text-align: center;
}

.summary-item.highlight {
    background: var(--navy);
    color: var(--white);
}

.summary-item .amount {
    font-size: 22px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.summary-item.highlight .amount { color: var(--gold); }

.summary-item .label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
    opacity: 0.7;
}

/* ========== MODAL ========== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--white);
    border-radius: 14px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--navy);
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--gray-400);
    cursor: pointer;
    padding: 4px;
}

.modal-body { padding: 24px; }

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--gray-100);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* ========== SECURITY BANNER ========== */
.security-banner {
    background: var(--navy);
    color: var(--gold);
    text-align: center;
    padding: 6px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* ========== LOADING ========== */
.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 300;
    flex-direction: column;
    gap: 12px;
}

.loading-overlay p {
    font-size: 14px;
    color: var(--gray-500);
    font-weight: 500;
}

/* ========== TOAST ========== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 400;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    animation: slideIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 280px;
}

.toast-success { background: var(--green); color: var(--white); }
.toast-error { background: var(--red); color: var(--white); }
.toast-info { background: var(--blue); color: var(--white); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ========== EMPTY STATE ========== */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--gray-400);
}

.empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.empty-state h3 {
    font-size: 16px;
    color: var(--gray-600);
    margin-bottom: 6px;
}

.empty-state p {
    font-size: 13px;
    margin-bottom: 20px;
}

/* ========== FILTERS ========== */
.filters-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-chip {
    padding: 7px 14px;
    border-radius: 20px;
    border: 1.5px solid var(--gray-200);
    background: var(--white);
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-600);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.filter-chip:hover { border-color: var(--blue); color: var(--blue); }
.filter-chip.active { background: var(--blue); color: var(--white); border-color: var(--blue); }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .page-body { padding: 16px; }
    .page-header { padding: 14px 16px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .expense-grid { font-size: 10px; }
    .form-row { grid-template-columns: 1fr; }
    .auth-card { padding: 32px 24px; }
    .summary-grid { grid-template-columns: 1fr; }
    .report-meta { grid-template-columns: 1fr 1fr; }
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* ========== MISC ========== */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.flex-1 { flex: 1; }
.font-mono { font-family: 'JetBrains Mono', monospace; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ========== v2 ADDITIONS ========== */

/* Logo in sidebar */
.brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    object-fit: cover;
    border: 1.5px solid var(--gold);
}

/* Gold accent refinements */
.btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: var(--navy);
    font-weight: 700;
}
.btn-gold:hover {
    box-shadow: 0 4px 12px rgba(212, 168, 67, 0.4);
    transform: translateY(-1px);
}

/* Security banner gold */
.security-banner {
    background: var(--navy);
    color: var(--gold);
}

/* Status badge for approved - gold accent */
.status-approved {
    background: var(--green-light);
    color: var(--green);
}

/* Per diem info alert */
#perdiem-info {
    font-size: 13px;
    line-height: 1.6;
}

/* Policy docs file items */
.card-body > .file-item:not(:last-child) {
    border-bottom: 1px solid var(--gray-100);
}

.card-body > .file-item:first-child {
    border-radius: 8px 8px 0 0;
}

.card-body > .file-item:last-child {
    border-radius: 0 0 8px 8px;
}

/* Settings inputs */
#set-mileage-rate, #set-mileage-year, #set-default-mie {
    max-width: 200px;
}

/* Auth card logo image */
.auth-logo img {
    display: block;
    margin: 0 auto 12px;
}


/* ========== Phase 2 ADDITIONS ========== */

/* New role badges */
.role-fso { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.role-finance { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.role-hr { background: #ede9fe; color: #5b21b6; border: 1px solid #c4b5fd; }

/* Compliance progress bar */
.compliance-bar {
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
}
.compliance-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Vault document items */
.vault-doc-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--gray-100);
    transition: background 0.15s ease;
}
.vault-doc-item:hover {
    background: var(--gray-50);
}

/* Expired document warning */
.doc-expired {
    background: var(--red-light);
    border-left: 3px solid var(--red);
}

/* Verified badge */
.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: var(--green-light);
    color: var(--green);
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
}


/* ========== Phase 3 - Timesheet Styles ========== */
#ts-grid input[type="number"] {
    -moz-appearance: textfield;
}
#ts-grid input[type="number"]::-webkit-inner-spin-button,
#ts-grid input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
#ts-grid tbody tr:hover {
    background: var(--gray-50);
}
#ts-grid tfoot td {
    padding: 10px 8px;
    font-size: 13px;
}
#ts-grid select {
    max-width: 240px;
}


/* ========== Phase 4 - Security Styles ========== */
.status-reported { background: #fef3c7; color: #92400e; }
.status-under_review { background: #eff6ff; color: var(--blue); }
.status-resolved { background: var(--green-light); color: var(--green); }
.status-escalated { background: var(--red-light); color: var(--red); }
.status-debrief_pending { background: var(--orange-light); color: var(--orange); }

.risk-critical { color: var(--red); font-weight: 700; }
.risk-high { color: var(--orange); font-weight: 700; }
.risk-elevated { color: #b45309; font-weight: 600; }


/* ========== Batch B+C - Recruitment & Performance ========== */
canvas#sig-canvas { touch-action: none; display: block; }
.mb-2 { margin-bottom: 8px; }
.form-row.mb-2 { margin-bottom: 8px; }
.form-row.mb-2 .form-group { margin-bottom: 0; }

/* Tentatively Approved badge */
.status-tentative { background: #fef3c7; color: #92400e; font-weight: 600; }

/* Performance form textareas - full width with proper spacing */
.card-body textarea {
    width: 100%;
    display: block;
    margin-top: 8px;
}
.card-body label + textarea,
.card-body p + textarea {
    margin-top: 8px;
}
/* Alert warning style */
.alert-warning {
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 10px;
    padding: 14px 18px;
    color: #92400e;
    cursor: pointer;
}
.alert-warning:hover {
    background: #fde68a;
}

/* Loading Spinner */
.loading-spinner {
    width: 40px; height: 40px; border: 4px solid rgba(255,255,255,0.3);
    border-top-color: var(--gold); border-radius: 50%;
    animation: spin 0.8s linear infinite; margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-overlay.hidden { display: none !important; }
.loading-overlay p { color: rgba(255,255,255,0.8); font-size: 14px; font-weight: 500; }

/* Fix stat card overflow */
.stat-card { overflow: hidden; }
.stat-card .stat-info h4 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-card .stat-info p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Accounting dashboard responsive */
@media (max-width: 768px) {
    .acct-grid { grid-template-columns: 1fr !important; }
}
