:root {
    --bg: #F5F6F8;
    --surface: #FFFFFF;
    --surface-2: #FAFBFC;
    --surface-3: #F2F4F7;
    --border: #E7E9EF;
    --border-strong: #D8DBE3;

    --ink: #14161D;
    --ink-2: #3B4150;
    --muted: #6B7280;
    --faint: #9AA1AE;

    --primary: #4338CA;
    --primary-d: #372FA6;
    --primary-2: #5B50E0;
    --primary-soft: #ECEBFB;
    --primary-softer: #F5F4FE;

    --success: #0E9C6A;
    --success-soft: #E4F5EE;
    --danger: #D93A3A;
    --danger-soft: #FCECEC;
    --warning: #B7791F;
    --warning-soft: #FBF3E2;
    --info: #2B77E4;
    --info-soft: #E8F1FD;

    --sidebar-bg: #14151F;
    --sidebar-2: #1C1E2B;
    --sidebar-ink: #C4C8D4;
    --sidebar-muted: #7C8194;
    --sidebar-active: #2A2C3D;

    --r-xs: 7px;
    --r-sm: 9px;
    --r: 11px;
    --r-lg: 14px;
    --r-xl: 18px;
    --r-pill: 999px;

    --shadow-sm: 0 1px 2px rgba(16,18,26,.05), 0 1px 3px rgba(16,18,26,.05);
    --shadow: 0 4px 14px rgba(16,18,26,.07), 0 2px 6px rgba(16,18,26,.04);
    --shadow-lg: 0 14px 40px rgba(16,18,26,.12);
    --shadow-primary: 0 6px 18px rgba(67,56,202,.28);

    --topbar-h: 62px;
    --sidebar-w: 250px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --ease: cubic-bezier(.4, 0, .2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-feature-settings: 'cv05' 1, 'ss01' 1;
}

a { color: var(--primary); text-decoration: none; transition: color .15s var(--ease); }
a:hover { color: var(--primary-d); }

h1, h2, h3, h4, h5 { font-weight: 650; line-height: 1.25; color: var(--ink); letter-spacing: -.01em; }

img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; }

.icon { flex-shrink: 0; vertical-align: middle; }

