/* RepCapture UI: one system for the client dashboard and the admin area.
   Source of truth: docs/brand/brand-board.webp (logo, palette, Inter). Layout patterns follow the DashStack-style kit. */

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* brand board palette */
  --navy: #091427;
  --blue: #1547fe;             /* primary */
  --purple: #7a40fc;
  --teal: #04d6ba;
  --gray: #f1f2f6;
  --cyan: #42bcf9;             /* logo gradient start */
  --grad: linear-gradient(135deg, #42bcf9 0%, #325efe 45%, #8144fc 100%);
  --grad-text: linear-gradient(90deg, #1547fe 0%, #7a40fc 100%);

  --bg: #f6f8fc;               /* page canvas */
  --card: #ffffff;
  --text: #091427;
  --text-2: #2b3449;
  --muted: #5f6b83;
  --line: #e8ebf3;
  --input-border: #d6dbe7;
  --blue-soft: #eaf0ff;        /* active nav / tinted surfaces */

  /* status labels: tint = color at ~18% */
  --green: #00a58e;  --green-t: rgba(4, 214, 186, .18);
  --purple-c: #7a40fc; --purple-t: rgba(122, 64, 252, .14);
  --red: #e5384f;    --red-t: rgba(229, 56, 79, .13);
  --orange: #e8891f; --orange-t: rgba(255, 167, 86, .22);
  --violet: #a044ff; --violet-t: rgba(160, 68, 255, .14);
  --gray-c: #5f6b83; --gray-t: rgba(95, 107, 131, .14);
  --blue-t: rgba(21, 71, 254, .11);

  --radius: 14px;
  --shadow: 0 1px 2px rgba(9, 20, 39, .04), 0 8px 30px rgba(9, 20, 39, .05);
  --sidebar-w: 248px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 28px; font-weight: 800; letter-spacing: -.03em; margin: 0 0 20px; }
h2 { font-size: 18px; font-weight: 700; letter-spacing: -.015em; margin: 28px 0 12px; }
h2:first-child { margin-top: 0; }
p { margin: 0 0 12px; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; background: #eef0f6; border-radius: 6px; padding: 2px 6px; }
pre { padding: 12px 14px; overflow: auto; margin: 10px 0 0; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
:focus-visible { outline: 3px solid rgba(21, 71, 254, .4); outline-offset: 2px; }

/* ---------- shell ---------- */
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); background: #fff; color: var(--muted); border-right: 1px solid var(--line); display: flex; flex-direction: column; overflow-y: auto; z-index: 30; transition: transform .2s ease; }
.logo { display: block; padding: 24px 28px 18px; line-height: 0; }
.logo img { height: 30px; width: auto; display: block; }
.logo:hover { text-decoration: none; }
.nav { padding: 8px 0; }
.nav-label { padding: 18px 32px 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8a93a8; }
.nav a, .nav-foot a { display: flex; align-items: center; gap: 14px; height: 44px; margin: 2px 16px; padding: 0 14px; border-radius: 10px; color: var(--muted); font-weight: 600; }
.nav a:hover, .nav-foot a:hover { background: #f3f5fa; color: var(--navy); text-decoration: none; }
.nav a.active { background: linear-gradient(135deg, rgba(66, 188, 249, .16), rgba(50, 94, 254, .12) 50%, rgba(129, 68, 252, .12)); color: var(--blue); }
.nav .ico, .nav-foot .ico { width: 20px; height: 20px; flex: none; }
.nav-rule { height: 1px; background: var(--line); margin: 10px 20px; }
.nav-spacer { flex: 1; }
.nav-foot { padding: 0 0 16px; }

.main { margin-left: var(--sidebar-w); min-height: 100vh; }
.topbar { height: 70px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 16px; padding: 0 28px; position: sticky; top: 0; z-index: 20; }
.topbar .crumb { font-size: 14px; font-weight: 700; color: var(--text); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-btn { display: none; border: 0; background: none; padding: 6px; cursor: pointer; color: var(--text); }
.user { display: flex; align-items: center; gap: 12px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 800; display: grid; place-items: center; text-transform: uppercase; }
.user-meta { line-height: 1.25; text-align: left; }
.user-meta b { display: block; font-size: 14px; color: var(--text-2); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-meta span { font-size: 12px; font-weight: 600; color: #565656; }
.signout { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--input-border); color: var(--muted); }
.signout:hover { background: var(--bg); text-decoration: none; }
.page { padding: 28px; max-width: 1240px; }
.scrim { display: none; }

/* ---------- cards & tiles ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; margin: 0 0 20px; }
.card > h2:first-child { margin-top: 0; }
.card.accent { position: relative; overflow: hidden; }
.card.accent::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--grad); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 20px; margin-bottom: 20px; }
.grid > .card { margin: 0; }
.tile { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.tile .label { font-size: 15px; font-weight: 600; color: var(--text); opacity: .7; }
.tile .num { font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; margin-top: 10px; }
.tile .icon-box { width: 52px; height: 52px; border-radius: 18px; display: grid; place-items: center; flex: none; }
.tile .icon-box svg { width: 24px; height: 24px; }
.ic-blue { background: var(--blue-t); color: var(--blue); } .ic-green { background: var(--green-t); color: var(--green); }
.ic-purple { background: var(--purple-t); color: var(--purple-c); } .ic-orange { background: var(--orange-t); color: var(--orange); }
.ic-red { background: var(--red-t); color: var(--red); } .ic-violet { background: var(--violet-t); color: var(--violet); }
.big { font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
.insight { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.insight:last-child { border-bottom: 0; padding-bottom: 0; } .insight:first-child { padding-top: 0; }
.insight .dot { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.insight .dot svg { width: 18px; height: 18px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; margin: 0 -22px; padding: 0 22px; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 13px; font-weight: 800; color: var(--text); background: #f1f4f9; padding: 12px 14px; white-space: nowrap; }
th:first-child { border-radius: 8px 0 0 8px; } th:last-child { border-radius: 0 8px 8px 0; }
td { padding: 14px; font-size: 14px; font-weight: 600; color: var(--text-2); border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td .muted { font-weight: 500; }
tr.session-row th { background: #f8f9fc; border-radius: 0; font-size: 12.5px; }

/* ---------- status labels (kit: tint at 20%, 4.5px radius, 12px bold) ---------- */
.pill { display: inline-block; padding: 4px 12px; border-radius: 4.5px; font-size: 12px; font-weight: 700; line-height: 1.4; background: var(--gray-t); color: var(--gray-c); white-space: nowrap; }
.pill.green, .pill.ok { background: var(--green-t); color: var(--green); }
.pill.purple { background: var(--purple-t); color: var(--purple-c); }
.pill.red, .pill.hot { background: var(--red-t); color: var(--red); }
.pill.orange, .pill.warn { background: var(--orange-t); color: #b8650f; }
.pill.violet { background: var(--violet-t); color: var(--violet); }
.pill.blue { background: var(--blue-t); color: var(--blue); }

/* ---------- forms & buttons ---------- */
input, select, textarea { font: inherit; color: var(--text); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input:not([type]), select, textarea {
  background: var(--bg); border: .6px solid var(--input-border); border-radius: 8px; padding: 10px 14px; min-height: 42px; max-width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(21, 71, 254, .16); background-color: #fff; }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--blue); vertical-align: -3px; margin-right: 6px; }
input[type=color] { border: .6px solid var(--input-border); border-radius: 8px; height: 38px; width: 60px; padding: 3px; background: #fff; vertical-align: middle; }
label { font-weight: 600; color: var(--text-2); }
.field { margin: 0 0 16px; } .field > label { display: block; margin-bottom: 6px; }
button, .btn { font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; border-radius: 6px; padding: 10px 18px; border: 0; background: var(--grad); color: #fff; box-shadow: 0 8px 18px -8px rgba(50, 94, 254, .55); display: inline-block; line-height: 1.3; }
button:hover, .btn:hover { filter: brightness(1.06); text-decoration: none; }
button.secondary, .btn.secondary { background: #fff; color: var(--text-2); border: 1px solid var(--input-border); box-shadow: none; }
button.danger { background: var(--red); box-shadow: none; }
button.small, .btn.small { padding: 6px 12px; font-size: 12px; }
form.inline { display: inline; }
.flash { background: var(--green-t); color: #06806e; border-radius: 10px; padding: 12px 16px; margin: 0 0 20px; font-weight: 600; }
.flash.err { background: var(--red-t); color: #b0281b; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 20px; }
.tabs { display: inline-flex; background: #fff; border-radius: 8px; padding: 3px; box-shadow: var(--shadow); }
.tabs a { padding: 6px 14px; border-radius: 6px; color: var(--muted); font-weight: 700; }
.tabs a.on { background: var(--grad); color: #fff; }
.tabs a:hover { text-decoration: none; }

/* ---------- bare pages (sign-in, outcome page) ---------- */
body.bare { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.bare-card { width: 100%; max-width: 420px; }
.bare-card .logo { padding: 0 0 12px; }
.bare-card .logo img { height: 46px; margin: 0 auto; }
.bare-card .tag { text-align: center; color: var(--muted); letter-spacing: .28em; text-transform: uppercase; font-size: 10.5px; font-weight: 600; margin: 0 0 24px; }
.bare-card .card { padding: 28px; }
.bare-card h1 { font-size: 24px; }
.bare-card input[type=email], .bare-card input[type=password] { width: 100%; margin-bottom: 14px; }
.bare-card button { width: 100%; padding: 12px 18px; }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  body.nav-open .sidebar { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .3); }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 25; }
  .main { margin-left: 0; }
  .menu-btn { display: block; }
  .topbar { padding: 0 16px; }
  .page { padding: 18px 16px; }
  .user-meta { display: none; }
  .card { padding: 16px; }
  .table-wrap { margin: 0 -16px; padding: 0 16px; }
  .grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
  .tile .num { font-size: 24px; } .tile .icon-box { display: none; }
}

/* ---------- icons (Feather, MIT): stroke icons that inherit color ---------- */
svg.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- layout helpers ---------- */
.cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.cols > .card { margin-bottom: 0; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.page-head h1 { margin: 0; }
.money { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-end; }
.money .lead { font-size: 44px; font-weight: 800; letter-spacing: -.045em; line-height: 1; }
.money .est { font-size: 32px; font-weight: 800; letter-spacing: -.04em; line-height: 1.05; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stack > * + * { margin-top: 10px; }
.empty { color: var(--muted); padding: 8px 0; }
.link-row a { font-weight: 700; }
@media (max-width: 900px) { .cols { grid-template-columns: 1fr; } .cols > .card { margin-bottom: 20px; } .money .lead { font-size: 32px; } }

/* ---------- potential clients (the headline of the dashboard) ---------- */
.hero-card { border: 1px solid rgba(21, 71, 254, .18); background: linear-gradient(180deg, #fff 0%, #f8faff 100%); }
.hero-card h2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-hot td:first-child { box-shadow: inset 4px 0 0 var(--orange); }
.row-won td:first-child { box-shadow: inset 4px 0 0 var(--teal); }
.who b { font-size: 15px; }
.who .sub { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.quote { color: var(--muted); font-size: 12.5px; font-weight: 500; margin-top: 4px; max-width: 360px; white-space: normal; }

/* ---------- dropdowns: one look in every browser (native selects render very differently) ---------- */
select {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  height: 42px; min-height: 42px; padding: 0 40px 0 14px; font-size: 14px; font-weight: 500; line-height: 40px;
  min-width: 200px; max-width: 100%; cursor: pointer; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  background-color: var(--bg);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235f6b83' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 16px;
}
select:hover { border-color: #b9c1d3; }
select option { font-weight: 500; }
label > select, .field select { display: block; }

/* ---------- stat tiles: an even grid, no orphan row ---------- */
.grid.tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid.tiles.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.tiles > .card { padding: 16px 20px; }
.tile .num { font-size: 28px; margin-top: 6px; }
.tile .icon-box { width: 44px; height: 44px; border-radius: 14px; }
.tile .icon-box svg { width: 22px; height: 22px; }
.tile .label { font-size: 14px; }
@media (max-width: 900px) { .grid.tiles, .grid.tiles.four { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }

/* ---------- potential clients rows ---------- */
table.people td { vertical-align: top; }
table.people .reach div { line-height: 1.6; }
table.people .pills { margin-bottom: 4px; }
table.people .who .sub { margin-top: 2px; }
.hero-card .table-wrap { margin-bottom: 0; }

/* ---------- collapsible log ---------- */
details.log > summary { cursor: pointer; list-style: none; font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
details.log > summary::-webkit-details-marker { display: none; }
details.log > summary::after { content: ""; margin-left: auto; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; }
details.log[open] > summary::after { transform: rotate(-135deg); }
table.people td.who { min-width: 150px; white-space: nowrap; }
table.people td.who .sub { white-space: nowrap; }

/* ---------- potential clients on phones: stacked cards instead of a squeezed table ---------- */
@media (max-width: 700px) {
  table.people, table.people tbody, table.people tr, table.people td { display: block; width: 100%; }
  table.people tr:first-child { display: none; }
  table.people tr { padding: 14px 0 14px 14px; border-bottom: 1px solid var(--line); }
  table.people tr:last-child { border-bottom: 0; }
  table.people td { border: 0; padding: 4px 0; white-space: normal; }
  table.people td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #8a93a8; margin-bottom: 2px; }
  table.people td.who { min-width: 0; padding-top: 0; }
  table.people .row-hot td:first-child, table.people .row-won td:first-child { box-shadow: none; }
  table.people tr.row-hot { border-left: 4px solid var(--orange); }
  table.people tr.row-won { border-left: 4px solid var(--teal); }
  table.people td[style*="nowrap"] { white-space: normal !important; }
}
@media (max-width: 700px) {
  table.people td[data-label="Status"], table.people td[data-label="Last seen"] { display: inline-block; width: auto; margin-right: 28px; vertical-align: top; }
}

/* ================= simplified dashboard ================= */


/* new-contact banner: top of the page until dismissed */

/* reason chips (why someone looks interested) */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.chip { display: inline-block; background: #eef1f8; color: var(--text-2); border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; }

/* quiet inline buttons */
button.link-btn { background: none; border: 0; box-shadow: none; padding: 0 2px; margin-left: 6px; font-size: 12px; font-weight: 700; color: var(--blue); cursor: pointer; }
button.link-btn:hover { text-decoration: underline; filter: none; }
details.explain { margin-top: 12px; font-size: 13px; color: var(--muted); }
details.explain summary { cursor: pointer; font-weight: 700; color: var(--text-2); }
details.explain p { margin: 8px 0 0; line-height: 1.7; }

/* notification bell */
.bell-wrap { position: relative; }
button.bell { position: relative; width: 40px; height: 40px; padding: 0; border-radius: 50%; background: #fff; border: 1px solid var(--input-border); box-shadow: none; color: var(--text-2); display: grid; place-items: center; }
button.bell:hover { background: var(--bg); filter: none; }
.bell .badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; line-height: 1; box-shadow: 0 0 0 2px #fff; }
.panel { position: absolute; right: 0; top: 50px; width: 340px; max-width: calc(100vw - 32px); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 40px rgba(9, 20, 39, .16); z-index: 40; overflow: hidden; }
.panel[hidden] { display: none; }
.panel-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.panel-empty { padding: 18px 16px; color: var(--muted); }
.panel-item { display: flex; gap: 10px; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.panel-item:last-child { border-bottom: 0; }
.pi-main { min-width: 0; }
.pi-act { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.pi-act .link-btn { margin: 0; }

/* ================= round-up dashboard ================= */
.legend { display: flex; flex-wrap: wrap; gap: 14px 40px; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-2); }
.lg { display: flex; flex-direction: column; gap: 4px; min-width: 120px; }
.lg-label { display: flex; align-items: center; gap: 8px; }
.lg-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lg .dot { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.chg { display: inline-flex; align-items: center; gap: 3px; padding: 4px 8px 4px 6px; border-radius: 999px; font-size: 10.5px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.chg .ico { width: 11px; height: 11px; stroke-width: 3; margin-left: -1px; }
.chg.flat { padding: 4px 8px; justify-content: center; background: #eef1f6; color: var(--muted); }
.chg.up { background: var(--green-t); color: #06806e; } .chg.down { background: var(--red-t); color: #b0281b; }
.dv { background: var(--blue); } .di { background: var(--orange); } .dr { background: var(--teal); }
.lg-num { font-size: 22px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.lg-label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.trend { font-size: 12px; font-weight: 800; margin-left: 4px; letter-spacing: 0; }
.trend.up { color: var(--green); } .trend.down { color: var(--red); }
svg.chart { width: 100%; height: auto; display: block; overflow: visible; }
.ch-grid { stroke: var(--line); stroke-width: 1; }
.ch-axis { fill: var(--muted); font-size: 11px; font-weight: 600; font-family: var(--font); }
.ch-va { fill: rgba(21, 71, 254, .08); }
.ch-v, .ch-i, .ch-r { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ch-v { stroke: var(--blue); stroke-width: 2.5; } .ch-i { stroke: var(--orange); stroke-width: 2.5; } .ch-r { stroke: var(--teal); stroke-width: 2.5; }
.ch-rdot { fill: var(--teal); stroke: #fff; stroke-width: 2; }
.ch-hit { fill: transparent; } .ch-hit:hover { fill: rgba(21, 71, 254, .05); }

/* sidebar badge on "Potential clients" */
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; line-height: 1; }
a.panel-item { color: inherit; text-decoration: none; display: block; }
a.panel-item:hover { background: var(--bg); text-decoration: none; }
a.panel-foot { display: block; padding: 12px 16px; font-weight: 700; border-top: 1px solid var(--line); }

/* ================= dashboard: consistent rhythm (card 20px 22px, 20px between cards) ================= */
.narrative { font-size: 16px; line-height: 1.65; color: var(--text-2); margin: 0 0 16px; max-width: 78ch; }
.narrative b { color: var(--text); }
.facts { border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 12px; }
.facts .insight { padding: 0; border: 0; }
.chart-card { padding: 14px 22px 16px; }
.card h2 .pill { vertical-align: middle; margin-left: 6px; }
.card-foot { margin: 16px 0 0; }
p.muted.small { margin: 0 0 20px; }

/* potential clients list */
.plist { display: grid; }
.prow { display: flex; gap: 14px; align-items: flex-start; padding: 16px 0; border-bottom: 1px solid var(--line); }
.prow:first-child { padding-top: 4px; } .prow:last-child { border-bottom: 0; padding-bottom: 0; }
.pav { width: 40px; height: 40px; border-radius: 50%; background: var(--blue-t); color: var(--blue); font-weight: 800; display: grid; place-items: center; flex: none; }
.pav.new { background: var(--orange-t); color: #b8650f; }
.pbody { flex: 1; min-width: 0; }
.ptop { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.pname { font-size: 16px; }
.ptime { font-size: 12.5px; color: var(--muted); margin-left: auto; }
.pcontact { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 6px; }
.cbtn { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 8px; background: var(--blue-t); color: var(--blue); font-weight: 700; font-size: 14px; text-decoration: none; }
.cbtn:hover { text-decoration: none; filter: brightness(.96); }
.cbtn svg { width: 15px; height: 15px; }
.pask { color: var(--text-2); line-height: 1.5; }
.pmeta { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.pside { flex: none; }
@media (max-width: 700px) { .prow { flex-wrap: wrap; } .ptime { margin-left: 0; width: 100%; } .pside { width: 100%; padding-left: 54px; } }

/* ================= organizing potential clients ================= */
.tabs.wrap { flex-wrap: wrap; }
.psearch { display: flex; gap: 8px; align-items: center; margin: 0 0 14px; }
.psearch input { flex: 1; max-width: 360px; margin: 0; }
form.pa { display: inline; margin: 0; }
.star { background: none; border: 0; box-shadow: none; padding: 0 2px; margin: 0; font-size: 19px; line-height: 1; cursor: pointer; color: #b6bdc6; width: auto; }
.star:hover { color: #f5a524; } .star.on { color: #f5a524; }
.pnote { margin-top: 6px; font-size: 13px; color: var(--text-2); background: #fff8e6; border-radius: 8px; padding: 5px 10px; display: inline-block; }
details.pn { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
details.pn summary { cursor: pointer; font-weight: 600; }
details.pn form { display: flex; gap: 8px; margin-top: 6px; max-width: 460px; }
details.pn input { flex: 1; margin: 0; }
.prow.arch { opacity: .7; }
.pside { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
@media (max-width: 700px) { .pside { flex-direction: row; align-items: center; justify-content: flex-start; } .psearch input { max-width: none; } }

/* search fields follow the same tokens as inputs and dropdowns */
input[type=search] {
  -webkit-appearance: none; appearance: none;
  background-color: var(--bg); border: .6px solid var(--input-border); border-radius: 8px; height: 42px; min-height: 42px; max-width: 100%;
  padding: 0 14px 0 40px; font-size: 14px; font-weight: 500; color: var(--text);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235f6b83' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>");
  background-repeat: no-repeat; background-position: 14px center; background-size: 16px;
}
input[type=search]:hover { border-color: #b9c1d3; }
input[type=search]:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(21, 71, 254, .16); background-color: #fff; }
input[type=search]::placeholder { color: var(--muted); font-weight: 500; }
input[type=search]::-webkit-search-cancel-button, input[type=search]::-webkit-search-decoration { -webkit-appearance: none; display: none; }

.psearch .export { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.psearch .export .ico { width: 15px; height: 15px; }
@media (max-width: 700px) { .psearch { flex-wrap: wrap; } .psearch .export { margin-left: 0; } }
.psearch .exports { margin-left: auto; display: inline-flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.psearch .exports .export { margin-left: 0; }
form.pa .spambtn { background: none; border: 0; box-shadow: none; padding: 2px 4px; margin: 0; width: auto; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; text-decoration: underline; }
form.pa .spambtn:hover { color: var(--red); }

/* ---------- phone tidiness ---------- */
.callout { display: block; margin: 10px 0 0; padding: 10px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; line-height: 1.45; }
.callout.warn { background: var(--orange-t); color: #b8650f; }
html, body { max-width: 100%; overflow-x: clip; }
.main, .page, .card { min-width: 0; }
.page { overflow-wrap: anywhere; }
@media (max-width: 700px) {
  /* the notification list is a sheet under the top bar, never wider than the screen */
  .bell-wrap { position: static; }
  .panel { position: fixed; left: 12px; right: 12px; top: 76px; width: auto; max-width: none; max-height: calc(100vh - 100px); overflow-y: auto; }
  .page-head, .page-head h1 { min-width: 0; }
  input, select, textarea { font-size: 16px; }   /* stops iOS zooming the page when a field is focused */
}

/* ================= consistent controls ================= */
/* one button shape everywhere: label centered, icon + text aligned */
button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; text-align: center; }
button.small, .btn.small { min-height: 34px; }
/* status badges are small rounded tags, clearly not buttons */
.pill { border-radius: 999px; padding: 2px 10px; font-size: 11.5px; font-weight: 700; letter-spacing: .01em; }
.card h2 .pill { padding: 3px 10px; font-size: 12px; }
/* contact details are plain tappable links, not button-looking chips */
.pcontact { gap: 2px 18px; margin: 6px 0 4px; }
.cbtn { background: none; padding: 6px 0; border-radius: 0; color: var(--blue); font-weight: 600; font-size: 14px; min-height: 32px; }
.cbtn:hover { background: none; text-decoration: underline; filter: none; }
.cbtn svg { width: 16px; height: 16px; }
.icon-btn { width: 44px; height: 44px; padding: 0; border-radius: 14px; background: #fff; border: 1px solid var(--input-border); box-shadow: none; color: var(--text-2); display: inline-grid; place-items: center; flex: none; }
.icon-btn:hover { background: var(--bg); filter: none; }
.menu-btn.icon-btn { display: none; }
.drawer-user, .tabbar { display: none; }

@media (max-width: 900px) {
  /* top bar: menu button, title, notifications. Same 44px size, same 16px gutters as the page */
  .topbar { height: 68px; padding: 0 16px; gap: 12px; }
  .topbar .crumb { font-size: 15px; }
  .topbar .user { display: none; }
  .menu-btn.icon-btn { display: inline-grid; }
  button.bell { width: 44px; height: 44px; border-radius: 14px; }
  .bell .badge { top: -6px; right: -6px; }
  .bell-wrap { position: static; }
  .panel { position: fixed; left: 12px; right: 12px; top: 76px; width: auto; max-width: none; max-height: calc(100vh - 110px); overflow-y: auto; }
  /* drawer: account at the top, then only the things that are not in the bottom bar */
  .drawer-user { display: flex; align-items: center; gap: 12px; margin: 4px 16px 12px; padding: 14px; background: var(--bg); border-radius: 14px; }
  .drawer-user b { display: block; font-size: 15px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
  .drawer-user span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
  .drawer-user .avatar { flex: none; }
  .desk-only { display: none; }
  .nav-foot { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  /* liquid-glass tab bar */
  .tabbar { display: flex; position: fixed; z-index: 22; left: 16px; right: 16px; bottom: calc(35px + env(safe-area-inset-bottom)); height: 64px; padding: 6px; gap: 4px;
    border-radius: 26px; background: rgba(255, 255, 255, .58); -webkit-backdrop-filter: blur(22px) saturate(190%); backdrop-filter: blur(22px) saturate(190%);
    border: 1px solid rgba(255, 255, 255, .75); box-shadow: 0 12px 32px -8px rgba(9, 20, 39, .28), inset 0 1px 0 rgba(255, 255, 255, .9), inset 0 -1px 0 rgba(9, 20, 39, .04); }
  .tabbar a { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: 20px; color: #5b6479; font-size: 10.5px; font-weight: 700; text-decoration: none; -webkit-tap-highlight-color: transparent; transition: background .15s, color .15s; }
  .tabbar a svg { width: 22px; height: 22px; }
  .tabbar a.on { background: rgba(21, 71, 254, .12); color: var(--blue); box-shadow: inset 0 0 0 1px rgba(21, 71, 254, .10); }
  .tabbar a:active { background: rgba(9, 20, 39, .06); }
  .tb-badge { position: absolute; top: 5px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 5px; border-radius: 999px; background: var(--red); color: #fff; font: 800 10.5px/17px var(--font); text-align: center; font-style: normal; box-shadow: 0 0 0 2px rgba(255, 255, 255, .9); }
  body:has(.tabbar) .page { padding-bottom: calc(135px + env(safe-area-inset-bottom)); }
  /* the swipe lands the next screen from the side it came from */
  @keyframes inL { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
  @keyframes inR { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
  body.in-left .page { animation: inL .22s ease-out; }
  body.in-right .page { animation: inR .22s ease-out; }
  .card-foot .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { body.in-left .page, body.in-right .page { animation: none; } }

/* ================= Inbox ================= */
/* top bar: frosted glass, content scrolls underneath */
.topbar { background: rgba(255, 255, 255, .5); -webkit-backdrop-filter: blur(22px) saturate(190%); backdrop-filter: blur(22px) saturate(190%); border-bottom: 1px solid rgba(9, 20, 39, .06); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .topbar { background: #fff; } }
a.bell { position: relative; color: var(--text-2); text-decoration: none; }
a.bell:hover { text-decoration: none; }
.tabs .tn { font-weight: 800; opacity: .65; margin-left: 2px; }
.tabs a.on .tn { opacity: .9; }
.inbox-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.inbox-tools form { margin: 0; }
.inbox-tools.search { flex-wrap: nowrap; }
.inbox-tools.search input { flex: 1; min-width: 0; max-width: none; margin: 0; }
.inbox-card { padding: 4px 0; overflow: hidden; }
.inbox { display: block; }
.irow { display: flex; align-items: stretch; border-bottom: 1px solid var(--line); }
.irow:last-child { border-bottom: 0; }
.irow.unread { background: linear-gradient(90deg, rgba(255, 138, 0, .07), rgba(255, 138, 0, 0) 60%); box-shadow: inset 3px 0 0 var(--orange); }
.imain { flex: 1; min-width: 0; display: flex; gap: 14px; align-items: flex-start; padding: 16px 12px 16px 18px; color: inherit; text-decoration: none; }
a.imain:hover { background: rgba(9, 20, 39, .025); text-decoration: none; }
.imain .pav { flex: none; }
.ibody { flex: 1; min-width: 0; }
.itop { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.itop .pname { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.itop .ptime { margin: 0; flex: none; font-size: 12.5px; color: var(--muted); }
.iask { color: var(--text-2); line-height: 1.45; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.imeta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 8px; }
.iact { display: flex; align-items: center; padding: 0 16px 0 0; flex: none; }
.iact form { margin: 0; }
button.done svg { width: 15px; height: 15px; margin-right: 0; }
@media (max-width: 900px) {
  .page-head { gap: 12px; }
  .page-head .tabs { width: 100%; display: flex; }
  .page-head .tabs a { flex: 1; text-align: center; padding: 9px 6px; }
  .inbox-tools { flex-wrap: wrap; }
  .imain { padding: 14px 8px 14px 14px; gap: 12px; }
  .iact { padding-right: 12px; }
}
.itop .ptime { width: auto; }
.itop .pname { flex: 1; min-width: 0; }
.imeta .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
body.bare.compact { align-items: flex-start; }
body.bare.compact .bare-card { padding-top: max(16px, env(safe-area-inset-top)); }

/* ================= tab bar v2: one pill language (bar, highlight and buttons are all fully rounded) ================= */
.icon-btn { border-radius: 999px; }
button.bell, a.bell { border-radius: 999px; }
@media (max-width: 900px) {
  button.bell, a.bell { border-radius: 999px; }
  .tabbar { height: 62px; padding: 7px; gap: 6px; border-radius: 999px; left: 16px; right: 16px;
    background: rgba(255, 255, 255, .5); border: 1px solid rgba(9, 20, 39, .07);
    box-shadow: 0 10px 30px -10px rgba(9, 20, 39, .28), inset 0 1px 0 rgba(255, 255, 255, .85); }
  .tabbar a { border-radius: 999px; color: var(--navy); gap: 0; }
  .tabbar a svg { width: 25px; height: 25px; stroke-width: 1.9; }
  .tabbar a span { display: none; }
  .tabbar a.on { background: linear-gradient(135deg, rgba(66, 188, 249, .22), rgba(50, 94, 254, .16) 50%, rgba(129, 68, 252, .14)); box-shadow: inset 0 0 0 1px rgba(50, 94, 254, .10); color: #325efe; }
  .tabbar a:active { background: rgba(9, 20, 39, .06); }
  .tb-dot { position: absolute; top: 12px; left: calc(50% + 9px); width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px rgba(255, 255, 255, .95); }
  .desk-only { display: block; }
}

/* ================= smooth screen changes (cross-document view transitions; browsers without them just navigate) ================= */
@view-transition { navigation: auto; }
.topbar { view-transition-name: topbar; }
.tabbar { view-transition-name: tabbar; }
.page { view-transition-name: page; }
::view-transition-group(topbar), ::view-transition-group(tabbar) { animation-duration: 0s; }
@keyframes vtOutL { to { opacity: 0; transform: translateX(-36px); } }
@keyframes vtInL { from { opacity: 0; transform: translateX(36px); } }
@keyframes vtOutR { to { opacity: 0; transform: translateX(36px); } }
@keyframes vtInR { from { opacity: 0; transform: translateX(-36px); } }
html.sw-left::view-transition-old(page) { animation: vtOutL .2s cubic-bezier(.4, 0, 1, 1) both; }
html.sw-left::view-transition-new(page) { animation: vtInL .26s cubic-bezier(0, 0, .2, 1) both; }
html.sw-right::view-transition-old(page) { animation: vtOutR .2s cubic-bezier(.4, 0, 1, 1) both; }
html.sw-right::view-transition-new(page) { animation: vtInR .26s cubic-bezier(0, 0, .2, 1) both; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .18s; }
/* the older slide-in is only for browsers without view transitions */
@supports (view-transition-name: x) { body.in-left .page, body.in-right .page { animation: none !important; } }
@media (prefers-reduced-motion: reduce) { ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; } }

/* same red count as the bell: an Inbox alert shows on both */
@media (max-width: 900px) {
  .tabbar .tb-badge { display: block; top: 8px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; line-height: 18px; font-size: 11px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .95); }
}

/* ---- one card padding everywhere: 20px 22px (16px on phones). The Inbox card is edge-to-edge for its rows, so anything else inside it gets the same padding back ---- */
:root { --card-pad-y: 20px; --card-pad-x: 22px; }
.card { padding: var(--card-pad-y) var(--card-pad-x); }
@media (max-width: 900px) { :root { --card-pad-y: 16px; --card-pad-x: 16px; } }
.inbox-card > .empty, .inbox-card > p { padding: var(--card-pad-y) var(--card-pad-x); margin: 0; }
.card.inbox-card { padding: 4px 0; margin-left: 0; margin-right: 0; }
.card.inbox-card > .empty { padding: var(--card-pad-y) var(--card-pad-x); }

/* ---------- on/off switch ---------- */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); cursor: pointer; }
.switch { position: relative; flex: none; width: 52px; height: 32px; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.switch .track { position: absolute; inset: 0; border-radius: 999px; background: #cfd5e2; transition: background .18s; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(9, 20, 39, .25); transition: transform .18s; }
.switch input:checked + .track { background: var(--grad); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch input:focus-visible + .track { outline: 3px solid rgba(21, 71, 254, .4); outline-offset: 2px; }
.switch input:disabled { cursor: not-allowed; }
.switch input:disabled + .track { opacity: .55; }

/* ---------- reply screen ---------- */
body.bare { grid-template-columns: minmax(0, 1fr); }   /* a wide child (the quick-reply row) must never stretch the page */
.bare-card { min-width: 0; }
.opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 12px; }
.opts .opt { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 54px; padding: 8px 6px; border-radius: 14px; background: #fff; border: 1px solid var(--input-border); color: var(--text-2); text-decoration: none; text-align: center; }
.opts .opt b { font-size: 15px; }
.opts .opt i { font-style: normal; font-size: 11px; font-weight: 600; color: var(--muted); }
.opts a.opt:hover { background: var(--bg); text-decoration: none; }
.opts .opt.want { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 8px 18px -8px rgba(50, 94, 254, .55); }
.opts .opt.want i { color: rgba(255, 255, 255, .85); }
.opts .opt.off { opacity: .5; }
.tmsg { border-radius: 12px; padding: 10px 14px; margin: 0 0 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
.tmsg.me { background: #eef3ff; margin-left: 0; margin-right: 24px; }
.tmsg.them { background: #f6f8fc; border: 1px solid var(--line); margin-left: 24px; margin-right: 0; }

/* ================= admin tables: one row per client or site ================= */
table.adm { width: 100%; border-collapse: collapse; font-size: 14px; }
table.adm th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 11px 14px; background: #f8f9fc; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.adm td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.adm tbody tr:last-child td { border-bottom: 0; }
table.adm tfoot td { background: #f8f9fc; border-top: 1px solid var(--line); border-bottom: 0; }
table.adm .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.adm tr.click { cursor: pointer; }
table.adm tr.click:hover td { background: #f6f8ff; }
table.adm a { color: var(--navy); text-decoration: none; }
table.adm a:hover { color: var(--blue); }
.sortlink { color: inherit !important; text-decoration: none; }
.sortlink.on { color: var(--blue) !important; }
.atools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; }
.atools input[type=search] { flex: 1 1 260px; min-width: 0; margin: 0; }
.achips { display: flex; flex-wrap: wrap; gap: 6px; }
.achips a { padding: 6px 12px; border-radius: 999px; background: #eef1f8; color: var(--text-2); font-weight: 600; font-size: 13px; text-decoration: none; }
.achips a.on { background: var(--grad); color: #fff; }
.pager { display: flex; justify-content: space-between; align-items: center; margin: -6px 0 20px; }
.kvs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px 22px; }
.grid.kpis { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.kpi .kv-num { font-size: 28px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.kpi .kv-num.bad { color: var(--red); } .kpi .kv-num.warn { color: #b8650f; }
@media (max-width: 900px) { table.adm th, table.adm td { padding: 10px 10px; } .kpi .kv-num { font-size: 24px; } }
/* the page-wide "break anywhere" safety must not shred table cells: let the table scroll sideways instead */
table.adm, table.adm td, table.adm th { overflow-wrap: normal; word-break: normal; }
table.adm td:first-child, table.adm th:first-child { min-width: 200px; }
table.adm td { white-space: nowrap; }
table.adm td:first-child { white-space: normal; }
table.adm .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.table-wrap { -webkit-overflow-scrolling: touch; }

/* ================= welcome overlay ================= */
.wmodal { position: fixed; inset: 0; z-index: 80; background: rgba(9, 20, 39, .55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 16px; }
.wmodal[hidden] { display: none; }
body.w-open { overflow: hidden; }
.wcard { position: relative; width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow-y: auto; background: #fff; border-radius: 22px; padding: 30px 30px 24px; box-shadow: 0 30px 80px rgba(9, 20, 39, .35); animation: wpop .25s cubic-bezier(.2, .7, .2, 1); }
@keyframes wpop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.wclose { position: absolute; top: 12px; right: 14px; width: 36px; height: 36px; padding: 0; border-radius: 50%; background: none; border: 0; box-shadow: none; color: var(--muted); font-size: 26px; line-height: 1; cursor: pointer; }
.wclose:hover { background: var(--bg); filter: none; }
.wmark { display: block; margin: 0 0 12px; }
.wcard h2 { margin: 0 0 8px; font-size: 30px; letter-spacing: -.03em; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; outline: none; }
.wlead { font-size: 16px; line-height: 1.6; margin: 0 0 14px; color: var(--text-2); }
.wsub { font-weight: 700; margin: 0 0 10px; }
.wsteps { list-style: none; margin: 0 0 18px; padding: 0; }
.wstep { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.wstep > div { flex: 1; min-width: 0; }
.wnum { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); font-weight: 800; font-size: 14px; }
.wstep.done .wnum { background: var(--green-t); color: var(--green); }
.wstep.done b { color: var(--muted); }
.wnum svg { width: 16px; height: 16px; }
.wfoot { display: flex; flex-wrap: wrap; gap: 10px; }
.wfoot .btn, .wfoot button { flex: 1 1 180px; }
@media (max-width: 600px) { .wmodal { align-items: flex-end; padding: 0; } .wcard { max-width: none; border-radius: 22px 22px 0 0; max-height: 92vh; padding: 26px 20px calc(20px + env(safe-area-inset-bottom)); } .wstep { flex-wrap: wrap; } .wstep .btn { margin-left: 42px; } }
@media (prefers-reduced-motion: reduce) { .wcard { animation: none; } }
@media (max-width: 600px) { .wfoot { position: sticky; bottom: calc(-20px - env(safe-area-inset-bottom)); background: #fff; padding: 12px 0 calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); margin: 0 -4px; } }

/* ---- Inbox: kind filter, and on wide screens a flat table (one line per person) instead of tall cards ---- */
.kindbar { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.kindbar a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--text-2); font-size: 13.5px; font-weight: 600; text-decoration: none; }
.kindbar a.on { background: var(--blue-t); border-color: transparent; color: var(--blue); }
.kindbar .tn { opacity: .65; font-weight: 700; margin-left: 2px; }
.pager { display: flex; align-items: center; gap: 8px; margin: 14px 2px 0; flex-wrap: wrap; }
.ihead { display: none; }
.iact:empty { display: none; }
@media (min-width: 901px) {
  .ihead { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(0, 2fr) minmax(150px, 1.1fr) 92px; gap: 14px; padding: 9px 128px 9px 58px; border-bottom: 1px solid var(--line); background: var(--bg, #f7f8fb); color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
  .ihead span:last-child { text-align: right; }
  .inbox .imain { align-items: center; padding: 9px 8px 9px 16px; gap: 12px; }
  .inbox .pav { width: 30px; height: 30px; font-size: 13px; }
  .inbox .ibody { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(0, 2fr) minmax(150px, 1.1fr) 92px; gap: 14px; align-items: center; }
  .inbox .itop { display: contents; }
  .inbox .pname { grid-column: 1; grid-row: 1; font-size: 14.5px; }
  .inbox .iask { grid-column: 2; grid-row: 1; margin: 0; -webkit-line-clamp: 1; font-size: 14px; }
  .inbox .imeta { grid-column: 3; grid-row: 1; margin: 0; flex-wrap: nowrap; overflow: hidden; }
  .inbox .itop .ptime { grid-column: 4; grid-row: 1; text-align: right; font-size: 12.5px; }
  .inbox .pnote { grid-column: 2 / -1; grid-row: 2; margin: 0; }
  .inbox .iact, .inbox .iact:empty { display: flex; width: 110px; justify-content: flex-end; padding-right: 12px; }
}

/* ---- Live events and a visitor's session: tight rows like the Inbox, and tidy page addresses ---- */
table.live th { padding: 8px 12px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
table.live td { padding: 7px 12px; font-size: 13.5px; font-weight: 500; line-height: 1.35; }
table.live tr.session-row th { text-transform: none; letter-spacing: 0; font-size: 12.5px; color: var(--text-2); padding: 7px 12px; }
table.live .pill { font-size: 11.5px; padding: 2px 8px; white-space: nowrap; }
table.live td.pg { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.live .u { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
table.live .q { color: var(--muted); font-size: 12px; margin-left: 1px; }
table.live .xtra { font-size: 12px; margin-left: 4px; }
@media (max-width: 700px) { table.live td.pg { max-width: 190px; } }
/* live events and session lists: fixed columns so the table always spans the card and the page column takes the rest */
table.live.fx { table-layout: fixed; width: 100%; }
table.live.fx td.pg { max-width: none; }
table.live.fx td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* breakdown tables: the number and its percent sit in their own right-aligned columns */
table.brk td.n, table.brk th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.brk td.p { color: var(--muted); font-size: 11px; padding-left: 4px; }
table.brk td.lb { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 0; }
table.brk { table-layout: fixed; width: 100%; }

.kpi-vr { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kpi-vr .kv-num, .kpi-vr .kpi-v { margin-right: 0; }
.tile .chg { margin-top: 4px; }
/* stat tiles: label on top, number and trend bubble on one line, note underneath. Values line up across a row even when a label wraps */
.kpi { display: flex; flex-direction: column; }
.kpi-l { font-size: 13px; font-weight: 600; color: var(--muted); line-height: 1.35; }
.kpi-v { font-size: 28px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpi-vr { margin-top: auto; padding-top: 6px; }
.kpi-vr .kpi-v, .kpi-vr .kv-num { margin: 0; }
.kpi-s { margin-top: 2px; }
/* a quiet one-line notice: small icon chip, plain text */
.note { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; font-size: 13.5px; line-height: 1.4; }
.note .ni { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.note .ni .ico { width: 14px; height: 14px; }
.note.warn { background: var(--orange-t); color: #7a4a10; } .note.warn .ni { background: rgba(232, 137, 31, .22); color: #b8650f; }
