/* =====================================================================
   ProACC Design System — Arabic-first RTL financial SaaS
   ===================================================================== */

@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-sans-arabic-arabic-500-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 600; font-display: swap; src: url("../fonts/ibm-plex-sans-arabic-arabic-600-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 700; font-display: swap; src: url("../fonts/ibm-plex-sans-arabic-arabic-700-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-sans-arabic-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-sans-arabic-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 600; font-display: swap; src: url("../fonts/ibm-plex-sans-arabic-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 700; font-display: swap; src: url("../fonts/ibm-plex-sans-arabic-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --font: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --radius-sm: 6px; --radius: 10px; --radius-lg: 14px; --radius-xl: 20px;
  --sidebar-w: 268px; --sidebar-w-collapsed: 76px; --topbar-h: 62px;
  --ease: cubic-bezier(.2, .8, .2, 1);

  --bg: #F3F5F7;
  --surface: #FFFFFF;
  --surface-2: #F8FAFB;
  --surface-3: #EEF2F5;
  --border: #E2E8EE;
  --border-strong: #CBD5DF;
  --text: #0E1A26;
  --text-2: #475769;
  --text-3: #7B8A99;
  --primary: #0B6E5F;
  --primary-hover: #085A4E;
  --primary-soft: #E6F2EF;
  --primary-soft-2: #CDE6E0;
  --on-primary: #FFFFFF;
  --accent: #B8862F;
  --accent-soft: #F7EEDC;
  --success: #157A43; --success-soft: #E4F4EA;
  --warning: #A95D06; --warning-soft: #FDF1DE;
  --danger: #B93228; --danger-soft: #FCE9E7;
  --info: #1B66AD; --info-soft: #E6F0FA;
  --neutral: #55636F; --neutral-soft: #EDF1F4;
  --focus: 0 0 0 3px rgba(11, 110, 95, .22);
  --shadow-sm: 0 1px 2px rgba(16, 32, 48, .06);
  --shadow: 0 1px 3px rgba(16, 32, 48, .06), 0 6px 20px -8px rgba(16, 32, 48, .12);
  --shadow-lg: 0 24px 60px -20px rgba(10, 25, 40, .35);
  --sidebar-bg: #0D1F2B;
  --sidebar-bg-2: #112836;
  --sidebar-text: #AFC0CD;
  --sidebar-text-strong: #F2F6F8;
  --sidebar-muted: #6F8595;
  --sidebar-hover: rgba(255, 255, 255, .06);
  --sidebar-active: rgba(47, 182, 158, .16);
  --sidebar-indicator: #35C2A8;
  --chart-grid: #E7ECF0;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0A1118;
  --surface: #101B25;
  --surface-2: #13202B;
  --surface-3: #192938;
  --border: #213243;
  --border-strong: #2D4357;
  --text: #E5ECF2;
  --text-2: #A5B4C2;
  --text-3: #74879A;
  --primary: #2DB49C;
  --primary-hover: #3CC6AD;
  --primary-soft: rgba(45, 180, 156, .13);
  --primary-soft-2: rgba(45, 180, 156, .24);
  --on-primary: #062019;
  --accent: #D9A94F;
  --accent-soft: rgba(217, 169, 79, .14);
  --success: #3DC47C; --success-soft: rgba(61, 196, 124, .13);
  --warning: #EDA33B; --warning-soft: rgba(237, 163, 59, .13);
  --danger: #F0685C; --danger-soft: rgba(240, 104, 92, .13);
  --info: #5AA7F0; --info-soft: rgba(90, 167, 240, .13);
  --neutral: #9CAAB7; --neutral-soft: rgba(156, 170, 183, .12);
  --focus: 0 0 0 3px rgba(45, 180, 156, .3);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 10px 30px -12px rgba(0, 0, 0, .55);
  --shadow-lg: 0 30px 70px -20px rgba(0, 0, 0, .75);
  --sidebar-bg: #070D13;
  --sidebar-bg-2: #0B151D;
  --sidebar-text: #97A9B8;
  --sidebar-hover: rgba(255, 255, 255, .05);
  --sidebar-active: rgba(45, 180, 156, .15);
  --chart-grid: #1C2B39;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.55; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0; }
hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }
::selection { background: var(--primary-soft-2); }
.num, .ltr { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
td.num, th.num { text-align: left; white-space: nowrap; }
.muted { color: var(--text-3); }
.text-2 { color: var(--text-2); }
.small { font-size: 12px; }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pos { color: var(--success); }
.neg { color: var(--danger); }
.hidden { display: none !important; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.grow { flex: 1 1 auto; min-width: 0; }
.mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mb-16 { margin-bottom: 16px; } .mb-8 { margin-bottom: 8px; }
[class^="icon-"], [class*=" icon-"] { line-height: 1; display: inline-block; }

/* ------------------------------------------------------------------ app shell */
.app-shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns .25s var(--ease); }
.app-shell.collapsed { grid-template-columns: var(--sidebar-w-collapsed) minmax(0, 1fr); }
.main { display: flex; flex-direction: column; min-width: 0; }
.content { padding: 24px 28px 40px; width: 100%; max-width: 1680px; margin-inline: auto; }

.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; overflow: hidden;
  background: linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-bg-2) 100%); color: var(--sidebar-text);
  border-inline-start: 1px solid rgba(255,255,255,.03); z-index: 40;
}
.sb-brand { display: flex; align-items: center; gap: 12px; height: var(--topbar-h); padding: 0 18px; border-bottom: 1px solid rgba(255,255,255,.06); flex-shrink: 0; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0;
  background: linear-gradient(135deg, #2FB69E 0%, #0B6E5F 60%, #0A4D44 100%); color: #fff; font-weight: 700; font-size: 15px;
  box-shadow: 0 6px 16px -6px rgba(47, 182, 158, .6), inset 0 1px 0 rgba(255,255,255,.25); direction: ltr; letter-spacing: -.5px;
}
.brand-mark i { font-size: 20px; line-height: 1; }
.brand-name { color: var(--sidebar-text-strong); font-weight: 700; font-size: 17px; direction: ltr; letter-spacing: .2px; }
.brand-name span { color: #35C2A8; }
.brand-tag { font-size: 11px; color: var(--sidebar-muted); margin-top: -2px; }
.sb-nav { flex: 1; overflow-y: auto; padding: 12px 10px 20px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.12) transparent; }
.sb-group { margin-bottom: 6px; }
.sb-group-title {
  display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; color: var(--sidebar-muted); cursor: pointer;
  font: 600 11.5px var(--font); letter-spacing: .02em; padding: 12px 12px 6px; text-align: start;
}
.sb-group-title .icon-chevron-left { margin-inline-start: auto; transition: transform .2s; font-size: 13px; }
.sb-group.open .sb-group-title .icon-chevron-left { transform: rotate(-90deg); }
.sb-link {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 12px; margin: 1px 0; border-radius: 9px;
  color: var(--sidebar-text); font-weight: 500; font-size: 13.5px; white-space: nowrap; transition: background .15s, color .15s;
}
.sb-link i { font-size: 18px; width: 22px; text-align: center; flex-shrink: 0; opacity: .9; }
.sb-link:hover { background: var(--sidebar-hover); color: var(--sidebar-text-strong); text-decoration: none; }
.sb-link.active { background: var(--sidebar-active); color: var(--sidebar-text-strong); }
.sb-link.active::before { content: ""; position: absolute; inset-inline-start: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--sidebar-indicator); }
.sb-link.active i { color: var(--sidebar-indicator); opacity: 1; }
.sb-footer { padding: 12px; border-top: 1px solid rgba(255,255,255,.06); font-size: 11px; color: var(--sidebar-muted); flex-shrink: 0; }
.collapsed .brand-text, .collapsed .sb-link span, .collapsed .sb-group-title span, .collapsed .sb-group-title .icon-chevron-left, .collapsed .sb-footer .ver { display: none; }
.collapsed .sb-link { justify-content: center; padding: 10px; }
.collapsed .sb-group-title { justify-content: center; padding: 10px 0 4px; }
.collapsed .sb-group-title::after { content: ""; display: block; width: 18px; height: 1px; background: rgba(255,255,255,.1); }
.collapsed .sb-group-title i { display: none; }
.collapsed .sb-group .sb-items { display: block !important; }
.collapsed .sb-brand { justify-content: center; padding: 0; }

