/* ============================================
   DCRM — Design System v2
   Font: DM Sans · Palette: Navy + Blue Accent
   ============================================ */

/* --- RESET & BASE --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif; background: var(--bg); color: var(--text-primary); line-height: 1.55; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
table { border-collapse: separate; border-spacing: 0; }

/* --- VARIABLES --- */
:root {
    --bg: #F4F5F7;
    --surface: #FFFFFF;
    --surface-hover: #F8F9FB;
    --border: #E2E5EB;
    --border-light: #EEF0F4;
    --text-primary: #1A1D26;
    --text-secondary: #5C6170;
    --text-muted: #9299A6;
    --text-inverse: #FFFFFF;
    --accent: #2563EB;
    --accent-light: #EFF4FF;
    --accent-hover: #1D4ED8;
    --success: #059669;
    --success-bg: #ECFDF5;
    --warning: #D97706;
    --warning-bg: #FFFBEB;
    --danger: #DC2626;
    --danger-bg: #FEF2F2;
    --purple: #7C3AED;
    --purple-bg: #F5F3FF;
    --sidebar-bg: #0F172A;
    --sidebar-text: #94A3B8;
    --sidebar-active: #FFFFFF;
    --sidebar-active-bg: rgba(255,255,255,0.08);
    --sidebar-hover: rgba(255,255,255,0.05);
    --sidebar-width: 256px;
    --sidebar-collapsed: 72px;
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --topbar-height: 60px;
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.07);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.1);
    --font: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, monospace;
    --transition: 0.15s ease;
    /* Legacy aliases */
    --primary: #2563EB;
    --gray-50: #F8FAFC; --gray-100: #F1F5F9; --gray-200: #E2E8F0; --gray-300: #CBD5E1;
    --gray-400: #94A3B8; --gray-500: #64748B; --gray-600: #475569; --gray-700: #334155;
    --gray-800: #1E293B; --gray-900: #0F172A;
}

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

