/* ============================================
   GCLID Tracker - Main Stylesheet
   Modern SaaS dashboard inspired by Linear/Notion
   ============================================ */

/* --- CSS Variables --- */
:root {
    --primary: #2563EB;
    --primary-dark: #1D4ED8;
    --primary-light: #EFF6FF;
    --primary-hover: #3B82F6;

    --success: #059669;
    --success-light: #ECFDF5;
    --warning: #D97706;
    --warning-light: #FFFBEB;
    --danger: #DC2626;
    --danger-light: #FEF2F2;
    --info: #0284C7;
    --info-light: #F0F9FF;

    --sidebar-bg: #0C111D;
    --sidebar-hover: rgba(255,255,255,.06);
    --sidebar-active: rgba(37,99,235,.12);
    --sidebar-text: #8896AB;
    --sidebar-text-active: #F1F5F9;
    --sidebar-width: 264px;
    --sidebar-border: rgba(255,255,255,.06);

    --topbar-height: 60px;

    --bg: #F8FAFC;
    --bg-card: #FFFFFF;
    --bg-hover: #F1F5F9;

    --text: #0F172A;
    --text-secondary: #475569;
    --text-muted: #94A3B8;

    --border: #E2E8F0;
    --border-focus: #2563EB;

    --radius-sm: 6px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);

    --transition: 0.2s ease;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* --- Reset --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; }

/* --- Typography --- */
h1 { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 1.375rem; font-weight: 600; letter-spacing: -0.01em; }
h3 { font-size: 1.125rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }

.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-small { font-size: 0.85rem; }

/* ============================================
   Layout: Sidebar + Content
   ============================================ */
.app-layout {
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* --- Sidebar --- */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: width .3s cubic-bezier(.4,0,.2,1), transform .3s cubic-bezier(.4,0,.2,1);
    overflow: visible;
    border-right: 1px solid var(--sidebar-border);
}

.sidebar-brand {
    padding: 20px 20px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 60px;
}

.sidebar-brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 50%, #1D4ED8 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(255,255,255,.1), 0 4px 12px rgba(37,99,235,.4);
    position: relative;
}
.sidebar-brand-icon::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 11px;
    background: linear-gradient(135deg, rgba(255,255,255,.2), transparent);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: xor;
    -webkit-mask-composite: xor;
    padding: 1px;
}
.sidebar-brand-icon--admin {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    box-shadow: 0 0 0 1px rgba(255,255,255,.1), 0 4px 12px rgba(245,158,11,.4);
}

.sidebar-brand-text {
    color: #F8FAFC;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -.025em;
    white-space: nowrap;
    overflow: hidden;
    transition: opacity .2s, width .3s;
}

/* Sidebar Logo/Favicon Variants */
.sidebar-logo--full { max-height: 36px; max-width: 150px; object-fit: contain; }
.sidebar-logo--icon { display: none; width: 32px; height: 32px; object-fit: contain; border-radius: 6px; }
.sidebar-favicon { width: 32px; height: 32px; object-fit: contain; border-radius: 6px; flex-shrink: 0; }
.sidebar.collapsed .sidebar-logo--full { display: none; }
.sidebar.collapsed .sidebar-logo--icon { display: block; }
.sidebar.collapsed .sidebar-favicon { width: 28px; height: 28px; }

/* Collapse toggle */
.sidebar-toggle {
    position: absolute;
    top: 22px;
    right: -14px;
    width: 28px;
    height: 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 110;
    box-shadow: var(--shadow-md);
    transition: all .2s;
    opacity: 0;
    color: var(--text-secondary);
}
.sidebar:hover .sidebar-toggle,
.sidebar-toggle:focus { opacity: 1; }
.sidebar-toggle:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(37,99,235,.4);
    transform: scale(1.05);
}
.sidebar-toggle-icon { font-size: 16px; transition: transform .3s; }

/* Scrollable nav */
.sidebar-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px 0 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.08) transparent;
}
.sidebar-scroll::-webkit-scrollbar { width: 3px; }
.sidebar-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,.08); border-radius: 3px; }
.sidebar-scroll::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.16); }

