:root {
    --bg: #f4f6fb;
    --bg-sidebar: #0f172a;
    --bg-sidebar-hover: #1e293b;
    --bg-card: #ffffff;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --text: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #eff6ff;
    --success: #10b981;
    --success-bg: #ecfdf5;
    --warning: #f59e0b;
    --warning-bg: #fffbeb;
    --danger: #ef4444;
    --danger-bg: #fef2f2;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --sidebar-w: 248px;
    --topbar-h: 64px;
    --transition: 0.2s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary-dark); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary); }

/* ===== Layout ===== */
.layout { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w);
    background: var(--bg-sidebar);
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    transition: transform var(--transition);
}

.sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 99;
}

.brand {
    padding: 22px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.brand-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.brand-icon svg { width: 20px; height: 20px; color: #fff; }

.brand-text { min-width: 0; }
.brand-title { font-size: 15px; font-weight: 700; color: #fff; white-space: nowrap; }
.brand-sub { font-size: 11px; color: #64748b; margin-top: 2px; }

.sidebar nav { flex: 1; padding: 16px 12px; overflow-y: auto; }

.nav-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #475569;
    padding: 8px 12px 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 2px;
    border-radius: var(--radius-sm);
    color: #94a3b8;
    font-size: 13px;
    font-weight: 500;
    transition: all var(--transition);
    position: relative;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; opacity: .8; }
.nav-item:hover { background: var(--bg-sidebar-hover); color: #e2e8f0; text-decoration: none; }
.nav-item.active {
    background: linear-gradient(135deg, rgba(59,130,246,.2), rgba(99,102,241,.15));
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(59,130,246,.3);
}
.nav-item.active svg { opacity: 1; color: #60a5fa; }

.nav-badge {
    margin-left: auto;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.user-bar {
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,.08);
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, #334155, #475569);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.user-avatar svg { width: 18px; height: 18px; color: #94a3b8; }

.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 13px; font-weight: 600; color: #e2e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11px; color: #64748b; }

.btn-logout {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm);
    color: #64748b;
    transition: all var(--transition);
}
.btn-logout:hover { background: rgba(239,68,68,.15); color: #f87171; text-decoration: none; }
.btn-logout svg { width: 16px; height: 16px; }

.main {
    flex: 1;
    margin-left: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
}

.topbar {
    height: var(--topbar-h);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-sm);
}

.topbar-left { display: flex; align-items: center; gap: 16px; min-width: 0; }

.btn-menu {
    display: none;
    width: 36px; height: 36px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    cursor: pointer;
    align-items: center; justify-content: center;
}
.btn-menu svg { width: 18px; height: 18px; }

.page-title { font-size: 18px; font-weight: 700; color: var(--text); white-space: nowrap; }
.page-desc { font-size: 12px; color: var(--text-secondary); margin-top: 1px; }

.topbar-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.date-picker {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
}
.date-picker svg { width: 16px; height: 16px; color: var(--text-secondary); flex-shrink: 0; }
.date-picker label { font-size: 12px; color: var(--text-secondary); white-space: nowrap; }
.date-picker select {
    border: none;
    background: transparent;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    outline: none;
    max-width: 220px;
}

.content { padding: 28px; flex: 1; }

/* ===== Stat Cards ===== */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    display: flex;
    gap: 14px;
    transition: box-shadow var(--transition), transform var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }

.stat-icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.stat-icon svg { width: 22px; height: 22px; }
.stat-icon.blue { background: var(--primary-light); color: var(--primary); }
.stat-icon.green { background: var(--success-bg); color: var(--success); }
.stat-icon.orange { background: var(--warning-bg); color: var(--warning); }
.stat-icon.red { background: var(--danger-bg); color: var(--danger); }
.stat-icon.gray { background: #f1f5f9; color: #64748b; }

.stat-body { min-width: 0; }
.stat-label { font-size: 12px; color: var(--text-secondary); margin-bottom: 4px; }
.stat-value { font-size: 22px; font-weight: 700; color: var(--text); line-height: 1.2; }
.stat-value.sm { font-size: 18px; }
.stat-trend { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ===== Panels ===== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }

.panel {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    overflow: hidden;
}

.panel-head {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.panel-head h3 { font-size: 14px; font-weight: 600; color: var(--text); }
.panel-head .link { font-size: 12px; font-weight: 500; }

.panel-body { padding: 0; }
.panel-body.padded { padding: 20px; }

/* ===== Tables ===== */
.table-wrap { overflow-x: auto; }
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.table th {
    padding: 11px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--text-secondary);
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text);
    vertical-align: middle;
}
.table tbody tr { transition: background var(--transition); }
.table tbody tr:hover { background: #f8fafc; }
.table tbody tr:last-child td { border-bottom: none; }
.table .num { font-variant-numeric: tabular-nums; font-weight: 500; }
.table .num-danger { color: var(--danger); font-weight: 700; }
.table .num-success { color: var(--success); font-weight: 600; }

.row-warn { background: var(--warning-bg) !important; }
.row-warn:hover { background: #fef3c7 !important; }

.table-actions { display: flex; gap: 8px; align-items: center; }
.table-actions a, .table-actions button { font-size: 12px; }

/* ===== Tags ===== */
.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.tag-green { background: #dcfce7; color: #166534; }
.tag-orange { background: #ffedd5; color: #9a3412; }
.tag-blue { background: #dbeafe; color: #1e40af; }
.tag-red { background: #fee2e2; color: #991b1b; }
.tag-yellow { background: #fef9c3; color: #854d0e; }
.tag-purple { background: #ede9fe; color: #5b21b6; }
.tag-teal { background: #ccfbf1; color: #115e59; }
.tag-gray { background: #f1f5f9; color: #475569; }

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    transition: all var(--transition);
    white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; }
.btn:hover { background: #f8fafc; border-color: #cbd5e1; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-danger { color: var(--danger); border-color: #fecaca; }
.btn-danger:hover { background: var(--danger-bg); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: #f1f5f9; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-block { width: 100%; }
.btn-link { background: none; border: none; color: var(--primary-dark); cursor: pointer; font-size: 13px; padding: 0; font-weight: 500; }
.btn-link:hover { color: var(--primary); text-decoration: underline; }
.btn-link.danger { color: var(--danger); }
.btn:disabled { opacity: .6; cursor: not-allowed; }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }

/* ===== Forms ===== */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
}
.form-group .hint-inline { font-weight: 400; color: var(--text-muted); font-size: 12px; }

input[type=text], input[type=password], input[type=date], input[type=number], select, textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text);
    background: var(--bg-card);
    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(59,130,246,.12);
}

.input-sm { width: 140px !important; }

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    align-items: flex-end;
}
.filter-bar .form-group { margin-bottom: 0; flex: 1; min-width: 130px; }
.filter-bar .form-group label { font-size: 11px; color: var(--text-secondary); margin-bottom: 4px; }
.filter-bar .filter-actions { flex: 0; min-width: auto; }

/* File Upload Zone */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    background: #fafbfc;
    margin-bottom: 16px;
}
.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--primary);
    background: var(--primary-light);
}
.upload-zone svg { width: 40px; height: 40px; color: var(--text-muted); margin-bottom: 12px; }
.upload-zone.dragover svg { color: var(--primary); }
.upload-zone p { font-size: 14px; color: var(--text); font-weight: 500; }
.upload-zone span { font-size: 12px; color: var(--text-secondary); display: block; margin-top: 4px; }
.upload-zone .file-name {
    margin-top: 10px;
    font-size: 13px;
    color: var(--primary-dark);
    font-weight: 600;
}
.upload-zone input[type=file] { display: none; }

/* Toggle Switch */
.switch { position: relative; display: inline-block; width: 40px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider {
    position: absolute; inset: 0;
    background: #cbd5e1;
    border-radius: 22px;
    cursor: pointer;
    transition: var(--transition);
}
.switch-slider:before {
    content: "";
    position: absolute;
    width: 18px; height: 18px;
    left: 2px; bottom: 2px;
    background: #fff;
    border-radius: 50%;
    transition: var(--transition);
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.switch input:checked + .switch-slider { background: var(--primary); }
.switch input:checked + .switch-slider:before { transform: translateX(18px); }

/* ===== Alerts ===== */
.alert-list { padding: 12px 16px; }

.alert-item {
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    border: 1px solid var(--border-light);
    background: #f8fafc;
    transition: opacity var(--transition);
}
.alert-item.level-1 { border-left: 3px solid #94a3b8; }
.alert-item.level-2 { border-left: 3px solid var(--warning); background: var(--warning-bg); border-color: #fde68a; }
.alert-item.level-3 { border-left: 3px solid var(--danger); background: var(--danger-bg); border-color: #fecaca; }
.alert-item.read { opacity: .55; }

.alert-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.alert-head strong { font-size: 14px; color: var(--text); display: block; margin-bottom: 4px; }
.alert-item p { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }

.badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.badge-1 { background: #e2e8f0; color: #475569; }
.badge-2 { background: #fef3c7; color: #92400e; }
.badge-3 { background: #fee2e2; color: #991b1b; }

.alert-type-tag {
    font-size: 11px;
    color: var(--text-muted);
    background: rgba(0,0,0,.04);
    padding: 2px 8px;
    border-radius: 4px;
}

.alert-error {
    background: var(--danger-bg);
    color: #991b1b;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid #fecaca;
    margin-bottom: 16px;
    font-size: 13px;
}

.result-box {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    line-height: 1.6;
}
.result-box.success { background: var(--success-bg); color: #065f46; border: 1px solid #a7f3d0; }
.result-box.error { background: var(--danger-bg); color: #991b1b; border: 1px solid #fecaca; }
.result-box.loading { background: var(--primary-light); color: var(--primary-dark); border: 1px solid #bfdbfe; }

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}
.empty-state svg { width: 56px; height: 56px; margin-bottom: 16px; opacity: .4; }
.empty-state p { font-size: 14px; font-weight: 500; color: var(--text-secondary); margin-bottom: 6px; }
.empty-state span { font-size: 12px; }
.empty-state .btn { margin-top: 16px; }

.empty { text-align: center; color: var(--text-muted); padding: 32px !important; }

/* ===== Info Cards ===== */
.info-card {
    background: linear-gradient(135deg, #eff6ff, #f0f9ff);
    border: 1px solid #bfdbfe;
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-bottom: 16px;
}
.info-card p { font-size: 13px; color: #1e40af; line-height: 1.6; }

.field-table td:first-child {
    font-weight: 600;
    color: var(--text-secondary);
    width: 80px;
    white-space: nowrap;
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-top: 1px solid var(--border-light);
    font-size: 13px;
    color: var(--text-secondary);
}
.pagination-btns { display: flex; gap: 6px; }

/* ===== Login ===== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f172a 100%);
    padding: 24px;
    position: relative;
    overflow: hidden;
}
.login-page::before {
    content: "";
    position: absolute;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(59,130,246,.15) 0%, transparent 70%);
    top: -200px; right: -100px;
    pointer-events: none;
}
.login-page::after {
    content: "";
    position: absolute;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(99,102,241,.12) 0%, transparent 70%);
    bottom: -100px; left: -100px;
    pointer-events: none;
}

.login-wrap { display: flex; gap: 48px; align-items: center; max-width: 900px; width: 100%; position: relative; z-index: 1; }

.login-brand { flex: 1; color: #fff; display: none; }
.login-brand h1 { font-size: 32px; font-weight: 800; margin-bottom: 12px; line-height: 1.2; }
.login-brand p { font-size: 15px; color: #94a3b8; line-height: 1.7; margin-bottom: 24px; }
.login-features { list-style: none; }
.login-features li {
    display: flex; align-items: center; gap: 10px;
    font-size: 14px; color: #cbd5e1;
    margin-bottom: 10px;
}
.login-features li::before {
    content: "";
    width: 6px; height: 6px;
    background: #3b82f6;
    border-radius: 50%;
    flex-shrink: 0;
}

.login-box {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
    flex-shrink: 0;
}
.login-box .logo {
    width: 48px; height: 48px;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 20px;
}
.login-box .logo svg { width: 26px; height: 26px; color: #fff; }
.login-box h2 { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.login-box .sub { color: var(--text-secondary); font-size: 13px; margin-bottom: 28px; }

.input-icon-wrap { position: relative; }
.input-icon-wrap svg {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    width: 16px; height: 16px; color: var(--text-muted);
    pointer-events: none;
}
.input-icon-wrap input { padding-left: 38px; }

/* ===== Toast ===== */
.toast-container {
    position: fixed;
    top: 20px; right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}
.toast {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    box-shadow: var(--shadow-lg);
    font-size: 13px;
    min-width: 260px;
    max-width: 360px;
    pointer-events: auto;
    animation: toastIn .3s ease;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.info { border-left: 3px solid var(--primary); }
.toast-msg { flex: 1; line-height: 1.4; }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ===== Modal ===== */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(15,23,42,.5);
    z-index: 200;
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
    animation: fadeIn .2s ease;
}
.modal {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    max-width: 400px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    animation: slideUp .25s ease;
}
.modal h4 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.modal p { font-size: 14px; color: var(--text-secondary); margin-bottom: 20px; line-height: 1.5; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ===== Misc ===== */
.hint { color: var(--text-secondary); font-size: 12px; line-height: 1.6; }
.small { font-size: 12px; }
.bold { font-weight: 700; }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-muted { color: var(--text-muted); }
.link { font-size: 13px; font-weight: 500; }

.match-cell { max-width: 200px; }
.match-cell .teams { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.match-cell .league-name { font-size: 11px; color: var(--text-muted); }

.member-link { font-weight: 600; color: var(--primary-dark); }
.member-link:hover { text-decoration: underline; }

.risk-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.risk-stat {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 14px;
    text-align: center;
}
.risk-stat .num { font-size: 24px; font-weight: 700; }
.risk-stat .lbl { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }
.risk-stat.level-3 .num { color: var(--danger); }
.risk-stat.level-2 .num { color: var(--warning); }
.risk-stat.level-1 .num { color: var(--text-secondary); }

/* ===== Responsive ===== */
@media (min-width: 768px) {
    .login-brand { display: block; }
}

@media (max-width: 1024px) {
    .grid-2 { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay.open { display: block; }
    .main { margin-left: 0; }
    .btn-menu { display: flex; }
    .content { padding: 16px; }
    .topbar { padding: 0 16px; }
    .page-desc { display: none; }
    .date-picker label { display: none; }
    .login-wrap { flex-direction: column; }
    .login-box { max-width: 100%; padding: 28px; }
}
