/* ============ Design system (shared by the tenant app and the platform admin) ============ */
/* A device with no Arabic font of its own still shows readable Arabic: a subset of DejaVu Sans is the last fallback (see fonts/README.txt) */
@font-face { font-family: "ERP Fallback"; src: url("fonts/erp-fallback-regular.woff") format("woff"); font-weight: 100 600; font-style: normal; font-display: swap; }
@font-face { font-family: "ERP Fallback"; src: url("fonts/erp-fallback-bold.woff") format("woff"); font-weight: 700 900; font-style: normal; font-display: swap; }
:root {
  --bg: #f3f5f9; --surface: #ffffff; --surface-2: #f8fafc; --surface-3: #eef2f7; --border: #e4e9f0; --border-strong: #cfd7e3;
  --text: #0f172a; --text-2: #475569; --text-3: #8492a6;
  --primary: #2563eb; --primary-600: #1d4ed8; --primary-50: #eff4ff; --primary-100: #dbe7fe; --on-primary: #fff;
  --success: #059669; --success-50: #e8f8f1; --warning: #c2710c; --warning-50: #fff6e5; --danger: #dc2626; --danger-50: #fdecec; --info: #0e7490; --info-50: #e6f6fa; --violet: #7c3aed; --violet-50: #f1ebfe;
  --sb-bg: #ffffff; --sb-bg-2: #f6f8fc; --sb-text: #475569; --sb-text-strong: #0f172a; --sb-active: #e9f0ff; --sb-active-text: #1d4ed8; --sb-hover: #f1f5f9; --sb-line: #e4e9f0; --sb-sec: #8a97ab; --sb-thumb: #b4c0d3; --sb-thumb-hover: #8696b1; --sb-av-bg: #e3ecff; --sb-av-text: #1d4ed8; --sb-w: 264px;
  --radius: 10px; --radius-sm: 7px; --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06); --shadow: 0 6px 22px rgba(15, 23, 42, .08); --shadow-lg: 0 24px 60px rgba(15, 23, 42, .28);
  --font: "Segoe UI", "Noto Sans Arabic", "Noto Sans", Tahoma, system-ui, -apple-system, "Helvetica Neue", Arial, "ERP Fallback", sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}
