/* SHABAB BINAA PRO 1.0.0 - look (WP00b): navy #0B1F3A + gold #C9A227, light + dark, Montserrat (EN) / Tajawal (AR), RTL.
   Strict CSP: all styling lives here; no inline style in the HTML. */

@font-face { font-family: "Montserrat"; font-weight: 400; font-display: swap; src: url("/fonts/montserrat-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 600; font-display: swap; src: url("/fonts/montserrat-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 700; font-display: swap; src: url("/fonts/montserrat-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Tajawal"; font-weight: 400; font-display: swap; src: url("/fonts/tajawal-arabic-400-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }
@font-face { font-family: "Tajawal"; font-weight: 700; font-display: swap; src: url("/fonts/tajawal-arabic-700-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }
@font-face { font-family: "Tajawal"; font-weight: 400; font-display: swap; src: url("/fonts/tajawal-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF; }
@font-face { font-family: "Tajawal"; font-weight: 700; font-display: swap; src: url("/fonts/tajawal-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF; }

:root {
  --navy: #0B1F3A;
  --navy2: #13305A;
  --gold: #C9A227;
  --gold2: #E3C25A;
  --bg: #F4F6FA;
  --card: #FFFFFF;
  --text: #14213D;
  --muted: #5B6578;
  --line: #DCE2EC;
  --input: #FFFFFF;
  --red: #B42318;
  --green: #127A3E;
  --amber: #9A6700;
  --shadow: 0 2px 10px rgba(11, 31, 58, 0.08);
  --radius: 10px;
  --font: "Montserrat", "Tajawal", "Segoe UI", Arial, sans-serif;
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #08111F;
  --card: #0F1D33;
  --text: #E8EDF5;
  --muted: #9AA7BD;
  --line: #22334F;
  --input: #0B1729;
  --red: #F97066;
  --green: #47CD89;
  --amber: #F5B83D;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

html[dir="rtl"] { --font: "Tajawal", "Montserrat", "Segoe UI", Tahoma, sans-serif; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.45; -webkit-text-size-adjust: 100%; }
a { color: var(--navy2); }
html[data-theme="dark"] a { color: var(--gold2); }
h1, h2, h3 { margin: 0 0 8px; line-height: 1.25; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 6px 0; }
.hide { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.center { text-align: center; }
.grow { flex: 1 1 auto; }
.big { font-size: 1.4rem; font-weight: 700; }
.num { text-align: right; font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: plaintext; }
html[dir="rtl"] .num { text-align: left; }
.boot-msg { padding: 40px 16px; text-align: center; color: var(--muted); }

/* icons */
.ic { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 16px; border-radius: 8px;
  border: 1px solid var(--navy); background: var(--navy); color: #fff; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn.red { background: var(--red); border-color: var(--red); color: #fff; }
.btn.sm { min-height: 34px; padding: 4px 10px; font-size: 0.88rem; }
.btn.block { width: 100%; }
.btn.busy { opacity: 0.6; cursor: progress; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 8px; border: 1px solid transparent;
  background: transparent; color: inherit; cursor: pointer; }
.icon-btn:hover { border-color: var(--line); }
.link { background: none; border: 0; color: var(--navy2); text-decoration: underline; cursor: pointer; font: inherit; padding: 4px; }
html[data-theme="dark"] .link { color: var(--gold2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 0.82rem;
  cursor: pointer; white-space: nowrap; display: inline-block; }
.chip.on { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.chip.red { color: var(--red); border-color: var(--red); }
.badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 0.75rem; font-weight: 700; }
.badge.demo { background: var(--gold); color: var(--navy); }

/* cards, messages */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 14px; }
.msg { padding: 8px 12px; border-radius: 8px; margin: 8px 0; }
.msg.err { background: rgba(180, 35, 24, 0.1); color: var(--red); border: 1px solid rgba(180, 35, 24, 0.3); }
.msg.warn { background: rgba(201, 162, 39, 0.14); color: var(--amber); border: 1px solid rgba(201, 162, 39, 0.4); }
.msg.ok { background: rgba(18, 122, 62, 0.1); color: var(--green); border: 1px solid rgba(18, 122, 62, 0.3); }

/* form fields */
.field { display: flex; flex-direction: column; gap: 4px; margin: 0 0 12px; }
.field .lbl { font-size: 0.86rem; font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.req { color: var(--red); }
input, select, textarea { font: inherit; color: var(--text); background: var(--input); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px;
  min-height: 42px; width: 100%; }
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, .icon-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
input.num { text-align: right; }
html[dir="rtl"] input.num { text-align: left; }
input.bad { border-color: var(--red); }
.check { display: flex; align-items: center; gap: 8px; margin: 6px 0; cursor: pointer; }
.check input { width: 18px; height: 18px; min-height: 0; accent-color: var(--gold); }
.qty-in { display: flex; gap: 6px; }
.qty-in input { flex: 1 1 60%; }
.qty-in select { flex: 1 1 40%; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.ticks { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0 12px; padding: 8px 0; }
.once { font-family: Consolas, monospace; font-size: 1.05rem; padding: 8px 10px; border: 1px dashed var(--gold); border-radius: 8px; user-select: all;
  word-break: break-all; direction: ltr; }

/* password eye (sb-eye.js) */
.pw-wrap { position: relative; display: block; width: 100%; }
.pw-wrap input { padding-right: 44px; }
html[dir="rtl"] .pw-wrap input { padding-right: 11px; padding-left: 44px; }
.pw-eye { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); width: 34px; height: 34px; border: 0; background: transparent;
  color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; }
html[dir="rtl"] .pw-eye { right: auto; left: 6px; }
.pw-eye:hover { color: var(--text); }

/* hints (hints.js) */
.hi { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; min-height: 0; padding: 0; margin: 0 4px;
  border-radius: 50%; border: 1px solid var(--gold); background: transparent; color: var(--gold); font: 700 11px/1 Georgia, serif; cursor: help;
  vertical-align: middle; flex: 0 0 auto; }
.hi::before { content: "i"; }
.hints-off .hi { display: none; }
.hint-pop { position: absolute; z-index: 1000; background: var(--navy); color: #fff; border: 1px solid var(--gold); border-radius: 8px; padding: 10px 12px;
  font-size: 0.86rem; box-shadow: 0 6px 22px rgba(0, 0, 0, 0.3); display: flex; flex-direction: column; gap: 4px; }
.hint-pop b { font-weight: 600; }
.hint-pop .ex { color: var(--gold2); font-size: 0.82rem; }

/* toasts */
.toasts { position: fixed; z-index: 1100; left: 50%; bottom: 84px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px;
  width: min(92vw, 420px); }
.toast { background: var(--navy); color: #fff; padding: 10px 14px; border-radius: 8px; box-shadow: var(--shadow); border-left: 4px solid var(--gold);
  transition: opacity 0.5s; }
.toast.ok { border-left-color: var(--green); }
.toast.err { border-left-color: var(--red); }
.toast.out { opacity: 0; }

/* dialogs (core.js) */
.dlg-back { position: fixed; inset: 0; z-index: 900; background: rgba(5, 12, 24, 0.55); display: flex; align-items: center; justify-content: center;
  padding: 16px; }
.dlg { background: var(--card); color: var(--text); border-radius: 12px; border-top: 4px solid var(--gold); width: min(100%, 480px); max-height: 92vh;
  display: flex; flex-direction: column; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35); }
.dlg.wide { width: min(100%, 760px); }
.dlg-h { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.dlg-h h3 { flex: 1; margin: 0; display: flex; align-items: center; }
.dlg-b { padding: 14px 16px; overflow: auto; }
.dlg > .msg { margin: 0 16px 8px; }
.dlg-f { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }

/* login page */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy2) 55%, var(--bg) 55%); }
.login { width: min(100%, 420px); margin: 0; }
.login-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.login-logo { display: block; width: 140px; height: 140px; object-fit: contain; margin: 0 auto 8px; }
.app-name { text-align: center; font-size: 1.35rem; color: var(--navy); letter-spacing: 0.5px; margin: 0; }
html[data-theme="dark"] .app-name { color: var(--gold2); }
.app-name-ar { text-align: center; font-family: "Tajawal", sans-serif; font-weight: 700; color: var(--gold); margin: 0 0 4px; font-size: 1.15rem; }
.login .ph { justify-content: center; margin: 12px 0 8px; }
.login .ph h2 { font-size: 1.1rem; }
.login-foot { text-align: center; margin-top: 12px; }
.login-co { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 10px 0 0; padding: 8px; border-radius: 8px;
  background: rgba(201, 162, 39, 0.1); text-align: center; }
.login-co .badge { margin-top: 4px; }

/* shell */
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: var(--navy); color: #fff;
  border-bottom: 3px solid var(--gold); }
.top .btn.ghost { color: #fff; border-color: rgba(255, 255, 255, 0.3); }
.top-logo { width: 36px; height: 36px; border-radius: 8px; background: transparent; object-fit: contain; }
.top-co { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.top-co b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
.top-co small { color: var(--gold2); font-size: 0.75rem; }
.banner { background: var(--gold); color: var(--navy); text-align: center; font-weight: 700; padding: 4px 10px; font-size: 0.85rem; }
.banner.red { background: var(--red); color: #fff; }
.body { display: flex; flex: 1 1 auto; min-height: 0; }
.side { width: 240px; flex: 0 0 240px; background: var(--card); border-right: 1px solid var(--line); padding: 10px 8px 90px; overflow-y: auto;
  position: sticky; top: 59px; height: calc(100vh - 59px); }
html[dir="rtl"] .side { border-right: 0; border-left: 1px solid var(--line); }
.grp { margin-bottom: 8px; }
.grp-h { display: flex; align-items: center; gap: 8px; padding: 6px 8px; font-weight: 700; color: var(--navy2); font-size: 0.86rem; text-transform: uppercase; }
html[data-theme="dark"] .grp-h { color: var(--gold2); }
html[dir="rtl"] .grp-h { text-transform: none; }
.side a { display: block; padding: 7px 10px 7px 36px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 0.92rem; }
html[dir="rtl"] .side a { padding: 7px 36px 7px 10px; }
.side a:hover { background: rgba(201, 162, 39, 0.12); }
.side a.on { background: var(--navy); color: #fff; box-shadow: inset 3px 0 0 var(--gold); }
html[dir="rtl"] .side a.on { box-shadow: inset -3px 0 0 var(--gold); }
.side-back { display: none; }
.side-empty { padding: 8px 10px; }
#pg { flex: 1 1 auto; min-width: 0; padding: 16px 20px 96px; outline: none; }
#pg.wide { max-width: 1280px; margin: 0 auto; width: 100%; }
.ph { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.ph h2 { margin: 0; display: flex; align-items: center; }
.ph-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-inline-start: auto; }
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-bottom: 12px; overflow-x: auto; }
.tabs button { border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 600; padding: 8px 14px; cursor: pointer;
  border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.tabs button.on { color: var(--text); border-bottom-color: var(--gold); }
.empty-page { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty-page .ic { width: 40px; height: 40px; color: var(--gold); }
.bbar { display: none; }
.only-phone { display: none !important; }

/* tables + list bar */
.tw { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
table.t th { text-align: start; font-size: 0.8rem; color: var(--muted); font-weight: 700; padding: 8px 10px; border-bottom: 2px solid var(--line);
  white-space: nowrap; }
table.t td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t th.num, table.t td.num { text-align: right; }
html[dir="rtl"] table.t th.num, html[dir="rtl"] table.t td.num { text-align: left; }
table.t tr.empty td { text-align: center; color: var(--muted); padding: 24px; }
table.t tbody tr:hover td { background: rgba(201, 162, 39, 0.06); }
.list-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.list-bar .search { display: flex; align-items: center; gap: 6px; flex: 1 1 220px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px;
  background: var(--input); }
.list-bar .search input { border: 0; min-height: 38px; padding: 6px 4px; background: transparent; }
.list-bar .search input:focus { outline: none; }

/* print frame (print/frame.js) - the paper is always white */
.doc { position: relative; background: #fff; color: #111; font-family: "Montserrat", "Tajawal", Arial, sans-serif; width: 794px; min-height: 1123px;
  padding: 36px 40px; margin: 0 auto; box-shadow: var(--shadow); overflow: hidden; font-size: 13px; }
.doc.a5 { width: 559px; min-height: 794px; padding: 24px 26px; font-size: 12px; }
.doc.land { width: 1123px; min-height: 794px; }
.doc.r80 { width: 302px; min-height: 0; padding: 10px 8px; font-size: 11px; }
.doc .wm { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%) rotate(-30deg); font-size: 150px; font-weight: 700;
  color: rgba(201, 162, 39, 0.16); letter-spacing: 12px; pointer-events: none; z-index: 0; }
.doc.r80 .wm { font-size: 60px; }
.doc > * { position: relative; z-index: 1; }
.doc .lh { display: flex; align-items: center; gap: 14px; border-bottom: 3px solid #C9A227; padding-bottom: 10px; margin-bottom: 12px; }
.doc .lh-en, .doc .lh-ar { flex: 1 1 0; font-size: 11px; color: #333; }
.doc .lh-en b, .doc .lh-ar b { display: block; font-size: 15px; color: #0B1F3A; margin-bottom: 2px; }
.doc .lh-ar { text-align: right; font-family: "Tajawal", Arial, sans-serif; }
.doc .lh-logo { width: 84px; height: 84px; object-fit: contain; }
.doc.r80 .lh { flex-direction: column; text-align: center; gap: 4px; }
.doc.r80 .lh-ar { text-align: center; }
.doc .lh-img img { width: 100%; display: block; }
.doc .dh { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.doc .dt { flex: 1; display: flex; flex-direction: column; font-size: 17px; color: #0B1F3A; }
.doc .dno { font-size: 12px; text-align: end; }
.doc .dno span { color: #666; }
.doc .dqr .qr { width: 96px; height: 96px; display: block; }
.doc table.t { font-size: 12px; }
.doc table.t th { color: #0B1F3A; background: #F3EEDC; border-bottom: 1px solid #C9A227; }
.doc table.t td { border-bottom: 1px solid #E3E3E3; }
.doc .df { margin-top: 18px; border-top: 1px solid #ddd; padding-top: 8px; text-align: center; color: #555; }
.pdf-holder { position: fixed; left: -10000px; top: 0; }
.docview-wrap { position: fixed; inset: 0; z-index: 800; background: var(--bg); overflow: auto; }
.docbar { position: sticky; top: 0; display: flex; gap: 8px; padding: 10px 14px; background: var(--navy); border-bottom: 3px solid var(--gold); z-index: 2; }
.docbar .btn.ghost { color: #fff; border-color: rgba(255, 255, 255, 0.3); }
.docview-page { padding: 20px 10px 60px; overflow-x: auto; }

/* phone and tablet */
@media (max-width: 860px) {
  .only-phone { display: inline-flex !important; }
  .hide-phone { display: none; }
  .side { position: fixed; top: 0; bottom: 0; left: 0; height: 100vh; z-index: 200; transform: translateX(-105%); transition: transform 0.2s;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.25); width: 280px; padding-top: 16px; }
  html[dir="rtl"] .side { left: auto; right: 0; transform: translateX(105%); }
  .side.open, html[dir="rtl"] .side.open { transform: none; }
  .side-back.open { display: block; position: fixed; inset: 0; background: rgba(5, 12, 24, 0.45); z-index: 150; }
  #pg { padding: 12px 12px 96px; }
  .bbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 100; background: var(--card); border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom); }
  .bbar a, .bbar button { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px 8px; color: var(--muted);
    text-decoration: none; font: inherit; font-size: 0.68rem; border: 0; background: transparent; min-width: 0; }
  .bbar a span, .bbar button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bbar a.on { color: var(--navy); font-weight: 700; }
  html[data-theme="dark"] .bbar a.on { color: var(--gold2); }
  .grid2 { grid-template-columns: 1fr; }
  .top { padding: 6px 8px; gap: 4px; }
  .top .hi, .top-co small, .top .badge.demo { display: none; }
  .top-co b { max-width: none; }
  .top-co { flex: 1 1 auto; }
  .top .btn.sm span { display: none; }
  .docview-page .doc { transform-origin: top left; }
}

/* phone: tables become cards (sb-mobile.js) */
@media (max-width: 600px) {
  table.t.mcard, table.t.mcard tbody, table.t.mcard tr, table.t.mcard td { display: block; width: 100%; }
  table.t.mcard thead, table.t.mcard tr.mhead { display: none; }
  table.t.mcard tr { border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; padding: 6px 8px; background: var(--card); }
  table.t.mcard td { border: 0; padding: 4px 0; display: flex; justify-content: space-between; gap: 10px; text-align: end; }
  table.t.mcard td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 0.8rem; font-weight: 600; text-align: start; }
  table.t.mcard td.nolab { display: block; }
  /* gate 3: a number cell is direction ltr, which put the label on the wrong side in Arabic cards */
  html[dir="rtl"] table.t.mcard td.num { direction: rtl; }
  .doc table.t.mcard tr { background: #fff; }
}

/* print: only the document */
@media print {
  @page { margin: 10mm; }
  body { background: #fff; }
  body.docview .shell, body.docview #app, .noprint, .toasts, .dlg-back, .hi, .hint-pop { display: none !important; }
  .docview-wrap { position: static; overflow: visible; background: #fff; }
  .docview-page { padding: 0; }
  .doc { box-shadow: none; margin: 0; width: auto; min-height: 0; }
}

/* ===== Gate 0 design pass (SB picture 14 Nov 2026: "Theme like this" -> BINAA colours) =====
   Clean warm-light page, ONE gold action colour (pill, tall, soft shadow), soft filled inputs with a gold border when active,
   big bold titles, cards with large round corners, navy-to-gold splash on the login page. Later packages use these classes. */
:root {
  --action: #E0A526;           /* main button gold; navy text on it = contrast about 8:1 */
  --action-text: #0B1F3A;
  --bg: #F7F6F3;               /* very light warm grey */
  --input: #F1EFEA;            /* soft filled box */
  --input-focus: #FFFFFF;
  --radius: 18px;
  --shadow: 0 4px 18px rgba(11, 31, 58, 0.06);
  --btn-shadow: 0 6px 16px rgba(224, 165, 38, 0.32);
}
html[data-theme="dark"] {
  --action: #F0B429;
  --bg: #0A1628;
  --input: #10213B;
  --input-focus: #0B1729;
  --btn-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
}
.btn { border-radius: 999px; min-height: 44px; padding: 10px 20px; }
.btn.gold { background: var(--action); border-color: var(--action); color: var(--action-text); min-height: 50px; font-weight: 700;
  box-shadow: var(--btn-shadow); }
.btn.gold.sm { min-height: 36px; box-shadow: none; }
.btn.ghost { background: var(--card); border-color: var(--line); }
/* gate 3: ghost buttons on the navy top bar / print bar stay see-through (white text was on a white card) */
.top .btn.ghost, .docbar .btn.ghost { background: transparent; border-color: rgba(255, 255, 255, 0.3); color: #fff; }
.btn.sm { min-height: 34px; }
.nowrap { white-space: nowrap; }
input, select, textarea { background: var(--input); border: 1.5px solid transparent; border-radius: 14px; min-height: 48px; padding: 11px 14px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--action); background: var(--input-focus);
  box-shadow: 0 0 0 3px rgba(224, 165, 38, 0.18); }
input.bad { border-color: var(--red); }
.check input { min-height: 0; }
/* gate 3: tick boxes outside a .check label (tables) were drawn 48 px high by the input rule above */
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; min-height: 0; padding: 0; border-radius: 4px; accent-color: var(--gold); }
.field .lbl { font-size: 0.8rem; }
.card { border-color: transparent; border-radius: var(--radius); box-shadow: var(--shadow); }
html[data-theme="dark"] .card { border-color: var(--line); }
.dlg { border-radius: 20px; border-top: 0; }
.dlg-f .btn { min-width: 110px; }
.ph h2 { font-size: 1.5rem; font-weight: 700; color: var(--navy); letter-spacing: -0.2px; }
html[data-theme="dark"] .ph h2 { color: var(--text); }
.ph-sub { color: var(--muted); font-size: 0.88rem; margin: -6px 0 14px; }
.msg, .chip, .badge { border-radius: 12px; }
.login-wrap { background: linear-gradient(165deg, var(--navy) 0%, var(--navy2) 45%, #8A6A12 80%, var(--action) 100%); }
.login.card { border-radius: 24px; padding: 22px 20px; box-shadow: 0 18px 50px rgba(5, 12, 24, 0.35); }
.login .ph h2 { font-size: 1.6rem; }
.login .btn.gold { width: 100%; }
@media (max-width: 760px) {
  .dlg-f .btn.gold, .ph-tools .btn.gold, form .btn.gold { width: 100%; }
}
