/* ============================================================
   Najeeb Rohani — Midnight Ledger design system
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

:root {
  --bg: #0B1220;
  --bg-deep: #080E18;
  --card: #111A26;
  --card-2: #0E1723;
  --line: #1E2A3B;
  --line-soft: #182233;
  --cyan: #22D3EE;
  --cyan-ink: #04212A;
  --cyan-dim: rgba(34, 211, 238, .13);
  --lime: #A3E635;
  --lime-dim: rgba(163, 230, 53, .13);
  --pos: #34D399;
  --neg: #F87171;
  --neg-dim: rgba(248, 113, 113, .12);
  --warn: #FBBF24;
  --warn-dim: rgba(251, 191, 36, .12);
  --label: #7C8DA6;
  --text: #E6EDF6;
  --text-2: #A9B8CB;
  --r: 16px;
  --r-sm: 10px;
  --shadow: 0 18px 40px -24px rgba(0, 0, 0, .9);
}

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(900px 520px at 88% -12%, rgba(34, 211, 238, .075), transparent 62%),
              radial-gradient(700px 500px at -10% 110%, rgba(52, 211, 153, .05), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, h4, p { margin: 0; }
.hidden { display: none !important; }
.ic { flex: none; }

/* ---------------- shell ---------------- */
.shell { position: relative; z-index: 1; min-height: 100vh; }
.main-col { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.screens { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 16px 16px 96px; }
.screen { animation: screenIn .22s ease-out; }
@keyframes screenIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .screen { animation: none; }
  * { transition: none !important; }
}

