/* Retayo POS — design tokens match retayo.com (teal-green brand). */
:root {
    --brand: #0f766e;
    --brand-2: #14b8a6;
    --brand-dark: #0b4f4a;
    --brand-soft: #e6f6f3;
    --accent: #fbbf24;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --bg: #f5f7f8;
    --panel: #ffffff;
    --danger: #dc2626;
    --danger-soft: #fef2f2;
    --warn: #d97706;
    --warn-soft: #fffbeb;
    --ok: #16a34a;
    --ok-soft: #f0fdf4;
    --info: #2563eb;
    --radius: 10px;
    --shadow: 0 8px 24px -12px rgba(15, 23, 42, .25);
    --font: "Segoe UI", system-ui, -apple-system, Roboto, "Noto Sans", sans-serif;
    --mono: "Cascadia Mono", Consolas, ui-monospace, monospace;
}

[data-theme="dark"] {
    --ink: #e2e8f0;
    --muted: #94a3b8;
    --line: #334155;
    --bg: #0b1220;
    --panel: #111a2b;
    --brand-soft: #0f2f2c;
    --danger-soft: #3a1414;
    --warn-soft: #3a2a0c;
    --ok-soft: #0f2d1a;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14px; color: var(--ink); background: var(--bg); }
a { color: var(--brand); }
h1, h2, h3 { margin: 0; }
h1 { font-size: 20px; } h2 { font-size: 17px; } h3 { font-size: 15px; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 8px; }
.spacer { flex: 1; }
.hidden { display: none !important; }

/* Boot splash */
.boot { height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.boot-title { font-size: 22px; font-weight: 700; color: var(--brand-dark); }
.boot-sub { color: var(--muted); }

/* Shell */
.shell { display: flex; flex-direction: column; height: 100vh; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 0 14px; height: 48px; background: var(--brand-dark); color: #fff; flex: 0 0 auto; }
.topbar .brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; white-space: nowrap; }
.topbar .brand img { width: 26px; height: 26px; border-radius: 6px; background: #fff; }
.topbar .pill { background: rgba(255,255,255,.12); border-radius: 999px; padding: 4px 10px; font-size: 12.5px; white-space: nowrap; }
.topbar .pill.warn { background: var(--accent); color: #3b2500; }
.topbar button.ghost { color: #fff; border-color: rgba(255,255,255,.25); background: transparent; }
.topbar button.ghost:hover { background: rgba(255,255,255,.12); }
.menubar { display: flex; align-items: stretch; gap: 2px; padding: 0 8px; background: var(--panel); border-bottom: 1px solid var(--line); flex: 0 0 auto; position: relative; z-index: 20; flex-wrap: wrap; }
.menu-top { position: relative; }
.menu-top > button { border: 0; background: transparent; padding: 10px 12px; font: inherit; color: var(--ink); cursor: pointer; border-bottom: 2px solid transparent; border-radius: 0; }
.menu-top > button:hover { background: var(--brand-soft); }
.menu-top.active > button { border-bottom-color: var(--brand); color: var(--brand); font-weight: 600; }
.menu-drop { position: absolute; top: 100%; left: 0; min-width: 230px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); padding: 6px; display: none; }
.menu-top.open .menu-drop { display: block; }
.menu-drop a, .menu-drop .sub-title { display: block; padding: 7px 10px; border-radius: 6px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.menu-drop a:hover, .menu-drop a.active { background: var(--brand-soft); color: var(--brand-dark); }
.menu-drop .sub-title { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding-top: 9px; }
.menu-drop.wide { display: none; grid-template-columns: repeat(3, minmax(210px, 1fr)); gap: 4px 10px; }
.menu-top.open .menu-drop.wide { display: grid; }
.shortcuts { display: flex; gap: 6px; padding: 5px 12px; border-bottom: 1px solid var(--line); background: var(--panel); flex-wrap: wrap; flex: 0 0 auto; }
.shortcut { font-size: 12px; border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; background: var(--bg); }
.shortcut b { font-family: var(--mono); color: var(--brand-dark); margin-right: 4px; }
[data-theme="dark"] .shortcut b { color: var(--brand-2); }
.content { flex: 1 1 auto; overflow: auto; padding: 14px; }
.content.flush { padding: 0; overflow: hidden; display: flex; }
.offline-banner { background: var(--warn); color: #fff; padding: 6px 14px; font-weight: 600; }

/* Panels / cards */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.panel-body { padding: 14px; }
.page-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; text-align: left; font: inherit; color: inherit; }
button.card { cursor: pointer; display: block; width: 100%; white-space: normal; }
button.card:hover { border-color: var(--brand-2); box-shadow: var(--shadow); }
.card .label { color: var(--muted); font-size: 12.5px; }
.card .value { font-size: 22px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.card .hint { color: var(--muted); font-size: 12px; margin-top: 2px; }
.card.warn .value { color: var(--warn); } .card.danger .value { color: var(--danger); } .card.ok .value { color: var(--ok); }

/* Buttons */
button, .btn { font: inherit; border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 8px; padding: 7px 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; text-decoration: none; }
button:hover:not(:disabled), .btn:hover { border-color: var(--brand-2); }
button:disabled { opacity: .5; cursor: not-allowed; }
button.primary, .btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
button.primary:hover:not(:disabled) { background: var(--brand-dark); }
button.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
button.subtle { background: transparent; border-color: transparent; color: var(--brand); padding: 4px 8px; }
button.small { padding: 3px 8px; font-size: 12.5px; }
button .key { font-family: var(--mono); font-size: 11px; opacity: .8; }

/* Forms */
label.field { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); }
label.field > span { font-weight: 600; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 7px; padding: 7px 9px; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-2); outline-offset: -1px; border-color: var(--brand-2); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--brand); }
input.num { text-align: right; }
label.check { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 14px; }
.form-grid .span2 { grid-column: span 2; }
.form-grid .full { grid-column: 1 / -1; }
.error-text { color: var(--danger); font-size: 13px; }
.notice { border-radius: 8px; padding: 9px 12px; border: 1px solid; }
.notice.error { background: var(--danger-soft); border-color: #fecaca; color: var(--danger); }
.notice.warn { background: var(--warn-soft); border-color: #fde68a; color: #92400e; }
.notice.ok { background: var(--ok-soft); border-color: #bbf7d0; color: #166534; }
.notice.info { background: var(--brand-soft); border-color: #99f6e4; color: var(--brand-dark); }

/* Tables (dense, POS style) */
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
table.grid { border-collapse: collapse; width: 100%; font-size: 13px; }
table.grid th, table.grid td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
table.grid th { position: sticky; top: 0; background: var(--bg); font-weight: 600; color: var(--muted); font-size: 12px; z-index: 1; white-space: nowrap; }
table.grid tbody tr:hover { background: var(--brand-soft); }
table.grid tr.selected { background: #ccfbf1; }
[data-theme="dark"] table.grid tr.selected { background: #134e4a; }
table.grid tr.clickable { cursor: pointer; }
table.grid tfoot td { font-weight: 700; background: var(--bg); position: sticky; bottom: 0; }
table.grid input, table.grid select { padding: 4px 6px; width: 100%; }
.badge { display: inline-block; font-size: 11.5px; padding: 1px 7px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: #bbf7d0; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: #fde68a; }
.badge.danger { background: var(--danger-soft); color: var(--danger); border-color: #fecaca; }
.badge.brand { background: var(--brand-soft); color: var(--brand-dark); border-color: #99f6e4; }

/* Tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 12px; flex-wrap: wrap; }
.tabs button { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; padding: 8px 12px; }
.tabs button.active { border-bottom-color: var(--brand); color: var(--brand); font-weight: 600; }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.modal { background: var(--panel); border-radius: 12px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.4); width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
.modal.wide { width: min(980px, 100%); } .modal.xwide { width: min(1280px, 100%); }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 16px; overflow: auto; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 16px; border-top: 1px solid var(--line); }

/* Toasts */
.toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 200; max-width: min(420px, calc(100vw - 32px)); }
.toast { background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; box-shadow: var(--shadow); cursor: pointer; }
.toast.error { background: var(--danger); } .toast.ok { background: var(--ok); } .toast.warn { background: var(--warn); }

/* Autocomplete */
.ac { position: relative; }
.ac-list { position: absolute; top: calc(100% + 2px); left: 0; right: 0; min-width: 420px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); max-height: 340px; overflow: auto; z-index: 50; }
.ac-item { padding: 6px 10px; cursor: pointer; display: flex; gap: 10px; align-items: baseline; }
.ac-item.active, .ac-item:hover { background: var(--brand-soft); }
.ac-item .sub { color: var(--muted); font-size: 12px; }

/* Login */
.login-page { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-hero { background: linear-gradient(150deg, var(--brand-dark), var(--brand) 60%, var(--brand-2)); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.login-hero h1 { font-size: 34px; } .login-hero p { font-size: 16px; opacity: .9; max-width: 460px; line-height: 1.5; }
.login-form-wrap { display: flex; align-items: center; justify-content: center; padding: 32px; background: var(--panel); }
.login-form { width: min(380px, 100%); display: flex; flex-direction: column; gap: 14px; }
.login-form input { padding: 10px 12px; font-size: 15px; }
.login-form button.primary { padding: 11px; font-size: 15px; justify-content: center; }
@media (max-width: 860px) { .login-page { grid-template-columns: 1fr; } .login-hero { display: none; } }

/* Charts (simple bars) */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding-top: 10px; }
.bars .bar { flex: 1; background: var(--brand-2); border-radius: 4px 4px 0 0; position: relative; min-height: 2px; }
.bars .bar span { position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%); font-size: 11px; color: var(--muted); white-space: nowrap; }

/* Sales desk */
.sales-desk { --side: 250px; display: grid; grid-template-columns: minmax(280px, 1fr) 6px var(--side); gap: 2px; padding: 8px; width: 100%; height: 100%; min-height: 0; }
.splitter { cursor: col-resize; border-radius: 3px; touch-action: none; }
.splitter:hover { background: var(--brand-soft); }
.col-grip { position: absolute; top: 0; right: -3px; width: 7px; height: 100%; cursor: col-resize; z-index: 2; touch-action: none; }
.col-grip:hover { background: var(--brand-2); opacity: .35; }
.sales-left { display: flex; flex-direction: column; padding: 8px; min-width: 0; min-height: 0; }
.sales-right { display: flex; flex-direction: column; gap: 6px; padding: 12px; min-height: 0; }
.sales-right-scroll { flex: 1 1 auto; overflow: auto; min-height: 0; }
.sales-right .cap, .sales-left .cap { width: 60px; flex: 0 0 auto; color: var(--muted); font-size: 12px; }
.sales-toolbar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.sales-toolbar button { padding: 4px 9px; font-size: 12.5px; }
.sales-grid { flex: 1 1 auto; min-height: 120px; }
table.cart td { padding: 2px 4px; }
table.cart input { padding: 3px 5px; border-color: transparent; background: transparent; }
table.cart input:focus { background: var(--panel); border-color: var(--brand-2); }
table.cart input[readonly] { color: inherit; }
table.cart tr.return-line td, table.cart tr.return-line .cell-item { color: #C62828; font-weight: 600; }
.cell-item { border: 1px solid transparent; background: transparent; width: 100%; text-align: left; padding: 4px 6px; border-radius: 6px; font: inherit; color: inherit; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 360px; }
.cell-item:focus { outline: 2px solid var(--brand-2); background: var(--panel); }
.bill-chip.active { font-weight: 700; border-width: 2px; border-color: var(--brand); }
.bill-selector { position: relative; width: 210px; }
.bill-selector-btn { width: 100%; padding: 4px 9px; font-size: 12.5px; }
.bill-popup { position: absolute; right: 0; top: calc(100% + 4px); width: min(720px, 92vw); max-height: 400px; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); z-index: 60; outline: none; }
.bill-popup-list { overflow: auto; max-height: 340px; padding: 4px 0; }
.bill-pop-item { display: grid; grid-template-columns: 165px 210px 1fr; gap: 12px; padding: 8px 12px; cursor: default; }
.bill-pop-item.active, .bill-pop-item:hover { background: var(--brand-soft); }
.bill-pop-item .inv { font-weight: 600; cursor: pointer; color: var(--brand-dark); }
.bill-pop-item .pt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-strip { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; padding: 6px; background: #F1F8E9; border: 1px solid #C5E1A5; border-radius: 6px; color: #0f172a; }
.detail-strip .chip { border: 1px solid; border-radius: 4px; padding: 3px 8px; font-size: 12.5px; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Purchase desk */
.purchase-toolbar { display: flex; align-items: flex-end; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.purchase-title { font-size: 15px; margin: 0 6px 6px 0; }
.purchase-toolbar button.tool, .purchase-toolbar .bill-selector-btn { padding: 4px 9px; font-size: 12.5px; height: 30px; }
.pfield { display: flex; flex-direction: column; gap: 2px; font-size: 10.5px; color: var(--muted); }
.pfield > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pfield input, .pfield select { padding: 4px 7px; font-size: 12.5px; height: 30px; }
.bill-pop-item.purchase { grid-template-columns: 130px 120px 165px 1fr; }
.scan-review { display: grid; grid-template-columns: 1.1fr 1.6fr; gap: 12px; min-height: 0; }
.scan-image { border: 1px solid var(--line); border-radius: 8px; overflow: auto; max-height: 62vh; background: var(--bg); }
.scan-image img { width: 100%; display: block; }
.po-layout { display: grid; grid-template-columns: minmax(200px, 300px) 1fr; gap: 10px; flex: 1 1 auto; min-height: 0; }
.pr-layout { display: grid; grid-template-columns: 1fr minmax(200px, 280px); gap: 8px; min-height: 0; }
/* Accounting */
.kpi-strip { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; margin-bottom: 8px; }
.kcard { border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; color: #0f172a; min-width: 0; }
.kcard span { font-size: 11px; font-weight: 600; }
.kcard b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.settle-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 6px; background: var(--bg); margin-bottom: 6px; }
.pill-red { background: #FFEBEE; color: #B71C1C; border-radius: 4px; padding: 2px 8px; font-size: 12px; }
.pill-blue { background: #E3F2FD; color: #0D47A1; border-radius: 4px; padding: 2px 8px; font-size: 12px; }
.acct-split { display: grid; grid-template-columns: 1.35fr 1fr; gap: 8px; min-height: 0; }
.acct-grid { max-height: calc(100vh - 330px); min-height: 180px; }
.voucher-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.report-grid { max-height: calc(100vh - 290px); min-height: 200px; }

/* Settings */
.settings-split { display: grid; grid-template-columns: 1.2fr 1.8fr; gap: 12px; align-items: start; }
.plain-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.perm-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px 20px; max-height: calc(100vh - 300px); overflow: auto; }
.perm-group { display: flex; flex-direction: column; gap: 4px; }
.perm-group > b { margin-bottom: 2px; }
.switch-row { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; }
input.switch { appearance: none; width: 38px; height: 20px; border-radius: 10px; background: var(--line); position: relative; cursor: pointer; transition: background .15s; }
input.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; }
input.switch:checked { background: var(--brand); }
input.switch:checked::after { left: 20px; }

/* Medicine mapping */
.map-layout { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: start; }
.map-col { min-width: 0; }
.map-mid { align-self: center; display: flex; flex-direction: column; align-items: center; padding: 0 8px; }
.map-list { max-height: calc(100vh - 330px); min-height: 200px; overflow: auto; padding-right: 4px; }
.map-card { display: grid; grid-template-columns: 2fr 1fr 100px; gap: 12px; padding: 8px 10px; margin-bottom: 6px;
    border: 1px solid var(--line); border-radius: 4px; cursor: pointer; background: var(--panel); }
.map-card:hover { border-color: #93c5fd; }
.map-card.selected { background: #e0f2fe; border: 2px solid #4A90B8; padding: 7px 9px; }
[data-theme="dark"] .map-card.selected { background: #0c3b52; }
.map-cap { font-size: 10px; font-weight: 600; opacity: .5; margin-bottom: 4px; }
.map-field { display: flex; gap: 6px; font-size: 12.5px; margin-bottom: 3px; word-break: break-word; }
.map-field > span { flex: 0 0 56px; font-size: 10px; opacity: .55; padding-top: 2px; }
.map-field.narrow > span { flex-basis: 40px; }

.nmm-grid td { vertical-align: middle; }
.suggest-pop { position: absolute; left: 4px; right: 4px; top: 100%; z-index: 30; max-height: 220px; overflow: auto; min-width: 320px;
    background: var(--panel); border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow); }
.suggest-item { padding: 4px 8px; cursor: pointer; }
.suggest-item.active { background: var(--brand-soft); }

/* Customer Connect */
.grid td.center { text-align: center; }
.cc-layout { display: grid; grid-template-columns: 1fr 320px; gap: 8px; align-items: start; }
.cc-grid { max-height: calc(100vh - 300px); min-height: 200px; }
.cc-grid-full { max-height: calc(100vh - 230px); min-height: 200px; }
.cc-grid-usage { max-height: calc(100vh - 330px); min-height: 200px; }
.wa-preview { background: #DCF8C6; color: #111827; border-radius: 8px; padding: 10px 12px; font-size: 13px; white-space: pre-line; }
.btn-wa { background: #25D366; border-color: #1EBE5A; color: #fff; font-weight: 600; }
.btn-wa:hover:not(:disabled) { background: #1EBE5A; }
.cc-settings { display: grid; grid-template-columns: 380px 1fr; gap: 24px; max-width: 980px; }
.cc-settings label.field { margin-bottom: 8px; }
.cc-h { font-size: 14px; margin: 0 0 6px; }
.cc-hint { font-size: 11px; margin: 2px 0 10px 24px; }
.cc-tpl-head { font-size: 12px; font-weight: 600; }
.template-body { white-space: pre-wrap; font-size: 12px; padding: 8px 10px; margin: 2px 0 10px; background: var(--bg);
    border: 1px solid var(--line); border-radius: 6px; }
.wa-balance { display: flex; align-items: center; gap: 12px; background: #E8F5E9; border: 1px solid #A5D6A7; border-radius: 6px;
    padding: 10px 14px; margin-bottom: 8px; color: #111827; }
.wa-balance .muted { color: #4b5563; }
.wa-icon { font-size: 30px; color: #25D366; }
.doc-preview { width: 100%; height: 62vh; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
@media (max-width: 900px) { .kpi-strip { grid-template-columns: repeat(4, 1fr); } .acct-split, .voucher-layout { grid-template-columns: 1fr; } }

/* Inventory / masters */
.kpi { padding: 2px 8px; border-radius: 4px; font-size: 13px; }
.kpi .muted { font-size: 11px; margin-right: 4px; }
.cap-sm { font-size: 11px; font-weight: 600; color: var(--muted); }
.inv-grid { max-height: calc(100vh - 240px); min-height: 160px; }
td.ellipsis { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.transfers-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.master-form { display: flex; flex-direction: column; gap: 4px; }
.mf-row { display: flex; align-items: center; gap: 6px; }
.mf-row > label { font-size: 11px; font-weight: 600; white-space: nowrap; text-align: right; color: var(--ink); }
.mf-row > label:first-child { width: 72px; flex: 0 0 auto; }
.mf-row input, .mf-row select { padding: 4px 6px; font-size: 12.5px; }
.barcode-preview svg { max-width: 100%; height: 110px; }
.claims-layout { display: grid; grid-template-columns: 1fr 1.2fr; gap: 8px; min-height: 0; }
@media (max-width: 900px) { .scan-review, .po-layout, .pr-layout, .claims-layout, .transfers-layout { grid-template-columns: 1fr; } }

@media (max-width: 900px) { .sales-desk { grid-template-columns: 1fr; height: auto; } .splitter { display: none; } .content.flush { overflow: auto; } }

#blazor-error-ui { background: var(--warn-soft); bottom: 0; box-shadow: 0 -1px 2px rgba(0,0,0,.2); display: none; left: 0; padding: .6rem 1.25rem .7rem; position: fixed; width: 100%; z-index: 1000; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }

@media print { .topbar, .menubar, .shortcuts, .no-print { display: none !important; } .content { overflow: visible; } }
