:root {
  --navy: #1e3a5f; --gold: #d9950a; --ink: #1b2430; --muted: #6b7280; --line: #e2e6ec; --paper: #fff; --wash: #f6f7f9;
  --danger: #b42318; --good: #067647; --warn: #b54708; --font: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --btn: #1e3a5f; --btn-text: #fff; --market: #fbf7ee; --market-text: #8a5a00; --pill: #fff4dd;
  --tag-cust: #e6effa; --tag-cust-text: #1e3a5f; --tag-good: #e3f5ea; --tag-bad: #fde8e6; --shadow: rgba(27,36,48,.12);
}
:root[data-theme="dark"] {
  --navy: #8fb4e6; --gold: #f2b13d; --ink: #e6e9ef; --muted: #9aa3b2; --line: #2a3140; --paper: #171b24; --wash: #0f1218;
  --danger: #f28b82; --good: #6fd39a; --warn: #f5b26b; --btn: #3b6fb5; --btn-text: #fff; --market: #2a2417; --market-text: #f2b13d; --pill: #3a2f12;
  --tag-cust: #1f3350; --tag-cust-text: #a9c8f0; --tag-good: #163826; --tag-bad: #4a1f1c; --shadow: rgba(0,0,0,.5);
}
:root[data-theme="dark"] input[type="date"], :root[data-theme="dark"] input[type="datetime-local"] { color-scheme: dark; }
:root[data-theme="dark"] .doc { color: #222; }
* { box-sizing: border-box; }
html, body, #app { min-height: 100%; margin: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--wash); font-size: 14.5px; line-height: 1.45; }
button, input, select, textarea { font: inherit; }
a { color: var(--navy); }
h1 { font-size: 21px; font-weight: 600; margin: 0; letter-spacing: -0.01em; }
h3 { margin: 0 0 12px; font-size: 15px; font-weight: 600; }
h4 { margin: 14px 0 6px; font-size: 13px; font-weight: 600; color: var(--muted); }

.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #ffd166, var(--gold)); }
.brand-name { font-weight: 600; font-size: 17px; letter-spacing: -0.01em; white-space: nowrap; }
.brand-name span { color: var(--gold); }

.signin { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.card { width: 100%; max-width: 400px; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 32px; }
.card .brand { margin-bottom: 24px; } .card h2 { font-size: 17px; margin: 0 0 4px; } .card .hint { color: var(--muted); font-size: 14px; margin: 0 0 20px; }

.field { display: block; margin-bottom: 12px; }
.field-label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.input, .select { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); color: var(--ink); }
.input:focus, .select:focus { outline: 2px solid var(--navy); outline-offset: 1px; border-color: var(--navy); }
.input:disabled { background: var(--wash); }
.big-input { font-size: 18px; font-variant-numeric: tabular-nums; }
textarea.input { resize: vertical; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 8px 14px; border-radius: 4px; border: 1px solid transparent; cursor: pointer; font-weight: 500; text-decoration: none; white-space: nowrap; }
.btn-primary { background: var(--btn); color: var(--btn-text); }
.btn-price { background: linear-gradient(135deg, #f2b13d, #e0731f); color: #1b1408; border: 0; font-weight: 600; }
.badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 600; text-align: center; } .btn-block { width: 100%; }
.btn-ghost { background: var(--paper); border-color: var(--line); color: var(--ink); }
.btn:disabled { opacity: .6; cursor: default; }
.error { color: var(--danger); font-size: 14px; margin: 6px 0; min-height: 0; } .error:empty { display: none; }
.ok { color: var(--good); font-size: 14px; } .warn { color: var(--warn); font-weight: 600; }
.link-btn { background: none; border: 0; color: var(--navy); cursor: pointer; padding: 0; font-weight: 500; text-decoration: none; }
.link-btn.danger { color: var(--danger); }
.muted { color: var(--muted); } .mono { font-variant-numeric: tabular-nums; } .good { color: var(--good); } .bad { color: var(--danger); } .r { text-align: right; }

.topbar { display: flex; align-items: center; gap: 10px; padding: 6px 16px; min-height: 52px; background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; flex-wrap: wrap; }
.nav { display: flex; gap: 2px; flex: 1; flex-wrap: wrap; min-width: 0; }
.nav a { padding: 6px 7px; font-size: 13.5px; border-radius: 4px; text-decoration: none; color: var(--muted); font-weight: 500; white-space: nowrap; }
.nav a.active { color: var(--navy); background: var(--wash); }
.who { display: none; }
.role-pill { padding: 2px 8px; border-radius: 999px; background: var(--pill); color: var(--market-text); font-size: 12px; font-weight: 500; white-space: nowrap; }

.page { padding: 24px 24px 60px; max-width: 1700px; width: 100%; margin: 0 auto; }
.page.wide { max-width: none; }
.page .lead { color: var(--muted); margin: 4px 0 20px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 18px 20px; margin-bottom: 16px; }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar .input { max-width: 320px; } .toolbar .select { width: auto; } .spacer { flex: 1; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 12px; align-items: end; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.two-col.wide-left { grid-template-columns: 1.6fr 1fr; }
@media (max-width: 900px) { .two-col, .two-col.wide-left { grid-template-columns: 1fr; } }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; } .form-grid .wide { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; align-items: center; }
.sticky-actions { position: sticky; bottom: 0; background: var(--wash); padding: 12px 0; }
.inline-form { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; margin-top: 12px; } .inline-form .field { margin: 0; }
.check { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; cursor: pointer; white-space: nowrap; } .check input { width: 15px; height: 15px; }
.checklist { margin: 0; padding-left: 20px; }
.crumbs { font-size: 13.5px; margin-bottom: 10px; color: var(--muted); } .crumbs a { color: var(--muted); text-decoration: none; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; font-size: 14px; margin: 0; } .kv dt { color: var(--muted); } .kv dd { margin: 0; }
.empty { padding: 28px; text-align: center; color: var(--muted); }
.loading { padding: 48px; text-align: center; color: var(--muted); }
.vendor-box { border-left: 3px solid var(--gold); padding-left: 14px; margin: 4px 0 12px; }

.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 500; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; white-space: nowrap; max-width: 380px; overflow: hidden; text-overflow: ellipsis; }
.table td.wrap, .table.wrapcols td { white-space: normal; overflow: visible; text-overflow: clip; }
.panel > .table, .panel > div > .table { display: table; } .panel { overflow-x: auto; }
.table tr:last-child td { border-bottom: 0; } .table .select { width: auto; padding: 5px 8px; }
.table tr[data-open], .table tr[data-quote], .table tr[data-contact] { cursor: pointer; }
.table tr[data-open]:hover td, .table tr[data-quote]:hover td, .table tr[data-contact]:hover td { background: var(--wash); }
.table.compact td { padding: 4px 6px; font-size: 13.5px; }

.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 500; margin-right: 4px; vertical-align: middle; }
.tag-customer { background: var(--tag-cust); color: var(--tag-cust-text); } .tag-vendor { background: var(--pill); color: var(--market-text); }
.tag-muted { background: var(--wash); color: var(--muted); } .tag-good { background: var(--tag-good); color: var(--good); } .tag-bad { background: var(--tag-bad); color: var(--danger); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 16px; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; display: flex; flex-direction: column; }
.stat .big { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; } .stat .muted { font-size: 12.5px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.tabs a { padding: 8px 12px; cursor: pointer; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.active { color: var(--navy); border-bottom-color: var(--navy); }

.picker { position: relative; }
.pick-results, .pick-list { position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border: 1px solid var(--line); border-radius: 4px; box-shadow: 0 6px 20px var(--shadow); z-index: 30; max-height: 260px; overflow: auto; }
.pick-list { position: static; margin-top: 8px; box-shadow: none; }
.pick { padding: 7px 10px; cursor: pointer; font-size: 14px; } .pick:hover { background: var(--wash); }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--btn); color: #fff; padding: 9px 16px; border-radius: 4px; z-index: 100; font-size: 14px; }
.toast.bad { background: var(--danger); }
.modal-back { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: grid; place-items: center; padding: 20px; z-index: 50; }
.modal { background: var(--paper); border-radius: 6px; width: 100%; max-width: 620px; max-height: 92vh; overflow: auto; padding: 22px 26px; }
.modal.wide { max-width: 900px; } .modal h2 { margin: 0 0 14px; font-size: 17px; }

/* calls */
.call-layout { display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .call-layout { grid-template-columns: 1fr; } .intel { position: static !important; } }
.call-main { min-width: 0; }
.who-row { display: flex; gap: 16px; align-items: flex-start; }
.who-box { flex: 1; padding: 8px 12px; background: var(--wash); border-radius: 4px; min-height: 58px; }
.who-name { font-weight: 600; font-size: 16px; }
.item-row, .line-row { border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 6px; }
.item-row:first-child, .line-row:first-child { border-top: 0; padding-top: 0; }
.item-line { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.item-line .field { margin-bottom: 8px; } .item-line .grow { flex: 1 1 180px; } .w90 { flex: 0 0 90px; } .w130 { flex: 0 0 130px; } .w150 { flex: 0 0 150px; }
.item-line .rm { margin-bottom: 16px; }
.item-line.market { background: var(--market); border-radius: 4px; padding: 6px 10px 0; margin-bottom: 4px; }
.market-label { font-size: 12.5px; color: var(--market-text); font-weight: 600; margin-bottom: 16px; white-space: nowrap; }
.sticky-actions { border-top: 1px solid var(--line); }
.line-grid { display: grid; grid-template-columns: 1.3fr 1.6fr 0.5fr 0.8fr 0.5fr 0.9fr auto; gap: 0 10px; align-items: end; }
.line-grid .rm { align-self: end; margin-bottom: 16px; font-size: 18px; } .amt { padding: 8px 0; }
@media (max-width: 900px) { .line-grid { grid-template-columns: 1fr 1fr; } }
.basis { color: var(--gold); font-weight: 600; }
.quick { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 3px 10px; cursor: pointer; font-size: 13px; }
.chip:hover { border-color: var(--navy); }
.intel { position: sticky; top: 66px; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 14px 16px; font-size: 13.5px; max-height: calc(100vh - 80px); overflow: auto; }
.intel.standalone { position: static; max-height: none; }
.intel-empty { color: var(--muted); padding: 10px 0; }
.intel-head { margin-bottom: 8px; }
.intel-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.intel-stats > div { background: var(--wash); border-radius: 4px; padding: 8px; display: flex; flex-direction: column; }
.intel-stats .big { font-weight: 600; font-size: 15px; } .intel-stats .muted { font-size: 11.5px; }
.intel-row { display: grid; grid-template-columns: 92px 1fr auto; gap: 8px; padding: 3px 0; border-bottom: 1px solid var(--wash); }
.intel-row .tag { font-size: 11px; padding: 0 6px; }
.call-card { padding: 12px 0; border-bottom: 1px solid var(--line); } .call-card:last-child { border-bottom: 0; }
.call-head { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 13.5px; }
.call-notes { margin-top: 4px; white-space: pre-wrap; } .call-items { margin-top: 6px; font-size: 13.5px; }
.call-fu { margin-top: 6px; font-size: 13px; color: var(--warn); } .call-fu.done { color: var(--good); }
.call-row { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.call-row:last-child { border-bottom: 0; } .call-row:hover { background: var(--wash); margin: 0 -8px; padding-left: 8px; padding-right: 8px; }
.fu-chip { font-size: 12px; color: var(--warn); white-space: nowrap; align-self: start; } .fu-chip.overdue { color: var(--danger); font-weight: 600; }
.fu-row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); } .fu-row:last-child { border-bottom: 0; }
.fu-actions { display: flex; gap: 10px; white-space: nowrap; align-self: start; }

/* quotes */
.totals { margin: 14px 0 0 auto; max-width: 320px; }
.totals > div { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px solid var(--wash); }
.totals .grand { font-weight: 600; color: var(--gold); border-bottom: 0; font-size: 15px; }
.rank { color: var(--gold); }
.vendor-card { padding: 12px 16px; }
.logo-row { display: flex; align-items: center; gap: 12px; }

/* printable quotation — fixed colours so the theme never leaks into the document */
.doc-page { background: #fff; min-height: 100vh; }
.doc { --dnavy: #1e3a5f; --dgold: #b8860b; max-width: 800px; margin: 20px auto; background: #fff; padding: 0 48px 110px; position: relative; font-size: 13.5px; color: #222; font-family: var(--font); }
.doc a { color: inherit; text-decoration: none; }
.doc-band { position: absolute; left: 0; right: 0; top: 0; height: 96px; background: #f5efe3; clip-path: ellipse(120% 100% at 30% 0%); }
.doc-band.bottom { top: auto; bottom: 0; height: 70px; clip-path: ellipse(120% 100% at 70% 100%); }
.doc-head { position: relative; display: flex; justify-content: space-between; align-items: flex-start; padding-top: 34px; }
.doc-logo img { height: 40px; } .doc-brand { font-size: 26px; font-weight: 700; color: #e0a020; letter-spacing: -0.02em; } .doc-brand b { color: var(--dnavy); }
.doc-company { text-align: right; line-height: 1.5; color: #222; }
.doc-customer { margin: 44px 0 24px; line-height: 1.5; position: relative; }
.doc-title { font-size: 30px; font-weight: 500; color: var(--dgold); margin: 0 0 14px; }
.doc-meta { display: grid; grid-template-columns: repeat(4, 1fr); background: #f3f4f6; padding: 10px 12px; margin-bottom: 20px; }
.doc-meta span { display: block; color: var(--dnavy); font-weight: 600; font-size: 13px; margin-bottom: 2px; }
.doc-table { width: 100%; border-collapse: collapse; }
.doc-table th { text-align: left; font-weight: 500; padding: 8px 6px; border-bottom: 1px solid #999; white-space: nowrap; }
.doc-table td { padding: 10px 6px; border-bottom: 1px solid #eee; vertical-align: top; }
.doc-table td:first-child { white-space: normal; } .doc-table td.nw, .nw { white-space: nowrap; }
.doc-table tbody tr:nth-child(even) { background: #f7f7f7; } .doc-sub { color: #777; font-size: 12px; }
.doc-totals { margin: 6px 0 0 auto; width: 55%; }
.doc-totals > div { display: flex; justify-content: space-between; padding: 8px 6px; border-bottom: 1px solid #eee; }
.doc-totals > div:nth-child(odd) { background: #f7f7f7; }
.doc-totals .grand { font-weight: 600; color: var(--dgold); font-size: 15px; }
.doc-notes { margin: 20px 0 0; white-space: pre-wrap; }
.doc-terms-h { font-size: 16px; font-weight: 600; margin: 22px 0 6px; }
.doc-terms { font-size: 11.5px; line-height: 1.7; } .doc-terms div:last-child { font-weight: 600; font-size: 13px; }
.doc-foot { position: absolute; left: 0; right: 0; bottom: 0; height: 100px; text-align: center; font-size: 13px; line-height: 1.8; padding-top: 34px; }
.doc-foot .muted { color: #666; }
.doc-actions { text-align: center; margin: 10px 0 40px; }
.doc, .doc * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
@media print { html, body { background: #fff !important; } .no-print { display: none !important; } .doc { margin: 0; padding: 0 36px 110px; max-width: none; min-height: 296mm; } .doc-foot { position: fixed; } .doc-band.bottom { position: fixed; } @page { size: A4; margin: 0; } }

.vendor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 12px; }
.import-result { white-space: pre-wrap; font-size: 13px; background: var(--wash); padding: 10px; border-radius: 4px; min-height: 20px; margin: 10px 0 0; }
.import-result:empty { display: none; }
.vrow { padding: 6px 0; }

.menu { position: relative; } .menu-btn { cursor: pointer; }
.menu-items { display: none; position: absolute; right: 0; top: 100%; background: var(--paper); border: 1px solid var(--line); border-radius: 4px; box-shadow: 0 6px 20px var(--shadow); min-width: 170px; z-index: 40; padding: 4px; }
.menu.open .menu-items { display: block; } .menu-items a { display: block; padding: 7px 10px; border-radius: 4px; cursor: pointer; color: var(--ink); text-decoration: none; font-weight: 500; } .menu-items a:hover { background: var(--wash); }
.menu-head { padding: 6px 10px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; font-weight: 600; font-size: 14px; } .menu-head .muted { font-weight: 400; font-size: 12.5px; }

.outcome-won { color: var(--good); font-weight: 600; } .outcome-lost { color: var(--danger); font-weight: 600; }
.radio-row { display: flex; gap: 10px; align-items: center; white-space: nowrap; } .radio-row label { display: flex; gap: 4px; align-items: center; cursor: pointer; }

.prob { display: flex; align-items: center; gap: 8px; font-size: 13.5px; } .prob input[type=range] { width: 120px; accent-color: var(--gold); }
.event { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; } .event:last-child { border-bottom: 0; }
.next-row { display: flex; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); } .next-row:last-child { border-bottom: 0; }
.next-rank { width: 26px; height: 26px; border-radius: 50%; background: var(--pill); color: var(--market-text); display: grid; place-items: center; font-weight: 600; font-size: 13px; flex: 0 0 26px; }
.prod-card { padding: 14px 18px; }
.prod-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px 14px; font-size: 13.5px; margin-bottom: 10px; } .prod-nums b { font-size: 15px; }
.tl { margin-top: 6px; } .tl-bar { position: relative; height: 26px; background: var(--wash); border-radius: 4px; overflow: hidden; }
.tl-seg { position: absolute; top: 0; height: 100%; min-width: 2px; } .tl-seg[data-call] { cursor: pointer; }
.tl-talk, i.tl-talk { background: var(--good); } .tl-log, i.tl-log { background: var(--gold); } .tl-gap, i.tl-gap { background: repeating-linear-gradient(45deg, transparent, transparent 4px, var(--line) 4px, var(--line) 6px); }
.tl-axis { position: relative; height: 16px; font-size: 11px; color: var(--muted); } .tl-axis span { position: absolute; transform: translateX(-50%); }
.tl-legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 2px; } .tl-legend i { display: inline-block; width: 12px; height: 10px; border-radius: 2px; vertical-align: middle; margin-right: 4px; }

th.sortable { cursor: pointer; user-select: none; } th.sortable.asc::after { content: " ▲"; font-size: 9px; } th.sortable.desc::after { content: " ▼"; font-size: 9px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: -6px 0 14px; } .filters .select { width: auto; max-width: 180px; } .filters .input { max-width: 150px; }
.trait { display: inline-block; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); font-size: 12.5px; margin: 0 4px 4px 0; color: var(--muted); }
.trait.on { background: var(--pill); color: var(--market-text); border-color: transparent; }
.trait-pick .trait { cursor: pointer; } .trait-pick .trait:hover { border-color: var(--gold); }
.persona { margin-top: 8px; } .persona-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; font-size: 13.5px; }
.persona-text { font-size: 13.5px; white-space: pre-wrap; margin-top: 4px; }
.tag-easy { background: var(--tag-good); color: var(--good); } .tag-medium { background: var(--pill); color: var(--market-text); } .tag-hard { background: var(--tag-bad); color: var(--danger); }
.left { opacity: .65; } .left .who-name::after { content: " (left)"; color: var(--danger); font-weight: 400; font-size: 13px; }
.src-best { background: var(--tag-good); } .src-row td { vertical-align: middle; }

/* notes */
.notes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.note { border-radius: 6px; padding: 12px 14px; cursor: pointer; position: relative; color: #1b2430; min-height: 90px; box-shadow: 0 2px 8px var(--shadow); }
.note-yellow { background: #fff3a8; } .note-green { background: #cdf2d5; } .note-blue { background: #cfe3fb; } .note-pink { background: #fdd6e2; } .note-grey { background: #e5e7eb; }
.note-title { font-weight: 600; margin-bottom: 4px; } .note-body { font-size: 13.5px; white-space: pre-wrap; } .note-img { max-width: 100%; max-height: 180px; border-radius: 4px; display: block; margin: 6px 0; }
.note-files { font-size: 12.5px; margin-top: 6px; } .note-files a { color: #1e3a5f; } .note-foot { font-size: 12px; color: #4b5563; margin-top: 8px; } .note-foot a { color: #1e3a5f; } .note-pin { position: absolute; top: 6px; right: 8px; }
.colors { display: flex; gap: 6px; padding: 6px 0; } .color-dot { width: 22px; height: 22px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; } .color-dot.on { border-color: var(--ink); }
.file-row { font-size: 13.5px; margin: 4px 0; }
.btn.danger { color: var(--danger); }

.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 200; display: flex; flex-direction: column; }
.lightbox-bar { display: flex; gap: 10px; align-items: center; padding: 10px 16px; color: #eee; font-size: 14px; }
.lightbox-bar .btn { padding: 5px 10px; } .lightbox-stage { flex: 1; overflow: auto; display: grid; place-items: center; cursor: grab; }
.lightbox-stage img { max-width: none; transition: transform .05s; user-select: none; }
.flagged td { opacity: .45; text-decoration: line-through; } .flagged td:last-child { text-decoration: none; }
.intel-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; } @media (max-width: 1100px) { .intel-cols { grid-template-columns: 1fr; } }
.intel-cols > div { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; }
.intel-cols h4 { margin-top: 0; }
.restricted-box { border: 1px dashed var(--line); border-radius: 6px; padding: 18px; color: var(--muted); }

.stockline { font-size: 13px; margin-top: 4px; } .stockline.good { color: var(--good); } .stockline.bad { color: var(--danger); }
.ringbar { position: fixed; top: 60px; right: 20px; z-index: 150; background: var(--paper); border: 1px solid var(--gold); border-radius: 6px; padding: 12px 16px; display: flex; gap: 12px; align-items: center; box-shadow: 0 8px 30px var(--shadow); animation: pop .25s; }
@keyframes pop { from { transform: translateY(-10px); opacity: 0; } to { transform: none; opacity: 1; } }

.livebar { background: var(--tag-good); color: var(--good); border-radius: 6px; padding: 10px 14px; margin-bottom: 12px; font-size: 14px; }
.livebar.done { background: var(--wash); color: var(--muted); }
.tel { font-size: 13px; text-decoration: none; margin-left: 6px; }

/* ---------- bars on My performance ---------- */
.bars { display: flex; gap: 6px; align-items: flex-end; height: 140px; padding-top: 10px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; font-size: 11px; color: var(--muted); }
.bar-fill { width: 100%; background: var(--line); border-radius: 4px 4px 0 0; position: relative; min-height: 2px; }
.bar-conn { position: absolute; bottom: 0; left: 0; right: 0; background: var(--good); border-radius: 4px 4px 0 0; }
.loc-row { padding: 10px 0; border-bottom: 1px solid var(--line); } .loc-row:last-child { border-bottom: 0; }

/* ---------- mobile menu ---------- */
.hamb { display: none; }
.mmenu { position: fixed; inset: 0; background: var(--wash); z-index: 300; padding: 12px 16px 40px; overflow: auto; }
.mmenu-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.mmenu-user { color: var(--muted); margin-bottom: 14px; display: flex; gap: 8px; align-items: center; }
.mmenu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.mmenu-grid a { display: block; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 18px 14px; font-size: 16px; font-weight: 600; text-decoration: none; color: var(--ink); text-align: center; }
.mmenu-grid.small a { padding: 12px; font-size: 14px; font-weight: 500; color: var(--muted); }

/* ---------- phones: one clean column, big touch targets ---------- */
@media (max-width: 760px) {
  body { font-size: 15px; }
  .topbar { padding: 8px 12px; gap: 8px; flex-wrap: nowrap; }
  .hamb { display: inline-flex; padding: 8px 12px; font-size: 18px; }
  .topbar .nav, .topbar #usermenu { display: none; }
  .topbar .brand-name { font-size: 16px; }
  .topbar > .btn-primary { margin-left: auto; padding: 8px 12px; }
  body.app .topbar > .btn-primary, body.app .topbar #logprice { display: none; }   /* the app's own bottom bar has these */
  .page { padding: 14px 12px 40px; }
  h1 { font-size: 19px; }
  .toolbar { gap: 8px; } .toolbar .input { max-width: none; flex: 1 1 100%; } .toolbar .select { flex: 1 1 45%; max-width: none; }
  .toolbar .btn { flex: 1 1 auto; justify-content: center; }
  .filters { gap: 6px; } .filters .select, .filters .input, .filters .picker { flex: 1 1 45%; max-width: none; }
  .stats { grid-template-columns: 1fr 1fr; gap: 8px; } .stat { padding: 10px 12px; } .stat .big { font-size: 18px; }
  .two-col, .two-col.wide-left, .call-layout, .form-grid, .item-grid, .line-grid { grid-template-columns: 1fr !important; display: grid; }
  .form-grid .wide { grid-column: auto; }
  .intel { position: static; max-height: none; margin-top: 8px; }
  .intel-cols { grid-template-columns: 1fr; }
  .panel { padding: 14px; margin-bottom: 12px; border-radius: 10px; }
  .who-row { flex-direction: column; gap: 8px; } .who-row .field { flex: none !important; }
  .row { grid-template-columns: 1fr 1fr; }
  .item-line .grow, .item-line .w90, .item-line .w130, .item-line .w150 { flex: 1 1 45%; }
  .input, .select { padding: 11px 12px; font-size: 16px; }   /* 16px stops iOS/Android zoom on focus */
  .btn { padding: 11px 16px; font-size: 15px; }
  .sticky-actions { padding: 10px 0; gap: 8px; } .sticky-actions .btn { flex: 1; }
  .tabs a { padding: 10px 12px; }
  .table th, .table td { padding: 8px 6px; font-size: 13.5px; }
  .modal { padding: 16px; max-height: 96vh; border-radius: 12px; } .modal-back { padding: 8px; align-items: end; }
  .ringbar { left: 10px; right: 10px; top: 60px; flex-wrap: wrap; }
  .notes-grid { grid-template-columns: 1fr; }
  .vendor-grid { grid-template-columns: 1fr; }
  .call-row { flex-direction: column; gap: 4px; } .fu-chip { align-self: flex-start; }
  .prob input[type=range] { width: 90px; }
  .tl-axis span { font-size: 10px; }
  .doc { padding: 16px; }
  .bars { height: 100px; }
}
.row > * { min-width: 0; } .row .select, .row .input { max-width: 100%; }

.row-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; } .row-actions .btn { padding: 5px 10px; font-size: 13px; }

.inc-card { padding: 14px 18px; } .inc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.inc-box { background: var(--wash); border-radius: 6px; padding: 10px 12px; font-size: 13px; } .inc-box b { display: block; font-size: 17px; margin: 2px 0; }
.table tr.sub td { background: var(--wash); padding: 6px 12px 0; border-bottom: 1px solid var(--line); }

.navgroup { position: relative; } .navgroup-btn { cursor: pointer; padding: 6px 7px; font-size: 13.5px; color: var(--muted); font-weight: 500; border-radius: 4px; display: inline-block; }
.navgroup.active .navgroup-btn, .navgroup:hover .navgroup-btn { color: var(--navy); background: var(--wash); }
.navgroup-items { display: none; position: absolute; left: 0; top: 100%; background: var(--paper); border: 1px solid var(--line); border-radius: 4px; box-shadow: 0 6px 20px var(--shadow); min-width: 160px; z-index: 40; padding: 4px; }
.navgroup:hover .navgroup-items { display: block; } .navgroup-items a { display: block; padding: 7px 10px; white-space: nowrap; }

.hs-top { overflow-x: auto; overflow-y: hidden; height: 14px; margin: 0 0 -2px; } .hs-top > div { height: 1px; }
.panel.dragging { cursor: grabbing; user-select: none; }
.scheme-checks { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; } .scheme-checks .check { white-space: normal; }
.hs-top { scrollbar-width: auto; scrollbar-color: var(--gold) var(--wash); }
.hs-top::-webkit-scrollbar { height: 12px; } .hs-top::-webkit-scrollbar-track { background: var(--wash); border-radius: 6px; } .hs-top::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 6px; }

/* leaderboard */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; } .seg button { background: transparent; border: 0; padding: 7px 14px; color: var(--muted); cursor: pointer; font-size: 14px; } .seg button.on { background: var(--navy); color: #fff; }
.lb-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.lb-card { background: linear-gradient(160deg, var(--paper), var(--wash)); border: 1px solid var(--line); border-radius: 14px; padding: 18px; box-shadow: 0 8px 28px var(--shadow); }
.lb-head h3 { margin: 0; font-size: 18px; } .lb-head .muted { font-size: 12.5px; }
.lb-top { text-align: center; padding: 14px 0 10px; } .lb-crown { font-size: 40px; line-height: 1; } .lb-name { font-size: 20px; font-weight: 700; margin-top: 6px; } .lb-val { font-size: 26px; font-weight: 800; color: var(--gold); margin: 2px 0; }
.lb-list { list-style: none; margin: 8px 0 0; padding: 0; } .lb-list li { display: flex; gap: 10px; align-items: center; padding: 7px 8px; border-top: 1px solid var(--line); font-size: 14px; } .lb-list li.me { background: var(--tag-good); border-radius: 6px; }
.lb-rank { width: 28px; text-align: center; } .lb-n { flex: 1; } .lb-v { font-weight: 600; font-family: var(--mono); } .lb-empty { text-align: center; color: var(--muted); padding: 30px 0; } .lb-me { text-align: center; margin-top: 8px; font-size: 13px; }
.conflict { text-align: center; } .conflict-icon { font-size: 48px; } .conflict h2 { color: var(--danger); } .conflict p { text-align: left; } .btn-danger { background: var(--danger); color: #fff; border: 0; }
@media (max-width: 760px) { .lb-grid { grid-template-columns: 1fr; } }
.hs-wrap { min-width: 0; } .hs-wrap > .panel { margin-top: 0; }
.hs-wrap { min-width: 0; margin-bottom: 14px; } .hs-wrap > .panel { margin-bottom: 0; }