[data-theme=dark] {
  --bg: #0a111f; --surface: #101a2e; --surface-2: #0d1627; --surface-3: #16233b; --border: #1d2b46; --border-strong: #2b3b5c;
  --text: #e8eef9; --text-2: #a8b6cc; --text-3: #6f809c;
  --primary: #5b8cff; --primary-600: #7aa2ff; --primary-50: #14223f; --primary-100: #1b2f5a; --on-primary: #08122a;
  --success: #34d399; --success-50: #0d2a22; --warning: #fbbf24; --warning-50: #2e2410; --danger: #f87171; --danger-50: #321618; --info: #22d3ee; --info-50: #0c2a31; --violet: #a78bfa; --violet-50: #231c3d;
  --sb-bg: #070d19; --sb-bg-2: #0c1527; --sb-text: #b6c2d6; --sb-text-strong: #fff; --sb-active: rgba(91, 140, 255, .18); --sb-active-text: #fff; --sb-hover: rgba(255, 255, 255, .06); --sb-line: rgba(255, 255, 255, .08); --sb-sec: #7788a6; --sb-thumb: rgba(255, 255, 255, .24); --sb-thumb-hover: rgba(255, 255, 255, .42); --sb-av-bg: #1f3358; --sb-av-text: #fff;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4); --shadow: 0 6px 22px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font: 14px/1.5 var(--font); background: var(--bg); color: var(--text); overflow: hidden; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 650; }
h1 { font-size: 22px; } h2 { font-size: 17px; } h3 { font-size: 15px; } h4 { font-size: 13px; }
a { color: var(--primary); text-decoration: none; } a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
svg.ic { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
svg.ic.sm { width: 15px; height: 15px; } svg.ic.lg { width: 22px; height: 22px; } svg.ic.xl { width: 30px; height: 30px; }
[dir=rtl] .flip { transform: scaleX(-1); }
.num, .mono { font-variant-numeric: tabular-nums; } .mono { font-family: var(--mono); font-size: 12.5px; }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; border: 2px solid transparent; background-clip: content-box; } ::-webkit-scrollbar-thumb:hover { background: var(--text-3); background-clip: content-box; border: 2px solid transparent; } ::-webkit-scrollbar-track { background: transparent; }

/* ---------- app shell: TWO independent scroll areas (menu + page) ---------- */
.app { display: grid; grid-template-columns: var(--sb-w) minmax(0, 1fr); height: 100vh; height: 100dvh; overflow: hidden; }
.sidebar { background: var(--sb-bg); color: var(--sb-text); border-inline-end: 1px solid var(--sb-line); display: flex; flex-direction: column; min-height: 0; height: 100%; z-index: 40; }
.sb-brand { flex: none; display: flex; align-items: center; gap: 12px; padding: 18px 18px 14px; color: var(--sb-text-strong); }
.sb-logo { width: 38px; height: 38px; border-radius: 10px; background: linear-gradient(135deg, #3b82f6, #7c3aed); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 17px; flex: none; overflow: hidden; }
.sb-logo img { width: 100%; height: 100%; object-fit: cover; }
.sb-brand b { display: block; font-size: 14.5px; line-height: 1.2; } .sb-brand small { color: var(--sb-text); opacity: .75; font-size: 11.5px; }
.sb-nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 4px 12px 16px; overscroll-behavior: contain; }
/* a scrollbar you can see and grab: 12px wide track area, a 6px-plus rounded thumb that darkens on hover (the browser default for the old dark panel was a hairline) */
.sb-nav { scrollbar-width: auto; scrollbar-color: var(--sb-thumb) transparent; }
.sb-nav::-webkit-scrollbar { width: 14px; } .sb-nav::-webkit-scrollbar-track { background: transparent; } .sb-nav::-webkit-scrollbar-thumb { background: var(--sb-thumb); border: 3px solid transparent; background-clip: content-box; border-radius: 10px; min-height: 48px; } .sb-nav::-webkit-scrollbar-thumb:hover { background: var(--sb-thumb-hover); border-width: 2px; background-clip: content-box; }
.sb-sec { font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--sb-sec); padding: 16px 10px 6px; font-weight: 700; }
[dir=rtl] .sb-sec { letter-spacing: 0; font-size: 11.5px; }
.nav-i { display: flex; align-items: center; gap: 11px; padding: 9px 11px; margin: 1px 0; border-radius: 8px; color: var(--sb-text); font-weight: 500; font-size: 13.5px; cursor: pointer; text-decoration: none !important; position: relative; }
.nav-i:hover { background: var(--sb-hover); color: var(--sb-text-strong); }
.nav-i.on { background: var(--sb-active); color: var(--sb-active-text); font-weight: 650; }
.nav-i.on::before { content: ""; position: absolute; inset-inline-start: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--primary); }
[dir=rtl] .nav-i.on::before { border-radius: 3px 0 0 3px; }
.nav-i .ic { opacity: .9; } .nav-i .lock { margin-inline-start: auto; opacity: .55; width: 14px; height: 14px; }
.nav-i .cnt { margin-inline-start: auto; background: #ef4444; color: #fff; font-size: 11px; padding: 0 6px; border-radius: 10px; font-weight: 700; }
.sb-foot { flex: none; border-top: 1px solid var(--sb-line); padding: 12px 14px; display: flex; align-items: center; gap: 10px; color: var(--sb-text); }
.sb-foot .av { width: 34px; height: 34px; border-radius: 50%; background: var(--sb-av-bg); color: var(--sb-av-text); display: grid; place-items: center; font-weight: 700; flex: none; }
.sb-foot .who { min-width: 0; flex: 1; } .sb-foot .who b { display: block; color: var(--sb-text-strong); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .sb-foot .who small { font-size: 11.5px; opacity: .75; }
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; height: 100%; }
.topbar { flex: none; height: 58px; display: flex; align-items: center; gap: 10px; padding: 0 22px; background: var(--surface); border-bottom: 1px solid var(--border); z-index: 20; }
.topbar .ttl { font-size: 16px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .sp { flex: 1; }
.content { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 22px 26px 40px; scroll-behavior: auto; overscroll-behavior: contain; }
.page { max-width: 1500px; margin: 0 auto; }
.page-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-h .sp { flex: 1; } .page-h .sub { color: var(--text-2); font-size: 13px; margin-top: 2px; }
.btn.burger { display: none; }
.scrim { display: none; }
@media (max-width: 960px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; width: min(86vw, 300px); transform: translateX(-105%); transition: transform .22s ease; box-shadow: var(--shadow-lg); }
  [dir=rtl] .sidebar { transform: translateX(105%); }
  .app.nav-open .sidebar { transform: none; }
  .app.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(8, 15, 30, .5); z-index: 30; }
  .btn.burger { display: inline-flex; }
  .content { padding: 16px 14px 40px; } .topbar { padding: 0 12px; }
  .hide-sm { display: none !important; }
}

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-weight: 560; font-size: 13.5px; white-space: nowrap; transition: background .12s, border-color .12s, box-shadow .12s; text-decoration: none !important; user-select: none; }
.btn:hover { background: var(--surface-3); } .btn:active { transform: translateY(.5px); }
.btn[disabled], .btn.dis { opacity: .5; pointer-events: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); box-shadow: 0 1px 2px rgba(37, 99, 235, .3); } .btn-primary:hover { background: var(--primary-600); border-color: var(--primary-600); }
.btn-success { background: var(--success); border-color: var(--success); color: #fff; } .btn-success:hover { filter: brightness(.94); background: var(--success); }
.btn-danger { background: var(--danger-50); border-color: transparent; color: var(--danger); } .btn-danger:hover { background: var(--danger); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); } .btn-ghost:hover { background: var(--surface-3); color: var(--text); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; } .btn-lg { height: 46px; padding: 0 22px; font-size: 15px; border-radius: 10px; }
.btn-icon { width: 36px; padding: 0; } .btn-icon.btn-sm { width: 30px; }
.btn-block { width: 100%; }
.btn.loading { pointer-events: none; opacity: .75; } .btn.loading::after { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-inline-end-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.lbl { font-size: 12.5px; font-weight: 600; color: var(--text-2); display: flex; gap: 4px; align-items: center; } .lbl .req { color: var(--danger); } .hint { font-size: 11.5px; color: var(--text-3); }
.input, .select, .textarea { width: 100%; height: 37px; padding: 0 11px; border: 1px solid var(--border-strong); background: var(--surface); border-radius: 8px; transition: border-color .12s, box-shadow .12s; min-width: 0; }
.textarea { height: auto; padding: 8px 11px; resize: vertical; min-height: 70px; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238492a6' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: calc(100% - 11px) center; padding-inline-end: 30px; }
[dir=rtl] .select { background-position: 11px center; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-100); outline: none; }
.input[readonly] { background: var(--surface-2); } .input.sm, .select.sm { height: 30px; font-size: 13px; padding: 0 8px; border-radius: 7px; }
.input.err { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-50); }
/* date fields (ui.js wraps every <input type=date>: a text box in dd/mm/yyyy + the native input, invisible, laid over the calendar icon) */
.datefld { position: relative; display: inline-block; vertical-align: middle; min-width: 128px; max-width: 100%; }
.field .datefld, .fgrid .datefld, .row .field .datefld { display: block; }
.datefld .dtxt { padding-inline-end: 32px; direction: ltr; text-align: start; } [dir=rtl] .datefld .dtxt { text-align: right; }
.datefld .datepick { position: absolute; inset-inline-end: 0; top: 0; width: 32px; height: 100%; margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; font-size: 16px; }
.datefld .datepick:disabled { cursor: default; }
.datefld::after { content: ""; position: absolute; inset-inline-end: 9px; top: 50%; width: 15px; height: 15px; margin-top: -7.5px; background: var(--text-3); pointer-events: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E") center / contain no-repeat; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; } input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.input[dir=ltr], .ltr { direction: ltr; unicode-bidi: plaintext; } [dir=rtl] .input.ltr { text-align: right; }
.input-ic { position: relative; } .input-ic > .ic { position: absolute; inset-inline-start: 11px; top: 50%; margin-top: -9px; color: var(--text-3); pointer-events: none; } .input-ic > .input { padding-inline-start: 36px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13.5px; } .check input { width: 16px; height: 16px; accent-color: var(--primary); }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; } .switch input { display: none; } .switch i { width: 38px; height: 22px; border-radius: 20px; background: var(--border-strong); position: relative; transition: .15s; flex: none; } .switch i::after { content: ""; position: absolute; top: 2px; inset-inline-start: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .15s; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); } .switch input:checked + i { background: var(--primary); } .switch input:checked + i::after { inset-inline-start: 18px; }
.fgrid { display: grid; gap: 14px 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); } .fgrid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .fgrid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .span2 { grid-column: span 2; } .span-all { grid-column: 1 / -1; }
@media (max-width: 720px) { .fgrid, .fgrid.c3, .fgrid.c4 { grid-template-columns: minmax(0, 1fr); } .span2 { grid-column: auto; } }
.sect { font-size: 12px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; margin: 8px 0 -2px; display: flex; align-items: center; gap: 8px; } [dir=rtl] .sect { letter-spacing: 0; } .sect::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-h { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); flex-wrap: wrap; } .card-h h3 { flex: 1; } .card-b { padding: 18px; } .card-f { padding: 12px 18px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.grid { display: grid; gap: 16px; } .g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .g-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-main { grid-template-columns: minmax(0, 1fr); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } }
.row { display: flex; align-items: center; gap: 10px; } .row.wrap { flex-wrap: wrap; } .col { display: flex; flex-direction: column; gap: 10px; } .grow { flex: 1; min-width: 0; } .gap-s { gap: 6px; } .gap-l { gap: 18px; } .between { justify-content: space-between; } .end { justify-content: flex-end; } .center { justify-content: center; } .start { align-items: flex-start; }
.muted { color: var(--text-2); } .faint { color: var(--text-3); } .ta-end { text-align: end; } .ta-c { text-align: center; } .nowrap { white-space: nowrap; } .bold { font-weight: 650; } .sm { font-size: 12.5px; } .xs { font-size: 11.5px; } .lg { font-size: 16px; }
.pos { color: var(--success); } .neg { color: var(--danger); } .hide { display: none !important; } .w-full { width: 100%; } .mt { margin-top: 14px; } .mb { margin-bottom: 14px; } .ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.divider { height: 1px; background: var(--border); margin: 14px 0; }