.sidebar-section { padding: 20px 12px 8px; }
.sidebar-section-label {
    font-size: .65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--sidebar-text);
    opacity: .45;
    padding: 0 10px;
    white-space: nowrap;
    overflow: hidden;
    transition: opacity .2s;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 10px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--sidebar-text);
    font-size: .855rem;
    font-weight: 500;
    transition: all .15s ease;
    cursor: pointer;
    position: relative;
    white-space: nowrap;
    overflow: hidden;
}
.sidebar-link:hover {
    background: var(--sidebar-hover);
    color: var(--sidebar-text-active);
}
.sidebar-link.active {
    background: var(--sidebar-active);
    color: #FFFFFF;
}
.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 18px;
    background: var(--primary);
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 8px rgba(37,99,235,.5);
}
.sidebar-link .material-symbols-outlined {
    font-size: 20px;
    opacity: .55;
    flex-shrink: 0;
    transition: opacity .15s, color .15s;
}
.sidebar-link:hover .material-symbols-outlined { opacity: .85; }
.sidebar-link.active .material-symbols-outlined {
    opacity: 1;
    color: var(--primary-hover);
}
.sidebar-link-text {
    transition: opacity .2s, width .3s;
    overflow: hidden;
}

/* Sidebar footer */
.sidebar-footer {
    margin-top: auto;
    padding: 12px 10px 16px;
    border-top: 1px solid var(--sidebar-border);
    position: relative;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: background .15s;
}
.sidebar-user:hover { background: var(--sidebar-hover); }

.sidebar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #3B82F6, #1D4ED8);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .78rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(255,255,255,.08);
    position: relative;
}
.sidebar-avatar::after {
    content: '';
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 10px;
    height: 10px;
    background: #22C55E;
    border-radius: 50%;
    border: 2px solid var(--sidebar-bg);
}
.sidebar-avatar--admin {
    background: linear-gradient(135deg, #F59E0B, #D97706);
}

.sidebar-user-info { overflow: hidden; flex: 1; min-width: 0; }
.sidebar-user-name {
    color: #E2E8F0;
    font-size: .82rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}
.sidebar-user-email {
    color: var(--sidebar-text);
    font-size: .7rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: .7;
}
.sidebar-user-chevron {
    color: var(--sidebar-text);
    font-size: 18px;
    opacity: .35;
    flex-shrink: 0;
    transition: opacity .2s, transform .2s;
}
.sidebar-user:hover .sidebar-user-chevron { opacity: .7; }

/* User dropdown */
.sidebar-user-dropdown {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 10px;
    right: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 6px;
    z-index: 200;
    animation: dropdownSlideUp .2s cubic-bezier(.16,1,.3,1);
}
.sidebar-user-dropdown.open { display: block; }

.sidebar-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: var(--radius);
    font-size: .84rem;
    color: var(--text);
    transition: all .12s;
    cursor: pointer;
    font-weight: 450;
}
.sidebar-dropdown-item:hover { background: var(--bg-hover); color: var(--text); }
.sidebar-dropdown-item .material-symbols-outlined { font-size: 18px; color: var(--text-muted); }
.sidebar-dropdown-item:hover .material-symbols-outlined { color: var(--text-secondary); }
.sidebar-dropdown-danger { color: var(--danger); }
.sidebar-dropdown-danger:hover { background: var(--danger-light); color: var(--danger); }
.sidebar-dropdown-danger .material-symbols-outlined { color: var(--danger); }
.sidebar-dropdown-divider { height: 1px; background: var(--border); margin: 4px 6px; }

