/* SSV6 Leads — admin panel.
   Brand colours and type match the public site (style.src.css). */

:root {
  --bg: #f4f4f6;
  --white: #fff;
  --ink: #1d1d1f;
  --ink2: #6e6e73;
  --ink3: #8e8e93;
  --line: #e3e3e8;
  --line2: #d2d2d7;
  --olive: #5d7414;
  --olive-2: #7a961f;
  --lime: #d4ff3f;
  --black: #0a0a0a;
  --panel-dark: #141416;
  --warn: #c4161c;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --side: 248px;
  --side-rail: 76px;
  --radius: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -.011em;
  line-height: 1.5;
  font-size: 15px;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
svg { display: block; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }
:focus-visible { outline: 2px solid var(--olive-2); outline-offset: 2px; border-radius: 6px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 300;
  background: var(--ink); color: #fff; padding: 10px 16px;
  border-radius: 10px; font-weight: 600; transition: top .2s;
}
.skip:focus { top: 12px; }

/* ================================================================ shell */

.shell { display: flex; min-height: 100vh; }

.side {
  position: fixed; inset: 0 auto 0 0; z-index: 60;
  width: var(--side);
  background: var(--black);
  color: #f5f5f7;
  display: flex; flex-direction: column;
  transition: width .25s var(--ease), transform .25s var(--ease);
}

.side-head {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 16px 14px;
}
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; flex: 1; }
.brand .mark { flex: 0 0 26px; }
.wordmark { display: flex; flex-direction: column; line-height: 1; min-width: 0; }
.wordmark b { font-size: 17px; font-weight: 800; letter-spacing: -.04em; }
.wordmark b i { font-style: normal; color: var(--lime); }
.wordmark small { font-size: 7px; letter-spacing: .4em; font-weight: 600; opacity: .55; margin-top: 3px; }

.iconbtn {
  display: grid; place-items: center;
  width: 32px; height: 32px; flex: 0 0 32px;
  border-radius: 9px; color: inherit; opacity: .55;
  transition: opacity .2s, background .2s;
}
.iconbtn:hover { opacity: 1; background: rgba(255, 255, 255, .1); }

