/* Quickvee Outreach: "Clean" design
   Light canvas, white rounded cards with soft shadows, coloured icon tiles, one blue accent.
   Type: Manrope, self-hosted. Sidebar on wide screens; header plus bottom tab bar on phones. */

@font-face { font-family: "Manrope"; src: url("/static/fonts/manrope-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("/static/fonts/manrope-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("/static/fonts/manrope-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("/static/fonts/manrope-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --bg: #f5f6fa; --card: #ffffff;
  --ink: #12162b; --ink-2: #4f5674; --ink-3: #7b83a0;
  --line: #e9ecf3; --line-2: #f1f3f8; --field: #f5f6fa;
  --brand: #2f54eb; --brand-dark: #2343c9; --brand-tint: #e8edff;
  --amber: #b45f04; --amber-tint: #fff1d6;
  --green: #0a7f55; --green-tint: #dcf7ea;
  --rose: #cf1743; --rose-tint: #ffe4e9;
  --violet: #6d3bd6; --violet-tint: #efe8ff;
  --slate-tint: #eef0f6;
  --shadow: 0 6px 20px rgba(18, 22, 43, 0.055);
  --shadow-lg: 0 16px 40px rgba(18, 22, 43, 0.12);
  --r-lg: 22px; --r: 16px; --r-sm: 12px;
  --side: 256px;
  --font: "Manrope", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 500 15px/1.55 var(--font); color: var(--ink); background: var(--bg); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; font-weight: 600; }
a:hover { text-decoration: underline; }
h1 { font-size: 28px; line-height: 1.2; font-weight: 800; margin: 0; letter-spacing: -0.02em; }
h2 { font-size: 17px; line-height: 1.3; font-weight: 800; margin: 0 0 14px; letter-spacing: -0.01em; }
p { margin: 0 0 12px; }
b, strong { font-weight: 700; }
.icon { flex: none; vertical-align: -4px; }
:focus-visible { outline: 3px solid #9fb2ff; outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

/* ---------- shell ---------- */
.side { position: fixed; inset: 0 auto 0 0; width: var(--side); background: var(--card); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 22px 16px; z-index: 20; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); font-weight: 800; font-size: 17px; letter-spacing: -0.01em; padding: 2px 8px 22px; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 36px; height: 36px; border-radius: 12px; background: linear-gradient(140deg, #4a6cff, #2343c9); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 17px; flex: none; box-shadow: 0 6px 14px rgba(47, 84, 235, 0.32); }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 14px; color: var(--ink-2); font-weight: 700; }
.nav a:hover { background: var(--line-2); color: var(--ink); text-decoration: none; }
.nav a.on { background: var(--brand-tint); color: var(--brand); }
.nav .count { margin-left: auto; background: var(--brand); color: #fff; border-radius: 999px; font-size: 12px; font-weight: 800; padding: 0 8px; line-height: 21px; }
.side-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 14px; }
.me { display: flex; align-items: center; gap: 10px; padding: 0 6px 10px; min-width: 0; }
.me .who { font-size: 13px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 14px; background: none; color: var(--ink-2); font: 700 15px var(--font); cursor: pointer; text-align: left; }
.side-foot button:hover { background: var(--line-2); color: var(--ink); }

.topbar, .tabbar { display: none; }
main { margin-left: var(--side); padding: 34px 40px 56px; max-width: calc(var(--side) + 1200px); }
body.bare { display: grid; min-height: 100vh; place-items: center; background: radial-gradient(900px 500px at 50% -10%, #dfe6ff 0%, var(--bg) 60%); }
body.bare main { margin: 0; width: 100%; max-width: 440px; padding: 28px 20px; }
body.bare .card { padding: 28px; box-shadow: var(--shadow-lg); }

.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.pagehead .sub { color: var(--ink-3); margin: 5px 0 0; }
.pagehead .tools { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- surfaces ---------- */
.card { background: var(--card); border-radius: var(--r-lg); padding: 22px; margin-bottom: 16px; box-shadow: var(--shadow); }
.card.flush { padding: 0; overflow: hidden; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; margin-bottom: 16px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); }
.grid > *, .dash > *, .cols2 > * { min-width: 0; }
.grid > .card, .col > .card:last-child { margin-bottom: 0; }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; margin-bottom: 16px; }
.col { min-width: 0; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.empty { text-align: center; padding: 44px 20px; color: var(--ink-3); }
.empty .ic { margin: 0 auto 12px; }
.empty b { display: block; color: var(--ink); font-size: 17px; font-weight: 800; margin-bottom: 4px; }

/* icon tiles and avatars */
.ic { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; flex: none; background: var(--brand-tint); color: var(--brand); }
.ic.amber { background: var(--amber-tint); color: var(--amber); }
.ic.green { background: var(--green-tint); color: var(--green); }
.ic.rose { background: var(--rose-tint); color: var(--rose); }
.ic.violet { background: var(--violet-tint); color: var(--violet); }
.ic.slate { background: var(--slate-tint); color: var(--ink-2); }
.avatar { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; flex: none; font-weight: 800; font-size: 16px; }
.avatar.round { border-radius: 50%; background: var(--ink); color: #fff; }
.av1 { background: var(--brand-tint); color: var(--brand); } .av2 { background: var(--amber-tint); color: var(--amber); }
.av3 { background: var(--green-tint); color: var(--green); } .av4 { background: var(--rose-tint); color: var(--rose); }
.av5 { background: var(--violet-tint); color: var(--violet); } .av6 { background: #dff3fb; color: #0a6a8f; }

/* ---------- dashboard ---------- */
.hello { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.hello .date { color: var(--ink-3); font-size: 14px; }
.dash { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.dash > .card { margin: 0; }
.hero { display: flex; gap: 22px; align-items: center; }
.ring { position: relative; width: 116px; height: 116px; flex: none; }
.ring svg { display: block; width: 100%; height: 100%; }
.ring span { position: absolute; inset: 0; display: grid; place-content: center; font-size: 12px; font-weight: 700; color: var(--ink-3); text-align: center; line-height: 1.25; }
.ring span b { display: block; font-size: 22px; font-weight: 800; color: var(--ink); }
.hero .big { font-size: 60px; line-height: 1; font-weight: 800; letter-spacing: -0.04em; color: var(--brand); }
.hero .cap { color: var(--ink-3); margin: 6px 0 14px; }
.tiles3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-content: stretch; }
.stat { background: var(--card); border-radius: 20px; padding: 16px; box-shadow: var(--shadow); color: var(--ink); display: block; transition: transform 0.12s, box-shadow 0.12s; }
.stat:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 10px 26px rgba(18, 22, 43, 0.09); }
.stat b { display: block; font-size: 28px; line-height: 1.1; font-weight: 800; margin-top: 12px; letter-spacing: -0.02em; }
.stat span { color: var(--ink-3); font-size: 13.5px; font-weight: 600; }
.bars { display: grid; gap: 12px; }
.bar { display: grid; grid-template-columns: 150px minmax(0, 1fr) 44px; gap: 12px; align-items: center; color: var(--ink-2); }
.bar a { color: var(--ink-2); font-weight: 600; }
.bar .track { height: 10px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.bar .fill { height: 100%; border-radius: 99px; background: var(--brand); min-width: 6px; }
.bar b { text-align: right; color: var(--ink); font-weight: 800; }
.fill.amber { background: #f59e0b; } .fill.green { background: #10b981; } .fill.rose { background: #f43f5e; } .fill.slate { background: #a3abc0; } .fill.violet { background: #8b5cf6; }
.nextup { display: flex; align-items: center; gap: 14px; }
.nextup .t { min-width: 0; flex: 1; }
.nextup .t b { display: block; font-size: 16px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nextup .t span { color: var(--ink-3); font-size: 13.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list { display: grid; }
.list { min-width: 0; }
.list > * { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line-2); color: var(--ink); min-width: 0; }
.list > *:first-child { border-top: 0; padding-top: 0; }
.list > *:last-child { padding-bottom: 0; }
.list .t { flex: 1; min-width: 0; }
.list .t b { display: block; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .t span { color: var(--ink-3); font-size: 13px; font-weight: 500; }
.list .end { color: var(--ink-3); font-size: 13px; font-weight: 600; white-space: nowrap; }
.list .avatar, .list .ic { width: 36px; height: 36px; border-radius: 12px; font-size: 14px; }
a.list-row:hover { text-decoration: none; }
a.list-row:hover .t b { color: var(--brand); }

/* ---------- tables ---------- */
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 16px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fafbfe; }
th { font-size: 13px; font-weight: 700; color: var(--ink-3); border-bottom: 1px solid var(--line); white-space: nowrap; padding-top: 16px; }
table.plain td { padding: 9px 0; }
table.plain tr:hover td { background: none; }
table.plain td:last-child { text-align: right; }
table.kv td:first-child { color: var(--ink-3); width: 42%; }
td .co { display: flex; align-items: center; gap: 12px; min-width: 0; }
td .co .avatar { width: 36px; height: 36px; border-radius: 12px; font-size: 14px; }
td .co a { color: var(--ink); font-weight: 700; }
td .co small { display: block; color: var(--ink-3); font-weight: 500; font-size: 13px; }

/* ---------- pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; background: var(--slate-tint); color: var(--ink-2); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.pill.hot { background: var(--amber-tint); color: var(--amber); }
.pill.ok { background: var(--green-tint); color: var(--green); }
.pill.bad { background: var(--rose-tint); color: var(--rose); }
.pill.brand { background: var(--brand-tint); color: var(--brand); }
.pills, .statline { display: flex; flex-wrap: wrap; gap: 6px; }
.statline { margin-bottom: 12px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #c3c9d9; flex: none; margin: 0 4px; }
.dot.on { background: #10b981; box-shadow: 0 0 0 4px var(--green-tint); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); font: 700 15px/1.2 var(--font); cursor: pointer; white-space: nowrap; text-decoration: none; transition: background 0.12s, box-shadow 0.12s, transform 0.06s; }
.btn:hover { background: var(--line-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 8px 18px rgba(47, 84, 235, 0.28); }
.btn.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn.danger { color: var(--rose); }
.btn.danger:hover { background: var(--rose-tint); border-color: #ffc9d4; }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: 14px; border-radius: 11px; }
.btn.block { width: 100%; }
.btn[disabled], .btn.busy { opacity: 0.5; cursor: not-allowed; pointer-events: none; box-shadow: none; }
.seg { display: inline-flex; background: var(--card); border-radius: 14px; padding: 4px; box-shadow: var(--shadow); }
.seg a { padding: 8px 16px; border-radius: 11px; color: var(--ink-2); font-weight: 700; white-space: nowrap; min-height: 36px; display: inline-flex; align-items: center; justify-content: center; }
.seg a:hover { text-decoration: none; color: var(--ink); }
.seg a.on { background: var(--ink); color: #fff; }
.linkbtn { background: none; border: 0; padding: 6px 0; color: var(--brand); font: 700 14px var(--font); cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }
.btnrow { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- forms ---------- */
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=file], input:not([type]), select, textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); font: 500 15px/1.4 var(--font);
}
select { appearance: none; -webkit-appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234f5674' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
input[type=file] { padding: 9px 12px; }
textarea { resize: vertical; line-height: 1.55; }
input::placeholder, textarea::placeholder { color: #9aa1b8; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-tint); }
label { display: block; font-size: 14px; font-weight: 700; color: var(--ink-2); }
label > input, label > select, label > textarea { margin-top: 6px; }
.stack > * + * { margin-top: 16px; }
.stack > p { margin-bottom: 0; }
.stack > input[type=hidden] + * { margin-top: 0; }
.fields { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
label.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; color: var(--ink); font-size: 15px; cursor: pointer; }
label.check input { appearance: none; -webkit-appearance: none; width: 44px; height: 26px; min-height: 0; margin: 0; padding: 0; flex: none; border: 0; border-radius: 99px; background: #cfd4e2; position: relative; cursor: pointer; transition: background 0.15s; box-shadow: none; }
label.check input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(18, 22, 43, 0.25); transition: transform 0.15s; }
label.check input:checked { background: var(--brand); }
label.check input:checked::after { transform: translateX(18px); }
label.check input:focus-visible { outline: 3px solid #9fb2ff; outline-offset: 2px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.filters input[name=q] { flex: 1 1 260px; width: auto; }
.filters select { width: auto; flex: 0 1 auto; }
.hint { font-size: 13px; color: var(--ink-3); font-weight: 500; }

/* ---------- messages ---------- */
.flash { display: flex; gap: 10px; align-items: flex-start; background: var(--green-tint); color: var(--green); border-radius: var(--r); padding: 13px 16px; margin-bottom: 16px; font-weight: 700; }
.flash.err { background: var(--rose-tint); color: var(--rose); }
.notice { display: flex; gap: 10px; align-items: flex-start; background: var(--brand-tint); color: var(--brand-dark); border-radius: var(--r); padding: 12px 16px; margin-bottom: 16px; font-weight: 600; }
.note { background: var(--amber-tint); color: #7d4303; border-radius: var(--r-sm); padding: 10px 14px; margin: 12px 0 0; font-size: 14px; font-weight: 600; }

/* ---------- an email, as it will be sent ---------- */
.mail { padding: 0; overflow: hidden; }
.mail-head { display: flex; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; align-items: center; padding: 18px 22px 14px; }
.mail-head .who { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1 1 260px; }
.mail-head .who .t { min-width: 0; }
.mail-head .who .t a, .mail-head .who .t > b { font-weight: 800; color: var(--ink); font-size: 17px; letter-spacing: -0.01em; display: block; overflow-wrap: anywhere; }
.mail-head .who .t small { color: var(--ink-3); font-size: 13px; font-weight: 500; display: block; }
.mail-body { margin: 0 22px; padding: 4px 16px; background: var(--field); border-radius: var(--r); }
.mrow { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.mrow.top { align-items: start; }
.mail-body > :last-child { border-bottom: 0; }
.mrow > .k { color: var(--ink-3); font-size: 13px; font-weight: 700; }
.mrow > .v { overflow-wrap: anywhere; min-width: 0; }
.mrow > .v.strong { font-weight: 700; }
pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 500 15px/1.6 var(--font); }
.mail-foot { padding: 16px 22px 20px; }
.mail-foot form { display: inline; }
.mail > .note { margin: 12px 22px 0; }
details.more { margin-top: 6px; }
details.more > summary { cursor: pointer; color: var(--ink-3); font-weight: 700; font-size: 14px; list-style: none; display: inline-block; padding: 10px 0; }
details.more > summary:hover { color: var(--brand); }
details.more > summary::-webkit-details-marker { display: none; }
.outcomes { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); padding-top: 4px; }
.outcomes form { display: flex; gap: 8px; }
.outcomes input { min-width: 0; }
details.fold { border-bottom: 1px solid var(--line); }
details.fold > summary { cursor: pointer; font-weight: 700; padding: 13px 0; list-style: none; display: flex; align-items: center; gap: 8px; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::before { content: ""; width: 8px; height: 8px; border-right: 2.4px solid var(--ink-3); border-bottom: 2.4px solid var(--ink-3); transform: rotate(-45deg); transition: transform 0.15s; flex: none; margin: 0 6px 0 2px; }
details.fold[open] > summary::before { transform: rotate(45deg); }
details.fold > pre { margin: 0 0 16px; color: var(--ink-2); }
.card > details.fold:last-of-type { border-bottom: 0; }

/* ---------- small things ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { background: var(--card); border-radius: 20px; padding: 16px 18px; box-shadow: var(--shadow); }
.tile b { display: block; font-size: 28px; line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; }
.tile span { color: var(--ink-3); font-size: 13.5px; font-weight: 600; }
.tile.strong { background: var(--brand); color: #fff; box-shadow: 0 12px 26px rgba(47, 84, 235, 0.3); }
.tile.strong span { color: #dbe3ff; }
.err-text { color: var(--rose); }
.only-phone { display: none; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ---------- phones and small tablets ---------- */
@media (max-width: 1080px) { .dash { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .side { display: none; }
  main { margin-left: 0; padding: 14px 16px calc(104px + env(safe-area-inset-bottom)); max-width: none; }
  .topbar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 20; background: rgba(245, 246, 250, 0.9); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); padding: calc(10px + env(safe-area-inset-top)) 16px 10px; }
  .topbar .brand { padding: 0; font-size: 16px; flex: 1; min-width: 0; }
  .topbar .brand-mark { width: 34px; height: 34px; border-radius: 11px; font-size: 16px; }
  .topbar details { position: relative; }
  .topbar summary { list-style: none; cursor: pointer; display: block; border-radius: 50%; }
  .topbar summary::-webkit-details-marker { display: none; }
  .topbar .menu { position: absolute; right: 0; top: 52px; width: 244px; background: var(--card); border-radius: 20px; padding: 8px; box-shadow: var(--shadow-lg); }
  .topbar .menu a, .topbar .menu button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border: 0; background: none; color: var(--ink); font: 700 15px var(--font); border-radius: 12px; text-align: left; cursor: pointer; }
  .topbar .menu a:hover, .topbar .menu button:hover { background: var(--line-2); text-decoration: none; }
  .topbar .menu .who { padding: 10px 12px; font-size: 13px; color: var(--ink-3); border-bottom: 1px solid var(--line-2); margin-bottom: 6px; overflow-wrap: anywhere; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--card); border-top: 1px solid var(--line); padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 24px rgba(18, 22, 43, 0.05); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; color: #8088a2; font-size: 11.5px; font-weight: 700; border-radius: 12px; position: relative; min-width: 0; min-height: 50px; justify-content: center; }
  .tabbar a:hover { text-decoration: none; }
  .tabbar a.on { color: var(--brand); }
  .tabbar .count { position: absolute; top: 0; left: calc(50% + 5px); background: var(--rose); color: #fff; border-radius: 999px; font-size: 10.5px; font-weight: 800; padding: 0 5px; line-height: 17px; min-width: 17px; text-align: center; border: 2px solid var(--card); box-sizing: content-box; }
  h1 { font-size: 24px; }
  .pagehead { margin-bottom: 16px; align-items: flex-start; }
  .card { padding: 18px; border-radius: 20px; }
  .hero { gap: 16px; }
  .ring { width: 96px; height: 96px; }
  .hero .big { font-size: 52px; }
  .stat { padding: 14px; border-radius: 18px; }
  .stat b { font-size: 24px; }
  .bar { grid-template-columns: 112px minmax(0, 1fr) 36px; gap: 10px; font-size: 14px; }
  .grid, .grid.two, .cols2 { grid-template-columns: 1fr; }
  input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input:not([type]), select, textarea { min-height: 48px; font-size: 16px; }
  .mail-head { padding: 16px 18px 12px; }
  .mail-body { margin: 0 14px; padding: 2px 14px; }
  .mail-foot { padding: 14px 18px 18px; }
  .mail > .note { margin: 12px 14px 0; }
  .mrow, .mrow.top { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; align-items: center; }
  .mrow > .k { grid-column: 1; grid-row: 1; }
  .mrow > .btn, .mrow > span:last-child { grid-column: 2; grid-row: 1; }
  .mrow > .v { grid-column: 1 / -1; grid-row: 2; }
  .mail-foot .btnrow .btn { flex: 1 1 150px; }
  .outcomes { grid-template-columns: 1fr; }
  .filters > * { flex: 1 1 100%; }
  .filters select, .filters input[name=q] { width: 100%; }
  .filters .btn { flex: 1 1 auto; }
  .seg { display: flex; width: 100%; }
  .seg a { flex: 1; text-align: center; padding: 10px 8px; min-height: 40px; }
  .pagehead .tools { width: 100%; }
  th.wide, td.wide { display: none; }
  th, td { padding: 12px 14px; }
  td .pill { white-space: normal; }
  .only-phone { display: block !important; }
  .fields { grid-template-columns: 1fr 1fr; }
  table.rows, table.rows tbody { display: block; }
  table.rows thead { display: none; }
  table.rows td.wide { display: none; }
  table.rows tr { display: block; padding: 4px 0; border-bottom: 1px solid var(--line-2); }
  table.rows tr:last-child { border-bottom: 0; }
  table.rows td:not(.wide) { display: block; border: 0; padding: 4px 16px; }
  table.rows td:first-child { padding-top: 10px; }
  table.rows td:nth-child(2) { padding: 2px 16px 12px 64px; }
}
@media (max-width: 420px) { .fields { grid-template-columns: 1fr; } .tiles3 { gap: 8px; } .stat { padding: 12px; } .stat span { font-size: 12.5px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } .btn:active, .stat:hover { transform: none; } }

.brand-logo { height: 28px; width: auto; display: block; }
.brand-tag { font-size: 12px; font-weight: 700; color: var(--brand); background: var(--brand-tint); padding: 3px 9px; border-radius: 999px; letter-spacing: 0; }
@media (max-width: 900px) { .topbar .brand-logo { height: 26px; } }

/* =====================================================================
   "Lux" layer: deep ink sidebar, luminous hero, glassy cards, Sora display type.
   Everything below refines the rules above; markup stays the same.
   ===================================================================== */
@font-face { font-family: "Sora"; src: url("/static/fonts/sora-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Sora"; src: url("/static/fonts/sora-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Sora"; src: url("/static/fonts/sora-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }
:root {
  --bg: #f3f4fb; --ink: #0d1130; --ink-2: #4a5175; --ink-3: #7a82a6;
  --line: #e6e9f4; --line-2: #eff1f8; --field: #f4f5fb;
  --brand: #3558f0; --brand-dark: #2440c8; --brand-tint: #e9edff;
  --night: #0b0f2a; --night-2: #141a45;
  --display: "Sora", "Manrope", -apple-system, "Segoe UI", sans-serif;
  --shadow: 0 1px 2px rgba(13, 17, 48, 0.04), 0 14px 34px -14px rgba(13, 17, 48, 0.16);
  --shadow-lg: 0 2px 4px rgba(13, 17, 48, 0.05), 0 28px 60px -20px rgba(13, 17, 48, 0.28);
  --glow: 0 18px 40px -14px rgba(53, 88, 240, 0.6);
  --r-lg: 24px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}
body {
  background:
    radial-gradient(1100px 520px at 92% -8%, rgba(99, 102, 241, 0.13), transparent 62%),
    radial-gradient(900px 480px at 18% -12%, rgba(34, 193, 238, 0.10), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
h1, h2, .lh-num, .kpi b, .stat b, .tile b, .ring span b, .lh-stats b, .bar b, .legend b { font-family: var(--display); }
h1 { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; }
h2 { font-size: 16.5px; font-weight: 700; letter-spacing: -0.015em; }
::selection { background: #c9d4ff; }

/* sidebar */
.side { background: linear-gradient(180deg, var(--night-2) 0%, var(--night) 46%, #080b20 100%); border-right: 0; padding: 26px 16px 18px; box-shadow: 8px 0 40px -18px rgba(13, 17, 48, 0.5); }
.side::before { content: ""; position: absolute; inset: 0; background: radial-gradient(360px 260px at 0% 0%, rgba(80, 112, 255, 0.34), transparent 70%), radial-gradient(300px 240px at 100% 100%, rgba(34, 193, 238, 0.14), transparent 70%); pointer-events: none; }
.side > * { position: relative; }
.side .brand { padding: 2px 10px 28px; }
.side .brand-logo { height: 30px; }
.side .brand-tag { color: #cfd8ff; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.14); }
.nav { gap: 5px; }
.nav a { color: #a9b2d8; border-radius: 14px; padding: 12px 14px; transition: background 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease); }
.nav a:hover { background: rgba(255, 255, 255, 0.07); color: #fff; transform: translateX(2px); }
.nav a.on { background: linear-gradient(90deg, rgba(86, 116, 255, 0.5), rgba(86, 116, 255, 0.12)); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), 0 10px 24px -12px rgba(53, 88, 240, 0.9); }
.nav a.on::before { content: ""; position: absolute; left: 16px; width: 3px; height: 22px; margin-left: -14px; border-radius: 3px; background: #8fb0ff; box-shadow: 0 0 12px #6f8fff; }
.nav .count { background: #fff; color: var(--brand-dark); box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25); }
.nav a.on .count { background: #fff; }
.side-foot { border-top: 1px solid rgba(255, 255, 255, 0.1); }
.side .me .who { color: #9aa3cc; }
.side .avatar.round { background: linear-gradient(140deg, #6f8bff, #3558f0); box-shadow: 0 6px 16px rgba(53, 88, 240, 0.5); }
.side-foot button { color: #a9b2d8; }
.side-foot button:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }

/* surfaces */
.card { border: 1px solid rgba(13, 17, 48, 0.05); background: linear-gradient(180deg, #fff, #fdfdff); transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease); }
.card.mail:hover, .grid > .card:hover { box-shadow: var(--shadow-lg); }
.cardhead { margin-bottom: 18px; }
.cardhead h2 { margin: 0; }
.subhead { margin: 22px 0 12px; }
.cardfoot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line-2); color: var(--ink-3); font-size: 14px; }
.cardfoot b { color: var(--ink); font-family: var(--display); }
.cardfoot a { display: inline-flex; align-items: center; gap: 6px; }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ic { border-radius: 14px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6); }
.avatar { border-radius: 14px; }

/* buttons and fields */
.btn { border-radius: 14px; border-color: var(--line); box-shadow: 0 1px 2px rgba(13, 17, 48, 0.05); transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s var(--ease), border-color 0.18s var(--ease); }
.btn:hover { background: #fff; border-color: #cfd6ee; transform: translateY(-1px); box-shadow: 0 8px 18px -8px rgba(13, 17, 48, 0.25); }
.btn.primary { background: linear-gradient(135deg, #5b78ff 0%, #3558f0 55%, #2a44d4 100%); border-color: transparent; box-shadow: var(--glow), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.btn.primary:hover { background: linear-gradient(135deg, #6a85ff 0%, #3d60f5 55%, #2f4be0 100%); border-color: transparent; box-shadow: 0 22px 44px -14px rgba(53, 88, 240, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.btn.white { background: #fff; color: var(--brand-dark); border-color: transparent; box-shadow: 0 14px 30px -12px rgba(5, 10, 50, 0.6); }
.btn.white:hover { background: #fff; color: var(--brand); }
.seg { border: 1px solid rgba(13, 17, 48, 0.05); border-radius: 15px; }
.seg a.on { background: linear-gradient(135deg, var(--night-2), var(--night)); box-shadow: 0 8px 18px -8px rgba(13, 17, 48, 0.6); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=file], input:not([type]), select, textarea { border-color: var(--line); transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease); }
input:hover, select:hover, textarea:hover { border-color: #cfd6ee; }
label.check input:checked { background: linear-gradient(135deg, #5b78ff, #3558f0); }
.pill { padding: 4px 11px; }
.pill .dot { width: 7px; height: 7px; margin: 0 2px 0 0; }
.dot.on { background: #12c48b; box-shadow: 0 0 0 4px rgba(18, 196, 139, 0.18); }
tbody tr { transition: background 0.15s; }
tbody tr:hover td { background: #f8f9ff; }
.mail-body { border: 1px solid var(--line-2); }
.flash { box-shadow: var(--shadow); }

/* dashboard */
.hello { margin-bottom: 22px; align-items: flex-end; }
.hello .date { font-weight: 600; margin-bottom: 4px; }
.hello-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.live { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.75); border: 1px solid rgba(13, 17, 48, 0.06); color: var(--ink-2); font-size: 13.5px; font-weight: 700; box-shadow: 0 1px 2px rgba(13, 17, 48, 0.04); white-space: nowrap; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: #12c48b; box-shadow: 0 0 0 0 rgba(18, 196, 139, 0.6); animation: pulse 2s infinite; }
.live-t { font-weight: 500; color: var(--ink-3); padding-left: 8px; border-left: 1px solid var(--line); }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(18, 196, 139, 0); } 100% { box-shadow: 0 0 0 0 rgba(18, 196, 139, 0); } }

.lux-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.1fr) auto minmax(0, 1.25fr); gap: 34px; align-items: center; padding: 34px 36px; margin-bottom: 16px; border-radius: 30px; color: #fff;
  background:
    radial-gradient(520px 320px at 96% -30%, rgba(56, 211, 255, 0.6), transparent 62%),
    radial-gradient(480px 340px at -6% 130%, rgba(164, 92, 255, 0.55), transparent 62%),
    linear-gradient(125deg, #151c5e 0%, #2a43cf 48%, #3463f5 100%);
  box-shadow: 0 34px 70px -28px rgba(42, 67, 207, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.18); }
.lux-hero::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px); background-size: 34px 34px; -webkit-mask-image: radial-gradient(520px 300px at 70% 40%, #000, transparent 75%); mask-image: radial-gradient(520px 300px at 70% 40%, #000, transparent 75%); pointer-events: none; }
.lux-hero > * { position: relative; z-index: 1; min-width: 0; }
.lh-label { margin: 0; font-weight: 700; color: rgba(255, 255, 255, 0.78); font-size: 14.5px; }
.lh-num { font-size: 84px; line-height: 1; font-weight: 700; letter-spacing: -0.05em; margin: 6px 0 8px; text-shadow: 0 10px 30px rgba(5, 10, 60, 0.35); }
.lh-sub { margin: 0 0 20px; color: rgba(255, 255, 255, 0.78); font-size: 14.5px; }
.lux-hero .ring { width: 150px; height: 150px; filter: drop-shadow(0 12px 24px rgba(5, 10, 60, 0.35)); }
.lux-hero .ring span { color: rgba(255, 255, 255, 0.78); font-size: 12.5px; }
.lux-hero .ring span b { color: #fff; font-size: 30px; font-weight: 700; letter-spacing: -0.03em; }
.lh-stats { display: grid; gap: 10px; }
.lh-stats a { display: flex; align-items: baseline; gap: 14px; padding: 15px 18px; border-radius: 18px; color: #fff; background: rgba(255, 255, 255, 0.11); border: 1px solid rgba(255, 255, 255, 0.2); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: background 0.2s var(--ease), transform 0.2s var(--ease); }
.lh-stats a:hover { background: rgba(255, 255, 255, 0.19); text-decoration: none; transform: translateX(3px); }
.lh-stats b { font-size: 24px; font-weight: 700; letter-spacing: -0.03em; min-width: 62px; white-space: nowrap; }
.lh-stats span { color: rgba(255, 255, 255, 0.8); font-size: 14px; font-weight: 600; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.kpi { display: flex; align-items: center; gap: 16px; padding: 20px; border-radius: var(--r-lg); background: linear-gradient(180deg, #fff, #fdfdff); border: 1px solid rgba(13, 17, 48, 0.05); box-shadow: var(--shadow); color: var(--ink); transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease); }
.kpi:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.kpi .ic { width: 50px; height: 50px; border-radius: 16px; }
.kpi b { display: block; font-size: 30px; line-height: 1.05; font-weight: 700; letter-spacing: -0.03em; }
.kpi span:not(.ic) { color: var(--ink-3); font-size: 13.5px; font-weight: 600; }
.kpi > div { min-width: 0; }

.bars { gap: 14px; }
.bar .track { height: 12px; background: var(--line-2); box-shadow: inset 0 1px 2px rgba(13, 17, 48, 0.06); }
.bar .fill { background: linear-gradient(90deg, #6f8bff, #3558f0); box-shadow: 0 4px 10px -4px rgba(53, 88, 240, 0.7); transform-origin: left; animation: grow 0.9s var(--ease) both; }
.fill.amber { background: linear-gradient(90deg, #fbbf24, #f59e0b); box-shadow: none; } .fill.green { background: linear-gradient(90deg, #34d399, #10b981); box-shadow: none; } .fill.rose { background: linear-gradient(90deg, #fb7185, #f43f5e); box-shadow: none; } .fill.slate { background: linear-gradient(90deg, #c2c8dc, #a3abc4); box-shadow: none; } .fill.violet { background: linear-gradient(90deg, #a78bfa, #8b5cf6); box-shadow: none; }
@keyframes grow { from { transform: scaleX(0); } }
body.quiet .fill { animation: none; }

.stackbar { display: flex; gap: 4px; height: 16px; margin-bottom: 18px; }
.stackbar i { display: block; border-radius: 99px; min-width: 8px; }
.stackbar i.green, .legend i.green { background: linear-gradient(90deg, #34d399, #10b981); }
.stackbar i.amber, .legend i.amber { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.stackbar i.blue, .legend i.blue { background: linear-gradient(90deg, #6f8bff, #3558f0); }
.stackbar i.slate, .legend i.slate { background: linear-gradient(90deg, #c2c8dc, #a3abc4); }
.legend { display: grid; }
.legend a { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto 44px; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line-2); color: var(--ink-2); font-weight: 600; }
.legend a:first-child { border-top: 0; padding-top: 0; }
.legend a:hover { text-decoration: none; color: var(--ink); }
.legend i { width: 12px; height: 12px; border-radius: 4px; }
.legend b { color: var(--ink); font-weight: 700; font-size: 17px; }
.legend small { color: var(--ink-3); font-size: 13px; text-align: right; font-weight: 600; }

/* tiles on other pages */
.tile { border: 1px solid rgba(13, 17, 48, 0.05); border-radius: 22px; transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease); }
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.tile b { font-weight: 700; }

/* login */
body.bare { background: radial-gradient(700px 420px at 15% 10%, rgba(86, 116, 255, 0.55), transparent 65%), radial-gradient(640px 420px at 90% 95%, rgba(34, 193, 238, 0.35), transparent 65%), linear-gradient(140deg, #0b0f2a, #1a2370 60%, #2a43cf); }
body.bare .card { border: 1px solid rgba(255, 255, 255, 0.6); border-radius: 28px; padding: 34px; box-shadow: 0 40px 90px -30px rgba(3, 6, 30, 0.8); }

@media (max-width: 1240px) { .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } .lux-hero { grid-template-columns: minmax(0, 1fr) auto; } .lh-stats { grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); } .lh-stats a { flex-direction: column; gap: 2px; align-items: flex-start; } }
@media (max-width: 1080px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  body { background-attachment: scroll; }
  .topbar { background: rgba(243, 244, 251, 0.78); -webkit-backdrop-filter: saturate(160%) blur(16px); backdrop-filter: saturate(160%) blur(16px); border-bottom: 1px solid rgba(13, 17, 48, 0.05); }
  .topbar .avatar.round { background: linear-gradient(140deg, #6f8bff, #3558f0); box-shadow: 0 6px 16px rgba(53, 88, 240, 0.4); }
  .topbar .menu { border: 1px solid rgba(13, 17, 48, 0.06); border-radius: 22px; }
  .tabbar { left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); border: 1px solid rgba(13, 17, 48, 0.06); border-radius: 26px; padding: 7px; background: rgba(255, 255, 255, 0.86); -webkit-backdrop-filter: saturate(170%) blur(18px); backdrop-filter: saturate(170%) blur(18px); box-shadow: 0 20px 44px -16px rgba(13, 17, 48, 0.4); }
  .tabbar a { border-radius: 19px; transition: background 0.2s var(--ease), color 0.2s var(--ease); }
  .tabbar a.on { background: var(--brand-tint); color: var(--brand); }
  main { padding-bottom: calc(118px + env(safe-area-inset-bottom)); }
  h1 { font-size: 25px; }
  .hello { align-items: flex-start; flex-direction: column; gap: 14px; }
  .hello-tools { width: 100%; justify-content: space-between; }
  .live-t { display: none; }
  .lux-hero { grid-template-columns: minmax(0, 1fr) auto; gap: 18px; padding: 24px 22px; border-radius: 26px; }
  .lh-num { font-size: 64px; }
  .lux-hero .ring { width: 104px; height: 104px; }
  .lux-hero .ring span b { font-size: 21px; }
  .lux-hero .ring span { font-size: 11px; }
  .lh-stats { grid-template-columns: 1fr; gap: 8px; }
  .lh-stats a { flex-direction: row; align-items: baseline; gap: 12px; padding: 13px 16px; }
  .kpis { gap: 12px; }
  .kpi { padding: 16px; gap: 12px; flex-direction: column; align-items: flex-start; border-radius: 22px; }
  .kpi .ic { width: 44px; height: 44px; }
  .kpi b { font-size: 26px; }
  .grid.three { grid-template-columns: 1fr; }
  .legend a { grid-template-columns: 12px minmax(0, 1fr) auto 40px; }
  body.bare .card { padding: 26px; }
}
@media (prefers-reduced-motion: reduce) { .live i, .bar .fill { animation: none; } .kpi:hover, .tile:hover, .btn:hover, .nav a:hover, .lh-stats a:hover { transform: none; } }

/* bulk selection */
label.tick { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); cursor: pointer; min-height: 32px; }
label.tick.solo { min-width: 32px; justify-content: center; }
label.tick input { appearance: none; -webkit-appearance: none; width: 22px; height: 22px; min-height: 0; margin: 0; padding: 0; flex: none; border: 2px solid #c3cae0; border-radius: 7px; background: #fff; cursor: pointer; transition: background 0.15s, border-color 0.15s, box-shadow 0.15s; display: grid; place-items: center; }
label.tick input:hover { border-color: var(--brand); }
label.tick input:checked { background: linear-gradient(135deg, #5b78ff, #3558f0); border-color: transparent; box-shadow: 0 6px 14px -6px rgba(53, 88, 240, 0.8); }
label.tick input:checked::after { content: ""; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: translateY(-1px) rotate(45deg); }
label.tick input:focus-visible { outline: 3px solid #9fb2ff; outline-offset: 2px; }
.bulkbar { position: sticky; top: 12px; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 14px 20px; flex-wrap: wrap; padding: 14px 18px; border: 1px solid rgba(53, 88, 240, 0.16); box-shadow: var(--shadow-lg); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); background: rgba(255, 255, 255, 0.92); }
.bulk-pick { display: flex; align-items: center; gap: 10px 20px; flex-wrap: wrap; }
article.picked { box-shadow: 0 0 0 2px var(--brand), var(--shadow-lg); }
@media (max-width: 900px) { .bulkbar { top: 66px; padding: 14px; } .bulkbar .btnrow { width: 100%; } .bulkbar .btnrow .btn { flex: 1 1 150px; } }

/* reports */
.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 5px; margin-bottom: 18px; background: rgba(255, 255, 255, 0.8); border: 1px solid rgba(13, 17, 48, 0.05); border-radius: 18px; box-shadow: var(--shadow); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; min-height: 42px; border-radius: 13px; color: var(--ink-2); font-weight: 700; white-space: nowrap; transition: background 0.2s var(--ease), color 0.2s var(--ease); }
.tabs a:hover { text-decoration: none; background: var(--line-2); color: var(--ink); }
.tabs a.on { background: linear-gradient(135deg, var(--night-2), var(--night)); color: #fff; box-shadow: 0 8px 18px -8px rgba(13, 17, 48, 0.6); }
.tabs a span { font-size: 12px; font-weight: 800; padding: 1px 8px; border-radius: 99px; background: var(--slate-tint); color: var(--ink-2); }
.tabs a.on span { background: rgba(255, 255, 255, 0.18); color: #fff; }
.rep-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line-2); }
.rep-row:first-child { border-top: 0; padding-top: 0; }
.rep-row:last-child { padding-bottom: 0; }
.rep-t { min-width: 0; }
.rep-t b { display: block; font-weight: 700; }
.rep-t span { display: block; color: var(--ink-3); font-size: 13px; line-height: 1.45; }
.rep-n { font-family: var(--display); font-size: 22px; font-weight: 700; letter-spacing: -0.02em; min-width: 64px; text-align: center; padding: 6px 12px; border-radius: 12px; background: var(--slate-tint); color: var(--ink); flex: none; }
.rep-n.green { background: var(--green-tint); color: var(--green); } .rep-n.amber { background: var(--amber-tint); color: var(--amber); }
.rep-n.rose { background: var(--rose-tint); color: var(--rose); } .rep-n.blue { background: var(--brand-tint); color: var(--brand); }
table.report th, table.report td { white-space: nowrap; font-size: 14px; padding: 11px 16px; }
table.report td.wrap { white-space: normal; min-width: 280px; max-width: 460px; color: var(--ink-2); }
table.report td a.strong { color: var(--ink); font-weight: 700; }
table.report thead th { position: sticky; top: 0; background: #fbfbff; z-index: 1; }
.pager { margin-top: 14px; }
@media (max-width: 900px) {
  table.report, table.report tbody { display: block; }
  table.report thead { display: none; }
  table.report tr { display: block; padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
  table.report td { display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 10px; padding: 4px 0; border: 0; white-space: normal; overflow-wrap: anywhere; min-width: 0; max-width: none; }
  table.report td.wrap { min-width: 0; max-width: none; }
  table.report td::before { content: attr(data-label); color: var(--ink-3); font-size: 12.5px; font-weight: 700; }
  table.report td:empty { display: none; }
  table.report tbody tr:hover td { background: none; }
}

/* mailbox health */
.health { display: grid; gap: 8px; margin-bottom: 18px; }
.health-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--field); border: 1px solid var(--line-2); }
.health-row.paused { background: var(--rose-tint); border-color: #ffc9d4; }
.health-row b { display: block; font-weight: 700; }
.health-row span:not(.pill) { display: block; color: var(--ink-3); font-size: 13px; }
.health-row > div { min-width: 0; overflow-wrap: anywhere; }
.flash form { display: inline; }

/* Website forms: four tabs and the copy-details row must fit a phone. */
.copyrow .btn { white-space: normal; text-align: left; height: auto; min-height: 36px; max-width: 100%; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .seg.segwrap { flex-wrap: wrap; }
  .seg.segwrap a { flex: 1 1 45%; white-space: normal; text-align: center; }
}

/* Automatic / By hand switch: the same pill as the tabs, but buttons. */
.seg.mode { margin: 0; }
.seg.mode button { padding: 8px 16px; border: 0; background: none; border-radius: 11px; color: var(--ink-2); font: inherit; font-weight: 700; min-height: 36px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; white-space: nowrap; }
.seg.mode button.on { background: var(--green); color: #fff; }
.seg.mode button:last-child.on { background: var(--ink); }
.pagehead .tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
@media (max-width: 760px) { .seg.mode button { flex: 1; justify-content: center; } }

/* Status tiles on Website forms are links that filter the list. */
a.tilelink { color: inherit; text-decoration: none; cursor: pointer; transition: transform .12s, box-shadow .12s; }
a.tilelink:hover { transform: translateY(-2px); text-decoration: none; }
a.tilelink.on { background: var(--ink); color: #fff; }
a.tilelink.on b, a.tilelink.on span { color: #fff; }
a.tilelink:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { a.tilelink { transition: none; } a.tilelink:hover { transform: none; } }

/* Activity log: each person is a link to their own actions. */
a.replink { color: inherit; text-decoration: none; }
a.replink:hover { text-decoration: none; background: var(--brand-tint); }
a.replink:focus-visible { outline: 3px solid var(--brand); outline-offset: -3px; }
.filters input[type=date] { width: auto; flex: 0 1 170px; }
.rep-t b .pill { display: inline-flex; width: auto; margin-left: 8px; vertical-align: middle; }

/* My account: authenticator setup. */
.steps { margin: 0; padding-left: 20px; display: grid; gap: 16px; }
.steps li { padding-left: 4px; }
.qr { width: 220px; max-width: 100%; margin: 12px 0; padding: 10px; background: #fff; border-radius: 16px; box-shadow: var(--shadow); }
.qr svg { display: block; width: 100%; height: auto; }
.side-foot a.who { color: inherit; text-decoration: none; }
.side-foot a.who:hover { text-decoration: underline; }

/* Settings: one tab at a time; a lone card keeps a readable width. */
.setone { max-width: 860px; }
.setone > section.card + section.card { margin-top: 16px; }

/* Big screens: use the room, but keep the content in a centred column instead of hugging the left edge. */
@media (min-width: 901px) {
  main { max-width: none; padding-left: max(40px, calc((100vw - var(--side) - 1760px) / 2)); padding-right: max(40px, calc((100vw - var(--side) - 1760px) / 2)); }
}
/* Settings reads best as a narrower centred column on any screen. */
.setpage { max-width: 1180px; margin: 0 auto; }
.setpage .setone { max-width: none; }
@media (min-width: 1500px) {
  .dash { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
  table.report td.wrap { max-width: 720px; }
}

/* Sign-in steps */
.stepline { margin: 0 0 6px; font-size: 13px; font-weight: 700; color: var(--brand); }
.codebox { font-size: 26px !important; letter-spacing: .28em; text-align: center; font-weight: 800; height: 62px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
@media (max-width: 760px) { .seg.segwrap.q3 a { flex: 1 1 100%; } }
