/* Subro Genie: navy and gold from the logo, quiet surfaces, one accent at a time. */
:root {
  --navy: #0b2a5b; --navy-2: #13377a; --gold: #b5843f; --gold-soft: #f7efe2;
  --bg: #f5f6f8; --card: #fff; --ink: #18212f; --muted: #6a7482; --line: #e4e7ec; --line-2: #eef0f3;
  --green: #1f7a4d; --green-soft: #e6f4ec; --amber: #9a5b00; --amber-soft: #fff3df;
  --red: #b42318; --red-soft: #fdecea; --blue: #1f4fa3; --blue-soft: #e9effa; --violet: #6b3fa0; --violet-soft: #f1e9fb;
  --radius: 12px; --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
}
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.5 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
a { color: var(--blue); }
h1 { font-size: 24px; letter-spacing: -.01em; margin: 0 0 4px; }
h1 small { font-weight: 400; color: var(--muted); font-size: 16px; }
h2 { font-size: 18px; } h2 small { font-weight: 400; font-size: 14px; }
h3 { font-size: 15px; margin: 0 0 10px; } h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.muted { color: var(--muted); } .small { font-size: 12.5px; }

/* Layout: fixed sidebar + page */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.side { background: #fff; border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh; }
.logo img { width: 100%; max-width: 196px; display: block; margin: 0 auto 4px; }
.menu { display: flex; flex-direction: column; gap: 2px; }
.menu a { color: var(--ink); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 500; }
.menu a:hover { background: var(--line-2); }
.menu a.on { background: var(--navy); color: #fff; }
.who { margin-top: auto; display: flex; gap: 10px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); }
.who b { display: block; font-size: 13px; } .who span { display: block; color: var(--muted); font-size: 12px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--gold-soft); color: var(--gold); font-weight: 700; display: grid; place-items: center; flex: none; font-size: 13px; }
.mode { font-size: 12px; text-align: center; padding: 4px 10px; border-radius: 99px; background: var(--line-2); color: var(--muted); }
.mode.ai { background: var(--green-soft); color: var(--green); }
.page { min-width: 0; }
.banner { background: var(--gold-soft); color: #6d4a17; padding: 7px 28px; font-size: 12.5px; border-bottom: 1px solid #efdfc4; }
.error { background: var(--red-soft); color: var(--red); padding: 10px 28px; }
.notice { background: var(--green-soft); color: var(--green); padding: 10px 28px; }
main { max-width: 1320px; padding: 24px 28px 64px; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 12px 16px; gap: 10px; }
  .logo img { width: 140px; margin: 0; } .menu { flex-direction: row; flex-wrap: wrap; } .who { margin: 0; }
  main { padding: 16px; }
}