.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--topbar-h); display: flex; align-items: center; gap: 12px; padding: 0 20px;
  background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--border);
}
.tb-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid transparent; background: transparent;
  color: var(--text-2); cursor: pointer; font-size: 18px; position: relative; transition: background .15s, color .15s;
}
.tb-btn:hover { background: var(--surface-3); color: var(--text); }
.tb-btn .dot { position: absolute; top: 7px; inset-inline-end: 7px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--surface); }
.tb-context { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ctx-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); font-weight: 600; font-size: 13px; max-width: 320px; cursor: pointer; text-decoration: none !important;
}
.ctx-chip i { color: var(--primary); font-size: 16px; }
.ctx-chip:hover { border-color: var(--border-strong); }
.ctx-chip.year { font-weight: 500; }
.tb-search { position: relative; flex: 1; max-width: 420px; margin-inline-start: 12px; }
.tb-search input { width: 100%; height: 38px; padding-inline: 38px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; }
.tb-search input:focus { outline: none; border-color: var(--primary); box-shadow: var(--focus); background: var(--surface); }
.tb-search > i { position: absolute; top: 50%; inset-inline-start: 12px; transform: translateY(-50%); color: var(--text-3); }
.tb-spacer { flex: 1; }
.user-btn { display: flex; align-items: center; gap: 10px; padding: 4px 6px 4px 10px; border-radius: 12px; border: 1px solid transparent; background: none; cursor: pointer; color: var(--text); font: inherit; }
.user-btn:hover { background: var(--surface-3); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: 14px; flex-shrink: 0; }
.user-meta { text-align: start; line-height: 1.25; }
.user-meta .n { font-weight: 600; font-size: 13px; }
.user-meta .r { font-size: 11.5px; color: var(--text-3); }

