/* Centel Complete ERP — "modern glass" theme for the staff console, login, captive portal, self-care and job pages.
   Light and dark themes: <html data-theme="dark"> switches every colour below. No external fonts or images. */
:root {
  --brand: #1a63e0; --brand-2: #0aa2ff; --brand-ink: #ffffff; --brand-soft: rgba(26, 99, 224, .12); --navy: #0d2463;
  --grad: linear-gradient(135deg, #1a63e0 0%, #0aa2ff 100%);
  --bg: #eef3fb; --bg-2: #e6eefb;
  --panel: rgba(255, 255, 255, .74); --panel-solid: #ffffff; --panel-2: rgba(255, 255, 255, .55);
  --ink: #0f1d36; --muted: #61708a; --line: rgba(15, 35, 75, .09); --line-strong: rgba(15, 35, 75, .16);
  --hover: rgba(26, 99, 224, .05);
  --side: linear-gradient(180deg, #0b1b47 0%, #0d2463 55%, #0f2f7d 100%); --side-ink: #c4d3f3; --side-muted: #7f98cf; --side-top: #0b1b47;
  --ok: #0f9d58; --ok-soft: rgba(15, 157, 88, .12); --warn: #c27a00; --warn-soft: rgba(242, 160, 32, .16);
  --bad: #d93a2e; --bad-soft: rgba(217, 58, 46, .12); --info: #5145cd; --info-soft: rgba(81, 69, 205, .12);
  --radius: 14px; --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 30, 54, .05), 0 8px 24px rgba(16, 30, 54, .06);
  --shadow-lg: 0 24px 64px rgba(10, 25, 60, .22);
  --glass: blur(16px) saturate(160%);
  --input: rgba(255, 255, 255, .9);
  --chart-grid: rgba(15, 35, 75, .10); --chart-text: #61708a;
  --blob-1: rgba(26, 99, 224, .20); --blob-2: rgba(10, 162, 255, .16); --blob-3: rgba(81, 69, 205, .10);
  color-scheme: light;
  font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif;
  font-size: 14px; color: var(--ink);
}
html[data-theme="dark"] {
  --brand: #3b82f6; --brand-2: #22c3ff; --brand-soft: rgba(59, 130, 246, .18); --grad: linear-gradient(135deg, #2f6ff0 0%, #18b4ff 100%);
  --bg: #070d1c; --bg-2: #0a1428;
  --panel: rgba(17, 27, 50, .72); --panel-solid: #111b32; --panel-2: rgba(23, 35, 63, .6);
  --ink: #e7edf8; --muted: #93a2bd; --line: rgba(255, 255, 255, .08); --line-strong: rgba(255, 255, 255, .16);
  --hover: rgba(255, 255, 255, .04);
  --side: linear-gradient(180deg, #060b19 0%, #08122b 100%); --side-ink: #b7c6e6; --side-muted: #6d82b3; --side-top: #060b19;
  --ok: #34d399; --ok-soft: rgba(52, 211, 153, .14); --warn: #fbbf24; --warn-soft: rgba(251, 191, 36, .14);
  --bad: #f87171; --bad-soft: rgba(248, 113, 113, .14); --info: #a5b4fc; --info-soft: rgba(165, 180, 252, .14);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 28px rgba(0, 0, 0, .28); --shadow-lg: 0 24px 64px rgba(0, 0, 0, .55);
  --input: rgba(8, 15, 32, .65);
  --chart-grid: rgba(255, 255, 255, .08); --chart-text: #93a2bd;
  --blob-1: rgba(47, 111, 240, .22); --blob-2: rgba(24, 180, 255, .12); --blob-3: rgba(129, 92, 246, .14);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0; color: var(--ink); line-height: 1.45; -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(900px 520px at 8% -8%, var(--blob-1), transparent 60%),
    radial-gradient(800px 500px at 100% 0%, var(--blob-2), transparent 60%),
    radial-gradient(700px 600px at 60% 110%, var(--blob-3), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  background-attachment: fixed;
}
a { color: var(--brand); text-decoration: none; } a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1 { font-size: 20px; margin: 0; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 15px; margin: 0 0 12px; font-weight: 650; }
h3 { font-size: 12px; margin: 0 0 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 650; }
code, .mono { font-family: "Cascadia Mono", ui-monospace, Consolas, monospace; }
::selection { background: var(--brand-soft); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }

/* ------------------------------------------------------------------ layout */
.shell { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.side {
  background: var(--side); color: var(--side-ink); padding: 18px 12px 24px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, .06); z-index: 30;
}
.brand { display: flex; align-items: center; gap: 11px; color: #fff; font-weight: 750; font-size: 16px; padding: 4px 8px 18px; letter-spacing: -.01em; }
.brand .logo { width: 40px; height: 40px; border-radius: 12px; background: #fff; display: grid; place-items: center; padding: 4px; flex: none;
  box-shadow: 0 6px 18px rgba(10, 162, 255, .35); }
.brand .logo img { width: 100%; height: 100%; object-fit: contain; }
.brand small { display: block; font-size: 10px; font-weight: 650; letter-spacing: .16em; color: #7fb4ff; text-transform: uppercase; }
.side { display: flex; flex-direction: column; }
.side nav { flex: 1; }
/* sidebar: page finder */
.nav-find { position: sticky; top: -18px; z-index: 2; margin: 0 -12px 6px; padding: 6px 12px 8px; background: var(--side-top); }
.side a[hidden], .nav-sec[hidden] { display: none; }
.nav-find input { width: 100%; height: 36px; padding: 0 12px 0 34px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .06) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%237f98cf' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 3.5 3.5'/%3E%3C/svg%3E") no-repeat 11px 50%;
  color: #fff; font-size: 13px; transition: background-color .15s, border-color .15s; }
.nav-find input::placeholder { color: var(--side-muted); }
.nav-find input:focus { outline: none; border-color: rgba(10, 162, 255, .65); background-color: rgba(255, 255, 255, .10); box-shadow: 0 0 0 3px rgba(10, 162, 255, .18); }
.nav-empty { padding: 10px 12px; font-size: 12.5px; color: var(--side-muted); }
/* sidebar: collapsible groups */
.nav-sec { margin: 2px 0; border-radius: 12px; transition: background .2s; }
.nav-sec.open { background: rgba(255, 255, 255, .035); }
.nav-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 12px; background: none;
  color: var(--side-ink); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; text-align: left; transition: background .15s, color .15s; }
.nav-head:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-head .gi { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; background: rgba(255, 255, 255, .07); font-size: 14px; flex: none;
  transition: background .2s, box-shadow .2s; }
.nav-sec.has-active .nav-head { color: #fff; }
.nav-sec.has-active .gi { background: var(--grad); box-shadow: 0 4px 14px rgba(26, 99, 224, .45); }
.nav-head .gl { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-head .gc { font-size: 10.5px; font-weight: 700; color: var(--side-muted); background: rgba(255, 255, 255, .06); border-radius: 999px; padding: 1px 7px; }
.nav-head .chev { width: 8px; height: 8px; border-right: 2px solid var(--side-muted); border-bottom: 2px solid var(--side-muted); transform: rotate(-45deg);
  transition: transform .2s ease; margin: 0 4px 0 2px; }
.nav-sec.open .chev, #nav.finding .chev { transform: rotate(45deg); }
.nav-items { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .22s ease; }
.nav-sec.open .nav-items, #nav.finding .nav-items { grid-template-rows: 1fr; }
.nav-items > div { overflow: hidden; padding-left: 22px; position: relative; }
.nav-items > div::before { content: ""; position: absolute; left: 23px; top: 4px; bottom: 8px; width: 1px; background: rgba(255, 255, 255, .10); }
.nav-sec.open .nav-items > div, #nav.finding .nav-items > div { padding-bottom: 6px; }
.side a { display: flex; align-items: center; gap: 10px; color: var(--side-ink); padding: 7px 10px 7px 14px; border-radius: 9px; margin: 1px 0;
  transition: background .15s, color .15s, transform .15s; text-decoration: none; font-size: 13.2px; position: relative; }
.side a:hover { background: rgba(255, 255, 255, .07); color: #fff; transform: translateX(2px); }
.side a.active { background: var(--grad); color: #fff; font-weight: 600; box-shadow: 0 6px 18px rgba(26, 99, 224, .45); }
.side .ico { width: 18px; text-align: center; opacity: .9; font-size: 14px; }
.side .lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot { display: flex; align-items: center; gap: 8px; margin: 14px 8px 0; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .08);
  font-size: 11.5px; color: var(--side-muted); }
.side-foot .dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .2); }
/* topbar breadcrumb */
.ttl { display: flex; flex-direction: column; min-width: 0; }
.ttl h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumb { font-size: 11px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); line-height: 1.2; }
.crumb:empty { display: none; }
@media (prefers-reduced-motion: reduce) { .nav-items, .chev, .side a, .nav-sec { transition: none !important; } }
.side-backdrop { display: none; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 24px;
  background: var(--panel); backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20;
}
.topbar .who { color: var(--muted); display: flex; gap: 10px; align-items: center; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: 13px; box-shadow: 0 4px 12px rgba(26, 99, 224, .35); flex: none; }
.who-name { display: flex; flex-direction: column; line-height: 1.2; } .who-name b { color: var(--ink); font-weight: 600; } .who-name small { font-size: 11.5px; }
.icon-btn { width: 34px; height: 34px; padding: 0; display: inline-grid; place-items: center; border-radius: 10px; font-size: 16px; }
.view { padding: 22px 24px 56px; max-width: 1480px; width: 100%; animation: rise .28s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.grid { display: grid; gap: 16px; }
.g4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.g2 { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); }

/* ------------------------------------------------------------------ cards */
.card {
  background: var(--panel); backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; min-width: 0;
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
a.card { color: inherit; text-decoration: none; } a.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat { position: relative; overflow: hidden; padding: 16px 18px 16px 20px; }
.stat::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--accent, var(--grad)); }
.stat::after { content: ""; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle, var(--accent-soft, rgba(26, 99, 224, .14)), transparent 70%); pointer-events: none; }
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.grid > .stat:nth-child(6n+1) { --accent: linear-gradient(180deg, #1a63e0, #0aa2ff); --accent-soft: rgba(26, 99, 224, .16); }
.grid > .stat:nth-child(6n+2) { --accent: linear-gradient(180deg, #0f9d58, #34d399); --accent-soft: rgba(15, 157, 88, .16); }
.grid > .stat:nth-child(6n+3) { --accent: linear-gradient(180deg, #7c3aed, #a78bfa); --accent-soft: rgba(124, 58, 237, .14); }
.grid > .stat:nth-child(6n+4) { --accent: linear-gradient(180deg, #f59e0b, #fbbf24); --accent-soft: rgba(245, 158, 11, .16); }
.grid > .stat:nth-child(6n+5) { --accent: linear-gradient(180deg, #e11d48, #fb7185); --accent-soft: rgba(225, 29, 72, .13); }
.grid > .stat:nth-child(6n+6) { --accent: linear-gradient(180deg, #0891b2, #22d3ee); --accent-soft: rgba(8, 145, 178, .15); }
.stat .label { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .02em; }
.stat .value { font-size: 26px; font-weight: 750; margin-top: 6px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat .sub { color: var(--muted); font-size: 12px; margin-top: 4px; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 8px 14px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }

/* welcome banner on Home */
.hero {
  position: relative; overflow: hidden; border-radius: 18px; padding: 22px 24px; color: #fff; margin-bottom: 18px;
  background: radial-gradient(600px 200px at 85% -20%, rgba(255, 255, 255, .25), transparent 60%), linear-gradient(120deg, #0d2463 0%, #1a63e0 55%, #0aa2ff 100%);
  box-shadow: 0 16px 40px rgba(26, 99, 224, .30);
}
.hero h1 { font-size: 22px; color: #fff; } .hero p { margin: 6px 0 0; opacity: .88; }
.hero .hero-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.hero .chip { background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .25); padding: 5px 11px; border-radius: 999px; font-size: 12.5px; color: #fff; }
.hero::after { content: ""; position: absolute; right: -60px; bottom: -80px; width: 260px; height: 260px; border-radius: 50%;
  border: 36px solid rgba(255, 255, 255, .08); }

/* ------------------------------------------------------------------ controls */
.btn {
  border: 1px solid var(--line-strong); background: var(--panel-solid); color: var(--ink); border-radius: var(--radius-sm); padding: 8px 14px;
  cursor: pointer; font: inherit; font-weight: 550; white-space: nowrap; transition: transform .12s, box-shadow .15s, background .15s, border-color .15s;
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
}
.btn:hover { border-color: var(--brand); box-shadow: 0 4px 14px rgba(26, 99, 224, .14); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--grad); border-color: transparent; color: var(--brand-ink); box-shadow: 0 6px 16px rgba(26, 99, 224, .32); }
.btn.primary:hover { filter: brightness(1.07); box-shadow: 0 10px 24px rgba(26, 99, 224, .4); }
.btn.danger { color: var(--bad); } .btn.danger:hover { border-color: var(--bad); box-shadow: 0 4px 14px rgba(217, 58, 46, .16); }
.btn.sm { padding: 5px 10px; font-size: 12.5px; border-radius: 8px; }
.btn:disabled { opacity: .55; cursor: default; transform: none; box-shadow: none; }
input, select, textarea {
  font: inherit; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 9px 12px; background: var(--input); color: var(--ink);
  width: 100%; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
input:disabled, select:disabled { opacity: .7; }
textarea { min-height: 96px; resize: vertical; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.filters input, .filters select { width: auto; min-width: 170px; }
label.field { display: block; margin-bottom: 13px; }
label.field span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; font-weight: 600; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid .wide { grid-column: 1 / -1; }
.check { display: flex; gap: 8px; align-items: center; } .check input { width: auto; }

/* ------------------------------------------------------------------ tables */
.table-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th { text-align: left; font-size: 11.5px; color: var(--muted); font-weight: 650; padding: 9px 10px; border-bottom: 1px solid var(--line-strong);
  white-space: nowrap; text-transform: uppercase; letter-spacing: .05em; position: sticky; top: 0; background: var(--panel-solid); z-index: 1; }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .12s; } tbody tr:hover { background: var(--hover); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.empty { color: var(--muted); text-align: center; padding: 34px 16px; }
.empty::before { content: "∅"; display: block; font-size: 26px; opacity: .35; margin-bottom: 4px; }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; color: var(--muted); }

/* ------------------------------------------------------------------ badges, tabs */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 650;
  background: var(--hover); color: var(--muted); border: 1px solid var(--line); text-transform: capitalize; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.b-ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.b-warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.b-bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.b-info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.tabs { display: flex; gap: 4px; margin-bottom: 18px; padding: 4px; background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 12px; overflow-x: auto; width: fit-content; max-width: 100%; backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass); }
.tabs button { background: none; border: 0; padding: 8px 14px; cursor: pointer; font: inherit; color: var(--muted); border-radius: 9px; white-space: nowrap; font-weight: 550;
  transition: background .15s, color .15s; }
.tabs button:hover { color: var(--ink); }
.tabs button.on { color: #fff; background: var(--grad); box-shadow: 0 4px 12px rgba(26, 99, 224, .3); }

/* ------------------------------------------------------------------ modal + toast */
.modal-bg { position: fixed; inset: 0; background: rgba(5, 12, 28, .5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: grid; place-items: center; z-index: 50; padding: 16px; animation: fade .15s ease-out; }
.modal { background: var(--panel-solid); border: 1px solid var(--line); border-radius: 18px; width: min(640px, 100%); max-height: 90vh; overflow: auto;
  box-shadow: var(--shadow-lg); animation: pop .2s cubic-bezier(.2, .9, .3, 1.2); }
.modal header { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 10px;
  position: sticky; top: 0; background: var(--panel-solid); z-index: 2; }
.modal .body { padding: 18px 20px; }
.modal footer { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; position: sticky; bottom: 0; background: var(--panel-solid); }
@keyframes fade { from { opacity: 0; } } @keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 60; }
.toast { background: #0f1d36; color: #fff; padding: 11px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); max-width: 400px; animation: pop .2s ease-out;
  border-left: 4px solid var(--brand-2); }
.toast.err { background: #7f1d1d; border-left-color: #fca5a5; }
.note { background: var(--info-soft); color: var(--ink); border: 1px solid var(--line); border-left: 4px solid var(--info); border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-bottom: 12px; }
.muted { color: var(--muted); }
.codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.codes div { border: 1px dashed var(--line-strong); border-radius: 10px; padding: 10px; text-align: center; font: 600 16px ui-monospace, Consolas, monospace; letter-spacing: .1em; }

/* ------------------------------------------------------------------ charts */
.chart svg { width: 100%; height: auto; display: block; }
.chart .grid-line { stroke: var(--chart-grid); } .chart .axis { fill: var(--chart-text); }
.chart rect { transition: opacity .15s; } .chart rect:hover { opacity: .8; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.bar-row { display: grid; grid-template-columns: 170px 1fr 110px; gap: 10px; align-items: center; margin: 7px 0; }
.bar-row .bar { height: 9px; background: var(--brand-soft); border-radius: 6px; overflow: hidden; }
.bar-row .bar b { display: block; height: 100%; background: var(--grad); border-radius: 6px; animation: grow .6s ease-out; transform-origin: left; }
@keyframes grow { from { transform: scaleX(0); } }

/* ------------------------------------------------------------------ public pages (login, captive portal, self-care, jobs) */
.public { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.public .card { width: min(460px, 100%); padding: 28px; border-radius: 20px; box-shadow: var(--shadow-lg); }
.public .brand { color: var(--ink); padding: 0 0 16px; }
.public-logo { display: block; width: min(250px, 78%); margin: 0 auto 18px; border-radius: 16px; background: #fff; padding: 6px; }
html[data-theme="dark"] .public-logo { box-shadow: 0 8px 28px rgba(0, 0, 0, .4); }
.pkg { display: flex; justify-content: space-between; align-items: center; padding: 13px 15px; border: 1px solid var(--line-strong); border-radius: 12px;
  margin-bottom: 9px; cursor: pointer; background: var(--panel-2); transition: border-color .15s, background .15s, transform .12s, box-shadow .15s; }
.pkg:hover { border-color: var(--brand); transform: translateY(-1px); }
.pkg.on { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px var(--brand-soft); }
.pkg .price { font-weight: 750; font-size: 15px; }
.err-text { color: var(--bad); font-size: 13px; min-height: 18px; margin: 6px 0; }
.ok-text { color: var(--ok); font-size: 13px; min-height: 18px; margin: 6px 0; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--brand-soft); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite;
  display: inline-block; vertical-align: -4px; }
@keyframes spin { to { transform: rotate(360deg); } }
.theme-fab { position: fixed; right: 16px; top: 16px; z-index: 40; }

/* split-screen sign-in */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { position: relative; overflow: hidden; color: #fff; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(700px 360px at 90% 0%, rgba(255, 255, 255, .22), transparent 60%), linear-gradient(140deg, #0a1a45 0%, #0d2463 40%, #1a63e0 80%, #0aa2ff 100%); }
.auth-art::before, .auth-art::after { content: ""; position: absolute; border-radius: 50%; border: 48px solid rgba(255, 255, 255, .07); }
.auth-art::before { width: 420px; height: 420px; right: -140px; bottom: -160px; } .auth-art::after { width: 220px; height: 220px; left: -80px; top: 30%; }
.auth-art .brand { color: #fff; padding: 0; position: relative; z-index: 1; }
.auth-art h1 { font-size: 34px; line-height: 1.15; color: #fff; max-width: 460px; position: relative; z-index: 1; }
.auth-art p { opacity: .85; max-width: 440px; font-size: 15px; position: relative; z-index: 1; }
.auth-feats { display: grid; gap: 10px; margin-top: 22px; position: relative; z-index: 1; }
.auth-feats div { display: flex; gap: 10px; align-items: center; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16);
  padding: 9px 12px; border-radius: 12px; width: fit-content; backdrop-filter: blur(6px); }
.auth-form { display: grid; place-items: center; padding: 32px 20px; }
.auth-form .card { width: min(420px, 100%); padding: 32px; border-radius: 22px; box-shadow: var(--shadow-lg); }
.auth-small { font-size: 12px; color: var(--muted); text-align: center; margin-top: 16px; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 280px; transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--shadow-lg); }
  .side.open { transform: none; }
  .side-backdrop.on { display: block; position: fixed; inset: 0; background: rgba(5, 12, 28, .45); z-index: 25; backdrop-filter: blur(2px); }
  .topbar { padding: 10px 14px; } .who-name { display: none; }
  .view { padding: 16px 14px 48px; }
  .form-grid { grid-template-columns: 1fr; }
  .g2 { grid-template-columns: 1fr; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .bar-row { grid-template-columns: 110px 1fr 90px; }
  .auth { grid-template-columns: 1fr; } .auth-art { padding: 28px 24px; min-height: auto; } .auth-art h1 { font-size: 24px; } .auth-feats { display: none; }
  .modal-bg { place-items: end center; padding: 0; } .modal { border-radius: 18px 18px 0 0; max-height: 92vh; }
  /* tables become cards on phones */
  .table-wrap table.stack thead { display: none; }
}
@media (max-width: 560px) {
  .g4 { grid-template-columns: 1fr 1fr; }
  .stat .value { font-size: 20px; }
  h1 { font-size: 17px; }
  .filters input, .filters select { min-width: 0; flex: 1 1 140px; }
  .public .card { padding: 20px; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; } .kv dd { margin-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print {
  .side, .topbar, .actions, .no-print, .theme-fab { display: none !important; }
  .shell { display: block; } body { background: #fff; } .card { box-shadow: none; border: 0; backdrop-filter: none; background: #fff; }
}

/* ------------------------------------------------------------------ ERP additions */
.view h3 { margin: 6px 0 10px; }
.chk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 14px; margin-bottom: 12px; }
.chk-grid label { display: flex; gap: 6px; align-items: center; font-size: 13px; }
.chk-grid input, label.field.check input { width: auto; accent-color: var(--brand); }
label.field.check { display: flex; gap: 8px; align-items: center; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--brand); width: auto; }

/* ---------- security & licensing ---------- */
.licence-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 24px 0; padding: 10px 14px;
  border-radius: 12px; background: var(--warn-soft, rgba(245, 158, 11, .14)); border: 1px solid rgba(245, 158, 11, .45); font-size: 13px; font-weight: 600; }
.licence-banner.bad { background: rgba(225, 29, 72, .12); border-color: rgba(225, 29, 72, .45); }
.qr-box { display: flex; justify-content: center; margin: 6px auto 8px; }
.qr-box svg { width: 196px; height: 196px; background: #fff; border-radius: 12px; padding: 6px; box-shadow: var(--shadow, 0 2px 10px rgba(0,0,0,.08)); }
.qr-box svg rect[fill="white"], .qr-box svg rect[fill="#ffffff"] { fill: #fff; }
.code-input { font: 600 26px/1.2 ui-monospace, Consolas, monospace; letter-spacing: .35em; text-align: center; padding: 10px; }
.steps { margin: 6px 0 8px; padding-left: 20px; } .steps li { margin: 4px 0; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.codes code { font: 600 16px ui-monospace, Consolas, monospace; text-align: center; padding: 8px; border-radius: 8px; background: var(--panel-2); border: 1px dashed var(--line); user-select: all; }
.checks { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.checks li { display: grid; grid-template-columns: 26px 1fr; grid-template-rows: auto auto; column-gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.checks li::before { grid-row: span 2; font-size: 16px; content: "✅"; } .checks li.bad::before { content: "⚠️"; }
.checks li span { font-size: 12.5px; }
.meter { height: 6px; border-radius: 6px; background: var(--panel-2); overflow: hidden; margin: 2px 0 12px; }
.meter.sm { height: 4px; margin: 4px 0 0; max-width: 220px; }
.meter i { display: block; height: 100%; width: 0; transition: width .2s; background: #e11d48; }
.meter i[data-s="2"] { background: #f59e0b; } .meter i[data-s="3"] { background: #22c55e; } .meter i[data-s="4"] { background: #0f9d58; }
.install-id { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); }
.install-id .mono { font-size: 20px; font-weight: 700; letter-spacing: .06em; user-select: all; }
.note.ok { border-left-color: #0f9d58; } .note.bad { border-left-color: #e11d48; }
ul.plain { margin: 0; padding-left: 18px; } ul.plain li { margin: 6px 0; }
.otp-step { display: none; } .otp-step.on { display: block; }
@media (max-width: 960px) { .licence-banner { margin: 0 12px; } }
@media print { .licence-banner { display: none; } }

/* ---------- page skeleton (shown only when a page takes > 120 ms) ---------- */
.skel i, .skel b { display: block; border-radius: 8px; background: linear-gradient(90deg, var(--line) 0%, var(--line-strong) 40%, var(--line) 80%);
  background-size: 200% 100%; animation: sk 1.2s ease-in-out infinite; }
.sk-card i { height: 10px; width: 55%; margin: 4px 0 12px; } .sk-card b { height: 26px; width: 40%; margin-bottom: 12px; } .sk-card i:last-child { width: 70%; margin-bottom: 4px; }
.sk-table { margin-top: 16px; } .sk-table i { height: 14px; margin: 14px 0; } .sk-table i:first-child { height: 18px; width: 30%; }
@keyframes sk { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .skel i, .skel b { animation: none; } }

/* ====================================================================== v2026.11b — professional finish
   Calmer surfaces, fewer glows, SVG icons, combined workspaces with tabs, smoother page changes. */
:root { --shadow: 0 1px 2px rgba(16, 30, 54, .05), 0 4px 14px rgba(16, 30, 54, .05); --radius: 12px;
  --blob-1: rgba(26, 99, 224, .10); --blob-2: rgba(10, 162, 255, .08); --blob-3: rgba(81, 69, 205, .05); --ease: cubic-bezier(.2, .7, .2, 1); }
html[data-theme="dark"] { --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .25);
  --blob-1: rgba(47, 111, 240, .12); --blob-2: rgba(24, 180, 255, .06); --blob-3: rgba(129, 92, 246, .07); }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
.svg-i { width: 18px; height: 18px; flex: none; display: block; }

/* sidebar */
.side { padding: 16px 12px 18px; width: 252px; }
.nav-find { display: flex; align-items: center; }
.nav-find kbd { position: absolute; right: 22px; font: 600 10.5px/1 ui-monospace, Consolas, monospace; color: var(--side-muted);
  border: 1px solid rgba(255, 255, 255, .14); border-radius: 5px; padding: 3px 6px; pointer-events: none; }
.nav-find input:focus + kbd, .nav-find input:not(:placeholder-shown) + kbd { display: none; }
.nav-sec { margin: 1px 0; } .nav-sec.open { background: none; }
.nav-head { padding: 8px 10px; font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--side-muted); border-radius: 9px; }
.nav-head:hover { background: rgba(255, 255, 255, .05); color: #dbe6ff; }
.nav-head .gi { width: 22px; height: 22px; background: none; border-radius: 6px; color: inherit; }
.nav-head .gi .svg-i { width: 16px; height: 16px; }
.nav-sec.has-active .nav-head { color: #fff; } .nav-sec.has-active .gi { background: none; box-shadow: none; color: #6fc3ff; }
.nav-items > div { padding-left: 0; } .nav-items > div::before { display: none; }
.side a { gap: 11px; padding: 8px 10px 8px 12px; margin: 1px 0 1px 6px; border-radius: 9px; font-size: 13.5px; font-weight: 500; color: var(--side-ink); }
.side a .ico { width: 18px; opacity: .85; color: #9db6ea; }
.side a:hover { transform: none; background: rgba(255, 255, 255, .06); }
.side a.active { background: rgba(255, 255, 255, .11); box-shadow: inset 3px 0 0 #3ba8ff; font-weight: 600; }
.side a.active .ico { color: #6fc3ff; opacity: 1; }
.side a .tc { margin-left: auto; font-size: 10.5px; font-weight: 650; color: var(--side-muted); background: rgba(255, 255, 255, .06);
  border-radius: 999px; padding: 1px 7px; }
.side a.active .tc { color: #cfe6ff; background: rgba(59, 168, 255, .22); }

/* topbar */
.topbar { padding: 0 24px; height: 62px; }
.crumb { letter-spacing: .08em; }

/* workspace tabs (combined modules) */
.wstabs { position: sticky; top: 62px; z-index: 19; padding: 0 24px; background: var(--panel); backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass);
  border-bottom: 1px solid var(--line); }
.wst-track { position: relative; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; max-width: 1480px; }
.wst-track::-webkit-scrollbar { display: none; }
.wstabs a { position: relative; padding: 12px 14px 11px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 13.3px; white-space: nowrap;
  border-radius: 8px 8px 0 0; transition: color .15s var(--ease), background .15s var(--ease); }
.wstabs a:hover { color: var(--ink); background: var(--hover); }
.wstabs a.on { color: var(--brand); }
.wst-ink { position: absolute; left: 0; bottom: 0; height: 2.5px; width: 0; border-radius: 2px 2px 0 0; background: var(--brand);
  transition: transform .28s var(--ease), width .28s var(--ease), opacity .2s; }

/* page change: short, soft fade */
.view { animation: rise .22s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* calmer components */
.card { box-shadow: var(--shadow); }
.stat::after { display: none; }
.stat:hover { transform: none; box-shadow: var(--shadow); }
.btn { transition: background .15s var(--ease), border-color .15s var(--ease), box-shadow .15s var(--ease), color .15s; }
.btn:hover { box-shadow: 0 2px 8px rgba(26, 99, 224, .10); }
.btn.primary { box-shadow: 0 1px 2px rgba(26, 99, 224, .25), 0 4px 10px rgba(26, 99, 224, .18); }
.btn.primary:hover { box-shadow: 0 2px 4px rgba(26, 99, 224, .25), 0 6px 16px rgba(26, 99, 224, .24); filter: brightness(1.05); }
.tabs { background: var(--panel-2); }
.tabs button { transition: color .15s, background .15s, box-shadow .15s; }
.tabs button.on { color: var(--ink); background: var(--panel-solid); box-shadow: 0 1px 2px rgba(16, 30, 54, .08), 0 2px 8px rgba(16, 30, 54, .06); }
html[data-theme="dark"] .tabs button.on { color: #fff; background: rgba(255, 255, 255, .10); box-shadow: none; }
th { letter-spacing: .04em; text-transform: uppercase; font-size: 11px; }
td { font-variant-numeric: tabular-nums; }
.modal { animation-duration: .2s; }

@media (max-width: 960px) {
  .wstabs { padding: 0 12px; }
  .topbar { padding: 0 14px; }
  td { white-space: nowrap; }               /* tables scroll sideways on phones instead of wrapping every cell */
  td .actions { flex-wrap: nowrap; }
  .side { width: 280px; }
}
@media print { .wstabs { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .wst-ink, .view { transition: none !important; animation: none !important; } }

/* ====================================================================== Phase 1: bell, attachments, approvals, backups */
.icon-btn .svg-i { width: 18px; height: 18px; }
.bell { position: relative; }
.bell-n { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #e11d48; color: #fff;
  font: 700 10.5px/18px system-ui, sans-serif; text-align: center; box-shadow: 0 0 0 2px var(--panel-solid); }
.bell-panel { position: fixed; top: 58px; right: 16px; width: min(400px, calc(100vw - 24px)); max-height: min(560px, calc(100vh - 80px)); display: flex; flex-direction: column;
  background: var(--panel-solid); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: var(--shadow-lg); z-index: 60;
  opacity: 0; transform: translateY(-6px) scale(.98); pointer-events: none; transition: opacity .16s var(--ease), transform .16s var(--ease); }
.bell-panel.on { opacity: 1; transform: none; pointer-events: auto; }
.bp-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.bp-head span { display: flex; gap: 6px; }
.lnk { background: none; border: 0; color: var(--brand); font: inherit; font-size: 12.5px; cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.lnk:hover { background: var(--hover); }
.bp-list { overflow-y: auto; }
.bp-item { display: flex; gap: 12px; padding: 12px 16px; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); transition: background .12s; }
.bp-item:hover { background: var(--hover); }
.bp-item.unread { background: var(--brand-soft); }
.bp-item.unread b::after { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); margin-left: 6px; vertical-align: middle; }
.bp-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--panel-2); color: var(--brand); }
.bp-ico .svg-i { width: 16px; height: 16px; }
.k-payment { color: var(--ok); } .k-security, .k-backup { color: var(--bad); } .k-approval { color: var(--info); } .k-ticket { color: var(--warn); }
.bp-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 13px; }
.bp-txt span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.bp-txt small { color: var(--muted); font-size: 11.5px; }
.bp-empty { padding: 36px 16px; text-align: center; color: var(--muted); } .bp-empty .svg-i { width: 32px; height: 32px; margin: 0 auto 8px; opacity: .5; }
.side a .tc.hot { background: #e11d48; color: #fff; }
.checks-list { display: grid; gap: 8px; }
.chk { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13.5px; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; }
.switch input { position: absolute; opacity: 0; }
.switch span { width: 36px; height: 20px; border-radius: 999px; background: var(--line-strong); position: relative; transition: background .2s; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch input:checked + span { background: var(--brand); } .switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.txt-bad { color: var(--bad); font-weight: 600; }

/* attachments */
.att-in-modal { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.att-head h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 14px; }
.att-head .svg-i { width: 16px; height: 16px; color: var(--muted); }
.drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px; border: 1.5px dashed var(--line-strong); border-radius: 12px; cursor: pointer;
  color: var(--muted); text-align: center; transition: border-color .15s, background .15s; }
.drop span { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); }
.drop .svg-i { width: 18px; height: 18px; color: var(--brand); }
.drop small { font-size: 11.5px; }
.drop:hover, .drop.over { border-color: var(--brand); background: var(--brand-soft); }
.drop.busy { pointer-events: none; opacity: .75; }
.att-opts { display: flex; gap: 8px; margin: 8px 0 10px; } .att-opts > * { flex: 1; }
.att { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--line); }
.att:last-child { border-bottom: 0; }
.att-ic { font-size: 20px; flex: none; }
.att-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.att-main a { font-weight: 600; color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-main a:hover { color: var(--brand); text-decoration: underline; }
.att-main small { color: var(--muted); font-size: 11.5px; }
.att-act { display: flex; gap: 4px; flex: none; }
.att-none { padding: 6px 0; }
.g2-1 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 16px; align-items: start; }

/* approvals */
.ap-list { display: grid; gap: 12px; }
.ap { padding: 16px 18px; }
.ap-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 12px; }
.ap-top .muted { margin-left: auto; }
.ap-body { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.ap-body h3 { margin: 0 0 4px; font-size: 15px; }
.ap-amt { font-size: 20px; font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ap-comment { margin-top: 8px; padding: 8px 10px; border-left: 3px solid var(--line-strong); background: var(--panel-2); border-radius: 0 8px 8px 0; font-size: 13px; }
.ap-steps { display: flex; align-items: center; gap: 6px; margin: 12px 0; font-size: 11.5px; font-weight: 650; }
.ap-steps span { padding: 3px 9px; border-radius: 999px; background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); }
.ap-steps span.done { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.ap-steps span.now { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.ap-steps span.x { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.ap-steps i { flex: 0 0 18px; height: 2px; background: var(--line-strong); }
.empty-state { text-align: center; padding: 40px 20px; } .empty-state .svg-i { width: 40px; height: 40px; margin: 0 auto 10px; color: var(--muted); opacity: .6; }
.empty-state h3 { margin: 0 0 6px; }
.timeline { display: grid; gap: 10px; }
.tl { padding: 8px 12px; border-left: 3px solid var(--line-strong); background: var(--panel-2); border-radius: 0 8px 8px 0; font-size: 13px; }
.tl.approved { border-left-color: var(--ok); } .tl.rejected { border-left-color: var(--bad); } .tl.submitted, .tl.resubmitted { border-left-color: var(--brand); }
.rule .form-grid { margin-top: 4px; }
pre.mono { white-space: pre-wrap; word-break: break-all; background: var(--panel-2); padding: 8px 10px; border-radius: 8px; font-size: 12px; }
@media (max-width: 960px) { .g2-1 { grid-template-columns: 1fr; } .ap-body { flex-direction: column; } .bell-panel { top: 58px; right: 8px; } }
.ap-body h3, .att-head h3 { text-transform: none; letter-spacing: 0; color: var(--ink); }
.att-head h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.nw { white-space: nowrap; }

/* ---------- Phase 2: finance core ---------- */
.g3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.neg { color: #b42318; }
tr.tot td { border-top: 2px solid var(--line); font-weight: 600; }
table.recon td { padding: 7px 4px; } table.recon tr.tot td { font-weight: 700; }
table.je input, table.je select { width: 100%; min-width: 0; padding: 6px 8px; }
table.je td { padding: 4px; vertical-align: middle; } table.je td:first-child { min-width: 200px; }
table.je input.num { text-align: right; }
.bank-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.bank-card { text-align: left; cursor: pointer; font: inherit; color: inherit; border: 1px solid var(--line); transition: border-color .15s, box-shadow .15s, transform .15s; }
.bank-card:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(16, 30, 54, .08); }
.bank-card.on { border-color: var(--brand, #1a63e0); box-shadow: 0 0 0 3px rgba(26, 99, 224, .15); }
.bank-card .bc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.bank-card .bc-bal { font-size: 22px; font-weight: 700; margin: 8px 0 4px; letter-spacing: -.01em; }
.bank-card .bc-warn { margin-top: 8px; color: #b54708; font-weight: 600; font-size: 13px; }
.bank-card .bc-ok { margin-top: 8px; color: #067647; font-weight: 600; font-size: 13px; }
.bank-card.add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--muted); border-style: dashed; min-height: 120px; }
.bank-card.add .svg-i { width: 22px; height: 22px; }
select.btn { appearance: auto; padding-right: 8px; }
.actions select.btn, select.btn { width: auto; flex: 0 0 auto; }
.bank-cards + .page-head h2 { font-size: 18px; }
.modal .table-wrap td { white-space: nowrap; }

/* ---------- Phase 3: field operations ---------- */
.seg { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 8px; font: inherit; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--panel-solid, #fff); color: var(--ink); box-shadow: 0 1px 2px rgba(16, 30, 54, .1); }
.kanban { display: grid; grid-template-columns: repeat(6, minmax(210px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.kcol { background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px; padding: 10px; min-height: 160px; }
.kcol-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.kcard { display: block; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; background: var(--panel-solid, #fff); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; transition: box-shadow .15s, transform .15s; }
.kcard:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(16, 30, 54, .1); }
.kcard b { display: block; margin: 4px 0 2px; }
.kc-top { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.kc-foot { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.kempty { text-align: center; padding: 18px 0; }
.mapbox { height: calc(100vh - 230px); min-height: 420px; border-radius: 12px; overflow: hidden; z-index: 0; }
.map-layout { display: grid; grid-template-columns: 1fr 330px; gap: 14px; align-items: start; }
.map-card { padding: 8px; }
.map-side { display: grid; gap: 12px; max-height: calc(100vh - 200px); overflow-y: auto; }
.map-side h2 { font-size: 15px; margin: 0 0 8px; }
.map-side .field.check { margin: 4px 0; }
i.lg { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; margin-right: 2px; }
i.lg.sq { border-radius: 3px; background: #475467; }
.mini-list { max-height: 260px; overflow-y: auto; }
.mini-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.mini-row.on { background: var(--info-soft); }
.job-pin { font-size: 18px; line-height: 24px; text-align: center; filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); }
.leaflet-popup-content { font: 13px/1.45 inherit; }
.clock-card { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.btn.big { padding: 12px 26px; font-size: 16px; }
.clockbtn { white-space: nowrap; }
.clockbtn.on { border-color: #12a150; color: #067647; background: rgba(18, 161, 80, .08); }
.clockbtn.done { color: var(--muted); }
@media (max-width: 900px) {
  .map-layout { grid-template-columns: 1fr; } .map-side { max-height: none; } .mapbox { height: 60vh; }
  .clockbtn { padding: 6px 8px; font-size: 12px; }
}

/* ---------- Phase 4: inbox, eTIMS, report builder ---------- */
.inbox { display: grid; grid-template-columns: 340px 1fr; gap: 14px; align-items: start; }
.ib-list { padding: 6px; max-height: calc(100vh - 230px); overflow-y: auto; }
.ib-item { display: block; width: 100%; text-align: left; font: inherit; color: inherit; background: none; border: 0; border-radius: 10px; padding: 10px; cursor: pointer; border-bottom: 1px solid var(--line); }
.ib-item:hover { background: var(--panel-2); } .ib-item.on { background: var(--info-soft); }
.ib-item.unread b { font-weight: 800; }
.ib-top { display: flex; justify-content: space-between; gap: 8px; } .ib-mid { margin: 3px 0; font-size: 12px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.ib-prev { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib-n { margin-left: auto; background: #e11d48; color: #fff; border-radius: 999px; font-size: 11px; padding: 1px 7px; font-weight: 700; }
.chan { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; }
.chan.wa { background: #dcfce7; color: #166534; } .chan.sms { background: #e0e7ff; color: #3730a3; }
.ib-thread { display: flex; flex-direction: column; min-height: calc(100vh - 230px); }
.ib-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.ib-msgs { flex: 1; overflow-y: auto; padding: 14px 4px; display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 430px); min-height: 200px; }
.bub { max-width: 72%; padding: 9px 12px; border-radius: 14px; font-size: 14px; line-height: 1.45; }
.bub small { display: block; margin-top: 4px; font-size: 11px; opacity: .7; }
.bub.in { align-self: flex-start; background: var(--panel-2); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bub.out { align-self: flex-end; background: linear-gradient(135deg, #1a63e0, #3b82f6); color: #fff; border-bottom-right-radius: 4px; }
.ib-reply textarea { width: 100%; min-height: 80px; }
.ib-rfoot { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.small { font-size: 13px; }
.rb { display: grid; grid-template-columns: 260px 1fr; gap: 14px; align-items: start; }
.rb-sec { margin-top: 14px; } .rb-sec h3 { display: flex; align-items: center; gap: 8px; font-size: 13px; margin: 0 0 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; cursor: pointer; background: var(--panel-2); }
.chip input { display: none; } .chip.on { background: var(--info-soft); border-color: var(--brand, #1a63e0); color: var(--ink); font-weight: 600; }
.rb-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.rb-row select, .rb-row input { width: auto; min-width: 140px; }
@media (max-width: 900px) { .inbox, .rb { grid-template-columns: 1fr; } .ib-list { max-height: 300px; } .bub { max-width: 90%; } }
.filters label.field.check { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; } .filters label.field.check input { width: auto; margin: 0; }

/* ---------- Phase 5: branches ---------- */
.branchsel { max-width: 190px; font-weight: 600; }
.branchsel.one { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); padding: 0 6px; }
.branchsel.one .svg-i { width: 16px; height: 16px; }
.branch-pick { max-width: 320px; margin-bottom: 10px; }
.branch-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.bcard.off { opacity: .6; }
.bcard .bc-big { font-size: 24px; font-weight: 700; margin-top: 6px; }
.bcard .bc-mini { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.bcard .bc-mini b { color: var(--ink); }
@media (max-width: 900px) { .branchsel { max-width: 120px; } }

/* ---------------------------------------------------------------- Phase 6–7: products, stock, POS management */
.prod-cell { display: flex; gap: 10px; align-items: center; }
.prod-cell img, .prod-ph { width: 38px; height: 38px; border-radius: 9px; object-fit: cover; flex: none; background: var(--brand-soft); }
.prod-ph { display: grid; place-items: center; font-weight: 700; color: var(--brand); text-transform: uppercase; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 4px; vertical-align: -1px; border: 1px solid var(--line-strong); }
.neg { color: var(--bad); } .pos { color: var(--ok); } .warn { color: var(--warn); }
.sub-h { margin: 18px 0 8px; font-size: 12px; } .sub-h small { text-transform: none; letter-spacing: 0; font-weight: 400; }
table.edit-grid { width: 100%; border-collapse: separate; border-spacing: 0 4px; }
table.edit-grid th { text-align: left; font-size: 11px; color: var(--muted); font-weight: 650; padding: 4px 6px; text-transform: uppercase; letter-spacing: .04em; }
table.edit-grid td { padding: 2px 4px; vertical-align: middle; }
table.edit-grid input, table.edit-grid select { width: 100%; min-width: 70px; }
details.more { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
details.more summary { cursor: pointer; font-weight: 600; color: var(--brand); margin-bottom: 10px; }
ul.plain { list-style: none; padding: 0; margin: 0; } ul.plain li { padding: 3px 0; border-bottom: 1px dashed var(--line); }
.totals { display: grid; gap: 4px; max-width: 420px; margin: 12px 0 0 auto; }
.totals > div { display: flex; justify-content: space-between; gap: 16px; padding: 3px 0; }
.totals > div span { color: var(--muted); } .totals > .grand { border-top: 1px solid var(--line-strong); padding-top: 6px; font-size: 15px; }
.till-card.off { opacity: .55; } .till-card h3 { text-transform: none; letter-spacing: 0; color: var(--ink); font-size: 16px; }
.appt { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); margin-bottom: 8px; cursor: pointer; border-left: 4px solid var(--brand); }
.appt:hover { background: var(--hover); } .appt.s-done { border-left-color: var(--ok); opacity: .7; } .appt.s-cancelled, .appt.s-no-show { border-left-color: var(--bad); opacity: .55; }
.appt.s-arrived, .appt.s-in-service { border-left-color: var(--warn); }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 10px; }
.pic-edit { display: flex; gap: 8px; align-items: center; } .pic-prev { width: 56px; height: 56px; overflow: hidden; } .pic-prev img { width: 100%; height: 100%; object-fit: cover; }