/* ═══════════════ SIDEBAR ═══════════════ */
.sidebar {
    width: var(--sidebar-width); background: var(--sidebar-bg); color: var(--sidebar-text);
    display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; z-index: 100;
    border-right: 1px solid rgba(255,255,255,0.06); transition: width 0.25s ease; overflow: hidden;
}
.sidebar-header {
    padding: 20px 22px; display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sidebar-logo { display: flex; align-items: center; gap: 12px; }
.logo-icon {
    width: 34px; height: 34px; background: var(--accent); border-radius: 9px;
    display: flex; align-items: center; justify-content: center; color: #fff;
    font-weight: 700; font-size: 15px; flex-shrink: 0;
}
.logo-text {
    font-size: 17px; font-weight: 700; color: #fff; letter-spacing: -0.3px;
    transition: opacity 0.2s, width 0.2s; overflow: hidden; white-space: nowrap;
}
.sidebar-toggle {
    background: none; border: none; color: #475569; cursor: pointer; padding: 6px;
    border-radius: 6px; transition: all var(--transition); display: flex;
    align-items: center; justify-content: center; flex-shrink: 0;
}
.sidebar-toggle:hover { background: rgba(255,255,255,0.08); color: #94A3B8; }
.sidebar-toggle svg { transition: transform 0.3s ease; }

.sidebar-nav { flex: 1; padding: 14px 12px; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; gap: 2px; }
.nav-section {
    margin-top: 18px; margin-bottom: 6px; padding: 0 10px;
    font-size: 10.5px; font-weight: 600; letter-spacing: 0.8px;
    text-transform: uppercase; color: #475569; transition: all 0.2s; overflow: hidden; white-space: nowrap;
}
.nav-section:first-child { margin-top: 0; }
.nav-divider { height: 0; margin: 8px 0; border-top: 1px solid rgba(255,255,255,0.06); }

.nav-item {
    display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 8px;
    color: var(--sidebar-text); text-decoration: none; font-size: 13.5px; font-weight: 500;
    transition: all var(--transition); position: relative; white-space: nowrap; overflow: hidden;
}
.nav-item:hover { background: var(--sidebar-hover); color: #CBD5E1; text-decoration: none; }
.nav-item.active { background: var(--sidebar-active-bg); color: var(--sidebar-active); font-weight: 600; }
.nav-item.active::before {
    content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px;
    width: 3px; background: var(--accent); border-radius: 0 3px 3px 0;
}
.nav-item svg { width: 20px; height: 20px; opacity: 0.55; flex-shrink: 0; }
.nav-item.active svg { opacity: 1; }
.nav-item:hover svg { opacity: 0.8; }
.nav-label { white-space: nowrap; overflow: hidden; transition: opacity 0.2s, width 0.2s; }
.nav-badge {
    margin-left: auto; background: var(--accent); color: #fff;
    font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 10px;
    min-width: 20px; text-align: center; flex-shrink: 0; transition: all 0.2s;
}

.sidebar-footer {
    padding: 14px 16px; border-top: 1px solid rgba(255,255,255,0.06);
    display: flex; align-items: center; gap: 10px; transition: all 0.25s;
}
.user-avatar {
    width: 34px; height: 34px; border-radius: 9px; background: #334155;
    color: #94A3B8; display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 600; flex-shrink: 0;
}
.user-info { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; overflow: hidden; }
.user-details { min-width: 0; overflow: hidden; }
.user-name { font-size: 13px; font-weight: 600; color: #E2E8F0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11.5px; color: #64748B; }
.logout-btn {
    margin-left: auto; color: #475569; cursor: pointer; padding: 6px; border-radius: 6px;
    transition: all var(--transition); background: none; border: none; text-decoration: none;
    display: flex; align-items: center;
}
.logout-btn:hover { background: rgba(255,255,255,0.08); color: #94A3B8; text-decoration: none; }

/* ─── Sidebar Collapse ─── */
.sidebar.collapsed { width: var(--sidebar-collapsed); }
.sidebar.collapsed + .main-content { margin-left: var(--sidebar-collapsed); }
body.sidebar-collapsed .main-content { margin-left: var(--sidebar-collapsed); }
.sidebar.collapsed .sidebar-header { padding: 16px 0; justify-content: center; flex-direction: column; gap: 8px; }
.sidebar.collapsed .sidebar-logo { gap: 0; }
.sidebar.collapsed .logo-text { width: 0; opacity: 0; overflow: hidden; }
.sidebar.collapsed .sidebar-toggle svg { transform: rotate(180deg); }
.sidebar.collapsed .nav-section {
    font-size: 0; padding: 0; margin-top: 12px; margin-bottom: 8px;
    border-top: 1px solid rgba(255,255,255,0.06); height: 1px;
}
.sidebar.collapsed .nav-section:first-child { border-top: none; height: 0; margin: 0; }
.sidebar.collapsed .nav-divider { margin: 4px 8px; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 10px 0; gap: 0; }
.sidebar.collapsed .nav-label { width: 0; opacity: 0; position: absolute; }
.sidebar.collapsed .nav-badge { position: absolute; top: 2px; right: 6px; font-size: 9px; padding: 0 4px; min-width: 16px; height: 16px; line-height: 16px; }
.sidebar.collapsed .nav-item.active::before { left: 0; }
.sidebar.collapsed .nav-item svg { margin: 0; }
.sidebar.collapsed .sidebar-nav { padding: 14px 8px; }
.sidebar.collapsed .sidebar-footer { padding: 14px 0; justify-content: center; }
.sidebar.collapsed .user-details { display: none; }
.sidebar.collapsed .logout-btn { display: none; }
.sidebar.collapsed .user-avatar { margin: 0; }
.sidebar.collapsed .user-info { justify-content: center; gap: 0; flex: none; }

/* Tooltips when collapsed */
.sidebar.collapsed .nav-item[data-tooltip] { position: relative; }
.sidebar.collapsed .nav-item[data-tooltip]::after {
    content: attr(data-tooltip); position: absolute; left: 100%; top: 50%; transform: translateY(-50%);
    background: var(--sidebar-bg); color: #E2E8F0; padding: 6px 12px; border-radius: 6px;
    font-size: 12.5px; font-weight: 500; white-space: nowrap; opacity: 0; pointer-events: none;
    transition: opacity 0.15s, left 0.15s; box-shadow: 0 4px 12px rgba(0,0,0,0.3); margin-left: 8px; z-index: 200;
}
.sidebar.collapsed .nav-item[data-tooltip]:hover::after { opacity: 1; left: calc(100% + 4px); }

/* ═══════════════ MAIN CONTENT ═══════════════ */
.main-content { flex: 1; margin-left: var(--sidebar-width); transition: margin-left 0.25s ease; min-height: 100vh; display: flex; flex-direction: column; }
.page-content { padding: 28px; flex: 1; }

/* ─── Page Header ─── */
.page-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 24px; gap: 16px; flex-wrap: wrap; }
.page-header h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.5px; color: var(--text-primary); }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* ═══════════════ CARDS ═══════════════ */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.card-header {
    padding: 16px 20px; border-bottom: 1px solid var(--border-light);
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.card-header h2, .card-header h3 { font-size: 14px; font-weight: 600; color: var(--text-primary); margin: 0; }
.card-body { padding: 20px; }
.card-footer { padding: 12px 20px; border-top: 1px solid var(--border-light); background: var(--gray-50); }
.mb-4 { margin-bottom: 14px; }
.mt-4 { margin-top: 14px; }

/* ═══════════════ BUTTONS ═══════════════ */
.btn {
    display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px;
    border-radius: var(--radius-sm); font-size: 13.5px; font-weight: 600; font-family: var(--font);
    cursor: pointer; border: none; transition: all var(--transition); text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); box-shadow: var(--shadow-sm); }
.btn-secondary { background: var(--bg); color: var(--text-primary); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--surface-hover); border-color: var(--gray-300); }
.btn-ghost { background: none; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--bg); color: var(--text-primary); }
.btn-danger { background: var(--danger-bg); color: var(--danger); }
.btn-danger:hover { background: #FEE2E2; }
.btn-sm { padding: 5px 11px; font-size: 12.5px; }
.btn-lg { padding: 11px 22px; font-size: 15px; }
.btn-text { background: none; border: none; color: var(--accent); cursor: pointer; font-size: 13px; font-weight: 500; padding: 4px 0; font-family: var(--font); }
.btn-text:hover { text-decoration: underline; }

/* ═══════════════ FORMS ═══════════════ */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-secondary); margin-bottom: 5px; }
.form-input, .form-select, .form-textarea {
    width: 100%; padding: 9px 13px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-size: 14px; font-family: var(--font); color: var(--text-primary); background: var(--surface);
    transition: all var(--transition); outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,0.08); }
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }
.form-input.error, .form-input.has-error { border-color: var(--danger); }
.form-textarea { resize: vertical; min-height: 80px; }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%239299A6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; cursor: pointer; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-checkbox { display: flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }
.form-checkbox input { accent-color: var(--accent); width: 16px; height: 16px; cursor: pointer; }
.form-input[data-mask].valid { border-color: var(--success); }
.form-input[data-mask].invalid { border-color: var(--danger); }

