/* CHC Procurement Assistant · Sitaram Enterprise
 * Colours from the Sitaram Enterprise banner: navy, teal, marigold.
 * One family (Anek Gujarati) used at different widths: wide and heavy for the CHC name, normal for text.
 * The CHC "file cover" at the top of the app is the one loud element; everything else stays calm.
 */
:root {
  --navy: #0c2447;
  --navy-2: #163d73;
  --teal: #0b8582;
  --teal-d: #086b69;
  --teal-tint: #e4f3f2;
  --gold: #f2b416;
  --gold-tint: #fff5d9;
  --canvas: #edf1f7;
  --sheet: #ffffff;
  --line: #dbe2ec;
  --line-2: #c4cedc;
  --ink: #0f1f38;
  --ink-2: #43536b;
  --ink-3: #6a7a91;
  --bad: #be3222;
  --bad-tint: #fdecea;
  --ok: #127a4b;
  --ok-tint: #e6f4ec;
  --warn: #8a5a00;
  --word: #2b579a;
  --excel: #1d6f42;
  --r-cover: 20px;
  --r-sheet: 14px;
  --r-ctl: 8px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --font: 'Anek Gujarati', 'Nirmala UI', 'Shruti', 'Noto Sans Gujarati', system-ui, sans-serif;
  --side-w: 264px;
  --rail-w: 344px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 400 15.5px/1.55 var(--font); font-stretch: 100%; }
