/* Excel Sports internal tools — DARK theme, adopted from the football
   division's Agent Portal mock (see docs/DECISIONS.md 2026-08-12).
   Brand monochrome + the single approved green accent. No light theme.
   Strict CSP: every style lives here; no inline styles anywhere. */
:root {
  --bg: #111214;
  --bg-sidebar: #0d0e10;
  --surface: #1a1b1e;
  --surface-hover: #202226;
  --surface-raised: #232529;
  --border: #2a2c30;
  --border-strong: #34373c;
  --text: #f5f6f7;
  --text-2: #9a9ea6;   /* secondary: 7.2:1 on --bg */
  --text-3: #85898f;   /* labels: 4.9:1 on --surface */
  --text-muted: var(--text-2);
  --text-dim: var(--text-3);
  --accent: #2f9e4f;         /* fills */
  --accent-bright: #63cf86;  /* text/icons on dark: 8.1:1 on --bg */
  --accent-soft: rgba(47, 158, 79, 0.14);
  --amber: #d9a13c;
  --amber-soft: rgba(217, 161, 60, 0.14);
  --red: #e06c6c;
  --red-soft: rgba(224, 108, 108, 0.14);
  --mono: "SF Mono", Menlo, Consolas, monospace;
  --radius: 8px;
  --radius-sm: 6px;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
* { box-sizing: border-box; margin: 0; }
html { -webkit-font-smoothing: antialiased; }
body {
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}
a { color: var(--text); text-decoration: none; }
a:hover { color: var(--accent-bright); }
:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 1px; }

/* ---------- shell ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 232px; flex-shrink: 0;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  padding: 16px 12px 16px;
  display: flex; flex-direction: column; gap: 16px;
  position: sticky; top: 0; height: 100vh;
}
.sidebar .logo img { height: 24px; display: block; margin: 2px 6px 4px; }
.search input {
  font: inherit; font-size: 13px; width: 100%;
  padding: 8px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text);
}
.search input::placeholder { color: var(--text-3); }
.search input:focus { outline: 2px solid var(--accent-bright); outline-offset: -1px; }
.sidebar nav { display: flex; flex-direction: column; gap: 1px; flex: 1; }
/* admin group anchors to the bottom, clear of the workspace tabs */
.nav-admin { margin-top: auto; padding-top: 18px; display: flex; flex-direction: column; gap: 1px; }
.navlabel {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .16em; color: var(--text-3);
  padding: 16px 8px 5px;
}
.sidebar nav a {
  padding: 8px 12px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500; color: var(--text-2);
  border-left: 2px solid transparent;
}
.sidebar nav a:hover { background: var(--surface); color: var(--text); }
.sidebar nav a.active {
  background: var(--surface); color: var(--accent-bright);
  border-left-color: var(--accent); font-weight: 600;
}
.sidebar-footer {
  border-top: 1px solid var(--border); padding: 12px 8px 0;
  display: flex; align-items: center; gap: 12px; font-size: 13px;
}
.sidebar-footer .avatar { width: 28px; height: 28px; font-size: 11px; flex-shrink: 0; }
.sidebar-footer a:first-of-type { font-weight: 600; }
.sidebar-footer .dim { margin-left: auto; }
.dim { color: var(--text-3); }

.mainwrap { flex: 1; display: flex; flex-direction: column; min-width: 0; }
main { flex: 1; padding: 32px 48px 64px; max-width: 1180px; width: 100%; }
footer {
  display: flex; gap: 8px; padding: 8px 48px;
  border-top: 1px solid var(--border);
  font-size: 11px; color: var(--text-3);
}
footer .sep { color: var(--border-strong); }
footer .val-bad { color: var(--red); font-weight: 600; }

/* ---------- typography ---------- */
.eyebrow {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .2em; color: var(--text-3); margin-bottom: 6px;
}
h1 { font-size: 28px; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 6px; }
h2 {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .14em; color: var(--text-3);
  margin: 32px 0 12px;
}
h2:first-of-type { margin-top: 20px; }
.meta { color: var(--text-2); margin-bottom: 10px; font-size: 13px; }
.pagehead { display: flex; align-items: center; gap: 12px; }
.money, .stat-value { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ---------- avatars ---------- */
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--surface-raised); border: 1px solid var(--border-strong);
  color: var(--text); font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; letter-spacing: .02em;
}
.avatar.big { width: 56px; height: 56px; font-size: 18px; }

/* ---------- hero ---------- */
.hero { display: flex; align-items: center; gap: 16px; margin-bottom: 6px; }
.hero .hero-text { min-width: 0; }
.hero .hero-actions { margin-left: auto; }