@keyframes dropdownSlideUp {
    from { opacity: 0; transform: translateY(6px) scale(.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* --- Project Folders in Sidebar --- */
.sb-project { border-radius: 8px; margin-bottom: 2px; }
.sb-project--active > .sb-project-hdr { background: var(--sidebar-active); color: #fff; }
.sb-project-hdr {
    display: flex; align-items: center; gap: 10px; padding: 8px 12px;
    border-radius: 8px; cursor: pointer; transition: all .15s;
    color: var(--sidebar-text); font-size: .855rem; font-weight: 500;
    position: relative; white-space: nowrap; overflow: hidden;
}
.sb-project-hdr:hover { background: var(--sidebar-hover); color: var(--sidebar-text-active); }
.sb-project-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.sb-project-icon { font-size: 18px; opacity: .55; flex-shrink: 0; }
.sb-project--active .sb-project-icon { opacity: 1; color: var(--primary-hover); }
.sb-project-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sb-project-arrow {
    font-size: 18px; opacity: .4; flex-shrink: 0; transition: transform .2s;
    margin-left: auto;
}
.sb-project--open .sb-project-arrow { transform: rotate(180deg); opacity: .7; }

.sb-project-sub {
    max-height: 0; overflow: hidden; transition: max-height .25s cubic-bezier(.4,0,.2,1);
    padding-left: 18px;
}
.sb-project--open .sb-project-sub { max-height: 240px; }

.sb-sub-link {
    display: flex; align-items: center; gap: 10px; padding: 6px 12px;
    border-radius: 7px; font-size: .8rem; font-weight: 500;
    color: var(--sidebar-text); transition: all .12s; text-decoration: none;
    white-space: nowrap; overflow: hidden;
}
.sb-sub-link:hover { background: var(--sidebar-hover); color: var(--sidebar-text-active); }
.sb-sub-link.active { background: var(--sidebar-active); color: #fff; }
.sb-sub-link.active::before {
    content: ''; position: absolute; left: 18px; width: 3px; height: 14px;
    background: var(--primary); border-radius: 0 3px 3px 0;
    box-shadow: 0 0 6px rgba(37,99,235,.5);
}
.sb-sub-link .material-symbols-outlined { font-size: 17px; opacity: .5; flex-shrink: 0; }
.sb-sub-link.active .material-symbols-outlined { opacity: 1; color: var(--primary-hover); }
.sb-sub-link:hover .material-symbols-outlined { opacity: .8; }

.sb-all-projects { margin-top: 2px; }
.sb-project-count {
    margin-left: auto; font-size: .65rem; font-weight: 700;
    background: rgba(255,255,255,.08); padding: 1px 6px; border-radius: 4px;
    color: var(--sidebar-text); opacity: .6;
}

.sb-create-prompt .material-symbols-outlined { color: var(--primary); opacity: .8; }

/* --- Collapsed Sidebar --- */
.sidebar.collapsed { width: 72px; }
.sidebar.collapsed .sidebar-brand-text,
.sidebar.collapsed .sidebar-link-text,
.sidebar.collapsed .sidebar-section-label,
.sidebar.collapsed .sidebar-user-info,
.sidebar.collapsed .sidebar-user-chevron {
    opacity: 0; width: 0; overflow: hidden;
}
.sidebar.collapsed .sidebar-brand { padding: 20px 16px; justify-content: center; }
.sidebar.collapsed .sidebar-nav { padding: 0 8px; }
.sidebar.collapsed .sidebar-link { padding: 10px; justify-content: center; gap: 0; }
.sidebar.collapsed .sidebar-link.active::before { display: none; }
.sidebar.collapsed .sidebar-link.active {
    background: var(--sidebar-active);
    box-shadow: inset 0 0 0 1px rgba(37,99,235,.25);
}
.sidebar.collapsed .sidebar-user { padding: 8px; justify-content: center; gap: 0; }
.sidebar.collapsed .sidebar-footer { padding: 12px 8px 16px; }
.sidebar.collapsed .sidebar-toggle-icon { transform: rotate(180deg); }
.sidebar.collapsed .sidebar-toggle { opacity: 1; }

/* Collapsed: project folders */
.sidebar.collapsed .sb-project-hdr { padding: 10px; justify-content: center; gap: 0; }
.sidebar.collapsed .sb-project-dot { display: none; }
.sidebar.collapsed .sb-project-name,
.sidebar.collapsed .sb-project-arrow,
.sidebar.collapsed .sb-project-count { opacity: 0; width: 0; overflow: hidden; }
.sidebar.collapsed .sb-project-sub { display: none; }
.sidebar.collapsed .sb-project-hdr[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute; left: calc(100% + 14px); top: 50%;
    transform: translateY(-50%); background: #1E293B;
    color: #fff; padding: 6px 12px; border-radius: 8px;
    font-size: .78rem; font-weight: 600; white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0,0,0,.2); z-index: 999;
    pointer-events: none;
}

/* Tooltips on collapsed */
.sidebar.collapsed .sidebar-link[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 14px);
    top: 50%;
    transform: translateY(-50%);
    background: #1E293B;
    color: white;
    padding: 6px 14px;
    border-radius: var(--radius);
    font-size: .8rem;
    font-weight: 500;
    white-space: nowrap;
    z-index: 999;
    box-shadow: var(--shadow-lg);
    pointer-events: none;
    letter-spacing: -.01em;
}

.sidebar.collapsed + .sidebar-overlay + .main-content,
.sidebar.collapsed ~ .main-content {
    margin-left: 72px;
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    backdrop-filter: blur(4px);
    z-index: 99;
    transition: opacity .3s;
}
.sidebar-overlay.active { display: block; }

/* --- Main Content --- */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    min-width: 0;
    display: flex;
    flex-direction: column;
    transition: margin-left .3s cubic-bezier(.4,0,.2,1);
    background: var(--bg);
    overflow-x: hidden;
    max-width: none;
}

/* --- Topbar --- */
.topbar {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--border);
    background: rgba(248,250,252,.8);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.topbar-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--text);
    border-radius: var(--radius);
    flex-shrink: 0;
}
.topbar-hamburger:hover { background: var(--bg-hover); }