/* KPI */
.kpi { padding: 16px 18px; display: flex; gap: 14px; align-items: flex-start; position: relative; overflow: hidden; }
.kpi .ico { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; flex: none; background: var(--primary-50); color: var(--primary); }
.kpi.s .ico { background: var(--success-50); color: var(--success); } .kpi.w .ico { background: var(--warning-50); color: var(--warning); } .kpi.d .ico { background: var(--danger-50); color: var(--danger); } .kpi.i .ico { background: var(--info-50); color: var(--info); } .kpi.v .ico { background: var(--violet-50); color: var(--violet); }
.kpi .v { font-size: 22px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; } .kpi .l { color: var(--text-2); font-size: 12.5px; margin-bottom: 3px; } .kpi .d { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.kpi .cur { font-size: 12px; font-weight: 600; color: var(--text-3); margin-inline-start: 4px; }

/* badges, chips, tabs */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 20px; font-size: 11.5px; font-weight: 650; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.b-ok { background: var(--success-50); color: var(--success); } .b-warn { background: var(--warning-50); color: var(--warning); } .b-bad { background: var(--danger-50); color: var(--danger); } .b-info { background: var(--info-50); color: var(--info); } .b-pri { background: var(--primary-50); color: var(--primary); } .b-vio { background: var(--violet-50); color: var(--violet); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; } .badge.nodot::before { display: none; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; } .tabs::-webkit-scrollbar { display: none; }
.tab { padding: 10px 15px; border: 0; background: none; color: var(--text-2); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font-size: 13.5px; } .tab:hover { color: var(--text); } .tab.on { color: var(--primary); border-color: var(--primary); }
.seg { display: inline-flex; background: var(--surface-3); border-radius: 9px; padding: 3px; gap: 2px; flex-wrap: wrap; } .seg button { border: 0; background: none; height: 30px; padding: 0 12px; border-radius: 7px; font-weight: 600; font-size: 13px; color: var(--text-2); } .seg button.on { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 20px; background: var(--surface); font-size: 13px; cursor: pointer; white-space: nowrap; color: var(--text-2); font-weight: 560; } .chip:hover { border-color: var(--primary); color: var(--primary); } .chip.on { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }

/* ---------- tables ---------- */
.tbl-wrap { overflow: auto; max-width: 100%; border-radius: inherit; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.tbl th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); text-align: start; font-weight: 650; font-size: 12px; color: var(--text-2); padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; user-select: none; }
.tbl th.sortable { cursor: pointer; } .tbl th.sortable:hover { color: var(--primary); } .tbl th .sa { opacity: .5; font-size: 10px; margin-inline-start: 3px; }
.tbl td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tbody tr:hover td { background: var(--surface-2); } .tbl tbody tr.click { cursor: pointer; } .tbl tr:last-child td { border-bottom: 0; }
.tbl .r, .tbl th.r { text-align: end; } .tbl .c, .tbl th.c { text-align: center; } .tbl .n { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl tfoot td { font-weight: 700; background: var(--surface-2); border-top: 2px solid var(--border-strong); border-bottom: 0; }
.tbl.compact td, .tbl.compact th { padding: 7px 10px; }
.tbl tr.grp td { background: var(--surface-2); font-weight: 700; } .tbl tr.sub td { color: var(--text-2); } .tbl tr.dim td { opacity: .55; }
.tbl td .in { min-width: 70px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--border); } .toolbar .sp { flex: 1; } .toolbar .input-ic { width: 240px; max-width: 100%; }
.empty { padding: 48px 20px; text-align: center; color: var(--text-3); } .empty .ic { width: 42px; height: 42px; opacity: .45; margin-bottom: 8px; } .empty b { display: block; color: var(--text-2); font-size: 15px; margin-bottom: 4px; }
.pager { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--border); color: var(--text-2); font-size: 13px; } .pager .sp { flex: 1; }
.skel { background: linear-gradient(90deg, var(--surface-3), var(--surface-2), var(--surface-3)); background-size: 200% 100%; animation: sh 1.2s infinite; border-radius: 8px; min-height: 18px; } @keyframes sh { to { background-position: -200% 0; } }
.spinner { width: 28px; height: 28px; border: 3px solid var(--border-strong); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; margin: 40px auto; }
.progress { height: 8px; border-radius: 8px; background: var(--surface-3); overflow: hidden; } .progress i { display: block; height: 100%; background: var(--primary); border-radius: 8px; transition: width .3s; } .progress.warn i { background: var(--warning); } .progress.bad i { background: var(--danger); }
.alert { display: flex; gap: 10px; padding: 11px 14px; border-radius: 9px; background: var(--info-50); color: var(--info); font-size: 13.5px; align-items: flex-start; } .alert.warn { background: var(--warning-50); color: var(--warning); } .alert.bad { background: var(--danger-50); color: var(--danger); } .alert.ok { background: var(--success-50); color: var(--success); } .alert > .ic { margin-top: 2px; } .alert a { color: inherit; text-decoration: underline; font-weight: 650; }
.stat-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; } .stat-row + .stat-row { border-top: 1px dashed var(--border); } .stat-row.big { font-size: 17px; font-weight: 700; border-top: 2px solid var(--border-strong); padding-top: 11px; margin-top: 4px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 13.5px; } .kv dt { color: var(--text-2); } .kv dd { margin: 0; font-weight: 560; min-width: 0; overflow-wrap: anywhere; }