/* ---------- stat cards ---------- */
.statrow {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px; margin: 16px 0 8px;
}
.statcard {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 16px;
}
.statcard .label {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .14em; color: var(--text-3); margin-bottom: 6px;
}
.statcard .stat-value { font-size: 28px; font-weight: 600; line-height: 1.1; }
a.statlink { text-decoration: none; color: inherit; display: block; }
.picon { width: 15px; height: 15px; display: inline-block; vertical-align: middle; color: var(--text-3); }

/* ---- profile blocks & arrange mode ---- */
.pblock { margin-bottom: 4px; }
.pblock.pblock-hidden { opacity: .55; }
.pblockbar {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px dashed var(--border);
  border-radius: var(--radius); padding: 8px 12px; margin: 14px 0 4px;
}
.pblocktitle { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--text-3); flex: 1; }
.pblockbar .draghandle, .audiencecard .draghandle { cursor: grab; color: var(--text-3); }
.pblock.dragging, .audiencecard.dragging { opacity: .4; }
.arrangebar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius); padding: 12px 16px; margin: 12px 0;
  font-size: 13px; color: var(--text-2);
}
.visuallyhidden { position: absolute; left: -9999px; }

/* ---- linked-source pills: native platform colors ---- */
.linkedpill {
  display: inline-block; font-size: 11px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  border-radius: 6px; padding: 2px 9px; border: 0;
  text-decoration: none; cursor: pointer; line-height: 1.6;
}
.linked-sf { background: #00A1E0; color: #fff; }
.linked-yt { background: #FF0000; color: #fff; }
.linked-ig { background: linear-gradient(45deg, #F58529, #DD2A7B, #8134AF); color: #fff; }
.linked-tt { background: #000; color: #fff; border: 1px solid #444; }
.linked-x  { background: #000; color: #fff; border: 1px solid #444; }

/* ---- profile media ---- */
.avatar-img { object-fit: cover; border-radius: 50%; }
img.avatar { width: 28px; height: 28px; }
img.avatar.big { width: 64px; height: 64px; }
.mediagrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin: 12px 0; }
.mediacell { margin: 0; }
.mediathumb { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--border); display: block; }
.mediacell figcaption { display: flex; align-items: center; gap: 8px; font-size: 11px; margin-top: 4px; min-height: 18px; }

/* ---- audience cards as links + platform detail ---- */
a.cardlink { text-decoration: none; color: inherit; display: block; }
a.cardlink:hover { border-color: var(--accent); }
.trendcell { min-width: 120px; }
.trendbar { display: inline-block; height: 8px; border-radius: 4px; background: var(--text-3); vertical-align: middle; min-width: 2px; }
.trendbar.w0{width:0%}.trendbar.w5{width:5%}.trendbar.w10{width:10%}.trendbar.w15{width:15%}.trendbar.w20{width:20%}.trendbar.w25{width:25%}.trendbar.w30{width:30%}.trendbar.w35{width:35%}.trendbar.w40{width:40%}.trendbar.w45{width:45%}.trendbar.w50{width:50%}.trendbar.w55{width:55%}.trendbar.w60{width:60%}.trendbar.w65{width:65%}.trendbar.w70{width:70%}.trendbar.w75{width:75%}.trendbar.w80{width:80%}.trendbar.w85{width:85%}.trendbar.w90{width:90%}.trendbar.w95{width:95%}.trendbar.w100{width:100%}
.rawbox pre { max-width: 480px; max-height: 260px; overflow: auto; font-size: 11px; }
.legend-right { float: right; font-size: 13px; color: var(--text-3); font-weight: normal; text-transform: none; letter-spacing: 0; }
th.platform { text-align: right; }
.manualstar { color: var(--accent-bright); font-weight: 600; margin-left: 1px; }
.notlinked { font-size: 11px; }
tr[data-href] { cursor: pointer; }
tr[data-href]:hover td { background: var(--surface); }
a.statlink:hover { border-color: var(--accent); }
.radarchips { display: inline-flex; margin: 0 0 0 12px; vertical-align: middle; }
.statcard .stat-value.good { color: var(--accent-bright); }
.statcard .sub { font-size: 13px; color: var(--text-2); margin-top: 4px; }

/* ---------- progress ---------- */
.progress {
  height: 6px; border-radius: 3px; background: var(--border);
  overflow: hidden; margin: 8px 0 4px;
}
.progress .fill { height: 100%; border-radius: 3px; background: var(--text-3); }
/* CSP-safe widths in 5% steps: class w0..w100 set on the fill */
.fill.w0{width:0}.fill.w5{width:5%}.fill.w10{width:10%}.fill.w15{width:15%}
.fill.w20{width:20%}.fill.w25{width:25%}.fill.w30{width:30%}.fill.w35{width:35%}
.fill.w40{width:40%}.fill.w45{width:45%}.fill.w50{width:50%}.fill.w55{width:55%}
.fill.w60{width:60%}.fill.w65{width:65%}.fill.w70{width:70%}.fill.w75{width:75%}
.fill.w80{width:80%}.fill.w85{width:85%}.fill.w90{width:90%}.fill.w95{width:95%}
.fill.w100{width:100%}

/* ---------- quick actions ---------- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.chip {
  border: 1px solid var(--border-strong); border-radius: 6px;
  padding: 4px 16px; font-size: 13px; font-weight: 600; color: var(--text-2);
  background: var(--surface);
}
.chip:hover { color: var(--accent-bright); border-color: var(--accent); }
.chip-active { color: var(--accent-bright); border-color: var(--accent); background: var(--accent-soft); }
.bucketchips { margin-top: 20px; }

/* ---------- tables ---------- */
table {
  border-collapse: separate; border-spacing: 0; width: 100%;
  background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  font-size: 13px; font-variant-numeric: tabular-nums;
}
th, td { text-align: left; padding: 15px 16px; vertical-align: middle; }
th {
  font-size: 11px; text-transform: uppercase; letter-spacing: .12em;
  color: var(--text-3); font-weight: 600;
  background: var(--bg-sidebar); border-bottom: 1px solid var(--border);
  padding-top: 10px; padding-bottom: 10px;
}
tbody tr + tr td { border-top: 1px solid var(--border); }
tbody tr:hover { background: var(--surface-hover); }
td b, .rowmain { color: var(--text); font-weight: 600; }
.num { text-align: right; }
.nowrap { white-space: nowrap; }
.notescell { max-width: 340px; color: var(--text-2); }
td.dim { color: var(--text-3); white-space: nowrap; }
.viewlink { color: var(--text-3); font-weight: 600; white-space: nowrap; }
tr:hover .viewlink, .viewlink:hover { color: var(--accent-bright); }
.rowid { display: inline-flex; align-items: center; gap: 12px; }

/* ---------- pills (status) ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 600; letter-spacing: .04em;
  padding: 4px 12px; border-radius: 6px;
  background: var(--surface-raised); border: 1px solid var(--border-strong);
  color: var(--text-2); white-space: nowrap;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); }
.pill.available, .pill.open, .pill.active, .pill.converted, .pill.signed,
.pill.booked-ok, .pill.login_success, .pill.delivered-ok {
  color: var(--accent-bright); background: var(--accent-soft); border-color: transparent;
}
.pill.available::before, .pill.open::before, .pill.active::before,
.pill.converted::before, .pill.signed::before,
.pill.login_success::before { background: var(--accent-bright); }
.closegrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin-top: 14px; }
.pill.on_hold, .pill.explore_only, .pill.planning, .pill.negotiating,
.pill.in_conversation, .pill.watching, .pill.pending {
  color: var(--amber); background: var(--amber-soft); border-color: transparent;
}
.pill.on_hold::before, .pill.explore_only::before, .pill.planning::before,
.pill.negotiating::before, .pill.in_conversation::before,
.pill.watching::before, .pill.pending::before { background: var(--amber); }
.pill.sold_through, .pill.occupied, .pill.lockout, .pill.login_failure,
.pill.expired {
  color: var(--red); background: var(--red-soft); border-color: transparent;
}
.pill.sold_through::before, .pill.occupied::before, .pill.lockout::before,
.pill.login_failure::before, .pill.expired::before { background: var(--red); }
/* unwilling / closed / passed / delivered stay gray (the default) */

/* tags (internal/external, note kinds) */
.tag {
  font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
  padding: 2px 10px; border-radius: 6px; border: 1px solid var(--border-strong);
  background: var(--surface-raised); color: var(--text-2);
  display: inline-block;
}
.tag.internal { background: var(--text); color: var(--bg); border-color: var(--text); }
.tag.external { background: transparent; }
.flag { font-size: 11px; font-weight: 600; letter-spacing: .07em; color: var(--text-3); }
.status { font-weight: 600; text-transform: uppercase; font-size: 11px; letter-spacing: .05em; color: var(--text-2); }

/* ---------- buttons ---------- */
.btn, button {
  font: inherit; font-weight: 600; font-size: 13px;
  background: var(--accent); color: #ffffff;
  border: none; border-radius: var(--radius-sm);
  padding: 7px 15px; cursor: pointer;
  display: inline-block; text-decoration: none; line-height: 1.4;
}
.btn:hover, button:hover { background: #278a44; color: #ffffff; }
.btn.secondary {
  background: transparent; color: var(--text-2);
  border: 1px solid var(--border-strong);
}
.btn.secondary:hover { color: var(--text); border-color: var(--text-3); background: var(--surface); }
.btn.small { padding: 2px 10px; font-size: 11px; }
.btnrow { display: flex; gap: 8px; margin: 14px 0 8px; flex-wrap: wrap; align-items: center; }

/* ---------- forms ---------- */
form.record { max-width: 640px; }
.field { margin-bottom: 12px; }
.field label {
  display: block; font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .1em; color: var(--text-3); margin-bottom: 4px;
}
.field .req { color: var(--accent-bright); }
.field input, .field select, .field textarea,
.inlinefields input, .inlinefields select {
  font: inherit; font-size: 13px; width: 100%; padding: 8px 12px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text);
}
.field input::placeholder, .inlinefields input::placeholder { color: var(--text-3); }
.field input:focus, .field select:focus, .field textarea:focus,
.inlinefields input:focus, .inlinefields select:focus {
  outline: 2px solid var(--accent-bright); outline-offset: -1px;
}
.extra-pair { display: flex; gap: 8px; margin-bottom: 5px; }
.errors {
  border: 1px solid var(--red); border-left-width: 4px;
  border-radius: var(--radius-sm); background: var(--red-soft);
  padding: 12px 16px; margin-bottom: 14px; color: var(--text);
}
.errors li { margin-left: 16px; }
.warnbox {
  border-left: 3px solid var(--amber); background: var(--amber-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 8px 14px; color: var(--text-2); margin: 10px 0;
}
.dangerzone { margin-top: 30px; padding-top: 14px; border-top: 1px solid var(--border); }
/* multi-select checkbox groups */
.checkgroup {
  display: flex; flex-wrap: wrap; gap: 8px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 9px 10px; background: var(--surface);
}
.checkopt {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-2); cursor: pointer;
  border: 1px solid var(--border); border-radius: 6px; padding: 4px 12px;
}
.checkopt:hover { color: var(--text); border-color: var(--text-3); }
.checkopt input { accent-color: var(--accent); width: auto; }
.checkopt.legacyopt { border-style: dashed; }
.opthint { font-size: 13px; color: var(--text-muted); display: inline-block; margin-top: 4px; }
/* field options page */
.optiongrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 12px; }
.optioncard {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 16px;
}
.optioncard h2 { margin: 2px 0 10px; }
.optionlist { list-style: none; padding: 0; margin: 0 0 10px; }
.optionlist li {
  display: flex; align-items: center; justify-content: space-between;
  padding: 5px 2px; border-bottom: 1px solid var(--border); font-size: 13px;
}
.optionlist li:last-child { border-bottom: none; }
.optionadd { display: flex; gap: 8px; }
.optionadd input[type="text"] {
  font: inherit; font-size: 13px; flex: 1; padding: 5px 10px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--text);
}

/* ---------- login ---------- */
.loginwrap {
  max-width: 380px; margin: 90px auto; padding: 32px 32px 28px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius);
}
.loginlogo { height: 24px; width: auto; max-width: 100%;
  object-fit: contain; display: block; margin: 0; }
.forgot { margin-top: 22px; }
body.loginpage { background: var(--bg); }

/* ---------- home queue ---------- */
.queue { columns: 4 210px; column-gap: 24px; padding: 4px 0; }
.queue li { break-inside: avoid; padding: 2px 0; list-style: none; }
.queue li a { color: var(--text-2); }
.queue li a:hover { color: var(--accent-bright); }
.queue li::before { content: "› "; color: var(--text-3); font-weight: 600; }

/* ---------- + add menu ---------- */
.addmenu { position: relative; flex-shrink: 0; }
.addmenu summary {
  list-style: none; cursor: pointer; user-select: none;
  display: grid; place-items: center;
  width: 32px; height: 32px; padding: 0; box-sizing: border-box;
  border-radius: 50%;
  background: var(--accent); color: #fff;
  font-size: 22px; font-weight: 500;
  line-height: 0;            /* zero glyph box so place-items centers optically */
  padding-bottom: 2px;       /* Helvetica '+' sits high; nudge to true center */
}
.addmenu summary::-webkit-details-marker { display: none; }
.addmenu summary:hover { background: #278a44; }
.addmenu[open] summary { background: #1d6e36; }
.addmenu-items {
  position: absolute; left: 0; top: 40px; z-index: 10;
  background: var(--surface-raised); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,.4); min-width: 220px;
}
.addmenu-items a { display: block; padding: 8px 16px; font-size: 13px; font-weight: 500; color: var(--text-2); }
.addmenu-items a:hover { background: var(--surface-hover); color: var(--text); }
.addmenu-items a.addmenu-createnew { color: var(--accent-bright); font-weight: 600; }

/* ---------- prospects board ---------- */
.draghandle { cursor: grab; color: var(--text-3); user-select: none; width: 20px; }
tr.dragging { opacity: .5; }
tr.drag-hidden { display: none; }
tr.drop-placeholder td { padding: 4px 8px; border-top: none !important; }
.drop-slot {
  height: 42px; border-radius: var(--radius-sm);
  border: 2px dashed var(--accent);
  background: var(--accent-soft);
}
tr.drop-flash { animation: dropflash .7s ease-out; }
@keyframes dropflash {
  0% { background: var(--accent-soft); }
  100% { background: transparent; }
}
.arrowform { display: inline; }
.arrowform button { padding: 2px 7px; font-size: 11px; background: var(--surface-raised); color: var(--text-2); border: 1px solid var(--border-strong); }
.arrowform button:hover { color: var(--text); background: var(--surface-hover); }

/* ---------- activity / notes timeline ---------- */
.activityform .inlinefields { display: flex; gap: 8px; }
.activityform select { width: 140px; flex-shrink: 0; }
.activityform button { flex-shrink: 0; }
.activityform { max-width: 760px; }
.timeline { max-width: 760px; }
.timeline-item {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 16px; margin-bottom: 8px; background: var(--surface);
}
.timeline-meta { display: flex; gap: 12px; align-items: center; font-size: 13px; margin-bottom: 5px; color: var(--text-2); }
.timeline-body { font-size: 13px; color: var(--text); }
.revlink { margin-left: auto; font-size: 11px; }
.kindfilter { margin-top: 4px; }

@media (max-width: 900px) {
  .app { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; }
  main, footer { padding-left: 20px; padding-right: 20px; }
  .queue { columns: 2 160px; }
}

/* availability pitch cards */
.pitchcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 10px; }
.pitchhead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.pitchstats { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 6px 0; }
.blurb { display: none; }
/* calendar */
.calgrid td { vertical-align: top; height: 84px; width: 14.28%; padding: 6px 8px; }
.calempty { background: var(--bg-sidebar); }
.caldate { font-size: 11px; color: var(--text-3); font-weight: 600; margin-bottom: 4px; }
.caltoday { outline: 2px solid var(--accent); outline-offset: -2px; }
.calevent { display: block; font-size: 11px; padding: 2px 6px; margin-bottom: 3px; border-radius: 4px; background: var(--surface-raised); color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calevent.calend { background: var(--red-soft); color: var(--red); }
.filtersel { font: inherit; font-size: 13px; background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 4px 8px; }
.ctxform input { min-width: 200px; }
.shortinput { max-width: 130px; }
/* meeting view print */
@media print {
  .sidebar, footer, .noprint { display: none !important; }
  body { background: #fff; color: #000; }
  .app { display: block; }
  main { padding: 0; max-width: none; }
  table, .timeline-item { border-color: #ccc; background: #fff; }
  .pill, .tag { border: 1px solid #999; background: #fff; color: #000; }
}

.snippetbody {
  white-space: pre-wrap; font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  font-size: 13px; color: var(--text-2); margin: 6px 0 0;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 12px;
}

/* hero facts */
.herofacts { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.factchip {
  display: inline-flex; gap: 8px; align-items: baseline;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 5px 12px; font-size: 13px; color: var(--text-2); background: var(--surface);
}
.factchip.locked { border-color: var(--red); color: var(--red); }
.factlabel { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--text-3); }
.factchip.locked .factlabel { color: var(--red); opacity: .8; }
/* audience panel */
.audiencegrid { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.audiencecard .label { text-transform: uppercase; }
.audhandle { font-size: 13px; color: var(--text-3); margin: -2px 0 4px; }
.verifieddot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-bright); margin-left: 6px; vertical-align: middle;
}
.trend { margin-left: 6px; font-weight: 600; }
.trend.up { color: var(--accent-bright); }
.trend.down { color: var(--red); }
.demoblock { margin-top: 10px; }
.demolabel { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--text-3); margin-bottom: 3px; }
.demorow { display: flex; align-items: center; gap: 8px; font-size: 11px; margin-bottom: 3px; }
.demokey { width: 54px; color: var(--text-2); }
.demobar { flex: 1; height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; }
.demofill { display: block; height: 100%; background: var(--text-3); border-radius: 3px; }
.demoval { width: 32px; text-align: right; font-family: var(--mono); color: var(--text-2); }
.asof {
  font-size: 11px; color: var(--text-3); margin-top: 10px;
  padding-top: 8px; border-top: 1px solid var(--border);
}
.demofill.w0{width:0}.demofill.w5{width:5%}.demofill.w10{width:10%}.demofill.w15{width:15%}
.demofill.w20{width:20%}.demofill.w25{width:25%}.demofill.w30{width:30%}.demofill.w35{width:35%}
.demofill.w40{width:40%}.demofill.w45{width:45%}.demofill.w50{width:50%}.demofill.w55{width:55%}
.demofill.w60{width:60%}.demofill.w65{width:65%}.demofill.w70{width:70%}.demofill.w75{width:75%}
.demofill.w80{width:80%}.demofill.w85{width:85%}.demofill.w90{width:90%}.demofill.w95{width:95%}
.demofill.w100{width:100%}
.handlesbox { margin: 4px 0 8px; }
.handlesbox summary { cursor: pointer; font-size: 13px; color: var(--text-3); }
.handlesbox summary:hover { color: var(--text-2); }
.handlesbox form { margin-top: 10px; }

/* radar */
.radargrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-bottom: 8px; }
.radarcol { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; }
.radarhead { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--text-3); margin: 0 0 10px; }
.radaritem { display: flex; gap: 12px; align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.radaritem:last-child { border-bottom: none; }
.radaritem:hover { background: var(--surface-hover); }
.radardays { font-family: var(--mono); font-size: 13px; color: var(--text-2); min-width: 44px; }
.radardays.good { color: var(--accent-bright); }
.radarbody { color: var(--text-2); }
.radarbody b { color: var(--text); }
.allclear { color: var(--accent-bright); font-size: 13px; padding: 6px 0; }
.healthcard .sub { margin-top: 6px; }
/* staleness */
.age-fresh { color: var(--text-3); }
.age-warn { color: var(--amber); }
.age-stale { color: var(--red); }
.age-unknown { color: var(--text-3); }
.auditfilters { margin-bottom: 4px; }
.wideform { max-width: 900px; }

/* ---------- keyboard layer ---------- */
.kbd {
  display: inline-block; font-family: var(--mono); font-size: 11px;
  color: var(--text-2); background: var(--surface-raised);
  border: 1px solid var(--border-strong); border-radius: 6px;
  padding: 0 6px; line-height: 1.7; min-width: 18px; text-align: center;
}
.shortcuts-pop {
  position: fixed; right: 24px; bottom: 48px; z-index: 60;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius); padding: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,.4); min-width: 240px;
  display: none;
}
.shortcuts-pop.open { display: block; }
.shortcuts-pop h3 {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .14em; color: var(--text-3); margin: 0 0 12px;
}
.shortcut-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-2); padding: 4px 0;
}
.shortcut-row .keys { margin-left: auto; display: flex; gap: 4px; }