img { max-width: 100%; }
a { color: var(--teal-d); }
h1, h2, h3 { margin: 0; line-height: 1.2; }
button, input, select, textarea { font: inherit; color: inherit; }
.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gu { font-weight: 400; color: var(--ink-3); }
:focus-visible { outline: 3px solid rgba(11, 133, 130, .45); outline-offset: 2px; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; padding: 20px 16px 16px; background: var(--sheet); border-right: 1px solid var(--line); overflow-y: auto; }
.side-brand { display: block; padding: 4px 0 0; }
.brand-plaque { display: inline-flex; padding: 10px 16px; border-radius: 16px; background: linear-gradient(150deg, rgba(255, 255, 255, .92), rgba(255, 255, 255, .62)); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, .7); box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 10px 24px rgba(12, 36, 71, .1); }
.brand-plaque img { display: block; width: 176px; height: auto; }
.side-product { margin: 4px 8px 20px; font-size: 13px; color: var(--ink-3); }
.side-nav { display: grid; gap: 6px; }
.module-tab { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 0; border-radius: 12px; background: transparent; text-align: left; cursor: pointer; color: var(--ink-2); transition: background-color .2s var(--ease), color .2s var(--ease); }
.module-tab .i { width: 20px; height: 20px; }
.module-tab span { display: grid; line-height: 1.25; }
.module-tab b { font-weight: 600; font-size: 15.5px; color: var(--ink); }
.module-tab small { font-size: 13px; color: var(--ink-3); }
.module-tab:hover { background: var(--canvas); }
.module-tab[aria-selected="true"] { background: var(--navy); color: #fff; }
.module-tab[aria-selected="true"] b { color: #fff; }
.module-tab[aria-selected="true"] small { color: #b9c8de; }
.module-tab[aria-selected="true"]::before { content: ""; position: absolute; left: -16px; top: 12px; bottom: 12px; width: 4px; border-radius: 0 4px 4px 0; background: var(--gold); }

.side-account { display: grid; gap: 2px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.side-account:empty { display: none; }
.acct { display: flex; align-items: center; gap: 12px; padding: 4px 14px 10px; }
.acct > .i { width: 34px; height: 34px; padding: 8px; border-radius: 50%; background: var(--teal-tint); color: var(--teal-d); }
.acct span { display: grid; line-height: 1.25; min-width: 0; }
.acct small { font-size: 12.5px; color: var(--ink-3); }
.acct b { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.side-link { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 40px; padding: 8px 14px; border: 0; border-radius: 10px; background: none; color: var(--ink-2); text-decoration: none; text-align: left; cursor: pointer; }
.side-link:hover { background: var(--canvas); color: var(--ink); }
.side-link[aria-current="page"] { background: var(--navy); color: #fff; }

.side-promo { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px 16px 22px; border-radius: 18px; text-align: center; text-decoration: none; color: var(--ink);
  background: linear-gradient(165deg, var(--teal-tint) 0%, #fff 72%); border: 1px solid rgba(12, 36, 71, .08);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 12px 28px rgba(12, 36, 71, .07);
  transition: box-shadow .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease); }
.side-promo:hover { border-color: rgba(11, 133, 130, .3); box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 16px 32px rgba(12, 36, 71, .12); transform: translateY(-1px); }
.promo-plaque { display: block; padding: 2px; }
.promo-plaque img { display: block; width: 136px; height: auto; }
.promo-icons { display: flex; gap: 8px; }
.picon { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: #fff; box-shadow: 0 4px 10px rgba(12, 36, 71, .18); }
.picon .i { width: 17px; height: 17px; stroke-width: 2.1; }
.picon-navy { background: var(--navy); }
.picon-teal { background: var(--teal); }
.picon-gold { background: var(--gold); color: var(--navy); }
.promo-title { font-size: 14.5px; font-weight: 700; color: var(--ink); }
.promo-sub { font-size: 12.5px; color: var(--ink-3); line-height: 1.4; }
.side-scrim { position: fixed; inset: 0; z-index: 40; background: rgba(8, 20, 40, .45); }

.main { min-width: 0; padding: 0 32px 32px; }
.topbar { display: flex; align-items: center; gap: 16px; min-height: 76px; padding: 16px 0; }
.topbar-title { min-width: 0; flex: 1; }
.topbar-title h1 { font-size: 24px; font-weight: 700; font-stretch: 108%; letter-spacing: -.01em; }
.topbar-title p { margin: 2px 0 0; color: var(--ink-3); font-size: 14px; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.menu-btn { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 10px; background: var(--sheet); cursor: pointer; }
.save-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 12px; border-radius: 999px; background: var(--sheet); border: 1px solid var(--line); font-size: 13px; color: var(--ink-3); }
.save-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.save-chip.ok::before { background: var(--ok); }
.save-chip.bad { color: var(--bad); border-color: rgba(190, 50, 34, .35); }
.save-chip.bad::before { background: var(--bad); }

/* ---------- CHC file cover ---------- */
.cover { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 520px); align-items: center; gap: 32px; margin-bottom: 24px; padding: 32px 36px 40px; border-radius: var(--r-cover); background: var(--navy); color: #fff; overflow: hidden; isolation: isolate; }
.cover::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(115deg, var(--navy) 35%, var(--navy-2) 100%); }
.cover-kicker { margin: 0 0 4px; font-size: 15px; color: #b9c8de; }
.cover-name { font-size: clamp(40px, 5vw, 64px); font-weight: 760; font-stretch: 118%; line-height: 1.05; letter-spacing: -.01em; }
.cover-sub { margin: 10px 0 0; font-size: 15.5px; color: #d6e0ee; }
.cover-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip { display: inline-flex; align-items: center; min-height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .06); font-size: 13.5px; color: #e8eef7; }
.chip-warn { border-color: var(--gold); background: var(--gold); color: var(--navy); font-weight: 600; cursor: pointer; }
button.chip-warn:hover { background: #ffc93b; }
.cover-slip { margin: 0; padding: 10px; border-radius: 6px; background: #fff; box-shadow: 0 22px 44px rgba(3, 12, 30, .45); transform: translateY(4px); }
.cover-slip img { display: block; width: 100%; height: auto; }
.cover-swoosh { position: absolute; left: 0; right: 0; bottom: 0; z-index: -1; width: 100%; height: 72px; fill: none; stroke: var(--gold); stroke-width: 3; opacity: .9; }

/* ---------- workspace: form + rail ---------- */
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) var(--rail-w); gap: 24px; align-items: start; }
.work-main { display: grid; gap: 16px; min-width: 0; }
.rail { position: sticky; top: 16px; display: grid; gap: 16px; }
#moduleGtr > .sheet { margin-bottom: 16px; }

.sheet { padding: 24px 28px 28px; border-radius: var(--r-sheet); background: var(--sheet); border: 1px solid var(--line); }
.section-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.section-head h2 { font-size: 19px; font-weight: 650; }
.section-head h2 .gu, .rail-card h2 .gu { margin-left: 6px; font-size: .85em; }
.step { display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 650; font-size: 14.5px; }
.hint { margin: 0 0 16px; color: var(--ink-3); font-size: 14px; }
.section-head + .hint { margin-left: 42px; }
.case-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 4px; }
.case-head h2 { font-size: 17px; font-weight: 600; color: var(--ink-2); }
.notice { margin: 0; padding: 12px 16px; border-radius: 10px; border: 1px solid rgba(242, 180, 22, .6); background: var(--gold-tint); color: var(--ink); font-size: 14px; }

.rail-card { padding: 20px 22px 22px; border-radius: var(--r-sheet); background: var(--sheet); border: 1px solid var(--line); }
.rail-card h2 { margin-bottom: 12px; font-size: 16px; font-weight: 650; }
.rail-card .hint { margin-bottom: 14px; }
.rail-total { border-top: 4px solid var(--teal); }
.rail-total dl { margin: 0; display: grid; gap: 10px; }
.trow { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14px; color: var(--ink-2); }
.trow dt { margin: 0; }
.trow dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 500; color: var(--ink); text-align: right; }
.trow-main { display: grid; gap: 2px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.trow-main dd { text-align: left; font-size: 34px; font-weight: 700; font-stretch: 110%; line-height: 1.15; }
.words { display: block; margin-top: 4px; font-size: 13.5px; font-weight: 400; font-stretch: 100%; line-height: 1.45; color: var(--ink-3); }

/* ---------- fields ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px 20px; }
.field { display: grid; gap: 6px; align-content: start; min-width: 0; }
.field label { font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
input[type=text], input[type=number], input[type=password], input:not([type]), select, textarea {
  width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: var(--r-ctl); background: #fff; font-size: 16px; line-height: 1.4;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
textarea { resize: vertical; }
select { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236a7a91' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 18px; }
input:hover, select:hover, textarea:hover { border-color: #9fb0c6; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(11, 133, 130, .18); }
input::placeholder, textarea::placeholder { color: #98a5b7; }
input.invalid { border-color: var(--bad); background: var(--bad-tint); }
.date-row { position: relative; display: flex; gap: 8px; }
.date-row input[type=text] { flex: 1; font-variant-numeric: tabular-nums; }
.icon-btn { display: inline-grid; place-items: center; flex: none; width: 44px; min-height: 44px; border: 1px solid var(--line-2); border-radius: var(--r-ctl); background: #fff; color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { border-color: var(--teal); color: var(--teal-d); }
.native-date { position: absolute; right: 0; bottom: 0; width: 44px; height: 1px; opacity: 0; pointer-events: none; }
.field-msg { min-height: 0; margin: 0; font-size: 12.5px; color: var(--ink-3); }
.field-msg:empty { display: none; }
.field-msg.ok { display: none; }
.field-msg.bad { color: var(--bad); }
.unit-field input { margin-top: 6px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 1px solid transparent; border-radius: var(--r-ctl); font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease); }
.btn.primary { background: var(--teal); color: #fff; }
.btn.primary:hover { background: var(--teal-d); }
.btn.secondary { background: #fff; border-color: var(--line-2); color: var(--ink); }
.btn.secondary:hover { border-color: var(--ink-3); }
.btn.ghost { background: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--canvas); color: var(--ink); }
.btn.dashed { background: transparent; border: 1.5px dashed var(--line-2); color: var(--teal-d); }
.btn.dashed:hover { border-color: var(--teal); background: var(--teal-tint); }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.sp-mini { min-height: 32px; padding: 0 10px; font-size: 13.5px; font-weight: 500; }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.btn-row .btn { flex: 1 1 auto; }

/* ---------- GTR-44 items ---------- */
#items { display: grid; gap: 14px; }
.item-card { padding: 16px 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: #f8fafd; }
.item-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.item-no { display: inline-grid; place-items: center; flex: none; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 8px; background: var(--gold); color: var(--navy); font-weight: 700; font-size: 14px; }
.item-title { flex: 1; min-width: 0; font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-remove { color: var(--bad); }

.downloads { display: grid; gap: 6px; margin-top: 12px; }
.file-btn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; text-align: left; cursor: pointer; color: var(--ink-3); transition: border-color .15s var(--ease), background-color .15s var(--ease); }
.file-btn:hover { border-color: var(--teal); background: var(--teal-tint); color: var(--teal-d); }
.file-badge { display: inline-grid; place-items: center; flex: none; width: 30px; height: 34px; border-radius: 5px; color: #fff; font-weight: 700; font-size: 14px; }
.file-badge.docx { background: var(--word); }
.file-badge.xlsx { background: var(--excel); }
.file-name { display: grid; flex: 1; min-width: 0; line-height: 1.3; }
.file-name b { font-weight: 600; color: var(--ink); font-size: 14.5px; }
.file-name small { font-size: 12.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status { margin: 12px 0 0; font-size: 13.5px; color: var(--ink-2); }
.status:empty { display: none; }
.status.error { padding: 10px 12px; border-radius: 8px; background: var(--bad-tint); color: var(--bad); }

/* ---------- CHC choice (only without a CHC login) ---------- */
.chc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.chc-card { display: grid; gap: 2px; padding: 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; text-align: left; cursor: pointer; }
.chc-card:hover { border-color: var(--line-2); }
.chc-card.selected { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(11, 133, 130, .15); }
.chc-name-en { font-weight: 600; }
.chc-name-gu { color: var(--ink-2); }
.chc-meta { font-size: 13px; color: var(--ink-3); }
.chc-thumb { order: -1; margin-bottom: 8px; padding: 6px; border: 1px solid var(--line); border-radius: 6px; }
.chc-thumb img { display: block; width: 100%; height: auto; }
.selected-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding: 10px 14px; border-radius: 10px; background: var(--canvas); font-size: 14px; }

/* ---------- SNA-SPARSH ---------- */
.sp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px 20px; }
#spRows { display: grid; gap: 12px; }
.sp-bill { border: 1px solid var(--line); border-radius: 12px; background: #f8fafd; overflow: hidden; }
.sp-bill > header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #fff; }
.sp-bill > header b { font-weight: 650; }
.sp-cont { margin-top: -6px; border-top: 3px solid var(--gold); }
.sp-tag { font-size: 12.5px; color: var(--warn); }
.sp-actions { display: flex; gap: 4px; margin-left: auto; }
.sp-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 16px; padding: 16px 14px 18px; }
.sp-fields .w2 { grid-column: span 2; }
.sp-fields .w4 { grid-column: 1 / -1; }
.sp-net { align-content: end; padding-bottom: 10px; }
.sp-net span { font-size: 13px; color: var(--ink-3); }
.sp-net b { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sp-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.sp-bar .btn.dashed { flex: 1; }
.sp-issues { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 13.5px; }
.sp-issues li { position: relative; padding: 8px 10px 8px 28px; border-radius: 8px; line-height: 1.4; }
.sp-issues li::before { content: ""; position: absolute; left: 11px; top: 14px; width: 8px; height: 8px; border-radius: 50%; }
.sp-issues li.bad { background: var(--bad-tint); color: #8f2317; }
.sp-issues li.bad::before { background: var(--bad); }
.sp-issues li.warn { background: var(--gold-tint); color: #6b4700; }
.sp-issues li.warn::before { background: var(--gold); }
.sp-issues li.ok { background: var(--ok-tint); color: var(--ok); }
.sp-issues li.ok::before { background: var(--ok); }
.sp-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.sp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.sp-table th, .sp-table td { padding: 8px 10px; border: 1px solid var(--line); vertical-align: top; text-align: left; }
.sp-table th { background: #f1f4f9; font-weight: 600; color: var(--ink-2); font-size: 13px; }
.sp-table td small { color: var(--ink-3); }
.sp-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.sp-table input.num { min-height: 36px; padding: 6px 8px; text-align: right; }
.sp-table tfoot td { font-weight: 650; background: #f8fafd; }

.sp-doc { display: block; }
.sp-paper { max-width: 820px; margin: 0 auto; padding: 32px 36px; border: 1px solid var(--line); border-radius: 4px; background: #fff; box-shadow: 0 1px 0 var(--line), 0 12px 32px rgba(15, 31, 56, .06); font-size: 14.5px; }
.sp-head { display: block; width: 100%; height: auto; margin-bottom: 12px; }
.sp-paper ol { padding-left: 24px; line-height: 1.7; }
.sp-paper h3 { margin: 16px 0 8px; font-size: 15px; }
.sp-right { text-align: right; }
.sp-para { text-indent: 3em; text-align: justify; }
.sp-ref { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.sp-small { font-size: 13.5px; }
.sp-break { margin: 28px -36px 20px; border-top: 2px dashed var(--line-2); }
#spDoc::before { content: "Preview"; display: block; margin-bottom: 14px; font-weight: 650; font-size: 16px; }

/* ---------- dialog ---------- */
.account-dialog { width: min(560px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 16px; box-shadow: 0 24px 64px rgba(8, 20, 40, .3); color: var(--ink); }
.account-dialog::backdrop { background: rgba(8, 20, 40, .5); }
.acc-close-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 20px 24px; background: var(--navy); color: #fff; }
.acc-close-row h2 { font-size: 20px; font-weight: 700; font-stretch: 110%; }
.acc-close-row .gu { color: #b9c8de; margin-left: 6px; }
.acc-close-row .btn.ghost { color: #fff; }
.acc-close-row .btn.ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.acc-block { padding: 20px 24px; border-bottom: 1px solid var(--line); }
.acc-block:last-child { border-bottom: 0; }
.acc-block h3 { margin-bottom: 6px; font-size: 16px; font-weight: 650; }
.acc-block .grid { grid-template-columns: 1fr 1fr; }
.acc-msg { margin: 8px 0 0; min-height: 20px; font-size: 14px; color: var(--ink-2); }
.acc-msg.ok { color: var(--ok); }
.acc-msg.bad { color: var(--bad); }

/* ---------- footer ---------- */
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-3); }
.foot p { margin: 0; }
.foot a { color: var(--ink-2); text-decoration: none; }
#build { margin-left: 8px; color: #a1adbf; }

/* ---------- login ---------- */
.login-page { min-height: 100vh; background: var(--navy); }
.login-shell { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(420px, 1fr); min-height: 100vh; }
.login-brand { position: relative; display: flex; flex-direction: column; padding: 40px 56px 48px; color: #fff; overflow: hidden; isolation: isolate; background: linear-gradient(130deg, var(--navy) 40%, var(--navy-2)); }
.login-logo { align-self: flex-start; }
.login-logo img { width: 186px; height: auto; }
.login-head { margin-top: auto; max-width: 560px; }
.login-head h1 { font-size: clamp(36px, 4.2vw, 56px); font-weight: 760; font-stretch: 116%; line-height: 1.08; }
.login-head p { margin: 16px 0 0; font-size: 17px; color: #c9d6e8; max-width: 46ch; }
.login-papers { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; padding: 0; list-style: none; }
.login-papers li { padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .22); font-size: 14px; color: #e3eaf4; }
.login-promo { margin-top: 40px; max-width: 560px; }
.login-promo-frame { position: relative; border-radius: 14px; overflow: hidden; background: #fff; aspect-ratio: 16 / 9; }
.login-promo .promo-slide { position: absolute; inset: 0; }
.login-promo .promo-slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.promo-text { display: flex; flex-direction: column; justify-content: center; height: 100%; padding: 28px 32px; background: #fff; color: var(--ink); }
.promo-text h2 { font-size: 26px; font-weight: 700; font-stretch: 110%; line-height: 1.15; }
.promo-text p { margin: 10px 0 0; color: var(--ink-2); font-size: 15px; }
.promo-text .promo-call { margin-top: 18px; font-weight: 650; color: var(--teal-d); }
.promo-cats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; margin: 14px 0 0; padding: 0; list-style: none; font-size: 14.5px; color: var(--ink-2); }
.promo-cats li::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: var(--gold); vertical-align: middle; }
.carousel-controls { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.carousel-dots { display: flex; gap: 6px; }
.carousel-dot { width: 26px; height: 6px; padding: 0; border: 0; border-radius: 3px; background: rgba(255, 255, 255, .28); cursor: pointer; }
.carousel-dot.is-active { background: var(--gold); }
.carousel-arrow, .carousel-pause { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid rgba(255, 255, 255, .25); border-radius: 50%; background: transparent; color: #fff; cursor: pointer; }
.carousel-arrow:hover, .carousel-pause:hover { background: rgba(255, 255, 255, .1); }
.carousel-pause { margin-left: auto; }
.login-brand .cover-swoosh { height: 120px; bottom: 34%; opacity: .7; }

.login-panel { display: flex; flex-direction: column; justify-content: center; padding: 48px clamp(24px, 5vw, 72px); background: var(--canvas); }
.login-box { width: 100%; max-width: 420px; margin: 0 auto; }
.login-slip { margin: 0 0 24px; padding: 10px; border-radius: 8px; background: #fff; border: 1px solid var(--line); }
.login-slip img { display: block; width: 100%; height: auto; }
.login-box h2 { font-size: 30px; font-weight: 700; font-stretch: 110%; }
.login-box .lead { margin: 6px 0 24px; color: var(--ink-3); }
.login-box form { display: grid; gap: 16px; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 76px; }
.pw-toggle { position: absolute; right: 6px; top: 6px; min-height: 32px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: var(--teal-d); font-weight: 600; font-size: 13.5px; cursor: pointer; }
.pw-toggle:hover { background: var(--teal-tint); }
.login-box .btn.primary { min-height: 50px; font-size: 16px; }
.login-help { margin: 24px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-3); }
.login-help p { margin: 0 0 6px; }
.login-help b { color: var(--ink); font-weight: 600; }
.login-help code { padding: 1px 6px; border-radius: 4px; background: #fff; border: 1px solid var(--line); font-family: inherit; font-weight: 600; color: var(--ink); }

/* ---------- admin ---------- */
.admin-table td { vertical-align: middle; }
.admin-in { max-width: 120px; min-height: 38px !important; padding: 6px 10px !important; }
.admin-id { font-weight: 650; font-family: inherit; }
.admin-actions { white-space: nowrap; }
.admin-actions .btn { margin: 2px; }
.pill-ok, .pill-warn { display: inline-flex; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.pill-ok { background: var(--ok-tint); color: var(--ok); }
.pill-warn { background: var(--gold-tint); color: var(--warn); }
.admin-stack { display: grid; gap: 16px; }

/* ---------- responsive ---------- */
@media (max-width: 1240px) {
  :root { --rail-w: 312px; }
  .cover { grid-template-columns: minmax(0, 1fr) minmax(240px, 400px); }
}
@media (max-width: 1100px) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
  .sp-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: 0; bottom: 0; z-index: 50; width: min(300px, 86vw); transform: translateX(-105%); transition: transform .3s var(--ease); box-shadow: 0 0 48px rgba(8, 20, 40, .25); }
  .menu-open .side { transform: none; }
  .menu-btn { display: inline-flex; }
  .main { padding: 0 16px 24px; }
  .topbar { min-height: 64px; padding: 12px 0; gap: 12px; }
  .topbar-title h1 { font-size: 20px; }
  .topbar-title p { display: none; }
  .cover { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 24px 22px 32px; margin-bottom: 16px; }
  .cover-slip { transform: none; }
  .sheet { padding: 20px 18px 22px; }
  .section-head + .hint { margin-left: 0; }
  .login-shell { grid-template-columns: minmax(0, 1fr); }
  .login-brand { padding: 24px 20px 28px; }
  .login-head { margin-top: 28px; }
  .login-promo, .login-brand .cover-swoosh { display: none; }
  .login-panel { padding: 28px 20px 40px; }
}
@media (max-width: 560px) {
  .grid, .acc-block .grid { grid-template-columns: minmax(0, 1fr); }
  .sp-fields { grid-template-columns: minmax(0, 1fr); }
  .sp-fields .w2 { grid-column: auto; }
  .save-chip { font-size: 0; padding: 0 9px; gap: 0; }
  .case-head { flex-wrap: wrap; }
  .sp-paper { padding: 20px 16px; }
  .sp-break { margin-left: -16px; margin-right: -16px; }
  .trow-main dd { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- print (SNA-SPARSH preview) ---------- */
@media print {
  body { background: #fff; }
  .side, .side-scrim, .topbar, .cover, .foot, .rail, #moduleGtr { display: none !important; }
  .shell, .workspace { display: block; }
  .main { padding: 0; }
  #moduleSparsh .sheet:not(.sp-doc) { display: none !important; }
  .sp-doc { border: 0; padding: 0; }
  #spDoc::before { display: none; }
  .sp-paper { max-width: none; padding: 0; border: 0; box-shadow: none; }
  .sp-break { margin: 0; border: 0; break-before: page; }
  .sp-table th { background: #eee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  @page { size: A4; margin: 14mm; }
}