.side-nav { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; flex: 1; overflow-y: auto; }
.side-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 11px;
  font-size: 14px; font-weight: 500; color: rgba(245, 245, 247, .72);
  transition: background .18s, color .18s;
  white-space: nowrap;
}
.side-nav a svg { width: 19px; height: 19px; flex: 0 0 19px; }
.side-nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.side-nav a.on { background: rgba(255, 255, 255, .11); color: #fff; }
.side-nav a.on svg { color: var(--lime); }
.side-nav a span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.badge {
  font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 980px;
  background: rgba(255, 255, 255, .14); color: #fff;
}
.badge.hot { background: var(--lime); color: #000; }

.side-foot {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px 16px; margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, .1);
}
.me { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; border-radius: 11px; padding: 4px; }
.me:hover { background: rgba(255, 255, 255, .07); }
.avatar {
  display: grid; place-items: center; flex: 0 0 32px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--lime); color: #000; font-weight: 700; font-size: 14px;
}
.me-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.me-text b { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-text small { font-size: 11px; opacity: .5; }

/* collapsed rail */
.shell.rail .side { width: var(--side-rail); }
.shell.rail .wordmark,
.shell.rail .side-nav span,
.shell.rail .badge,
.shell.rail .me-text { display: none; }
.shell.rail .side-head { justify-content: center; padding: 18px 10px 14px; }
.shell.rail .brand { flex: 0; justify-content: center; }
.shell.rail #collapse { display: none; }
.shell.rail .side-nav a { justify-content: center; padding: 11px; }
.shell.rail .side-foot { flex-direction: column; gap: 10px; }
.shell.rail .me { flex: 0; justify-content: center; }
.shell.rail .main { margin-left: var(--side-rail); }

.main { flex: 1; min-width: 0; margin-left: var(--side); transition: margin-left .25s var(--ease); }

.appbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 12px;
  min-height: 60px; padding: 0 clamp(24px, 2.6vw, 44px);
  padding-top: env(safe-area-inset-top);
  background: rgba(244, 244, 246, .82);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.appbar-mark { display: none; flex: 0 0 26px; }
.appbar-title {
  font-size: 15px; font-weight: 700; letter-spacing: -.02em;
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.appbar-actions { display: flex; align-items: center; gap: 10px; }
.appbar-chip {
  display: inline-flex; align-items: center; gap: 7px;
  height: 30px; padding: 0 13px; border-radius: 980px;
  background: var(--ink); color: #fff;
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.appbar-chip:hover { background: #000; }
.ping { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); flex: 0 0 7px; animation: ping 2s ease-in-out infinite; }
@keyframes ping { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.avatar.sm {
  width: 30px; height: 30px; flex: 0 0 30px; font-size: 13px;
  background: var(--ink); color: var(--lime);
}
.avatar.sm:hover { background: #000; }

/* The page body. Generous breathing room on all four sides, and centred
   rather than hugging the sidebar once the window gets wide. */
.content {
  padding: clamp(24px, 2.6vw, 44px);
  max-width: 1400px;
  margin: 0 auto;
}

body.app { -webkit-tap-highlight-color: rgba(0, 0, 0, .06); }

/* bottom tab bar — mobile only, shown by the media query below */
.tabbar { display: none; }

/* ============================================================ page head */

.pagehead {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; margin-bottom: 22px;
}
.pagehead h1 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; letter-spacing: -.04em; line-height: 1.08; }
.sub { color: var(--ink2); font-size: 14px; margin-top: 4px; }
.back { display: inline-block; font-size: 13.5px; color: var(--ink2); margin-bottom: 14px; }
.back:hover { color: var(--ink); }
.small-link { font-size: 13px; color: var(--ink2); font-weight: 500; }
.small-link:hover { color: var(--ink); }
.note { font-size: 12.5px; color: var(--ink3); margin-top: 10px; line-height: 1.55; }
.note a { text-decoration: underline; }

.btn {
  display: inline-block; background: var(--ink); color: #fff;
  padding: 10px 20px; border-radius: 980px; font-size: 14px; font-weight: 600;
  transition: transform .25s var(--ease), background .2s, opacity .2s;
}
.btn:hover { transform: translateY(-1px); background: #000; }
.btn.ghost { background: var(--white); color: var(--ink); border: 1px solid var(--line2); }
.btn.ghost:hover { background: var(--white); border-color: var(--ink); }
.btn.warn { background: var(--warn); }
.btn.block { width: 100%; text-align: center; }
.btn[disabled] { opacity: .6; pointer-events: none; }

/* =============================================================== panels */

.panel {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 22px; margin-bottom: 16px;
}
.panel.flush { padding: 0; overflow: hidden; }
.panel.danger { border-color: #f1d9da; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel-head h2 {
  font-size: 11px; letter-spacing: .09em; text-transform: uppercase;
  color: var(--ink2); font-weight: 700;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.grid-2 > .panel { margin-bottom: 0; }
.grid-2 { margin-bottom: 16px; }

/* ================================================================ tiles */

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.tile {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px;
}
.tile small { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink2); font-weight: 700; }
.tile b { display: block; font-size: 32px; font-weight: 800; letter-spacing: -.045em; margin: 8px 0 2px; }
.tile .foot { font-size: 12.5px; color: var(--ink3); }
.tile.accent { background: var(--panel-dark); color: #f5f5f7; border-color: var(--panel-dark); }
.tile.accent b { color: var(--lime); }
.tile.accent small { color: rgba(245, 245, 247, .55); }
.tile.accent .foot { color: rgba(245, 245, 247, .45); }

/* =============================================================== funnel */

.funnel { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.stage {
  display: block; padding: 12px 14px; border-radius: 12px;
  background: #fafafb; border: 1px solid var(--line);
  transition: border-color .2s, transform .2s var(--ease);
}
.stage:hover { border-color: var(--line2); transform: translateY(-1px); }
.stage .n { display: block; font-size: 24px; font-weight: 800; letter-spacing: -.04em; }
.stage .l { display: block; font-size: 11.5px; color: var(--ink2); margin: 2px 0 9px; }
.stage .track, .bars .track { display: block; height: 4px; border-radius: 4px; background: #e9e9ee; overflow: hidden; }
.stage .fill { display: block; height: 100%; border-radius: 4px; background: var(--ink); min-width: 2px; }

/* ================================================================= bars */

.bars { list-style: none; display: flex; flex-direction: column; gap: 11px; }
/* The grid goes on the row wrapper, not on each child: rows that are not
   links use <span class="row"> so both shapes lay out identically. */
.bars li > a, .bars li > .row { display: grid; grid-template-columns: minmax(96px, 38%) 1fr 34px; gap: 12px; align-items: center; }
.bars li > a { border-radius: 8px; }
.bars li > a:hover .k { color: var(--ink); }
.bars .k { font-size: 13.5px; color: var(--ink2); display: flex; align-items: center; gap: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bars .v { font-size: 13.5px; font-weight: 700; text-align: right; }
.bars .fill { display: block; height: 100%; border-radius: 4px; background: var(--olive-2); min-width: 2px; }
.bars .fill.hot { background: var(--lime); }
.bars .fill.warm { background: var(--olive-2); }
.bars .fill.cold { background: #c9c9d0; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; }
.dot.hot { background: var(--lime); }
.dot.warm { background: var(--olive-2); }
.dot.cold { background: #c9c9d0; }

/* =============================================================== recent */

.recent { list-style: none; display: flex; flex-direction: column; }
.recent li + li { border-top: 1px solid #f0f0f3; }
.recent a { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.recent a:hover .who b { color: var(--olive); }
.recent .who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.recent .who b { font-size: 14px; font-weight: 600; }
.recent .who small { font-size: 12.5px; color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent .ago { font-size: 12px; color: var(--ink3); white-space: nowrap; }

/* ============================================================== filters */

.filters {
  display: flex; flex-wrap: wrap; gap: 9px; align-items: center;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 13px; margin-bottom: 16px;
}
.searchfield { position: relative; flex: 1 1 280px; min-width: 190px; }
.searchfield svg { position: absolute; left: 13px; top: 50%; margin-top: -8px; width: 16px; height: 16px; color: var(--ink3); }
.searchfield input { width: 100%; padding-left: 38px; }
.filters input, .filters select {
  font: inherit; font-size: 14px; padding: 9px 13px; border-radius: 11px;
  border: 1px solid var(--line2); background: #fbfbfd; color: var(--ink);
  appearance: none; -webkit-appearance: none;
}
.filters input:focus, .filters select:focus { outline: 0; border-color: var(--olive-2); box-shadow: 0 0 0 3px rgba(122, 150, 31, .15); }
.filters select { padding-right: 28px; }
.filters .btn { padding: 9px 19px; }
.filters .clear { font-size: 13px; color: var(--ink2); text-decoration: underline; }

/* ================================================================ table */

.tablewrap { overflow-x: auto; }
table.leads { width: 100%; border-collapse: collapse; font-size: 14px; }
table.leads th {
  text-align: left; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink2); font-weight: 700; padding: 13px 18px;
  border-bottom: 1px solid var(--line); background: #fafafb; white-space: nowrap;
}
table.leads td { padding: 13px 18px; border-bottom: 1px solid #f0f0f3; vertical-align: top; }
table.leads tr:last-child td { border-bottom: 0; }
table.leads tbody tr { cursor: pointer; transition: background .15s; }
table.leads tbody tr:hover { background: #fafafb; }
.who-link { font-weight: 600; }
.who-link:hover { color: var(--olive); }
.meta { display: block; color: var(--ink2); font-size: 12.5px; margin-top: 2px; }
.when { color: var(--ink2); font-size: 13px; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.pager { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 18px; font-size: 14px; color: var(--ink2); }
.pager a:hover { color: var(--ink); text-decoration: underline; }

/* ======================================================= score and pills */

.score { display: flex; align-items: center; gap: 9px; }
.pri {
  display: inline-grid; place-items: center; min-width: 30px; height: 24px;
  padding: 0 7px; border-radius: 7px; font-size: 12.5px; font-weight: 700;
}
.pri.hot { background: var(--lime); color: #000; }
.pri.warm { background: #ebebef; color: var(--ink); }
.pri.cold { background: #f4f4f6; color: var(--ink2); }
.pri.large { min-width: 56px; height: 46px; font-size: 21px; border-radius: 13px; }
.score .bar { display: block; width: 54px; height: 4px; border-radius: 4px; background: #e9e9ee; overflow: hidden; }
.score .bar > span { display: block; height: 100%; background: var(--olive-2); border-radius: 4px; }
.scoreblock { text-align: center; }
.scoreblock small { display: block; margin-top: 6px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink2); font-weight: 700; }

.pill {
  display: inline-block; padding: 5px 12px; border-radius: 980px;
  font-size: 12.5px; font-weight: 600; white-space: nowrap; border: 1px solid transparent;
}
.s-new { background: var(--lime); color: #000; }
.s-contacted { background: #e7eef7; color: #2b4a73; }
.s-qualified { background: #e8f0d8; color: var(--olive); }
.s-proposal { background: #fdf0d8; color: #8a5a00; }
.s-won { background: #daf2e2; color: #166b38; }
.s-lost { background: #efeff2; color: var(--ink2); }
.fill.s-new { background: var(--olive-2); }
.fill.s-contacted { background: #4a7ab5; }
.fill.s-qualified { background: var(--olive); }
.fill.s-proposal { background: #c08a1e; }
.fill.s-won { background: #2a9057; }
.fill.s-lost { background: #b8b8c0; }

.statusform { display: flex; flex-wrap: wrap; gap: 8px; }
.statusform .pill { border-color: var(--line2); background: #fbfbfd; color: var(--ink2); transition: transform .2s var(--ease); }
.statusform .pill:hover { transform: translateY(-1px); }
.statusform .pill.current { border-color: transparent; }
.statusform .pill.current.s-new { background: var(--lime); color: #000; }
.statusform .pill.current.s-contacted { background: #e7eef7; color: #2b4a73; }
.statusform .pill.current.s-qualified { background: #e8f0d8; color: var(--olive); }
.statusform .pill.current.s-proposal { background: #fdf0d8; color: #8a5a00; }
.statusform .pill.current.s-won { background: #daf2e2; color: #166b38; }
.statusform .pill.current.s-lost { background: #e4e4e8; color: var(--ink); }

/* =============================================================== board */

.board {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr);
  gap: 12px; overflow-x: auto; padding-bottom: 10px; align-items: start;
}
.col { background: #ededf1; border-radius: var(--radius); padding: 12px; min-height: 140px; }
.col-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 12px; }
.col-head h2 { font-size: 12.5px; font-weight: 700; flex: 1; letter-spacing: -.01em; }
.col-head b { font-size: 12px; font-weight: 700; color: var(--ink2); background: #fff; padding: 1px 8px; border-radius: 980px; }
.dot-s { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 9px; }
.col-body { display: flex; flex-direction: column; gap: 9px; }
.col-empty { font-size: 12.5px; color: var(--ink3); padding: 6px 4px; }
.lcard { background: var(--white); border-radius: 12px; padding: 11px 12px; border: 1px solid var(--line); }
.lcard-main { display: flex; align-items: center; gap: 10px; }
.lcard-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.lcard-text b { font-size: 13.5px; font-weight: 600; }
.lcard-text small { font-size: 12px; color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lcard-main:hover .lcard-text b { color: var(--olive); }
.lcard-meta { font-size: 12px; color: var(--ink3); margin-top: 8px; line-height: 1.4; }
.lcard-move { display: flex; justify-content: space-between; margin-top: 9px; }
.lcard-move .spacer { width: 26px; }
.lcard-move button {
  width: 26px; height: 26px; border-radius: 8px; font-size: 13px;
  color: var(--ink2); background: #f4f4f6; transition: background .18s, color .18s;
}
.lcard-move button:hover { background: var(--ink); color: #fff; }

/* ================================================================ facts */

.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 22px; }
.facts.wide { grid-template-columns: repeat(3, 1fr); }
.facts dt { font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink2); font-weight: 700; margin-bottom: 4px; }
.facts dd { font-size: 15px; font-weight: 500; }
.facts dd a:hover { text-decoration: underline; }
.break { word-break: break-all; font-size: 13px !important; color: var(--ink2); }
.chip { display: inline-block; background: #f4f4f6; border-radius: 7px; padding: 2px 8px; margin: 0 4px 4px 0; font-size: 12px; }
.warnmark { color: var(--warn); font-size: 13px; font-weight: 600; }
.quote { font-size: 16px; line-height: 1.65; white-space: pre-wrap; }

/* ================================================================ notes */

.notes { list-style: none; margin-bottom: 18px; }
.notes li { border-left: 2px solid var(--lime); padding: 2px 0 2px 14px; margin-bottom: 15px; }
.notes p { white-space: pre-wrap; }
.notes small { color: var(--ink2); font-size: 12.5px; }
.noteform textarea, .stack input, .stack textarea {
  width: 100%; font: inherit; font-size: 15px; padding: 11px 14px;
  border-radius: 12px; border: 1px solid var(--line2); background: #fbfbfd; color: var(--ink);
  resize: vertical;
}
.noteform textarea { margin-bottom: 11px; }
.noteform textarea:focus, .stack input:focus {
  outline: 0; border-color: var(--olive-2); box-shadow: 0 0 0 3px rgba(122, 150, 31, .15);
}
.stack { display: flex; flex-direction: column; }
.stack label { font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink2); font-weight: 700; margin: 14px 0 6px; }
.stack label:first-of-type { margin-top: 0; }
.stack input:disabled { background: #f4f4f6; color: var(--ink3); }
.stack .btn { align-self: flex-start; margin-top: 18px; }
.stack .note + .btn { margin-top: 14px; }

/* ================================================== flash, empty, errors */

.flash {
  background: var(--lime); color: #000; font-size: 13.5px; font-weight: 600;
  padding: 10px 16px; border-radius: 12px; margin-bottom: 16px;
  transition: opacity .5s, transform .5s;
}
.flash.gone { opacity: 0; transform: translateY(-4px); }
.alert {
  background: #fdeaea; color: var(--warn); border: 1px solid #f3cfd0;
  font-size: 13.5px; padding: 10px 14px; border-radius: 12px; margin-bottom: 16px;
}
.empty {
  background: var(--white); border: 1px dashed var(--line2); border-radius: var(--radius);
  padding: 54px 28px; text-align: center;
}
.empty .sub { margin-top: 6px; }
.empty a { text-decoration: underline; }
.detail { background: #fbfbfd; border: 1px solid var(--line); border-radius: 12px; padding: 14px; font-size: 13px; overflow: auto; margin-bottom: 16px; }

/* =============================================================== signin */

body.plain { background: var(--bg); }
.plain-main { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.signin { width: 100%; max-width: 400px; }
.signin-card { background: var(--white); border: 1px solid var(--line); border-radius: 22px; padding: 34px 32px; }
.signin-mark { display: block; margin-bottom: 20px; }
.signin-card h1 { font-size: 27px; font-weight: 800; letter-spacing: -.04em; }
.signin-card .sub { margin-bottom: 22px; }
.signin-foot { text-align: center; font-size: 12px; color: var(--ink3); margin-top: 18px; }

/* ============================================================== tabbar */

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: rgba(10, 10, 10, .94);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 4px 7px; color: rgba(245, 245, 247, .55);
  font-size: 10.5px; font-weight: 600; letter-spacing: -.005em;
  transition: color .18s;
  -webkit-tap-highlight-color: transparent;
}
.tabbar a.on { color: #fff; }
.tab-ico { position: relative; display: block; }
.tabbar svg { width: 23px; height: 23px; }
.tabbar a.on svg { color: var(--lime); }
.tab-dot {
  position: absolute; top: -4px; right: -8px;
  min-width: 17px; height: 17px; padding: 0 5px;
  display: grid; place-items: center; border-radius: 980px;
  background: var(--lime); color: #000; font-size: 10px; font-weight: 800;
  border: 2px solid #0a0a0a;
}

/* =========================================================== responsive */

@media (max-width: 1080px) {
  .funnel { grid-template-columns: repeat(3, 1fr); }
  .facts.wide { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .facts, .facts.wide { grid-template-columns: 1fr; }
}

/* ---- phone: sidebar out, bottom tabs in ---- */
@media (max-width: 760px) {
  .side { display: none; }
  .main, .shell.rail .main { margin-left: 0; }
  .tabbar { display: flex; }

  .appbar { min-height: 54px; gap: 10px; }
  .appbar-mark { display: block; }
  .appbar-title { font-size: 16px; font-weight: 800; letter-spacing: -.03em; }

  /* clear the tab bar, plus the home indicator on iPhone */
  .content {
    padding: 18px 16px calc(84px + env(safe-area-inset-bottom));
  }

  .pagehead h1 { font-size: 27px; }
  .pagehead { margin-bottom: 18px; }
  .panel { padding: 16px 16px; border-radius: 14px; }
  .tile { padding: 15px 16px; border-radius: 14px; }
  .tile b { font-size: 28px; }

  /* comfortable thumb targets */
  .btn { padding: 12px 22px; }
  .filters { padding: 11px; gap: 8px; }
  .filters input, .filters select { padding: 11px 13px; font-size: 16px; } /* 16px stops iOS zooming on focus */
  .searchfield input { padding-left: 38px; }
  .statusform .pill { padding: 9px 15px; }

  /* ---- the leads table becomes a list of cards ---- */
  table.leads thead { display: none; }
  table.leads, table.leads tbody, table.leads tr, table.leads td { display: block; }
  table.leads tr {
    display: grid; grid-template-columns: 1fr auto; gap: 3px 12px;
    padding: 14px 16px; border-bottom: 1px solid #f0f0f3;
  }
  table.leads td { padding: 0; border: 0; }
  table.leads td:nth-child(1) { grid-column: 1 / -1; order: 5; font-size: 11.5px; color: var(--ink3); margin-top: 7px; }
  table.leads td:nth-child(2) { grid-column: 1; grid-row: 1; order: 1; }
  table.leads td:nth-child(2) .who-link { font-size: 15.5px; }
  table.leads td:nth-child(3) { grid-column: 1; order: 2; font-size: 13.5px; color: var(--ink2); margin-top: 3px; }
  table.leads td:nth-child(3) .meta { display: inline; margin: 0; }
  table.leads td:nth-child(3) .meta::before { content: " · "; }
  table.leads td:nth-child(4) { grid-column: 1; order: 3; font-size: 13px; color: var(--ink3); margin-top: 2px; }
  table.leads td:nth-child(5) { grid-column: 2; grid-row: 1; order: 4; }
  table.leads td:nth-child(5) .bar { display: none; }
  table.leads td:nth-child(6) { grid-column: 2; order: 6; justify-self: end; align-self: end; }

  .board { grid-auto-columns: minmax(230px, 86%); gap: 10px; }
  .pager { gap: 14px; }
  .quote { font-size: 15.5px; }
  .signin-card { padding: 28px 22px; }
}

@media (max-width: 520px) {
  .tiles { grid-template-columns: 1fr; }
  .funnel { grid-template-columns: repeat(2, 1fr); }
  .bars li > a, .bars li > .row { grid-template-columns: minmax(80px, 46%) 1fr 28px; gap: 9px; }
  .filters .btn, .filters .clear { flex: 1; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Signing out lives in the sidebar on desktop; on a phone there is no
   sidebar, so Settings carries it. Hidden where the sidebar already has it. */
.signout-panel { display: none; }
@media (max-width: 760px) {
  .signout-panel { display: block; }
  .signout-panel .btn { margin-top: 12px; }
}