/* ============ Scrollbar ============ */
* { scrollbar-width: thin; scrollbar-color: #C7CBD4 transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #CBCFD8; border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #AEB3C0; background-clip: content-box; }

/* ============ Buttons (uniform sizing) ============ */
.btn {
    --btn-h: 40px;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: var(--btn-h); padding: 0 18px;
    font-size: 13.5px; font-weight: 550; line-height: 1;
    border-radius: var(--r-sm); border: 1px solid transparent;
    background: var(--surface); color: var(--ink-2);
    white-space: nowrap; user-select: none;
    transition: background .15s var(--ease), border-color .15s var(--ease), box-shadow .15s var(--ease), transform .12s var(--ease), color .15s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn .icon { width: 17px; height: 17px; }
.btn-sm { --btn-h: 34px; padding: 0 13px; font-size: 12.5px; border-radius: var(--r-xs); }
.btn-lg { --btn-h: 46px; padding: 0 24px; font-size: 14.5px; }
.btn-icon { --btn-h: 38px; width: 38px; padding: 0; }
.btn-icon.btn-sm { --btn-h: 32px; width: 32px; }
.btn-block { width: 100%; }

.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: var(--shadow-primary); }
.btn-primary:hover { background: var(--primary-d); border-color: var(--primary-d); color: #fff; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; color: #fff; }

.btn-ghost { background: var(--surface); border-color: var(--border-strong); color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-3); border-color: var(--border-strong); color: var(--ink); }

.btn-soft { background: var(--primary-soft); border-color: transparent; color: var(--primary); }
.btn-soft:hover { background: #E1DFF8; color: var(--primary-d); }

.btn-success { background: var(--success); border-color: var(--success); color: #fff; }
.btn-success:hover { background: #0B7E56; color: #fff; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #C22E2E; color: #fff; }
.btn-danger-soft { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.btn-danger-soft:hover { background: #F8DCDC; color: var(--danger); }

.btn:disabled, .btn.is-loading { opacity: .6; pointer-events: none; }
.btn.is-loading { position: relative; color: transparent !important; }
.btn.is-loading::after {
    content: ''; position: absolute; width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%;
    animation: spin .6s linear infinite;
}
.btn-ghost.is-loading::after, .btn.is-loading:not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-dark)::after { border-color: rgba(67,56,202,.3); border-top-color: var(--primary); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ Forms ============ */
.field { margin-bottom: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
label.lbl, .lbl { display: block; font-size: 12.5px; font-weight: 550; color: var(--ink-2); margin-bottom: 7px; }
.lbl .req { color: var(--danger); margin-left: 2px; }

.input, .select, .textarea {
    width: 100%; height: 42px; padding: 0 13px;
    font-size: 14px; color: var(--ink);
    background: var(--surface); border: 1px solid var(--border-strong);
    border-radius: var(--r-sm); outline: none;
    transition: border-color .15s var(--ease), box-shadow .15s var(--ease), background .15s var(--ease);
}
.textarea { height: auto; min-height: 92px; padding: 11px 13px; resize: vertical; line-height: 1.5; }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:hover, .select:hover, .textarea:hover { border-color: #C3C7D1; }
.input:focus, .select:focus, .textarea:focus, .select-search.is-focus {
    border-color: var(--primary); box-shadow: 0 0 0 3.5px var(--primary-softer); background: #fff;
}
.input:disabled, .input[readonly].locked { background: var(--surface-3); color: var(--muted); cursor: not-allowed; }
.field-hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.field-error { font-size: 12px; color: var(--danger); margin-top: 6px; display: none; }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea, .field.has-error .select-search { border-color: var(--danger); }
.field.has-error .field-error { display: block; }

.select {
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; padding-right: 38px;
}

/* password field w/ eye toggle */
.pw-wrap { position: relative; display: block; }
.pw-wrap .input { padding-right: 44px; }
.pw-toggle {
    position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
    width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
    background: transparent; border: none; color: var(--faint); border-radius: var(--r-xs);
    transition: color .15s var(--ease), background .15s var(--ease);
}
.pw-toggle:hover { color: var(--ink-2); background: var(--surface-3); }
.pw-toggle .icon { width: 18px; height: 18px; }

.checkbox { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; font-size: 13.5px; color: var(--ink-2); }
.checkbox input { position: absolute; opacity: 0; }
.checkbox .box {
    width: 19px; height: 19px; border: 1.5px solid var(--border-strong); border-radius: 6px;
    display: inline-flex; align-items: center; justify-content: center; color: #fff; transition: all .15s var(--ease); flex-shrink: 0;
}
.checkbox .box .icon { width: 13px; height: 13px; opacity: 0; }
.checkbox input:checked + .box { background: var(--primary); border-color: var(--primary); }
.checkbox input:checked + .box .icon { opacity: 1; }

/* ============ Layout ============ */
.app-shell { min-height: 100vh; }

.topbar {
    position: fixed; top: 0; left: 0; right: 0; height: var(--topbar-h); z-index: 40;
    display: flex; align-items: center; background: var(--surface);
    border-bottom: 1px solid var(--border); padding: 0 22px 0 0;
}
.topbar-brand {
    width: var(--sidebar-w); height: 100%; display: flex; align-items: center; gap: 11px;
    padding-left: 22px; flex-shrink: 0;
}
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, var(--primary), var(--primary-2)); display: inline-flex; align-items: center; justify-content: center; color: #fff; box-shadow: var(--shadow-primary); }
.brand-mark .icon { width: 20px; height: 20px; }
.brand-name { font-size: 16px; font-weight: 700; letter-spacing: -.02em; color: var(--ink); }
.brand-name b { color: var(--primary); font-weight: 700; }
.topbar-spacer { flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
    width: 40px; height: 40px; border-radius: var(--r-sm); border: 1px solid transparent;
    background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center;
    transition: all .15s var(--ease); position: relative;
}
.icon-btn:hover { background: var(--surface-3); color: var(--ink); }
.icon-btn .dot { position: absolute; top: 9px; right: 9px; width: 7px; height: 7px; background: var(--danger); border-radius: 50%; border: 2px solid var(--surface); }

.user-chip { display: flex; align-items: center; gap: 10px; padding: 5px 6px 5px 12px; border-radius: var(--r-pill); border: 1px solid var(--border); cursor: pointer; transition: all .15s var(--ease); }
.user-chip:hover { background: var(--surface-3); }
.user-chip .u-meta { text-align: right; line-height: 1.25; }
.user-chip .u-name { font-size: 13px; font-weight: 600; color: var(--ink); }
.user-chip .u-role { font-size: 11px; color: var(--muted); text-transform: capitalize; }

.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 650; flex-shrink: 0; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 56px; height: 56px; font-size: 18px; }
.avatar-xl { width: 104px; height: 104px; font-size: 36px; }
.avatar-upload { position: relative; display: inline-block; }
.avatar-cam { position: absolute; right: -2px; bottom: -2px; width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: #fff; border: 3px solid var(--surface); display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm); transition: background .15s var(--ease); }
.avatar-cam:hover { background: var(--primary-d); }
.avatar-cam .icon { width: 16px; height: 16px; }
.avatar-upload.is-loading .avatar-cam { opacity: .6; pointer-events: none; }

.sidebar {
    position: fixed; top: var(--topbar-h); left: 0; bottom: 0; width: var(--sidebar-w); z-index: 30;
    background: var(--sidebar-bg); display: flex; flex-direction: column; padding: 16px 14px 12px;
    overflow-y: auto;
}
.sidebar::-webkit-scrollbar-thumb { background: #33364a; background-clip: content-box; }
.nav-group { margin-bottom: 6px; }
.nav-group-label { font-size: 10.5px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--sidebar-muted); padding: 14px 12px 7px; }
.nav-link {
    display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-sm);
    color: var(--sidebar-ink); font-size: 13.5px; font-weight: 500; margin-bottom: 2px;
    transition: background .15s var(--ease), color .15s var(--ease); position: relative;
}
.nav-link .icon { width: 19px; height: 19px; color: var(--sidebar-muted); transition: color .15s var(--ease); }
.nav-link:hover { background: var(--sidebar-2); color: #fff; }
.nav-link:hover .icon { color: var(--sidebar-ink); }
.nav-link.active { background: var(--sidebar-active); color: #fff; }
.nav-link.active .icon { color: var(--primary-2); }
.nav-link .badge-count { margin-left: auto; background: var(--primary); color: #fff; font-size: 10.5px; font-weight: 650; padding: 1px 7px; border-radius: 99px; }

.main {
    margin-left: var(--sidebar-w); margin-top: var(--topbar-h);
    min-height: calc(100vh - var(--topbar-h)); padding: 26px 30px 44px;
}
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 22px; flex-wrap: wrap; }
.page-title { font-size: 21px; font-weight: 700; letter-spacing: -.02em; }
.page-sub { font-size: 13.5px; color: var(--muted); margin-top: 3px; }
.page-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.breadcrumb { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); margin-bottom: 5px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .icon { width: 14px; height: 14px; color: var(--faint); }

/* ============ Cards ============ */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.card-pad { padding: 20px 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--border); }
.card-title { font-size: 15px; font-weight: 650; display: flex; align-items: center; gap: 9px; }
.card-title .icon { width: 18px; height: 18px; color: var(--primary); }
.card-body { padding: 20px 22px; }
.card-foot { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: flex-end; gap: 10px; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ============ Stat cards ============ */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 22px; }
.stat {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
    padding: 18px 20px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.stat-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.stat-ico { width: 42px; height: 42px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; }
.stat-ico .icon { width: 21px; height: 21px; }
.stat-ico.i-primary { background: var(--primary-soft); color: var(--primary); }
.stat-ico.i-success { background: var(--success-soft); color: var(--success); }
.stat-ico.i-warning { background: var(--warning-soft); color: var(--warning); }
.stat-ico.i-info { background: var(--info-soft); color: var(--info); }
.stat-ico.i-danger { background: var(--danger-soft); color: var(--danger); }
.stat-trend { font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 3px; padding: 3px 8px; border-radius: 99px; }
.stat-trend.up { color: var(--success); background: var(--success-soft); }
.stat-trend.down { color: var(--danger); background: var(--danger-soft); }
.stat-trend .icon { width: 13px; height: 13px; }
.stat-value { font-size: 26px; font-weight: 750; letter-spacing: -.02em; line-height: 1.1; }
.stat-label { font-size: 13px; color: var(--muted); margin-top: 3px; }

/* ============ Tables ============ */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.tbl td, table.tbl th { white-space: nowrap; }
table.tbl td.wrap, table.tbl th.wrap { white-space: normal; }
table.tbl thead th {
    text-align: left; font-size: 11.5px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase;
    color: var(--muted); background: var(--surface-2); padding: 12px 16px; border-bottom: 1px solid var(--border);
    white-space: nowrap; position: sticky; top: 0;
}
table.tbl tbody td { padding: 13px 16px; border-bottom: 1px solid var(--border); color: var(--ink-2); vertical-align: middle; }
table.tbl tbody tr { transition: background .12s var(--ease); }
table.tbl tbody tr:hover { background: var(--surface-2); }
table.tbl tbody tr:last-child td { border-bottom: none; }
table.tbl .t-strong { font-weight: 600; color: var(--ink); }
table.tbl .t-mono { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12.5px; }
.row-actions { display: flex; align-items: center; gap: 4px; justify-content: flex-end; }
.cell-user { display: flex; align-items: center; gap: 11px; }
.cell-user .cu-name { font-weight: 600; color: var(--ink); }
.cell-user .cu-sub { font-size: 12px; color: var(--muted); }

/* ============ Badges ============ */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 99px; line-height: 1.5; white-space: nowrap; }
.badge .icon { width: 12px; height: 12px; }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-primary { background: var(--primary-soft); color: var(--primary); }
.badge-muted { background: var(--surface-3); color: var(--muted); }
.badge-dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ============ Toolbar / filters ============ */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-box { position: relative; flex: 1; min-width: 220px; max-width: 380px; }
.search-box .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--faint); pointer-events: none; }
.search-box .input { padding-left: 40px; height: 40px; }
.toolbar .select { width: auto; min-width: 150px; height: 40px; }

/* ============ Pagination ============ */
.pagination { display: flex; align-items: center; gap: 6px; }
.pagination .pg { min-width: 34px; height: 34px; padding: 0 10px; border-radius: var(--r-xs); border: 1px solid var(--border); background: var(--surface); color: var(--ink-2); font-size: 13px; font-weight: 550; display: inline-flex; align-items: center; justify-content: center; transition: all .15s var(--ease); }
.pagination .pg:hover { border-color: var(--border-strong); background: var(--surface-3); }
.pagination .pg.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination .pg:disabled { opacity: .45; pointer-events: none; }

/* ============ Empty / loading ============ */
.empty { text-align: center; padding: 56px 20px; }
.empty-ico { width: 58px; height: 58px; border-radius: 15px; background: var(--surface-3); color: var(--faint); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.empty-ico .icon { width: 27px; height: 27px; }
.empty h4 { font-size: 15.5px; margin-bottom: 5px; }
.empty p { color: var(--muted); font-size: 13.5px; max-width: 360px; margin: 0 auto 18px; }

.skeleton { background: linear-gradient(90deg, #EEF0F3 25%, #F6F7F9 50%, #EEF0F3 75%); background-size: 200% 100%; animation: sk 1.3s infinite; border-radius: var(--r-xs); }
@keyframes sk { to { background-position: -200% 0; } }
.page-loading { display: flex; align-items: center; justify-content: center; padding: 80px 0; }
.spinner { width: 30px; height: 30px; border: 3px solid var(--primary-soft); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; }

.divider { height: 1px; background: var(--border); margin: 20px 0; border: none; }

/* ============ Detail rows ============ */
.detail-table { width: 100%; border-collapse: collapse; }
.detail-table td { padding: 11px 0; border-bottom: 1px solid var(--surface-3); font-size: 13.5px; vertical-align: top; }
.detail-table tr:last-child td { border-bottom: none; }
.detail-table .dt-label { width: 42%; color: var(--muted); font-weight: 500; }
.detail-table .dt-value { color: var(--ink); font-weight: 550; }

/* ============ Utilities ============ */
.flex { display: flex; } .items-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; }
.text-muted { color: var(--muted); } .text-sm { font-size: 12.5px; } .text-right { text-align: right; }
.fw-600 { font-weight: 600; } .fw-700 { font-weight: 700; }
.text-success { color: var(--success); } .text-danger { color: var(--danger); } .text-primary { color: var(--primary); }
.w-full { width: 100%; } .nowrap { white-space: nowrap; }
.hidden { display: none !important; }

/* ============ Dashboard bits ============ */
.dc-chart { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; height: 170px; padding: 0 4px; }
.dc-chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.dc-bars { display: flex; align-items: flex-end; gap: 5px; height: 150px; }
.dc-bar { width: 15px; border-radius: 5px 5px 3px 3px; transition: height .5s var(--ease); }
.dc-bar.income { background: linear-gradient(180deg, var(--primary-2), var(--primary)); }
.dc-bar.expense { background: #E2E4EA; }
.dc-chart-x { font-size: 11.5px; color: var(--muted); font-weight: 550; }

.att-ring { position: relative; width: 120px; height: 120px; flex-shrink: 0; }
.att-ring svg { width: 120px; height: 120px; transform: rotate(-90deg); }
.att-ring circle { fill: none; stroke-width: 11; stroke-linecap: round; }
.att-ring .ring-bg { stroke: var(--surface-3); }
.att-ring .ring-fg { stroke: var(--primary); stroke-dasharray: 326; transition: stroke-dashoffset .7s var(--ease); }
.att-ring-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.att-row { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; font-size: 13.5px; }
.att-row b { font-size: 15px; }

.list-row { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: var(--r-sm); transition: background .12s var(--ease); }
.list-row:hover { background: var(--surface-2); }

.progress { height: 8px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-2)); border-radius: 99px; transition: width .6s var(--ease); }

.notice-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--surface-3); }
.notice-item:last-child { border-bottom: none; }
.notice-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--primary); margin-top: 6px; flex-shrink: 0; box-shadow: 0 0 0 4px var(--primary-softer); }

.build-note { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 70px 24px; }
.build-note .bn-ic { width: 66px; height: 66px; border-radius: 17px; background: var(--primary-soft); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.build-note .bn-ic .icon { width: 30px; height: 30px; }
.build-note h3 { font-size: 18px; margin-bottom: 6px; }
.build-note p { color: var(--muted); max-width: 400px; }

/* ============ Responsive ============ */
.sidebar-backdrop { display: none; }
#sidebar-toggle { display: none; }
@media (max-width: 1100px) {
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: 1fr; }
    /* collapse inline 2-column dashboard/detail grids to a single column */
    .main .grid[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
}
@media (max-width: 900px) {
    :root { --sidebar-w: 260px; }
    #sidebar-toggle { display: inline-flex; }
    .topbar { padding-right: 14px; }
    .topbar-brand { width: auto; padding-left: 16px; }
    .sidebar { transform: translateX(-100%); transition: transform .25s var(--ease); box-shadow: var(--shadow-lg); }
    body.nav-open .sidebar { transform: translateX(0); }
    body.nav-open .sidebar-backdrop { display: block; position: fixed; inset: var(--topbar-h) 0 0 0; background: rgba(16,18,26,.4); z-index: 25; }
    .main { margin-left: 0; padding: 20px 16px 40px; }
    .user-chip .u-meta { display: none; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .page-head { flex-direction: column; align-items: stretch; }
    .page-actions { width: 100%; }
    .page-actions .btn { flex: 1; }
}
@media (max-width: 640px) {
    .stat-grid { grid-template-columns: 1fr; }
    .field-row, .field-row-3 { grid-template-columns: 1fr !important; }
    .toolbar { flex-direction: column; align-items: stretch; }
    .toolbar .search-box { max-width: none; }
    .toolbar .select { width: 100%; }
    .page-title { font-size: 19px; }
    .modal-overlay { padding: 16px 12px; }
    .modal-box { max-height: calc(100vh - 32px); }
    .dc-pop { left: 12px !important; right: 12px; }
}
