/* Hallmark · checked: 2026-11-07 · genre: modern-minimal (inferred)
 * floor: 0 new FAIL (2 pre-existing on Reports: 34, 73) · fixed: 40 search field edge, 40 badge, 48 badge literal, 49a "Open cases" wrap · structural: app bar, grouped sidebar, Home v3
 * Hallmark · reworded "Good morning, Visitor" heading kept as the greeting; dropped the old "Last 7 days" stats card and its 28.4%/24.2%/93.2% figures · replaced by the five Home stat tiles
 * Hallmark · kept the Cases search form (view + q): the lint keys forms by action and now meets the top-bar search first, which also submits to /cases
 * built: the project · redesign: polish · v2.0.0 */
/* Megaflip Workspace. Same tokens as the client dashboard (dashboard/index.html), so Reports and the rest match. */
:root {
  --navy-950: #061229; --navy-900: #0A1C3D; --navy-800: #12295A; --navy-700: #1C3A78;
  --blue: #1F5BFF; --blue-press: #1747D6; --blue-soft: #E8EFFF; --sky: #8FB0FF; --slate: #B9C6DE;
  --bg: #F3F5F9; --card: #FFFFFF; --line: #E2E7EF; --text: #0B1A33; --muted: #5A6A82; --faint: #5E6B82;
  --green: #087A44; --green-soft: #E3F6EC; --amber: #8A5300; --amber-soft: #FFF3DC;
  --red: #B82E2E; --red-soft: #FDE8E8; --radius: 14px; --soft: #F7F9FC; --track: #EEF2F8; --row: #EEF1F6;
  --input: #FFFFFF; --focus: rgba(31,91,255,.28); --btn: #1F5BFF; --btn-press: #1747D6;
  --font-body: "Schibsted Grotesk", system-ui, sans-serif; --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --focus-ring: #1F5BFF; --field-line: #7D8AA0; --paper: #FFFFFF;
  --side-ink: #C5D2EA; --side-muted: #9AA9C6; --side-faint: #8FA3C2; --side-line: rgba(255,255,255,.14); --side-hair: rgba(255,255,255,.06);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --navy-950: #040A17; --navy-900: #0A1630; --navy-800: #142650; --navy-700: #A9C1FF;
  --blue: #4D7FFF; --blue-press: #3A6BF0; --blue-soft: rgba(77,127,255,.16); --sky: #9DBBFF;
  --bg: #060D1C; --card: #0C1729; --line: #1B2A44; --text: #E7EDF7; --muted: #A0AEC6; --faint: #8796B0;
  --green: #3DD68C; --green-soft: rgba(61,214,140,.14); --amber: #F2B54A; --amber-soft: rgba(242,181,74,.14);
  --red: #FF6B6B; --red-soft: rgba(255,107,107,.14); --soft: #101D33; --track: #16243C; --row: #15223A;
  --input: #0A1426; --focus: rgba(77,127,255,.4); --btn: #1F5BFF; --btn-press: #3A6BF0;
  --focus-ring: #8FB0FF; --field-line: #5B6E92;
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; }
html, body { overflow-x: clip; }
body { font-family: var(--font-body); background: var(--bg); color: var(--text); font-size: 14px;
  line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a.link, .card p a, .flash a { color: var(--blue); font-weight: 500; }
a.link { white-space: nowrap; }
:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
h1, h2 { text-wrap: balance; }
.mono, td.id { font-family: var(--font-mono); font-size: 12.5px; }
td.id, .item .id { color: var(--navy-700); white-space: nowrap; }

/* Sidebar (same as the dashboard) */
.side { position: fixed; inset: 0 auto 0 0; width: 236px; background: var(--navy-950); color: var(--paper);
  display: flex; flex-direction: column; padding: 22px 16px; z-index: 20; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 26px; }
.client { margin: 0 4px 22px; padding: 12px; border-radius: 10px; background: var(--navy-900); border: 1px solid var(--side-hair); }
.client small { display: block; color: var(--sky); font-size: 12px; }
.client b { display: block; font-weight: 600; margin-top: 3px; }
.client-logo { display: block; width: 100%; max-height: 44px; object-fit: contain; object-position: left center; margin-top: 10px; }
.client.has-logo b { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: var(--side-ink); font-weight: 500; margin-bottom: 2px; }
.nav a:hover { background: var(--navy-900); color: var(--paper); }
.nav a.on { background: var(--navy-800); color: var(--paper); }
.nav svg { width: 16px; height: 16px; opacity: .85; flex: none; }
.side-foot { margin-top: auto; padding: 0 8px; color: var(--side-muted); font-size: 12px; line-height: 1.5; }

/* Main */
main { margin-left: 236px; padding: 28px 36px 48px; max-width: 1340px; }
.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
h1 { font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.sub { color: var(--muted); margin-top: 4px; }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); color: var(--muted); }
.icon-btn:hover { color: var(--text); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn .moon, :root[data-theme="dark"] .icon-btn .sun { display: none; }
:root[data-theme="dark"] .icon-btn .moon { display: block; }

.banner { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 14px; margin-bottom: 20px; font-size: 13px; background: var(--amber-soft); color: var(--amber); }
.banner.info { background: var(--blue-soft); color: var(--navy-700); }
.banner b { font-weight: 600; }
.flash { background: var(--blue-soft); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 18px; }
.flash.bad { background: var(--red-soft); }

.grid { display: grid; gap: 16px; }
.trio { grid-template-columns: repeat(3, 1fr); margin-bottom: 16px; }
.row2 { grid-template-columns: 1.6fr 1fr; margin-bottom: 16px; align-items: start; }
.row11 { grid-template-columns: 1fr 1fr; margin-bottom: 16px; align-items: start; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.card + .card { margin-top: 16px; }
.grid > .card + .card { margin-top: 0; }
.card h2 { font-size: 15px; font-weight: 600; }
.card .hint, .hint { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.card p + p { margin-top: 8px; }

/* Shared bits */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.bar { height: 8px; border-radius: 99px; background: var(--track); overflow: hidden; margin-top: 12px; }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--blue); }
.bar.ok, .bar.warn, .bar.bad { background: var(--track); }
.bar.ok i { background: var(--green); } .bar.warn i { background: var(--amber); } .bar.bad i { background: var(--red); }
td.num, th.num { font-variant-numeric: tabular-nums; text-align: right; }
table.questions th:nth-child(2) { text-align: right; }

/* Lists and tables */
.items { display: flex; flex-direction: column; }
.item { display: grid; grid-template-columns: auto 1fr auto; gap: 3px 12px; padding: 11px 0; border-bottom: 1px solid var(--row); align-items: center; }
.item:last-child { border-bottom: 0; }
.item .what { font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .meta { grid-column: 2; color: var(--muted); font-size: 12px; }
.item .right { text-align: right; font-size: 12px; font-weight: 600; white-space: nowrap; }
.due.soon { color: var(--amber); } .due.late { color: var(--red); } .due.fine { color: var(--muted); font-weight: 500; }
.empty { color: var(--muted); padding: 18px 0 6px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; }
.kv span { color: var(--muted); }
.kv b { font-weight: 600; text-align: right; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.chip.off { color: var(--muted); border-style: dashed; } .chip.off i { background: var(--faint); }
.pill { white-space: nowrap; display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.ok { background: var(--green-soft); color: var(--green); }
.warn { background: var(--amber-soft); color: var(--amber); }
.bad { background: var(--red-soft); color: var(--red); }
.info { background: var(--blue-soft); color: var(--blue); }
:root[data-theme="dark"] .info { color: var(--sky); }  /* 4.0:1 with --blue; --sky passes AA */
.mute { background: var(--row); color: var(--muted); }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12.5px; color: var(--faint);
  font-weight: 600; padding: 0 12px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px; border-bottom: 1px solid var(--row); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.when { color: var(--muted); white-space: nowrap; }
.tablewrap { overflow-x: auto; margin: 0 -4px; }
pre.diff { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--soft); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px; font: 12.5px/1.55 var(--font-mono); max-height: 460px; overflow: auto; color: var(--text); }
details summary { cursor: pointer; color: var(--blue); font-weight: 500; margin-top: 10px; }

/* Controls */
.seg { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 3px; flex-wrap: wrap; }
.seg a { font-weight: 500; color: var(--muted); padding: 7px 14px; border-radius: 7px; white-space: nowrap; }
.seg a.on { background: var(--navy-900); color: var(--paper); }
:root[data-theme="dark"] .seg a.on { background: var(--btn); }
label { display: block; font-weight: 500; margin: 14px 0 6px; }
label small { color: var(--muted); font-weight: 400; }
input, select, textarea { font: inherit; color: var(--text); background: var(--input); border: 1px solid var(--field-line);
  border-radius: 10px; padding: 10px 12px; width: 100%; min-height: 42px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--focus); }
.btn { font: inherit; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px;
  padding: 9px 16px; border-radius: 10px; border: 1px solid var(--btn); background: var(--btn); color: var(--paper); cursor: pointer; }
.btn:hover { background: var(--btn-press); }
.btn.quiet { background: var(--card); border-color: var(--line); color: var(--text); }
.btn.quiet:hover { border-color: var(--muted); }
.btn.danger { background: var(--card); border-color: var(--red); color: var(--red); }
.btn.danger:hover { background: var(--red-soft); }
.btn:active, .icon-btn:active, .seg a:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--row); border-color: var(--line); color: var(--faint); cursor: not-allowed; transform: none; }
.btn.sm { min-height: 32px; padding: 5px 11px; font-size: 13px; }
.inline { display: inline; }
.formrow { display: grid; grid-template-columns: 1.2fr 1.4fr 1fr auto; gap: 10px; align-items: end; }
.formrow label { margin-top: 0; }
.formrow.five { grid-template-columns: 1.2fr 1.4fr 1fr 1fr auto; }
.cell-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.cell-actions select { width: auto; min-height: 32px; padding: 4px 8px; font-size: 13px; }
.subtabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.subtabs a { padding: 10px 14px; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.subtabs a.on { color: var(--text); border-bottom-color: var(--blue); }
.secret { font: 500 17px/1.4 var(--font-mono); letter-spacing: .06em; background: var(--soft);
  border: 1px solid var(--line); padding: 12px 14px; border-radius: 10px; word-break: break-all; }
.choice { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }
.choice label { margin: 0; display: flex; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; font-weight: 500; }
.choice input { width: auto; min-height: 0; accent-color: var(--blue); }
.choice label:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }
footer.foot { color: var(--faint); font-size: 12px; margin-top: 28px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* Signed-out pages */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 1fr) minmax(360px, 520px); }
.auth-brand { background: var(--navy-950); color: var(--paper); padding: 40px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-brand h2 { font-size: 34px; line-height: 1.12; letter-spacing: -.02em; font-weight: 600; max-width: 13ch; margin-top: 18vh; }
.auth-brand p { color: var(--side-muted); max-width: 40ch; margin-top: 14px; font-size: 15px; }
.auth-brand .facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.auth-brand .facts span { border: 1px solid var(--side-line); border-radius: 999px; padding: 5px 11px; font-size: 12.5px; color: var(--side-ink); }
.auth-brand small { color: var(--side-faint); font-size: 12px; }
.auth-card { padding: 40px; display: flex; flex-direction: column; justify-content: center; background: var(--card); }
.auth-card form { width: 100%; max-width: 380px; margin: 0 auto; }
.auth-card h1 { font-size: 26px; }
.auth-card .btn { width: 100%; margin-top: 22px; min-height: 46px; }
.auth-card .msg { background: var(--amber-soft); color: var(--amber); border-radius: 10px; padding: 10px 12px; margin-top: 16px; font-size: 13px; }
.auth-card .msg.good { background: var(--green-soft); color: var(--green); }
.auth-card .fine { color: var(--muted); font-size: 12.5px; margin-top: 18px; }
.auth-card .top-actions { position: absolute; top: 18px; right: 18px; }
.auth-card { position: relative; }
@media (max-width: 1100px) { .trio { grid-template-columns: 1fr 1fr 1fr; } .row2, .row11 { grid-template-columns: 1fr; } .inbox { grid-template-columns: 180px minmax(260px, 1fr) minmax(0, 1.2fr); } }
@media (max-width: 820px) {
  .side { width: auto; min-height: 56px;  /* sticky top bar: nav.css (shared with Reports) */ flex-direction: row; align-items: center; padding: 12px 16px; gap: 8px; }
  .brand { padding: 0; } .brand svg { height: 24px; } .nav, .side-foot { display: none; }
  .client { margin: 0 0 0 auto; padding: 0; background: none; border: 0; text-align: right; }
  .client small { display: none; } .client b { margin: 0; font-size: 13px; }
  .client-logo { margin: 0; max-height: 30px; width: auto; max-width: 150px; }
  main { margin-left: 0; padding: 20px 16px 40px; }
  .trio { grid-template-columns: 1fr; gap: 10px; }
  .formrow, .formrow.five { grid-template-columns: 1fr; }
  .choice { grid-template-columns: 1fr 1fr; }
  .auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .auth-brand { padding: 22px 20px; } .auth-brand h2, .auth-brand p, .auth-brand .facts, .auth-brand small { display: none; }
  .auth-card { padding: 28px 20px 40px; justify-content: flex-start; }
}
@media (max-width: 480px) { h1 { font-size: 21px; } .actions { width: 100%; }
  .seg { width: 100%; } .seg a { flex: 1; text-align: center; padding: 7px 6px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Home: Needs a human + AI agent at a glance + one setup bar */
.lede { color: var(--muted); margin: -6px 0 16px; }
.setupbar { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; padding: 14px 20px; color: var(--text); flex-wrap: wrap; }
.setupbar .bar { flex: 1 1 160px; margin: 0; }
.setupbar:hover, .stat:hover { border-color: var(--blue); }
.qlist { display: flex; flex-direction: column; }
.qrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; padding: 12px 8px; margin: 0 -8px; border-radius: 10px;
  color: var(--text); border-bottom: 1px solid var(--row); transition: background-color .15s; }
.qrow:last-child { border-bottom: 0; }
.qrow:hover { background: var(--soft); }
.qrow .ql { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.qrow .ql::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #8FA3C2; opacity: .55; flex: none; }
.qrow.risk .ql::before { background: var(--amber); opacity: 1; }
.qrow .qd { grid-column: 1; color: var(--muted); font-size: 12.5px; padding-left: 16px; }
.qrow .qn { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 24px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stats4 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 12px; border: 1px solid var(--line); color: var(--text);
  background: color-mix(in srgb, var(--soft) 70%, transparent); transition: border-color .15s; }
.stat span { color: var(--muted); font-size: 12.5px; }
.stat b { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }

/* Inbox: views | list | case, like Intercom */
.inbox { display: grid; grid-template-columns: 220px minmax(300px, 400px) minmax(0, 1fr); height: calc(100vh - 150px); min-height: 480px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.views { padding: 14px 10px; overflow-y: auto; border-right: 1px solid var(--line); }
.views .vh { display: block; font-size: 12px; color: var(--muted); font-weight: 600; padding: 14px 10px 6px; }
.views .vh:first-child { padding-top: 2px; }
.views a { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 8px; color: var(--text); font-weight: 500; }
.views a .n { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.views a:hover { background: var(--soft); }
.views a.on { background: var(--blue-soft); color: var(--blue); } .views a.on .n { color: var(--blue); background: none; outline: 0; }
:root[data-theme="dark"] .views a.on, :root[data-theme="dark"] .views a.on .n { color: var(--sky); }
.list { overflow-y: auto; border-right: 1px solid var(--line); }
.list-head { display: flex; align-items: baseline; gap: 8px; padding: 16px 16px 10px; }
.list-head h1 { font-size: 17px; } .list-head .n { color: var(--muted); }
.list form { padding: 0 16px 12px; } .list input { min-height: 36px; padding: 7px 12px; }
.row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--row);
  color: var(--text); transition: background-color .15s; }
.row .what { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row > .due { font-size: 12px; font-weight: 600; white-space: nowrap; }
.row .meta { grid-column: 2 / -1; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row:hover { background: var(--soft); }
.row.on { background: var(--blue-soft); box-shadow: inset 3px 0 0 var(--blue); }
.list .empty { padding: 24px 16px; }
.case { overflow-y: auto; padding: 24px 28px; }
.case h2 { font-size: 19px; font-weight: 600; letter-spacing: -.01em; margin-bottom: 18px; }
.case .kv { max-width: 520px; } .case .kv b { text-align: left; }
.case .hint { margin-top: 20px; }
.case .back { display: none; }
.case > .empty { display: grid; place-items: center; height: 100%; padding: 0; }
@media (max-width: 820px) {
  .inbox { display: block; height: auto; min-height: 0; overflow: visible; }
  .views { display: flex; gap: 6px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px; scrollbar-width: none; }
  .views .vh { display: none; }
  .views a { flex: none; white-space: nowrap; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; }
  .list { border-right: 0; }
  .inbox.has-case .views, .inbox.has-case .list, .inbox:not(.has-case) .case { display: none; }
  .case { padding: 18px 16px; }
  .case .back { display: inline-block; margin-bottom: 12px; color: var(--blue); font-weight: 500; }
}

/* Glass: frosted surfaces over a soft Signal-tinted backdrop. Solid where blur isn't supported or less transparency is asked for. */
:root { --glass: rgba(255,255,255,.52); --glass-strong: rgba(255,255,255,.88); --glass-edge: rgba(31,91,255,.10); --glass-hi: rgba(255,255,255,.8); --glass-catch: rgba(255,255,255,.55); --wash-3: rgba(201,216,255,.35);
  --glass-shadow: 0 1px 2px rgba(10,28,61,.04), 0 14px 36px -14px rgba(10,28,61,.16); --wash-1: rgba(31,91,255,.26); --wash-2: rgba(92,139,255,.18); }
:root[data-theme="dark"] { --glass: rgba(14,27,48,.6); --glass-strong: rgba(14,27,48,.9); --glass-edge: rgba(255,255,255,.08); --glass-hi: rgba(255,255,255,.06);
  --glass-shadow: 0 1px 2px rgba(0,0,0,.3), 0 18px 44px -18px rgba(0,0,0,.65); --wash-1: rgba(31,91,255,.22); --wash-2: rgba(143,163,194,.07); --glass-catch: rgba(255,255,255,.08); --wash-3: transparent; }
body { background: radial-gradient(1100px 620px at 92% -8%, var(--wash-1), transparent 62%),
  radial-gradient(900px 560px at 18% 108%, var(--wash-2), transparent 60%),
  radial-gradient(700px 480px at 55% 40%, var(--wash-3), transparent 70%), var(--bg); background-attachment: fixed; }
.side { background: radial-gradient(420px 300px at 0 0, rgba(31,91,255,.24), transparent 70%), linear-gradient(180deg, #0A1C3D, #061229 62%);
  border-right: 1px solid rgba(255,255,255,.06); }
.client { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.1); box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
.nav a { transition: background-color .15s, color .15s; }
.nav a:hover { background: rgba(255,255,255,.06); }
.nav a.on { background: rgba(255,255,255,.1); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), inset 0 1px 0 rgba(255,255,255,.08); }
.btn { box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 6px 16px -8px rgba(31,91,255,.6); transition: background-color .15s, box-shadow .15s; }
.btn.quiet, .btn.danger, .btn:disabled { box-shadow: none; }
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .card, .inbox, .seg, .auth-card, .notif-menu, .acct-menu, .search-results {
    background: var(--glass); border-color: var(--glass-edge); box-shadow: inset 0 1px 0 var(--glass-hi), var(--glass-shadow);
    background-image: linear-gradient(180deg, var(--glass-catch), transparent 40%);
    -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%); }
  .notif-menu, .acct-menu, .search-results { background: var(--glass-strong); }
  .appbar { background: color-mix(in srgb, var(--bg) 70%, transparent); border-bottom-color: var(--glass-edge);
    -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%); }
  @media (max-width: 820px) {
    body .appbar { background: rgba(6,18,41,.9); }
    body .tabs { background: rgba(10,28,61,.92); border-top: 1px solid rgba(255,255,255,.08); -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%); }
  }
}
@media (prefers-reduced-transparency: reduce) {
  .card, .inbox, .seg, .auth-card, .notif-menu, .acct-menu, .search-results { background: var(--card); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .appbar { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; }
}

/* Labels on a case: internal chips; "Trader sees" marks the ones the trader may be told */
.labels { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--row); max-width: 520px; }
.labels h3 { font-size: 13px; font-weight: 600; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.labels h3 .hint, .case .labels .hint { margin: 0; font-weight: 400; }
.labels .chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.lab { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 500;
  background: color-mix(in srgb, var(--soft) 80%, transparent); border: 1px solid var(--line); }
.lab .eye { font-size: 11px; font-weight: 600; color: var(--blue); background: var(--blue-soft); border-radius: 999px; padding: 1px 7px; }
:root[data-theme="dark"] .lab .eye { color: var(--sky); }
.lab button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; width: 20px; height: 20px; border-radius: 50%; }
.lab button:hover { background: var(--line); color: var(--text); }
.addlab { display: flex; gap: 8px; align-items: center; }
.addlab select { min-height: 34px; padding: 5px 10px; max-width: 240px; }

/* Brand review 13 Nov: one glass surface for the inbox panes, demo pill in light, chip-row fade, tab bar clearance */
.views, .list, .row { border-color: var(--glass-edge, var(--line)); }
.row.on { background: rgba(31,91,255,.08); }
.banner.info .pill.info { background: rgba(31,91,255,.08); border: 1px solid rgba(31,91,255,.16); border-radius: 999px; padding: 2px 8px; }
@media (max-width: 820px) {
  .views { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); padding-right: 40px; }
  main { padding-bottom: calc(104px + env(safe-area-inset-bottom)) !important; }
}

