/* ═══════════════════════════════════════════
   SARGTECH EXPENSES — DESIGN SYSTEM
   Sidebar Layout + Light/Dark Mode
═══════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── CSS VARIABLES (Light) ── */
:root {
    --primary:        #0073EA;
    --primary-light:  #E6F2FF;
    --primary-dark:   #0060C7;
    --accent:         #00C875;
    --accent-light:   #E6FAF1;
    --accent-dark:    #00854D;
    --warning:        #FDAB3D;
    --danger:         #E44258;
    --danger-light:   #FDEDEF;

    --bg:             #F5F6FA;
    --surface:        #FFFFFF;
    --surface-2:      #F8F9FB;
    --border:         #E0E4EE;
    --border-light:   #EEF0F5;
    --text:           #1A1D2E;
    --text-muted:     #6B7280;
    --text-light:     #A0A6B4;

    --sidebar-bg:     #1A1D2E;
    --sidebar-text:   #C8CEDF;
    --sidebar-hover:  rgba(255,255,255,0.07);
    --sidebar-active: rgba(0,115,234,0.18);
    --sidebar-active-text: #60ADFF;
    --sidebar-border: rgba(255,255,255,0.06);
    --sidebar-width:  240px;

    --radius:    12px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 4px rgba(0,0,0,0.06);
    --shadow:    0 4px 16px rgba(0,0,0,0.09);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.13);
    --transition: 0.18s ease;
    --font: 'Inter', system-ui, sans-serif;
    --sidebar-collapsed-width: 56px;
}

/* ── CSS VARIABLES (Dark) ── */
[data-theme="dark"] {
    --bg:             #0F1117;
    --surface:        #1A1D2E;
    --surface-2:      #222539;
    --border:         #2D3148;
    --border-light:   #252840;
    --text:           #E8EAF2;
    --text-muted:     #8892A4;
    --text-light:     #545C6E;

    --sidebar-bg:     #12141F;
    --sidebar-border: rgba(255,255,255,0.05);
    --sidebar-hover:  rgba(255,255,255,0.06);
    --shadow-sm: 0 1px 4px rgba(0,0,0,0.25);
    --shadow:    0 4px 16px rgba(0,0,0,0.35);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.45);
    --primary-light:  rgba(0,115,234,0.15);
    --accent-light:   rgba(0,200,117,0.12);
    --danger-light:   rgba(228,66,88,0.14);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.55;
    transition: background var(--transition), color var(--transition);
    min-height: 100vh;
}

/* ── APP SHELL ── */
.app-shell {
    display: flex;
    min-height: 100vh;
}

/* ═══ SIDEBAR ═══ */
.sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    z-index: 100;
    border-right: 1px solid var(--sidebar-border);
    transition: width var(--transition);
    overflow: hidden;
}

/* Logo */
.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.1rem;
    border-bottom: 1px solid var(--sidebar-border);
}
.sidebar-logo-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, #0073EA, #00C875);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-size: 1rem;
    flex-shrink: 0;
}
.logo-brand {
    font-size: 0.95rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
}
.logo-brand span { color: #60ADFF; }
.logo-sub {
    display: block;
    font-size: 0.65rem;
    color: var(--sidebar-text);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-top: -1px;
}

/* Nav */
.sidebar-nav {
    padding: 1rem 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.sidebar-section-label {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--sidebar-text);
    opacity: 0.5;
    padding: 0.4rem 0.6rem 0.6rem;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background var(--transition), color var(--transition);
}
.sidebar-link:hover {
    background: var(--sidebar-hover);
    color: #fff;
}
.sidebar-link.active {
    background: var(--sidebar-active);
    color: var(--sidebar-active-text);
    font-weight: 600;
}
.sidebar-link i {
    width: 18px;
    text-align: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* User Profile */
.sidebar-profile {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.9rem 1.1rem;
    border-top: 1px solid var(--sidebar-border);
}
.sidebar-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0073EA, #00C875);
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}
.sidebar-profile-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-profile-role { margin-top: 1px; }

/* Bottom actions */
.sidebar-bottom {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0.6rem;
    border-top: 1px solid var(--sidebar-border);
}
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.75rem;
    border-radius: var(--radius-sm);
    background: none;
    border: none;
    color: var(--sidebar-text);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    font-family: var(--font);
    transition: background var(--transition), color var(--transition);
}
.theme-toggle:hover { background: var(--sidebar-hover); color: #fff; }
.theme-toggle i { width: 16px; text-align: center; font-size: 0.85rem; }
.sidebar-logout {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
    transition: background var(--transition), color var(--transition);
}
.sidebar-logout:hover { background: rgba(228,66,88,0.15); color: #FF7089; }
.sidebar-logout i { width: 16px; text-align: center; }

.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left var(--transition);
    min-width: 0;
}
.main-wrapper.has-sidebar {
    margin-left: var(--sidebar-width);
}

main {
    flex: 1;
    padding: 1.75rem 2rem;
    max-width: 1400px;
    width: 100%;
    min-width: 0;
}

footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 0.9rem 2rem;
    font-size: 0.75rem;
    color: var(--text-light);
}