/* ---------- overlays ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(8, 15, 30, .55); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px; overflow-y: auto; backdrop-filter: blur(2px); animation: fade .12s; }
.modal { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); width: 100%; max-width: 560px; display: flex; flex-direction: column; max-height: 90vh; animation: pop .14s ease-out; } .modal.lg { max-width: 860px; } .modal.xl { max-width: 1100px; } .modal.sm { max-width: 420px; }
.modal-h { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border); flex: none; } .modal-h h3 { flex: 1; font-size: 16px; }
.modal-b { padding: 20px; overflow-y: auto; min-height: 0; flex: 1 1 auto; } .modal-f { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; flex: none; background: var(--surface-2); border-radius: 0 0 14px 14px; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } } @keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.985); } }
.toasts { pointer-events: none; position: fixed; inset-block-end: 18px; inset-inline-end: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 36px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; background: var(--text); color: var(--bg); border-radius: 10px; box-shadow: var(--shadow-lg); font-size: 13.5px; animation: pop .16s; } .toast.ok .ic { color: #34d399; } .toast.bad .ic { color: #f87171; } .toast.warn .ic { color: #fbbf24; } .toast .ic { margin-top: 2px; }
.menu-wrap { position: relative; display: inline-block; } .menu { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); min-width: 190px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); padding: 5px; z-index: 60; display: none; } .menu.open { display: block; }
.menu a, .menu button { display: flex; width: 100%; align-items: center; gap: 9px; padding: 8px 10px; border: 0; background: none; border-radius: 7px; color: var(--text); text-align: start; font-size: 13.5px; cursor: pointer; text-decoration: none !important; } .menu a:hover, .menu button:hover { background: var(--surface-3); } .menu hr { border: 0; height: 1px; background: var(--border); margin: 5px 0; } .menu .danger { color: var(--danger); }
.pick { position: relative; } .pick-list { position: absolute; z-index: 50; inset-inline: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px; box-shadow: var(--shadow); max-height: 320px; overflow-y: auto; min-width: 320px; } .pick-list .it { padding: 8px 12px; display: flex; gap: 10px; align-items: center; cursor: pointer; border-bottom: 1px solid var(--border); } .pick-list .it:last-child { border-bottom: 0; } .pick-list .it:hover, .pick-list .it.act { background: var(--primary-50); } .pick-list .it .nm { flex: 1; min-width: 0; } .pick-list .it small { color: var(--text-3); display: block; }
.kbd { font: 11px var(--mono); border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; background: var(--surface-2); color: var(--text-2); }
.drop { border: 2px dashed var(--border-strong); border-radius: 12px; padding: 30px 20px; text-align: center; color: var(--text-2); cursor: pointer; transition: .15s; background: var(--surface-2); } .drop:hover, .drop.over { border-color: var(--primary); background: var(--primary-50); color: var(--primary); }
.steps { display: flex; gap: 8px; margin-bottom: 18px; } .steps .st { flex: 1; display: flex; gap: 9px; align-items: center; padding: 9px 12px; border-radius: 9px; background: var(--surface-3); color: var(--text-3); font-weight: 600; font-size: 13px; } .steps .st i { width: 22px; height: 22px; border-radius: 50%; background: var(--border-strong); color: #fff; display: grid; place-items: center; font-style: normal; font-size: 12px; flex: none; } .steps .st.on { background: var(--primary-50); color: var(--primary); } .steps .st.on i { background: var(--primary); } .steps .st.done i { background: var(--success); }

/* ---------- charts ---------- */
.chart { width: 100%; height: auto; display: block; overflow: visible; } .chart text { font: 11px var(--font); fill: var(--text-3); } .chart .grid { stroke: var(--border); stroke-width: 1; } .chart .ln { fill: none; stroke: var(--primary); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; } .chart .ar { fill: url(#gArea); } .chart .bar { fill: var(--primary); } .chart .bar:hover { fill: var(--primary-600); } .chart .dot { fill: var(--surface); stroke: var(--primary); stroke-width: 2; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); } .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 6px; }

/* ---------- auth ---------- */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: var(--surface); overflow-y: auto; height: 100vh; }
.auth-art { background: radial-gradient(1200px 600px at 10% -10%, #3b5bdb 0%, transparent 60%), radial-gradient(900px 500px at 100% 110%, #7c3aed 0%, transparent 55%), #0f1a30; color: #fff; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-art h1 { font-size: 34px; line-height: 1.25; margin: 28px 0 14px; } .auth-art p { color: #c7d2ea; font-size: 15.5px; max-width: 460px; } .auth-art ul { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; } .auth-art li { display: flex; gap: 12px; align-items: flex-start; color: #e0e8f8; } .auth-art li .ic { background: rgba(255, 255, 255, .12); border-radius: 8px; padding: 6px; width: 30px; height: 30px; flex: none; }
.auth-box { display: flex; flex-direction: column; justify-content: center; padding: 40px 48px; max-width: 540px; width: 100%; margin: 0 auto; }
.auth-box h2 { font-size: 24px; margin-bottom: 6px; } .auth-top { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 18px; }
@media (max-width: 900px) { .auth { grid-template-columns: minmax(0, 1fr); } .auth-art { display: none; } .auth-box { padding: 24px 20px; } }
.otp { display: flex; gap: 8px; direction: ltr; justify-content: center; } .otp input { width: 46px; height: 54px; text-align: center; font-size: 22px; font-weight: 700; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); } .otp input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-100); outline: none; }