/* ------------------------------------------------------------------ dropdowns */
.dd { position: relative; }
.dd-menu {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0; min-width: 240px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 60; animation: pop .14s var(--ease);
}
.dd-menu.start { inset-inline-end: auto; inset-inline-start: 0; }
.dd-menu.wide { width: 360px; }
.dd-head { padding: 10px 12px 8px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.dd-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 8px; border: 0; background: none;
  color: var(--text); font: inherit; font-size: 13.5px; cursor: pointer; text-align: start; text-decoration: none !important;
}
.dd-item:hover { background: var(--surface-3); }
.dd-item i { color: var(--text-3); font-size: 16px; width: 18px; }
.dd-item.danger, .dd-item.danger i { color: var(--danger); }
.dd-sep { height: 1px; background: var(--border); margin: 4px 0; }
.dd-overlay { position: fixed; inset: 0; z-index: 55; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
.notif { display: flex; gap: 10px; padding: 10px 12px; border-radius: 8px; color: var(--text); text-decoration: none !important; }
.notif:hover { background: var(--surface-3); }
.notif .ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; font-size: 16px; }
.notif .t { font-weight: 600; font-size: 13px; }
.notif .d { font-size: 12px; color: var(--text-3); }

/* ------------------------------------------------------------------ page header */
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-title { font-size: 22px; line-height: 1.3; }
.page-sub { color: var(--text-3); font-size: 13px; margin-top: 4px; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-3); margin-bottom: 6px; }
.crumbs a { color: var(--text-3); }
.crumbs i { font-size: 12px; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); min-width: 0; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.card-title { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card-title i { color: var(--primary); font-size: 17px; }
.card-sub { color: var(--text-3); font-size: 12.5px; }
.card-body { padding: 18px; }
.card-body.flush { padding: 0; }
.card-footer { padding: 12px 18px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.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)); }
.span-2 { grid-column: span 2; }
.grid-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }

.kpi { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; }
.kpi-label { color: var(--text-2); font-weight: 500; font-size: 13px; }
.kpi-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 19px; }
.kpi-value { font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.kpi-value small { font-size: 12px; font-weight: 500; color: var(--text-3); margin-inline-start: 4px; }
.kpi-foot { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); }
.delta { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; padding: 1px 7px; border-radius: 999px; }
.delta.up { color: var(--success); background: var(--success-soft); }
.delta.down { color: var(--danger); background: var(--danger-soft); }
.tone-primary { color: var(--primary); background: var(--primary-soft); }
.tone-success { color: var(--success); background: var(--success-soft); }
.tone-warning { color: var(--warning); background: var(--warning-soft); }
.tone-danger { color: var(--danger); background: var(--danger-soft); }
.tone-info { color: var(--info); background: var(--info-soft); }
.tone-neutral { color: var(--neutral); background: var(--neutral-soft); }
.tone-accent { color: var(--accent); background: var(--accent-soft); }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent;
  font: 600 13.5px var(--font); cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .05s;
  text-decoration: none !important; user-select: none;
}
.btn i { font-size: 16px; }
.btn:focus-visible { outline: none; box-shadow: var(--focus); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 1px 0 rgba(255,255,255,.12) inset, 0 4px 12px -6px var(--primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-3); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }
.btn-soft { background: var(--primary-soft); color: var(--primary); }
.btn-soft:hover { background: var(--primary-soft-2); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(.94); }
.btn-danger-soft { background: var(--danger-soft); color: var(--danger); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { filter: brightness(.95); }
.btn-warning-soft { background: var(--warning-soft); color: var(--warning); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 8px; }
.btn-xs { height: 26px; padding: 0 8px; font-size: 12px; border-radius: 7px; gap: 4px; }
.btn-icon { width: 34px; padding: 0; }
.btn-icon.btn-sm { width: 30px; }
.btn-icon.btn-xs { width: 26px; }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; }
.btn-group .btn:first-child { border-start-start-radius: 10px; border-end-start-radius: 10px; }
.btn-group .btn:last-child { border-start-end-radius: 10px; border-end-end-radius: 10px; }
.btn-group .btn + .btn { margin-inline-start: -1px; }
.spinner { width: 15px; height: 15px; border-radius: 50%; border: 2px solid currentColor; border-inline-end-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ forms */
.form-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px 16px; }
.col-12 { grid-column: span 12; } .col-9 { grid-column: span 9; } .col-8 { grid-column: span 8; } .col-6 { grid-column: span 6; }
.col-4 { grid-column: span 4; } .col-3 { grid-column: span 3; } .col-2 { grid-column: span 2; }
.col-11 { grid-column: span 11; } .col-10 { grid-column: span 10; } .col-7 { grid-column: span 7; } .col-5 { grid-column: span 5; } .col-1 { grid-column: span 1; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.field .req::after { content: " *"; color: var(--danger); }
.field .hint { font-size: 11.5px; color: var(--text-3); }
.input, .select, .textarea {
  width: 100%; height: 38px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text); font: 14px var(--font); transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 76px; padding: 9px 12px; resize: vertical; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%);
  background-position: 16px 17px, 21px 17px; background-size: 5px 5px; background-repeat: no-repeat; padding-inline-start: 34px; }