/* ═══ FORMS (Auth pages) ═══ */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: var(--bg);
}
.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 2.25rem 2rem;
    width: 100%;
    max-width: 440px;
}
.auth-logo {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1.75rem;
    justify-content: center;
}
.auth-logo-icon {
    width: 42px; height: 42px;
    background: linear-gradient(135deg, #0073EA, #00C875);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.1rem;
}
.auth-logo-text { font-size: 1.2rem; font-weight: 800; color: var(--text); }
.auth-logo-text span { color: var(--primary); }
.auth-card h1 { font-size: 1.35rem; font-weight: 700; margin-bottom: 0.3rem; }
.auth-card p.auth-sub { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 1.5rem; }
.auth-tabs {
    display: flex;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 1.5rem;
}
.auth-tab {
    flex: 1;
    padding: 0.55rem;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-muted);
    background: var(--surface-2);
    transition: all var(--transition);
    border: none; cursor: pointer; font-family: var(--font);
}
.auth-tab.active { background: var(--primary); color: #fff; }

/* ═══ FORM ELEMENTS ═══ */
.form-group { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 0.9rem; }
.form-group:last-child { margin-bottom: 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
label { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.req { color: var(--danger); }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="file"],
select, textarea {
    padding: 0.55rem 0.8rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-size: 0.875rem;
    font-family: var(--font);
    width: 100%;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,115,234,0.12);
}
input[type="file"] { padding: 0.45rem 0.7rem; cursor: pointer; }
select { cursor: pointer; }

/* ═══ BUTTONS ═══ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1.1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}
.btn-sm { padding: 0.38rem 0.8rem; font-size: 0.8rem; }
.btn-full { width: 100%; justify-content: center; }

.btn-primary  { background: var(--primary); color: #fff; }
.btn-primary:hover  { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-accent   { background: var(--accent); color: #fff; }
.btn-accent:hover   { filter: brightness(1.08); transform: translateY(-1px); }
.btn-outline  { background: transparent; border-color: var(--border); color: var(--text-muted); }
.btn-outline:hover  { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.btn-pdf      { background: #FDEDEF; color: var(--danger); border-color: transparent; }
.btn-pdf:hover      { background: var(--danger); color: #fff; }
.btn-excel    { background: #EDFBF3; color: #00854D; border-color: transparent; }
.btn-excel:hover    { background: #00C875; color: #fff; }

/* ═══ ALERTS ═══ */
.alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
}
.alert-error   { background: var(--danger-light); color: var(--danger); border: 1px solid rgba(228,66,88,0.2); }
.alert-success { background: var(--accent-light); color: var(--accent-dark); border: 1px solid rgba(0,200,117,0.2); }

/* ═══ PANELS ═══ */
.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.panel-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.panel-title { font-size: 0.92rem; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 0.5rem; }
.panel-title i { color: var(--primary); }
.panel-body { padding: 1.25rem; }

/* ═══ DASHBOARD LAYOUT ═══ */
.dashboard-layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 1.25rem;
    align-items: start;
}
.account-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.meta-item { font-size: 0.82rem; color: var(--text-muted); }
.meta-item strong { display: block; color: var(--text); font-weight: 600; font-size: 0.88rem; }
.card-id-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--accent-light);
    border: 1px solid rgba(0,200,117,0.25);
    color: var(--accent-dark);
    font-family: 'Courier New', monospace;
    font-weight: 700;
    font-size: 0.88rem;
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius-sm);
    letter-spacing: 0.05em;
}

/* ═══ TAX CALC ═══ */
.tax-calc {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.9rem 1rem;
    margin-top: 0.75rem;
}
.tax-calc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 0.2rem 0;
}
.tax-calc-row.total {
    border-top: 1px solid var(--border);
    margin-top: 0.4rem;
    padding-top: 0.6rem;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text);
}
.tax-calc-row.total span:last-child { color: var(--primary); }

/* ═══ TABLE ═══ */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; min-width: 580px; }
thead th {
    background: var(--bg);
    padding: 0.6rem 0.875rem;
    text-align: left;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}
