/* EMON OVERRUNS E-PORTAL: desktop-accounting look (AutoCount style):
   steel-blue window chrome, green module band, grey option panels, ruled report paper. */
:root {
  --chrome-1: #dfe9f5;
  --chrome-2: #b9cde6;
  --chrome-line: #8eaacb;
  --title-1: #3d6db5;
  --title-2: #1f4a8c;
  --band-1: #c7e46f;
  --band-2: #6fae2c;
  --band-ink: #ffffff;
  --panel: #eef3fa;
  --panel-line: #a9bfd9;
  --grid-head: #dbe6f3;
  --grid-alt: #f4f8fc;
  --grid-sel: #fdf3c4;
  --ink: #1b2533;
  --ink-soft: #55657a;
  --paper: #ffffff;
  --desk: #9aa3ad;
  --ok: #2f7d32;
  --warn: #b7791f;
  --bad: #b3261e;
  --tip: #ffe3f1;
  --font-ui: "Tahoma", "Segoe UI", "Verdana", sans-serif;
  --font-report: "Arial", "Helvetica Neue", Helvetica, sans-serif;
  --font-mono: "Courier New", "Courier", monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  font: 13px/1.4 var(--font-ui);
  color: var(--ink);
  background: var(--chrome-1);
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--title-2); }
:focus-visible { outline: 2px solid #f0a500; outline-offset: 1px; }

/* ---------- Window frame ---------- */
.titlebar {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 16px;
  background: linear-gradient(var(--title-1), var(--title-2));
  color: #fff; font-weight: bold; font-size: 13px;
}
.titlebar .logo {
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  background: #fff; color: var(--title-2); font-size: 11px; font-weight: bold;
}
.titlebar .who { margin-left: auto; font-weight: normal; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.titlebar .who button { background: transparent; border: 1px solid rgba(255,255,255,.6); color: #fff; padding: 1px 8px; cursor: pointer; border-radius: 2px; }

.menubar {
  display: flex; flex-wrap: wrap; gap: 2px;
  padding: 3px 12px;
  background: linear-gradient(#f3f7fc, var(--chrome-2));
  border-bottom: 1px solid var(--chrome-line);
}
.menubar a {
  padding: 3px 10px; text-decoration: none; color: var(--ink);
  border: 1px solid transparent; border-radius: 2px;
}
.menubar a:hover { border-color: var(--chrome-line); background: #fff8d8; }
.menubar a.active { border-color: #d9a400; background: #ffe58f; }
.menubar a u { text-decoration: underline; }

.band {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px;
  background: linear-gradient(var(--band-1), var(--band-2));
  color: var(--band-ink);
  text-shadow: 0 1px 1px rgba(0,0,0,.35);
}
.band h1 { margin: 0; font-size: 24px; font-weight: bold; }
.band .help {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: radial-gradient(circle at 35% 35%, #8fc0ff, #1f5fbf);
  border: 2px solid #fff; font-weight: bold; font-size: 16px; text-shadow: none;
}

main { padding: 10px 16px 40px; }
.hint { background: #fff; border: 1px solid var(--panel-line); padding: 4px 8px; margin-bottom: 8px; }
.hint b { color: var(--title-2); }

/* ---------- Option panels ---------- */
.options { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; margin-bottom: 8px; }
fieldset.opt {
  margin: 0; padding: 6px 10px 8px;
  border: 1px solid var(--panel-line); background: var(--panel);
  min-width: 0;
}
fieldset.opt legend { padding: 0 4px; color: var(--title-2); font-weight: bold; }
.fields { display: grid; grid-template-columns: max-content minmax(140px, 220px); gap: 4px 10px; align-items: center; }
.fields.wide { grid-template-columns: max-content minmax(160px, 1fr); }
.fields label { white-space: nowrap; }
input[type=text], input[type=date], input[type=number], input[type=email], input[type=password], input[type=search], select, textarea {
  border: 1px solid #7f9db9; background: #fff; padding: 2px 4px; min-width: 0; width: 100%;
}
textarea { resize: vertical; }
.checks { display: flex; gap: 12px; flex-wrap: wrap; }

.btnrow { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 8px; }
.btn {
  min-width: 74px; padding: 3px 12px; cursor: pointer;
  border: 1px solid #6f87a6; border-radius: 3px;
  background: linear-gradient(#ffffff, #d6e2f0);
}
.btn:hover { background: linear-gradient(#fffbe6, #ffd965); border-color: #c79a00; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { font-weight: bold; }
.btn.danger { color: var(--bad); }
.btn.ok { color: var(--ok); }

/* ---------- Tabs ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--panel-line); }
.tabs button {
  border: 1px solid var(--panel-line); border-bottom: 0; background: var(--chrome-2);
  padding: 3px 12px; cursor: pointer; border-radius: 3px 3px 0 0;
}
.tabs button.on { background: #fff; font-weight: bold; position: relative; top: 1px; }
/* On a phone the tabs wrap onto more rows instead of pushing the page sideways; each tab keeps its own border. */
@media (max-width: 620px) {
  .tabs { gap: 3px; border-bottom: 0; }
  .tabs button { border-bottom: 1px solid var(--panel-line); border-radius: 3px; padding: 4px 10px; }
  .tabs button.on { top: 0; border-color: var(--title-2); }
}

/* ---------- Data grid ---------- */
.grid-wrap { border: 1px solid var(--chrome-line); background: #fff; }
.grid-group { padding: 6px 8px; font-weight: bold; color: #fff; background: linear-gradient(#5c8fd6, #2f5fa8); }
.grid-scroll { overflow-x: auto; }
table.grid { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
table.grid th, table.grid td { padding: 3px 6px; border-right: 1px solid #d2deec; border-bottom: 1px solid #e3ebf5; white-space: nowrap; text-align: left; }
table.grid th { background: linear-gradient(#f4f8fd, var(--grid-head)); font-weight: normal; border-bottom: 1px solid var(--chrome-line); position: sticky; top: 0; }
table.grid tbody tr:nth-child(even) { background: var(--grid-alt); }
table.grid tbody tr.click { cursor: pointer; }
table.grid tbody tr.click:hover { background: var(--grid-sel); }
table.grid td.num, table.grid th.num { text-align: right; }
table.grid tfoot td { background: var(--grid-head); font-weight: bold; border-top: 1px solid var(--chrome-line); }
.grid-foot { display: flex; justify-content: space-between; gap: 8px; padding: 3px 8px; background: var(--chrome-2); border-top: 1px solid var(--chrome-line); font-size: 12px; flex-wrap: wrap; }
.empty { padding: 24px; text-align: center; color: var(--ink-soft); }

.pill { display: inline-block; padding: 0 7px; border-radius: 9px; font-size: 11px; font-weight: bold; border: 1px solid; }
.pill.pending { color: var(--warn); border-color: var(--warn); background: #fff7e3; }
.pill.verified, .pill.active { color: var(--ok); border-color: var(--ok); background: #eaf6ea; }
.pill.rejected, .pill.disabled { color: var(--bad); border-color: var(--bad); background: #fdecea; }

/* ---------- Dashboard ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-bottom: 10px; }
.tile { background: #fff; border: 1px solid var(--panel-line); padding: 10px 12px; }
.tile .k { color: var(--ink-soft); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.tile .v { font: bold 22px var(--font-report); font-variant-numeric: tabular-nums; margin-top: 2px; }
.tile.warn .v { color: var(--warn); }
.tile.ok .v { color: var(--ok); }
.cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 10px; }
@media (max-width: 860px) { .cols { grid-template-columns: minmax(0, 1fr); } }
.box { background: #fff; border: 1px solid var(--panel-line); min-width: 0; }
.box > h3 { margin: 0; padding: 5px 8px; font-size: 13px; background: linear-gradient(#f4f8fd, var(--grid-head)); border-bottom: 1px solid var(--panel-line); }
.box > .in { padding: 8px; }
.chart-holder { position: relative; height: 240px; }

.ann { padding: 8px 0; border-bottom: 1px dotted var(--panel-line); }
.ann:last-child { border-bottom: 0; }
.ann h4 { margin: 0 0 2px; font-size: 14px; }
.ann .meta { color: var(--ink-soft); font-size: 11px; }
.ann p { margin: 4px 0 0; white-space: pre-wrap; max-width: 70ch; }
.ann .pin { color: var(--bad); font-weight: bold; font-size: 11px; }

/* ---------- Dialog-like edit window ---------- */
.window { background: var(--panel); border: 1px solid var(--chrome-line); max-width: 920px; }
.window .wtitle { padding: 5px 10px; color: #fff; font-weight: bold; background: linear-gradient(var(--title-1), var(--title-2)); }
.window .wbody { padding: 10px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.window .wfoot { display: flex; justify-content: flex-end; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--panel-line); flex-wrap: wrap; }
.formgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 6px 20px; }
.summary-box { background: #b9dfe6; border: 1px solid #7fb6c2; padding: 6px 10px; font-variant-numeric: tabular-nums; }
.barcode-box { background: #fff; border: 1px solid var(--panel-line); padding: 8px; display: inline-block; max-width: 100%; }
.barcode-box canvas { max-width: 100%; height: auto; display: block; }
.barcode-box .cap { font: 11px var(--font-mono); color: var(--ink-soft); margin-top: 4px; word-break: break-all; }

.callout { position: relative; display: inline-block; background: var(--tip); border: 1px solid #c86b98; border-radius: 10px; padding: 4px 10px; font-size: 12px; }

.toast {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  background: #fffbe0; border: 1px solid #c79a00; padding: 8px 14px; box-shadow: 0 2px 8px rgba(0,0,0,.2);
  max-width: min(420px, calc(100vw - 32px)); z-index: 50;
}
.toast.err { background: #fdecea; border-color: var(--bad); }

.statusbar {
  position: fixed; left: 0; right: 0; bottom: 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: linear-gradient(#dbe7f6, var(--chrome-2)); border-top: 1px solid var(--chrome-line);
  font-size: 12px; padding-bottom: env(safe-area-inset-bottom, 0px);
}
.statusbar span { padding: 3px 10px; border-right: 1px solid var(--chrome-line); color: var(--title-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Login ---------- */
.login { min-height: 100%; display: grid; place-items: center; padding: 16px; background: linear-gradient(160deg, #e7eff9, #b9cde6); }
.login .window { width: min(420px, 100%); }
.login .brand { text-align: center; padding: 6px 0 2px; }
.login .brand b { font: bold 22px var(--font-report); letter-spacing: .02em; }
.login .brand small { display: block; color: var(--ink-soft); }

/* ---------- Report preview window ---------- */
.preview {
  position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column;
  background: var(--desk);
  padding-top: env(safe-area-inset-top, 0px);
}
.preview .pv-title { padding: 5px 12px; color: #fff; font-weight: bold; background: linear-gradient(var(--title-1), var(--title-2)); }
.preview .pv-tools { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; padding: 4px 12px; background: linear-gradient(#f3f7fc, var(--chrome-2)); border-bottom: 1px solid var(--chrome-line); }
.preview .pv-desk { flex: 1; overflow: auto; padding: 16px; }
.preview .statusbar { position: static; }

.page {
  width: 210mm; max-width: 100%; min-height: 270mm; margin: 0 auto 16px;
  background: var(--paper); color: #000; padding: 12mm 14mm;
  font: 11px/1.35 var(--font-report);
  box-shadow: 0 1px 4px rgba(0,0,0,.4);
  display: flex; flex-direction: column;
  font-variant-numeric: tabular-nums;
}
.page.landscape { width: 297mm; min-height: 200mm; }
.rp-stamp { align-self: flex-end; font-size: 9px; text-align: right; line-height: 1.5; }
.rp-brand { display: flex; gap: 10px; align-items: center; border-bottom: 2px solid #000; padding-bottom: 6px; margin-bottom: 8px; }
.rp-brand .rp-stamp { margin-left: auto; align-self: flex-start; }
.rp-title { text-align: center; font: bold 22px var(--font-report); margin: 2px 0 0; }
.rp-range { text-align: center; margin-bottom: 10px; }
.rp-co { display: flex; justify-content: space-between; border-bottom: 1px solid #000; padding-bottom: 2px; }
table.rp { width: 100%; border-collapse: collapse; }
table.rp th { text-align: left; font-weight: bold; padding: 4px 3px; border-bottom: 1px solid #000; white-space: nowrap; }
table.rp td { padding: 4px 3px; vertical-align: top; }
table.rp .num { text-align: right; }
table.rp tr.sub td { border-top: 1px solid #000; font-weight: bold; }
table.rp tr.grand td { border-top: 3px double #000; font-weight: bold; }
.rp-double { border-top: 3px double #000; margin: 6px 0 10px; }
.rp-sum-title { font-weight: bold; font-size: 12px; margin: 6px 0 4px 30px; }
table.rp.sum { width: 75%; }
.rp-end { display: flex; align-items: center; gap: 8px; margin: 14px 0 8px; }
.rp-end::before, .rp-end::after { content: ""; flex: 1; border-top: 1px solid #000; }
.rp-crit { font: 11px/1.3 var(--font-mono); white-space: pre; }
.rp-crit b { font-family: var(--font-report); }
.rp-foot { margin-top: auto; padding-top: 8px; font-size: 9px; display: flex; justify-content: space-between; color: #333; }

/* Document (voucher) layout */
.lh { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; text-align: center; }
.lh .mark { width: 64px; height: 64px; border-radius: 50%; border: 6px solid #2f5fa8; border-right-color: #6fae2c; border-bottom-color: #f0a500; display: grid; place-items: center; font: bold 18px var(--font-report); color: #1f4a8c; }
.lh .co { font: bold 18px var(--font-report); }
.lh .addr { font-size: 11px; }
.vt { text-align: center; font: bold 18px var(--font-report); margin: 8px 0 10px; letter-spacing: .03em; }
.vhead { display: grid; grid-template-columns: 1fr auto; gap: 16px; }
.kv { display: grid; grid-template-columns: max-content 10px 1fr; gap: 3px 4px; }
.words { text-decoration: underline; text-transform: uppercase; }
.sig { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 50px; }
.sig div { border-top: 1px solid #000; padding-top: 3px; }

@media print {
  @page { size: A4; margin: 0; }
  body { background: #fff; }
  body > *:not(.preview) { display: none !important; }
  .preview { position: static; background: #fff; padding: 0; }
  .preview .pv-title, .preview .pv-tools, .preview .statusbar { display: none; }
  .preview .pv-desk { padding: 0; overflow: visible; }
  .page { box-shadow: none; margin: 0; page-break-after: always; min-height: 0; max-width: none; }
}

@media (max-width: 520px) {
  .band h1 { font-size: 19px; }
  .fields, .fields.wide { grid-template-columns: minmax(0, 1fr); }
  .statusbar { grid-template-columns: 1fr 1fr; }
  .statusbar span:nth-child(3) { display: none; }
  .page { padding: 8mm 6mm; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ===================== Portal layout: company header, top bar, animated slide-out menu ===================== */
.co-head {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 16px; background: #fff; border-bottom: 3px solid var(--band-2);
}
.co-logo { width: 46px; height: 46px; object-fit: contain; flex: none; }
.co-logo-fallback, .tb-logo-img.co-logo-fallback, .login-logo.co-logo-fallback, .hero-logo.co-logo-fallback, .ph-logo.co-logo-fallback, .drawer-logo.co-logo-fallback {
  display: grid; place-items: center; border-radius: 50%;
  border: 4px solid var(--title-2); border-right-color: var(--band-2); border-bottom-color: #f0a500;
  font: bold 15px var(--font-report); color: var(--title-2); background: #fff;
}
.co-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.co-text b { font: bold 20px var(--font-report); letter-spacing: .04em; color: var(--title-2); }
.co-text span { font-size: 12px; color: var(--ink-soft); }
.co-text .co-tag, .co-tag { display: inline-block; white-space: nowrap; vertical-align: middle; position: relative; top: -2px; margin-left: 4px; padding: 2px 8px; border-radius: 10px; font: bold 10px var(--font-ui); letter-spacing: .14em; color: #fff; background: linear-gradient(135deg, var(--band-2), var(--ok)); }

.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: middle; }
.btn .ic { width: 16px; height: 16px; margin: -2px 3px 0 0; }

.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30;
  display: flex; align-items: center; gap: 10px; padding: 7px 12px;
  background: linear-gradient(var(--title-1), var(--title-2)); color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.iconbtn {
  display: inline-grid; place-items: center; position: relative; cursor: pointer;
  min-width: 38px; height: 36px; padding: 0 8px; border-radius: 9px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.35); color: #fff;
  transition: background .2s, transform .15s;
}
.iconbtn:hover { background: rgba(255,255,255,.2); }
.iconbtn:active { transform: scale(.93); }
.iconbtn .ic { width: 20px; height: 20px; }
.iconbtn .badge {
  position: absolute; top: -6px; right: -6px; min-width: 18px; padding: 3px 5px; border-radius: 9px;
  background: #e53935; color: #fff; font: bold 10px/1 var(--font-ui); text-align: center;
  box-shadow: 0 0 0 2px var(--title-2); animation: pop .35s ease;
}
.burger { display: inline-flex; flex-direction: column; justify-content: center; align-items: center; }
.burger span { display: block; width: 18px; height: 2px; margin: 2px 0; border-radius: 2px; background: currentColor; transition: transform .3s ease, opacity .2s ease; }
body.drawer-open .burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.drawer-open .burger span:nth-child(2) { opacity: 0; transform: scaleX(.2); }
body.drawer-open .burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.tb-search {
  flex: 1; display: flex; align-items: center; gap: 6px; min-width: 0; max-width: 680px;
  background: #fff; border-radius: 22px; padding: 3px 4px 3px 12px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.15); transition: box-shadow .2s;
}
.tb-search:focus-within { box-shadow: 0 0 0 3px rgba(255, 214, 102, .7); }
.tb-sic { display: flex; color: var(--ink-soft); }
.tb-search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 6px 4px; color: var(--ink); font-size: 14px; outline: none; }
.tb-search input::placeholder { color: #8a97a8; }
.scanbtn {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 6px; flex: none;
  border: 0; border-radius: 18px; padding: 6px 13px; cursor: pointer; color: #fff; font-weight: bold;
  background: linear-gradient(135deg, #6fae2c, #2f7d32); box-shadow: 0 2px 6px rgba(47,125,50,.45);
  transition: transform .15s, box-shadow .2s;
}
.scanbtn::after {
  content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.5), transparent); transform: skewX(-20deg);
  animation: shine 3.6s ease-in-out infinite;
}
.scanbtn:hover { transform: translateY(-1px); box-shadow: 0 5px 12px rgba(47,125,50,.5); }
.scanbtn:active { transform: scale(.95); }
.tb-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.avatar-btn { width: 38px; height: 38px; border-radius: 50%; border: 2px solid #fff; overflow: hidden; padding: 0; cursor: pointer; background: #fff; color: var(--title-2); font-weight: bold; transition: box-shadow .2s, transform .15s; }
.avatar-btn:hover { box-shadow: 0 0 0 3px rgba(255,255,255,.35); }
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; }
.pop { position: absolute; right: 12px; top: calc(100% + 4px); width: min(360px, calc(100vw - 24px)); max-height: 70vh; overflow: auto; background: #fff; color: var(--ink); border: 1px solid var(--chrome-line); border-radius: 10px; box-shadow: 0 10px 28px rgba(0,0,0,.25); z-index: 40; animation: popIn .18s ease; }
.pop-head { padding: 9px 12px; font-weight: bold; background: var(--grid-head); display: flex; flex-direction: column; }
.pop-head small { font-weight: normal; color: var(--ink-soft); }
.pop a, .pop > button { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 9px 12px; border: 0; border-bottom: 1px solid var(--grid-alt); background: #fff; color: var(--ink); text-decoration: none; cursor: pointer; }
.pop a:hover, .pop > button:hover { background: var(--grid-sel); }
.mail-item { display: flex !important; flex-direction: column; align-items: stretch !important; gap: 2px !important; }
.mail-item.unread { background: #eef6ff !important; }
.mail-item.unread b::before { content: "● "; color: #1f5fbf; }
.mail-item small { color: var(--ink-soft); }
.install-app { font-size: 13px; white-space: nowrap; background: #fff; color: var(--title-2); font-weight: bold; display: inline-flex; gap: 4px; }
.install-app[hidden] { display: none; }

.layout { display: flex; min-height: calc(100vh - 140px); }
.drawer {
  width: 240px; flex: none; display: flex; flex-direction: column; padding: 0 0 12px; overflow-y: auto;
  background: linear-gradient(180deg, #f7faff, #dfe9f5); border-right: 1px solid var(--chrome-line);
  margin-left: -240px; transition: margin-left .38s cubic-bezier(.2,.8,.2,1);
}
body.drawer-open .drawer { margin-left: 0; }
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; margin-bottom: 6px; background: #fff; border-bottom: 1px solid var(--chrome-line); }
.drawer-logo { width: 36px; height: 36px; object-fit: contain; font-size: 11px; flex: none; }
.drawer-head b { display: block; font: bold 13px var(--font-report); letter-spacing: .05em; color: var(--title-2); }
.drawer-head small { color: var(--band-2); font-weight: bold; font-size: 10px; letter-spacing: .12em; }
.drawer a {
  display: flex; align-items: center; gap: 10px; margin: 2px 8px; padding: 8px 10px; border-radius: 9px;
  color: var(--ink); text-decoration: none;
  opacity: 0; transform: translateX(-18px);
  transition: opacity .3s ease, transform .4s cubic-bezier(.2,.8,.2,1), background-color .15s, box-shadow .15s;
  transition-delay: calc(var(--i, 0) * 32ms + 60ms);
}
body.drawer-open .drawer a, body.drawer-drag .drawer a { opacity: 1; transform: none; }
body:not(.drawer-open) .drawer a { transition-delay: 0s; }
.drawer a:hover { background: #fff8d8; }
.drawer a:hover .num { transform: scale(1.12) rotate(-6deg); }
.drawer a.active { background: linear-gradient(90deg, #ffe58f, #fff4c9); font-weight: bold; box-shadow: inset 3px 0 0 #d9a400, 0 1px 3px rgba(0,0,0,.08); }
.drawer .num { display: inline-grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: var(--title-2); color: #fff; font-size: 11px; font-weight: bold; flex: none; transition: transform .25s; }
.drawer .num .ic { width: 14px; height: 14px; }
.drawer a.active .num { background: #c99700; }
.drawer-sep { margin: 12px 18px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); border-top: 1px solid var(--chrome-line); padding-top: 10px; }
.drawer a.sub { padding-left: 45px; font-size: 12.5px; }
.scrim { display: none; }
.content { flex: 1; min-width: 0; }
body.no-anim .drawer, body.no-anim .drawer a, body.no-anim .scrim { transition: none !important; }
@media (max-width: 899px) {
  .drawer {
    position: fixed; z-index: 35; top: 0; bottom: 0; left: 0; width: min(280px, 84vw); margin-left: 0;
    padding-top: env(safe-area-inset-top, 0px); transform: translateX(-105%);
    transition: transform .38s cubic-bezier(.2,.8,.2,1), box-shadow .38s;
  }
  body.drawer-open .drawer { transform: none; box-shadow: 8px 0 30px rgba(0,0,0,.35); }
  .scrim { display: block; position: fixed; inset: 0; z-index: 34; background: rgba(10,22,44,.48); opacity: 0; pointer-events: none; transition: opacity .32s ease; }
  body.drawer-open .scrim { opacity: 1; pointer-events: auto; }
  body.drawer-drag .drawer, body.drawer-drag .scrim, body.drawer-drag .drawer a { transition: none !important; }
  .co-text b { font-size: 16px; }
  .tb-search input::placeholder { font-size: 12px; }
}
@media (max-width: 620px) {
  .topbar { gap: 6px; padding: 6px 8px; }
  .scanbtn span { display: none; }
  .scanbtn { padding: 7px 9px; }
  .tb-right { gap: 5px; }
  .iconbtn { min-width: 34px; height: 34px; padding: 0 6px; }
  .avatar-btn { width: 34px; height: 34px; }
  .tb-search { padding-left: 8px; }
  .tb-sic { display: none; }
  .co-tag { display: none; }
}
body { padding-bottom: 28px; }

.modal { position: fixed; inset: 0; z-index: 60; background: rgba(10,22,44,.5); display: grid; place-items: center; padding: 16px; animation: fadeIn .2s ease; }
.modal.out { animation: fadeOut .18s ease forwards; }
.modal .window { width: min(520px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; border-radius: 12px; overflow: hidden; box-shadow: 0 20px 56px rgba(0,0,0,.4); animation: popIn .28s cubic-bezier(.2,.8,.2,1); }
.modal .window.wide { width: min(920px, 100%); }
.modal .window > .wbody { overflow: auto; min-height: 0; }
.wtitle { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wclose { display: flex; border: 0; padding: 3px; border-radius: 6px; background: transparent; color: #fff; cursor: pointer; }
.wclose:hover { background: rgba(255,255,255,.22); }
.confirm-msg { margin: 0; font-size: 14px; line-height: 1.5; }

/* Dashboard */
.hero { display: flex; align-items: center; gap: 18px; background: #fff; border: 1px solid var(--panel-line); padding: 14px 18px; margin-bottom: 10px; flex-wrap: wrap; }
.hero-logo { width: 96px; height: 96px; object-fit: contain; font-size: 26px; }
.hero h2 { margin: 0; font: bold 26px var(--font-report); color: var(--title-2); letter-spacing: .04em; }
.hero p { margin: 4px 0 0; color: var(--ink-soft); }
.hero .welcome { color: var(--ink); }
.quick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
a.btn { display: inline-block; text-decoration: none; color: var(--ink); text-align: center; }
.btn.ok { color: var(--ok); font-weight: bold; }
.hint.err { background: #fdecea; border-color: var(--bad); }

/* status pills for business records */
.pill.verified, .pill.active, .pill.paid, .pill.approved { color: var(--ok); border-color: var(--ok); background: #eaf6ea; }
.pill.unpaid, .pill.suspended { color: var(--warn); border-color: var(--warn); background: #fff7e3; }
.pill.partial { color: #1f5fbf; border-color: #1f5fbf; background: #eaf2ff; }
.pill.closed, .pill.rejected { color: #fff; border-color: var(--bad); background: var(--bad); }
.closed-mark { display: inline-block; background: var(--bad); color: #fff; font-weight: bold; font-size: 11px; padding: 0 6px; border-radius: 3px; letter-spacing: .05em; }
.banner { padding: 10px 14px; margin-bottom: 10px; font-weight: bold; border: 1px solid; }
.banner.closed { background: #fdecea; border-color: var(--bad); color: var(--bad); }
.banner.warn { background: #fff7e3; border-color: var(--warn); color: var(--warn); }
.banner.ok { background: #eaf6ea; border-color: var(--ok); color: var(--ok); font-weight: normal; }
.mono { font-family: var(--font-mono); }
.big { font-size: 18px; }

/* Customer profile */
.profile { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--panel-line); padding: 12px; margin-bottom: 10px; }
.pf-photo { width: 110px; height: 110px; border-radius: 8px; overflow: hidden; background: var(--grid-head); display: grid; place-items: center; font: bold 32px var(--font-report); color: var(--title-2); }
.pf-photo img { width: 100%; height: 100%; object-fit: cover; }
.pf-main h2 { margin: 0 0 6px; font: bold 22px var(--font-report); }
.pf-ids { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; }
.pf-sub { color: var(--ink-soft); margin-top: 4px; }
.pf-qr canvas { width: 120px; height: 120px; image-rendering: pixelated; }
@media (max-width: 640px) { .profile { grid-template-columns: 80px minmax(0, 1fr); } .pf-photo { width: 80px; height: 80px; } .pf-qr { grid-column: 1 / -1; } }
.kv-table th { width: 34%; background: var(--grid-alt); font-weight: bold; text-align: left; white-space: normal; }
.kv-table td { white-space: normal; }
/* Long values (addresses, keys, emails) wrap instead of making the page wider than a phone. */
table.grid.kv-table th, table.grid.kv-table td { white-space: normal; }
table.grid.kv-table td { overflow-wrap: anywhere; }
.tabpanes > div { padding-top: 6px; }
.filelist { display: grid; gap: 4px; }
.file { display: grid; grid-template-columns: 170px minmax(0, 1fr) auto; gap: 8px; align-items: center; background: #fff; border: 1px solid var(--grid-head); padding: 4px 8px; }
.file .kind { font-size: 11px; color: var(--ink-soft); text-transform: uppercase; }
.file .fname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file .fbtns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 520px) { .file { grid-template-columns: minmax(0, 1fr) auto; } .file .kind { grid-column: 1 / -1; } }
.review { border-color: #d9a400; background: #fffbe8; margin-bottom: 10px; }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 10px; }
.addr-row { display: flex; gap: 6px; }
.addr-row input { flex: 1; }
.addr-msg { padding: 4px 8px; border-radius: 3px; background: var(--grid-alt); }
.addr-msg.ok { background: #eaf6ea; color: var(--ok); font-weight: bold; }
.addr-msg.bad { background: #fdecea; color: var(--bad); font-weight: bold; }
.photo-prev { width: 96px; height: 96px; border: 1px dashed var(--panel-line); display: grid; place-items: center; color: var(--ink-soft); font-size: 11px; overflow: hidden; background: #fff; }
.photo-prev img { width: 100%; height: 100%; object-fit: cover; }
.submitted .wtitle { background: linear-gradient(#4caf50, #2f7d32); }
.sub-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; }
.sub-qr { text-align: center; }
.sub-qr canvas { width: 160px; height: 160px; image-rendering: pixelated; display: block; margin: 0 auto 4px; }
@media (max-width: 560px) { .sub-grid { grid-template-columns: minmax(0, 1fr); } }
.picker-row { display: flex; gap: 6px; }
.picker-row input { flex: 1; }
.pk-list { border: 1px solid var(--panel-line); background: #fff; max-height: 240px; overflow: auto; margin-top: 4px; }
.pk-list button { display: block; width: 100%; text-align: left; padding: 6px 8px; border: 0; border-bottom: 1px solid var(--grid-alt); background: #fff; cursor: pointer; }
.pk-list button:hover { background: var(--grid-sel); }
.chosen { margin-top: 6px; padding: 6px 8px; background: #eaf6ea; border: 1px solid var(--ok); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rline { display: block; padding: 2px 0; }
.profile-photo { width: 160px; height: 160px; border-radius: 8px; overflow: hidden; background: var(--grid-head); display: grid; place-items: center; color: var(--ink-soft); }
.profile-photo img { width: 100%; height: 100%; object-fit: cover; }
.profile-photo.logo { background: #fff; border: 1px solid var(--panel-line); }
.profile-photo.logo img { object-fit: contain; }
main h3 { margin: 14px 0 6px; color: var(--title-2); }

/* ===================== Printed forms (application, invoice, receipt, credit memo) ===================== */
.ph { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; border-bottom: 2px solid #000; padding-bottom: 6px; }
.ph-left { display: flex; gap: 10px; align-items: center; }
.ph-logo { width: 60px; height: 60px; object-fit: contain; font-size: 16px; }
.ph-co { font: bold 22px var(--font-report); letter-spacing: .04em; }
.ph-addr { font-size: 10px; }
.ph-right { text-align: center; font-size: 9px; }
.ph-qr { width: 92px; height: 92px; image-rendering: pixelated; display: block; }
.ph-bar { height: 46px; image-rendering: pixelated; display: block; }
.ph-title { text-align: center; font: bold 16px var(--font-report); margin: 10px 0 8px; letter-spacing: .05em; }
.pbox { border: 1px solid #000; margin-bottom: 8px; }
.pbox-h { background: #eee; border-bottom: 1px solid #000; padding: 3px 6px; font-weight: bold; font-size: 10px; text-transform: uppercase; }
.pcell { padding: 4px 6px; border-bottom: 1px solid #ccc; }
.pl { font-size: 8.5px; text-transform: uppercase; color: #333; }
.pv { font-size: 11.5px; min-height: 15px; }
.pv.words { text-transform: uppercase; text-decoration: underline; }
.pcell.hl .pv { background: #fff4b8; padding: 1px 4px; }
.pgrid { display: grid; grid-template-columns: 110px 1fr; }
.pphoto { border-right: 1px solid #000; display: grid; place-items: center; font-size: 10px; color: #777; min-height: 130px; }
.pphoto img { width: 100%; height: 100%; max-height: 150px; object-fit: cover; }
.pgrid2 { display: grid; grid-template-columns: 1fr 1fr; }
.pgrid2 > .pcell:nth-child(odd), .pgrid2 > div:nth-child(odd) { border-right: 1px solid #ccc; }
.pgrid4 { display: grid; grid-template-columns: repeat(4, 1fr); }
.prow3 { display: grid; grid-template-columns: repeat(3, 1fr); }
.span2 { grid-column: span 2; }
.pradio { display: flex; align-items: center; gap: 6px; font-size: 11px; padding: 2px 0; }
.pradio .dot { width: 11px; height: 11px; border: 1.5px solid #000; border-radius: 50%; flex: none; }
.pradio .dot.on { background: radial-gradient(circle, #000 45%, transparent 50%); }
.pdecl { font-size: 10.5px; margin: 10px 0; }
.psig { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 46px; font-size: 10px; text-align: center; }
.psig .line { border-top: 1px solid #000; margin-bottom: 3px; }
.pstamp { display: inline-block; align-self: flex-end; margin: 6px 0; padding: 4px 14px; border: 3px solid #c62828; color: #c62828; font: bold 22px var(--font-report); letter-spacing: .08em; transform: rotate(-6deg); opacity: .85; }
.pstamp.pending { border-color: #b7791f; color: #b7791f; }
.pstamp.rejected { border-color: #555; color: #555; }
.pstamp.paid { border-color: #1b5e20; color: #1b5e20; }
.pstamp.big { align-self: center; font-size: 34px; display: flex; flex-direction: column; align-items: center; margin-top: 18px; }
.pstamp.big small { font-size: 11px; letter-spacing: 0; }
.cm-head { display: flex; justify-content: space-between; gap: 10px; }
.cm-co { font: bold 26px var(--font-report); letter-spacing: .05em; }
.cm-date { font-weight: bold; font-size: 12px; margin-top: 2px; }
.cm-rep { text-align: right; font-size: 10px; }
.cm-rep b { background: #fff4b8; border: 1px solid #c9a400; padding: 2px 10px; font-size: 13px; }
.cm-rep img { display: block; height: 46px; margin-top: 4px; margin-left: auto; image-rendering: pixelated; }

/* Company seal as a watermark on printed documents only */
.page { position: relative; overflow: hidden; }
.page > .wm {
  position: absolute; left: 50%; top: 50%; width: 62%; max-width: 520px; transform: translate(-50%, -50%);
  opacity: .09; mix-blend-mode: multiply; pointer-events: none; user-select: none; z-index: 0;
}
.page > :not(.wm) { position: relative; z-index: 1; }
.page > .rp-stamp { position: relative; }
/* The date the page was printed, small in the top right corner */
.page > .pg-date { position: absolute; top: 4.5mm; right: 14mm; font-size: 8.5px; color: #333; }
.page.a5l > .pg-date { top: 2.5mm; right: 11mm; }
/* Logo images keep their colours on white */
img.co-logo, img.tb-logo-img, img.hero-logo, img.ph-logo, img.login-logo, img.drawer-logo, img.soa-logo-img { background: #fff; border-radius: 6px; }

/* Resolution notice board */
.notice { background: #fff; border: 1px solid var(--panel-line); border-left: 5px solid var(--band-2); margin-bottom: 10px; }
.notice.old { opacity: .6; border-left-color: var(--ink-soft); }
.notice header { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; padding: 8px 12px; background: var(--grid-alt); border-bottom: 1px solid var(--grid-head); }
.notice header b { font-size: 15px; flex: 1 1 200px; }
.notice-body { padding: 10px 12px; display: grid; gap: 8px; }
.notice-body img { max-width: 100%; max-height: 420px; border: 1px solid var(--grid-head); display: block; }
.notice-body p { margin: 0; white-space: pre-wrap; max-width: 75ch; }
.notice footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 12px; border-top: 1px dotted var(--grid-head); flex-wrap: wrap; }
.checks.access { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 4px 12px; }
table.grid.budget input { width: 100%; min-width: 70px; }
table.grid.budget td:first-child input { min-width: 180px; }
.sigbox { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 10px; }
.sigbox div { height: 60px; border-bottom: 1px solid #000; }
.ur-tabs { margin-bottom: 10px; }
.ur-tabs a { border: 1px solid var(--panel-line); border-bottom: 0; background: var(--chrome-2); padding: 4px 16px; border-radius: 3px 3px 0 0; color: var(--ink); text-decoration: none; }
.ur-tabs a.on { background: #fff; font-weight: bold; position: relative; top: 1px; }

/* File preview and signed copies */
.viewer .window { width: min(980px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
.viewer-body { flex: 1; min-height: 0; overflow: auto; background: #555; display: grid; place-items: center; padding: 8px; }
.viewer-body img { max-width: 100%; max-height: calc(100vh - 150px); object-fit: contain; background: #fff; }
.viewer-body iframe { width: 100%; height: calc(100vh - 150px); border: 0; background: #fff; }
.signed { border-color: var(--ok); background: #f3faf3; }
.signed legend { color: var(--ok); }
.ph-codes { display: flex; gap: 12px; align-items: flex-end; text-align: center; }
.ph-codes .ph-bar { height: 40px; margin: 0 auto; }
.ph-codes .mono { font-size: 9px; margin-top: 2px; }
.ph-codes .key { max-width: 21ch; margin-left: auto; margin-right: auto; } /* the 42-character key in two even lines */

/* Statement of account (bank-statement style) */
.soa-logo { text-align: center; }
.soa-logo-img { width: 70px; height: 70px; object-fit: contain; display: inline-grid; font-size: 18px; }
.soa-co { font: bold 18px var(--font-report); letter-spacing: .05em; }
.soa-addr { font-size: 9.5px; }
.soa-top { display: grid; grid-template-columns: 1fr auto; gap: 20px; margin: 6px 0 14px; font-size: 11px; line-height: 1.5; }
.soa-acct { display: grid; grid-template-columns: auto auto; gap: 0 6px; }
.soa-acct span { text-align: right; }
.soa-acct b { font-weight: normal; }
table.soa-table { width: 100%; border-collapse: separate; border-spacing: 4px 0; font-size: 10.5px; }
table.soa-table th { border: 1px solid #000; background: #eee; padding: 4px; font-size: 9.5px; text-align: center; }
table.soa-table td { padding: 2px 4px; vertical-align: top; }
table.soa-table .num { text-align: right; white-space: nowrap; }
table.soa-table tr.soa-end td:nth-child(6) { border-top: 1px solid #000; }
table.soa-table tr.soa-total td { padding-top: 10px; }
.soa-due { display: flex; gap: 12px; align-items: baseline; justify-content: flex-end; border-top: 3px double #000; margin-top: 10px; padding-top: 6px; flex-wrap: wrap; }
.soa-due b { font-size: 16px; }
.soa-due small { flex-basis: 100%; text-align: right; text-transform: uppercase; font-size: 9px; }
.soa-note { font-size: 9.5px; text-align: center; margin-top: 18px; border-top: 1px solid #000; padding-top: 6px; }
.soa-sys { margin-top: 12px; text-align: center; font-size: 9.5px; font-style: italic; }
.soa-thanks { margin-top: 14px; text-align: center; font-size: 13px; font-weight: bold; letter-spacing: .04em; }
.soa-pg { text-align: right; font-size: 10px; }
.soa-imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.soa-imgs figure { margin: 0; text-align: center; }
.soa-imgs img { width: 100%; max-height: 105mm; object-fit: contain; border: 1px solid #999; }
.soa-imgs figcaption { font-size: 9.5px; margin-top: 3px; }
.soa-pdf { border: 1px dashed #999; padding: 30px 8px; font-size: 10px; }
.install-app { font-size: 13px; padding: 0 10px; white-space: nowrap; background: #fff; color: var(--title-2); font-weight: bold; }
@media (max-width: 620px) { .tb-install-txt { display: none; } }

/* ===================== Version 1.1: animations, loading, sign-in, new screens ===================== */
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes popIn { from { opacity: 0; transform: translateY(-8px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(.4); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shine { 0%, 62% { left: -60%; } 100% { left: 140%; } }
@keyframes dotsw { to { width: 1.3em; } }
@keyframes bandIn { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }
@keyframes laser { 0% { top: 8%; } 50% { top: 90%; } 100% { top: 8%; } }
@keyframes sealIn { 0% { transform: scale(.3) rotate(-30deg); opacity: 0; } 60% { transform: scale(1.12) rotate(4deg); opacity: 1; } 100% { transform: none; } }
@keyframes shake { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-6px); } 40%, 60% { transform: translateX(6px); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(46,204,113,.6); } 70% { box-shadow: 0 0 0 7px rgba(46,204,113,0); } 100% { box-shadow: 0 0 0 0 rgba(46,204,113,0); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

.band h1 { animation: bandIn .4s ease backwards; }
#main > * { animation: rise .4s cubic-bezier(.2,.8,.2,1) backwards; }
#main > *:nth-child(2) { animation-delay: .04s; }
#main > *:nth-child(3) { animation-delay: .08s; }
#main > *:nth-child(4) { animation-delay: .12s; }
#main > *:nth-child(5) { animation-delay: .16s; }
#main > *:nth-child(n+6) { animation-delay: .2s; }
.grid-wrap { animation: fadeIn .35s ease backwards; }
.tiles .tile { animation: rise .45s cubic-bezier(.2,.8,.2,1) backwards; transition: transform .2s, box-shadow .2s; }
.tiles .tile:nth-child(2) { animation-delay: .05s; }
.tiles .tile:nth-child(3) { animation-delay: .1s; }
.tiles .tile:nth-child(4) { animation-delay: .15s; }
.tile:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(31,74,140,.13); }
.btn { transition: background .15s, transform .1s, box-shadow .15s, border-color .15s; }
.btn:active:not(:disabled) { transform: translateY(1px); }
table.grid tbody tr { transition: background-color .15s; }
.toast { z-index: 70; border-radius: 10px; animation: toastIn .35s cubic-bezier(.2,.8,.2,1); box-shadow: 0 8px 22px rgba(0,0,0,.2); }
.toast.out { animation: fadeOut .3s ease forwards; }

.spin { display: inline-block; flex: none; vertical-align: middle; width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(31,74,140,.18); border-top-color: var(--title-2); animation: spin .7s linear infinite; }
.spin.sm { width: 14px; height: 14px; border-width: 2px; }
.spin.light { border-color: rgba(255,255,255,.35); border-top-color: #fff; }
.tb-search .spin { margin-right: 2px; }
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 28px 12px; color: var(--ink-soft); }
.loading .dots::after { content: "..."; display: inline-block; overflow: hidden; vertical-align: bottom; width: 0; animation: dotsw 1.2s steps(4, end) infinite; }
.boot { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--title-2); }
.boot img { width: 90px; height: 90px; object-fit: contain; animation: pop .6s ease; border-radius: 12px; background: #fff; }

/* Sign in / create account / codes */
.login { min-height: calc(100vh - 70px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px 16px 44px;
  background: radial-gradient(circle at 15% 10%, #f6faff 0, transparent 45%), linear-gradient(160deg, #e7eff9, #b9cde6); }
.login-card { width: min(440px, 100%); background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 18px 44px rgba(31,74,140,.25); animation: popIn .45s cubic-bezier(.2,.8,.2,1); }
.login-form { padding: 18px 22px 22px; display: grid; gap: 7px; }
.login .brand { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 4px 0 8px; text-align: left; }
.login .brand b { font: bold 22px var(--font-report); letter-spacing: .04em; color: var(--title-2); display: block; }
.login .brand small { color: var(--band-2); font-weight: bold; letter-spacing: .3em; display: block; font-size: 11px; }
.login-logo { width: 56px; height: 56px; object-fit: contain; font-size: 13px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; padding: 3px; border-radius: 10px; background: var(--grid-head); }
.seg button { border: 0; background: transparent; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-weight: bold; color: var(--ink-soft); transition: background .25s, color .25s, box-shadow .25s; }
.seg button.on { background: #fff; color: var(--title-2); box-shadow: 0 1px 5px rgba(0,0,0,.15); }
.fl { font-weight: bold; font-size: 12px; color: var(--ink-soft); margin-top: 4px; }
.login-form input[type=text], .login-form input[type=email], .login-form input[type=password] { padding: 9px 11px; border-radius: 8px; border: 1px solid #b7c7da; font-size: 15px; transition: border-color .2s, box-shadow .2s; }
.login-form input:focus { border-color: var(--title-1); box-shadow: 0 0 0 3px rgba(61,109,181,.2); outline: none; }
.pw { position: relative; }
.pw input { padding-right: 42px !important; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); display: flex; padding: 6px; border: 0; border-radius: 6px; background: transparent; color: var(--ink-soft); cursor: pointer; }
.pw-eye.on { color: var(--title-2); }
.btn.big { padding: 10px 14px; font-size: 15px; border-radius: 9px; margin-top: 6px; }
.login-form .btn.primary { background: linear-gradient(var(--title-1), var(--title-2)); color: #fff; border-color: var(--title-2); }
.login-form .btn.primary:hover { filter: brightness(1.1); }
.login-links { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.linkbtn { border: 0; background: transparent; color: var(--title-2); cursor: pointer; padding: 4px 0; text-decoration: underline; font: inherit; }
.linkbtn:disabled { color: var(--ink-soft); text-decoration: none; cursor: default; }
.uname-msg { min-height: 16px; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-soft); }
.uname-msg.ok { color: var(--ok); font-weight: bold; }
.uname-msg.bad { color: var(--bad); font-weight: bold; }
.otp { text-align: center; letter-spacing: .45em; font: bold 24px var(--font-mono) !important; padding: 10px !important; }
.code-ic { display: grid; place-items: center; }
.code-ic .ic { width: 56px; height: 56px; color: var(--title-1); stroke-width: 1.5; animation: pop .5s ease; }
.center { text-align: center; }
.muted { color: var(--ink-soft); }
.hint.small { font-size: 12px; border-radius: 6px; }
.login-below { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.verify-link { display: inline-flex; align-items: center; gap: 6px; padding: 8px 15px; border-radius: 20px; background: #fff; border: 1px solid var(--panel-line); text-decoration: none; font-weight: bold; color: var(--ok); box-shadow: 0 2px 8px rgba(0,0,0,.08); transition: transform .15s, box-shadow .15s; }
.verify-link:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(0,0,0,.12); }
.login-below small { color: var(--ink-soft); }

/* Applicant / public pages */
.topbar.mini { justify-content: space-between; }
.mini-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: bold; letter-spacing: .05em; }
a.mini-brand { color: inherit; text-decoration: none; }
.mini-user { font-size: 12px; opacity: .92; }
.btn.light { background: #fff; color: var(--title-2); border-color: #fff; text-decoration: none; }
.mini-content main { max-width: 1100px; margin: 0 auto; }

/* Document cards: the system form until the signed copy is uploaded, then the signed copy only */
.docgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 10px; margin: 4px 0 10px; }
.doccard { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px 12px; background: #fff; border: 1px solid var(--panel-line); border-left: 5px solid var(--title-1); border-radius: 9px; box-shadow: 0 2px 6px rgba(31,74,140,.08); transition: transform .2s, box-shadow .2s, opacity .2s; animation: rise .4s ease backwards; }
.doccard:hover { transform: translateY(-1px); box-shadow: 0 7px 18px rgba(31,74,140,.14); }
.doccard.signed { border-left-color: var(--ok); background: linear-gradient(90deg, #f1faf1, #fff 45%); }
.doccard.uploading { opacity: .7; pointer-events: none; }
.dc-ic { position: relative; flex: none; width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; background: #eaf2ff; color: var(--title-2); }
.doccard.signed .dc-ic { background: #e3f4e4; color: var(--ok); }
.dc-ic .ic { width: 24px; height: 24px; }
.dc-ok { position: absolute; right: -5px; bottom: -5px; width: 19px; height: 19px; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #fff; box-shadow: 0 0 0 2px #fff; animation: pop .4s ease; }
.dc-ok .ic { width: 12px; height: 12px; stroke-width: 3; }
.dc-main { flex: 1 1 170px; min-width: 0; display: flex; flex-direction: column; }
.dc-main b { overflow: hidden; text-overflow: ellipsis; }
.dc-main small { display: flex; align-items: center; gap: 6px; color: var(--ink-soft); }
.doccard.signed .dc-main small { color: var(--ok); font-weight: bold; }
.dc-act { display: flex; flex-wrap: wrap; gap: 6px; }

/* Profile header (customer, employee, job application, billing company) */
.cust-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 16px 16px 20px; margin-bottom: 10px; border-radius: 14px; border: 1px solid var(--panel-line); background: linear-gradient(120deg, #fff 0%, #f1f6fd 60%, #e4eefb 100%); box-shadow: 0 4px 16px rgba(31,74,140,.09); }
.cust-hero::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--band-2); }
.cust-hero.st-suspended::before, .cust-hero.st-inactive::before { background: var(--warn); }
.cust-hero.st-closed::before, .cust-hero.st-rejected::before, .cust-hero.st-terminated::before { background: var(--bad); }
.cust-hero.st-pending::before, .cust-hero.st-verified::before, .cust-hero.st-submitted::before, .cust-hero.st-waiting::before { background: #f0a500; }
.ch-photo { width: 112px; height: 112px; border-radius: 16px; overflow: hidden; display: grid; place-items: center; background: var(--grid-head); color: var(--title-2); font: bold 34px var(--font-report); border: 3px solid #fff; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.ch-photo img { width: 100%; height: 100%; object-fit: cover; }
.ch-pic { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ch-pic-tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 10px; font-size: 11.5px; }
.ch-pic-tools .linkbtn { padding: 0; }
.ch-pic-tools .del { color: #b3261e; }
.ch-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ch-name h2 { margin: 0; font: bold 24px var(--font-report); color: var(--ink); }
.ch-sub { color: var(--ink-soft); margin: 2px 0 8px; }
.ch-ids { display: flex; flex-wrap: wrap; gap: 8px; }
.idbox { display: flex; flex-direction: column; min-width: 112px; padding: 4px 10px; border-radius: 8px; background: #fff; border: 1px solid var(--grid-head); }
.idbox small { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
.idbox b { font-size: 13px; }
.ch-flags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.flag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 10px; background: #eaf6ea; color: var(--ok); font-size: 11px; font-weight: bold; }
.flag .ic { width: 12px; height: 12px; stroke-width: 3; }
.ch-qr { text-align: center; padding: 6px; border-radius: 10px; background: #fff; border: 1px solid var(--grid-head); }
.ch-qr canvas { display: block; width: 116px; height: 116px; image-rendering: pixelated; }
.ch-qr small { color: var(--ink-soft); font-size: 10px; display: block; }
/* Public ID key (like a crypto wallet address) under its QR code */
.key { word-break: break-all; }
.ch-qr .key { display: block; max-width: 116px; margin: 1px auto 0; font-size: 10.5px; line-height: 1.35; }
.ch-qr .linkbtn { font-size: 11px; display: inline-flex; align-items: center; gap: 3px; }
.ch-qr .linkbtn .ic { width: 13px; height: 13px; }
@media (max-width: 680px) {
  .cust-hero { grid-template-columns: 76px minmax(0, 1fr); }
  .ch-photo { width: 76px; height: 76px; font-size: 24px; }
  .ch-qr { grid-column: 1 / -1; justify-self: center; }
  .ch-name h2 { font-size: 19px; }
}
.actionbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 10px; }
.actionbar .grow { flex: 1; }
.rtools { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.vbadge { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-left: 4px; border-radius: 50%; background: #1d9bf0; color: #fff; vertical-align: middle; }
.vbadge .ic { width: 12px; height: 12px; stroke-width: 3.2; }
.vbadge.sm { width: 14px; height: 14px; }
.vbadge.sm .ic { width: 9px; height: 9px; }
.dot-on { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #2ecc71; animation: pulse 2s infinite; }
.ok-txt { color: var(--ok); font-weight: bold; }
.bad-txt { color: var(--bad); font-weight: bold; }
.pill.terminated, .pill.inactive { color: #fff; border-color: var(--bad); background: var(--bad); }
.pill.submitted, .pill.waiting { color: var(--warn); border-color: var(--warn); background: #fff7e3; }
.pill.applied, .pill.issued, .pill.received { color: #fff; border-color: var(--ok); background: var(--ok); }
.banner { border-radius: 8px; animation: rise .35s ease backwards; }
.banner.warn { background: repeating-linear-gradient(-45deg, #fff7e3, #fff7e3 12px, #ffefc7 12px, #ffefc7 24px); }
main h3.sec, main h3 { display: flex; align-items: center; gap: 6px; }

/* Dashboard */
.hero h2 { font-size: clamp(20px, 5.4vw, 26px); }
.hero { border-radius: 14px; background: linear-gradient(120deg, #fff, #f1f6fd); box-shadow: 0 4px 16px rgba(31,74,140,.08); }
.hero-tag { display: inline-block; white-space: nowrap; vertical-align: middle; padding: 3px 9px; border-radius: 10px; background: var(--band-2); color: #fff; font: bold 11px var(--font-ui); letter-spacing: .14em; }
.todo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.todo-h { font-weight: bold; color: var(--title-2); }
.todo-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 16px; background: #fff; border: 1px solid var(--panel-line); text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s; }
.todo-chip b { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--grid-head); font-size: 11px; }
.todo-chip.hot { border-color: #f0a500; background: #fff8e6; }
.todo-chip.hot b { background: #e53935; color: #fff; animation: pop .45s ease; }
.todo-chip:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0,0,0,.08); }
.box { border-radius: 10px; overflow: hidden; }
.box > h3 { display: flex; justify-content: space-between; align-items: center; }
.box-link { font-weight: normal; font-size: 12px; }
.quick .btn { border-radius: 18px; padding: 5px 14px; }
.mini-post { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px dotted var(--panel-line); color: inherit; text-decoration: none; }
.mini-post:last-child { border-bottom: 0; }
.mini-post img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; flex: none; }
.mini-post .who, .post .who { color: var(--title-2); }
.mini-post .pos, .post .pos { display: inline-block; margin-left: 4px; padding: 1px 8px; border-radius: 9px; background: #ffe58f; color: #6b4800; font-size: 10.5px; font-weight: bold; }
.mini-post small { display: block; color: var(--ink-soft); font-size: 11px; }
.mini-post p { margin: 2px 0 0; font-size: 12.5px; }
.empty.small { padding: 12px; font-size: 12px; }
.find-sum { display: flex; align-items: center; gap: 8px; padding: 10px 12px; margin-bottom: 4px; border-radius: 8px; background: #fff; border: 1px solid var(--panel-line); }

/* Employee section */
.subnav { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; padding: 4px; border-radius: 11px; background: #fff; border: 1px solid var(--panel-line); }
.subnav a { padding: 7px 14px; border-radius: 8px; text-decoration: none; color: var(--ink); font-weight: bold; transition: background .2s, color .2s; }
.subnav a:hover { background: var(--grid-alt); }
.subnav a.on { background: linear-gradient(var(--title-1), var(--title-2)); color: #fff; }
.fpair { display: contents; }
.fpair[hidden] { display: none; }
.netbox { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; padding: 10px 14px; border-radius: 9px; background: linear-gradient(90deg, #eaf6ea, #fff); border: 1px solid var(--ok); }
.netbox span { font-weight: bold; color: var(--ok); }
.netbox b { font: bold 26px var(--font-report); color: var(--ok); transition: color .2s; }
.netbox b.neg { color: var(--bad); }
.netbox small { flex-basis: 100%; font-size: 11px; color: var(--ink-soft); }
.pgrid2.slip-cols { gap: 8px; }
.pgrid2.slip-cols > .pbox { margin: 0; border-right: 1px solid #000; }
.net-print { display: flex; justify-content: space-between; align-items: baseline; margin: 6px 0; padding: 6px 10px; border: 2px solid #000; background: #fff4b8; font-weight: bold; }
.net-print b { font-size: 18px; }
.ja-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-bottom: 6px; border-bottom: 2px solid #000; }
.ja-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.ja-left { display: flex; align-items: center; gap: 10px; }
.ja-photo { flex: none; width: 30mm; height: 36mm; display: grid; place-items: center; overflow: hidden; border: 1px solid #000; font-size: 10px; color: #777; }
.ja-photo img { width: 100%; height: 100%; object-fit: cover; }
.ja-ids { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-content: start; font-size: 11px; }
.ja-ids > div:not(.ja-appr) { display: contents; }
.ja-ids span { color: #333; }
.ja-ids b { overflow-wrap: anywhere; }
.ja-appr { grid-column: 1 / -1; margin-top: 4px; font-weight: bold; font-size: 12px; color: #1b5e20; }
.ja-qr { flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ja-qr img:first-child { width: 24mm; height: 24mm; image-rendering: pixelated; }
@media (max-width: 520px) { .ja-head { flex-wrap: wrap; } .ja-main { flex-basis: 100%; } }
.ja-qr .ja-bar { height: 32px; image-rendering: pixelated; }
.ja-tbl th, .ja-tbl td { border: 1px solid #999; padding: 3px 5px; font-size: 10.5px; }

/* Applicant portal */
.welcome-card { margin-bottom: 12px; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--panel-line); background: linear-gradient(120deg, #fff, #eef5ff); }
.welcome-card h2 { margin: 0 0 6px; font: bold 22px var(--font-report); color: var(--title-2); }
.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.pos-card { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 12px; background: #fff; border: 1px solid var(--panel-line); box-shadow: 0 2px 8px rgba(31,74,140,.08); transition: transform .2s, box-shadow .2s; animation: rise .4s ease backwards; }
.pos-card:hover { transform: translateY(-3px); box-shadow: 0 12px 24px rgba(31,74,140,.16); }
.pos-card h4 { margin: 0; font-size: 16px; color: var(--title-2); }
.pos-co { font-weight: bold; color: var(--ink-soft); font-size: 12px; }
.pos-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.pos-meta span { padding: 2px 8px; border-radius: 8px; background: #eaf6ea; color: var(--ok); font-size: 11px; font-weight: bold; }
.pos-card p { flex: 1; margin: 0; font-size: 12.5px; color: var(--ink-soft); }
.pos-card .btn { align-self: flex-start; }
.pos-card.other { border-style: dashed; }
.app-status { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; padding: 16px; border-radius: 14px; border: 1px solid #f0a500; background: #fff8e6; }
.app-status.st-approved { border-color: var(--ok); background: #eaf6ea; }
.as-ic { flex: none; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #b7791f; box-shadow: 0 2px 8px rgba(0,0,0,.1); animation: pop .5s ease; }
.app-status.st-approved .as-ic { color: var(--ok); }
.as-ic .ic { width: 30px; height: 30px; }
.app-status h2 { margin: 0 0 4px; font-size: 18px; }
.app-status p { margin: 0; }
.big-ids { margin-bottom: 10px; }
.decl { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border-radius: 6px; background: #fff; border: 1px solid var(--panel-line); }

/* Community */
.composer { display: flex; gap: 12px; max-width: 760px; margin-bottom: 14px; padding: 12px; border-radius: 14px; background: #fff; border: 1px solid var(--panel-line); box-shadow: 0 2px 10px rgba(31,74,140,.07); }
.cmp-av, .post-av { flex: none; width: 44px; height: 44px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--title-2); color: #fff; font-weight: bold; }
.cmp-av img, .post-av img { width: 100%; height: 100%; object-fit: cover; }
.cmp-main { flex: 1; min-width: 0; display: grid; gap: 8px; }
.cmp-main textarea { min-height: 56px; padding: 9px 11px; border-radius: 10px; border: 1px solid #c3d1e2; resize: vertical; }
.cmp-prev { display: flex; flex-wrap: wrap; gap: 6px; }
.cmp-prev:empty { display: none; }
.thumb { position: relative; width: 76px; height: 76px; border-radius: 9px; overflow: hidden; animation: pop .3s ease; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb button { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; line-height: 1; }
.cmp-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cmp-bar small { flex: 1; }
#feed { max-width: 760px; display: grid; gap: 12px; }
.post { padding: 12px 14px; border-radius: 14px; background: #fff; border: 1px solid var(--panel-line); box-shadow: 0 2px 10px rgba(31,74,140,.07); animation: rise .4s ease backwards; }
.post header { display: flex; align-items: center; gap: 10px; }
.post-who { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 4px; }
.post-who .who { font-size: 15px; background: linear-gradient(transparent 58%, #ffe58f 58%); padding: 0 2px; }
.post-who small { flex-basis: 100%; color: var(--ink-soft); font-size: 11px; }
.post-body { margin: 10px 0 0; white-space: pre-wrap; line-height: 1.5; }
.post-photos { display: grid; gap: 4px; margin-top: 10px; border-radius: 12px; overflow: hidden; }
.post-photos.n2, .post-photos.n4 { grid-template-columns: 1fr 1fr; }
.post-photos.n3 { grid-template-columns: 2fr 1fr; }
.post-photos.n2, .post-photos.n3, .post-photos.n4 { grid-auto-rows: 190px; }
.post-photos.n2 .pp, .post-photos.n3 .pp, .post-photos.n4 .pp { aspect-ratio: auto; height: 100%; }
.post-photos.n3 .pp:first-child { grid-row: span 2; }
.pp { position: relative; overflow: hidden; padding: 0; border: 0; background: #eef2f7; cursor: zoom-in; aspect-ratio: 4 / 3; }
.pp img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.post-photos.n1 .pp { aspect-ratio: auto; }
.post-photos.n1 .pp img { height: auto; max-height: 480px; object-fit: contain; }
.pp:hover img { transform: scale(1.04); }
.pp .more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.45); color: #fff; font: bold 26px var(--font-report); }
.iconlink { display: flex; padding: 6px; border: 0; border-radius: 6px; background: transparent; color: var(--ink-soft); cursor: pointer; }
.iconlink:hover { color: var(--bad); background: #fdecea; }

/* Order letters */
.subj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.subj { position: relative; }
.subj input { position: absolute; opacity: 0; }
.subj span { display: block; padding: 9px 8px; text-align: center; border-radius: 9px; border: 1px solid var(--panel-line); background: #fff; font-weight: bold; cursor: pointer; transition: all .2s; }
.subj span:hover { border-color: var(--title-1); }
.subj input:checked + span { background: linear-gradient(var(--title-1), var(--title-2)); color: #fff; border-color: var(--title-2); box-shadow: 0 3px 10px rgba(31,74,140,.3); }
.subj input:focus-visible + span { outline: 2px solid #f0a500; }
.subj input[type=checkbox] + span::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 7px; vertical-align: -2px; border: 2px solid currentColor; border-radius: 3px; font-size: 11px; line-height: 12px; text-align: center; }
.subj input[type=checkbox]:checked + span::before { content: "✔"; }
.letter-box { padding: 10px 14px; border-radius: 9px; background: #fff; border: 1px solid var(--panel-line); }
.letter-box p { margin: 4px 0 10px; line-height: 1.55; }
.lb-h { font-size: 11px; font-weight: bold; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
/* Printed order: details of order, information and order tables, APPROVED / DISAPPROVED, one authorized line */
.ol-sec { margin: 10px 0 3px; font-size: 11.5px; font-weight: bold; letter-spacing: .04em; }
table.ol-kv { border-collapse: collapse; font-size: 11.5px; }
.ol-kv th { padding: 1px 24px 1px 0; text-align: left; font-weight: normal; color: #333; white-space: nowrap; vertical-align: top; }
.ol-kv td { padding: 1px 0; }
.ol-intro { margin: 8px 0 2px; font-size: 11px; }
table.ol-grid { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.ol-grid th, .ol-grid td { padding: 3px 7px; border: 1px solid #000; text-align: left; vertical-align: top; }
.ol-grid th { width: 32%; font-weight: normal; }
.ol-grid small { color: #333; }
.ol-grid tr.ol-dec > * { font-weight: bold; letter-spacing: .04em; }
.ol-sign { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-top: 30px; flex-wrap: wrap; }
.ol-ad { font-size: 12px; font-weight: bold; }
.ol-ad > span { display: inline-block; padding: 2px 9px; border: 2px solid transparent; border-radius: 50%; }
.ol-ad > span.on { border-color: #000; }
.ol-ad div { margin-top: 8px; font-weight: normal; }
.ol-date { display: inline-block; min-width: 42mm; border-bottom: 1px solid #000; text-align: center; font-weight: bold; }
.ol-auth { width: 72mm; text-align: center; font-size: 11px; }
.ol-auth-name { min-height: 16px; font-weight: bold; letter-spacing: .03em; }
.ol-auth .line { margin: 2px 0 3px; border-top: 1px solid #000; }
.ol-sign.one { justify-content: flex-end; }
table.ol-sched th { width: auto; font-weight: bold; text-align: center; background: #eee; }
table.ol-sched td:first-child { text-align: center; }
table.ol-sched .num { text-align: right; }
/* Account Balance Certificate */
.cert-no { display: flex; justify-content: space-between; gap: 12px; margin: 2px 0 10px; font-size: 11.5px; flex-wrap: wrap; }
.cert-to { margin: 6px 0; font-weight: bold; letter-spacing: .04em; }
.cert-body { margin: 6px 0 8px; font-size: 12px; line-height: 1.7; text-align: justify; }
.cert-wait { margin-top: 10px; padding: 4px; text-align: center; font-weight: bold; letter-spacing: .08em; color: #b00020; border: 2px dashed #b00020; }
/* Request Order form: the customer's amount due and the installment schedule */
.due-info { margin-top: 8px; padding: 6px 10px; border-radius: 8px; background: #fff8e1; border: 1px solid #f0d58a; font-size: 13px; }
.sched-h { margin: 10px 0 4px; font-weight: bold; }

/* Verification */
.verify-hero { max-width: 780px; margin: 0 auto 14px; padding: 22px 18px; text-align: center; border-radius: 18px; border: 1px solid var(--panel-line); background: linear-gradient(160deg, #fff, #eef5ff); box-shadow: 0 6px 22px rgba(31,74,140,.1); }
.vh-badge { width: 66px; height: 66px; margin: 0 auto 6px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #6fae2c, #2f7d32); color: #fff; box-shadow: 0 6px 16px rgba(47,125,50,.35); animation: pop .6s ease; }
.vh-badge .ic { width: 36px; height: 36px; }
.verify-hero h2 { margin: 4px 0; font: bold 24px var(--font-report); color: var(--title-2); }
.verify-hero p { margin: 0 0 12px; color: var(--ink-soft); }
.vf-form { display: flex; gap: 8px; max-width: 640px; margin: 0 auto 10px; }
.vf-form input { flex: 1; min-width: 0; padding: 11px 14px; border-radius: 11px; border: 2px solid #b7c7da; font: bold 15px var(--font-mono); text-transform: uppercase; transition: border-color .2s, box-shadow .2s; }
.vf-form input::placeholder { text-transform: none; font: 12px var(--font-ui); }
.vf-form input:focus { outline: none; border-color: var(--band-2); box-shadow: 0 0 0 4px rgba(111,174,44,.2); }
.vf-form .btn { padding: 0 20px; border-radius: 11px; font-size: 15px; background: linear-gradient(135deg, #6fae2c, #2f7d32); color: #fff; border-color: #2f7d32; }
.btnrow.center { justify-content: center; }
.vf-wait { max-width: 780px; margin: 0 auto; }
.vf-ok, .vf-bad { max-width: 780px; margin: 0 auto; padding: 22px 18px; text-align: center; border-radius: 18px; animation: rise .45s cubic-bezier(.2,.8,.2,1) backwards; }
.vf-ok { background: linear-gradient(160deg, #f1fbf1, #fff); border: 2px solid var(--ok); box-shadow: 0 12px 30px rgba(47,125,50,.18); }
.vf-bad { background: #fff6f5; border: 2px solid var(--bad); animation: shake .5s ease; }
.vf-seal { width: 78px; height: 78px; margin: 0 auto 8px; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #fff; font: bold 40px var(--font-report); box-shadow: 0 0 0 7px #d8f0d8; animation: sealIn .6s cubic-bezier(.2,.8,.2,1) backwards; }
.vf-seal .ic { width: 44px; height: 44px; stroke-width: 3; }
.vf-bad .vf-seal { background: var(--bad); box-shadow: 0 0 0 7px #f7d4d1; }
.vf-title { font: bold 28px var(--font-report); letter-spacing: .1em; color: var(--ok); }
.vf-bad .vf-title { color: var(--bad); }
.vf-sub { margin: 2px 0 12px; font-weight: bold; letter-spacing: .06em; color: var(--title-2); }
.vf-bad .vf-sub { font-weight: normal; letter-spacing: 0; color: var(--ink); }
.vf-type { margin-bottom: 10px; font-size: 15px; }
.vf-fields { min-width: min(470px, 100%); margin: 0 auto; border-collapse: collapse; text-align: left; background: #fff; border: 1px solid var(--grid-head); }
.vf-fields th, .vf-fields td { padding: 6px 12px; border-bottom: 1px solid var(--grid-alt); }
.vf-fields th { width: 42%; font-weight: normal; color: var(--ink-soft); }
.vf-fields td { font-weight: bold; overflow-wrap: anywhere; }
.vf-when { margin: 10px 0 4px; font-size: 12px; color: var(--ink-soft); }
.vf-ok.small, .vf-bad.small { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; padding: 10px 12px; text-align: left; border-radius: 10px; box-shadow: none; }
.vf-ok.small b { color: var(--ok); }
.vf-bad.small b { color: var(--bad); }

/* A5 landscape pages (openPreview size "a5l") */
.page.a5l { width: 210mm; min-height: 148mm; padding: 8mm 11mm; page: a5l; }
.page.a5l > .wm { width: 44%; }
@page a5l { size: A5 landscape; margin: 0; }
.page { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

/* Validated print (A4): VERIFIED RECORD BY …, TRUE RECORD seal, record details, validation with QR code */
/* Typewriter lettering for everything below the letterhead */
.vp { flex: 1; display: flex; flex-direction: column; }
.vp .ph-title, .vp-true, .vp .pbox, .vp-sys { font-family: "Courier New", Courier, "Liberation Mono", monospace; }
.vp .ph-title { font-size: 17px; letter-spacing: .08em; }
.vp-true small + small { margin-top: 1px; }
.vp-true { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0 0 10px; padding: 10px; color: #1b5e20; border: 2px solid #1b5e20; border-radius: 8px; }
.vp-seal { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 50%; background: #1b5e20; color: #fff; font-size: 22px; font-weight: bold; }
.vp-true b { display: block; font-size: 20px; letter-spacing: .12em; }
.vp-true small { display: block; font-size: 10px; color: #333; }
table.vp-fields { width: 100%; border-collapse: collapse; font-size: 12px; }
.vp-fields th { width: 36%; padding: 5px 8px; text-align: left; font-weight: normal; color: #444; border-bottom: 1px dotted #bbb; }
.vp-fields td { padding: 5px 8px; font-weight: bold; border-bottom: 1px dotted #bbb; overflow-wrap: anywhere; }
.vp-fields tr:last-child > * { border-bottom: 0; }
/* a date or a record number in a printed paragraph stays on one line */
.nw { white-space: nowrap; }
/* a record with many details (an e-bill's statistics) stays on one page */
table.vp-fields.many { font-size: 10.5px; }
.vp-fields.many th, .vp-fields.many td { padding: 2.5px 8px; }
.vp-valid { display: flex; align-items: flex-start; gap: 10px; }
.vp-valid table { flex: 1; }
.vp-qr { padding: 6px 10px 6px 0; text-align: center; font-size: 9px; }
.vp-qr img { display: block; width: 32mm; height: 32mm; image-rendering: pixelated; }
.vp-sys { margin-top: auto; padding-top: 8px; border-top: 1px solid #000; text-align: center; font-size: 10px; font-style: italic; }
@media (max-width: 520px) {
  .vp-valid { flex-direction: column; align-items: stretch; }
  .vp-qr { align-self: center; padding: 0 0 8px; }
}

/* Messages */
.chat-panel { position: fixed; z-index: 55; top: 0; right: 0; bottom: 0; width: min(780px, 100vw); display: flex; flex-direction: column; background: #fff; box-shadow: -12px 0 34px rgba(0,0,0,.28); transform: translateX(105%); transition: transform .38s cubic-bezier(.2,.8,.2,1); padding-top: env(safe-area-inset-top, 0px); }
.chat-panel.open { transform: none; }
.cp-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: linear-gradient(var(--title-1), var(--title-2)); color: #fff; }
.cp-title { flex: 1; display: flex; align-items: center; gap: 8px; font-weight: bold; font-size: 15px; }
.cp-head button { width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 9px; background: rgba(255,255,255,.15); color: #fff; cursor: pointer; }
.cp-head button:hover { background: rgba(255,255,255,.28); }
.cp-back { display: none !important; }
.cp-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 275px minmax(0, 1fr); }
.cp-list { min-height: 0; display: flex; flex-direction: column; background: #f7f9fc; border-right: 1px solid var(--grid-head); }
input.cp-q { margin: 8px; width: auto; border-radius: 18px; padding: 7px 12px; }
.cp-contacts { flex: 1; overflow-y: auto; }
.cp-contact { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-bottom: 1px solid #edf1f6; background: transparent; text-align: left; cursor: pointer; transition: background .15s; }
.cp-contact:hover { background: #eef4fc; }
.cp-contact.on { background: #dde9f8; }
.cp-av { position: relative; flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--title-2); color: #fff; font-weight: bold; }
.cp-av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.cp-av .dot { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; background: #b0b8c4; box-shadow: 0 0 0 2px #fff; }
.cp-av .dot.on { background: #2ecc71; animation: pulse 2s infinite; }
.cp-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cp-who b, .cp-who small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-who small { color: var(--ink-soft); font-size: 11px; }
.on-txt { color: #1e9e57; font-weight: bold; }
.cp-contact .badge { padding: 2px 7px; border-radius: 10px; background: #e53935; color: #fff; font-size: 11px; font-weight: bold; animation: pop .35s ease; }
.cp-time { color: var(--ink-soft); font-size: 10px; }
.cp-conv { min-height: 0; display: flex; flex-direction: column; background: #eef2f7; }
.cp-empty { flex: 1; display: grid; place-content: center; gap: 6px; padding: 20px; text-align: center; color: var(--ink-soft); }
.cp-empty .ic { width: 46px; height: 46px; margin: 0 auto; opacity: .45; }
.cv-head { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: #fff; border-bottom: 1px solid var(--grid-head); }
.cv-head small { display: block; color: var(--ink-soft); font-size: 11px; }
.cv-msgs { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 12px; scroll-behavior: smooth; }
.cv-day { align-self: center; margin: 6px 0; padding: 2px 10px; border-radius: 10px; background: #fff; color: var(--ink-soft); font-size: 11px; }
.cv-msg { max-width: 76%; display: flex; flex-direction: column; gap: 4px; padding: 7px 11px; border-radius: 15px; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.cv-msg:last-child { animation: msgIn .28s ease backwards; }
.cv-msg.me { align-self: flex-end; border-bottom-right-radius: 4px; background: linear-gradient(135deg, #3d6db5, #1f4a8c); color: #fff; }
.cv-msg.them { align-self: flex-start; border-bottom-left-radius: 4px; background: #fff; }
.cv-msg small { align-self: flex-end; font-size: 10px; opacity: .75; }
.cv-text { white-space: pre-wrap; word-break: break-word; }
.cv-img { padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: none; cursor: zoom-in; }
.cv-img img { display: block; max-width: 240px; max-height: 240px; border-radius: 10px; }
.cv-file { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; background: rgba(255,255,255,.18); color: inherit; font-weight: bold; text-decoration: none; }
.cv-msg.them .cv-file { background: #eef2f7; }
.cv-compose { display: flex; align-items: center; gap: 8px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px)); background: #fff; border-top: 1px solid var(--grid-head); }
.cv-compose input[type=text] { flex: 1; padding: 9px 14px; border-radius: 20px; border: 1px solid #c3d1e2; }
.cv-attach, .cv-send { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer; transition: transform .15s, filter .15s; }
.cv-attach { background: #eef2f7; color: var(--title-2); }
.cv-send { background: linear-gradient(135deg, #3d6db5, #1f4a8c); color: #fff; }
.cv-send:disabled { filter: grayscale(1); opacity: .6; }
.cv-send:active, .cv-attach:active { transform: scale(.9); }
@media (max-width: 700px) {
  .cp-body { grid-template-columns: minmax(0, 1fr); }
  .cp-conv { display: none; }
  .chat-panel.in-conv .cp-list { display: none; }
  .chat-panel.in-conv .cp-conv { display: flex; }
  .chat-panel.in-conv .cp-back { display: grid !important; }
}

/* Change requests and editing */
.cr-card { margin-bottom: 10px; padding: 10px 12px; border-radius: 11px; background: #fff; border: 1px solid var(--panel-line); border-left: 5px solid #f0a500; animation: rise .35s ease backwards; }
.cr-card.st-approved { border-left-color: var(--ok); }
.cr-card.st-rejected { border-left-color: var(--bad); }
.cr-card header { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.cr-card header small { flex-basis: 100%; color: var(--ink-soft); }
.cr-reason { margin: 6px 0; }
table.grid.cr-diff { margin: 6px 0; }
.cr-diff td.old { white-space: normal; color: var(--bad); text-decoration: line-through; }
.cr-diff td.new { white-space: normal; color: var(--ok); font-weight: bold; }
.cr-act { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cr-act input { flex: 1 1 200px; width: auto; }
.cr-done { font-size: 12px; color: var(--ink-soft); }
.edit-grid { max-height: 58vh; overflow: auto; padding-right: 4px; }
.sw { display: inline-flex; align-items: center; gap: 6px; }
.danger-fill { background: linear-gradient(#e0574f, #b3261e) !important; color: #fff !important; border-color: #8f1d17 !important; }

/* Billing (PHP → BDT) */
.bdt { padding: 0 4px; border-radius: 3px; background: #fff1a8; color: #6e4300; }
.bdt-calc { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 12px; border-radius: 12px; text-align: center; background: linear-gradient(135deg, #fffbe6, #fff1a8); border: 2px solid #e0b100; }
.bdt-calc small { font-size: 10.5px; font-weight: bold; letter-spacing: .05em; text-transform: uppercase; color: #7a5200; }
.bdt-calc b { font: bold 30px var(--font-report); color: #6e4300; }
.bdt-calc span { font: 13px var(--font-mono); color: #5c4400; }
.rel-calc span + small { margin-top: 6px; }
.find-row { display: flex; gap: 6px; align-items: center; }
.find-row input { flex: 1; min-width: 0; }
.rcpt-prev { width: 100%; max-width: 260px; min-height: 60px; display: grid; place-items: center; overflow: hidden; border-radius: 8px; border: 1px dashed var(--panel-line); background: #fff; color: var(--ink-soft); font-size: 11px; }
.rcpt-prev img { width: 100%; max-height: 220px; object-fit: contain; }
.amt-panel { display: grid; align-content: start; gap: 6px; }
.amt-panel > div { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 10px; border-radius: 8px; background: #fff; border: 1px solid var(--grid-head); }
.amt-panel small { color: var(--ink-soft); }
.amt-panel b { font: bold 16px var(--font-report); }
.amt-panel .hl { background: #fff1a8; border-color: #e0b100; }
.amt-panel .hl b { font-size: 22px; color: #6e4300; }
.inline-form { margin-bottom: 10px; padding: 8px 10px; border-radius: 9px; background: var(--panel); border: 1px solid var(--panel-line); }
.vno-row { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 12px; }
table.rp.v-amt { margin: 6px 0; }
.v-amt td { padding: 5px 8px; font-size: 12px; border-bottom: 1px solid #ccc; }
.v-amt tr.v-bdt td { font-size: 14px; font-weight: bold; }
.v-rcpt-in { height: 86mm; display: flex; align-items: center; justify-content: center; padding: 4px; overflow: hidden; }
.v-rcpt-in img { max-width: 100%; max-height: 82mm; object-fit: contain; }

/* Scanner */
.scan-view { position: relative; overflow: hidden; aspect-ratio: 4 / 3; border-radius: 12px; background: #000; }
.scan-view video { display: block; width: 100%; height: 100%; object-fit: cover; }
.scan-frame { position: absolute; inset: 13%; border: 3px solid rgba(255,255,255,.92); border-radius: 16px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); }
.scan-frame i { position: absolute; left: 6%; right: 6%; height: 2px; background: #7cfc00; box-shadow: 0 0 12px #7cfc00; animation: laser 2.2s ease-in-out infinite; }
.scan-msg { text-align: center; color: var(--ink-soft); }
.scan-modal.nocam .scan-view { display: none; }

/* My Profile */
.me-card { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-bottom: 12px; padding: 16px; border-radius: 14px; border: 1px solid var(--panel-line); background: linear-gradient(120deg, #fff, #eef5ff); }
.me-photo { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.me-photo > img, .me-photo > span { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: var(--title-2); color: #fff; font: bold 34px var(--font-report); border: 3px solid #fff; box-shadow: 0 3px 10px rgba(0,0,0,.15); }
.me-main h2 { margin: 0; font: bold 22px var(--font-report); }
.me-sub { margin: 2px 0 8px; color: var(--ink-soft); }
.btn.small { padding: 2px 10px; font-size: 12px; }

/* ---------- Corrections box on records ---------- */
.rhist { margin-top: 10px; }

@media (prefers-reduced-motion: reduce) {
  *:not(.spin) { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}

/* ===================== 10 Inventory: stock-bills, release, sales report, e-bills ===================== */
.pill.shipped { color: #1f5fbf; border-color: #1f5fbf; background: #eaf2ff; }
.pill.arrived { color: #6a3fb5; border-color: #6a3fb5; background: #f1ebfb; }
.pill.released { color: #0b7a75; border-color: #0b7a75; background: #e3f5f4; }
.pill.sold { color: #8a5a00; border-color: #c98a00; background: #fff3d6; }
.tile.bad .v { color: var(--bad); }
.tile.muted .v { color: var(--ink-soft); font-size: 15px; }
b.gain, tr.gain th, tr.gain td { color: var(--ok); }
b.loss, tr.loss th, tr.loss td { color: var(--bad); }
.inv-find { margin: 8px 0; }
.inv-find input { width: min(100%, 440px); }
.sb-subh { font-weight: bold; color: var(--title-2); margin: 12px 0 4px; }
#sbPanes .btn.small, .due-info .btn.small { padding: 2px 8px; font-size: 12px; }
/* the item table of a new stock-bill: column names and cells are typed in place */
.sbt-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--panel-line); border-radius: 6px; margin: 6px 0; }
table.sbt { border-collapse: collapse; width: 100%; min-width: 620px; }
table.sbt th, table.sbt td { border: 1px solid var(--panel-line); padding: 0; }
table.sbt thead th { background: var(--grid-head); }
table.sbt input { width: 100%; min-width: 96px; border: 0; border-radius: 0; padding: 7px 8px; background: transparent; box-shadow: none; }
table.sbt th input { font-weight: bold; color: var(--title-2); }
table.sbt td.num input, table.sbt th.num input { text-align: right; min-width: 82px; }
table.sbt input:focus { outline: 2px solid var(--title-1); outline-offset: -2px; background: #fffbe6; }
table.sbt .sbt-no { width: 38px; text-align: center; color: var(--ink-soft); padding: 4px; background: var(--grid-head); font-size: 12px; }
table.sbt .sbt-act { width: 34px; text-align: center; background: #fff; }
table.sbt td.sbt-tot { padding: 7px 8px; font-weight: bold; white-space: nowrap; min-width: 100px; text-align: right; background: #f7fafc; }
table.sbt tfoot td { padding: 7px 8px; background: var(--grid-head); white-space: nowrap; }
.sbt-h { display: flex; align-items: center; }
.sbt-x { border: 0; background: none; color: var(--bad); font-size: 18px; line-height: 1; padding: 4px 7px; border-radius: 6px; cursor: pointer; }
.sbt-x:hover, .sbt-x:focus-visible { background: #fdecea; }
.sb-coln { align-self: center; }
/* the stock-bill page */
.sb-ic .ic { width: 58px; height: 58px; stroke-width: 1.4; }
.cust-hero.st-shipped::before { background: #1f5fbf; }
.cust-hero.st-arrived::before { background: #6a3fb5; }
.cust-hero.st-released::before { background: #0b7a75; }
.cust-hero.st-sold::before { background: #c98a00; }
.sb-steps { display: flex; margin: 0 0 10px; padding: 12px 6px 8px; background: #fff; border: 1px solid var(--panel-line); border-radius: 12px; overflow-x: auto; }
.sb-step { flex: 1 1 0; min-width: 86px; display: flex; flex-direction: column; align-items: center; gap: 3px; position: relative; text-align: center; font-size: 11.5px; color: var(--ink-soft); }
.sb-step::before { content: ""; position: absolute; top: 14px; right: 50%; width: 100%; height: 3px; background: var(--grid-head); }
.sb-step:first-child::before { display: none; }
.sb-step.on::before { background: var(--ok); }
.sb-step .dot { position: relative; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--grid-head); color: var(--ink-soft); font-weight: bold; }
.sb-step .dot .ic { width: 16px; height: 16px; stroke-width: 3; }
.sb-step.on .dot { background: var(--ok); color: #fff; }
.sb-step.cur .dot { box-shadow: 0 0 0 5px rgba(47, 125, 50, .18); }
.sb-step.on b { color: var(--ink); }
.sb-step small { min-height: 16px; }
.sb-tiles .tile .v { font-size: 19px; }
.sb-sum { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.sb-sum > div { display: flex; flex-direction: column; min-width: 150px; padding: 6px 12px; border-radius: 8px; background: #fff; border: 1px solid var(--grid-head); }
.sb-sum small { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); }
.sb-sum b { font-size: 16px; font-variant-numeric: tabular-nums; }
.sb-sum .ok b { color: var(--ok); }
.et { font-weight: bold; }
.et.sales { color: var(--ok); }
.et.penalty { color: var(--bad); }
.sb-up { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.sb-up select { width: auto; }
.sb-top { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 14px; }
.sb-top small { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: #7a5200; }
.kv-sum { width: 100%; border-collapse: collapse; margin: 6px 0 10px; }
.kv-sum th, .kv-sum td { padding: 5px 8px; border-bottom: 1px solid var(--grid-alt); }
.kv-sum th { text-align: left; font-weight: normal; color: var(--ink-soft); }
.kv-sum td { text-align: right; font-weight: bold; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kv-sum tr.gain th, .kv-sum tr.loss th { font-weight: bold; }
.vf-fields tr.vf-hl th, .vf-fields tr.vf-hl td { background: #fff4b8; color: var(--ink); font-weight: bold; }
/* prints: stock-bill, e-bill and the Statistics Report */
.sb-no { text-align: right; display: flex; flex-direction: column; gap: 1px; }
.sb-no small { font-size: 9px; text-transform: uppercase; }
.sb-no b { font: bold 15px var(--font-report); letter-spacing: .03em; }
.sb-cont { display: flex; justify-content: space-between; gap: 10px; border-bottom: 2px solid #000; padding-bottom: 4px; margin-bottom: 8px; font-size: 11px; }
.sb-sec { margin: 9px 0 3px; font-size: 11.5px; font-weight: bold; letter-spacing: .04em; }
table.rp.sb-items { font-size: 10.5px; margin: 4px 0 8px; }
table.rp.sb-items th, table.rp.sb-items td { border: 1px solid #000; padding: 3px 4px; overflow-wrap: anywhere; }
table.rp.sb-items th { background: #eee; white-space: normal; }
table.rp.sb-items.tight { font-size: 9.5px; }
table.rp.sb-items.fixed { table-layout: fixed; }
table.rp.sb-items td.num { white-space: nowrap; overflow-wrap: normal; }
table.rp.sb-items tfoot td { font-weight: bold; background: #f3f3f3; }
table.rp.sb-pl td { padding: 3px 6px; }
table.rp.sb-pl tr.grand td { font-size: 14px; padding-top: 5px; }
.page tr.loss td { color: #b3261e; }
.page tr.gain td { color: #1b5e20; }
.sb-formula { padding: 3px 6px 5px; font-size: 10px; color: #333; }
.sb-qr { width: 92px; height: 92px; image-rendering: pixelated; display: block; margin: 0 auto; }
.sb-code { font: 8.5px var(--font-mono); max-width: 126px; margin: 2px auto 0; }
.sb-code small { display: block; font: bold 7.5px var(--font-report); letter-spacing: .06em; }
.sb-psteps { display: grid; grid-template-columns: repeat(4, 1fr); }
.sb-psteps > div { padding: 4px 6px; border-right: 1px solid #ccc; display: flex; flex-direction: column; font-size: 10.5px; }
.sb-psteps > div:last-child { border-right: 0; }
.sb-psteps b { font-size: 9.5px; }
.sb-secret { display: flex; flex-direction: column; gap: 3px; padding: 5px 8px; font-size: 10px; }
.sb-secret b { font: bold 14px var(--font-mono); letter-spacing: .04em; }
.sb-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sb-photo { margin: 0; border: 1px solid #000; padding: 4px; text-align: center; font-size: 9.5px; break-inside: avoid; }
.sb-photo img { width: 100%; height: 104mm; object-fit: contain; display: block; margin-bottom: 3px; background: #fff; }
@media (max-width: 700px) {
  .sb-step { min-width: 70px; font-size: 10.5px; }
  .sb-sum > div { min-width: calc(50% - 4px); flex: 1 1 calc(50% - 4px); }
}

/* ===================== 2.0: signatures ===================== */
/* The Director's signature on an approved document: the picture stands on the signature line. */
.psig:has(.esig) { margin-top: 62px; }
.psig .sig-on { position: relative; }
.psig .esig { position: absolute; left: 50%; bottom: calc(100% - 8px); transform: translateX(-50%); height: 15mm; max-width: 95%; object-fit: contain; }
.psig.one { grid-template-columns: 1fr 1fr; }
.ol-auth.has-sig .esig { display: block; height: 15mm; max-width: 100%; margin: 0 auto -4mm; object-fit: contain; position: relative; z-index: 2; }
.doccard.esigned .dc-main small { color: var(--ok); }

/* Signature Verification Form */
.sv-intro { font-size: 11px; margin: 4px 0 10px; }
.sv-form .pbox > .pdecl { margin: 8px; }
.sv-form.blank .pcell .pv { min-height: 24px; }
.sv-form.blank .sv-box { height: 34mm; }
.sv-form.blank .sv-box.sv-ini { height: 24mm; }
.sv-boxes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 10px; }
.sv-box { position: relative; height: 30mm; border: 1.5px solid #000; border-radius: 3px; background: #fff; }
.sv-box > span { position: absolute; left: 6px; top: 4px; font-size: 8.5px; text-transform: uppercase; color: #444; letter-spacing: .04em; }
.sv-row { display: flex; align-items: center; gap: 12px; padding: 0 10px 10px; }
.sv-row p { margin: 0; font-size: 10px; color: #333; }
.sv-box.sv-ini { flex: 0 0 38mm; height: 20mm; }
.sv-one { display: grid; place-items: center; height: 34mm; margin: 10px; border: 1.5px solid #000; border-radius: 3px; background: #fff; }
.sv-one img { max-height: 28mm; max-width: 90%; object-fit: contain; }
.sv-one span { color: #777; font-style: italic; }
.sv-cap { padding: 0 10px 8px; font-size: 9.5px; color: #333; text-align: center; }
.sv-by { padding: 0 6px 8px; font-size: 10.5px; }
.sv-status { padding: 6px; font-size: 11px; }
.sv-status.approved b { color: #1b5e20; }
.sv-status.rejected b { color: #b00020; }
.sv-status.pending b { color: #8a5a00; }
.sv-remarks { margin: 14px 6px 8px; padding-bottom: 14px; border-bottom: 1px solid #000; font-size: 10px; }
.pbox .psig { margin: 46px 10px 10px; }
.pbox .psig:has(.esig) { margin-top: 62px; }

/* My Signature (My Profile) and the signature dialog (User) */
.sigset { margin-top: 10px; }
.sig-show, .sig-check { display: grid; place-items: center; min-height: 90px; margin: 6px 0; padding: 10px; border: 1px dashed var(--panel-line); border-radius: 8px;
  background: repeating-linear-gradient(45deg, #fff, #fff 8px, #f6f8fb 8px, #f6f8fb 16px); }
.sig-show img, .sig-check img { max-height: 110px; max-width: 100%; object-fit: contain; }
.sig-st { margin-bottom: 6px; }
.fm-built { margin-bottom: 12px; }