.input:hover, .select:hover, .textarea:hover { border-color: color-mix(in srgb, var(--border-strong) 60%, var(--text-3)); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--focus); }
.input:disabled, .select:disabled, .textarea:disabled, .input[readonly] { background: var(--surface-2); color: var(--text-2); }
.input.num { text-align: left; }
.input-sm { height: 32px; font-size: 13px; padding: 0 9px; border-radius: 8px; }
input[type="date"].input { direction: rtl; }
input[type="number"]::-webkit-inner-spin-button { opacity: .4; }
.input-group { position: relative; display: flex; align-items: center; }
.input-group > i { position: absolute; inset-inline-start: 11px; color: var(--text-3); pointer-events: none; }
.input-group .input { padding-inline-start: 36px; }
.input-group .addon { position: absolute; inset-inline-end: 10px; font-size: 12px; color: var(--text-3); }
.invalid .input, .invalid .select, .input.invalid, .modified.invalid { border-color: var(--danger) !important; }
.validation-message { color: var(--danger); font-size: 12px; }
.validation-errors { margin: 0 0 12px; padding: 12px 16px 12px 12px; list-style: none; border-radius: 10px; background: var(--danger-soft); color: var(--danger); }
.validation-errors li { padding-inline-start: 16px; position: relative; }
.validation-errors li::before { content: "•"; position: absolute; inset-inline-start: 2px; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; user-select: none; }
.switch input { appearance: none; width: 38px; height: 22px; border-radius: 11px; background: var(--border-strong); position: relative; cursor: pointer; transition: background .2s; flex-shrink: 0; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: inset-inline-start .2s var(--ease); }
.switch input:checked { background: var(--primary); }
.switch input:checked::after { inset-inline-start: 19px; }
.switch input:focus-visible { box-shadow: var(--focus); }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--primary); }
.section-title { font-size: 13px; font-weight: 700; color: var(--text-2); padding-bottom: 8px; border-bottom: 1px dashed var(--border); margin: 6px 0 2px; grid-column: span 12; display: flex; align-items: center; gap: 8px; }
.section-title i { color: var(--primary); }

/* ------------------------------------------------------------------ autocomplete */
.ac { position: relative; }
.ac-list {
  position: absolute; top: calc(100% + 4px); inset-inline: 0; min-width: 320px; max-height: 320px; overflow-y: auto; z-index: 70; background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 4px;
}
.ac-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 7px; cursor: pointer; font-size: 13.5px; }
.ac-item .code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12.5px; color: var(--text-3); direction: ltr; min-width: 64px; text-align: end; }
.ac-item .extra { margin-inline-start: auto; font-size: 11.5px; color: var(--text-3); }
.ac-item.active, .ac-item:hover { background: var(--primary-soft); }
.ac-group { font-size: 11px; font-weight: 700; color: var(--text-3); padding: 8px 10px 4px; }
.ac-empty { padding: 14px; text-align: center; color: var(--text-3); font-size: 13px; }
.ac-clear { position: absolute; inset-inline-end: 8px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--text-3); cursor: pointer; padding: 4px; font-size: 14px; }