/* Saved replies: pick, copy and log; what the trader was sent */
.replies .addlab select { max-width: 280px; }
.copybox { display: flex; gap: 12px; align-items: flex-start; margin-top: 10px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--glass-edge, var(--line));
  background: rgba(31,91,255,.06); }
.copybox p { flex: 1; margin: 0; white-space: pre-wrap; }
.sent { margin-top: 14px; display: flex; flex-direction: column; gap: 4px; }
.sent .vh { font-size: 12px; color: var(--muted); font-weight: 600; }
.sent details { border-top: 1px solid var(--row); padding: 8px 0; font-size: 13px; }
.sent summary { cursor: pointer; color: var(--muted); } .sent summary b { color: var(--text); font-weight: 600; }
.sent details p { margin: 6px 0 0; white-space: pre-wrap; }
.hint.clip { max-width: 520px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Trader panel: read-only CRM facts on the case */
.trader .kv { margin: 10px 0 4px; }
.trader .vh { display: block; font-size: 12px; color: var(--muted); font-weight: 600; margin: 14px 0 6px; }
.trader .acct { padding: 8px 0; border-top: 1px solid var(--row); font-size: 13px; }
.trader .acct .hint { margin: 2px 0 0; }
.trader .trade { font-size: 12px; color: var(--muted); margin-top: 3px; }
.trader .up { color: var(--green); } .trader .down { color: var(--red); }
.pays { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.pays li { padding: 6px 0; border-top: 1px solid var(--row); }
.pays li .hint { display: block; margin: 2px 0 0; }
.pays li.held { padding: 8px 10px; border: 1px solid rgba(242,179,91,.5); border-radius: 10px; background: rgba(242,179,91,.1); margin-bottom: 4px; }
.addlab .btn { white-space: nowrap; flex: none; } .addlab select { min-width: 0; flex: 1 1 auto; }