/* ---------- hero enrichment ---------- */
.herophoto { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.photomenu { position: relative; }
.photomenu summary { list-style: none; cursor: pointer; }
.photomenu summary::-webkit-details-marker { display: none; }
.photoform {
  position: absolute; z-index: 50; top: 28px; left: 0;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius); padding: 12px; min-width: 240px;
  display: flex; flex-direction: column; gap: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
.photoform select, .photoform input[type=text] {
  font: inherit; font-size: 13px; background: var(--bg); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 4px 8px;
}
.lifecycle {
  display: inline-block; vertical-align: middle; margin-left: 8px;
  font-size: 11px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; border-radius: 6px; padding: 2px 8px;
  border: 1px solid var(--border-strong); color: var(--text-2);
}
.lifecycle-active { color: var(--accent-bright); border-color: var(--accent); }
.lifecycle-renewal_window { color: var(--amber); border-color: var(--amber); }
.lifecycle-quiet { color: var(--text-3); }
.lifecycle-offboarded { color: var(--red); border-color: var(--red); }
.commstrip {
  display: flex; gap: 24px; flex-wrap: wrap; align-items: baseline;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 8px 0; margin: 12px 0; font-size: 13px; color: var(--text-2);
}
.commitem .factlabel { margin-right: 8px; }

/* ---------- socials band ---------- */
.platicon { width: 14px; height: 14px; vertical-align: text-bottom; }
.audlabel { display: flex; align-items: center; gap: 8px; }
.audplatlink { color: var(--text-3); }
.audplatlink:hover { color: var(--accent-bright); }
.audhandle a { color: var(--text-2); }
.handlelist li span { display: inline-flex; align-items: center; gap: 8px; }
.platpick { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.platoption input { position: absolute; left: -9999px; }
.platchip {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font-size: 13px; color: var(--text-2); border: 1px solid var(--border);
  border-radius: 6px; padding: 4px 12px;
}
.platoption input:checked + .platchip {
  border-color: var(--accent); color: var(--text);
}
.platoption input:focus-visible + .platchip { outline: 2px solid var(--accent-bright); outline-offset: 1px; }

/* ---------- composer ---------- */
.composerlist {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 4px; margin: 12px 0; max-height: 420px; overflow-y: auto;
  border: 1px solid var(--border); border-radius: var(--radius); padding: 12px;
}
.composerclient { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 4px; cursor: pointer; }
.composerclient:hover { background: var(--surface); border-radius: var(--radius-sm); }
.posinput {
  width: 56px; font: inherit; font-size: 13px; background: var(--bg);
  color: var(--text); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: 4px 8px;
}
.composed { max-width: 720px; white-space: pre-wrap; }

/* ---------- pipeline kanban ---------- */
.kanban { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 16px 0; align-items: start; }
.kanbancol { background: var(--bg-sidebar); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; min-height: 64px; }
.kanbancol.dropready { border-color: var(--accent); }
.kanbancol .radarhead { margin: 4px 4px 8px; }
.kanbancards { display: flex; flex-direction: column; gap: 8px; min-height: 24px; }
.kanbancard {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 12px; font-size: 13px;
}
.kanbancard[draggable="true"] { cursor: grab; }
.kanbancard[draggable="true"]:hover { border-color: var(--border-strong); }
.kanbancard.dragging { opacity: .4; }
.kanbanhead { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.kanbanco { font-weight: 500; }
.kanbanactions { margin: 8px 0 0; }
.kanban-mini .kanbancol { padding: 4px 8px 8px; }

/* ---------- pitch chips, sortable tables, mini-nav ---------- */
.pitchchips { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.pitchchip { text-decoration: none; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--text); }
th.sort-asc::after { content: " ▲"; font-size: 11px; }
th.sort-desc::after { content: " ▼"; font-size: 11px; }
.notesearch { min-width: 260px; }
.mininav {
  position: sticky; top: 0; z-index: 40;
  display: flex; gap: 16px; flex-wrap: wrap;
  background: var(--bg); border-bottom: 1px solid var(--border);
  padding: 8px 0; margin: 8px 0 4px;
}
.mininav a {
  font-size: 11px; font-weight: 500; text-transform: uppercase;
  letter-spacing: .14em; color: var(--text-3);
}
.mininav a:hover { color: var(--accent-bright); }

/* ---------- topbar & collapsible sidebar ---------- */
.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 16px; border-bottom: 1px solid var(--border);
  background: var(--bg); position: sticky; top: 0; z-index: 50;
  min-height: 44px;
}
.hamburger {
  width: 36px; height: 36px; display: inline-flex; align-items: center;
  justify-content: center; background: none; border: 1px solid transparent;
  border-radius: var(--radius-sm); color: var(--text-2); cursor: pointer;
  padding: 0; flex-shrink: 0;
}
.hamburger:hover { border-color: var(--border-strong); color: var(--text); }
.hamburger svg { width: 18px; height: 18px; }
.topbar-title {
  font-size: 13px; font-weight: 600; color: var(--text-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
.topbar-user { margin-left: auto; display: none; gap: 12px; font-size: 13px; }
.app.nav-collapsed .sidebar { display: none; }
.scrim { display: none; }

/* ---------- mobile (<768px): drawer + stacking ---------- */
@media (max-width: 767px) {
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; height: 100vh; width: 280px;
    z-index: 70; transform: translateX(-100%); transition: transform .18s ease;
    border-right: 1px solid var(--border-strong);
  }
  .app.nav-collapsed .sidebar { display: flex; }  /* drawer wins on mobile */
  .app.drawer-open .sidebar { transform: none; }
  .app.drawer-open .scrim {
    display: block; position: fixed; inset: 0; z-index: 60;
    background: rgba(0, 0, 0, .55);
  }
  .topbar-user { display: inline-flex; }
  main { padding: 16px; }
  footer { padding: 8px 16px; }

  /* profile compression */
  .hero { flex-wrap: wrap; }
  .avatar.big, img.avatar.big { width: 48px; height: 48px; font-size: 16px; }
  .hero .hero-actions { margin-left: 0; }
  .commstrip { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
  .mininav { overflow-x: auto; flex-wrap: nowrap; white-space: nowrap;
             -webkit-overflow-scrolling: touch; }
  .statrow, .audiencegrid { grid-template-columns: 1fr; }
  .kanban { grid-template-columns: 1fr; }
  .composerlist { grid-template-columns: 1fr; }
  .logisticsgrid { grid-template-columns: 1fr; }

  /* comfortable tap targets; 16px inputs stop iOS zoom-on-focus */
  .btn, button, select { min-height: 44px; }
  .btn.small, button.btn.small { min-height: 36px; }
  input, select, textarea { font-size: 16px !important; }
  .activityform input[type=text], .activityform select { min-height: 44px; }
}

/* ---------- stacked tables (<640px): data-label key-value rows ---------- */
@media (max-width: 639px) {
  table.stackable thead { display: none; }
  table.stackable, table.stackable tbody { display: block; }
  table.stackable tr {
    display: block; border: 1px solid var(--border);
    border-radius: var(--radius); margin-bottom: 8px; padding: 8px 12px;
    background: var(--surface);
  }
  table.stackable td {
    display: flex; gap: 12px; border: 0; padding: 4px 0; align-items: baseline;
  }
  table.stackable td::before {
    content: attr(data-label);
    font-size: 11px; font-weight: 600; text-transform: uppercase;
    letter-spacing: .1em; color: var(--text-3); min-width: 88px; flex-shrink: 0;
  }
  table.stackable td:empty, table.stackable td.stack-hide { display: none; }
}

/* ---------- logistics block ---------- */
.logisticsgrid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px; margin: 12px 0;
}
.logline { font-size: 13px; color: var(--text); margin: 4px 0; }
.logline .factlabel { margin-right: 8px; }
.logaddr { white-space: pre-line; }
.pill.unwilling::before { background: var(--red); }

/* movemenu (kanban touch path) */
.movemenu { position: relative; display: inline-block; }
.movemenu summary { list-style: none; }
.movemenu summary::-webkit-details-marker { display: none; }
.movemenu .addmenu-items { right: auto; left: 0; }
.movebtn {
  display: block; width: 100%; text-align: left; background: none; border: 0;
  color: var(--text-2); font: inherit; font-size: 13px; padding: 8px 16px;
  cursor: pointer; min-height: 36px;
}
.movebtn:hover { background: var(--surface-raised); color: var(--text); }

/* ---------- dual-mark identity: Shepherd is the software, the org is the account ---------- */
.productmark {
  font-size: 18px; font-weight: 600; letter-spacing: -0.01em;
  color: var(--text); line-height: 1.2;
}
/* the corner mark sits quiet: top right, 33% transparent */
.productmark-corner {
  margin-left: auto; font-size: 14px; opacity: .67; color: var(--text-2);
}
.topbar-user { margin-left: auto; }
@media (max-width: 767px) {
  .topbar-user + .productmark-corner { margin-left: 16px; }
}

.loginheading { margin-bottom: 24px; }
.orgidentity { margin: 0 0 24px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }

/* ---------- admin landing ---------- */
.admincards .statcard .sub { min-height: 40px; }
.admincount { font-size: 13px; color: var(--text-2); margin-top: 8px; font-weight: 500; }

/* condensed materials chips */
.matrow { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 4px; }
.matchip { padding: 0; }
.matcopy {
  background: none; border: 0; color: var(--text-2); font: inherit;
  font-size: 13px; cursor: pointer; padding: 4px 12px;
}
.matcopy:hover { color: var(--accent-bright); }
.matfiles { line-height: 2; }

/* sorted roster: drag suspended, handles dim */
table.sort-active .draghandle { opacity: .3; cursor: default; }

/* ---------- hero button variants ---------- */
/* + Add new: regular button shape, the green lives in the label */
.heroadd summary.btn.addnew {
  display: inline-flex; align-items: center; justify-content: center;
  width: auto; height: auto; padding: 8px 14px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border-strong);
  color: var(--accent-bright); font-size: 13px; font-weight: 600;
  line-height: 1.5; list-style: none; cursor: pointer;
}
.heroadd[open] summary.btn.addnew, .heroadd summary.btn.addnew:hover {
  background: var(--surface); border-color: var(--accent);
}
.heroadd summary.btn.addnew::-webkit-details-marker { display: none; }
.heroadd { position: relative; display: inline-block; }
.heroadd .addmenu-items { left: 0; right: auto; top: 40px; }
/* Meeting view: the Excel logo grey */
.btn.gray { background: #85898f; color: #111214; }
.btn.gray:hover { background: #9a9ea6; color: #111214; }