/* Field rows (enrollment editor) */
.field-group { margin-bottom: 12px; }
.field-row { padding: 12px; border: 1px solid var(--border-light); border-radius: var(--radius); margin-bottom: 8px; }
.field-row-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.field-row-label { font-weight: 600; font-size: 13px; }
.field-row-details { font-size: 12px; color: var(--text-muted); }
.field-drag { cursor: grab; color: var(--text-muted); }
.field-input, .field-select, .field-textarea { width: 100%; padding: 7px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; font-family: var(--font); }
.field-label { font-size: 12px; font-weight: 500; color: var(--text-secondary); margin-bottom: 3px; display: block; }

/* ═══════════════ TABLES ═══════════════ */
.table-responsive, .table-container { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
table, .table { width: 100%; border-collapse: separate; border-spacing: 0; }
thead th {
    padding: 10px 16px; font-size: 11.5px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.5px; color: var(--text-muted); text-align: left; background: var(--bg);
    border-bottom: 1px solid var(--border-light); white-space: nowrap;
}
tbody td { padding: 13px 16px; border-bottom: 1px solid var(--border-light); font-size: 13.5px; vertical-align: middle; }
tbody tr { transition: background var(--transition); }
tbody tr:hover { background: var(--surface-hover); }
tbody tr:last-child td { border-bottom: none; }
.td-main { font-weight: 600; color: var(--text-primary); }
.td-sub { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
code { font-family: var(--mono); font-size: 12.5px; color: var(--text-secondary); background: var(--bg); padding: 2px 6px; border-radius: 4px; }

/* ═══════════════ BADGES ═══════════════ */
.badge {
    display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 20px;
    font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 1.4;
}
.badge-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.badge-sm { font-size: 11px; padding: 2px 7px; }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }

/* ═══════════════ ALERTS ═══════════════ */
.alert {
    padding: 12px 18px; border-radius: var(--radius); margin-bottom: 16px;
    font-size: 13.5px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    border: 1px solid transparent;
}
.alert-success { background: var(--success-bg); color: #065F46; border-color: #A7F3D0; }
.alert-danger { background: var(--danger-bg); color: #991B1B; border-color: #FECACA; }
.alert-warning { background: var(--warning-bg); color: #92400E; border-color: #FDE68A; }
.alert-info { background: var(--accent-light); color: #1E40AF; border-color: #BFDBFE; }
.alert-close { background: none; border: none; cursor: pointer; font-size: 18px; color: inherit; opacity: 0.6; padding: 0 4px; }
.alert-close:hover { opacity: 1; }

/* ═══════════════ MODALS ═══════════════ */
.modal-overlay {
    display: none; position: fixed; inset: 0; background: rgba(15,23,42,0.5);
    z-index: 500; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(2px);
}
.modal-overlay.open { display: flex; }
.modal {
    background: var(--surface); border-radius: var(--radius-lg); width: 100%; max-width: 600px;
    max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg);
}
.modal-header {
    padding: 18px 22px; border-bottom: 1px solid var(--border-light);
    display: flex; align-items: center; justify-content: space-between;
}
.modal-header h3 { font-size: 16px; font-weight: 700; margin: 0; }
.modal-close { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--text-muted); padding: 4px; border-radius: 6px; }
.modal-close:hover { background: var(--bg); color: var(--text-primary); }
.modal-body { padding: 22px; }
.modal-footer { padding: 16px 22px; border-top: 1px solid var(--border-light); display: flex; justify-content: flex-end; gap: 8px; }

/* ═══════════════ TABS ═══════════════ */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 24px; overflow-x: auto; padding: 0 4px; }
.tab {
    padding: 12px 18px; font-size: 13.5px; font-weight: 500; color: var(--text-muted);
    text-decoration: none; border-bottom: 2px solid transparent; transition: all var(--transition);
    white-space: nowrap; cursor: pointer;
}
.tab:hover { color: var(--text-primary); text-decoration: none; }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

/* ═══════════════ STAT CARDS ═══════════════ */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.stat-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 20px; display: flex; flex-direction: column; gap: 10px; transition: all var(--transition);
}
.stat-card:hover { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,0.06); }
.stat-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.stat-value { font-size: 28px; font-weight: 700; letter-spacing: -1px; color: var(--text-primary); }
.stat-label { font-size: 13px; color: var(--text-muted); }