/* ---------- chart of accounts tree ---------- */
.tg { width: 22px; height: 22px; border: 0; background: none; border-radius: 6px; color: var(--text-3); display: inline-grid; place-items: center; padding: 0; cursor: pointer; flex: none; } .tg:hover { background: var(--surface-3); color: var(--text); } .tg .ic { transition: transform .12s; } .tg.open .ic { transform: rotate(90deg); } [dir=rtl] .tg:not(.open) .ic { transform: scaleX(-1); }
.row-acts { display: flex; gap: 2px; justify-content: flex-end; } .coa td.nm { white-space: nowrap; }
.coa tr.g td { font-weight: 650; background: var(--surface-2); }

/* ---------- POS ---------- */
.pos-app { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 14px; height: calc(100vh - 58px - 28px); height: calc(100dvh - 58px - 28px); min-height: 520px; }
.pos-l, .pos-r { min-height: 0; display: flex; flex-direction: column; gap: 12px; } .pos-r { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-sm); overflow: hidden; }
.pos-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .pos-bar .scan { flex: 1; min-width: 220px; position: relative; } .pos-bar .scan .input { height: 46px; font-size: 16px; padding-inline-start: 44px; padding-inline-end: 52px; border-width: 2px; border-color: var(--primary-100); font-family: var(--mono); letter-spacing: .04em; } .pos-bar .scan .input:focus { border-color: var(--primary); } .pos-bar .scan > .ic { position: absolute; inset-inline-start: 13px; top: 12px; color: var(--primary); width: 22px; height: 22px; } .pos-bar .scan .cam { position: absolute; inset-inline-end: 6px; top: 6px; }
.cats { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; flex: none; }
.pgrid { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; align-content: start; padding: 2px 4px 10px 2px; }
.pcard { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px; text-align: start; display: flex; flex-direction: column; gap: 6px; min-height: 96px; transition: .12s; position: relative; } .pcard:hover { border-color: var(--primary); box-shadow: 0 4px 14px rgba(37, 99, 235, .15); transform: translateY(-1px); } .pcard .nm { font-weight: 600; font-size: 13.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } .pcard .pr { margin-top: auto; font-weight: 750; color: var(--primary); font-variant-numeric: tabular-nums; } .pcard .st { position: absolute; inset-inline-end: 8px; top: 8px; } .pcard.out { opacity: .45; } .pcard .sku { font: 11px var(--mono); color: var(--text-3); }
.cart { flex: 1; min-height: 0; overflow-y: auto; } .cart-empty { height: 100%; display: grid; place-items: center; color: var(--text-3); text-align: center; padding: 20px; }
.cl { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); } .cl:hover { background: var(--surface-2); } .cl .nm { font-weight: 600; font-size: 13.5px; } .cl .sub { font-size: 12px; color: var(--text-3); } .cl .tot { font-weight: 700; text-align: end; font-variant-numeric: tabular-nums; }
.qty { direction: ltr; display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: 8px; overflow: hidden; background: var(--surface); } .qty button { width: 28px; height: 28px; border: 0; background: var(--surface-2); font-size: 16px; line-height: 1; color: var(--text-2); } .qty button:hover { background: var(--primary-50); color: var(--primary); } .qty input { width: 52px; height: 28px; text-align: center; border: 0; background: none; font-weight: 650; -moz-appearance: textfield; } .qty input::-webkit-inner-spin-button { display: none; }
.pos-tot { border-top: 1px solid var(--border); padding: 12px 14px; background: var(--surface-2); flex: none; } .pos-tot .big { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; }
.keypad { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; } .keypad button { height: 44px; border-radius: 9px; border: 1px solid var(--border-strong); background: var(--surface); font-weight: 650; font-size: 15px; } .keypad button:hover { background: var(--primary-50); border-color: var(--primary); }
.pm { display: flex; gap: 8px; flex-wrap: wrap; } .pm button { flex: 1; min-width: 88px; height: 42px; border-radius: 9px; border: 1px solid var(--border-strong); background: var(--surface); font-weight: 650; display: inline-flex; gap: 6px; align-items: center; justify-content: center; } .pm button.on { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
@media (max-width: 1100px) { .pos-app { grid-template-columns: minmax(0, 1fr); height: auto; } .pos-r { min-height: 460px; } .pgrid { max-height: 52vh; } }
.scanner-view { position: relative; background: #000; border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; } .scanner-view video { width: 100%; height: 100%; object-fit: cover; } .scanner-view .lazer { position: absolute; inset-inline: 12%; top: 50%; height: 2px; background: #ef4444; box-shadow: 0 0 10px #ef4444; animation: lz 1.6s ease-in-out infinite alternate; } @keyframes lz { from { top: 30%; } to { top: 70%; } }

/* ---------- documents (print) ---------- */
#print-root { display: none; }
.doc { font: 12.5px/1.45 var(--font); color: #111; background: #fff; direction: rtl; overflow-wrap: anywhere; } .doc td.n, .doc .ltr { overflow-wrap: normal; } .doc[dir=ltr] { direction: ltr; }
.doc-wrap { background: #fff; color: #111; border-radius: 12px; box-shadow: var(--shadow); padding: 34px 38px; max-width: 900px; margin: 0 auto; border: 1px solid var(--border); }
.doc h1 { font-size: 20px; } .doc .dh { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; border-bottom: 3px solid #111; padding-bottom: 12px; margin-bottom: 14px; } .doc .dh .lg { max-height: 70px; max-width: 160px; object-fit: contain; } .doc .ttl { text-align: center; } .doc .ttl b { display: block; font-size: 19px; } .doc .ttl span { font-size: 13px; color: #444; }
.doc .two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; } .doc .box { border: 1px solid #bbb; border-radius: 6px; padding: 9px 12px; } .doc .box h5 { margin: 0 0 5px; font-size: 11.5px; color: #555; text-transform: uppercase; letter-spacing: .04em; } .doc .box div { display: flex; gap: 6px; justify-content: space-between; } .doc .box div span:first-child { color: #555; flex: none; }
.doc table { width: 100%; border-collapse: collapse; margin-bottom: 12px; } .doc th, .doc td { border: 1px solid #bbb; padding: 5px 7px; font-size: 12px; } .doc th { background: #eee; text-align: center; font-size: 11.5px; } .doc td.n { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; } .doc td.c { text-align: center; }
.doc .tot { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; } .doc .tot table { width: 320px; } .doc .tot .grand td { font-weight: 800; font-size: 13.5px; background: #f3f3f3; } .doc .qrb { text-align: center; } .doc .qrb svg { width: 128px; height: 128px; } .doc .qrb small { display: block; color: #666; font-size: 10px; }
.doc .foot { text-align: center; color: #555; border-top: 1px solid #ccc; padding-top: 8px; margin-top: 8px; font-size: 11.5px; }
.doc.th { width: 100%; max-width: 72mm; box-sizing: border-box; margin-inline: auto; font-size: 11.5px; padding: 1mm 0; overflow-wrap: anywhere; word-break: normal; } .doc.th .dh { display: block; text-align: center; border-bottom: 1px dashed #000; border-width: 0 0 1px; } .doc.th .dh .lg { max-width: 100%; } .doc.th table { width: 100%; table-layout: auto; } .doc.th table th, .doc.th table td { border: 0; border-bottom: 1px dashed #aaa; padding: 3px 2px; overflow-wrap: anywhere; } .doc.th td.n { white-space: nowrap; overflow-wrap: normal; } .doc.th .two { display: block; } .doc.th .box { border: 0; padding: 0 0 6px; } .doc.th .box div span:last-child { min-width: 0; text-align: end; } .doc.th .tot { display: block; } .doc.th .tot table { width: 100%; } .doc.th .qrb { text-align: center; margin-bottom: 4px; } .doc.th .qrb svg { max-width: 100%; height: auto; } .doc.th .foot { padding-top: 6px; } .doc.th tr, .doc.th .tot, .doc.th .qrb { break-inside: avoid; }
.stamp { display: inline-block; border: 2px solid; border-radius: 6px; padding: 1px 10px; font-weight: 800; letter-spacing: .06em; transform: rotate(-6deg); font-size: 13px; }

@media print {
  body { overflow: visible !important; background: #fff !important; height: auto; }
  .app, .auth, .modal-bg, .toasts, .scrim { display: none !important; }
  #print-root { display: block !important; } #print-root .doc { margin: 0 auto; }
  .doc-wrap { box-shadow: none; border: 0; padding: 0; max-width: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* compact numeric inputs: no spinner chrome, always enough room for the value */
.input.sm.num[type=number] { -moz-appearance: textfield; appearance: textfield; min-width: 64px; text-align: end; padding-inline: 8px; direction: ltr; }
.input.sm.num[type=number]::-webkit-inner-spin-button, .input.sm.num[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* form sections, dimmed (inactive) rows */
.sec-t { font-size: 12px; font-weight: 700; letter-spacing: .02em; color: var(--text-2); text-transform: uppercase; padding-bottom: 8px; margin-bottom: 12px; border-bottom: 1px solid var(--border); }
.tbl tr.dim td { opacity: .62; }

/* barcode labels (screen preview + print) */
.bls { display: flex; flex-wrap: wrap; background: #fff; color: #000; }
.bls.sheet { display: grid; width: fit-content; }
.bl { box-sizing: border-box; width: var(--lw, 50mm); height: var(--lh, 30mm); padding: 1.2mm 1.6mm; display: flex; flex-direction: column; align-items: center; justify-content: space-between; overflow: hidden; break-inside: avoid; page-break-inside: avoid; font: 9px/1.15 var(--font); outline: 1px dashed #c9c9c9; outline-offset: -1px; }
.bl .bl-n { font-weight: 700; text-align: center; max-height: 2.35em; overflow: hidden; width: 100%; }
.bl .bl-b { flex: 1 1 0; min-height: 0; width: 100%; display: flex; align-items: center; justify-content: center; }
.bl .bl-b svg { max-width: 100%; max-height: 100%; width: auto; height: 100%; }
.bl .bl-p { font-weight: 800; font-size: 11px; direction: ltr; }
.bl .bl-s { font: 8px/1 var(--mono); color: #333; direction: ltr; }
@media print { .bl { outline: 0; } .bls.roll .bl { page-break-after: always; break-after: page; } .bls.roll .bl:last-child { page-break-after: auto; break-after: auto; } #print-root .bls { background: #fff; } }
.bc-prev { min-height: 64px; display: flex; align-items: center; justify-content: center; border: 1px dashed var(--border-strong); border-radius: 9px; background: #fff; padding: 6px; }
.bc-prev svg { max-width: 100%; height: 64px; width: auto; }

/* financial statements & general ledger */
.stm td { padding-top: 8px; padding-bottom: 8px; } .stm tr.subt td { border-top: 1px solid var(--border-strong); background: var(--surface-2); } .stm tr.hl td { background: var(--primary-50); border-top: 2px solid var(--border-strong); font-size: 14.5px; } .stm tr.hl.big td { font-size: 16px; }
.gl-blk { border-bottom: 1px solid var(--border); } .gl-h { display: flex; align-items: center; gap: 10px; padding: 10px 16px; cursor: pointer; background: var(--surface-2); } .gl-h:hover { background: var(--surface-3); } .gl-h .sp { flex: 1; }
.tbl th.c { text-align: center; } .tbl thead tr + tr th { border-top: 0; }

/* support threads, plan cards */
.msg { display: flex; flex-direction: column; gap: 5px; max-width: 78%; } .msg.me { align-self: flex-start; } .msg.admin { align-self: flex-end; }
.msg .who { display: flex; align-items: baseline; gap: 10px; font-size: 12.5px; }
.msg .bub { padding: 11px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); line-height: 1.7; font-size: 14px; }
.msg.admin .bub { background: var(--primary-50); border-color: var(--primary-100); }
.msg.admin .who { justify-content: flex-end; }
.dot-unread { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); margin-inline-end: 8px; vertical-align: middle; }
.plans .plan { transition: box-shadow .15s, border-color .15s; } .plans .plan:hover { box-shadow: var(--shadow-md, 0 6px 18px rgba(0, 0, 0, .08)); }
.plans .plan.cur { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; }

.card-h:has(> .tabs:only-child) { padding: 0 14px; } .card-h > .tabs:only-child { margin: 0; border-bottom: 0; flex: 1; }
.progress.ok i { background: var(--success); }
.grid.plans { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); } .kv.rl dt { color: var(--text); font-weight: 650; } .kv.rl dd { font-weight: 400; color: var(--text-2); }
.warn-t { color: var(--warning); } .pos-t { color: var(--success); }
.dot-live { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--success); margin-inline-end: 8px; box-shadow: 0 0 0 0 rgba(5, 150, 105, .5); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(5, 150, 105, 0); } 100% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); } }
body.admin .sb-logo { background: linear-gradient(135deg, #7c3aed, #2563eb); }

/* code samples (API key page, docs snippets) */
pre.code { background: var(--surface-3); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; text-align: left; }

/* offline mode: pages that need the server are dimmed in the menu while there is no line */
.off-down .nav-i[data-off="0"] { opacity: .45; }
#off-bar:empty { display: none; }
