/* Noqu Quotations — navy sidebar app shell, light work surface, paper-white quotation sheet. */
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url(/vendor/plex/ibm-plex-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url(/vendor/plex/ibm-plex-sans-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url(/vendor/plex/ibm-plex-sans-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 700; font-display: swap; src: url(/vendor/plex/ibm-plex-sans-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans Condensed"; font-weight: 600; font-display: swap; src: url(/vendor/plex-condensed/ibm-plex-sans-condensed-latin-600-normal.woff2) format("woff2"); }

:root {
  /* Light theme (default). --brand is the document's print colour and stays the same in both themes. */
  --bg: #f1f3f8; --panel: #ffffff; --fg: #1a1f33; --muted: #5f667c; --line: #dde1ea; --field: #f8f9fc; --hover: #f3f5fa;
  --brand: #1e2a5a; --brand-soft: #e6eaf6; --accent: #2563eb;
  --side: #1e2a5a; --side-fg: #dfe4f5; --side-muted: #aab4d8;
  --primary: #1e2a5a; --primary-hover: #2b3a78; --primary-fg: #ffffff;
  --ok: #16a34a; --bad: #dc2626; --warn: #ea580c; --warn-bg: #fff4e5; --warn-fg: #9a4a00;
  --bad-soft: #fff6f6; --danger-line: #f1b4b4;
  --shadow: rgba(20, 24, 40, .14); --backdrop: rgba(15, 20, 40, .45);
  --toast-bg: #1a1f33; --toast-fg: #ffffff; --grid: #eef0f5;
  --ph: #fff0c2; --ph-line: #d9a21b;
  --radius: 8px;
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-label: "IBM Plex Sans Condensed", "IBM Plex Sans", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1320; --panel: #171c2b; --fg: #e6e9f2; --muted: #9aa2b8; --line: #2a3145; --field: #1d2334; --hover: #222a3d;
    --brand-soft: #232b48; --accent: #7fa6ff;
    --side: #121833; --side-fg: #d3d9ee; --side-muted: #8f9bc4;
    --primary: #5b77e0; --primary-hover: #6d87ea; --primary-fg: #ffffff;
    --ok: #34c46a; --bad: #f26b6b; --warn: #f59044; --warn-bg: #3a2a12; --warn-fg: #f5b169;
    --bad-soft: #3a1a1d; --danger-line: #6b2a2a;
    --shadow: rgba(0, 0, 0, .45); --backdrop: rgba(0, 0, 0, .6);
    --toast-bg: #e6e9f2; --toast-fg: #0f1320; --grid: #262d40;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1320; --panel: #171c2b; --fg: #e6e9f2; --muted: #9aa2b8; --line: #2a3145; --field: #1d2334; --hover: #222a3d;
  --brand-soft: #232b48; --accent: #7fa6ff;
  --side: #121833; --side-fg: #d3d9ee; --side-muted: #8f9bc4;
  --primary: #5b77e0; --primary-hover: #6d87ea; --primary-fg: #ffffff;
  --ok: #34c46a; --bad: #f26b6b; --warn: #f59044; --warn-bg: #3a2a12; --warn-fg: #f5b169;
  --bad-soft: #3a1a1d; --danger-line: #6b2a2a;
  --shadow: rgba(0, 0, 0, .45); --backdrop: rgba(0, 0, 0, .6);
  --toast-bg: #e6e9f2; --toast-fg: #0f1320; --grid: #262d40;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); font: 14px/1.45 var(--font); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { text-wrap: balance; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--side); color: var(--side-fg); display: flex; flex-direction: column; padding: 18px 12px; gap: 4px; position: sticky; top: 0; height: 100vh; }
.side .logo { color: #fff; font-weight: 700; font-size: 16px; padding: 4px 10px 2px; letter-spacing: .01em; }
.side .logo small { display: block; font-weight: 400; font-size: 11.5px; color: var(--side-muted); letter-spacing: 0; }
.side nav { display: flex; flex-direction: column; gap: 2px; margin-top: 18px; }
.side nav a { color: var(--side-fg); padding: 9px 10px; border-radius: 6px; display: flex; justify-content: space-between; align-items: center; }
.side nav a:hover { background: rgba(255, 255, 255, .08); text-decoration: none; }
.side nav a.active { background: rgba(255, 255, 255, .16); color: #fff; font-weight: 600; }
.side nav .badge { background: var(--warn); color: #fff; border-radius: 999px; font-size: 11px; padding: 0 7px; font-weight: 600; }
.side .me { margin-top: auto; border-top: 1px solid rgba(255, 255, 255, .14); padding: 12px 10px 0; font-size: 12.5px; }
.side .me b { color: #fff; display: block; }
.side .me button { background: none; border: 0; color: var(--side-muted); padding: 0; cursor: pointer; margin-top: 6px; margin-right: 12px; }
.side .me button:hover { color: #fff; }
.menu-btn { display: none; }
.theme-switch { display: flex; gap: 2px; margin-top: 10px; background: rgba(255, 255, 255, .08); border-radius: 6px; padding: 2px; width: max-content; }
.theme-switch button { background: none; border: 0; color: var(--side-muted); padding: 4px 9px; border-radius: 4px; cursor: pointer; font-size: 12px; margin: 0 !important; }
.theme-switch button.on { background: rgba(255, 255, 255, .18); color: #fff; }
.main { min-width: 0; padding: 22px 24px 48px; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 18px; }
.page-head h1 { margin: 0; font-size: 21px; margin-right: auto; }
.page-head .sub { width: 100%; margin: -8px 0 0; color: var(--muted); }

@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: sticky; top: 0; z-index: 20; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px 16px; }
  .side nav { display: none; width: 100%; margin-top: 8px; }
  .side.open nav { display: flex; }
  .side .me { display: none; }
  .side.open .me { display: block; width: 100%; }
  .menu-btn { display: block; margin-left: auto; background: none; border: 1px solid rgba(255, 255, 255, .3); color: #fff; border-radius: 6px; padding: 6px 10px; cursor: pointer; }
  .main { padding: 16px 16px 40px; }
}

/* ---------- controls ---------- */
.btn { border: 1px solid var(--line); background: var(--panel); padding: 8px 13px; border-radius: 6px; cursor: pointer; font-weight: 500; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { border-color: var(--primary-hover); text-decoration: none; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-fg); }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.danger { color: var(--bad); border-color: var(--danger-line); }
.btn.small { padding: 5px 9px; font-size: 12.5px; }
.btn[disabled] { opacity: .6; cursor: progress; }
.icon-btn { background: none; border: 0; cursor: pointer; font-size: 16px; color: var(--muted); padding: 4px 6px; border-radius: 4px; }
.icon-btn:hover { background: var(--hover); }
.link-btn { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; font: inherit; }
.link-btn:hover { text-decoration: underline; }
.link-btn.danger { color: var(--bad); }
label.f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
label.f > span { font-size: 12px; color: var(--muted); }
label.f > span i { font-style: normal; opacity: .8; }
input[type=text], input[type=email], input[type=tel], input[type=date], input[type=number], input[type=password], input[type=search], select, textarea {
  width: 100%; background: var(--field); border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px; min-width: 0; }
textarea { resize: vertical; min-height: 60px; }
.invalid { border-color: var(--bad) !important; background: var(--bad-soft) !important; }
.field-error { color: var(--bad); font-size: 12px; }
.form-error { color: var(--bad); margin: 0 18px 10px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; }
.full { grid-column: 1 / -1; }
@media (max-width: 560px) { .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- cards & tables ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.card > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 10px; flex-wrap: wrap; }
.card > header h2 { margin: 0; font-size: 14.5px; }
.card > header .muted { font-size: 12px; }
.card .body { padding: 0 16px 16px; }
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th { text-align: left; font-weight: 600; font-size: 11.5px; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--panel); }
table.t td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tbody tr:hover td { background: var(--hover); }
table.t tr.click { cursor: pointer; }
table.t .num { text-align: right; }
table.t td.actions { white-space: nowrap; text-align: right; }
table.t td.nw, table.t td.nw b { white-space: nowrap; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.pill { --c: #6b7280; background: color-mix(in srgb, var(--c) 14%, var(--panel)); color: color-mix(in srgb, var(--c) 78%, var(--fg)); border-color: color-mix(in srgb, var(--c) 24%, transparent); }
.pill[data-status="Draft"] { --c: #6b7280; }
.pill[data-status="Sent"] { --c: #2563eb; }
.pill[data-status="Viewed"] { --c: #0891b2; }
.pill[data-status="Under Discussion"] { --c: #ea580c; }
.pill[data-status="Accepted"] { --c: #16a34a; }
.pill[data-status="Rejected"] { --c: #dc2626; }
.pill[data-status="Expired"] { --c: #9ca3af; }
.pill[data-status="Cancelled"] { --c: #64748b; }
.pill.archived { --c: #94a3b8; background: transparent; }
.pill.overdue { --c: #dc2626; }
.pill.today { --c: #ea580c; }
.pill.soon { --c: #2563eb; }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty h3 { color: var(--fg); margin: 0 0 4px; font-size: 15px; }
.empty p { margin: 0 0 12px; }

/* action menu */
.menu { position: relative; display: inline-block; }
.menu-list { position: absolute; right: 0; top: calc(100% + 4px); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px var(--shadow); padding: 4px; z-index: 30; min-width: 170px; display: flex; flex-direction: column; text-align: left; }
.menu-list button, .menu-list a { background: none; border: 0; text-align: left; padding: 7px 10px; border-radius: 5px; cursor: pointer; color: var(--fg); font-size: 13px; }
.menu-list button:hover, .menu-list a:hover { background: var(--hover); text-decoration: none; }
.menu-list .danger { color: var(--bad); }

/* ---------- dashboard ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.seg { display: inline-flex; flex-wrap: wrap; background: var(--panel); border: 1px solid var(--line); border-radius: 7px; padding: 2px; }
.seg button { border: 0; background: none; padding: 6px 11px; border-radius: 5px; cursor: pointer; font-size: 13px; color: var(--muted); }
.seg button.on { background: var(--primary); color: var(--primary-fg); }
.range { display: flex; gap: 6px; align-items: center; }
.range input { width: 150px; }
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.kpis.secondary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (min-width: 1500px) { .kpis.secondary { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 14px; min-width: 0; border-top: 3px solid var(--k, var(--primary)); }
.kpi .label { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; gap: 6px; }
.kpi .value { font-size: 23px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kpi .hint { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.kpis.secondary .kpi { border-top-width: 1px; padding: 10px 13px; }
.kpis.secondary .value { font-size: 18px; }
.dash-row { display: grid; gap: 12px; margin-bottom: 12px; }
.dash-row.r2 { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.dash-row.r3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 1250px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1000px) { .dash-row.r2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1599px) { .dash-row.r3 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 700px) { .kpis.secondary { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpi .value { font-size: 19px; } }
.donut-wrap { display: grid; grid-template-columns: minmax(0, 190px) minmax(0, 1fr); gap: 16px; align-items: center; }
@media (max-width: 460px) { .donut-wrap { grid-template-columns: minmax(0, 1fr); } }
.donut-box { position: relative; aspect-ratio: 1; max-width: 190px; width: 100%; margin: 0 auto; }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.donut-center b { font-size: 24px; }
.donut-center span { font-size: 11.5px; color: var(--muted); }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; font-size: 13px; }
.legend li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto 52px; gap: 8px; align-items: center; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }
.legend .pc { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.chart-box { position: relative; height: 260px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 10px; padding-bottom: 14px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: 6px; top: 14px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--panel); border: 3px solid var(--c, var(--primary)); margin-top: 3px; }
.timeline .what { font-weight: 600; }
.timeline .meta { font-size: 12px; color: var(--muted); }
.timeline .rem { font-size: 12.5px; background: var(--field); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; margin-top: 4px; }

/* ---------- list filters ---------- */
.toolbar { display: grid; grid-template-columns: minmax(200px, 2fr) repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line); align-items: end; }
.toolbar label.f > span { font-size: 11.5px; }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }

/* ---------- editor ---------- */
.editor-layout { display: grid; grid-template-columns: minmax(0, 470px) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 1150px) { .editor-layout { grid-template-columns: minmax(0, 1fr); } }
.editor-form { display: flex; flex-direction: column; gap: 12px; }
details.sec { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
details.sec > summary { cursor: pointer; padding: 12px 14px; font-family: var(--font-label); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; font-size: 12.5px; display: flex; justify-content: space-between; list-style: none; }
details.sec > summary::-webkit-details-marker { display: none; }
details.sec > summary::after { content: "+"; color: var(--muted); }
details.sec[open] > summary::after { content: "–"; }
details.sec .sec-body { padding: 2px 14px 14px; }
.item-card { border: 1px solid var(--line); border-radius: 6px; padding: 10px; background: var(--field); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.item-card input, .item-card textarea { background: var(--panel); }
.item-card .ih { grid-column: 1 / -1; display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; color: var(--muted); }
.item-card .wide { grid-column: 1 / -1; }
@media (max-width: 460px) { .item-card { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hint { font-size: 12px; color: var(--muted); margin: 6px 0 0; }
.sticky-actions { position: sticky; bottom: 0; background: var(--bg); padding: 10px 0; display: flex; gap: 8px; flex-wrap: wrap; z-index: 5; }
.preview-col { position: sticky; top: 16px; min-width: 0; }
@media (max-width: 1150px) { .preview-col { position: static; } }
.preview-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 8px; gap: 8px; flex-wrap: wrap; }
.warn-chip { background: var(--warn-bg); color: var(--warn-fg); border-radius: 999px; padding: 2px 9px; font-weight: 600; }
.scaler-wrap { overflow: hidden; }
.scaler { transform-origin: top left; width: 794px; }
.suggest { position: relative; }
.suggest-list { position: absolute; left: 0; right: 0; top: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 8px 24px var(--shadow); z-index: 10; max-height: 240px; overflow: auto; }
.suggest-list button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 7px 10px; cursor: pointer; }
.suggest-list button:hover, .suggest-list button.on { background: var(--hover); }
.suggest-list small { color: var(--muted); display: block; }

/* ---------- quotation page ---------- */
.q-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
@media (max-width: 1200px) { .q-layout { grid-template-columns: minmax(0, 1fr); } }
.q-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.kv { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 6px 10px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.decision { border-radius: 6px; padding: 10px 12px; font-size: 13px; }
.decision.Accepted { background: color-mix(in srgb, var(--ok) 16%, var(--panel)); }
.decision.Rejected { background: color-mix(in srgb, var(--bad) 16%, var(--panel)); }
.share { display: flex; gap: 6px; }
.share input { font-size: 12px; }
.fu { border: 1px solid var(--line); border-radius: 6px; padding: 9px 10px; margin-bottom: 8px; font-size: 13px; }
.fu .top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: linear-gradient(160deg, var(--side) 0 38%, var(--bg) 38%); }
.auth .card { width: min(400px, 100%); padding: 26px 24px; }
.auth h1 { margin: 0 0 4px; font-size: 20px; }
.auth p { margin: 0 0 18px; color: var(--muted); }
.auth form { display: flex; flex-direction: column; gap: 12px; }

/* ---------- modal & toast ---------- */
dialog.modal { border: 0; border-radius: 10px; padding: 0; width: min(520px, calc(100% - 32px)); box-shadow: 0 20px 60px var(--shadow); background: var(--panel); color: var(--fg); }
dialog.modal.wide { width: min(760px, calc(100% - 32px)); }
dialog.modal::backdrop { background: var(--backdrop); }
dialog.modal header { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px 6px; }
dialog.modal h2 { margin: 0; font-size: 16px; }
.modal-body { padding: 8px 18px 14px; display: flex; flex-direction: column; gap: 10px; max-height: 70vh; overflow: auto; }
dialog.modal footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--toast-bg); color: var(--toast-fg); padding: 10px 16px; border-radius: 6px; z-index: 100; max-width: calc(100% - 32px); box-shadow: 0 8px 24px rgba(0, 0, 0, .2); }
.toast.error { background: #9f1c1c; color: #fff; }
.toast.ok { background: #14532d; color: #fff; }

/* ---------- quotation sheet (A4 at 96dpi) ---------- */
.sheet { width: 794px; min-height: 1123px; background: #fff; color: #1b2033; padding: 40px 46px 34px; box-shadow: 0 2px 14px rgba(20, 24, 40, .16);
  font: 11.5px/1.45 var(--font); font-variant-numeric: tabular-nums; }
.sheet .ph { background: var(--ph); border: 1px dashed var(--ph-line); border-radius: 3px; padding: 0 4px; color: #6b4a00; white-space: nowrap; }
.sh-banner { background: #b91c1c; color: #fff; text-align: center; font-weight: 600; letter-spacing: .12em; font-size: 10px; padding: 4px; margin: -18px 0 16px; border-radius: 3px; text-transform: uppercase; }
.sh-top { display: flex; justify-content: space-between; gap: 24px; padding-bottom: 16px; border-bottom: 3px solid var(--brand); }
.sh-co { min-width: 0; }
.sh-co img { max-height: 52px; max-width: 200px; margin-bottom: 6px; display: block; }
.sh-co h1 { margin: 0; font-size: 19px; color: var(--brand); font-weight: 700; }
.sh-tag { font-family: var(--font-label); text-transform: uppercase; letter-spacing: .12em; font-size: 9.5px; color: #555c70; margin: 2px 0 6px; }
.sh-co p { margin: 0; color: #555c70; font-size: 10.5px; }
.sh-meta { text-align: right; flex: none; }
.sh-title { font-size: 24px; font-weight: 700; letter-spacing: .16em; color: var(--brand); margin: 0 0 8px; }
.sh-meta table { border-collapse: collapse; margin-left: auto; font-size: 10.5px; }
.sh-meta td { padding: 1px 0 1px 12px; }
.sh-meta td:first-child { color: #555c70; }
.sh-meta td:last-child { font-weight: 600; }
.sheet h2 { font-family: var(--font-label); text-transform: uppercase; letter-spacing: .12em; font-size: 10.5px; color: var(--brand); margin: 20px 0 8px; padding-bottom: 4px; border-bottom: 1px solid #dfe2ea; }
.sh-client { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 24px; background: #eef1f9; padding: 10px 14px; border-radius: 4px; }
.sh-client div, .sh-pay div { display: grid; grid-template-columns: 96px 1fr; gap: 8px; }
.sh-client div span:first-child, .sh-pay div span:first-child { color: #555c70; }
.sh-subj { margin: 10px 0 0; font-size: 11px; }
.sh-subj b { color: var(--brand); }
table.sh-items { width: 100%; border-collapse: collapse; font-size: 10.5px; }
table.sh-items thead { display: table-header-group; }
table.sh-items th { background: var(--brand); color: #fff; font-weight: 600; text-align: left; padding: 7px 6px; font-size: 9.5px; }
table.sh-items td { padding: 7px 6px; border-bottom: 1px solid #dfe2ea; vertical-align: top; }
table.sh-items tr { break-inside: avoid; page-break-inside: avoid; }
table.sh-items tbody tr:nth-child(even) td { background: #f8f9fc; }
table.sh-items .n { text-align: right; white-space: nowrap; }
table.sh-items .c { text-align: center; }
table.sh-items .desc { font-weight: 600; }
table.sh-items .spec { color: #555c70; }
.sheet .sub { font-size: 9px; color: #555c70; }
.sh-note { font-size: 9.5px; color: #555c70; margin: 6px 0 0; }
.sh-sum { display: flex; justify-content: flex-end; margin-top: 12px; }
.sh-sum table { border-collapse: collapse; min-width: 330px; font-size: 11px; }
.sh-sum td { padding: 4px 10px; }
.sh-sum td:last-child { text-align: right; white-space: nowrap; }
.sh-sum tr.gt td { background: var(--brand); color: #fff; font-weight: 700; font-size: 14px; padding: 10px; }
.sh-words { margin-top: 10px; background: #eef1f9; border-left: 3px solid var(--brand); padding: 8px 12px; font-size: 11px; }
.sheet ul, .sheet ol { margin: 0; padding-left: 18px; }
.sheet li { margin: 2px 0; }
.sh-pay { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 24px; }
.sh-acc { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.sh-acc > div { border: 1px solid #dfe2ea; border-radius: 4px; padding: 12px 14px; }
.sh-acc h3 { margin: 0 0 12px; font-size: 11px; color: var(--brand); }
.sh-acc .ln { display: flex; gap: 8px; align-items: flex-end; margin-top: 14px; }
.sh-acc .ln span { color: #555c70; white-space: nowrap; }
.sh-acc .ln i { flex: 1; border-bottom: 1px solid #9aa0b0; height: 12px; }
.sh-acc .stamp { height: 52px; }
.sh-foot { margin-top: 22px; padding-top: 8px; border-top: 1px solid #dfe2ea; text-align: center; font-size: 9.5px; color: #555c70; }
.avoid { break-inside: avoid; page-break-inside: avoid; }

/* ---------- public client page ---------- */
.public-bar { background: var(--side); color: #fff; padding: 12px 16px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.public-bar b { font-size: 15px; }
.public-bar .btn { color: var(--fg); }
.public-main { padding: 20px 16px 40px; display: flex; justify-content: center; }

@media print {
  @page { size: A4; margin: 10mm 0; }
  body { background: #fff; }
  .side, .page-head, .q-side, .public-bar, .no-print, .toast { display: none !important; }
  .shell { display: block; }
  .main, .public-main { padding: 0; }
  .q-layout { display: block; }
  .scaler-wrap { height: auto !important; overflow: visible; }
  .scaler { transform: none !important; }
  .sheet { box-shadow: none; min-height: 0; margin: 0 auto; padding-top: 18px; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.ms-btn { width: 100%; justify-content: center; padding: 11px 14px; font-size: 15px; gap: 10px; }
.ms-btn:hover { text-decoration: none; }

/* Phones: the quotation history table becomes one card per quotation, so amount, status and actions stay visible. */
@media (max-width: 700px) {
  table.t.cards thead { display: none; }
  table.t.cards, table.t.cards tbody, table.t.cards tr, table.t.cards td { display: block; width: 100%; }
  table.t.cards tr { position: relative; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  table.t.cards td { border: 0; padding: 2px 0; text-align: left; display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 8px; }
  table.t.cards td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 12px; }
  table.t.cards td.c-title { display: block; padding-right: 96px; margin-bottom: 4px; }
  table.t.cards td.num { font-weight: 600; }
  table.t.cards td.actions { position: absolute; top: 10px; right: 12px; width: auto; display: block; padding: 0; }
  table.t.cards tbody tr:hover td { background: transparent; }
  table.t.cards td > .pill { justify-self: start; }
}
.auth .field-error { color: var(--bad); }
@media (max-width: 560px) { .toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); } .toolbar label.f:first-child { grid-column: 1 / -1; } }
.side .me-link { color: inherit; } .side .me-link:hover { text-decoration: underline; color: #fff; }