/* ═══════════════ DETAIL / DATA ═══════════════ */
.detail-row { padding: 10px 0; border-bottom: 1px solid var(--border-light); font-size: 13.5px; display: flex; align-items: flex-start; gap: 8px; }
.detail-row:last-child { border-bottom: none; }
.data-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0; }
.data-cell { padding: 14px 18px; border-bottom: 1px solid var(--border-light); }
.data-label { font-size: 11.5px; font-weight: 500; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 4px; }
.data-value { font-size: 15px; font-weight: 500; color: var(--text-primary); }

/* ═══════════════ DOCUMENT CHECKLIST ═══════════════ */
.doc-checklist { list-style: none; }
.doc-checklist-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border-light); font-size: 13.5px; }
.doc-checklist-item:last-child { border-bottom: none; }
.doc-status-icon { width: 24px; height: 24px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; }
.doc-status-icon.verified { background: var(--success-bg); color: var(--success); }
.doc-status-icon.uploaded { background: var(--accent-light); color: var(--accent); }
.doc-status-icon.rejected { background: var(--danger-bg); color: var(--danger); }
.doc-status-icon.missing { background: var(--bg); color: var(--text-muted); }
.check-icon { color: var(--success); }

/* ═══════════════ GATE ERROR BOX ═══════════════ */
.gate-error-box, .error-box { background: var(--danger-bg); border: 1px solid #FECACA; border-radius: var(--radius); padding: 14px 18px; margin-bottom: 16px; }
.gate-error-box li, .error-box li { font-size: 13px; color: #991B1B; margin-left: 16px; margin-bottom: 4px; }

/* ═══════════════ FILTERS ═══════════════ */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 14px 20px; }
.filters .form-input, .filters .form-select { width: auto; min-width: 160px; padding: 7px 12px; font-size: 13px; }

/* ═══════════════ PAGINATION ═══════════════ */
.pagination { display: flex; align-items: center; gap: 4px; justify-content: center; padding: 16px 0; }
.pagination a, .pagination span {
    padding: 6px 12px; border-radius: var(--radius-sm); font-size: 13px; color: var(--text-secondary);
    text-decoration: none; transition: all var(--transition); border: 1px solid transparent;
}
.pagination a:hover { background: var(--bg); border-color: var(--border); }
.pagination .active { background: var(--accent); color: #fff; font-weight: 600; }

/* ═══════════════ PROGRESS ═══════════════ */
.progress { height: 6px; background: var(--border-light); border-radius: 3px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 3px; transition: width 0.4s ease; }

/* ═══════════════ EMPTY STATE ═══════════════ */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.empty-state p { font-size: 14px; }

/* ═══════════════ TOASTS ═══════════════ */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 1000; display: flex; flex-direction: column; gap: 8px; }
.toast { padding: 12px 18px; border-radius: var(--radius); font-size: 13px; box-shadow: var(--shadow-md); color: #fff; animation: toastIn 0.3s ease; }
.toast-success { background: var(--success); }
.toast-danger { background: var(--danger); }
@keyframes toastIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ═══════════════ UTILITY ═══════════════ */
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.text-muted { color: var(--text-muted) !important; }
.text-danger { color: var(--danger) !important; }
.text-success { color: var(--success) !important; }
.text-center { text-align: center; }
.font-bold { font-weight: 700; }
.font-mono { font-family: var(--mono); }
.flex { display: flex; }
.flex-1 { flex: 1; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.items-center { align-items: center; }
.hidden { display: none !important; }

/* ═══════════════ MOBILE ═══════════════ */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); width: var(--sidebar-width); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0 !important; }
    .topbar-menu { display: block !important; }
    .page-content { padding: 16px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .form-row { grid-template-columns: 1fr; }
    .page-header { flex-direction: column; align-items: flex-start; }
    .data-grid { grid-template-columns: 1fr; }
}
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(15,23,42,0.5); z-index: 99; backdrop-filter: blur(2px); }
.sidebar-overlay.active { display: block; }

/* ═══════════════ LOGIN PAGE ═══════════════ */
.login-container { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--sidebar-bg); padding: 20px; }
.login-card { background: var(--surface); border-radius: var(--radius-xl); padding: 40px; width: 100%; max-width: 420px; box-shadow: var(--shadow-lg); }
.login-header { text-align: center; margin-bottom: 28px; }
.login-header h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.5px; }
.login-header p { color: var(--text-muted); margin-top: 6px; font-size: 14px; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot.green { background: var(--success); }
.dot.red { background: var(--danger); }