/* Breadcrumb */
.topbar-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.topbar-breadcrumb-item {
    font-size: .84rem;
    color: var(--text-muted);
    white-space: nowrap;
    transition: color .15s;
    font-weight: 450;
}
a.topbar-breadcrumb-item:hover { color: var(--primary); }
.topbar-breadcrumb-sep { color: var(--border); display: flex; align-items: center; }
.topbar-breadcrumb-current {
    font-weight: 600;
    color: var(--text);
    font-size: .84rem;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 2px;
}

.topbar-btn {
    background: none;
    border: none;
    cursor: pointer;
    width: 38px;
    height: 38px;
    color: var(--text-muted);
    border-radius: var(--radius);
    transition: all .15s;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.topbar-btn:hover { background: var(--bg-hover); color: var(--text); }
.topbar-btn .material-symbols-outlined { font-size: 21px; }
.topbar-btn .notification-dot {
    position: absolute;
    top: 7px; right: 7px;
    width: 8px; height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--bg-card);
}

/* Profile dropdown */
.topbar-profile { position: relative; margin-left: 6px; }
.topbar-profile-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px 4px 4px;
    border: 1px solid transparent;
    border-radius: var(--radius-full);
    background: none;
    cursor: pointer;
    transition: all .15s;
}
.topbar-profile-btn:hover {
    background: var(--bg-hover);
    border-color: var(--border);
}
.topbar-avatar {
    width: 34px; height: 34px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #3B82F6, #1D4ED8);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    font-weight: 700;
    flex-shrink: 0;
    position: relative;
}
.topbar-avatar::after {
    content: '';
    position: absolute;
    bottom: 0; right: 0;
    width: 9px; height: 9px;
    background: #22C55E;
    border-radius: 50%;
    border: 2px solid var(--bg-card);
}
.topbar-profile-name {
    font-size: .84rem;
    font-weight: 550;
    color: var(--text);
    letter-spacing: -.01em;
}
.topbar-profile-chevron {
    font-size: 18px;
    color: var(--text-muted);
    transition: transform .2s, color .15s;
}
.topbar-profile-btn:hover .topbar-profile-chevron { color: var(--text-secondary); }

.topbar-profile-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 240px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 6px;
    z-index: 200;
    animation: dropdownSlideDown .2s cubic-bezier(.16,1,.3,1);
}
.topbar-profile-dropdown.open { display: block; }

