/* =============================================================================
   SPK ERP 2.0 - corporate design system
   Navy and champagne gold, Inter for the interface, Source Serif for titles.
   Fonts are bundled in /fonts so the app works offline.
   ============================================================================= */
@font-face { font-family: "Inter"; src: url("fonts/inter.woff2") format("woff2-variations"), url("fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif"; src: url("fonts/source-serif.woff2") format("woff2-variations"), url("fonts/source-serif.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Noto Sans Myanmar"; src: url("fonts/myanmar-400.woff2") format("woff2"); font-weight: 100 500; font-style: normal; font-display: swap; unicode-range: U+1000-109F, U+A9E0-A9FF, U+AA60-AA7F, U+200C-200D, U+25CC; }
@font-face { font-family: "Noto Sans Myanmar"; src: url("fonts/myanmar-600.woff2") format("woff2"); font-weight: 550 650; font-style: normal; font-display: swap; unicode-range: U+1000-109F, U+A9E0-A9FF, U+AA60-AA7F, U+200C-200D, U+25CC; }
@font-face { font-family: "Noto Sans Myanmar"; src: url("fonts/myanmar-700.woff2") format("woff2"); font-weight: 660 900; font-style: normal; font-display: swap; unicode-range: U+1000-109F, U+A9E0-A9FF, U+AA60-AA7F, U+200C-200D, U+25CC; }

:root {
  /* brand */
  --navy-950: #061428; --navy-900: #0a1d38; --navy-800: #102a4c; --navy-700: #1a3a66; --navy-600: #24508a;
  --gold: #b0894f; --gold-600: #96723c; --gold-300: #d9c39b; --gold-100: #f2ead9; --gold-50: #faf6ee;
  /* action blue (links, focus) */
  --blue: #1f5bb8; --blue-600: #184a97; --blue-50: #eef3fb; --blue-100: #dbe6f6;
  /* text */
  --ink: #0d1b2e; --text: #364357; --mute: #687588; --faint: #9aa5b5;
  /* surfaces */
  --line: #e2e6ec; --line-2: #eef1f5; --paper: #f5f6f8; --panel: #ffffff; --sunk: #f9fafb;
  /* status */
  --good: #1b7a4e; --good-bg: #e6f4ec; --warn: #9a5b0c; --warn-bg: #fbf1df; --bad: #b4232f; --bad-bg: #fbe9ea;
  --cold: #1f5bb8; --cold-bg: #e5eefb; --foc: #a8620a; --foc-bg: #fcf0dc; --sample: #1b7a4e; --sample-bg: #e6f4ec; --seal: #b4232f;
  /* shape */
  --r-lg: 14px; --r-md: 10px; --r-sm: 8px;
  --sh-1: 0 1px 2px rgba(13, 27, 46, .05);
  --sh-2: 0 1px 2px rgba(13, 27, 46, .04), 0 2px 8px -2px rgba(13, 27, 46, .06);
  --sh-float: 0 24px 48px -16px rgba(6, 20, 40, .28), 0 4px 12px -4px rgba(6, 20, 40, .08);
  --font: "Inter", "Noto Sans Myanmar", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --serif: "Source Serif", "Noto Sans Myanmar", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 14px/1.5 var(--font); background: var(--paper); color: var(--text); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
.num, .tbl td, .kpi .v, .hb, .ncv3 b, .dlegend, .chart, .pmini b, .stl b, .vtot { font-variant-numeric: tabular-nums; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); letter-spacing: -.01em; }
h3 { font-size: 15px; font-weight: 650; }
p { margin: 0 0 .6rem; }
small { color: var(--mute); font-size: 12.5px; }
a { color: var(--blue); text-decoration: none; transition: color .15s; }
a:hover { color: var(--blue-600); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
button { font-family: inherit; }
kbd { font: 600 11px/1 var(--font); color: var(--mute); background: #fff; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 3px 6px; }
svg.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
::selection { background: var(--gold-100); color: var(--ink); }

/* ---------------------------------------------------------------- shell */
.shell { display: grid; grid-template-columns: 272px minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; z-index: 30; display: flex; flex-direction: column;
  color: #b8c4d6; padding: 20px 14px 14px;
  background:
    radial-gradient(420px 260px at 0% 0%, rgba(176, 137, 79, .10), transparent 70%),
    linear-gradient(180deg, var(--navy-900) 0%, var(--navy-950) 100%);
  border-right: 1px solid rgba(176, 137, 79, .22);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 2px 6px 18px; }
.brand .seal { width: 44px; height: 44px; border-radius: 50%; background: #fff; display: grid; place-items: center; overflow: hidden; box-shadow: 0 0 0 2px rgba(176, 137, 79, .55), 0 6px 14px -6px rgba(0, 0, 0, .6); flex: none; }
.brand .seal img { width: 40px; height: 40px; display: block; object-fit: contain; border-radius: 50%; }
.brand b { display: block; color: #fff; font: 600 14.5px/1.2 var(--serif); letter-spacing: .03em; }
.brand span { display: block; font-size: 10.5px; color: var(--gold-300); margin-top: 4px; letter-spacing: .01em; font-weight: 600; white-space: nowrap; }

.navfindwrap { position: relative; margin: 0 4px 10px; }
.navfindwrap svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: #7f8ea6; pointer-events: none; }
.side input.navfind { width: 100%; min-height: 36px; padding: 7px 10px 7px 33px; font-size: 13px; color: #e6ecf5; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); border-radius: 9px; box-shadow: none; }
.side input.navfind::placeholder { color: #7f8ea6; }
.side input.navfind:focus { border-color: rgba(217, 195, 155, .55); box-shadow: 0 0 0 3px rgba(176, 137, 79, .18); background: rgba(255, 255, 255, .09); }
.navscroll { flex: 1; overflow-y: auto; margin: 0 -6px; padding: 0 6px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
.ngroup { margin: 2px 0; }
.ghead { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; background: none; border: 0; border-radius: 8px; cursor: pointer; color: #d5dde9; font-size: 12.5px; font-weight: 600; letter-spacing: .01em; text-align: left; transition: background .15s, color .15s; }
.ghead:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.ghead > svg:first-child { width: 17px; height: 17px; color: var(--gold-300); opacity: .9; }
.ghead span { flex: 1; }
.ghead .gcount { font-style: normal; font-size: 10.5px; color: #7f8ea6; font-weight: 600; }
.ghead > svg:last-child { width: 14px; height: 14px; color: #7f8ea6; transition: transform .2s var(--ease); }
.ngroup.shut .ghead > svg:last-child { transform: rotate(-90deg); }
.glinks { display: grid; gap: 1px; padding: 2px 0 6px; overflow: hidden; }
.ngroup.shut .glinks { display: none; }
.side.finding .ngroup .glinks { display: grid; }
.side a.nav { position: relative; display: flex; align-items: center; color: #a9b6ca; padding: 6px 10px 6px 37px; border-radius: 7px; font-size: 13px; font-weight: 500; line-height: 1.35; transition: background .15s, color .15s; }
.side a.nav::before { content: ""; position: absolute; left: 18px; top: 50%; width: 4px; height: 4px; border-radius: 50%; background: #4d5f7a; transform: translateY(-50%); transition: background .15s; }
.side a.nav:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.side a.nav.on { background: linear-gradient(90deg, rgba(176, 137, 79, .20), rgba(176, 137, 79, .04)); color: #fff; font-weight: 600; }
.side a.nav.on::before { background: var(--gold); width: 6px; height: 6px; box-shadow: 0 0 0 3px rgba(176, 137, 79, .25); left: 17px; }
.side .foot { margin-top: 8px; padding: 12px 8px 2px; font-size: 11px; color: #7083a0; border-top: 1px solid rgba(255, 255, 255, .07); display: flex; justify-content: space-between; align-items: center; }
.side .foot small { color: #56677f; font-size: 10.5px; }
.scrim { display: none; }

.col { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; height: 60px; display: flex; align-items: center; gap: 14px; padding: 0 32px; background: rgba(255, 255, 255, .88); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.burger { display: none; background: #fff; border: 1px solid var(--line); border-radius: 9px; width: 38px; height: 38px; place-items: center; color: var(--ink); cursor: pointer; }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--mute); min-width: 0; }
.crumbs b { color: var(--ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs i { font-style: normal; color: var(--faint); }
.spacer { flex: 1; }
.jump { display: inline-flex; align-items: center; gap: 10px; min-width: 260px; height: 38px; padding: 0 8px 0 12px; border: 1px solid var(--line); background: var(--sunk); color: var(--mute); border-radius: 9px; font-size: 13px; cursor: pointer; transition: border-color .15s, background .15s; }
.jump:hover { border-color: #cdd4de; background: #fff; }
.jump svg { width: 16px; height: 16px; }
.jump span { flex: 1; text-align: left; }
.today { font-size: 12.5px; color: var(--mute); white-space: nowrap; }
.userchip { position: relative; }
.userchip > button { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px 4px 4px; cursor: pointer; color: var(--ink); font-size: 13px; font-weight: 600; transition: border-color .15s, box-shadow .15s; text-align: left; }
.userchip > button:hover { border-color: #cdd4de; box-shadow: var(--sh-1); }
.userchip > button > svg { width: 15px; height: 15px; color: var(--mute); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--navy-800); color: var(--gold-300); display: grid; place-items: center; font-size: 12px; font-weight: 700; letter-spacing: .03em; box-shadow: inset 0 0 0 1px rgba(176, 137, 79, .5); }
.userchip small { display: block; line-height: 1.15; font-weight: 500; font-size: 11.5px; }
.menu { position: absolute; right: 0; top: calc(100% + 10px); min-width: 230px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--sh-float); padding: 6px; display: none; }
.menu.open { display: block; animation: drop .18s var(--ease); }
.menuhead { padding: 10px 12px 10px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; }
.menuhead b { display: block; color: var(--ink); font-size: 13.5px; }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; padding: 9px 12px; border-radius: 8px; font-size: 13.5px; color: var(--text); cursor: pointer; text-align: left; }
.menu button:hover { background: var(--paper); color: var(--ink); }

/* command palette */
dialog.palette { border: 0; padding: 0; width: min(620px, 94vw); margin-top: 12vh; border-radius: 14px; background: #fff; box-shadow: var(--sh-float); overflow: hidden; }
dialog.palette::backdrop { background: rgba(6, 20, 40, .45); backdrop-filter: blur(3px); }
.pal-head { display: flex; align-items: center; gap: 10px; padding: 6px 14px; border-bottom: 1px solid var(--line); }
.pal-head > svg { color: var(--mute); }
.pal-head input { flex: 1; border: 0; box-shadow: none !important; font-size: 15.5px; min-height: 50px; padding: 0; }
.pal-list { max-height: 52vh; overflow: auto; padding: 6px; }
.pal-item { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; padding: 9px 10px; border-radius: 8px; cursor: pointer; text-align: left; font-size: 14px; color: var(--ink); }
.pal-item.on { background: var(--blue-50); }
.pal-item .pal-ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--paper); color: var(--navy-700); flex: none; }
.pal-item.on .pal-ic { background: #fff; color: var(--blue); }
.pal-item .pal-t { flex: 1; font-weight: 550; }
.pal-none { padding: 22px; text-align: center; color: var(--mute); }
.pal-foot { display: flex; gap: 18px; padding: 9px 14px; border-top: 1px solid var(--line); background: var(--sunk); font-size: 12px; color: var(--mute); }
.pal-foot kbd { margin-right: 2px; }

/* ---------------------------------------------------------------- page */
.main { padding: 30px 36px 72px; max-width: 1600px; width: 100%; margin: 0 auto; min-width: 0; animation: rise .25s var(--ease); }
@keyframes rise { from { opacity: .4; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.phead { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin: 0 0 24px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 650; color: var(--gold-600); text-transform: uppercase; letter-spacing: .14em; margin-bottom: 8px; }
.eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--gold); }
.phead h1 { font: 600 30px/1.15 var(--serif); letter-spacing: -.01em; color: var(--ink); }
.phead p { margin: 8px 0 0; color: var(--mute); font-size: 14px; max-width: 72ch; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row label { flex: 1; min-width: 160px; }
.sect { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 34px 0 14px; }
.sect h2 { font: 600 20px/1.2 var(--serif); }

/* ---------------------------------------------------------------- controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--navy-800); color: #fff; border: 1px solid var(--navy-800); border-radius: 9px; padding: 9px 16px; font: inherit; font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s, transform .05s; box-shadow: 0 1px 2px rgba(6, 20, 40, .18), inset 0 1px 0 rgba(255, 255, 255, .08); }
.btn:hover { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn svg { width: 16px; height: 16px; }
.btn.ghost { background: #fff; color: var(--ink); border-color: var(--line); box-shadow: var(--sh-1); }
.btn.ghost:hover { background: var(--sunk); border-color: #cdd4de; color: var(--ink); }
.btn.danger { background: var(--bad); border-color: var(--bad); }
.btn.danger:hover { background: #981c27; border-color: #981c27; }
.btn.gold { background: var(--gold); border-color: var(--gold); }
.btn.gold:hover { background: var(--gold-600); border-color: var(--gold-600); }
.btn.sm { padding: 5px 11px; font-size: 12.5px; border-radius: 7px; }
.btn.sm.on { background: var(--blue-50); border-color: var(--blue); color: var(--blue-600); }

input, select, textarea { font: inherit; font-size: 14px; color: var(--ink); background: #fff; border: 1px solid #d3d9e2; border-radius: 8px; padding: 9px 12px; max-width: 100%; min-height: 40px; transition: border-color .15s, box-shadow .15s; }
textarea { min-height: 84px; }
select { padding-right: 32px; appearance: none; background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23687588' stroke-width='2' stroke-linecap='round'><path d='M6 9l6 6 6-6'/></svg>") no-repeat right 10px center; }
input[type=checkbox], input[type=radio] { min-height: 0; width: 17px; height: 17px; accent-color: var(--navy-800); }
input:hover, select:hover, textarea:hover { border-color: #bcc4cf; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31, 91, 184, .14); }
input::placeholder, textarea::placeholder { color: var(--faint); }
input[type=search] { min-width: 280px; padding-left: 36px; background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23687588' stroke-width='2' stroke-linecap='round'><circle cx='11' cy='11' r='7'/><path d='m20 20-3.5-3.5'/></svg>") no-repeat 12px center; }
.err { color: var(--bad); min-height: 1em; font-size: 13px; font-weight: 500; }

/* ---------------------------------------------------------------- cards */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--sh-2); }
.card > h3:first-child { margin-bottom: 14px; font-size: 15.5px; }
.grid { display: grid; gap: 18px; }
.two { grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px 24px; margin-bottom: 6px; }
.kv > div { min-width: 0; color: var(--ink); font-weight: 500; }
.kv > div > span:first-child { display: block; font-size: 11px; color: var(--mute); margin-bottom: 3px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; overflow: hidden; border-radius: 16px; padding: 34px 38px 30px; color: #d6dfec; margin-bottom: 22px;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 14px),
    radial-gradient(700px 300px at 100% 0%, rgba(176, 137, 79, .22), transparent 60%),
    linear-gradient(120deg, var(--navy-950) 0%, var(--navy-900) 50%, var(--navy-800) 100%);
  box-shadow: 0 24px 48px -28px rgba(6, 20, 40, .7); }
.hero::after { content: ""; position: absolute; left: 38px; right: 38px; bottom: 0; height: 2px; background: linear-gradient(90deg, var(--gold), rgba(176, 137, 79, 0)); }
.hero .mark { position: absolute; right: -30px; top: 50%; width: 320px; height: 320px; transform: translateY(-50%); opacity: .06; filter: brightness(0) invert(1); pointer-events: none; }
.hero h1 { color: #fff; font: 600 32px/1.15 var(--serif); margin-bottom: 8px; }
.hero p { margin: 0; max-width: 68ch; color: #b9c6d8; font-size: 15px; line-height: 1.6; }
.hero .filters { position: relative; display: flex; gap: 14px; flex-wrap: wrap; margin-top: 24px; }
.hero .filters label { display: grid; gap: 6px; font-size: 11px; color: var(--gold-300); font-weight: 600; text-transform: uppercase; letter-spacing: .1em; }
.hero select, .hero input { background-color: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16); color: #fff; min-width: 220px; }
.hero select { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23d9c39b' stroke-width='2' stroke-linecap='round'><path d='M6 9l6 6 6-6'/></svg>"); }
.hero select option { color: var(--ink); }
.hero select:focus, .hero input:focus { border-color: var(--gold-300); box-shadow: 0 0 0 3px rgba(176, 137, 79, .25); }

/* ---------------------------------------------------------------- KPI */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 18px; }
.kpi { position: relative; overflow: hidden; padding: 20px 22px 18px; }
.kpi::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: var(--tc, var(--navy-700)); opacity: .85; }
.kpi .tile { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: var(--tint, var(--blue-50)); color: var(--tc, var(--navy-700)); margin-bottom: 14px; }
.kpi .tile svg { width: 19px; height: 19px; }
.kpi .l, .kpi > small:first-child { display: block; color: var(--mute); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; }
.kpi .v { font-size: 27px; font-weight: 650; color: var(--ink); letter-spacing: -.02em; margin: 4px 0 6px; line-height: 1.15; }
.kpi .v small { font-size: 13px; font-weight: 600; color: var(--mute); margin-left: 4px; letter-spacing: 0; }
.kpi .v.bad { color: var(--bad); }
.kpi .s { font-size: 12.5px; color: var(--mute); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.kpi.t-green { --tint: var(--good-bg); --tc: var(--good); } .kpi.t-amber { --tint: var(--warn-bg); --tc: #c07a14; } .kpi.t-red { --tint: var(--bad-bg); --tc: var(--bad); } .kpi.t-navy { --tint: #e6ebf3; --tc: var(--navy-700); }
.kpi.t-gold { --tint: var(--gold-50); --tc: var(--gold); }
.delta { display: inline-flex; align-items: center; gap: 4px; font-weight: 650; font-size: 11.5px; border-radius: 999px; padding: 1px 8px; }
.delta.up { background: var(--good-bg); color: var(--good); } .delta.down { background: var(--bad-bg); color: var(--bad); }

/* ---------------------------------------------------------------- dashboard */
.dash2 { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.dash3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.span2 { grid-column: span 2; }
.cardhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.cardhead h3 { margin: 0; font-size: 15.5px; }
.cardhead small { display: block; margin-top: 2px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--mute); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; }
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .tip { position: absolute; pointer-events: none; background: var(--navy-950); color: #fff; border-radius: 8px; padding: 6px 10px; font-size: 12.5px; box-shadow: var(--sh-float); transform: translate(-50%, -110%); white-space: nowrap; opacity: 0; transition: opacity .12s; }
.chart .tip.on { opacity: 1; }
.donutwrap { display: grid; grid-template-columns: 160px 1fr; gap: 18px; align-items: center; }
.donutwrap svg { width: 160px; height: 160px; }
.dlegend { display: grid; gap: 10px; }
.dlegend div { display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.dlegend i { width: 10px; height: 10px; border-radius: 3px; }
.dlegend b { color: var(--ink); }
.dlegend small { grid-column: 2 / 4; margin-top: -6px; }
.hb { display: grid; grid-template-columns: minmax(90px, 1.1fr) 2fr auto; gap: 12px; align-items: center; margin: 10px 0; font-size: 13px; }
.hb > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-weight: 550; }
.hb .t { background: var(--line-2); border-radius: 999px; height: 8px; overflow: hidden; }
.hb .t i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--navy-700), var(--blue)); }
.ncv3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 4px 0 16px; }
.ncv3 > div { border-radius: 10px; padding: 12px 14px; background: var(--sunk); border: 1px solid var(--line-2); }
.ncv3 span { display: block; font-size: 11.5px; color: var(--mute); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.ncv3 b { font-size: 20px; color: var(--ink); font-weight: 650; }
.ncv3 .f { background: var(--foc-bg); border-color: transparent; } .ncv3 .f b { color: var(--foc); } .ncv3 .s { background: var(--sample-bg); border-color: transparent; } .ncv3 .s b { color: var(--sample); }
.stack { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--line-2); }
.stack i { display: block; height: 100%; }
.actlist { display: grid; gap: 0; }
.act { display: grid; grid-template-columns: 32px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.act:last-child { border-bottom: 0; }
.act .d { width: 32px; height: 32px; border-radius: 8px; background: var(--paper); color: var(--navy-700); display: grid; place-items: center; }
.act b { color: var(--ink); font-weight: 600; }
.act small { display: block; }

/* ---------------------------------------------------------------- tables */
.tblwrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; box-shadow: var(--sh-2); }
table.tbl { border-collapse: separate; border-spacing: 0; width: 100%; }
.tbl th, .tbl td { padding: 11px 16px; text-align: left; border-bottom: 1px solid var(--line-2); white-space: nowrap; font-size: 13.5px; }
.tbl th { font-size: 11px; font-weight: 650; color: var(--mute); background: var(--sunk); position: sticky; top: 0; z-index: 1; border-bottom: 1px solid var(--line); text-transform: uppercase; letter-spacing: .07em; }
.tbl td { color: var(--ink); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover td { background: #fafbfd; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: var(--blue-50); }
.tbl tr.click:hover td:first-child { box-shadow: inset 2px 0 0 var(--gold); }
.num { text-align: right !important; font-variant-numeric: tabular-nums; }
.empty { text-align: center !important; color: var(--mute) !important; padding: 44px !important; }
.neg { color: var(--bad); font-weight: 650; }
.tbl tr.grp td { background: var(--sunk); font-weight: 700; color: var(--navy-800); border-top: 1px solid var(--line); }
.tbl tr.sub td { background: #fafbfc; font-weight: 650; }
.tbl tr.tot td { background: var(--navy-900); color: #fff; font-weight: 650; border-bottom: 0; }
.tbl tr.tot:hover td { background: var(--navy-900); }
.tbl .g-com { background: #eef2f9 !important; color: var(--navy-800) !important; }
.tbl .g-foc { background: var(--foc-bg) !important; color: var(--foc) !important; }
.tbl .g-smp { background: var(--sample-bg) !important; color: var(--sample) !important; }
.tbl .g-ncv { background: #f1f3f6 !important; color: var(--ink) !important; }
.tbl th.gh { text-align: center; letter-spacing: .04em; border-bottom: 1px solid var(--line-2); }
.tbl td.c-foc { color: var(--foc); font-weight: 650; } .tbl td.c-smp { color: var(--sample); font-weight: 650; }
.pct { display: inline-flex; min-width: 60px; justify-content: center; padding: 2px 9px; border-radius: 999px; font-weight: 650; font-size: 12px; background: var(--paper); color: var(--ink); }
.pct.hi { background: var(--foc-bg); color: var(--foc); } .pct.vhi { background: var(--bad-bg); color: var(--bad); } .pct.lo { background: var(--good-bg); color: var(--good); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: #eef1f5; color: #4a586c; line-height: 1.5; border: 1px solid rgba(13, 27, 46, .06); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
.badge.good { background: var(--good-bg); color: var(--good); border-color: rgba(27, 122, 78, .15); }
.badge.warn { background: var(--warn-bg); color: var(--warn); border-color: rgba(154, 91, 12, .15); }
.badge.bad { background: var(--bad-bg); color: var(--bad); border-color: rgba(180, 35, 47, .15); }
.badge.cold { background: var(--cold-bg); color: var(--cold); border-color: rgba(31, 91, 184, .15); }
.badge.foc { background: var(--foc-bg); color: var(--foc); border-color: rgba(168, 98, 10, .15); }
.badge.smp { background: var(--sample-bg); color: var(--sample); border-color: rgba(27, 122, 78, .15); }

.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.chip { border: 1px solid var(--line); background: #fff; color: var(--text); padding: 6px 13px; border-radius: 999px; cursor: pointer; font: inherit; font-size: 13px; font-weight: 550; transition: border-color .15s, background .15s, color .15s; }
.chip:hover { border-color: #c6cdd8; color: var(--ink); }
.chip.on, .chip.on:hover { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }

.steps { display: flex; margin: 0 0 18px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; width: fit-content; max-width: 100%; }
.steps span { position: relative; padding: 8px 16px 8px 22px; font-size: 12.5px; font-weight: 600; color: var(--faint); background: #fff; }
.steps span:first-child { padding-left: 14px; }
.steps span + span::before { content: ""; position: absolute; left: -6px; top: 50%; width: 10px; height: 10px; border-top: 1px solid var(--line); border-right: 1px solid var(--line); background: inherit; transform: translateY(-50%) rotate(45deg); z-index: 1; }
.steps span.done { color: var(--good); background: #f3faf6; }
.steps span.now { color: #fff; background: var(--navy-800); }

.toolbar { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar label { display: grid; gap: 4px; font-size: 11.5px; color: var(--mute); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.toolbar .spacer { flex: 1; }
.note { display: flex; gap: 10px; align-items: flex-start; background: var(--blue-50); color: var(--navy-800); border: 1px solid #d6e2f4; border-left: 3px solid var(--blue); border-radius: 10px; padding: 11px 14px; font-size: 13px; margin-bottom: 16px; }
.note.bad { background: var(--bad-bg); color: #7b1620; border-color: #f2c9cc; border-left-color: var(--bad); }
.note.warn { background: var(--warn-bg); color: #6b4108; border-color: #f0dbb6; border-left-color: #c07a14; }
.note.good { background: var(--good-bg); color: #13553a; border-color: #c4e5d3; border-left-color: var(--good); }
.note svg { margin-top: 1px; }
.note .badge { white-space: nowrap; flex: none; }
.muted { color: var(--mute); font-size: 13px; }
td small { color: var(--mute); }
td .wrap { white-space: normal; display: inline-block; min-width: 160px; }
.inl { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--mute); }

/* table tools */
.tblbox { margin-bottom: 4px; }
.tblbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 0 2px 8px; }
.tblcount { color: var(--mute); font-size: 12.5px; }
.tblactions { display: flex; gap: 8px; align-items: center; }
.tblexport { position: relative; }
.tblmenu { display: none; position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 190px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--sh-float); padding: 6px; }
.tblmenu.open { display: grid; }
.tblmenu button { text-align: left; background: none; border: 0; padding: 8px 12px; border-radius: 7px; font: inherit; font-size: 13.5px; color: var(--ink); cursor: pointer; }
.tblmenu button:hover, .tblmenu button:focus-visible { background: var(--paper); outline: none; }
.tbl .thbtn { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 3px; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; }
.tbl .thbtn:hover { color: var(--ink); }
.tbl .thbtn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
.tbl .sortmark { font-size: 9px; color: var(--gold-600); }
.tbl tr.filters th { padding: 4px 8px 8px; background: var(--sunk); }
.tbl .colfilter { width: 100%; min-width: 70px; min-height: 30px; padding: 4px 8px; font-size: 12px; border-radius: 6px; }

/* ---------------------------------------------------------------- report library */
.lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.lib a { display: block; color: inherit; }
.lib .card { height: 100%; transition: transform .2s var(--ease), box-shadow .2s, border-color .2s; }
.lib a:hover .card { transform: translateY(-2px); border-color: var(--gold-300); box-shadow: var(--sh-float); }
.lib .tile { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; background: var(--gold-50); color: var(--gold-600); margin-bottom: 14px; border: 1px solid var(--gold-100); }
.lib h3 { margin-bottom: 6px; } .lib p { color: var(--mute); margin: 0; font-size: 13px; }

/* ---------------------------------------------------------------- modal */
dialog.modal { border: 0; border-radius: 16px; background: #fff; color: var(--text); padding: 0; width: min(680px, 94vw); max-height: 92vh; overflow: auto; box-shadow: var(--sh-float); }
dialog.modal.wide { width: min(1020px, 96vw); }
dialog::backdrop { background: rgba(6, 20, 40, .5); backdrop-filter: blur(3px); }
dialog.modal[open] { animation: pop .2s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }
dialog.modal > h3 { font: 600 20px/1.25 var(--serif); padding: 22px 26px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 2; }
dialog.modal > *:not(h3) { margin-left: 26px; margin-right: 26px; }
dialog.modal > *:nth-child(2) { margin-top: 18px; }
dialog.modal > *:last-child { margin-bottom: 24px; }
dialog.modal > *:last-child:not(h3) { margin-bottom: 22px; }
dialog.modal form { margin-left: 0 !important; margin-right: 0 !important; }
dialog.modal > form.form { margin: 18px 26px 24px !important; }
dialog.modal .hint { font-size: 12.5px; color: var(--mute); margin-top: 12px; margin-bottom: 8px; }
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 5px; }
.form label span, .form span.l { font-size: 12px; font-weight: 600; color: var(--text); }
.form .row.end { padding-top: 6px; }
.form .fsec { grid-column: 1 / -1; margin: 10px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font: 600 15px var(--serif); color: var(--navy-800); }
.form .fsec:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
dialog.modal.wide .form { grid-template-columns: 1fr 1fr; gap: 14px 20px; }
dialog.modal.wide .form .full, dialog.modal.wide .form .err, dialog.modal.wide .form > .row { grid-column: 1 / -1; }
.segmented { display: inline-flex; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.segmented button { border: 0; background: none; padding: 7px 14px; border-radius: 7px; font-weight: 600; font-size: 13px; color: var(--mute); cursor: pointer; }
.segmented button.on { background: #fff; color: var(--ink); box-shadow: var(--sh-1); }
.linerow { display: grid; grid-template-columns: 1fr 100px auto; gap: 8px; margin-bottom: 8px; }
.linerow.s2 { grid-template-columns: 1fr 100px auto; }
.linerow.s3 { grid-template-columns: 1fr 120px 140px auto; } .linerow.s4 { grid-template-columns: 1fr 200px 100px auto; } .linerow.s5 { grid-template-columns: 2fr 1fr 1fr 1fr auto; }
.linerow.head small { align-self: end; font-weight: 600; }
.shiprow { display: grid; grid-template-columns: minmax(170px, 1.7fr) minmax(90px, 1fr) 136px 136px 84px 84px 96px auto; gap: 8px; margin-bottom: 8px; min-width: 900px; }
.shiprow.head small { align-self: end; font-weight: 600; } .shipwrap { overflow: auto; margin-bottom: 8px; }
.chk { display: flex !important; grid-template-columns: none; align-items: center; gap: 10px; } .chk span { font-size: 13.5px !important; font-weight: 550 !important; color: var(--text) !important; }

/* ---------------------------------------------------------------- login */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: #fff; }
.login .brandside { position: relative; overflow: hidden; color: #c8d3e3; padding: 56px 72px 44px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 16px),
    radial-gradient(640px 420px at 100% 100%, rgba(176, 137, 79, .20), transparent 65%),
    radial-gradient(520px 380px at 0% 0%, rgba(36, 80, 138, .45), transparent 65%),
    linear-gradient(160deg, var(--navy-900), var(--navy-950)); }
.login .brandside::after { content: ""; position: absolute; top: 0; bottom: 0; right: 0; width: 1px; background: linear-gradient(180deg, transparent, var(--gold), transparent); opacity: .7; }
.login .brandside .mark { position: absolute; right: -140px; bottom: -140px; width: 560px; height: 560px; opacity: .05; filter: brightness(0) invert(1); pointer-events: none; }
.login .bs-top { display: flex; align-items: center; gap: 14px; position: relative; }
.login .co-name b { display: block; color: #fff; font: 600 clamp(15px, 1.45vw, 20px)/1.15 var(--serif); letter-spacing: .06em; white-space: nowrap; }
.login .co-name span { display: block; color: var(--gold-300); font-size: 10.5px; letter-spacing: .2em; margin-top: 6px; font-weight: 600; white-space: nowrap; }
.login .since { display: inline-flex; align-items: center; gap: 10px; color: var(--gold-300); font: italic 400 17px/1 var(--serif); letter-spacing: .04em; margin: -4px 0 18px; }
.login .since::before { content: ""; width: 28px; height: 1px; background: var(--gold); }
.login .partners { position: relative; }
.login .partners .p-head { color: var(--gold-300); font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; gap: 12px; }
.login .partners .p-head::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(176, 137, 79, .6), transparent); }
.login .partners .p-row { display: flex; flex-wrap: wrap; gap: 10px; }
.login .ptile { height: 58px; min-width: 104px; max-width: 168px; padding: 9px 14px; border-radius: 10px; background: #fff; display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0, 0, 0, .25), inset 0 0 0 1px rgba(176, 137, 79, .25); transition: transform .2s var(--ease), box-shadow .2s var(--ease); text-decoration: none; }
.login .ptile:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 0, 0, .3), inset 0 0 0 1px var(--gold); }
.login .ptile img { max-width: 100%; max-height: 40px; object-fit: contain; image-rendering: auto; }
.login .ptile.text span { color: var(--navy-900); font: 600 13px/1.2 var(--serif); text-align: center; letter-spacing: .01em; }
.login .mobile-brand, .login .mobile-partners { display: none; }
.login .roundel { width: 58px; height: 58px; border-radius: 50%; background: #fff; display: grid; place-items: center; overflow: hidden; box-shadow: 0 0 0 2px rgba(176, 137, 79, .7), 0 0 0 7px rgba(176, 137, 79, .12); }
.login .roundel img { width: 54px; height: 54px; object-fit: contain; border-radius: 50%; }
.login .bs-mid { position: relative; max-width: 520px; }
.login .bs-mid .eyebrow { color: var(--gold-300); }
.login .brandside h2 { color: #fff; font: 600 48px/1.08 var(--serif); letter-spacing: -.015em; margin: 4px 0 18px; }
.login .brandside h2 em { font-style: italic; font-weight: 400; color: var(--gold-300); }
.login .brandside p { max-width: 46ch; color: #b6c3d6; font-size: 16px; line-height: 1.6; }
.login .bs-points { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 10px; }
.login .bs-points li { display: flex; align-items: center; gap: 12px; color: #d4dce8; font-size: 14px; }
.login .bs-points li::before { content: ""; width: 18px; height: 1px; background: var(--gold); flex: none; }
.login .brandside small { position: relative; color: #7f8ea6; font-size: 12px; letter-spacing: .02em; }
.login .formside { display: grid; place-items: center; padding: 40px; position: relative; background: radial-gradient(600px 400px at 50% 40%, var(--gold-50), #fff 70%); }
.login .box { width: min(400px, 100%); position: relative; }
.login .box h1 { font: 600 36px/1.1 var(--serif); color: var(--navy-900); letter-spacing: -.01em; }
.login .box > p { color: var(--mute); margin: 10px 0 30px; font-size: 15px; }
.login .box .form { gap: 16px; }
.login .box input { min-height: 46px; font-size: 15px; }
.login .box .btn { width: 100%; padding: 13px; font-size: 15px; border-radius: 10px; margin-top: 6px; }
.login .secure { display: flex; align-items: center; gap: 8px; margin-top: 22px; font-size: 12.5px; color: var(--mute); }
.login .secure svg { width: 15px; height: 15px; color: var(--gold-600); }
.mobile-logo { display: none; }

.toast { position: fixed; right: 24px; bottom: 24px; background: var(--navy-900); color: #fff; padding: 13px 18px 13px 16px; border-radius: 10px; z-index: 99; font-weight: 550; box-shadow: var(--sh-float); border-left: 3px solid var(--gold); animation: pop .2s var(--ease); }
.toast.bad { background: var(--bad); border-left-color: #ffb3b9; }
.printhead { display: none; }

/* ---------------------------------------------------------------- accounts */
.stl { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line-2); font-size: 13.5px; }
.stl.tot { border-top: 2px solid var(--navy-800); border-bottom: 0; margin-top: 6px; font-weight: 700; color: var(--ink); }
.vrows { display: grid; gap: 8px; } .vrow { display: grid; grid-template-columns: auto 1fr 150px auto; gap: 8px; align-items: center; } .vrow:not(:has(select)) { grid-template-columns: 1fr 150px auto; }
.vhead { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 650; color: var(--mute); }
.vtot { text-align: right; white-space: pre; font-weight: 600; } .picker input { width: 100%; }
.seasonstrip { display: flex; gap: 6px; align-items: flex-end; height: 86px; margin: 0 0 14px; padding: 10px 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; max-width: 420px; }
.sbar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; } .sbar i { display: block; width: 100%; background: var(--navy-700); border-radius: 3px 3px 0 0; min-height: 2px; } .sbar small { font-size: 10px; color: var(--mute); font-weight: 600; text-transform: uppercase; }

/* bank reconciliation and closing the books (v2.0) */
.recsum { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; overflow: hidden; margin-bottom: 16px; box-shadow: var(--sh-2); }
.recsum > div { padding: 16px 18px; border-right: 1px solid var(--line-2); }
.recsum > div:last-child { border-right: 0; }
.recsum span { display: block; font-size: 11px; color: var(--mute); font-weight: 650; text-transform: uppercase; letter-spacing: .07em; }
.recsum b { display: block; font-size: 20px; color: var(--ink); font-weight: 650; margin-top: 4px; font-variant-numeric: tabular-nums; }
.recsum .ok b { color: var(--good); } .recsum .off b { color: var(--bad); }
.recsum .eq { background: var(--sunk); }
.lockcard { display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center; }
.lockcard .lk { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; background: var(--gold-50); color: var(--gold-600); border: 1px solid var(--gold-100); }
.lockcard .lk svg { width: 26px; height: 26px; }
.lockcard h2 { font: 600 24px/1.2 var(--serif); }
.months { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.months button { border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 10px 12px; text-align: left; cursor: pointer; font: inherit; color: var(--ink); }
.months button small { display: block; font-size: 11.5px; }
.months button.locked { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }
.months button.locked small { color: var(--gold-300); }
.months button:hover:not(.locked) { border-color: var(--gold-300); background: var(--gold-50); }

/* offline bar, signatures */
#offline-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; gap: 12px; align-items: center; justify-content: center; padding: 8px 16px; font-size: 13px; background: var(--navy-800); color: #fff; }
#offline-bar.off { background: #7a5a12; } #offline-bar.bad { background: #8a2a2a; }
#offline-bar button { border: 1px solid rgba(255, 255, 255, .6); background: transparent; color: #fff; border-radius: 6px; padding: 3px 10px; cursor: pointer; }
#offline-bar[hidden], #offline-bar button[hidden] { display: none; }
.offrow { display: grid; gap: 4px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.sigbox { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 28px; }
.sigbox div { border-top: 1px solid currentColor; padding-top: 6px; min-height: 70px; }

/* Ask SPK */
.ai-hero { margin-bottom: 20px; background: linear-gradient(135deg, var(--gold-50), #fff 60%); border-color: var(--gold-100); }
.ai-brief p { margin: 0 0 8px; max-width: 80ch; line-height: 1.6; }
.ai-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.ai-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.ai-thread { display: flex; flex-direction: column; gap: 12px; max-height: 60vh; overflow: auto; margin-bottom: 12px; }
.ai-msg { padding: 10px 14px; border-radius: 12px; max-width: 100%; }
.ai-msg.me { align-self: flex-end; background: var(--navy-800); color: #fff; max-width: 85%; border-bottom-right-radius: 4px; }
.ai-msg.bot { align-self: stretch; background: var(--sunk); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.ai-text p { margin: 0 0 6px; line-height: 1.55; } .ai-text ul { margin: 0 0 6px 18px; padding: 0; }
.ai-table { margin-top: 10px; } .ai-table h4 { margin: 0 0 6px; font-size: 12px; color: var(--mute); font-weight: 650; text-transform: uppercase; letter-spacing: .06em; }
.ai-how, .ai-note { display: block; margin-top: 8px; color: var(--mute); font-size: 12px; }
.ai-wait { color: var(--mute); }
.ai-form { display: flex; gap: 8px; } .ai-form input { flex: 1; min-width: 0; }
.ai-sub { margin: -8px 0 12px; color: var(--mute); font-size: 13px; }
.ai-card { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; overflow: hidden; background: #fff; }
.ai-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 14px; border: 0; background: transparent; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.ai-item:hover { background: var(--sunk); } .ai-item-t { flex: 1; font-weight: 600; } .ai-item-c { color: var(--mute); font-variant-numeric: tabular-nums; }
.ai-detail { padding: 0 14px 14px; } .ai-detail p { margin: 0 0 8px; color: var(--mute); font-size: 13px; line-height: 1.5; } .ai-detail[hidden] { display: none; }

/* partners */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.pcard { display: flex; flex-direction: column; gap: 16px; color: inherit; transition: border-color .2s, box-shadow .2s, transform .2s var(--ease); }
a.pcard:hover { border-color: var(--gold-300); box-shadow: var(--sh-float); transform: translateY(-2px); color: inherit; }
.pcard:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.phead2 { display: flex; align-items: center; gap: 14px; }
.phead2 b { display: block; font: 600 17px/1.25 var(--serif); color: var(--ink); }
.phead2 small, .pmini small { color: var(--mute); font-size: 12px; }
.plogo { width: 54px; height: 54px; border-radius: 12px; object-fit: contain; background: #fff; border: 1px solid var(--line); flex: none; }
.plogo.ph { display: grid; place-items: center; background: var(--navy-900); color: var(--gold-300); font: 600 19px var(--serif); border-color: var(--navy-900); }
.plogo.big { width: 88px; height: 88px; border-radius: 16px; font-size: 30px; }
.pmini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.pmini > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pmini b { font-size: 15px; color: var(--ink); }
.phero { display: flex; align-items: center; gap: 22px; margin-bottom: 14px; }
.ptitle h2 { margin: 0 0 4px; font: 600 26px/1.2 var(--serif); }
.ptitle .row { margin-top: 10px; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; align-items: center; margin-bottom: 14px; }

/* products, documents, customers, price lists */
.pdocs { display: grid; gap: 14px; }
.artrow { align-items: center; gap: 16px; }
.artwork { width: 120px; height: 120px; object-fit: contain; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.artwork.ph { display: grid; place-items: center; color: var(--mute); font-size: 12px; text-align: center; background: var(--sunk); }
.card .form + .row, .card .form + .row.end { margin-top: 16px; }
.cstack { display: grid; gap: 16px; min-width: 0; grid-template-columns: minmax(0, 1fr); } .cstack > * { min-width: 0; }
.agebar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--line-2); margin: 6px 0 10px; gap: 2px; }
.agebar .seg { background: var(--navy-700); min-width: 4px; } .agebar .seg.warn { background: #d49a2a; } .agebar .seg.bad { background: var(--bad); }
.agekey { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12.5px; color: var(--mute); margin-bottom: 14px; }
.agekey .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--navy-700); margin-right: 6px; } .agekey .dot.warn { background: #d49a2a; } .agekey .dot.bad { background: var(--bad); }
.minibars { display: flex; align-items: flex-end; gap: 8px; height: 130px; }
.minibars .mb { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 6px; }
.minibars .mb i { display: block; width: 100%; max-width: 36px; background: linear-gradient(180deg, var(--navy-600), var(--navy-800)); border-radius: 5px 5px 2px 2px; }
.minibars .mb span { font-size: 11px; color: var(--mute); }
.psteps { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.pstep { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fff; min-width: 0; overflow-wrap: anywhere; }
.pstep.done { border-color: rgba(27, 122, 78, .35); background: #f3faf6; }
.pstep b { display: block; margin-bottom: 2px; }
.pcodes { display: flex; gap: 28px; flex-wrap: wrap; align-items: center; }
.pqr { width: 190px; height: 190px; } .pqr svg { width: 100%; height: 100%; display: block; border: 1px solid var(--line); border-radius: 6px; }
.pbar { width: min(420px, 100%); } .pbar svg { width: 100%; height: 90px; display: block; border: 1px solid var(--line); border-radius: 6px; }
.pcode { text-align: center; font: 600 15px ui-monospace, monospace; letter-spacing: 1px; margin-top: 6px; }

/* QR attendance */
.ck-card { max-width: 520px; display: grid; gap: 10px; }
.kiosk-body { background: var(--navy-950); }
.kiosk { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 24px; text-align: center; color: #fff; }
.kiosk h1 { color: #fff; margin: 0; font: 600 clamp(28px, 5vw, 48px) var(--serif); }
.kiosk .kb { margin: 0; font-size: 20px; opacity: .8; }
.kiosk .kq { width: min(78vmin, 560px); aspect-ratio: 1; background: #fff; border-radius: 14px; padding: 8px; box-shadow: 0 0 0 3px var(--gold); }
.kiosk .kq svg { width: 100%; height: 100%; display: block; }
.kiosk .kc { margin: 0; font-size: 26px; font-variant-numeric: tabular-nums; }
.kiosk .kh { margin: 0; max-width: 520px; opacity: .8; font-size: 18px; }
.kiosk .kclock { font-size: 20px; opacity: .6; font-variant-numeric: tabular-nums; }
.kiosk .err { color: #ffb4a8; min-height: 1.2em; }

/* public document check page */
.verify-body { background: var(--paper); }
.verify { min-height: 100vh; display: grid; align-content: start; justify-items: center; gap: 16px; padding: 28px 16px; }
.verify .vhead { display: flex; align-items: center; gap: 12px; width: min(460px, 100%); justify-content: flex-start; }
.vhead .vlogo { width: 46px; height: 46px; object-fit: contain; }
.verify .vhead b { display: block; color: var(--navy-900); font: 600 18px var(--serif); }
.verify .vhead span { color: var(--mute); font-size: 13px; }
.vhead > div { flex: 1; text-align: left; }
.vcard { width: min(460px, 100%); background: #fff; border-radius: 14px; padding: 22px 22px 14px; box-shadow: var(--sh-float); border-top: 4px solid var(--gold); }
.vstate { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.vstate h1 { margin: 0; font: 600 22px var(--serif); }
.vmark { width: 38px; height: 38px; border-radius: 50%; display: grid; place-content: center; font-size: 22px; font-weight: 700; color: #fff; flex: none; }
.vstate.good .vmark { background: var(--good); } .vstate.warn .vmark { background: #b45309; } .vstate.bad .vmark { background: var(--bad); }
.vsub, .vwarn { color: var(--text); margin: 0 0 14px; } .vwarn { color: #92400e; font-weight: 600; }
.verify .vrow { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-top: 1px solid var(--line-2); font-size: 14px; }
.verify .vrow span { color: var(--mute); } .verify .vrow b { text-align: right; color: var(--ink); }
.vwait { color: var(--mute); } .vfoot { width: min(460px, 100%); color: var(--mute); font-size: 12px; text-align: center; margin: 0; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1180px) { .dash2 { grid-template-columns: 1fr; } .dash3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .jump { min-width: 0; } .jump span, .jump kbd { display: none; } }
@media (max-width: 1024px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 284px; transform: translateX(-100%); transition: transform .28s var(--ease); z-index: 40; }
  body.nav-open .side { transform: none; box-shadow: 8px 0 40px rgba(6, 20, 40, .5); }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(6, 20, 40, .55); backdrop-filter: blur(3px); z-index: 35; }
  .burger { display: grid; }
  .topbar { padding: 0 16px; height: 58px; }
  .main { padding: 22px 16px 80px; }
  .today { display: none; }
  .login { grid-template-columns: 1fr; padding: 20px; background: linear-gradient(160deg, var(--navy-900), var(--navy-950)); }
  .login .brandside { display: none; }
  .login .formside { width: 100%; max-width: 440px; margin: auto; border-radius: 18px; padding: 36px 24px; background: #fff; box-shadow: 0 20px 40px rgba(0, 0, 0, .4); }
  .login { align-content: start; gap: 22px; padding: 28px 16px 32px; }
  .login .mobile-brand { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; color: #fff; max-width: 440px; width: 100%; margin: 0 auto; }
  .login .mobile-brand .roundel { width: 64px; height: 64px; }
  .login .mobile-brand .roundel img { width: 60px; height: 60px; }
  .login .mobile-brand .co-name b { font-size: clamp(13px, 4.2vw, 18px); white-space: normal; }
  .login .mobile-brand .co-name span { font-size: 9.5px; letter-spacing: .16em; }
  .login .mb-tag { font: 600 clamp(22px, 6.6vw, 28px)/1.2 var(--serif); color: #fff; margin-top: 6px; }
  .login .mb-tag em { font-style: italic; font-weight: 400; color: var(--gold-300); }
  .login .mb-tag span, .login .mb-tag em { display: block; }
  .login .mobile-partners .p-head { justify-content: center; }
  .login .mobile-partners .p-head::before { content: ""; flex: 1; height: 1px; background: linear-gradient(270deg, rgba(176, 137, 79, .6), transparent); }
  .login .mobile-brand .since { margin: 0; font-size: 15px; }
  .login .mobile-brand .since::after { content: ""; width: 28px; height: 1px; background: var(--gold); }
  .login .mobile-partners { display: block; max-width: 440px; width: 100%; margin: 0 auto; }
  .login .mobile-partners .p-row { justify-content: center; }
  .login .mobile-partners .ptile { height: 52px; min-width: 92px; max-width: 140px; }
  .login .mobile-partners .ptile img { max-height: 34px; }
  .login .formside { margin: 0 auto; }
}
@media (max-width: 760px) {
  .dash3 { grid-template-columns: 1fr; } .span2 { grid-column: auto; }
  .phead { flex-direction: column; align-items: flex-start; gap: 14px; }
  .phead .row { width: 100%; } .phead .row .btn { flex: 1; }
  .sect { flex-direction: column; align-items: flex-start; } .sect .btn { width: 100%; }
  .lockcard { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; } .kpi { padding: 14px; } .kpi .v { font-size: 21px; } .kpi .tile { display: none; }
  .phead h1 { font-size: 25px; }
  .hero { padding: 24px 20px; border-radius: 14px; } .hero h1 { font-size: 24px; } .hero p { font-size: 13.5px; }
  .hero select, .hero input { min-width: 0; width: 100%; } .hero .filters label { flex: 1 1 100%; }
  .userchip .who { display: none; } .userchip > button { padding: 4px; } .userchip > button > svg { display: none; }
  input[type=search] { min-width: 0; width: 100%; }
  .toolbar { flex-direction: column; align-items: stretch; gap: 10px; } .toolbar > * { flex: 1 1 100%; }
  .ncv3 { grid-template-columns: 1fr; }
  input, select, textarea, .btn { min-height: 44px; }
  .card { padding: 16px; border-radius: 12px; }
  .kv { grid-template-columns: 1fr 1fr; gap: 12px 16px; }
  .donutwrap { grid-template-columns: 1fr; justify-items: center; }
  dialog.modal { width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; display: flex; flex-direction: column; }
  dialog.modal > h3 { padding: 16px 20px 12px; font-size: 18px; flex-shrink: 0; }
  dialog.modal > form.form { margin: 16px 20px 24px !important; flex: 1; overflow-y: auto; }
  dialog.modal.wide .form { grid-template-columns: 1fr; }
  .row { flex-direction: column; align-items: stretch; gap: 10px; }
  .linerow { grid-template-columns: 1fr 80px auto !important; }
  .vrow, .vrow:not(:has(select)) { grid-template-columns: 1fr 110px auto; }
  .toast { left: 16px; right: 16px; bottom: 16px; text-align: center; }
  .phero { flex-direction: column; align-items: flex-start; } .pmini { grid-template-columns: 1fr 1fr; }
  .steps { width: 100%; }
}
@media (max-width: 900px) { .ai-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------------------------------------------------------------- print (Export PDF) */
@media print {
  @page { size: A4 landscape; margin: 12mm; }
  body { background: #fff; font-size: 11px; }
  .side, .topbar, .scrim, .toolbar, .phead .row, .note, .toast, .hero .filters, .tblbar, #offline-bar { display: none !important; }
  .shell { display: block; } .main { padding: 0; max-width: none; animation: none; }
  .phead { border: 0; padding: 0; margin-bottom: 10px; } .eyebrow { display: none; }
  .card, .tblwrap { box-shadow: none; border-color: #ccd3df; }
  .tblwrap { overflow: visible; }
  .tbl th { position: static; } .tbl th, .tbl td { padding: 6px 8px; font-size: 10.5px; }
  .tbl tr.tot td { background: #0a1d38 !important; color: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .tbl .g-com, .tbl .g-foc, .tbl .g-smp, .tbl .g-ncv, .tbl tr.grp td, .pct, .badge, .hero, .kpi::before { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .printhead { display: block; margin-bottom: 10px; font-size: 11px; color: #46566f; }
  .printhead b { display: block; font-size: 15px; color: #0e1b30; }
  .psteps { break-inside: avoid; }
}

/* ---------- v2.1 Burmese ---------- */
html[lang="my"] * { letter-spacing: 0 !important; }
html[lang="my"] body { line-height: 1.75; }
html[lang="my"] h1, html[lang="my"] h2, html[lang="my"] h3, html[lang="my"] .phead h1, html[lang="my"] .hero h1, html[lang="my"] .login .brandside h2, html[lang="my"] .login .box h1 { line-height: 1.5; }
html[lang="my"] .phead h1 { font-size: 26px; }
html[lang="my"] .login .brandside h2 { font-size: 38px; }
html[lang="my"] .tbl th, html[lang="my"] .tbl td { line-height: 1.6; }
html[lang="my"] .kpi .l, html[lang="my"] .tbl th, html[lang="my"] .eyebrow, html[lang="my"] .kv > div > span:first-child, html[lang="my"] .toolbar label, html[lang="my"] .recsum span { font-size: 12px; }
html[lang="my"] .btn, html[lang="my"] a.nav, html[lang="my"] .ghead { line-height: 1.6; }
.langsw { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; }
.langsw button { all: unset; cursor: pointer; padding: 4px 10px; font-size: 12px; font-weight: 600; color: var(--mute); line-height: 1.6; }
.langsw button.on { background: var(--navy-900); color: #fff; }
.langsw button:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.login .langsw { position: absolute; top: 18px; right: 18px; }
.menulang { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); margin: 4px 0; }
.menulang small { color: var(--mute); font-size: 12px; }
@media (max-width: 900px) { .toplang { display: none; } }

/* ---------- v2.1.1 Title Case on headings and sub-headings (English only; Burmese is unaffected) ---------- */
.ghead span, a.nav .nl, .crumbs span, .crumbs b, .phead h1, .hero h1, h2, h3, h4, .fsec, .pal-t, .pal-item small,
dialog.modal > h3, .tabs a, legend, summary { text-transform: capitalize; }
.setlogo { width: 64px; height: 64px; object-fit: contain; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.plogo.sm { width: 28px; height: 28px; font-size: 11px; border-radius: 8px; }
.settabs { margin-bottom: 14px; }
.settabs a.chip { text-decoration: none; }
dialog.modal.wide { width: min(1040px, 96vw); }
.muted { color: var(--mute); margin: 4px 0 12px; }
.recsum b.ok { color: var(--good, #0b7a4b); } .recsum b.bad { color: var(--bad, #b42335); }
.linerow.s6 { grid-template-columns: 1fr 170px 90px 90px auto; }
.voided { margin-top: 10px; } .voided summary { cursor: pointer; color: var(--mute); font-size: 13px; }

/* v2.2: dialogs built around their own form */
dialog.modal > form.dlgform { margin: 18px 26px 22px !important; display: grid; gap: 14px; }
.recsum { display: flex; gap: 8px; justify-content: flex-end; align-items: baseline; padding: 8px 2px; }
.chip .x { border: 0; background: none; margin-left: 4px; cursor: pointer; color: var(--muted, #667); font-size: 14px; }
/* v2.4 Partner showcase */
.sc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.sc-card { display: flex; flex-direction: column; gap: 12px; }
.sc-card.off { opacity: .6; }
.sc-logo { height: 96px; border-radius: 10px; background: #fff; border: 1px solid var(--line, #e5e7eb); display: grid; place-items: center; padding: 14px; }
.sc-logo img { max-width: 100%; max-height: 64px; object-fit: contain; }
.sc-logo span { font: 600 15px/1.2 var(--serif); color: var(--navy-900); text-align: center; }
.sc-body { display: grid; gap: 6px; }