/* ---------------- rail (desktop) ---------------- */
.rail { display: none; }
@media (min-width: 1000px) {
  .shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); }
  .rail {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 24px 16px;
    background: linear-gradient(180deg, #0C1522 0%, #0A111C 100%);
    border-right: 1px solid var(--line);
  }
  .screens { padding: 24px 28px 56px; }
  .tabbar { display: none !important; }
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 4px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 12px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(150deg, var(--cyan), #0E9FB8);
  color: #052029; font-weight: 800; letter-spacing: .04em; font-size: 15px;
  box-shadow: 0 8px 22px -12px rgba(34, 211, 238, .9);
  overflow: hidden;
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.brand-name { font-weight: 700; letter-spacing: -.01em; font-size: 15px; }
.brand-sub { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--label); }
.rail-nav { display: flex; flex-direction: column; gap: 2px; }
.rail-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px; border: 1px solid transparent;
  background: transparent; color: var(--text-2); font-weight: 500; font-size: 13.5px;
  text-align: start; transition: background .16s ease, color .16s ease;
}
.rail-link:hover { background: #131E2C; color: var(--text); }
.rail-link.on { background: var(--cyan-dim); border-color: rgba(34, 211, 238, .28); color: var(--cyan); }
.rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.rail-note { font-size: 11px; color: var(--label); text-align: center; letter-spacing: .04em; }

/* ---------------- topbar ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px 12px;
  background: rgba(11, 18, 32, .86);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
@media (min-width: 1000px) { .topbar { padding: 22px 28px 16px; background: transparent; backdrop-filter: none; border-bottom: 0; } }
.eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--label); font-weight: 600; }
.topbar-title { font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
@media (min-width: 1000px) { .topbar-title { font-size: 26px; } }
.icon-btn {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: var(--cyan); color: var(--cyan-ink); border: 0; font-weight: 700;
  box-shadow: 0 10px 22px -14px rgba(34, 211, 238, .95);
  transition: transform .12s ease, filter .16s ease;
}
.icon-btn:active { transform: scale(.94); }

/* ---------------- tabbar ---------------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: rgba(10, 17, 28, .95);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  padding: 6px 4px 8px;
}
.tabbtn {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: transparent; border: 0; padding: 6px 2px 4px; min-height: 50px;
  color: var(--label); font-size: 10.5px; font-weight: 600; letter-spacing: .02em;
  border-radius: 12px; transition: color .16s ease;
}
.tabbtn.on { color: var(--cyan); }
.tabbtn.on .tab-pill { background: var(--cyan-dim); }
.tab-pill { display: grid; place-items: center; width: 44px; height: 26px; border-radius: 9px; transition: background .16s ease; }

/* ---------------- type ---------------- */
.h2 { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.h3 { font-size: 14px; font-weight: 700; }
.sub { font-size: 12.5px; color: var(--label); margin-top: 2px; }
.label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--label); font-weight: 600; }
.muted { color: var(--label); }
.tiny { font-size: 11px; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.warn { color: var(--warn); }
.cyan { color: var(--cyan); }
.mono, .amt { font-variant-numeric: tabular-nums; }
.amt { text-align: right; }

/* ---------------- layout helpers ---------------- */
.screen-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.grid { display: grid; gap: 12px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
@media (min-width: 760px) { .g2 { gap: 16px; } .grid { gap: 16px; } }
.stack { display: flex; flex-direction: column; gap: 12px; }
.rowflex { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* ---------------- card ---------------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035), var(--shadow);
}
@media (min-width: 760px) { .card { padding: 20px; } }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-title { font-size: 13px; font-weight: 700; letter-spacing: .02em; }
.card-sub { font-size: 11.5px; color: var(--label); }

/* ---------------- kpi ---------------- */
.kpi { display: flex; flex-direction: column; gap: 6px; }
.kpi-value { font-size: 22px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
@media (min-width: 760px) { .kpi-value { font-size: 24px; } }
.kpi-sub { font-size: 11.5px; color: var(--label); }
.kpi-accent { width: 22px; height: 2px; border-radius: 2px; background: var(--cyan); opacity: .8; }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 44px; padding: 10px 16px; border-radius: 11px;
  background: #16202F; color: var(--text); border: 1px solid var(--line);
  font-weight: 600; font-size: 13.5px; letter-spacing: .01em;
  transition: transform .12s ease, background .16s ease, border-color .16s ease, opacity .16s ease;
}
.btn:hover { border-color: var(--line-2, #2B3B52); background: #1A2634; }
.btn:active { transform: scale(.985); }
.btn:focus-visible, .icon-btn:focus-visible, .chip:focus-visible, .tabbtn:focus-visible, .rail-link:focus-visible, .row-card:focus-visible {
  outline: 2px solid var(--cyan); outline-offset: 2px;
}
.btn-primary { background: var(--cyan); color: var(--cyan-ink); border-color: transparent; font-weight: 700; }
.btn-primary:hover { background: #38DDF5; border-color: transparent; }
.btn-ghost { background: transparent; }
.btn-danger { background: var(--neg-dim); color: #FCA5A5; border-color: rgba(248, 113, 113, .35); }
.btn-danger:hover { background: rgba(248, 113, 113, .2); }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 12.5px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.plus-glyph { font-size: 16px; line-height: 1; font-weight: 700; }

/* ---------------- chips ---------------- */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; min-height: 34px; padding: 6px 14px; border-radius: 999px;
  background: #121C29; color: var(--text-2); border: 1px solid var(--line);
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.chip:hover { color: var(--text); border-color: #2B3B52; }
.chip.on { background: var(--cyan-dim); border-color: rgba(34, 211, 238, .45); color: var(--cyan); }

/* ---------------- forms ---------------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.input, .select, .textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: var(--r-sm);
  background: #0D1622; border: 1px solid var(--line); color: var(--text);
  font-size: 16px; transition: border-color .16s ease, box-shadow .16s ease;
}
@media (min-width: 760px) { .input, .select, .textarea { font-size: 14px; } }
.textarea { min-height: 76px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: #5E7085; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 211, 238, .16); }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237C8DA6' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
input[type="date"].input { min-height: 44px; }
input[type="number"] { font-variant-numeric: tabular-nums; }
.form-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .form-grid.two { grid-template-columns: 1fr 1fr; } .form-grid.three { grid-template-columns: 1fr 1fr 1fr; } }
.checkline { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); }

/* ---------------- toolbar ---------------- */
.toolbar { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
@media (min-width: 720px) { .toolbar { flex-direction: row; align-items: center; justify-content: space-between; } .toolbar .chips { flex: 1; } }
.range-inputs { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.range-inputs .field { width: 140px; }

/* ---------------- rows / lists ---------------- */
.row-card {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 13px 14px; border-radius: 13px; text-align: start;
  background: var(--card); border: 1px solid var(--line);
  transition: border-color .16s ease, background .16s ease, transform .12s ease;
}
.row-card + .row-card { margin-top: 8px; }
.row-card:hover { border-color: #2B3B52; background: #131E2C; }
.row-card:active { transform: scale(.994); }
.avatar {
  width: 38px; height: 38px; flex: none; border-radius: 11px; display: grid; place-items: center;
  background: #16222F; border: 1px solid var(--line); color: var(--cyan);
  font-size: 12.5px; font-weight: 700; letter-spacing: .02em;
}
.row-main { flex: 1; min-width: 0; }
.row-title { font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.row-sub { font-size: 11.5px; color: var(--label); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-side { text-align: right; flex: none; }
.row-side .amt { font-size: 13.5px; font-weight: 700; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
  background: #16222F; color: var(--text-2); border: 1px solid var(--line);
  white-space: nowrap;
}
.badge-cyan { background: var(--cyan-dim); color: var(--cyan); border-color: rgba(34, 211, 238, .35); }
.badge-lime { background: var(--lime-dim); color: var(--lime); border-color: rgba(163, 230, 53, .35); }
.badge-warn { background: var(--warn-dim); color: var(--warn); border-color: rgba(251, 191, 36, .35); }
.badge-red { background: var(--neg-dim); color: var(--neg); border-color: rgba(248, 113, 113, .35); }

.empty {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 34px 18px; text-align: center; color: var(--label);
  border: 1px dashed var(--line); border-radius: var(--r); background: rgba(17, 26, 38, .5);
}
.empty-title { color: var(--text); font-weight: 600; font-size: 14px; }
.empty p { font-size: 12.5px; max-width: 320px; }

/* ---------------- tables ---------------- */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 12px; border: 1px solid var(--line); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 460px; }
table.tbl th {
  text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--label); font-weight: 700; padding: 10px 12px; background: #0E1723;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl td.r, table.tbl th.r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.tbl tfoot td { font-weight: 700; background: #0E1723; border-top: 1px solid var(--line); }

/* ---------------- sheets ---------------- */
.sheet {
  position: fixed; inset: 0; z-index: 70;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(4, 8, 14, .72);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  padding: 0;
}
#sheet2 { z-index: 80; }
.sheet-card {
  width: 100%; max-width: 780px; max-height: 92vh; overflow-y: auto;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 20px 20px 0 0;
  animation: sheetUp .24s cubic-bezier(.2, .8, .3, 1);
  padding-bottom: 8px;
}
@keyframes sheetUp { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
@media (min-width: 900px) {
  .sheet { align-items: center; padding: 24px; }
  .sheet-card { border-radius: 20px; max-height: 88vh; }
}
.sheet-head {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 18px; border-bottom: 1px solid var(--line);
  background: var(--card);
}
.sheet-head h2 { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.sheet-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; }
.sheet-foot {
  position: sticky; bottom: 0;
  display: flex; gap: 10px; padding: 12px 18px 16px;
  background: linear-gradient(180deg, rgba(17, 26, 38, .6), var(--card) 40%);
  border-top: 1px solid var(--line);
}
.sheet-foot .btn { flex: 1; }
.x-btn {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: #16222F; border: 1px solid var(--line); color: var(--text-2); flex: none;
}
.x-btn:hover { color: var(--text); }

/* ---------------- editor ---------------- */
.line-card { background: var(--card-2); border: 1px solid var(--line); border-radius: 13px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.line-card + .line-card { margin-top: 10px; }
.line-top { display: flex; gap: 8px; align-items: center; }
.line-top .select { flex: 1; }
.line-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 620px) { .line-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.line-grid .field > span { font-size: 10px; }
.line-grid .input { min-height: 38px; padding: 7px 9px; font-size: 14px; }
.line-total { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-2); border-top: 1px dashed var(--line); padding-top: 8px; }
.totals { display: flex; flex-direction: column; gap: 7px; padding: 14px; border-radius: 13px; background: var(--card-2); border: 1px solid var(--line); }
.totals > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--text-2); }
.totals b { font-variant-numeric: tabular-nums; color: var(--text); font-weight: 600; }
.totals .grand { border-top: 1px solid var(--line); padding-top: 9px; margin-top: 2px; font-size: 15px; color: var(--text); }
.totals .grand b { font-size: 18px; color: var(--cyan); font-weight: 700; }
.err { color: var(--neg); font-size: 12.5px; font-weight: 600; }
.hint { font-size: 11.5px; color: var(--label); }

/* ---------------- quick actions ---------------- */
.qa-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 700px) { .qa-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.qa {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  padding: 14px; border-radius: 13px; text-align: start;
  background: var(--card); border: 1px solid var(--line);
  transition: border-color .16s ease, background .16s ease, transform .12s ease;
  min-height: 88px;
}
.qa:hover { border-color: #2B3B52; background: #131E2C; }
.qa:active { transform: scale(.98); }
.qa-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--cyan-dim); color: var(--cyan); }
.qa-label { font-size: 12.5px; font-weight: 600; line-height: 1.3; }
.qa.primary { background: linear-gradient(150deg, rgba(34, 211, 238, .16), rgba(34, 211, 238, .05)); border-color: rgba(34, 211, 238, .35); }
.qa.primary .qa-ic { background: var(--cyan); color: var(--cyan-ink); }

/* ---------------- chart ---------------- */
.chart-wrap { position: relative; width: 100%; height: 190px; }
.chart-wrap canvas { width: 100%; height: 100%; display: block; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 11.5px; color: var(--label); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; }

.bar-item { display: flex; flex-direction: column; gap: 5px; }
.bar-line { display: flex; justify-content: space-between; font-size: 12px; }
.bar-track { height: 7px; border-radius: 4px; background: #16222F; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, #0E9FB8, var(--cyan)); transition: width .4s ease; }

/* ---------------- toast ---------------- */
.toast {
  position: fixed; left: 50%; bottom: 84px; transform: translate(-50%, 12px);
  z-index: 200; padding: 11px 18px; border-radius: 12px;
  background: #16222F; border: 1px solid var(--line); color: var(--text);
  font-size: 13px; font-weight: 600; box-shadow: 0 20px 40px -18px #000;
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease;
  max-width: calc(100vw - 40px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 1000px) { .toast { bottom: 32px; } }

/* ---------------- lock screen ---------------- */
.lock {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(700px 500px at 50% 0%, #12203A, #080E18 70%);
  padding: 24px;
}
.lock-card { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; max-width: 320px; }
.lock-mark {
  width: 58px; height: 58px; border-radius: 17px; display: grid; place-items: center;
  background: linear-gradient(150deg, var(--cyan), #0E9FB8); color: #052029; font-weight: 800;
  font-size: 19px; box-shadow: 0 12px 28px -14px rgba(34, 211, 238, .9);
}
.lock-title { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.lock-sub { font-size: 12.5px; color: var(--label); }
.pin-dots { display: flex; gap: 12px; margin: 8px 0; }
.pin-dot { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--line); background: transparent; transition: background .14s ease, border-color .14s ease; }
.pin-dot.on { background: var(--cyan); border-color: var(--cyan); }
.pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; }
.pin-key {
  height: 58px; border-radius: 14px; background: #121C29; border: 1px solid var(--line);
  color: var(--text); font-size: 19px; font-weight: 600;
}
.pin-key:active { background: #1A2634; }
.pin-key.ghost { background: transparent; border-color: transparent; color: var(--label); }

/* ---------------- misc ---------------- */
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.list-plain { display: flex; flex-direction: column; gap: 2px; }
.menu-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 13px 14px; border-radius: 12px; background: transparent; border: 1px solid transparent;
  color: var(--text); text-align: start; transition: background .16s ease, border-color .16s ease;
}
.menu-item:hover { background: #131E2C; border-color: var(--line); }
.menu-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #16222F; color: var(--cyan); flex: none; }
.menu-txt { flex: 1; min-width: 0; }
.menu-title { font-size: 13.5px; font-weight: 600; }
.menu-sub { font-size: 11.5px; color: var(--label); }
.chev { color: #4A5A6E; }

.stat-line { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.stat-line:last-child { border-bottom: 0; }
.stat-line b { font-variant-numeric: tabular-nums; }
.stat-line.total { border-top: 1px solid var(--line); border-bottom: 0; font-weight: 700; font-size: 14.5px; padding-top: 12px; margin-top: 2px; }

.pill-note {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: 12px;
  background: var(--cyan-dim); border: 1px solid rgba(34, 211, 238, .25);
  font-size: 12.5px; color: #B9E9F3;
}
.pill-note.warn { background: var(--warn-dim); border-color: rgba(251, 191, 36, .3); color: #FBE1A6; }

/* ---------------- print ---------------- */
#printArea { display: none; }
@media print {
  html, body { background: #fff !important; color: #000 !important; }
  body::before { display: none !important; }
  .shell, .sheet, .toast, .lock { display: none !important; }
  #printArea { display: block !important; color: #000; background: #fff; padding: 0; font-size: 12px; }
  #printArea .doc { width: 100%; }
  @page { margin: 14mm; }
}
.doc { color: #0B1220; font-family: Inter, Arial, sans-serif; }
.doc-head { display: flex; justify-content: space-between; gap: 24px; border-bottom: 2px solid #0B1220; padding-bottom: 12px; margin-bottom: 16px; }
.doc-co { font-size: 18px; font-weight: 800; }
.doc-meta { text-align: right; font-size: 11.5px; line-height: 1.6; }
.doc-title { font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.doc-grid { display: flex; justify-content: space-between; gap: 24px; margin-bottom: 16px; font-size: 11.5px; line-height: 1.6; }
.doc table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.doc table th { text-align: left; border-bottom: 1px solid #0B1220; padding: 6px 8px; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.doc table td { padding: 6px 8px; border-bottom: 1px solid #D5DEE8; }
.doc table td.r, .doc table th.r { text-align: right; }
.doc-totals { margin-left: auto; width: 260px; margin-top: 14px; font-size: 12px; }
.doc-totals div { display: flex; justify-content: space-between; padding: 4px 0; }
.doc-totals .grand { border-top: 2px solid #0B1220; margin-top: 6px; padding-top: 8px; font-weight: 800; font-size: 14px; }
.doc-foot { margin-top: 28px; border-top: 1px solid #C9D3DE; padding-top: 10px; font-size: 10.5px; color: #48586B; }