.topbar-profile-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
}
.topbar-dropdown-divider { height: 1px; background: var(--border); margin: 4px 6px; }
.topbar-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: var(--radius);
    font-size: .84rem;
    color: var(--text);
    transition: all .12s;
    cursor: pointer;
    font-weight: 450;
}
.topbar-dropdown-item:hover { background: var(--bg-hover); }
.topbar-dropdown-item .material-symbols-outlined { font-size: 18px; color: var(--text-muted); }
.topbar-dropdown-item:hover .material-symbols-outlined { color: var(--text-secondary); }
.topbar-dropdown-danger { color: var(--danger); }
.topbar-dropdown-danger:hover { background: var(--danger-light); }
.topbar-dropdown-danger .material-symbols-outlined { color: var(--danger); }

@keyframes dropdownSlideDown {
    from { opacity: 0; transform: translateY(-6px) scale(.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* --- Search Modal --- */
.search-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999;
    justify-content: center;
    padding-top: 14vh;
}
.search-modal-overlay.open { display: flex; }

.search-modal {
    width: 560px;
    max-width: 94vw;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(0,0,0,.03);
    overflow: hidden;
    animation: searchSlideIn .2s cubic-bezier(.16,1,.3,1);
    max-height: 60vh;
    display: flex;
    flex-direction: column;
}
.search-modal-input-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}
.search-modal-input-wrap .material-symbols-outlined { color: var(--text-muted); font-size: 22px; }
.search-modal-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    background: none;
    color: var(--text);
    font-weight: 450;
}
.search-modal-input::placeholder { color: var(--text-muted); font-weight: 400; }
.search-modal-kbd {
    padding: 3px 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: .65rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: .02em;
}
.search-modal-results { padding: 8px; overflow-y: auto; }
.search-modal-group-label {
    font-size: .65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--text-muted);
    padding: 10px 12px 6px;
}
.search-modal-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius);
    font-size: .86rem;
    color: var(--text);
    transition: all .12s;
    font-weight: 450;
}
.search-modal-item:hover { background: var(--bg-hover); color: var(--text); }
.search-modal-item .material-symbols-outlined { font-size: 18px; color: var(--text-muted); }
.search-modal-item:hover .material-symbols-outlined { color: var(--text-secondary); }

@keyframes searchSlideIn {
    from { opacity: 0; transform: translateY(-12px) scale(.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* --- Page Content --- */
.page-content {
    padding: 28px 32px;
    flex: 1;
    min-width: 0;
    overflow-x: hidden;
}

/* --- Footer --- */
.dashboard-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    margin-top: auto;
    font-size: .76rem;
    color: var(--text-muted);
    position: relative;
}
.dashboard-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 32px;
    right: 32px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border) 15%, var(--border) 85%, transparent);
}
.footer-left, .footer-right { display: flex; align-items: center; gap: 10px; }
.footer-powered { font-weight: 400; letter-spacing: -.005em; }
.footer-powered strong { font-weight: 600; color: var(--text-secondary); }
.footer-version {
    background: var(--bg);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: .7rem;
    font-weight: 550;
    color: var(--text-muted);
    border: 1px solid var(--border);
}
.footer-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-muted); opacity: .3; }
.footer-status { display: flex; align-items: center; gap: 6px; font-weight: 450; }
.footer-status-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--success);
    display: inline-block;
    box-shadow: 0 0 0 3px rgba(5,150,105,.15);
    animation: statusPulse 2.5s ease-in-out infinite;
}
@keyframes statusPulse { 0%,100%{opacity:1;box-shadow:0 0 0 3px rgba(5,150,105,.15)} 50%{opacity:.5;box-shadow:0 0 0 5px rgba(5,150,105,.08)} }