tbody td {
    padding: 0.65rem 0.875rem;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.83rem;
    color: var(--text);
    vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr { border-left: 3px solid var(--primary); transition: background var(--transition); }
tbody tr:hover td { background: var(--primary-light); }
tbody tr:nth-child(even) { background: var(--surface-2); }
.cell-sub { color: var(--text-muted); font-size: 0.73rem; margin-top: 1px; }

/* ═══ BADGES ═══ */
.badge {
    display: inline-block;
    padding: 0.18rem 0.5rem;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    white-space: nowrap;
}
.badge-gst   { background: #00C875; color: #fff; }
.badge-hst13 { background: #579BFC; color: #fff; }
.badge-hst15 { background: #A25DDC; color: #fff; }
.badge-none  { background: var(--border); color: var(--text-muted); }
.badge-admin { background: var(--primary-light); color: var(--primary); }
.badge-user  { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }

/* ═══ EMPTY STATE ═══ */
.empty-state {
    text-align: center;
    padding: 3.5rem 2rem;
    color: var(--text-muted);
}
.empty-state i { font-size: 2.5rem; opacity: 0.25; margin-bottom: 0.75rem; display: block; color: var(--primary); }
.empty-state p { font-size: 0.88rem; }

/* ═══ ADMIN ═══ */
.admin-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}
.admin-page-title { font-size: 1.5rem; font-weight: 800; color: var(--text); }
.admin-page-title span { color: var(--primary); }
.admin-page-sub { color: var(--text-muted); font-size: 0.85rem; margin-top: 0.2rem; }

.filter-bar { display: flex; align-items: flex-end; gap: 0.75rem; flex-wrap: wrap; }
.filter-field { display: flex; flex-direction: column; gap: 0.25rem; }
.filter-field label { margin-bottom: 0; font-size: 0.75rem; }
.filter-field input { font-size: 0.85rem; padding: 0.5rem 0.7rem; }

.settings-row { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.toggle-group { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; }

/* User Cards Grid */
.user-cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap: 1rem; }
.user-card-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius);
    padding: 1.1rem;
    box-shadow: var(--shadow-sm);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.user-card-item:hover { border-left-color: var(--accent); box-shadow: var(--shadow); }
.ucf-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.75rem; }
.ucf-name { font-weight: 700; font-size: 0.93rem; }
.ucf-row { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.78rem; color: var(--text-muted); }

/* Report Table */
.report-table tbody tr { border-left-color: var(--accent); }
.export-btns { display: flex; gap: 0.5rem; justify-content: flex-end; }

/* ═══ ANALYTICS ═══ */
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow); }
.stat-icon { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1rem; margin-bottom: 0.2rem; }
.stat-value { font-size: 1.45rem; font-weight: 800; color: var(--text); }
.stat-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); font-weight: 600; }

