/* ==========================================================================
   CMMS Design System
   ========================================================================== */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-soft: #eff6ff;
    --primary-line: #bfdbfe;
    --ink: #0f172a;
    --ink-soft: #334155;
    --muted: #64748b;
    --muted-light: #94a3b8;
    --line: #e2e8f0;
    --line-strong: #cbd5e1;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --bg: #f5f7fb;
    --success: #15803d;
    --success-soft: #ecfdf3;
    --warning: #b45309;
    --warning-soft: #fffbeb;
    --danger: #dc2626;
    --danger-soft: #fef2f2;
    --info: #0369a1;
    --info-soft: #f0f9ff;
    --sidebar-bg: #0b1526;
    --sidebar-bg-alt: #0f1e35;
    --sidebar-text: #b8c4d6;
    --sidebar-muted: #71809a;
    --sidebar-active: #1d4ed8;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
    --shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 1px 2px rgba(15, 23, 42, .04);
    --shadow-md: 0 8px 20px -12px rgba(15, 23, 42, .25);
    --shadow-lg: 0 18px 40px -18px rgba(15, 23, 42, .35);
    --sidebar-width: 266px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 { margin: 0; font-weight: 650; letter-spacing: -.015em; color: var(--ink); }
p { margin: 0; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; }
svg.icon { width: 19px; height: 19px; flex: none; }

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.app-body { min-height: 100vh; }
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-width);
    flex: none;
    background: linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-bg-alt) 100%);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    transition: transform .22s ease;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 20px 18px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.brand-link { display: flex; align-items: center; gap: 11px; color: #fff; min-width: 0; }
.brand-link:hover { color: #fff; }
.brand-mark {
    width: 38px; height: 38px; border-radius: 10px;
    display: grid; place-items: center; flex: none;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #fff; box-shadow: 0 6px 16px -6px rgba(37, 99, 235, .8);
}
.brand-mark svg { width: 21px; height: 21px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand-text strong { font-size: 14.5px; font-weight: 650; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text small { font-size: 10.5px; color: var(--sidebar-muted); letter-spacing: .02em; }
.sidebar-close { display: none; background: transparent; border: 0; color: var(--sidebar-muted); cursor: pointer; padding: 5px; border-radius: 6px; }
.sidebar-close:hover { background: rgba(255,255,255,.06); color: #fff; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 12px 12px 20px; scrollbar-width: thin; }
.sidebar-nav::-webkit-scrollbar { width: 6px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .12); border-radius: 6px; }

.nav-label {
    font-size: 10px; text-transform: uppercase; letter-spacing: .11em;
    color: var(--sidebar-muted); font-weight: 650;
    padding: 18px 12px 6px;
}
.nav-link {
    display: flex; align-items: center; gap: 11px;
    padding: 9px 12px; border-radius: 8px;
    color: var(--sidebar-text); font-size: 13.3px; font-weight: 450;
    position: relative; transition: background .15s, color .15s;
    margin-bottom: 2px;
}
.nav-link svg.icon { width: 18px; height: 18px; opacity: .8; }
.nav-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-link.active { background: rgba(37, 99, 235, .22); color: #fff; font-weight: 550; }
.nav-link.active::before {
    content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px;
    width: 3px; border-radius: 0 3px 3px 0; background: #60a5fa;
}
.nav-link.active svg.icon { opacity: 1; color: #93c5fd; }

.sidebar-footer {
    display: flex; align-items: center; gap: 8px;
    padding: 14px; border-top: 1px solid rgba(255, 255, 255, .06);
    background: rgba(0, 0, 0, .12);
}
.sidebar-user { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1; }
.sidebar-user-info { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.sidebar-user-info strong { color: #e2e8f0; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-info small { color: var(--sidebar-muted); font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-logout { background: transparent; border: 0; color: var(--sidebar-muted); cursor: pointer; padding: 7px; border-radius: 7px; display: grid; place-items: center; }
.sidebar-logout:hover { background: rgba(255,255,255,.07); color: #fff; }
.sidebar-logout svg { width: 17px; height: 17px; }

.main-area { flex: 1; margin-left: var(--sidebar-width); min-width: 0; display: flex; flex-direction: column; }

.topbar {
    height: 64px; flex: none;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
    display: flex; align-items: center; gap: 16px;
    padding: 0 24px;
    position: sticky; top: 0; z-index: 40;
}
.topbar-menu { display: none; }
.topbar-search {
    display: flex; align-items: center; gap: 8px;
    width: min(440px, 46vw);
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 9px; padding: 0 10px; height: 38px;
    transition: border-color .15s, box-shadow .15s;
}
.topbar-search:focus-within { border-color: var(--primary-line); box-shadow: 0 0 0 3px var(--primary-soft); background: #fff; }
.topbar-search .search-icon { width: 17px; height: 17px; color: var(--muted-light); }
.topbar-search input { flex: 1; border: 0; background: transparent; outline: none; font-size: 13px; color: var(--ink); min-width: 0; }
.topbar-search input::placeholder { color: var(--muted-light); }
.topbar-search kbd { font-family: inherit; font-size: 10.5px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; }

.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-button {
    position: relative; background: transparent; border: 1px solid transparent;
    color: var(--ink-soft); width: 38px; height: 38px; border-radius: 9px;
    display: inline-grid; place-items: center; cursor: pointer;
    transition: background .15s, border-color .15s;
}
.icon-button:hover { background: var(--surface-soft); border-color: var(--line); }
.icon-button svg { width: 19px; height: 19px; }
.notification-dot {
    position: absolute; top: 3px; right: 2px;
    background: var(--danger); color: #fff; font-size: 9.5px; font-weight: 700;
    min-width: 16px; height: 16px; border-radius: 99px; padding: 0 4px;
    display: grid; place-items: center; border: 2px solid #fff;
}
.profile-button {
    display: flex; align-items: center; gap: 8px;
    background: transparent; border: 1px solid transparent; border-radius: 9px;
    padding: 4px 7px 4px 4px; cursor: pointer; color: var(--ink);
}
.profile-button:hover { background: var(--surface-soft); border-color: var(--line); }
.profile-button svg { width: 15px; height: 15px; color: var(--muted); }
.profile-name { font-size: 13px; font-weight: 550; max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.avatar {
    background: var(--primary-soft); color: var(--primary-dark);
    font-weight: 650; border-radius: 50%; display: inline-grid; place-items: center;
    width: 36px; height: 36px; font-size: 12.5px; border: 1px solid var(--primary-line);
}
.avatar-sm { width: 32px; height: 32px; font-size: 11.5px; }
.avatar-lg { width: 52px; height: 52px; font-size: 17px; }

.content { padding: 24px 28px 48px; max-width: 1560px; width: 100%; margin: 0 auto; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 20px; flex-wrap: wrap; }
.page-title { font-size: 23px; font-weight: 650; letter-spacing: -.025em; }
.page-subtitle { color: var(--muted); font-size: 13px; margin-top: 3px; max-width: 760px; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-bottom: 12px; flex-wrap: wrap; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span.sep { color: var(--line-strong); }

/* --------------------------------------------------------------------------
   Dropdowns
   -------------------------------------------------------------------------- */
.dropdown { position: relative; }
.dropdown-panel {
    position: absolute; right: 0; top: calc(100% + 8px);
    background: #fff; border: 1px solid var(--line); border-radius: 12px;
    box-shadow: var(--shadow-lg); min-width: 280px; z-index: 60;
    opacity: 0; visibility: hidden; transform: translateY(-4px);
    transition: opacity .15s, transform .15s, visibility .15s;
}
.dropdown.open .dropdown-panel { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-notifications { width: 360px; max-width: calc(100vw - 24px); }
.dropdown-header { display: flex; justify-content: space-between; align-items: center; padding: 13px 15px; border-bottom: 1px solid var(--line); font-size: 13px; }
.dropdown-header a { font-size: 12px; font-weight: 550; }
.notification-item { display: flex; gap: 9px; padding: 11px 15px; border-bottom: 1px solid #f1f5f9; color: var(--ink); }
.notification-item:hover { background: var(--surface-soft); color: var(--ink); }
.notification-item.is-read { opacity: .65; }
.notification-bullet { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); margin-top: 6px; flex: none; }
.notification-item.is-read .notification-bullet { background: var(--line-strong); }
.notification-item span:last-child { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.notification-item strong { font-size: 12.5px; font-weight: 600; }
.notification-item small { color: var(--muted); font-size: 11.8px; }
.notification-item em { font-style: normal; color: var(--muted-light); font-size: 10.8px; }
.dropdown-empty { padding: 24px 16px; text-align: center; color: var(--muted); font-size: 12.5px; }
.dropdown-footer { padding: 10px 15px; text-align: center; }
.dropdown-profile { width: 240px; padding: 7px; }
.dropdown-profile-head { padding: 10px 10px 11px; border-bottom: 1px solid var(--line); margin-bottom: 5px; display: flex; flex-direction: column; }
.dropdown-profile-head strong { font-size: 13px; }
.dropdown-profile-head small { color: var(--muted); font-size: 11.5px; }
.dropdown-link { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 7px; color: var(--ink-soft); font-size: 12.8px; width: 100%; border: 0; background: transparent; cursor: pointer; text-align: left; }
.dropdown-link:hover { background: var(--surface-soft); color: var(--primary); }
.dropdown-link svg { width: 16px; height: 16px; }

/* --------------------------------------------------------------------------
   Alerts
   -------------------------------------------------------------------------- */
.alert { display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; border-radius: 10px; border: 1px solid; margin-bottom: 16px; font-size: 13px; }
.alert-icon { width: 18px; height: 18px; margin-top: 1px; flex: none; }
.alert-body { flex: 1; }
.alert-list { margin: 4px 0 0; padding-left: 18px; }
.alert-close { background: transparent; border: 0; font-size: 18px; line-height: 1; color: inherit; opacity: .55; cursor: pointer; padding: 0 2px; }
.alert-close:hover { opacity: 1; }
.alert-success { background: var(--success-soft); border-color: #bbf7d0; color: #166534; }
.alert-danger { background: var(--danger-soft); border-color: #fecaca; color: #991b1b; }
.alert-info { background: var(--info-soft); border-color: #bae6fd; color: #075985; }
.alert-warning { background: var(--warning-soft); border-color: #fde68a; color: #92400e; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    height: 38px; padding: 0 14px; border-radius: 8px;
    font-size: 13px; font-weight: 550; line-height: 1;
    border: 1px solid transparent; cursor: pointer; white-space: nowrap;
    transition: background .15s, border-color .15s, box-shadow .15s, color .15s;
    background: #fff; color: var(--ink-soft);
}
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 1px 2px rgba(37, 99, 235, .25); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-secondary { background: #fff; border-color: var(--line-strong); color: var(--ink-soft); }
.btn-secondary:hover { background: var(--surface-soft); border-color: #94a3b8; color: var(--ink); }
.btn-success { background: var(--success); border-color: var(--success); color: #fff; }
.btn-success:hover { background: #166534; color: #fff; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-soft); color: var(--ink); }
.btn-sm { height: 32px; padding: 0 10px; font-size: 12.2px; border-radius: 7px; }
.btn-sm svg { width: 14px; height: 14px; }
.btn-xs { height: 28px; padding: 0 8px; font-size: 11.5px; border-radius: 6px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 14px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .55; pointer-events: none; }
.link-button { background: transparent; border: 0; color: var(--primary); font-size: 12.5px; font-weight: 550; cursor: pointer; padding: 0; }
.link-button:hover { color: var(--primary-dark); text-decoration: underline; }
.btn-group { display: inline-flex; gap: 6px; flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   Cards / stats
   -------------------------------------------------------------------------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card + .card { margin-top: 16px; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-title { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.card-title svg { color: var(--muted); width: 17px; height: 17px; }
.card-subtitle { color: var(--muted); font-size: 12px; }
.card-header-side { display: flex; align-items: center; gap: 8px; }
.card-body { padding: 18px; }
.card-body.tight { padding: 0; }
.card-footer { padding: 12px 18px; border-top: 1px solid var(--line); background: var(--surface-soft); border-radius: 0 0 var(--radius) var(--radius); }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.grid-main-wide { grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr); }
.grid-side { grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.row-flex { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.justify-between { justify-content: space-between; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.w-full { width: 100%; }
.text-muted { color: var(--muted); }
.text-sm { font-size: 12.5px; }
.text-xs { font-size: 11.5px; }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-right { text-align: right; }
.nowrap { white-space: nowrap; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }

.stat-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 17px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden; }
.stat-card:hover { border-color: var(--line-strong); }
.stat-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.stat-label { color: var(--muted); font-size: 11.8px; font-weight: 550; text-transform: uppercase; letter-spacing: .045em; }
.stat-icon { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.stat-icon svg { width: 18px; height: 18px; }
.stat-icon.warn { background: var(--warning-soft); color: var(--warning); }
.stat-icon.danger { background: var(--danger-soft); color: var(--danger); }
.stat-icon.success { background: var(--success-soft); color: var(--success); }
.stat-icon.info { background: var(--info-soft); color: var(--info); }
.stat-value { font-size: 27px; font-weight: 680; letter-spacing: -.03em; line-height: 1.1; }
.stat-value small { font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.stat-meta { font-size: 11.8px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.stat-meta a { font-weight: 550; }
.stat-link { position: absolute; inset: 0; }
.trend-up { color: var(--success); } .trend-down { color: var(--danger); }

/* --------------------------------------------------------------------------
   Badges / chips
   -------------------------------------------------------------------------- */
.badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 600;
    line-height: 1.7; border: 1px solid transparent; white-space: nowrap;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.no-dot::before { display: none; }
.badge-success { background: var(--success-soft); color: #15803d; border-color: #bbf7d0; }
.badge-info { background: var(--info-soft); color: #0369a1; border-color: #bae6fd; }
.badge-warning { background: var(--warning-soft); color: #b45309; border-color: #fde68a; }
.badge-danger { background: var(--danger-soft); color: #b91c1c; border-color: #fecaca; }
.badge-muted { background: #f1f5f9; color: #64748b; border-color: #e2e8f0; }
.badge-outline { background: transparent; border-color: var(--line-strong); color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 7px; background: var(--surface-soft); border: 1px solid var(--line); font-size: 11.5px; color: var(--ink-soft); }

.priority { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 550; }
.priority::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--line-strong); transform: rotate(45deg); }
.priority-critical::before { background: var(--danger); }
.priority-high::before { background: #ea580c; }
.priority-medium::before { background: #d97706; }
.priority-low::before { background: #94a3b8; }

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */
.table-wrap { width: 100%; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table thead th {
    text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em;
    color: var(--muted); font-weight: 650; background: var(--surface-soft);
    border-bottom: 1px solid var(--line); padding: 10px 14px; white-space: nowrap;
}
.table tbody td { padding: 12px 14px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafbfd; }
.table .primary-cell { font-weight: 550; color: var(--ink); }
.table .primary-cell a { color: var(--ink); }
.table .primary-cell a:hover { color: var(--primary); }
.table .sub { display: block; color: var(--muted); font-size: 11.3px; font-weight: 400; margin-top: 1px; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-compact tbody td { padding: 9px 12px; }
.table-actions { display: flex; align-items: center; gap: 4px; justify-content: flex-end; }
.table-actions .icon-button { width: 30px; height: 30px; border-radius: 6px; }
.table-actions .icon-button svg { width: 15px; height: 15px; }
.table-actions .icon-button.danger { color: var(--danger); }
.table-actions form { display: inline-flex; }
td.actions, th.actions { text-align: right; width: 1%; }

.empty-state { padding: 46px 24px; text-align: center; color: var(--muted); }
.empty-state .empty-icon { width: 46px; height: 46px; margin: 0 auto 12px; border-radius: 12px; background: var(--surface-soft); border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted-light); }
.empty-state h3 { font-size: 14px; margin-bottom: 4px; }
.empty-state p { font-size: 12.5px; max-width: 420px; margin: 0 auto 14px; }
.empty-state svg { width: 22px; height: 22px; }

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 18px; }
.form-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid .span-2 { grid-column: span 2; }
.form-grid .span-3 { grid-column: span 3; }
.form-section { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 20px; }
.form-section:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.form-section-title { font-size: 13px; font-weight: 650; margin-bottom: 12px; color: var(--ink); display: flex; align-items: center; gap: 7px; }
.form-section-title svg { width: 16px; height: 16px; color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field label, .label { font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.field label .req { color: var(--danger); }
.field .hint { font-size: 11.5px; color: var(--muted); }
.field .error { font-size: 11.8px; color: var(--danger); }
.input, .select, textarea.input {
    width: 100%; height: 38px; border: 1px solid var(--line-strong); border-radius: 8px;
    padding: 0 11px; background: #fff; color: var(--ink); font-size: 13px;
    outline: none; transition: border-color .15s, box-shadow .15s;
    appearance: none;
}
textarea.input { height: auto; padding: 9px 11px; resize: vertical; min-height: 90px; line-height: 1.55; }
.select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 9px center; background-size: 15px;
    padding-right: 32px;
}
.input:focus, .select:focus, textarea.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.input.is-invalid, .select.is-invalid, textarea.is-invalid { border-color: var(--danger); }
.input::placeholder, textarea.input::placeholder { color: var(--muted-light); }
.input[readonly] { background: var(--surface-soft); color: var(--muted); }
.input-group { display: flex; align-items: stretch; }
.input-group .input { border-radius: 8px 0 0 8px; }
.input-group .btn { border-radius: 0 8px 8px 0; }
.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 12.8px; color: var(--ink-soft); }
.checkbox-row input[type=checkbox], .checkbox-row input[type=radio] { width: 15px; height: 15px; accent-color: var(--primary); }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding-top: 18px; margin-top: 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.form-actions.left { justify-content: flex-start; }
.inline-form { display: inline; }

.filters-bar { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; padding: 13px 16px; border-bottom: 1px solid var(--line); background: #fcfdff; }
.filters-bar .field { gap: 3px; }
.filters-bar .input, .filters-bar .select { height: 34px; font-size: 12.5px; }
.filters-bar .field.search-field { flex: 1 1 240px; min-width: 180px; }
.filters-bar .field { flex: 0 0 auto; min-width: 130px; }
.filters-bar .btn { height: 34px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab { padding: 9px 13px; font-size: 12.8px; font-weight: 550; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab .count { background: var(--surface-soft); border: 1px solid var(--line); border-radius: 99px; font-size: 10.5px; padding: 0 6px; margin-left: 4px; color: var(--muted); }

/* --------------------------------------------------------------------------
   Detail pages
   -------------------------------------------------------------------------- */
.detail-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
.detail-grid.equal { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.detail-sticky { position: sticky; top: 84px; }
.detail-list { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 9px 14px; font-size: 12.8px; }
.detail-list dt { color: var(--muted); font-weight: 500; }
.detail-list dd { margin: 0; color: var(--ink-soft); font-weight: 500; overflow-wrap: anywhere; }
.detail-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.detail-identity { display: flex; gap: 14px; align-items: flex-start; }
.detail-avatar { width: 52px; height: 52px; border-radius: 13px; background: var(--primary-soft); border: 1px solid var(--primary-line); color: var(--primary); display: grid; place-items: center; flex: none; }
.detail-avatar svg { width: 26px; height: 26px; }
.detail-number { font-family: "SFMono-Regular", Consolas, monospace; font-size: 11.5px; color: var(--muted); letter-spacing: .01em; }
.detail-title { font-size: 19px; font-weight: 650; letter-spacing: -.02em; line-height: 1.3; }
.detail-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; align-items: center; font-size: 12px; color: var(--muted); }

.timeline { position: relative; }
.timeline-item { display: flex; gap: 12px; padding-bottom: 17px; position: relative; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before { content: ""; position: absolute; left: 8px; top: 20px; bottom: 0; width: 1px; background: var(--line); }
.timeline-item:last-child::before { display: none; }
.timeline-dot { width: 17px; height: 17px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line-strong); background: var(--line-strong); flex: none; margin-top: 2px; position: relative; z-index: 1; }
.timeline-dot.active { background: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.timeline-dot.success { background: var(--success); box-shadow: 0 0 0 1px var(--success); }
.timeline-body { flex: 1; min-width: 0; }
.timeline-body strong { font-size: 12.8px; display: block; }
.timeline-body small { color: var(--muted); font-size: 11.3px; }
.timeline-body p { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }

.comment { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid #f1f5f9; }
.comment:last-child { border-bottom: 0; }
.comment-body { flex: 1; min-width: 0; }
.comment-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.comment-head strong { font-size: 12.8px; }
.comment-head small { color: var(--muted); font-size: 11px; }
.comment-body p { font-size: 12.8px; color: var(--ink-soft); margin-top: 3px; white-space: pre-line; }

.attachment-list { display: flex; flex-direction: column; gap: 7px; }
.attachment-item { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 12.3px; }
.attachment-item:hover { border-color: var(--primary-line); background: var(--primary-soft); }
.attachment-item .attachment-icon { color: var(--muted); width: 17px; height: 17px; flex: none; }
.attachment-item .attachment-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-soft); }
.attachment-item .attachment-size { color: var(--muted-light); font-size: 10.5px; white-space: nowrap; }

.progress { height: 6px; border-radius: 99px; background: #eef2f7; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 99px; background: var(--primary); }
.progress-fill.success { background: var(--success); }
.progress-fill.warning { background: #f59e0b; }
.progress-fill.danger { background: var(--danger); }
.progress-lg { height: 9px; }

/* --------------------------------------------------------------------------
   Charts
   -------------------------------------------------------------------------- */
.bar-chart { display: flex; flex-direction: column; gap: 11px; }
.bar-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) 46px; align-items: center; gap: 10px; font-size: 11.8px; }
.bar-label { color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 8px; border-radius: 99px; background: #eef2f7; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 99px; background: var(--primary); min-width: 2px; transition: width .4s ease; }
.bar-fill.muted { background: #94a3b8; }
.bar-fill.success { background: var(--success); }
.bar-fill.warning { background: #f59e0b; }
.bar-fill.danger { background: var(--danger); }
.bar-value { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 11.5px; }
.chart-bars-h { display: flex; align-items: flex-end; gap: 8px; height: 150px; padding-top: 10px; }
.chart-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.chart-bar { width: 100%; max-width: 38px; background: linear-gradient(180deg, #60a5fa, var(--primary)); border-radius: 5px 5px 0 0; min-height: 2px; position: relative; transition: height .4s ease; }
.chart-bar:hover { filter: brightness(1.08); }
.chart-bar-label { font-size: 10px; color: var(--muted); }
.chart-bar-value { font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); }
.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-dot { width: 8px; height: 8px; border-radius: 3px; background: var(--primary); }
.legend-dot.green { background: var(--success); } .legend-dot.amber { background: #f59e0b; } .legend-dot.red { background: var(--danger); } .legend-dot.gray { background: #94a3b8; }

/* --------------------------------------------------------------------------
   Calendar
   -------------------------------------------------------------------------- */
.calendar-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.calendar-head { padding: 9px 10px; font-size: 10.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--surface-soft); border-bottom: 1px solid var(--line); }
.calendar-day { min-height: 118px; padding: 7px; border-right: 1px solid #f1f5f9; border-bottom: 1px solid #f1f5f9; display: flex; flex-direction: column; gap: 5px; }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day.out { background: #fbfcfe; }
.calendar-day.today { background: #f5f9ff; box-shadow: inset 0 0 0 2px var(--primary-line); }
.calendar-date { font-size: 11.5px; font-weight: 600; color: var(--ink-soft); }
.calendar-day.out .calendar-date { color: var(--muted-light); }
.calendar-day.today .calendar-date { color: var(--primary); }
.calendar-event { display: block; font-size: 10.5px; line-height: 1.35; padding: 3px 5px; border-radius: 5px; background: var(--primary-soft); color: var(--primary-dark); border-left: 3px solid var(--primary); overflow: hidden; }
.calendar-event:hover { background: #dbeafe; color: var(--primary-dark); }
.calendar-event.pm { background: var(--warning-soft); border-left-color: #f59e0b; color: #92400e; }
.calendar-event.overdue { background: var(--danger-soft); border-left-color: var(--danger); color: #991b1b; }
.calendar-event strong { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.calendar-more { font-size: 10px; color: var(--muted); }

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */
.pagination-wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.pagination-info { font-size: 11.8px; color: var(--muted); }
.pagination { display: flex; align-items: center; gap: 3px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.pagination li { display: inline-flex; }
.pagination a, .pagination span.page-link, .pagination .page-link {
    min-width: 31px; height: 31px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--muted); font-size: 12px;
}
.pagination a:hover { border-color: var(--primary-line); color: var(--primary); background: var(--primary-soft); }
.pagination .active span, .pagination .active .page-link { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination .disabled span, .pagination .disabled .page-link { opacity: .45; }
.pagination .ellipsis span { border-color: transparent; background: transparent; }

/* --------------------------------------------------------------------------
   Modals
   -------------------------------------------------------------------------- */
.modal[hidden] { display: none; }
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 18px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .5); backdrop-filter: blur(2px); }
.modal-dialog { position: relative; background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); width: min(520px, 100%); max-height: 90vh; display: flex; flex-direction: column; animation: modalIn .18s ease; }
.modal-dialog.modal-lg { width: min(760px, 100%); }
@keyframes modalIn { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.modal-header h2 { font-size: 15px; }
.modal-body { padding: 18px; overflow-y: auto; }
.modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 13px 18px; border-top: 1px solid var(--line); background: var(--surface-soft); border-radius: 0 0 14px 14px; }
.modal-close { background: transparent; border: 0; cursor: pointer; color: var(--muted); padding: 4px; border-radius: 6px; display: grid; place-items: center; }
.modal-close:hover { background: var(--surface-soft); color: var(--ink); }

/* --------------------------------------------------------------------------
   Auth pages
   -------------------------------------------------------------------------- */
.auth-body { min-height: 100vh; background: var(--bg); }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-aside { background: linear-gradient(150deg, #0b1526 0%, #12233f 55%, #17305a 100%); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-aside::before { content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(37, 99, 235, .35), transparent 65%); top: -160px; right: -160px; }
.auth-aside::after { content: ""; position: absolute; width: 380px; height: 380px; border-radius: 50%; border: 1px solid rgba(255,255,255,.08); bottom: -170px; left: -80px; }
.auth-brand { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.auth-brand strong { color: #fff; font-size: 17px; font-weight: 650; }
.auth-brand small { color: #8fa3c0; font-size: 11px; display: block; }
.auth-hero { position: relative; z-index: 1; max-width: 460px; }
.auth-hero h1 { color: #fff; font-size: 34px; line-height: 1.18; letter-spacing: -.03em; margin-bottom: 14px; }
.auth-hero p { color: #a7b7cd; font-size: 14px; line-height: 1.65; }
.auth-features { display: flex; flex-direction: column; gap: 13px; margin-top: 30px; }
.auth-feature { display: flex; gap: 11px; align-items: flex-start; color: #c9d6e8; font-size: 13px; }
.auth-feature-icon { width: 32px; height: 32px; border-radius: 9px; background: rgba(37, 99, 235, .22); border: 1px solid rgba(96, 165, 250, .25); color: #93c5fd; display: grid; place-items: center; flex: none; }
.auth-feature-icon svg { width: 16px; height: 16px; }
.auth-feature strong { display: block; color: #e8eef7; font-size: 12.8px; font-weight: 600; }
.auth-feature small { color: #8fa3c0; font-size: 11.5px; }
.auth-footnote { position: relative; z-index: 1; color: #6f829d; font-size: 11.5px; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 32px 24px; }
.auth-card { width: min(400px, 100%); }
.auth-card h2 { font-size: 24px; letter-spacing: -.025em; }
.auth-card .auth-sub { color: var(--muted); font-size: 13px; margin: 5px 0 24px; }
.auth-form { display: flex; flex-direction: column; gap: 15px; }
.auth-form .input { height: 42px; }
.auth-form .btn { height: 42px; }
.auth-meta { display: flex; align-items: center; justify-content: space-between; font-size: 12.3px; color: var(--muted); }
.auth-links { margin-top: 22px; text-align: center; font-size: 12.5px; color: var(--muted); }
.auth-demo { margin-top: 24px; border: 1px dashed var(--line-strong); border-radius: 10px; padding: 12px 14px; font-size: 11.5px; color: var(--muted); background: #fcfdff; }
.auth-demo strong { color: var(--ink-soft); font-size: 11.5px; display: block; margin-bottom: 4px; }
.auth-demo code { background: #fff; border: 1px solid var(--line); padding: 1px 5px; border-radius: 4px; font-size: 11px; }

/* --------------------------------------------------------------------------
   Utilities / misc
   -------------------------------------------------------------------------- */
.help-text { font-size: 11.5px; color: var(--muted); }
.help-text a { font-weight: 550; }
.list-reset { list-style: none; margin: 0; padding: 0; }
.metric-inline { display: flex; gap: 18px; flex-wrap: wrap; }
.metric-inline .metric { display: flex; flex-direction: column; gap: 1px; }
.metric-inline .metric span { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.metric-inline .metric strong { font-size: 16px; letter-spacing: -.02em; }
.note { background: var(--surface-soft); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; font-size: 12px; color: var(--muted); }
.note strong { color: var(--ink-soft); }
.checklist-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f1f5f9; align-items: flex-start; }
.checklist-item:last-child { border-bottom: 0; }
.checklist-item .check-box { width: 17px; height: 17px; accent-color: var(--primary); margin-top: 2px; flex: none; }
.checklist-item .check-label { font-size: 12.8px; font-weight: 500; }
.checklist-item .check-instructions { font-size: 11.5px; color: var(--muted); }
.checklist-item .check-input { margin-top: 5px; }
.search-result-group + .search-result-group { margin-top: 18px; }
.search-result-group h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; }
.search-result-link { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 5px; color: var(--ink-soft); }
.search-result-link:hover { background: var(--primary-soft); border-color: var(--primary-line); color: var(--ink); }
.search-result-link strong { font-size: 12.8px; }
.search-result-link small { color: var(--muted); font-size: 11.3px; display: block; }
.search-result-icon { width: 30px; height: 30px; border-radius: 7px; background: var(--surface-soft); display: grid; place-items: center; color: var(--muted); flex: none; }
.search-result-icon svg { width: 15px; height: 15px; }
.filter-toggle { display: none; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1280px) {
    .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
    .grid-main, .grid-main-wide, .grid-side, .detail-grid { grid-template-columns: minmax(0, 1fr); }
    .detail-sticky { position: static; }
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sidebar { transform: translateX(-100%); }
    .app-shell.sidebar-open .sidebar { transform: translateX(0); }
    .main-area { margin-left: 0; }
    .topbar-menu { display: inline-grid; }
    .sidebar-close { display: block; }
    .sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, .5); z-index: 45; }
    .app-shell.sidebar-open .sidebar-overlay { display: block; }
    .auth-shell { grid-template-columns: 1fr; }
    .auth-aside { display: none; }
}

@media (max-width: 820px) {
    .content { padding: 18px 16px 40px; }
    .topbar { padding: 0 15px; gap: 10px; }
    .topbar-search { display: none; }
    .profile-name { display: none; }
    .stat-grid, .stat-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: minmax(0, 1fr); }
    .form-grid { grid-template-columns: minmax(0, 1fr); }
    .form-grid .span-2, .form-grid .span-3, .form-grid.cols-3 { grid-column: auto; grid-template-columns: minmax(0, 1fr); }
    .detail-list { grid-template-columns: 110px minmax(0, 1fr); }
    .filters-bar { padding: 11px 12px; }
    .filters-bar .field { flex: 1 1 130px; }
    .filters-bar .field.search-field { flex-basis: 100%; }
    .calendar-day { min-height: 88px; padding: 5px; }
    .calendar-event { font-size: 9.5px; }
    .auto-hide-mobile { display: none !important; }
    .page-title { font-size: 20px; }
    .stat-value { font-size: 23px; }
}

@media (max-width: 540px) {
    .stat-grid, .stat-grid.cols-4 { grid-template-columns: minmax(0, 1fr); }
    .topbar-actions .dropdown:first-child { display: block; }
    .page-actions { width: 100%; }
    .page-actions .btn { flex: 1; }
    .detail-list { grid-template-columns: minmax(0, 1fr); gap: 3px 0; }
    .detail-list dt { font-size: 11px; }
    .detail-list dd { margin-bottom: 5px; }
    .calendar-grid { font-size: 10px; }
    .calendar-head { padding: 6px 4px; font-size: 9px; }
    .calendar-day { min-height: 64px; }
    .calendar-event { padding: 2px 3px; border-left-width: 2px; }
    .calendar-event strong { display: none; }
}

/* --------------------------------------------------------------------------
   Detail helpers / utilities
   -------------------------------------------------------------------------- */
.muted { color: var(--muted); }
.sub { display: block; color: var(--muted); font-size: 11.3px; font-weight: 400; margin-top: 1px; }
.pre-line { white-space: pre-line; }
.detail-header-main { flex: 1; min-width: 240px; }
.detail-title h2 { font-size: 19px; font-weight: 650; letter-spacing: -.02em; line-height: 1.3; }
.detail-amounts { display: flex; gap: 24px; flex-wrap: wrap; }
.detail-amounts .label { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.detail-amounts strong { font-size: 17px; letter-spacing: -.02em; }
.subsection-title { font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 18px 0 7px; }
.timeline-title { font-size: 12.8px; font-weight: 600; }
.timeline-meta { color: var(--muted); font-size: 11.3px; margin-top: 1px; }
.comment-meta { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.comment-meta strong { font-size: 12.8px; }
.comment-meta span { color: var(--muted); font-size: 11px; }
.input-sm { height: 32px !important; font-size: 12.3px !important; padding: 0 9px; }
.checklist-main { flex: 1; min-width: 0; }
.checklist-main label { display: block; font-size: 12.8px; font-weight: 500; margin-bottom: 4px; }
.checklist-notes { flex: 0 0 220px; }
.checklist-readonly { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.checklist-readonly li { display: flex; align-items: baseline; gap: 8px; font-size: 12.8px; color: var(--ink-soft); }
.checklist-readonly li.done { color: var(--ink); }
.checklist-mark { color: var(--success); font-weight: 700; width: 14px; flex: none; }
.checklist-readonly li:not(.done) .checklist-mark { color: var(--muted-light); }

.notification-row { display: flex; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); align-items: flex-start; }
.notification-row:last-child { border-bottom: 0; }
.notification-row.is-read { background: #fcfdff; }
.notification-icon { width: 34px; height: 34px; border-radius: 9px; background: var(--primary-soft); border: 1px solid var(--primary-line); color: var(--primary); display: grid; place-items: center; flex: none; }
.notification-icon svg { width: 16px; height: 16px; }
.notification-content { flex: 1; min-width: 0; }
.notification-title { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.notification-row.is-read .notification-title { font-weight: 500; color: var(--ink-soft); }
.notification-time { font-size: 11px; color: var(--muted-light); display: block; margin-top: 4px; }
.notification-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.unread-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); display: inline-block; }

.report-card { transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.report-card:hover { border-color: var(--primary-line); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.report-card .card-body { display: flex; flex-direction: column; gap: 7px; height: 100%; }
.report-card h3 { font-size: 14.5px; letter-spacing: -.01em; }
.report-card p { flex: 1; }
.report-icon { width: 38px; height: 38px; border-radius: 10px; background: var(--primary-soft); border: 1px solid var(--primary-line); color: var(--primary); display: grid; place-items: center; margin-bottom: 3px; }
.report-icon svg { width: 19px; height: 19px; }
.report-link { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 600; color: var(--primary); }
.report-link svg { width: 14px; height: 14px; }

.user-cell { display: flex; align-items: center; gap: 10px; }
.user-cell .sub { display: block; }
.checkbox-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; }
.permission-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-top: 14px; }
.permission-group { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; background: #fcfdff; }
.permission-group-title { font-size: 10.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 9px; }
.switch-row { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.switch-row input { width: 34px; height: 19px; margin-top: 2px; accent-color: var(--primary); flex: none; }
.switch-row strong { display: block; font-size: 13px; }
.switch-row small { display: block; font-size: 11.8px; color: var(--muted); margin-top: 2px; }
.json-block { background: #0f172a; color: #dbe4f3; border-radius: var(--radius-sm); padding: 12px 14px; font-size: 11.5px; line-height: 1.6; overflow-x: auto; margin: 0; }
.profile-summary { display: flex; align-items: center; gap: 14px; }
.profile-title { font-size: 18px; letter-spacing: -.01em; }
.avatar-lg { width: 54px; height: 54px; font-size: 17px; }

/* --------------------------------------------------------------------------
   Dashboard
   -------------------------------------------------------------------------- */
.dash {
    --dash-navy: #0f172a;
    --dash-indigo: #312e81;
    --dash-cyan: #22d3ee;
    --chart-blue: #2563eb;
    --chart-sky: #0284c7;
    --chart-violet: #7c3aed;
    --chart-rose: #e11d48;
    --chart-emerald: #059669;
    --chart-amber: #d97706;
    --chart-orange: #ea580c;
    --chart-cyan: #0891b2;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dash .card + .card { margin-top: 0; }

.dash-tone-blue { --tone: #2563eb; --tone-light: #93c5fd; --tone-soft: #eff6ff; --tone-line: #bfdbfe; }
.dash-tone-sky { --tone: #0284c7; --tone-light: #7dd3fc; --tone-soft: #f0f9ff; --tone-line: #bae6fd; }
.dash-tone-violet { --tone: #7c3aed; --tone-light: #c4b5fd; --tone-soft: #f5f3ff; --tone-line: #ddd6fe; }
.dash-tone-rose { --tone: #e11d48; --tone-light: #fda4af; --tone-soft: #fff1f2; --tone-line: #fecdd3; }
.dash-tone-emerald { --tone: #059669; --tone-light: #6ee7b7; --tone-soft: #ecfdf5; --tone-line: #a7f3d0; }
.dash-tone-amber { --tone: #d97706; --tone-light: #fcd34d; --tone-soft: #fffbeb; --tone-line: #fde68a; }
.dash-tone-orange { --tone: #ea580c; --tone-light: #fdba74; --tone-soft: #fff7ed; --tone-line: #fed7aa; }
.dash-tone-cyan { --tone: #0891b2; --tone-light: #67e8f9; --tone-soft: #ecfeff; --tone-line: #a5f3fc; }

.dash-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 28px;
    padding: 28px 30px;
    border-radius: 20px;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 93% 2%, rgba(34, 211, 238, .42), transparent 27%),
        radial-gradient(circle at 68% 105%, rgba(236, 72, 153, .28), transparent 34%),
        linear-gradient(125deg, #0f172a 0%, #172554 48%, #312e81 100%);
    box-shadow: 0 26px 50px -32px rgba(30, 64, 175, .9);
}

.dash-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .18;
    background-image:
        linear-gradient(rgba(255, 255, 255, .22) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .22) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: linear-gradient(105deg, transparent 15%, #000 65%);
}

.dash-hero-copy,
.dash-hero-score { position: relative; z-index: 1; }

.dash-hero-copy h2 {
    margin: 14px 0 7px;
    max-width: 660px;
    color: #fff;
    font-size: clamp(24px, 2.4vw, 34px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -.04em;
}

.dash-hero-copy p {
    max-width: 640px;
    color: #c7d2fe;
    font-size: 13px;
    line-height: 1.65;
}

.dash-kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 10px;
    border: 1px solid rgba(103, 232, 249, .3);
    border-radius: 999px;
    background: rgba(34, 211, 238, .12);
    color: #67e8f9;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .13em;
    line-height: 1;
    text-transform: uppercase;
    backdrop-filter: blur(6px);
}

.dash-kicker svg { width: 13px; height: 13px; }

.dash-kicker--dark {
    border-color: var(--primary-line);
    background: var(--primary-soft);
    color: var(--primary-dark);
}

.dash-hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.dash-hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 9px;
    background: rgba(255, 255, 255, .08);
    color: #dbeafe;
    font-size: 11.5px;
    font-weight: 550;
    backdrop-filter: blur(6px);
}

.dash-hero-chip svg { width: 14px; height: 14px; color: #67e8f9; }
.dash-hero-chip--alert { border-color: rgba(253, 164, 175, .3); background: rgba(225, 29, 72, .18); color: #ffe4e6; }
.dash-hero-chip--alert svg { color: #fda4af; }

.dash-hero-score {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 15px 17px;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 18px;
    background: rgba(8, 18, 42, .38);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
    backdrop-filter: blur(8px);
}

.dash-gauge {
    position: relative;
    display: grid;
    place-items: center;
    width: 124px;
    height: 124px;
    flex: none;
    border-radius: 50%;
    background: conic-gradient(#22d3ee calc(var(--progress) * 1%), rgba(255, 255, 255, .12) 0);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 18px 38px -22px rgba(34, 211, 238, .8);
}

.dash-gauge::before {
    content: "";
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    background: #101b3f;
    box-shadow: inset 0 0 24px rgba(0, 0, 0, .24);
}

.dash-gauge-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    text-align: center;
}

.dash-gauge-inner strong {
    color: #fff;
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -.04em;
}

.dash-gauge-inner span {
    color: #a5b4fc;
    font-size: 9.5px;
    font-weight: 650;
    letter-spacing: .05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.dash-hero-score-caption { display: flex; flex-direction: column; gap: 2px; }
.dash-hero-score-caption strong { color: #fff; font-size: 15px; letter-spacing: -.02em; }
.dash-hero-score-caption span { color: #a5b4fc; font-size: 11px; }

.dash-filter {
    padding: 15px 18px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.dash-filter-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--line);
}

.dash-date-range {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 600;
}

.dash-date-range svg { width: 14px; height: 14px; color: var(--primary); }

.dash-filter-form {
    padding: 0;
    border: 0;
    background: transparent;
}

.dash-filter-form .field { flex: 1 1 150px; min-width: 125px; }
.dash-filter-form .input,
.dash-filter-form .select { border-color: #dbe3ef; background-color: #fbfdff; }
.dash-filter-form .input:focus,
.dash-filter-form .select:focus { background-color: #fff; }
.dash-filter-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.dash-stat-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.dash-stat {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
    padding: 17px 18px;
    border: 1px solid var(--tone-line);
    border-radius: 16px;
    background: linear-gradient(155deg, #fff 28%, var(--tone-soft) 155%);
    box-shadow: 0 14px 28px -26px rgba(15, 23, 42, .55);
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.dash-stat:hover {
    border-color: var(--tone);
    box-shadow: 0 20px 34px -25px rgba(15, 23, 42, .45);
    transform: translateY(-1px);
}

.dash-stat::before {
    content: "";
    position: absolute;
    top: 20px;
    bottom: 20px;
    left: 0;
    width: 4px;
    border-radius: 0 999px 999px 0;
    background: var(--tone);
}

.dash-stat::after {
    content: "";
    position: absolute;
    top: -34px;
    right: -32px;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: var(--tone);
    opacity: .09;
    pointer-events: none;
}

.dash-stat > * { position: relative; z-index: 1; }

.dash-stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
}

.dash-stat-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: none;
    border: 1px solid var(--tone-line);
    border-radius: 12px;
    background: #fff;
    color: var(--tone);
    box-shadow: 0 8px 16px -12px rgba(15, 23, 42, .4);
}

.dash-stat-icon svg { width: 18px; height: 18px; }

.dash-stat-tag {
    padding: 3px 7px;
    border: 1px solid var(--tone-line);
    border-radius: 999px;
    background: var(--tone-soft);
    color: var(--tone);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .035em;
    line-height: 1.3;
    white-space: nowrap;
}

.dash-stat .stat-label {
    margin-top: 2px;
    color: #475569;
    font-size: 10.8px;
    letter-spacing: .075em;
}

.dash-stat .stat-value {
    color: var(--ink);
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -.045em;
}

.dash-stat .stat-meta {
    margin-top: auto;
    color: var(--muted);
    font-size: 11.2px;
    line-height: 1.4;
}

.dash-stat .stat-meta a { display: inline-flex; align-items: center; gap: 1px; color: var(--tone); }
.dash-stat .stat-meta svg { width: 12px; height: 12px; }

.dash-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.dash-metric {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    overflow: hidden;
    padding: 15px 16px;
    border: 1px solid var(--tone-line);
    border-radius: 14px;
    background: linear-gradient(135deg, #fff 10%, var(--tone-soft) 145%);
    box-shadow: 0 10px 24px -24px rgba(15, 23, 42, .55);
}

.dash-metric::after {
    content: "";
    position: absolute;
    right: -26px;
    bottom: -36px;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--tone);
    opacity: .08;
}

.dash-metric-icon {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: none;
    border: 1px solid var(--tone-line);
    border-radius: 11px;
    background: #fff;
    color: var(--tone);
}

.dash-metric-icon svg { width: 18px; height: 18px; }
.dash-metric-copy { position: relative; z-index: 1; min-width: 0; }

.dash-metric-label {
    display: block;
    color: var(--muted);
    font-size: 9.8px;
    font-weight: 700;
    letter-spacing: .07em;
    line-height: 1.3;
    text-transform: uppercase;
}

.dash-metric-copy strong {
    display: block;
    margin-top: 2px;
    color: var(--ink);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -.035em;
    line-height: 1.2;
}

.dash-metric-copy strong .dash-unit { color: var(--muted); font-size: 11px; font-weight: 550; letter-spacing: 0; }
.dash-metric-copy small { display: block; margin-top: 2px; color: var(--muted); font-size: 10.8px; line-height: 1.35; }
.dash-metric-copy small a { color: var(--tone); font-weight: 600; }

.dash-main-grid { align-items: start; }
.dash-stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.dash-card {
    border-radius: 16px;
    border: 1px solid var(--line);
    background: #fff;
    box-shadow: 0 14px 32px -32px rgba(15, 23, 42, .5);
}

.dash-card-header {
    padding: 15px 18px;
    background: linear-gradient(180deg, #fff 20%, #fbfdff 100%);
}

.dash-card-heading { display: flex; align-items: center; gap: 11px; min-width: 0; }
.dash-card-heading > div { min-width: 0; }

.dash-card-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    flex: none;
    border: 1px solid var(--tone-line);
    border-radius: 10px;
    background: var(--tone-soft);
    color: var(--tone);
}

.dash-card-icon svg { width: 17px; height: 17px; }
.dash-card .card-title { color: var(--ink); }
.dash-card .card-subtitle { margin-top: 1px; font-size: 11.3px; }

.dash-card-tag {
    padding: 4px 8px;
    border: 1px solid var(--tone-line);
    border-radius: 999px;
    background: var(--tone-soft);
    color: var(--tone);
    font-size: 10px;
    font-weight: 650;
    white-space: nowrap;
}

.dash-table thead th { background: #f8fafc; }
.dash-table tbody tr { transition: background .15s ease; }
.dash-table tbody tr:hover { background: #f8fbff; }

.dash-chart-grid { align-items: stretch; }
.dash-chart-grid > .dash-card { height: 100%; }
.dash-chart-grid .card-body { padding: 16px 18px 18px; }

.dash-donut-layout {
    display: grid;
    grid-template-columns: 148px minmax(0, 1fr);
    align-items: center;
    gap: 18px;
}

.dash-donut {
    position: relative;
    display: grid;
    place-items: center;
    width: 148px;
    height: 148px;
    flex: none;
    border-radius: 50%;
    background: var(--donut);
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .04), 0 20px 38px -30px rgba(15, 23, 42, .75);
}

.dash-donut::before {
    content: "";
    position: absolute;
    inset: 23px;
    border-radius: 50%;
    background: #fff;
    box-shadow: inset 0 0 0 1px #f1f5f9;
}

.dash-donut-hole {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    text-align: center;
}

.dash-donut-hole strong {
    color: var(--ink);
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -.04em;
}

.dash-donut-hole span {
    color: var(--muted);
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    white-space: nowrap;
}

.dash-legend {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.dash-legend-row {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) auto 48px;
    align-items: center;
    gap: 7px;
    font-size: 11.2px;
    line-height: 1.35;
}

.dash-legend-label {
    overflow: hidden;
    color: var(--ink-soft);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash-legend-value {
    color: var(--ink);
    font-size: 11.2px;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
}

.dash-legend-pct {
    color: var(--muted);
    font-size: 10.5px;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.dash-legend .dash-empty { padding: 0; align-items: flex-start; text-align: left; }

.dash .bar-chart { gap: 11px; }
.dash .bar-row { grid-template-columns: 108px minmax(0, 1fr) 30px; gap: 9px; }
.dash .bar-label { display: flex; align-items: center; gap: 6px; font-size: 11.3px; }
.dash .bar-track { height: 9px; background: #f1f5f9; }
.dash .bar-fill {
    background: linear-gradient(90deg, var(--tone-light, #93c5fd), var(--tone, #2563eb));
    box-shadow: 0 2px 8px -3px var(--tone, #2563eb);
}
.dash .bar-value { color: var(--ink-soft); font-size: 11px; font-weight: 650; }

.dash-dot {
    width: 8px;
    height: 8px;
    flex: none;
    border-radius: 50%;
    background: var(--tone, #2563eb);
    box-shadow: 0 0 0 3px var(--tone-soft, #eff6ff);
}

.dash-metric-inline { margin-top: 14px; }
.dash-metric-inline .metric strong { color: var(--ink); }

.dash-trend-body { padding-top: 14px; }
.dash-trend {
    height: 174px;
    gap: 10px;
    padding: 12px 2px 0;
    border-radius: 12px;
    background-image: linear-gradient(to top, #f1f5f9 1px, transparent 1px);
    background-size: 100% 25%;
}

.dash-trend .chart-bar {
    max-width: 44px;
    background: linear-gradient(180deg, #67e8f9, #0891b2);
    box-shadow: 0 12px 20px -13px rgba(8, 145, 178, .85);
}

.dash-trend .chart-bar-col.is-current .chart-bar {
    background: linear-gradient(180deg, #c084fc, #7c3aed);
    box-shadow: 0 12px 22px -12px rgba(124, 58, 237, .8);
}

.dash-trend .chart-bar-col.is-current .chart-bar-label { color: var(--ink-soft); font-weight: 700; }
.dash-trend .chart-bar-value { font-size: 9.2px; white-space: nowrap; }
.dash-trend .chart-bar-label { font-size: 10px; }

.dash-trend-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
    padding-top: 11px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 11px;
}

.dash-trend-key { display: inline-flex; align-items: center; gap: 6px; font-weight: 550; }
.dash-trend-total strong { margin-left: 4px; color: var(--ink); font-size: 13px; letter-spacing: -.02em; }

.dash-list { display: flex; flex-direction: column; }
.dash-list-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 18px;
    border-top: 1px solid #f1f5f9;
    color: var(--ink);
}
.dash-list-item:first-child { border-top: 0; }
.dash-list-item:hover { background: #f8fbff; color: var(--ink); }

.dash-list-mark {
    width: 8px;
    height: 8px;
    flex: none;
    margin-top: 6px;
    border-radius: 50%;
    background: var(--tone, #2563eb);
    box-shadow: 0 0 0 3px var(--tone-soft, #eff6ff);
}

.dash-list-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.dash-list-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.dash-list-top strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-size: 12.4px; }
.dash-list-top .badge { flex: none; }
.dash-list-title { overflow: hidden; color: var(--ink-soft); font-size: 11.6px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.dash-list-title--strong { color: var(--ink); font-weight: 600; }
.dash-list-meta { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; color: var(--muted); font-size: 10.6px; line-height: 1.35; }
.dash-list-meta svg { width: 12px; height: 12px; color: var(--muted-light); }

.dash-date-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 44px;
    flex: none;
    border: 1px solid var(--tone-line);
    border-radius: 10px;
    background: var(--tone-soft);
    color: var(--tone);
    line-height: 1;
}
.dash-date-tile strong { font-size: 15px; letter-spacing: -.03em; }
.dash-date-tile small { margin-top: 3px; font-size: 8.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

.dash-stock-pill {
    flex: none;
    padding: 2px 7px;
    border: 1px solid #fde68a;
    border-radius: 999px;
    background: #fffbeb;
    color: #b45309;
    font-size: 10px;
    font-weight: 650;
    white-space: nowrap;
}

.dash-alert-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 14px 14px;
    padding: 10px 12px;
    border: 1px solid #fecdd3;
    border-radius: 9px;
    background: #fff1f2;
    color: #9f1239;
    font-size: 11.3px;
    line-height: 1.45;
}
.dash-alert-note svg { width: 15px; height: 15px; flex: none; margin-top: 1px; color: #e11d48; }
.dash-alert-note strong { color: #881337; }
.dash-alert-note a { margin-left: 3px; color: #be123c; font-weight: 650; }

.dash-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 26px 18px;
    color: var(--muted);
    font-size: 11.5px;
    text-align: center;
}
.dash-empty svg { width: 22px; height: 22px; color: var(--muted-light); }

@media (max-width: 1380px) {
    .dash-stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1040px) {
    .dash-hero { grid-template-columns: minmax(0, 1fr); }
    .dash-hero-score { justify-content: flex-start; width: fit-content; }
    .dash-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    .dash-hero { padding: 22px; border-radius: 16px; }
    .dash-hero-copy h2 { font-size: 24px; }
    .dash-hero-score { width: 100%; }
    .dash-gauge { width: 108px; height: 108px; }
    .dash-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dash-filter-form .field { flex: 1 1 140px; }
    .dash-filter-actions { width: 100%; margin-left: 0; }
    .dash-filter-actions .btn { flex: 1; }
    .dash-trend .chart-bar-value { display: none; }
}

@media (max-width: 540px) {
    .dash-stat-grid,
    .dash-metrics { grid-template-columns: minmax(0, 1fr); }
    .dash .bar-row { grid-template-columns: 92px minmax(0, 1fr) 26px; }
    .dash .bar-label { font-size: 10.8px; }
    .dash-trend { height: 150px; }
    .dash-date-range { width: 100%; justify-content: center; }
    .dash-donut-layout { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .dash-donut { margin: 0 auto; }
    .dash-legend { width: 100%; }
    .dash-legend .dash-empty { align-items: center; text-align: center; }
}

/* --------------------------------------------------------------------------
   Print
   -------------------------------------------------------------------------- */
@media print {
    .sidebar, .topbar, .page-actions, .filters-bar, .breadcrumb, .pagination-wrap, .no-print { display: none !important; }
    .main-area { margin-left: 0; }
    .content { max-width: none; padding: 0; }
    .card { border: 1px solid #ccc; box-shadow: none; break-inside: avoid; }
    .table thead th { background: #f2f2f2 !important; }
    body { background: #fff; font-size: 11px; }
}