/* --- Dark Mode --- */
body.dark-mode {
    --bg: #0B0F1A;
    --bg-card: #151B2B;
    --bg-hover: #1E2740;
    --text: #E2E8F0;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    --border: rgba(255,255,255,.08);
    --border-focus: #60A5FA;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
    --shadow: 0 1px 3px rgba(0,0,0,.5);
    --shadow-md: 0 4px 12px rgba(0,0,0,.5);
    --shadow-lg: 0 8px 24px rgba(0,0,0,.6);
    --shadow-xl: 0 20px 40px rgba(0,0,0,.6);
    --sidebar-bg: #060912;
    --sidebar-hover: rgba(255,255,255,.05);
    --sidebar-active: rgba(37,99,235,.15);
    --sidebar-border: rgba(255,255,255,.05);
}
body.dark-mode .topbar {
    background: rgba(21,27,43,.8);
    border-bottom-color: rgba(255,255,255,.06);
}
body.dark-mode .sidebar-avatar::after,
body.dark-mode .topbar-avatar::after { border-color: var(--sidebar-bg); }
body.dark-mode .search-modal-input { color: var(--text); }
body.dark-mode .search-modal { border-color: rgba(255,255,255,.08); }
body.dark-mode input, body.dark-mode select, body.dark-mode textarea {
    background: var(--bg);
    color: var(--text);
    border-color: var(--border);
}
body.dark-mode .card, body.dark-mode .stat-card { background: var(--bg-card); border-color: var(--border); }
body.dark-mode .table thead { background: var(--bg); }
body.dark-mode .table tbody tr:hover { background: rgba(255,255,255,.03); }
body.dark-mode .form-input, body.dark-mode .form-select { background: var(--bg); color: var(--text); border-color: var(--border); }
body.dark-mode .btn-outline { border-color: var(--border); color: var(--text-secondary); }
body.dark-mode .btn-outline:hover { background: var(--bg-hover); color: var(--text); border-color: var(--text-muted); }
body.dark-mode .modal { background: var(--bg-card); }
body.dark-mode .alert { border-color: var(--border); }
body.dark-mode code { background: var(--bg); color: #F59E0B; }
body.dark-mode .footer-version { background: var(--bg); border-color: var(--border); }
body.dark-mode .dashboard-footer::before { background: linear-gradient(90deg, transparent, var(--border) 15%, var(--border) 85%, transparent); }

/* Sidebar Overlay (Mobile) */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.5);
    backdrop-filter: blur(2px);
    z-index: 99;
    transition: opacity .25s;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-header-left h1 {
    margin-bottom: 4px;
}

.page-header-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ============================================
   Components
   ============================================ */

/* --- Cards --- */
.card {
    background: var(--bg-card);
    border-radius: 14px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

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

.card-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.card-body {
    padding: 24px;
}

.card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    background: var(--bg);
    border-radius: 0 0 var(--radius) var(--radius);
}

/* --- Stat Cards --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: 14px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: box-shadow var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
}

.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-card-icon.primary { background: var(--primary-light); color: var(--primary); }
.stat-card-icon.success { background: var(--success-light); color: var(--success); }
.stat-card-icon.warning { background: var(--warning-light); color: var(--warning); }
.stat-card-icon.info { background: var(--info-light); color: var(--info); }
.stat-card-icon.danger { background: var(--danger-light); color: var(--danger); }

.stat-card-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.stat-card-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 2px;
}

.stat-card-change {
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 4px;
}

.stat-card-change.up { color: var(--success); }
.stat-card-change.down { color: var(--danger); }

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: var(--font);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all .18s;
    white-space: nowrap;
    line-height: 1.4;
}

.btn .material-symbols-outlined { font-size: 18px; }

.btn-primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 1px 3px rgba(37,99,235,.2);
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: white; box-shadow: 0 4px 12px rgba(37,99,235,.25); }

.btn-success { background: var(--success); color: white; box-shadow: 0 1px 3px rgba(5,150,105,.2); }
.btn-success:hover { background: #047857; color: white; }

.btn-danger { background: var(--danger); color: white; box-shadow: 0 1px 3px rgba(220,38,38,.2); }
.btn-danger:hover { background: #B91C1C; color: white; }

.btn-outline {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
}
.btn-outline:hover { background: var(--bg); border-color: var(--text-muted); color: var(--text); }

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    padding: 8px 12px;
}
.btn-ghost:hover { background: var(--bg); color: var(--text); }

.btn-sm { padding: 7px 14px; font-size: 0.8rem; border-radius: 8px; }
.btn-lg { padding: 12px 24px; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }

.btn:disabled, .btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* --- Forms --- */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 6px;
}

.form-label .required { color: var(--danger); }

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 0.9rem;
    font-family: var(--font);
    color: var(--text);
    background: var(--bg-card);
    transition: all .18s;
    outline: none;
}

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