/* ------------------------------------------------------------------ tables */
.table-toolbar { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.table-toolbar .search { position: relative; width: 300px; max-width: 100%; }
.table-toolbar .search input { padding-inline-start: 36px; }
.table-toolbar .search i { position: absolute; top: 50%; inset-inline-start: 12px; transform: translateY(-50%); color: var(--text-3); }
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.data-table th {
  position: sticky; top: 0; z-index: 2; background: var(--surface-2); color: var(--text-2); font-weight: 600; font-size: 12.5px; text-align: start;
  padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; user-select: none;
}
.data-table th.sortable { cursor: pointer; }
.data-table th.sortable:hover { color: var(--text); }
.data-table th .sort { font-size: 12px; margin-inline-start: 4px; color: var(--primary); }
.data-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tbody tr { transition: background .1s; }
.data-table tbody tr:hover { background: color-mix(in srgb, var(--primary-soft) 45%, transparent); }
.data-table tbody tr.clickable { cursor: pointer; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tfoot td { background: var(--surface-2); font-weight: 700; border-top: 2px solid var(--border-strong); padding: 11px 14px; }
.data-table.compact td, .data-table.compact th { padding: 7px 10px; }
.data-table tr.row-group td { background: var(--surface-2); font-weight: 700; }
.data-table tr.row-subtotal td { font-weight: 700; border-top: 1px solid var(--border-strong); }
.data-table tr.row-total td { font-weight: 700; background: var(--primary-soft); border-top: 2px solid var(--primary); }
.data-table tr.row-muted td { color: var(--text-3); }
.data-table .actions { width: 1%; white-space: nowrap; text-align: end; }
.data-table a.doc, a.doc { font-weight: 600; direction: ltr; unicode-bidi: isolate; white-space: nowrap; }
.col-menu { max-height: 360px; overflow-y: auto; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--border); flex-wrap: wrap; font-size: 13px; color: var(--text-2); }
.pager .pages { display: flex; align-items: center; gap: 4px; }
.pager .pg { min-width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; font: inherit; }
.pager .pg.active { background: var(--primary); border-color: var(--primary); color: var(--on-primary); font-weight: 700; }
.pager .pg:disabled { opacity: .4; cursor: default; }
.pager select { height: 32px; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 1.7; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge.plain::before { display: none; }

/* ------------------------------------------------------------------ filters */
.filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; padding: 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.filters .field > label { font-size: 12px; }
.filters .actions { display: flex; align-items: flex-end; gap: 8px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); font-size: 12.5px; border: 1px solid transparent; cursor: pointer; font-family: inherit; }
.chip.active { background: var(--primary-soft); color: var(--primary); border-color: var(--primary-soft-2); font-weight: 600; }

/* ------------------------------------------------------------------ tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tab { padding: 11px 16px; border: 0; background: none; font: 600 13.5px var(--font); color: var(--text-3); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab .count { background: var(--surface-3); color: var(--text-2); border-radius: 999px; padding: 0 7px; font-size: 11.5px; }
.seg { display: inline-flex; background: var(--surface-3); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 6px 14px; border-radius: 8px; font: 600 13px var(--font); color: var(--text-2); cursor: pointer; }
.seg button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* ------------------------------------------------------------------ modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(8, 18, 28, .52); backdrop-filter: blur(2px); z-index: 100; display: grid; place-items: center; padding: 20px; animation: fade .15s; }
.modal { width: 100%; max-width: 560px; max-height: calc(100vh - 40px); display: flex; flex-direction: column; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); animation: pop .18s var(--ease); border: 1px solid var(--border); }
.modal.lg { max-width: 860px; } .modal.xl { max-width: 1180px; } .modal.sm { max-width: 440px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-title { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 16px 16px; }
.confirm-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; flex-shrink: 0; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ------------------------------------------------------------------ toasts */
.toast-stack { position: fixed; bottom: 20px; inset-inline-end: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; width: 380px; max-width: calc(100vw - 40px); }
.toast { display: flex; gap: 12px; padding: 13px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); animation: slide .22s var(--ease); border-inline-start: 4px solid var(--info); }
.toast.success { border-inline-start-color: var(--success); }
.toast.error { border-inline-start-color: var(--danger); }
.toast.warning { border-inline-start-color: var(--warning); }
.toast .ic { font-size: 20px; margin-top: 1px; }
.toast.success .ic { color: var(--success); } .toast.error .ic { color: var(--danger); } .toast.warning .ic { color: var(--warning); } .toast.info .ic { color: var(--info); }
.toast .tt { font-weight: 700; font-size: 13.5px; }
.toast .tx { font-size: 13px; color: var(--text-2); white-space: pre-line; }
.toast .x { margin-inline-start: auto; border: 0; background: none; color: var(--text-3); cursor: pointer; font-size: 16px; align-self: flex-start; }
@keyframes slide { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------------ misc components */
.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 48px 20px; text-align: center; color: var(--text-3); }
.empty .ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 26px; background: var(--surface-3); color: var(--text-3); margin-bottom: 4px; }
.empty .t { font-weight: 700; color: var(--text-2); font-size: 15px; }
.skeleton { background: linear-gradient(90deg, var(--surface-3) 25%, color-mix(in srgb, var(--surface-3) 40%, var(--surface)) 37%, var(--surface-3) 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; border-radius: 6px; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.sk-line { height: 12px; margin: 10px 0; }
.sk-block { height: 110px; border-radius: 14px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; font-size: 13.5px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; font-weight: 600; }
.meta-strip { display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 12px 18px; background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: 12.5px; color: var(--text-2); }
.meta-strip b { color: var(--text); font-weight: 600; }
.alert { display: flex; gap: 12px; padding: 12px 14px; border-radius: 10px; font-size: 13.5px; align-items: flex-start; }
.alert i { font-size: 18px; margin-top: 1px; }
.progress { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--primary); border-radius: 3px; }
.status-bar { display: flex; align-items: center; gap: 0; margin-bottom: 16px; }
.status-step { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 12.5px; font-weight: 600; }
.status-step .dotn { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font-size: 12px; }
.status-step.done { color: var(--success); } .status-step.done .dotn { background: var(--success); color: #fff; }
.status-step.current { color: var(--primary); } .status-step.current .dotn { background: var(--primary); color: var(--on-primary); }
.status-line { width: 40px; height: 2px; background: var(--border); margin: 0 8px; }
.kbd { font-family: ui-monospace, Consolas, monospace; font-size: 11px; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text-2); direction: ltr; display: inline-block; }

/* ------------------------------------------------------------------ tree */
.tree-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px 150px 130px 110px; align-items: center; border-bottom: 1px solid var(--border); min-height: 42px; font-size: 13.5px; }
.tree-row:hover { background: color-mix(in srgb, var(--primary-soft) 45%, transparent); }
.tree-row.selected { background: var(--primary-soft); }
.tree-head { background: var(--surface-2); color: var(--text-2); font-weight: 600; font-size: 12.5px; position: sticky; top: 0; z-index: 2; }
.tree-cell { padding: 6px 12px; min-width: 0; }
.tree-name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.tree-toggle { width: 22px; height: 22px; border: 0; background: none; border-radius: 6px; cursor: pointer; color: var(--text-3); display: grid; place-items: center; flex-shrink: 0; }
.tree-toggle:hover { background: var(--surface-3); }
.tree-toggle i { transition: transform .15s; }
.tree-toggle.open i { transform: rotate(-90deg); }
.tree-code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; color: var(--text-3); font-size: 12.5px; direction: ltr; min-width: 58px; text-align: end; }
.tree-row.header .tree-label { font-weight: 700; }
.tree-row.level-1 { background: var(--surface-2); }
.tree-icon { color: var(--text-3); font-size: 15px; }
.tree-row.header .tree-icon { color: var(--accent); }