/* Buttons and inputs */
button, .button { background: var(--navy); color: #fff; border: 1px solid var(--navy); border-radius: 8px; padding: 8px 14px; font: inherit; font-weight: 500; cursor: pointer; text-decoration: none; display: inline-block; line-height: 1.3; }
button:hover, .button:hover { background: var(--navy-2); }
button.ghost, .button.ghost { background: #fff; color: var(--navy); border-color: var(--line); }
button.ghost:hover, .button.ghost:hover { border-color: var(--navy); background: #fff; }
.button.full { width: 100%; text-align: center; }
button.link { background: none; border: 0; color: var(--blue); text-decoration: underline; padding: 0; font-size: 12px; }
button:disabled { opacity: .6; cursor: wait; }
form.inline { display: inline; margin: 0; }
textarea, input, select { width: 100%; font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
textarea { font: 13px/1.5 ui-monospace, Menlo, Consolas, monospace; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue-soft); border-color: var(--blue); }
.row { display: flex; gap: 8px; margin-top: 8px; align-items: center; }
@media (max-width: 700px) { .row { flex-direction: column; align-items: stretch; } }

/* Page header + toolbar */
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.head p { margin: 2px 0 0; }
.head .actions { display: flex; gap: 8px; }
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 18px 0 12px; }
.toolbar select { width: auto; min-width: 210px; }
.seg { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 3px; flex-wrap: wrap; }
.seg a { padding: 5px 12px; border-radius: 7px; color: var(--muted); text-decoration: none; font-weight: 500; font-size: 13px; white-space: nowrap; }
.seg a:hover { color: var(--ink); }
.seg a.on { background: var(--navy); color: #fff; }
.seg .count { font-size: 11px; margin-left: 4px; opacity: .8; }

/* KPI cards */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.stats > div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.stats b { display: block; font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.stats span { color: var(--muted); font-size: 12.5px; display: block; }
.stats em { font-style: normal; font-size: 12px; color: var(--muted); display: block; margin-top: 2px; }
.stats .hot b, .stats em.hot { color: var(--red); }
.stats .gold b { color: var(--gold); }
.stats .venture b { color: var(--violet); }

/* Tables */
table.queue { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.queue th, .queue td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.queue tbody tr:last-child td { border-bottom: 0; }
.queue tbody tr:hover { background: #fafbfc; }
.queue th { background: #fafbfc; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; white-space: nowrap; }
.queue td a { font-weight: 600; text-decoration: none; }
.queue .sub { display: block; color: var(--muted); font-size: 12.5px; font-weight: 400; }
.nowrap { white-space: nowrap; }
.num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.hot { color: var(--red); font-weight: 700; }

/* Pills and tags */
.pill { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill.pursue, .pill.approved { background: var(--green-soft); color: var(--green); }
.pill.review, .pill.review_contributory { background: var(--amber-soft); color: var(--amber); }
.pill.no_subrogation, .pill.stage-open, .pill.stage-closed { background: var(--line-2); color: var(--muted); }
.pill.rejected { background: var(--red-soft); color: var(--red); }
.pill.route-venture_uninsured { background: var(--violet-soft); color: var(--violet); }
.pill.route-adjuster_carrier { background: var(--blue-soft); color: var(--blue); }
.pill.route-investigate { background: var(--amber-soft); color: var(--amber); }
.pill.stage-demand_sent, .pill.stage-negotiating { background: var(--blue-soft); color: var(--blue); }
.pill.stage-arbitration { background: var(--amber-soft); color: var(--amber); }
.pill.stage-paying { background: var(--green-soft); color: var(--green); }
.tag { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 99px; background: var(--amber-soft); color: var(--amber); white-space: nowrap; }
.tag.match { background: var(--green-soft); color: var(--green); } .tag.mismatch { background: var(--red-soft); color: var(--red); }
.tag.unverified { background: var(--amber-soft); color: var(--amber); }
.dl { font-size: 12.5px; font-weight: 600; padding: 2px 8px; border-radius: 6px; white-space: nowrap; display: inline-block; }
.dl.critical, .dl.expired { background: var(--red-soft); color: var(--red); }
.dl.warning { background: var(--amber-soft); color: var(--amber); }
.dl.ok { background: var(--green-soft); color: var(--green); }
.due { color: var(--red); font-weight: 600; }

/* Cards (claim page and others) */
.grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px; }
@media (max-width: 1000px) { .grid { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; box-shadow: var(--shadow); }
.card h2, .card h3 { margin-top: 0; }
.card.rec { border-top: 4px solid var(--muted); }
.card.rec.pursue { border-top-color: var(--green); }
.card.rec.review, .card.rec.review_contributory { border-top-color: var(--amber); }
.card.warn { border-top: 4px solid var(--red); background: #fffafa; }
.card.live, .card.assign { border-top: 4px solid var(--blue); }
.card.details { border-top: 4px solid var(--navy); }
.card.trail { border-top: 4px solid var(--gold); }
.card.trail h3 { display: flex; gap: 10px; align-items: center; }
.card.live form { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.card.assign select, .card.trail select { flex: 1; }
.claimhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.claimhead .facts { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 13px; margin-top: 6px; }
.claimhead .facts b { color: var(--ink); font-weight: 600; }
.back { display: inline-block; margin-bottom: 10px; color: var(--muted); text-decoration: none; font-size: 13px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; }
.kv span { color: var(--muted); }
.money { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin: 8px 0 12px; }
.money div { background: var(--bg); border-radius: 8px; padding: 8px 10px; }
.money span { display: block; color: var(--muted); font-size: 11.5px; }
ol.events { padding-left: 20px; } ol.events li { margin-bottom: 8px; }
.findings { padding-left: 18px; } .findings li { margin-bottom: 10px; }
.findings li.unsupported > div { color: var(--muted); }
blockquote { margin: 6px 0; padding: 6px 10px; border-left: 3px solid var(--line); background: var(--bg); font-size: 13px; border-radius: 0 6px 6px 0; }
blockquote.ok { border-color: var(--green); } blockquote.bad { border-color: var(--red); text-decoration: line-through; }
cite { display: block; font-size: 11.5px; color: var(--muted); font-style: normal; }
.dmg { width: 100%; } .dmg td { padding: 4px 0; } .dmg .total td { font-weight: 700; border-top: 1px solid var(--line); }
pre { white-space: pre-wrap; font: 12.5px/1.5 ui-monospace, Menlo, Consolas, monospace; }
pre.letter { background: var(--bg); padding: 12px; border-radius: 8px; }
.docs details { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 10px; }
.docs summary { cursor: pointer; }
table.codes { width: 100%; border-collapse: collapse; font-size: 13px; }
table.codes td, table.codes th { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.faultbar { display: flex; height: 22px; border-radius: 6px; overflow: hidden; font-size: 12px; color: #fff; margin: 6px 0; }
.faultbar span { display: flex; align-items: center; justify-content: center; }
.faultbar .adv { background: var(--navy); } .faultbar .ins { background: var(--gold); }
ol.plan li { margin-bottom: 6px; }

/* Upload, sign-in, misc */
.upload label { display: flex; flex-direction: column; gap: 4px; flex: 1; margin-bottom: 10px; font-size: 13px; }
.upload input[type=file] { border: 1px dashed var(--line); padding: 14px; }
.card.details label { display: flex; flex-direction: column; gap: 4px; flex: 1; font-size: 13px; }
.card.details .pay input:first-child, .upload .pay input:first-child { flex: 2; }
.card.details .pay input:last-child, .upload .pay input:last-child { flex: 1; }
details.extra { margin: 6px 0 14px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; }
details.extra summary { cursor: pointer; color: var(--blue); }
ul.samples { columns: 2; padding-left: 18px; }
.sampleset { flex: 1; } .sampleset ul { padding-left: 18px; margin: 6px 0; }
.team { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.card.member h3 { margin-bottom: 2px; }
.tablewrap { overflow-x: auto; border-radius: var(--radius); }
.pill[class*="route-"] { white-space: normal; line-height: 1.35; padding: 3px 10px; }
td.stack .pill { display: table; margin: 2px 0; }
td.stack .pill[class*="route-"] { white-space: nowrap; }
@media (max-width: 700px) { .stats { grid-template-columns: 1fr 1fr; } .head .actions { width: 100%; } }
button.full { width: 100%; }
.card.member { display: flex; flex-direction: column; }
.card.member button { margin-top: auto; }
details.card summary { cursor: pointer; }
code { font: 12.5px ui-monospace, Menlo, Consolas, monospace; background: var(--line-2); padding: 1px 6px; border-radius: 4px; }
.mode.warn { background: var(--amber-soft); color: var(--amber); }
a.mode { text-decoration: none; display: block; }
.report { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); max-width: 1000px; }
.report h2 { margin-top: 26px; }
.report-head { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 18px; margin-bottom: 18px; }
.report-head img { width: 220px; }
.report-head p { margin: 4px 0 0; }
ul.facts { padding-left: 18px; } ul.facts li { margin-bottom: 4px; }
tr.total td { background: var(--bg); }
@media print {
  .side, .banner, .noprint, .notice, .error { display: none !important; }
  .shell { display: block; } main { padding: 0; max-width: none; }
  .report { border: 0; box-shadow: none; padding: 0; }
  body { background: #fff; }
  a { color: inherit; text-decoration: none; }
}
.report .stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

/* ---- Look v2: navy sidebar, today panel, progress bars ---- */
.side { background: var(--navy); border-right: 0; color: #fff; }
.side .logo { background: #fff; border-radius: 12px; padding: 12px 10px; display: block; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.side .logo img { margin: 0 auto; }
.menu a { color: rgba(255, 255, 255, .78); transition: background .15s, color .15s; }
.menu a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.menu a.on { background: #fff; color: var(--navy); }
.side .who { border-color: rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .05); }
.side .who b { color: #fff; } .side .who span { color: rgba(255, 255, 255, .65); }
.side .who button.link { color: var(--gold-soft); }
.side .who .button.ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.side .who .button.ghost:hover { border-color: #fff; }
.side .avatar { background: var(--gold); color: #fff; }
.side .mode { background: rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .75); }
.side .mode.ai { background: rgba(95, 196, 146, .16); color: #9fe0bd; }
.side .mode.warn { background: rgba(240, 180, 92, .16); color: #f3c98a; }

.hero { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr); gap: 24px; background: var(--navy); color: #fff;
  border-radius: 16px; padding: 26px 28px; margin-bottom: 16px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%;
  background: rgba(181, 132, 63, .16); pointer-events: none; }
.hero h1 { color: #fff; font-size: 26px; margin: 4px 0 14px; text-wrap: balance; }
.hero .eyebrow { margin: 0; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: rgba(255, 255, 255, .65); font-weight: 600; }
.hero-sub { color: rgba(255, 255, 255, .75); margin: 0; }
ul.today { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
ul.today a { display: grid; grid-template-columns: 84px 1fr auto; gap: 12px; align-items: center; padding: 9px 12px; border-radius: 10px;
  background: rgba(255, 255, 255, .07); color: #fff; text-decoration: none; transition: background .15s; }
ul.today a:hover { background: rgba(255, 255, 255, .14); }
ul.today b { font-weight: 700; } ul.today span { color: rgba(255, 255, 255, .85); font-size: 13px; }
ul.today em { font-style: normal; font-size: 12px; color: var(--gold-soft); white-space: nowrap; }
ul.today li b::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; background: #9fb3d9; }
ul.today li.t-critical b::before { background: #f28b82; }
ul.today li.t-followup b::before { background: #f3c98a; }
ul.today li.t-venture b::before { background: #c3a3ef; }
ul.today li.t-letter b::before { background: #9fe0bd; }
.hero-money { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); border-radius: 12px; padding: 18px; position: relative; z-index: 1;
  display: flex; flex-direction: column; gap: 6px; align-self: start; }
.hero-money span { font-size: 12.5px; color: rgba(255, 255, 255, .7); }
.hero-money b { font-size: 32px; letter-spacing: -.02em; color: #e0b670; }
.hero-money small { font-size: 12px; color: rgba(255, 255, 255, .7); }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.bar { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), #e0b670); border-radius: 99px; min-width: 2px; }
.bar.light { background: var(--line-2); margin: 4px 0 2px; }
.button.gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.button.gold:hover { background: #a2742f; }
button.ghost-light { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .35); }
button.ghost-light:hover { background: rgba(255, 255, 255, .08); border-color: #fff; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; padding: 20px; } ul.today a { grid-template-columns: 1fr; gap: 2px; } }

.stats > div { transition: transform .15s, box-shadow .15s; }
.stats > div:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(16, 24, 40, .08); }
.queue tbody tr.urgent { background: #fff8f7; }
.queue tbody tr.urgent:hover { background: #fdf0ee; }
.queue tbody tr { transition: background .12s; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } .stats > div:hover { transform: none; } }
@media print { .hero { display: none; } }

/* Carriers page: one card per carrier */
.carrier-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; }
@media (max-width: 500px) { .carrier-grid { grid-template-columns: 1fr; } }
.carrier-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.carrier-card.is-live { border-top: 4px solid var(--gold); }
.carrier-card header { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.carrier-card h2 { font-size: 17px; margin: 0; text-wrap: balance; }
.carrier-card h2 a { color: var(--navy); text-decoration: none; }
.carrier-card h2 a:hover { text-decoration: underline; }
.carrier-card header p { margin: 4px 0 0; }
.carrier-card .badges { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.carrier-card .fee { font-size: 12px; font-weight: 600; color: var(--muted); }
dl.mini { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0; }
dl.mini div { background: var(--bg); border-radius: 8px; padding: 8px 10px; }
dl.mini dt { font-size: 11px; color: var(--muted); }
dl.mini dd { margin: 2px 0 0; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
dl.mini .hot dd { color: var(--red); }
.carrier-money { display: flex; justify-content: space-between; gap: 12px; }
.carrier-money span { display: block; font-size: 11.5px; color: var(--muted); }
.carrier-money b { font-size: 16px; font-variant-numeric: tabular-nums; }
.carrier-money div:first-child b { color: var(--gold-ink); }
.carrier-card footer { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
@media (max-width: 420px) { dl.mini { grid-template-columns: repeat(2, 1fr); } }
.carrier-card .badges { flex-direction: row; align-items: center; gap: 10px; }

/* Sidebar sign-in: a plain button, no box around it */
.side .signin-side { margin-top: auto; text-align: center; background: var(--gold); border-color: var(--gold); color: #fff; }
.side .signin-side:hover { background: #a2742f; border-color: #a2742f; }
/* Sign-in page: 2 x 2, or 4 across when there's room */
.team { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1500px) { .team { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 640px) { .team { grid-template-columns: 1fr; } }
.card.member p { margin: 4px 0; }
.card.member button { margin-top: 14px; }
#work { scroll-margin-top: 16px; }
#work-area { min-height: calc(100vh - 24px); }  /* short lists don't shrink the page and shift the filter bar */
#work-area.loading .tablewrap { opacity: .55; transition: opacity .1s; }

/* Overview */
.hero.slim { padding: 22px 26px; }
.hero.slim h1 { margin-bottom: 16px; }
a.stat { text-decoration: none; color: inherit; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
a.stat:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(16, 24, 40, .08); }
a.stat.hot b { color: var(--red); }
.ov-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; }
@media (max-width: 1000px) { .ov-grid { grid-template-columns: 1fr; } }
.ov-grid .card, .ov-grid + .card { margin-bottom: 0; }
.ov-grid + .card { margin-top: 16px; }
ul.today-list, ul.carrier-list, ul.activity { list-style: none; padding: 0; margin: 0 0 10px; }
ul.today-list a { display: grid; grid-template-columns: 90px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-2); text-decoration: none; color: var(--ink); }
ul.today-list li:last-child a { border-bottom: 0; }
ul.today-list b::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; background: var(--muted); }
ul.today-list .t-critical b::before { background: var(--red); }
ul.today-list .t-followup b::before { background: var(--amber); }
ul.today-list .t-venture b::before { background: var(--violet); }
ul.today-list .t-letter b::before { background: var(--green); }
ul.today-list b { color: var(--blue); }
ul.carrier-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
ul.carrier-list li:last-child { border-bottom: 0; }
ul.carrier-list a { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; }
ul.activity li { display: grid; grid-template-columns: 110px 1fr; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; }
ul.activity li:last-child { border-bottom: 0; }
ul.activity .when { color: var(--muted); }
a.more { font-size: 13px; font-weight: 600; text-decoration: none; }

/* Next step in the work queue */
.next { font-weight: 600; font-size: 13px; }
.next.bad { color: var(--red); } .next.warn { color: var(--amber); } .next.info { color: var(--blue); } .next.muted { color: var(--muted); font-weight: 500; }

/* Sidebar fits short or zoomed-in screens: tighter, and scrolls if it still doesn't fit */
.side { overflow-y: auto; gap: 12px; padding: 16px 12px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .25) transparent; }
.side .logo { padding: 8px; }
.side .logo img { max-width: 168px; }
.menu { gap: 1px; }
.menu a { padding: 7px 12px; }
.side .who { padding: 10px; }
.side .mode { font-size: 11.5px; padding: 3px 8px; }
@media (max-height: 760px) and (min-width: 901px) {
  .side { gap: 8px; }
  .side .logo img { max-width: 140px; }
  .menu a { padding: 6px 10px; font-size: 13.5px; }
}

/* Logo at full sidebar width so the name and tagline are readable */
.shell { grid-template-columns: 252px minmax(0, 1fr); }
.side .logo { padding: 10px 8px; }
.side .logo img { width: 100%; max-width: none; }
@media (max-height: 760px) and (min-width: 901px) {
  .side .logo img { max-width: none; }
  .side .logo { padding: 8px 6px; }
}
@media (max-width: 900px) { .side .logo img { width: 180px; } }

/* Compact brand mark in the sidebar: the lamp on a white tile, the name set large */
.brandmark { display: flex; align-items: center; gap: 12px; text-decoration: none; padding: 4px 4px 8px; }
.brandmark .lamp { width: 52px; height: 52px; flex: none; background: #fff; border-radius: 12px; display: grid; place-items: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .2); }
.brandmark .lamp img { width: 42px; height: auto; display: block; }
.brandmark .word { font-size: 25px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; white-space: nowrap; }
.brandmark .w1 { color: #fff; }
.brandmark .w2 { color: #e0b670; }
.signin-logo { width: 300px; max-width: 100%; display: block; margin: 4px 0 18px; }
@media (max-width: 900px) { .brandmark .lamp { width: 40px; height: 40px; } .brandmark .lamp img { width: 32px; } .brandmark .word { font-size: 20px; } }
@media (max-width: 900px) { .shell { grid-template-columns: 1fr; } }  /* phones: sidebar on top, page full width */

/* Sidebar mark: the reversed lamp straight on navy, no white tile */
.brandmark .lamp-rev { width: 58px; height: auto; flex: none; display: block; }
@media (max-width: 900px) { .brandmark .lamp-rev { width: 44px; } }

/* Sidebar contents: one column on desktop */
.side-body { display: flex; flex-direction: column; gap: 12px; flex: 1; min-height: 0; }
.menu-toggle { display: none; }

/* Phones: a slim top bar with the mark and a Menu button; the menu opens below it */
@media (max-width: 900px) {
  .side { position: sticky; top: 0; z-index: 20; flex-direction: row; flex-wrap: wrap; align-items: center;
    justify-content: space-between; gap: 0; padding: 10px 16px; overflow: visible; height: auto; }
  .brandmark { padding: 0; }
  .menu-toggle { display: inline-block; background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .35);
    padding: 7px 14px; border-radius: 8px; font-weight: 600; }
  .side-body { flex-basis: 100%; gap: 10px; padding-top: 12px; }
  .side.js .side-body { display: none; }          /* closed until Menu is tapped (always open without JavaScript) */
  .side.js.open .side-body { display: flex; }
  .side .menu { flex-direction: column; gap: 2px; }
  .side .menu a { padding: 11px 12px; font-size: 16px; }
  .side .who, .side .signin-side { margin-top: 6px; }
  .side .mode { align-self: flex-start; }
}

/* Phones: table rows become cards, each cell labeled with its column heading */
@media (max-width: 640px) {
  table.cards thead { display: none; }
  table.cards, table.cards tbody, table.cards tr, table.cards td { display: block; width: 100%; }
  table.cards { border-radius: var(--radius); }
  .tablewrap:has(table.cards) { overflow-x: visible; }
  table.cards tbody tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  table.cards tbody tr:last-child { border-bottom: 0; }
  table.cards td { border: 0; padding: 3px 0; display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; text-align: right; }
  table.cards td[data-label]::before { content: attr(data-label); flex: none; max-width: 42%; text-align: left;
    font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding-top: 2px; }
  table.cards td:first-child { display: block; text-align: left; font-size: 15px; padding-bottom: 6px; }
  table.cards td:first-child::before { display: none; }
  table.cards td.num { text-align: right; }
  table.cards td > * { max-width: 100%; }
  table.cards td.stack { flex-direction: column; align-items: flex-end; }
  table.cards td.stack::before { align-self: flex-start; }
  table.cards td .sub { display: block; }
  table.cards td.small, table.cards td:not(.num):not(.stack) { overflow-wrap: anywhere; }
  table.cards tr.total td { display: flex; }
}
@media (max-width: 640px) {
  /* label on the left; the value and its sub-lines stacked on the right */
  table.cards td[data-label] { display: grid; grid-template-columns: minmax(84px, 38%) 1fr; column-gap: 12px; row-gap: 3px; align-items: start; }
  table.cards td[data-label]::before { grid-column: 1; grid-row: 1 / span 4; max-width: none; }
  table.cards td[data-label] > * { grid-column: 2; justify-self: end; text-align: right; }
  table.cards td[data-label] > .pill { margin: 0; }
  table.cards td.stack { flex-direction: row; }
  table.cards td .sub { display: block; margin-top: 0; }
  table.cards td:first-child { padding-bottom: 8px; }
  table.cards td:first-child a { font-size: 16px; }
}
@media (max-width: 640px) {
  table.cards .pill, table.cards td.stack .pill[class*="route-"] { white-space: normal; text-align: left; }
  table.cards td:first-child { display: block; text-align: left; }
}

/* Sign-in, 2FA code and account setup */
.auth { max-width: 440px; }
.auth label { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; font-size: 13px; }
.auth input { font-size: 15px; }
.auth .code { letter-spacing: 4px; font-size: 20px; text-align: center; }
.setup-key { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 17px; letter-spacing: 1px;
  background: var(--blue-soft); padding: 10px 12px; border-radius: 8px; word-break: break-all; }
.auth ol { padding-left: 20px; }
.auth ol li { margin-bottom: 8px; }
.error-text { background: var(--red-soft); color: var(--red); padding: 8px 10px; border-radius: 8px; font-size: 13.5px; }
.auth.wide, .card.wide { max-width: 640px; }
.auth fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 0 0 12px; }
.auth legend { font-size: 13px; font-weight: 600; padding: 0 4px; }
.auth label.choice { flex-direction: row; align-items: flex-start; gap: 8px; margin-bottom: 8px; font-size: 14px; }
.auth label.choice input { margin-top: 3px; flex: none; }
button.danger { background: var(--red); border-color: var(--red); color: #fff; }
tr.muted td { color: var(--muted); }
.auth label.choice, .card.details.auth label.choice { display: flex; flex-direction: row; align-items: flex-start; }
.auth label.choice input[type=radio], .auth label.choice input[type=checkbox] { width: auto; min-width: 0; flex: 0 0 auto; padding: 0; }
.auth label.choice > span { flex: 1 1 auto; min-width: 0; }