.form-input.error,
.form-select.error {
    border-color: var(--danger);
}

.form-input::placeholder { color: var(--text-muted); }

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

.form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.form-error {
    font-size: 0.8rem;
    color: var(--danger);
    margin-top: 4px;
}

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

/* --- Tables --- */
.table-wrapper {
    overflow-x: auto;
    border-radius: 14px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.table thead th {
    background: var(--bg);
    padding: 12px 18px;
    text-align: left;
    font-weight: 600;
    font-size: 0.76rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.table tbody td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.table tbody tr {
    transition: background var(--transition);
}

.table tbody tr:hover {
    background: var(--bg-hover);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table-actions {
    display: flex;
    gap: 4px;
}

.table-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    display: flex;
    align-items: center;
}

.table-action-btn:hover { background: var(--bg); color: var(--text); }
.table-action-btn.danger:hover { color: var(--danger); }

/* --- Badges --- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.badge-success { background: var(--success-light); color: var(--success); }
.badge-success .badge-dot { background: var(--success); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-warning .badge-dot { background: var(--warning); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-danger .badge-dot { background: var(--danger); }
.badge-info { background: var(--info-light); color: var(--info); }
.badge-info .badge-dot { background: var(--info); }
.badge-muted { background: #F1F5F9; color: var(--text-muted); }
.badge-muted .badge-dot { background: var(--text-muted); }

/* --- Alerts / Flash Messages --- */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.alert .material-symbols-outlined { font-size: 20px; flex-shrink: 0; margin-top: 1px; }

.alert-success {
    background: var(--success-light);
    color: var(--success);
    border-color: #C8E6C9;
}

.alert-error, .alert-danger {
    background: var(--danger-light);
    color: var(--danger);
    border-color: #FFCDD2;
}

.alert-warning {
    background: var(--warning-light);
    color: #E65100;
    border-color: #FFE0B2;
}

.alert-info {
    background: var(--info-light);
    color: var(--info);
    border-color: #B3E5FC;
}

.alert-dismiss {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
    padding: 2px;
}

.alert-dismiss:hover { opacity: 1; }

/* --- Modals --- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.2s ease;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-20px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
    padding: 24px 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 { font-size: 1.1rem; }

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.modal-close:hover { background: var(--bg); color: var(--text); }

.modal-body { padding: 24px; }

.modal-footer {
    padding: 0 24px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* --- Pagination --- */
.pagination {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 24px;
    justify-content: center;
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 9px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all .15s;
}

.pagination-btn:hover { background: var(--bg); color: var(--text); }
.pagination-btn.active { background: var(--primary); color: white; box-shadow: 0 2px 6px rgba(37,99,235,.2); }

.pagination-ellipsis {
    padding: 0 4px;
    color: var(--text-muted);
}

/* --- Empty State --- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state .material-symbols-outlined {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-state-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.empty-state-text {
    font-size: 0.9rem;
    max-width: 400px;
    margin: 0 auto 20px;
}

/* --- Search --- */
.search-box {
    position: relative;
    max-width: 300px;
}

.search-box .material-symbols-outlined {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: var(--text-muted);
}

.search-box .form-input {
    padding-left: 40px;
}

/* --- Toolbar (above tables) --- */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ============================================
   Public / Auth Pages
   ============================================ */
.auth-layout {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    padding: 20px;
}

.auth-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    width: 100%;
    max-width: 440px;
    padding: 40px;
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
    justify-content: center;
}

.auth-logo-icon {
    width: 44px;
    height: 44px;
    background: var(--primary);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.auth-logo-text {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}

.auth-title {
    font-size: 1.35rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 6px;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 28px;
    font-size: 0.9rem;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ============================================
   Utilities
   ============================================ */
.d-flex { display: flex; }
.d-grid { display: grid; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.p-16 { padding: 16px; }
.p-24 { padding: 24px; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.font-mono { font-family: 'JetBrains Mono', 'Fira Code', monospace; font-size: 0.85rem; }

/* --- Sidebar Overlay (Mobile) --- */
/* (moved to layout section above) */

/* ============================================
   Responsive
   ============================================ */

/* Tablet: auto-collapse sidebar */
@media (max-width: 1024px) and (min-width: 769px) {
    .sidebar:not(.open) {
        width: 72px;
    }
    .sidebar:not(.open) .sidebar-brand-text,
    .sidebar:not(.open) .sidebar-link-text,
    .sidebar:not(.open) .sidebar-section-label,
    .sidebar:not(.open) .sidebar-user-info,
    .sidebar:not(.open) .sidebar-user-chevron { opacity: 0; width: 0; overflow: hidden; }
    .sidebar:not(.open) .sidebar-logo--full { display: none; }
    .sidebar:not(.open) .sidebar-logo--icon { display: block; }
    .sidebar:not(.open) .sidebar-brand { padding: 20px 16px; justify-content: center; }
    .sidebar:not(.open) .sidebar-nav { padding: 0 8px; }
    .sidebar:not(.open) .sidebar-link { padding: 10px; justify-content: center; gap: 0; }
    .sidebar:not(.open) .sidebar-link.active::before { display: none; }
    .sidebar:not(.open) .sidebar-link.active { box-shadow: inset 0 0 0 1px rgba(37,99,235,.25); }
    .sidebar:not(.open) .sidebar-user { padding: 8px; justify-content: center; gap: 0; }
    .sidebar:not(.open) .sidebar-footer { padding: 12px 8px 16px; }
    .sidebar:not(.open) .sidebar-link[data-tooltip]:hover::after {
        content: attr(data-tooltip);
        position: absolute; left: calc(100% + 14px); top: 50%; transform: translateY(-50%);
        background: #1E293B; color: white; padding: 6px 14px; border-radius: var(--radius);
        font-size: .8rem; font-weight: 500; white-space: nowrap; z-index: 999; box-shadow: var(--shadow-lg);
    }
    .sidebar:not(.open) + .sidebar-overlay + .main-content,
    .sidebar:not(.open) ~ .main-content { margin-left: 72px; }
    .sidebar-toggle { display: none; }
    .topbar-profile-name { display: none; }
}

/* Mobile */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }
    .sidebar.open { transform: translateX(0); }
    .sidebar.collapsed { width: var(--sidebar-width); }
    .sidebar.collapsed .sidebar-brand-text,
    .sidebar.collapsed .sidebar-link-text,
    .sidebar.collapsed .sidebar-section-label,
    .sidebar.collapsed .sidebar-user-info,
    .sidebar.collapsed .sidebar-user-chevron { opacity: 1; width: auto; }
    .sidebar.collapsed .sidebar-brand { padding: 20px 20px 16px; justify-content: flex-start; }
    .sidebar.collapsed .sidebar-nav { padding: 0 10px; }
    .sidebar.collapsed .sidebar-link { padding: 8px 12px; justify-content: flex-start; gap: 12px; }
    .sidebar.collapsed .sidebar-link.active { box-shadow: none; }
    .sidebar.collapsed .sidebar-user { padding: 10px 10px; justify-content: flex-start; gap: 10px; }
    .sidebar.collapsed .sidebar-footer { padding: 12px 10px 16px; }

    .sidebar-overlay.active { display: block; }
    .sidebar-toggle { display: none; }

    .main-content { margin-left: 0 !important; }
    .topbar-hamburger { display: flex; }
    .topbar-breadcrumb { display: none; }
    .topbar-profile-name { display: none; }

    .page-content { padding: 20px 16px; }
    .page-header { flex-direction: column; align-items: flex-start; gap: 12px; }
    .stats-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .toolbar { flex-direction: column; align-items: stretch; }
    .auth-card { padding: 24px; }

    .dashboard-footer { flex-direction: column; gap: 8px; text-align: center; padding: 16px; }
    .dashboard-footer::before { left: 16px; right: 16px; }
    .footer-left, .footer-right { justify-content: center; }
}

@media (max-width: 480px) {
    .modal { width: 95%; max-height: 95vh; }
    .topbar { padding: 0 16px; }
    .topbar-right { gap: 0; }
}

/* White Label Logo */
.sidebar-logo,.wl-logo{display:block;max-height:34px;width:auto;flex-shrink:0}