/* ------------------------------------------------------------------ document editors */
.doc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.doc-side { position: sticky; top: calc(var(--topbar-h) + 16px); display: flex; flex-direction: column; gap: 16px; }
.lines { width: 100%; border-collapse: separate; border-spacing: 0; }
.lines th { background: var(--surface-2); font-size: 12px; font-weight: 600; color: var(--text-2); padding: 8px 6px; border-bottom: 1px solid var(--border); text-align: start; white-space: nowrap; }
.lines td { padding: 5px 4px; border-bottom: 1px solid var(--border); vertical-align: top; }
.lines td.idx { width: 34px; text-align: center; color: var(--text-3); font-size: 12px; padding-top: 12px; }
.lines tr.focused td { background: color-mix(in srgb, var(--primary-soft) 55%, transparent); }
.lines .input, .lines .select { height: 34px; font-size: 13px; border-color: transparent; background: transparent; padding: 0 8px; }
.lines .select { padding-inline-start: 28px; background-position: 12px 15px, 17px 15px; }
.lines .input:hover, .lines .select:hover { border-color: var(--border); background: var(--surface); }
.lines .input:focus, .lines .select:focus { border-color: var(--primary); background: var(--surface); }
.lines td.calc { padding: 12px 8px 0; font-size: 13px; text-align: left; white-space: nowrap; }
.lines .line-tools { display: flex; gap: 2px; opacity: .35; transition: opacity .15s; padding-top: 3px; }
.lines tr:hover .line-tools, .lines tr.focused .line-tools { opacity: 1; }
.lines tfoot td { background: var(--surface-2); font-weight: 700; padding: 10px 8px; border-top: 2px solid var(--border-strong); }
.lines-actions { display: flex; gap: 8px; padding: 10px 12px; }
.totals { display: flex; flex-direction: column; }
.totals .t-row { display: flex; justify-content: space-between; padding: 9px 18px; font-size: 13.5px; border-bottom: 1px dashed var(--border); }
.totals .t-row:last-child { border-bottom: 0; }
.totals .t-row.grand { background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: 16px; border-bottom: 0; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.balance-ok { color: var(--success); }
.balance-bad { color: var(--danger); }
.dragging { opacity: .45; }
.drag-over td { box-shadow: inset 0 2px 0 var(--primary); }
.drag-handle { cursor: grab; color: var(--text-3); }

/* ------------------------------------------------------------------ reports */
.report-sheet { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.report-head { padding: 20px 24px 16px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.report-head .rt { font-size: 18px; font-weight: 700; }
.report-head .rs { color: var(--text-3); font-size: 13px; margin-top: 2px; }
.report-params { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; padding: 14px 18px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.report-params .field { min-width: 150px; }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.hub-card { display: flex; gap: 14px; padding: 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none !important; transition: border-color .15s, box-shadow .15s, transform .15s; }
.hub-card:hover { border-color: var(--primary-soft-2); box-shadow: var(--shadow); transform: translateY(-1px); }
.hub-card .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; flex-shrink: 0; }
.hub-card .t { font-weight: 700; }
.hub-card .d { color: var(--text-3); font-size: 12.5px; margin-top: 2px; }
.stmt-section td { background: var(--surface-2); font-weight: 700; color: var(--primary); }
.indent-1 { padding-inline-start: 30px !important; } .indent-2 { padding-inline-start: 48px !important; }
.check-ok { display: inline-flex; align-items: center; gap: 6px; color: var(--success); font-weight: 600; }
.check-bad { display: inline-flex; align-items: center; gap: 6px; color: var(--danger); font-weight: 600; }
.print-only { display: none; }

/* ------------------------------------------------------------------ charts */
.chart-box { position: relative; height: 290px; }
.chart-box.sm { height: 220px; }
.legend-list { display: flex; flex-direction: column; gap: 10px; }
.legend-item { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.legend-item .sw { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.legend-item .v { margin-inline-start: auto; font-weight: 600; }
.bar-list .bar-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; font-size: 13px; margin-bottom: 12px; }
.bar-list .bar-row .progress { grid-column: span 2; }
.quick { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.quick a { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px; border-radius: 14px; border: 1px dashed var(--border-strong); color: var(--text); font-weight: 600; font-size: 13px; text-align: center; background: var(--surface); text-decoration: none !important; transition: all .15s; }
.quick a:hover { border-style: solid; border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.quick a i { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 19px; background: var(--primary-soft); color: var(--primary); }
.list-item { display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none !important; }
.list-item:last-child { border-bottom: 0; }
.list-item:hover { background: var(--surface-2); }
.list-item .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; font-size: 16px; }

/* ------------------------------------------------------------------ auth */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr); background: var(--surface); }
.auth-brand {
  position: relative; overflow: hidden; color: #E9F5F2; padding: 56px; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(1200px 600px at 110% -10%, rgba(53, 194, 168, .35), transparent 60%), radial-gradient(900px 500px at -10% 110%, rgba(184, 134, 47, .22), transparent 60%), linear-gradient(160deg, #0A1C27 0%, #0C2A33 55%, #0A3B35 100%);
}
.auth-brand::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 44px 44px; mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent); pointer-events: none; }
.auth-brand > * { position: relative; z-index: 1; }
.auth-logo { display: flex; align-items: center; gap: 14px; }
.auth-logo .brand-mark { width: 48px; height: 48px; font-size: 19px; border-radius: 14px; }
.auth-logo .brand-mark i { font-size: 26px; }
.auth-logo .brand-name { font-size: 26px; }
.auth-hero h1 { font-size: 38px; line-height: 1.35; color: #fff; max-width: 560px; }
.auth-hero h1 span { color: #5DD6BF; }
.auth-hero p { margin-top: 14px; color: #A9C4C0; font-size: 15.5px; max-width: 520px; }
.auth-features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; max-width: 580px; margin-top: 36px; }
.auth-feature { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); }
.auth-feature i { font-size: 20px; color: #5DD6BF; margin-top: 2px; }
.auth-feature .t { font-weight: 600; color: #fff; font-size: 14px; }
.auth-feature .d { font-size: 12.5px; color: #9BB6B2; }
.auth-foot { font-size: 12.5px; color: #7F9D99; }
.auth-panel { display: grid; place-items: center; padding: 40px 24px; background: var(--bg); }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h2 { font-size: 26px; }
.auth-card .sub { color: var(--text-3); margin: 6px 0 28px; }
.auth-card .field { margin-bottom: 16px; }
.auth-card .input { height: 46px; font-size: 15px; border-radius: 11px; }
.auth-card .input-group > i { font-size: 17px; inset-inline-start: 14px; }
.auth-card .input-group .input { padding-inline-start: 42px; }
.auth-card .btn-primary { width: 100%; height: 48px; font-size: 15px; border-radius: 12px; }
.auth-row { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 22px; }
.pwd-toggle { position: absolute; inset-inline-end: 8px; border: 0; background: none; color: var(--text-3); cursor: pointer; padding: 8px; font-size: 17px; }
.choice-list { display: flex; flex-direction: column; gap: 10px; }
.choice { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--surface); cursor: pointer; transition: all .15s; color: var(--text); text-decoration: none !important; }
.choice:hover { border-color: var(--primary-soft-2); }
.choice.selected { border-color: var(--primary); background: var(--primary-soft); }
.choice input { accent-color: var(--primary); width: 18px; height: 18px; }
.choice .ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-3); color: var(--primary); font-size: 19px; flex-shrink: 0; }
.theme-float { position: fixed; top: 16px; inset-inline-end: 16px; z-index: 5; }

/* ------------------------------------------------------------------ reconnect */
#components-reconnect-modal { display: none; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1280px) {
  :root { --sidebar-w: 236px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc-layout { grid-template-columns: minmax(0, 1fr); }
  .doc-side { position: static; }
  .quick { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .app-shell, .app-shell.collapsed { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; width: var(--sidebar-w); transform: translateX(100%); transition: transform .25s var(--ease); box-shadow: var(--shadow-lg); }
  .app-shell.mobile-open .sidebar { transform: none; }
  .app-shell.collapsed .brand-text, .app-shell.collapsed .sb-link span, .app-shell.collapsed .sb-group-title span { display: initial; }
  .app-shell.collapsed .sb-link { justify-content: flex-start; padding: 9px 12px; }
  .sb-scrim { position: fixed; inset: 0; background: rgba(8, 18, 28, .45); z-index: 35; }
  .grid-main, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .auth-shell { grid-template-columns: minmax(0, 1fr); }
  .auth-brand { display: none; }
  .tb-search { display: none; }
}
@media (max-width: 760px) {
  .content { padding: 16px; }
  .grid-2, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .form-grid > [class*="col-"] { grid-column: span 12; }
  .page-title { font-size: 19px; }
  .user-meta, .ctx-chip.year { display: none; }
  .ctx-chip { max-width: 180px; }
  .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .table-toolbar .search { width: 100%; }
  .tree-row { grid-template-columns: minmax(0, 1fr) 120px; }
  .tree-row .hide-sm { display: none; }
  .modal-backdrop { padding: 0; align-items: end; }
  .modal { max-height: 92vh; border-radius: 16px 16px 0 0; }
}

/* ------------------------------------------------------------------ print */
@media print {
  @page { size: A4; margin: 12mm; }
  :root, [data-theme="dark"] { --bg: #fff; --surface: #fff; --surface-2: #f5f7f8; --surface-3: #eef1f3; --text: #000; --text-2: #222; --text-3: #555; --border: #cfd6dc; --border-strong: #9aa6b0; --primary: #0B6E5F; --primary-soft: #e8f2ef; }
  body { background: #fff; font-size: 11px; }
  .sidebar, .topbar, .no-print, .toast-stack, .page-actions, .table-toolbar, .pager, .report-params, .filters, .btn, .line-tools, .sb-scrim { display: none !important; }
  .app-shell { display: block; }
  .content { padding: 0; max-width: none; }
  .card, .report-sheet { border: 0; box-shadow: none; }
  .print-only { display: block; }
  .data-table th { position: static; background: #eef2f4 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .data-table td, .data-table th { padding: 5px 7px; }
  .data-table tr { page-break-inside: avoid; }
  .table-wrap { overflow: visible; }
  .doc-layout { display: block; }
  a { color: #000; text-decoration: none; }
}