/* AI Spinner */
.ai-spinner { width: 46px; height: 46px; border: 4px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══ MODAL ═══ */
.modal { display: none; position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,0.75); backdrop-filter: blur(4px); align-items: center; justify-content: center; padding: 1.5rem; }
.modal.open { display: flex; }
.modal-img { max-width: 90vw; max-height: 85vh; object-fit: contain; border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0,0,0,0.5); border: 3px solid rgba(255,255,255,0.15); }
.modal-close { position: fixed; top: 1.25rem; right: 1.5rem; background: rgba(0,0,0,0.5); color: #fff; border: none; width: 36px; height: 36px; border-radius: 50%; font-size: 1.1rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background var(--transition); }
.modal-close:hover { background: var(--danger); }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 900px) {
    .dashboard-layout { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    :root { --sidebar-width: 0px; }
    .sidebar { transform: translateX(-240px); width: 240px; }
    .sidebar.open { transform: translateX(0); }
    .main-wrapper.has-sidebar { margin-left: 0; }
    main { padding: 1rem; }
    .form-row { grid-template-columns: 1fr; }
    .panel-body { padding: 1rem; }
    .panel-header { flex-direction: column; align-items: stretch; }
    .admin-page-title { font-size: 1.25rem; }
    .user-cards-grid { grid-template-columns: 1fr; }
    .export-btns { flex-direction: column; }
    .filter-bar { flex-direction: column; align-items: stretch; }
    .settings-row { flex-direction: column; align-items: flex-start; gap: 1rem; }
}

/* ═══ SIDEBAR COLLAPSE ═══ */
.sidebar-collapse-btn {
    display: flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: var(--radius-sm);
    background: none; border: none; color: var(--sidebar-text);
    cursor: pointer; transition: background var(--transition), color var(--transition); flex-shrink: 0;
}
.sidebar-collapse-btn:hover { background: var(--sidebar-hover); color: #fff; }
.sidebar.collapsed { width: var(--sidebar-collapsed-width, 56px); }
.sidebar.collapsed .sidebar-logo-text,
.sidebar.collapsed .sidebar-section-label,
.sidebar.collapsed .sidebar-link span,
.sidebar.collapsed .sidebar-profile-info,
.sidebar.collapsed #themeLabel,
.sidebar.collapsed .sidebar-logout span { display: none; }
.sidebar.collapsed .sidebar-logo { justify-content: center; padding: 1.25rem 0; }
.sidebar.collapsed .sidebar-nav { padding: 1rem 0.35rem; }
.sidebar.collapsed .sidebar-link { justify-content: center; padding: 0.6rem; gap: 0; }
.sidebar.collapsed .sidebar-link i { width: auto; margin: 0; font-size: 1.05rem; }
.sidebar.collapsed .sidebar-profile { justify-content: center; padding: 0.75rem 0; }
.sidebar.collapsed .sidebar-bottom { padding: 0.4rem; }
.sidebar.collapsed .theme-toggle { justify-content: center; padding: 0.5rem; }
.sidebar.collapsed .sidebar-logout { justify-content: center; padding: 0.5rem; }
.main-wrapper { transition: margin-left 0.2s ease; }

/* ═══ PAYMENT METHOD TOGGLE PILLS ═══ */
.pay-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.pay-btn {
    display: flex; flex-direction: column; align-items: center; gap: 0.2rem;
    padding: 0.75rem 0.5rem; border-radius: var(--radius-sm);
    border: 2px solid var(--border); background: var(--surface); color: var(--text-muted);
    cursor: pointer; transition: all var(--transition); font-family: var(--font);
}
.pay-btn i { font-size: 1.2rem; }
.pay-btn span { font-size: 0.8rem; font-weight: 600; }
.pay-btn small { font-size: 0.68rem; color: var(--text-light); }
.pay-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.pay-btn.active { border-color: var(--primary); background: var(--primary); color: #fff; }
.pay-btn.active small { color: rgba(255,255,255,0.75); }

/* ═══ SPENDING TOGGLE ═══ */
.view-toggle { display: flex; gap: 0.35rem; }
.view-toggle-btn {
    padding: 0.35rem 0.65rem; border-radius: var(--radius-sm); font-size: 0.78rem; font-weight: 600;
    border: 1.5px solid var(--border); background: var(--surface); color: var(--text-muted);
    cursor: pointer; font-family: var(--font); transition: all var(--transition);
}
.view-toggle-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.spending-table { width: 100%; border-collapse: collapse; }
.spending-table th, .spending-table td { padding: 0.6rem 0.9rem; text-align: left; font-size: 0.82rem; border-bottom: 1px solid var(--border-light); }
.spending-table th { background: var(--bg); font-weight: 700; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); white-space: nowrap; }
.spending-table tbody tr:hover td { background: var(--primary-light); }

/* ═══ BADGE EXTRAS ═══ */
.badge-approver  { background: var(--warning); color: #fff; }
.badge-accounting{ background: #7c3aed; color: #fff; }
.badge-pm        { background: var(--accent); color: #fff; }
.badge-voided    { background: var(--text-muted); color: #fff; }

/* ═══ COLLAPSIBLE TOP MENU & FULL WIDTH LAYOUT ═══ */
.collapsible-top-menu .menu-toggle-btn:hover {
    border-color: var(--primary) !important;
    background: var(--primary-light) !important;
    color: var(--primary) !important;
}
.collapsible-top-menu .menu-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.dashboard-layout-full {
    width: 100%;
}
.dashboard-layout-full .table-wrap {
    overflow-x: auto;
    width: 100%;
}
.dashboard-layout-full table {
    width: 100%;
    border-collapse: collapse;
}
@media (max-width: 768px) {
    .dashboard-layout-full .table-wrap {
        -webkit-overflow-scrolling: touch;
    }
}

/* Sidebar Dropdown Accordion */
.sidebar-dropdown {
    display: flex;
    flex-direction: column;
}
.sidebar-dropdown-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    padding-left: 1.5rem;
    gap: 0.25rem;
}
.sidebar-dropdown.open .sidebar-dropdown-menu {
    max-height: 250px;
}
.sidebar-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}
.sidebar-sub-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.45rem 0.75rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: background var(--transition), color var(--transition);
}
.sidebar-sub-link:hover {
    background: var(--primary-light);
    color: var(--primary);
}
.sidebar-sub-link.active {
    background: var(--primary);
    color: #fff;
}


