/* Meeting Status app, vanilla, no build step.
   Light theme only (by design, no dark mode, no toggle). */

:root {
  color-scheme: light;
  /* "blue" = the app's one interactive/brand accent (teal-green, matching the
     Marlink×Datarails reference look), used for buttons, links, focus,
     active tab AND the Scheduled status, same as the reference dashboard. */
  --blue: #276b5c;
  --blue-dark: #1c5548;
  --blue-bg: #dcebe4;
  --navy: #14181c;           /* topbar / login backdrop, stays dark in both themes */
  --navy-text: #ffffff;
  --bg: #f6f5f1;             /* warm "paper" background */
  --surface: #ffffff;
  --surface-2: #f0efe9;      /* table headers, subtle fills */
  --hover: #f3f2ed;          /* row hover */
  --border: #e2e0d8;
  --text: #1e2530;
  --muted: #5b6572;
  --neutral: #52607a;        /* "no status" / internal grey */
  --neutral-bg: #eef1f5;
  --neutral-line: #9aa7b8;
  --faint: #8b93a0;          /* archived / disabled text */
  --green: #0ca30c;
  --green-bg: #dcf2dc;
  --amber: #b9800a;
  --amber-bg: #f7e9c9;
  --amber-line: #f0ddb8;
  --red: #c0392f;
  --red-bg: #f6dcd8;
  --purple: #7627bb;         /* rejected */
  --purple-bg: #f3e8fd;
  --gold: #b8860b;           /* leaderboard rank / commission accent */
  --radius: 14px;
  --shadow: 0 1px 3px rgba(30, 37, 48, .07), 0 2px 6px rgba(30, 37, 48, .04);
  --shadow-pop: 0 10px 28px rgba(30, 37, 48, .16), 0 2px 6px rgba(30, 37, 48, .08);
  /* One font across the whole app (Luka, 2026-10-12). The serif/mono names are
     kept so older rules still resolve; they all point at Work Sans now. */
  --font-body: 'Work Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-serif: var(--font-body);
  --font-mono: var(--font-body);
  font-family: var(--font-body);
  font-variant-numeric: tabular-nums;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; } /* author display rules must never beat the hidden attribute */
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.45;
}
h1, h2, h3 { margin: 0 0 .4em; font-family: var(--font-serif); font-weight: 600; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); }

/* ---------- buttons & forms ---------- */
.btn {
  font: inherit; font-weight: 600;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 8px 14px;
  cursor: pointer;
  background: var(--surface);
  color: var(--text);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(180deg, var(--blue) 0%, var(--blue-dark) 100%);
  color: #fff;
  box-shadow: 0 1px 2px rgba(20, 30, 26, .12), 0 4px 10px rgba(28, 85, 72, .18);
}
.btn-primary:hover:not(:disabled) { box-shadow: 0 2px 4px rgba(20, 30, 26, .16), 0 8px 18px rgba(28, 85, 72, .28); transform: translateY(-1px); }
.btn-primary:disabled { opacity: .55; cursor: default; box-shadow: none; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--hover); border-color: var(--faint); }
.btn-danger { background: transparent; border-color: var(--border); color: var(--red); }
.btn-danger:hover { background: var(--red-bg); border-color: var(--red); }
.btn-block { width: 100%; }
.btn-sm { padding: 4px 10px; font-size: 12.5px; }

label { display: block; font-weight: 600; margin-bottom: 12px; font-size: 13px; }
input, select {
  font: inherit;
  width: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}
input:focus, select:focus { outline: 2px solid var(--blue); outline-offset: -1px; border-color: var(--blue); }
.form-error { color: var(--red); font-weight: 600; }

/* ---------- login ---------- */
.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, var(--navy) 0%, #101a35 55%, #0239bd 130%);
}
.login-card {
  width: min(460px, 94vw);
  background: var(--surface);
  border-radius: 20px;
  padding: 40px 36px 36px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .4), 0 2px 8px rgba(0, 0, 0, .2);
}
.login-brand { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; margin-bottom: 28px; }
.login-brand .brand-tagline { text-align: center; }
.login-brand h1 { font-size: 22px; margin: 0; }
.login-brand p { margin: 0; font-size: 12.5px; }
.login-help { font-size: 12.5px; margin: 16px 0 0; text-align: center; }

/* the login page's brand lockup is the hero, big, unmissable, "wow" on sign-in.
   Real logo files (Luke, 2026-09-15), see public/img/. Marlink uses the
   light-on-dark-text variant since the login card itself is white. */
.brand-hero { gap: 18px; margin: 4px 0 6px; }
.brand-hero .brand-logo { height: 40px; }
/* The two source crops have different internal padding around their text, so
   matching CSS height alone leaves "datarails" sitting visibly lower than
   "MARLINK", measured ~5px off at this display height. Nudge it up to align
   the wordmark baselines rather than their raw image boxes. */
.brand-hero .brand-logo-datarails { transform: translateY(-5px); }
.brand-hero .brand-x { font-size: 30px; color: var(--faint); }

/* ---------- Marlink × Datarails brand lockup ---------- */
.brand-row { display: inline-flex; align-items: center; gap: 10px; }
.brand-logo { display: block; width: auto; }
.brand-mark { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; }
.brand-mark-icon { width: 20px; height: 20px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.brand-x { color: var(--faint); font-size: 14px; font-weight: 300; }
.brand-datarails .brand-mark-icon { background: #eaf0fb; }
.brand-tagline { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); margin: 0 0 6px; }
.topbar .brand-tagline { color: #cbd5e1; }
.topbar-title { display: flex; flex-direction: column; line-height: 1.2; white-space: nowrap; }
.topbar-title strong { font-family: var(--font-serif); font-size: 15px; }
@media (max-width: 900px) { .topbar-title { display: none; } }

/* ---------- app shell ---------- */
.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 10px 16px;
  background: var(--navy); color: var(--navy-text);
  position: sticky; top: 0; z-index: 20;
}
.topbar-brand { display: flex; align-items: center; gap: 10px; flex: none; white-space: nowrap; }
.topbar-brand .brand-mark-icon { width: 17px; height: 17px; }
/* Real Marlink icon crop (Luke, 2026-09-15); Datarails has no standalone
   icon-only asset yet, so its topbar mark stays the hand-drawn SVG above. */
.topbar-logo-icon { width: 17px; height: 17px; display: block; border-radius: 5px; }
.client-chip {
  margin-left: 8px;
  background: rgba(255, 255, 255, .14);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px; font-weight: 600;
  white-space: nowrap;
}
.tabs { display: flex; gap: 4px; flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  font: inherit; font-weight: 600; font-size: 13.5px;
  background: transparent; color: #cbd5e1;
  border: none; border-radius: 8px;
  padding: 8px 11px; cursor: pointer;
  flex: none; white-space: nowrap;
  transition: background .12s ease, color .12s ease, box-shadow .12s ease;
}
.tab:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.tab.active {
  color: #fff;
  background: linear-gradient(180deg, var(--blue) 0%, var(--blue-dark) 100%);
  box-shadow: 0 2px 8px rgba(28, 85, 72, .4);
}
.topbar-user { display: flex; align-items: center; gap: 8px; flex: none; white-space: nowrap; }
.topbar-user .muted { color: #94a3b8; font-size: 13px; }
.topbar-user .btn-ghost { color: #cbd5e1; border-color: rgba(255, 255, 255, .2); }
.topbar-user .btn-ghost:hover { background: rgba(255, 255, 255, .1); color: #fff; }

/* World clock, all 6 zones, Luke: "a clock at the top next to admin, all
   time zones in usa and uk and israel" then, once meeting rows got all 4 US
   zones: "on the top there is only 3 i see still" (2026-09-27). Fixed-
   width/nowrap like the other topbar chrome so it never competes with
   .tabs' own flex-shrink+scroll; tighter gap/font than the 3-zone version
   to fit 6, and hidden a bit earlier (1300px not 1100px) now that it's
   wider, the topbar's already hit real overflow problems once before
   (2026-09-09 fix), title itself already hides under 900px. */
.topbar-clocks { display: flex; align-items: center; gap: 9px; flex: none; white-space: nowrap; font-family: var(--font-mono); font-size: 11px; color: #cbd5e1; }
.topbar-clock { display: flex; align-items: center; gap: 4px; }
.topbar-clock-zone { color: #64748b; font-weight: 600; }
@media (max-width: 1300px) { .topbar-clocks { display: none; } }

.main { max-width: 1280px; margin: 0 auto; padding: 24px 20px 60px; }
.loading { text-align: center; color: var(--muted); padding: 60px 0; }
.footer { max-width: 1200px; margin: 0 auto; padding: 0 20px 24px; font-size: 11.5px; font-family: var(--font-mono); }

/* ---------- cards & stats ---------- */
.section-title { font-size: 15px; font-weight: 700; margin: 26px 0 10px; display: flex; align-items: center; gap: 8px; }
.section-title:first-child { margin-top: 0; }
.count-pill {
  background: var(--blue-bg); color: var(--blue-dark);
  font-size: 12px; font-weight: 700;
  border-radius: 999px; padding: 1px 9px;
}
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 160%);
  border: 1px solid var(--border); border-top: 3px solid var(--blue);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 16px;
  transition: transform .15s, box-shadow .15s;
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-pop); }
.stat.qualified, .stat.sat { border-top-color: var(--green); }
.stat.rebooking { border-top-color: var(--red); }
.stat.unmatched { border-top-color: var(--red); }
.stat.commission { border-top-color: var(--gold); }
.stat.potential { border-top-color: var(--blue); }
.stat .stat-num { font-family: var(--font-serif); font-size: 26px; font-weight: 700; line-height: 1.1; }
.stat .stat-label { font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.stat.qualified .stat-num { color: var(--green); }
.stat.rebooking .stat-num { color: var(--red); }
.stat.scheduled .stat-num { color: var(--blue); }
.stat.unmatched .stat-num { color: var(--red); }
.stat.internal .stat-num, .stat.nostatus .stat-num { color: var(--neutral); }
.stat.sat .stat-num { color: var(--green); }
.stat.commission .stat-num { color: var(--gold); }
.stat.potential .stat-num { color: var(--blue-dark); }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px;
  transition: box-shadow .15s ease;
}
.empty { color: var(--muted); padding: 18px; text-align: center; background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); }
.waiting-checked-note { color: var(--faint); font-size: 12px; margin: -4px 0 8px; }

/* ---------- status chips ---------- */
.chip {
  display: inline-block;
  font-size: 12px; font-weight: 700;
  border-radius: 999px; padding: 2px 10px;
  white-space: nowrap;
}
.chip.qualified { background: var(--green-bg); color: var(--green); }
.chip.rebooking { background: var(--red-bg); color: var(--red); }
.chip.scheduled { background: var(--blue-bg); color: var(--blue-dark); }
.chip.unmatched { background: var(--red-bg); color: var(--red); }
.chip.internal, .chip.nostatus { background: var(--neutral-bg); color: var(--neutral); }
.chip.rejected { background: var(--purple-bg); color: var(--purple); }
.drift { color: var(--amber); cursor: help; font-weight: 700; }
.conflict { color: var(--red); cursor: help; font-weight: 700; }
.bonus { color: var(--blue); font-size: 12px; font-weight: 700; white-space: nowrap; }
.showed-tick { color: var(--green); font-weight: 800; cursor: help; }
.resched {
  display: inline-block;
  background: var(--blue-bg); color: var(--blue-dark);
  border-radius: 999px; padding: 1px 8px;
  font-size: 11.5px; font-weight: 700; white-space: nowrap;
  cursor: help;
}

.filter-group { flex: 2 1 260px; font-size: 12px; font-weight: 600; }
.filter-group-label { display: block; margin-bottom: 4px; }
.status-toggles { display: flex; flex-wrap: wrap; gap: 6px; }
.status-toggle {
  font: inherit; font-size: 12px; font-weight: 600;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--muted);
  padding: 5px 11px; cursor: pointer;
}
.status-toggle:hover { border-color: var(--blue); color: var(--blue-dark); }
.status-toggle.on { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ---------- meeting list (My meetings) ---------- */
.day-group { margin-bottom: 18px; }
.day-head { font-size: 12.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 0 0 6px 2px; }
.meeting-row {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px; margin-bottom: 6px;
}
/* Widened from 92px (a single short time/date string) to fit 3 stacked
   zone times side by side, Luke: "put all the times for them aside"
   (2026-09-27). Still fixed-width/no-overflow, same safety net as the
   2026-09-10 CSS-overlap fix this column already had once. */
.meeting-time { font-weight: 700; width: 150px; flex: none; overflow: hidden; }
.meeting-time-zone { display: flex; align-items: baseline; gap: 5px; font-size: 12.5px; white-space: nowrap; }
.meeting-time-zone-label { color: var(--muted); font-weight: 600; font-size: 10.5px; width: 16px; }
.meeting-time-booked { display: block; margin-top: 4px; color: var(--faint); font-weight: 500; font-size: 11px; white-space: nowrap; }
.meeting-main { flex: 1; min-width: 0; }
.meeting-main .who { font-weight: 600; }
.meeting-main .sub { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meeting-contact { font-size: 12px; color: var(--muted); margin-top: 1px; }
.meeting-contact a { color: var(--blue-dark); text-decoration: none; font-weight: 600; }
.meeting-contact a:hover { text-decoration: underline; }
.meeting-contact .sep { margin: 0 6px; opacity: .5; }

/* ---------- filters & table (Team view) ---------- */
.filters {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px; margin-bottom: 16px;
}
.filters label { margin: 0; flex: 1 1 140px; font-size: 12px; }
.filters .filter-check { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; padding-bottom: 8px; }
.filters .filter-check input { width: auto; margin: 0; }
.filters .btn { flex: 0 0 auto; }

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
table { border-collapse: collapse; width: 100%; min-width: 760px; }
td.num, th.num { text-align: right; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); background: var(--surface-2); position: sticky; top: 0; }
tbody tr:hover { background: var(--hover); }
td.nowrap, th.nowrap { white-space: nowrap; }
.row-qualified { box-shadow: inset 3px 0 0 var(--green); }
.row-rebooking { box-shadow: inset 3px 0 0 var(--amber); }
.row-scheduled { box-shadow: inset 3px 0 0 var(--blue); }
.row-unmatched { box-shadow: inset 3px 0 0 var(--red); }
.row-internal, .row-nostatus { box-shadow: inset 3px 0 0 var(--neutral-line); color: var(--neutral); }
.row-rejected { box-shadow: inset 3px 0 0 var(--purple); }

/* ---------- leaderboard ---------- */
/* A soft branded band behind the hero + stat row, Luke: "make the first
   page sexier" (2026-09-19). Purely decorative (a radial tint using the
   existing brand tokens, no new colors), sits behind the hero logo lockup
   and the top stat row so the home screen reads as a designed dashboard
   rather than plain white cards from the very top. */
.lb-hero-band {
  margin: -20px -20px 20px; padding: 32px 20px 4px;
  background:
    radial-gradient(900px 200px at 20% -80px, var(--blue-bg) 0%, transparent 65%),
    radial-gradient(900px 220px at 80% -60px, var(--amber-bg) 0%, transparent 60%),
    radial-gradient(1200px 260px at 50% -100px, var(--blue-bg) 0%, transparent 70%),
    var(--bg);
  border-bottom: 1px solid var(--border);
}
.lb-hero { display: flex; justify-content: center; padding: 10px 0 20px; }
.motivation-card { text-align: center; background: var(--blue-bg); border-color: var(--blue); }
.motivation-quote { font-family: var(--font-serif, inherit); font-style: italic; font-size: 15px; color: var(--blue-dark); line-height: 1.4; }
.motivation-attrib { margin-top: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.lb-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 16px; }
.lb-bar label { margin: 0; flex: 0 1 200px; font-size: 12px; }
.lb-spacer { flex: 1 1 auto; }
.lb-hint {
  font-size: 12px; color: var(--muted); line-height: 1.5;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 13px; margin-bottom: 16px;
}
.lb-table td, .lb-table th { text-align: right; white-space: nowrap; }
.lb-table td:first-child, .lb-table th:first-child,
.lb-table td:nth-child(2), .lb-table th:nth-child(2) { text-align: left; }
.lb-table td.num, .lb-table th.num { text-align: right; }
.lb-rank { width: 34px; text-align: center !important; }
.lb-medal { font-size: 16px; }
.lb-rank-num { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); font-weight: 600; }
.lb-name { font-weight: 600; }

/* ---------- leads pool ---------- */
.leads-hero {
  background: radial-gradient(900px 200px at 50% -40px, var(--gold-bg, var(--blue-bg)) 0%, transparent 70%), var(--surface);
  text-align: center;
}
.leads-hero .stat-row { justify-content: center; }
.leads-claim-btn { font-size: 16px; padding: 14px 30px; border-radius: 999px; box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.leads-batch-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 16px; margin-bottom: 10px;
}
.leads-batch-meta { font-size: 13px; color: var(--muted); }
.leads-lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: stretch; gap: 14px; margin-top: 18px; }
.leads-list-card { display: flex; flex-direction: column; }
.leads-list-locked { opacity: .72; }
.leads-preview-table td, .leads-preview-table th { white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.lb-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%; margin-right: 8px;
  background: var(--blue-bg); color: var(--blue-dark);
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  vertical-align: -6px;
}
/* Subtle top-3 tinting, medal-colored, Luke: "make the first page sexier"
   (2026-09-19). Understated on purpose: a faint left accent + tint, not a
   loud banner, so the numbers stay the focus. */
.lb-table tbody tr:nth-child(even):not(.lb-total) { background: color-mix(in srgb, var(--surface-2) 45%, transparent); }
.lb-table tbody tr.lb-rank-1 { box-shadow: inset 3px 0 0 var(--gold); }
.lb-table tbody tr.lb-rank-2 { box-shadow: inset 3px 0 0 #9aa0a6; }
.lb-table tbody tr.lb-rank-3 { box-shadow: inset 3px 0 0 #b08d57; }
.lb-you { font-size: 10px; color: var(--blue-dark); font-weight: 800; margin-left: 4px; text-transform: uppercase; }
.lb-sat { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; padding: 3px 12px; border-radius: 999px; background: var(--green-bg); color: var(--green); font-weight: 700; font-size: 15px; font-family: var(--font-serif); }
.lb-commission { font-weight: 700; color: var(--gold); font-family: var(--font-serif); }
.lb-potential { font-weight: 600; color: var(--muted); }
.lb-row-locked { cursor: default; }
.lb-row-locked:hover td { background: inherit; }
.lb-table tbody tr.lb-total { font-weight: 800; border-top: 2px solid var(--text); background: var(--surface-2); }
.lb-table tbody tr.lb-total .lb-sat { background: transparent; padding: 3px 0; }
.lb-row-click { cursor: pointer; }
.lb-row-click:hover td { background: var(--hover); }
.lb-row-open td { background: var(--hover); }
.lb-row-open .lb-name { color: var(--blue-dark); }
.lb-row-mine td { background: var(--blue-bg); }
.lb-detail-cell { padding: 0 !important; }
.lb-detail { padding: 16px 14px 18px; border-bottom: 1px solid var(--border); }

/* rep detail, shared by leaderboard drill-down + My meetings enrichment */
.rep-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-bottom: 14px; }
.rep-tile { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.rep-tile-label { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; margin-bottom: 5px; }
.rep-tile-value { font-family: var(--font-serif); font-weight: 700; font-size: 19px; line-height: 1; }
.rep-tile-value.rt-good { color: var(--green); }
.rep-tile-value.rt-warn { color: var(--red); }
.rep-tile-value.rt-up { color: var(--blue); }
.mix-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--surface-2); margin-bottom: 8px; }
.mix-bar span { display: block; height: 100%; }
.mix-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.mix-legend span { display: inline-flex; align-items: center; gap: 5px; }
.mix-legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.seg-sat { background: var(--green); }
.seg-callback { background: var(--red); }
.seg-up { background: var(--blue); }
.rep-filter-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 14px; }
.rep-filter-tab {
  font: inherit; font-size: 12.5px; padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer;
}
.rep-filter-tab:hover { border-color: var(--blue); color: var(--blue-dark); }
.rep-filter-tab.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.rep-filter-count { opacity: .7; }
.rep-detail-sub { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 14px 0 8px; }
.rep-detail-sub:first-of-type { margin-top: 0; }

/* ---------- calendar ---------- */
.cal-bar { align-items: flex-end; }
.cal-bar label { flex: 0 1 160px; }
.cal-nav { display: flex; align-items: center; gap: 6px; flex: 1 1 auto; }
.cal-week-label { margin-left: 8px; font-size: 13.5px; white-space: nowrap; }
.cal-note { margin: -6px 0 12px; font-size: 12.5px; }
.cal-wrap { padding: 10px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; min-width: 980px; }
.cal-day { background: var(--bg); border-radius: 8px; padding: 6px; min-height: 120px; }
.cal-day.today { outline: 2px solid var(--blue); outline-offset: -2px; background: var(--blue-bg); }
.cal-day-head {
  font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); padding: 2px 4px 8px; display: flex; justify-content: space-between; align-items: baseline;
}
.cal-day.today .cal-day-head { color: var(--blue-dark); }
.cal-day-date { font-weight: 600; text-transform: none; }
.cal-empty { color: var(--faint); text-align: center; padding: 12px 0; }
.cal-item {
  display: block; width: 100%; text-align: left;
  font: inherit; cursor: pointer; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 7px;
  border-left-width: 3px;
  padding: 6px 8px; margin-bottom: 6px;
}
.cal-item:hover { border-color: var(--blue); border-left-width: 3px; box-shadow: var(--shadow); }
.cal-time { display: block; font-size: 12px; font-weight: 800; }
.cal-time .cal-t2 { color: var(--muted); font-weight: 600; }
.cal-time sup { font-size: 9px; }
.cal-tzq { color: var(--amber); font-weight: 700; font-size: 11px; cursor: help; }
.cal-name { display: block; font-weight: 600; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-co { display: block; font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* multi-select status dropdown */
.msel { position: relative; flex: 0 1 190px; font-size: 12px; font-weight: 600; }
.msel .filter-group-label { display: block; margin-bottom: 4px; }
.msel-btn {
  font: inherit; width: 100%; text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 10px; color: var(--text);
}
.msel-btn:hover { border-color: var(--blue); }
.msel-panel {
  position: absolute; z-index: 30; top: 100%; left: 0; margin-top: 4px;
  min-width: 210px; max-height: 260px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: var(--shadow-pop);
  padding: 6px;
}
.msel-opt {
  display: flex; align-items: center; gap: 8px;
  font-weight: 500; margin: 0; padding: 6px 8px; border-radius: 6px; cursor: pointer;
}
.msel-opt:hover { background: var(--blue-bg); }
.msel-opt input { width: auto; margin: 0; }
.msel-clear { width: 100%; margin-top: 4px; }

/* lead popup */
.lead-rows { margin: 14px 0 6px; }
.lead-row { display: flex; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.lead-row:last-child { border-bottom: none; }
.lead-label { flex: 0 0 110px; color: var(--muted); font-weight: 600; }
.lead-row a { color: var(--blue-dark); font-weight: 600; text-decoration: none; }
.lead-row a:hover { text-decoration: underline; }

/* ---------- admin ---------- */
.admin-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 900px) { .admin-grid { grid-template-columns: 2fr 1fr; } }
.role-badge { font-size: 11px; font-weight: 700; border-radius: 5px; padding: 1px 7px; background: var(--blue-bg); color: var(--blue-dark); text-transform: uppercase; }
.role-badge.sdr { background: var(--neutral-bg); color: var(--muted); }
.pw-flag { font-size: 11px; color: var(--amber); font-weight: 600; }
.sdr-archived td { color: var(--faint); }

/* ---------- modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(11, 15, 25, .55);
  display: grid; place-items: center;
}
.modal {
  width: min(420px, 92vw);
  background: var(--surface);
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, .3);
}
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.modal-lg { width: min(780px, 96vw); height: min(720px, 90vh); display: flex; flex-direction: column; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.modal-head h2 { margin: 0; }
.reconnect-iframe { flex: 1; width: 100%; min-height: 0; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.chilipiper-embed { width: 100%; height: 620px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }

.banner {
  border-radius: var(--radius); padding: 10px 14px; margin-bottom: 16px;
  font-weight: 600; font-size: 13px;
}
.banner.warn { background: var(--amber-bg); color: var(--amber); }
.banner.success { background: var(--green-bg); color: var(--green); }

/* ---------- admin View-as-SDR bar ---------- */
.viewas-bar {
  display: flex; align-items: center; gap: 10px;
  max-width: 1200px; margin: 12px auto -8px; padding: 8px 20px;
}
.viewas-bar .viewas-label { font-size: 12.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.viewas-bar select { width: auto; min-width: 220px; margin: 0; padding: 6px 10px; }
.viewas-bar .viewas-note { font-size: 12px; color: var(--muted); }
.viewas-bar.active {
  background: var(--amber-bg); border: 1px solid var(--amber-line); border-radius: var(--radius);
}
.viewas-bar.active .viewas-label, .viewas-bar.active .viewas-note { color: var(--amber); }

/* ---------- live badge (leaderboard header, polling indicator) ---------- */
.live-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--green); background: var(--green-bg);
  padding: 3px 9px; border-radius: 999px; margin-left: 8px; vertical-align: middle;
}
.live-badge .pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(.7); } }
@media (prefers-reduced-motion: reduce) { .live-badge .pulse { animation: none; } }

/* ---------- reconnect / rebooking links ---------- */
.reconnect-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.reconnect-link {
  font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  text-decoration: none;
}
.reconnect-link:hover { border-color: var(--blue); color: var(--blue-dark); }
.reconnect-link.primary { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 700; }
.reconnect-link.primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); }

/* ---------- quick-action buttons (private SDR notes: Reschedule / Not interested) + Qualified badge ---------- */
.quick-actions { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.quick-btn {
  font: inherit; font-size: 11px; font-weight: 600;
  padding: 3px 8px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--muted);
}
.quick-btn:hover { border-color: var(--neutral-line); color: var(--text); }
.quick-btn:disabled { opacity: .6; cursor: default; }
/* Consolidated quick-action picker, Luke: "a button on my meetings called
   and then drop down it will update and then if not interested and all
   that" (2026-10-01). Same pill shape as .quick-btn, but a real <select> so
   it always offers whatever's left to log. */
.quick-action-select {
  font: inherit; font-size: 11px; font-weight: 600;
  padding: 3px 8px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--muted);
}
.quick-action-select:hover { border-color: var(--neutral-line); color: var(--text); }
.quick-action-select:disabled { opacity: .6; cursor: default; }
/* The call-attempt counter's running total, a plain indicator, not a
   button; logging another call happens via the dropdown above, this just
   keeps the count visible at a glance without opening it. */
.call-log-indicator {
  display: inline-flex; align-items: center; font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: 999px; white-space: nowrap; cursor: help;
  border-color: var(--blue); color: var(--blue); background: var(--blue-bg);
}
.quick-badge {
  display: inline-flex; align-items: center; font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: 999px; white-space: nowrap; cursor: help;
}
.quick-badge-reschedule { background: var(--amber-bg); color: var(--amber); }
.quick-badge-notanswered { background: var(--amber-bg); color: var(--amber); }
.quick-badge-notinterested { background: var(--red-bg); color: var(--red); }
.quick-badge-qualified { background: var(--green-bg); color: var(--green); }
.quick-badge-confirmed { background: var(--green-bg); color: var(--green); opacity: .75; }
.quick-badge-sharon { background: var(--green-bg); color: var(--green); }
/* Who clicked the button, Luke: "for admins to see who has clicked the
   buttons for the meeting so we can keep track of it" (2026-09-15). Was
   previously only in the hover title; now visible directly on the badge. */
.quick-badge-who { font-weight: 600; opacity: .75; margin-left: 3px; }
.meeting-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 6px; }
.meeting-note-input {
  flex: 1; min-width: 0; font: inherit; font-size: 12.5px; resize: vertical;
  padding: 5px 8px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); min-height: 30px;
}
.meeting-note-input:focus { border-color: var(--blue); outline: none; }
.meeting-note-status { font-size: 11px; color: var(--muted); white-space: nowrap; padding-top: 6px; }

/* ---------- Call notes (standalone call-log tab) ---------- */
.calllog-grid { display: grid; grid-template-columns: 1.5fr 1.2fr 1fr auto; gap: 8px; margin-bottom: 8px; }
.calllog-grid input {
  font: inherit; font-size: 13px; padding: 6px 8px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text); min-width: 0;
}
.calllog-grid input:focus { border-color: var(--blue); outline: none; }
.calllog-delete { flex-shrink: 0; }
.calllog-notes {
  width: 100%; font: inherit; font-size: 13px; resize: vertical;
  padding: 6px 8px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); box-sizing: border-box;
}
.calllog-notes:focus { border-color: var(--blue); outline: none; }
.calllog-meta { font-size: 11.5px; margin-top: 6px; display: flex; gap: 8px; align-items: center; }
@media (max-width: 720px) { .calllog-grid { grid-template-columns: 1fr; } }
.meeting-row-qualified { border-left: 3px solid var(--green); background: var(--green-bg); }
/* No Show and Cancelled share this class and both render red, Luke:
   "change all to red if cancelled or no show as well, purple is only ones
   waiting" (2026-09-14). */
.meeting-row-cancelled { border-left: 3px solid var(--red); background: var(--red-bg); }
.meeting-row-pending { border-left: 3px solid var(--purple); background: var(--purple-bg); }
.meeting-row-closed { border-left: 3px solid var(--neutral); }
/* Half-green, Luke: "confirms 50% green... when it is sat and qualified it
   goes full". A pre-meeting confirmation, not a real outcome yet, only the
   left half of the row fills, so it reads as "in progress" not "done". */
.meeting-row-halfconfirmed {
  border-left: 3px solid var(--green);
  background: linear-gradient(to right, var(--green-bg) 0%, var(--green-bg) 50%, var(--surface) 50%, var(--surface) 100%);
}
/* Same half-fill language for "not answered", Luke originally also had
   Reschedule as half-blue (2026-09-15), reverted 2026-10-01: "reschedule
   booking go backs to white" once logged, no row tint. */
.meeting-row-halfamber {
  border-left: 3px solid var(--amber);
  background: linear-gradient(to right, var(--amber-bg) 0%, var(--amber-bg) 50%, var(--surface) 50%, var(--surface) 100%);
}

/* ---------- live toasts ---------- */
#toast-stack {
  position: fixed; top: 16px; right: 16px; z-index: 90;
  display: flex; flex-direction: column; gap: 10px;
  max-width: 340px; width: calc(100vw - 32px);
}
.toast {
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--green);
  border-radius: 12px; box-shadow: var(--shadow-pop);
  padding: 12px 14px; font-size: 13px;
  animation: toast-in .25s ease;
}
.toast.leaving { animation: toast-out .25s ease forwards; }
.toast-title { font-weight: 700; }
@keyframes toast-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(24px); } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } .toast.leaving { animation: none; } }

@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; gap: 10px; }
  .tabs { order: 3; width: 100%; }
}

/* Leaderboard row for bookings in the client tracker that no SDR has logged */
.lb-table tr.lb-unassigned td { color: var(--muted); font-style: italic; border-top: 1px dashed var(--border); }
.lb-table tr.lb-unassigned .lb-avatar { background: var(--surface-2); color: var(--muted); }

/* which client a booking is for (shown once more than one client is loaded) */
.client-tag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: .01em; vertical-align: 1px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); }

/* ---------- SDR Portal: workspaces, HQ, admin area, approvals (2026-10-09) ---------- */
#ws-brand { display: inline-flex; align-items: center; gap: 10px; }
.topbar-ws-logo { height: 17px; width: auto; max-width: 76px; display: block; object-fit: contain; border-radius: 4px; background: #fff; padding: 1px 3px; }
.ws-monogram { display: inline-grid; place-items: center; background: var(--blue-bg); color: var(--blue-dark); font-weight: 700; border-radius: 8px; }
.topbar-ws-logo.ws-monogram { width: 24px; height: 18px; font-size: 10px; padding: 0; }
.ws-switch { border: none; color: #fff; cursor: pointer; font: inherit; font-size: 12px; font-weight: 600; margin: 2px 0 0; text-align: left; }
.ws-switch:not(:disabled):hover { background: rgba(255, 255, 255, .24); }
.ws-switch:disabled { cursor: default; opacity: .85; }
.tab-sep { width: 1px; align-self: stretch; background: rgba(255, 255, 255, .15); margin: 6px 4px; flex: none; }
.tab-badge { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 999px; background: var(--amber); color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-weight: 700; }
.modal-scroll { width: min(760px, 96vw); max-height: 90vh; overflow-y: auto; }

/* workspace picker */
.ws-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin: 14px 0; }
.ws-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 110px; padding: 18px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; font: inherit; color: var(--text); box-shadow: var(--shadow); transition: transform .1s ease, border-color .1s ease; }
.ws-card:hover { border-color: var(--blue); transform: translateY(-1px); }
.ws-card.current { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue-bg); }
.ws-card-hq { background: var(--surface-2); }
.ws-card-logo { height: 36px; width: auto; max-width: 150px; object-fit: contain; }
.ws-card-logo.ws-monogram { width: 44px; height: 44px; font-size: 16px; }
.ws-card-name { font-weight: 600; }

/* HQ */
.lb-hero:has(.hq-title) { flex-direction: column; align-items: center; gap: 2px; }
.hq-title { font-family: var(--font-serif); font-size: 28px; font-weight: 600; }
.hq-client-logo { height: 20px; width: auto; max-width: 90px; object-fit: contain; vertical-align: middle; margin-right: 10px; }
.hq-client-logo.ws-monogram { width: 28px; height: 22px; font-size: 10px; }
.hq-team-toggle { display: flex; align-items: center; gap: 6px; font-weight: 600; flex: 0 0 auto !important; padding-bottom: 8px; }
.hq-team-toggle input { width: auto; margin: 0; }

/* admin area */
.admin-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.admin-title { font-family: var(--font-serif); font-size: 24px; margin: 0; }
.role-badge.owner { background: var(--amber-bg); color: var(--amber); }
.role-badge.lead { background: var(--purple-bg); color: var(--purple); }
.field-label { font-weight: 600; font-size: 13px; margin: 10px 0 4px; }
.ws-checks { display: flex; flex-wrap: wrap; gap: 2px 10px; }
.ws-checks-hint { font-size: 12px; margin: 2px 0 8px; }
.approval-card { margin-bottom: 10px; }
.approval-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.approval-meta { font-size: 12.5px; margin-top: 4px; }
.approval-actions { display: flex; gap: 8px; margin-top: 10px; }
.ws-admin-card { margin-bottom: 12px; }
.ws-admin-card.archived { opacity: .7; }
.ws-admin-head { display: flex; gap: 14px; align-items: center; }
.ws-admin-name { font-weight: 700; font-size: 16px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ws-admin-meta { margin: 10px 0; font-size: 13.5px; display: grid; gap: 4px; }
.ws-admin-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.we-logo-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.we-logo-row input[type=file] { width: auto; }
.link-row { display: grid; grid-template-columns: 1fr 1.6fr auto auto auto; gap: 6px; align-items: center; margin-bottom: 6px; }
.link-row input { margin: 0; }
@media (max-width: 640px) { .link-row { grid-template-columns: 1fr; } }
.brand-ws-name { font-family: var(--font-serif); font-size: 32px; font-weight: 600; color: var(--text); line-height: 1; }

/* header: Marlink logo + workspace dropdown (2026-10-09, replaces client logo lockup) */
.topbar-logo { height: 20px; width: auto; display: block; }
.ws-menu { position: relative; }
.ws-switch { display: inline-flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); border-radius: 8px; padding: 6px 10px; color: #fff; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; white-space: nowrap; margin: 0; }
.ws-switch:hover, .ws-switch[aria-expanded="true"] { background: rgba(255, 255, 255, .18); }
.ws-switch-caret { font-size: 11px; opacity: .75; }
.ws-menu-panel { position: absolute; top: calc(100% + 6px); left: 0; min-width: 240px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-pop); padding: 6px; z-index: 40; }
.ws-menu-head { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); padding: 6px 10px 4px; }
.ws-menu-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; background: none; border: none; border-radius: 8px; padding: 9px 10px; font: inherit; font-size: 14px; color: var(--text); cursor: pointer; text-align: left; }
.ws-menu-item:hover { background: var(--hover); }
.ws-menu-item.current { font-weight: 600; color: var(--blue-dark); }
.ws-menu-check { color: var(--blue); font-weight: 700; }
.ws-menu-sep { height: 1px; background: var(--border); margin: 6px 4px; }
.ws-menu-empty { padding: 8px 10px; color: var(--muted); font-size: 13px; }

/* banner = Marlink only; the client's logo/name is the workspace badge under it (2026-10-12) */
.lb-hero:has(.ws-identity) { flex-direction: column; align-items: center; gap: 10px; }
.ws-identity { display: inline-flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px 6px 10px; box-shadow: var(--shadow); }
.ws-identity-logo { height: 22px; width: auto; max-width: 120px; object-fit: contain; display: block; }
.ws-identity-name { font-weight: 600; font-size: 14px; }
.ws-identity-tag { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); }
.ws-menu-label { display: inline-flex; align-items: center; gap: 10px; }
.ws-menu-logo { height: 16px; width: auto; max-width: 64px; object-fit: contain; display: block; }
.ws-menu-logo.ws-monogram { width: 22px; height: 18px; font-size: 9px; }

/* ---------- 2026-10-12: header rework (Marlink home, Admin button, avatar menu) ---------- */
.home-btn { position: relative; display: inline-flex; align-items: center; background: none; border: 1px solid transparent; border-radius: 8px; padding: 5px 8px; cursor: pointer; }
.home-btn:hover { background: rgba(255, 255, 255, .08); }
.home-btn.active { border-color: rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .1); }
.home-badge { position: absolute; top: -4px; right: -6px; margin: 0; }
.ws-switch.dim { opacity: .8; }
.ws-switch-logo { height: 15px; width: auto; max-width: 56px; object-fit: contain; display: block; background: #fff; border-radius: 3px; padding: 1px 3px; }
.ws-switch-logo.ws-monogram { width: 20px; height: 16px; font-size: 9px; padding: 0; }
.admin-btn { font: inherit; font-weight: 600; font-size: 13.5px; color: #cbd5e1; background: transparent; border: 1px solid rgba(255, 255, 255, .2); border-radius: 8px; padding: 6px 11px; cursor: pointer; }
.admin-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.admin-btn.active { color: #fff; background: linear-gradient(180deg, var(--blue) 0%, var(--blue-dark) 100%); border-color: transparent; }
.avatar-menu { position: relative; }
.avatar-btn { background: none; border: 2px solid rgba(255, 255, 255, .25); border-radius: 999px; padding: 0; cursor: pointer; line-height: 0; }
.avatar-btn:hover { border-color: rgba(255, 255, 255, .6); }
.avatar-panel { position: absolute; top: calc(100% + 8px); right: 0; min-width: 260px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-pop); padding: 6px; z-index: 40; white-space: normal; }
.avatar-head { display: flex; gap: 12px; align-items: center; padding: 10px 10px 12px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.avatar-name { font-weight: 700; }
.avatar-email { font-size: 12.5px; margin-bottom: 4px; }
.avatar-item { display: block; width: 100%; text-align: left; background: none; border: none; border-radius: 8px; padding: 9px 10px; font: inherit; font-size: 14px; color: var(--text); cursor: pointer; }
.avatar-item:hover { background: var(--hover); }

/* avatars (pictures or initials) */
.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; object-fit: cover; flex: none; background: var(--blue-bg); color: var(--blue-dark); font-weight: 700; }
.avatar-xs { width: 24px; height: 24px; font-size: 10px; }
.avatar-sm { width: 32px; height: 32px; font-size: 12px; }
.avatar-lg { width: 48px; height: 48px; font-size: 17px; }
.avatar-xl { width: 96px; height: 96px; font-size: 32px; }

/* role badges with icons */
.role-badge { display: inline-flex; align-items: center; gap: 4px; text-transform: none; font-size: 12px; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.role-badge.admin { background: var(--blue-bg); color: var(--blue-dark); }
.role-icon { font-size: 12px; line-height: 1; }

/* People: compact list + wide add panel */
.people-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 420px); gap: 22px; align-items: start; }
@media (max-width: 1000px) { .people-grid { grid-template-columns: 1fr; } }
/* leaderboard: Nooks "forms missing" column + booked per day (2026-10-19) */
.per-day { margin-top: 18px; padding: 16px 18px; }
.per-day .section-title { margin: 0 0 10px; }
.per-day-sub { font-size: 12.5px; font-weight: 400; }
.per-day-list { display: flex; gap: 3px; overflow-x: auto; padding-bottom: 4px; }
.per-day-col { flex: 1 0 22px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; }
.per-day-num { font-weight: 700; font-variant-numeric: tabular-nums; min-height: 14px; }
.per-day-bar { width: 100%; max-width: 26px; height: 90px; background: var(--border); border-radius: 4px; display: flex; align-items: flex-end; overflow: hidden; }
.per-day-bar span { display: block; width: 100%; background: var(--green); border-radius: 4px; }
.per-day-day { font-weight: 600; }
.per-day-wd { color: var(--muted); font-size: 10px; }
.per-day-zero .per-day-day { color: var(--muted); font-weight: 400; }
.per-day-weekend .per-day-bar { opacity: .55; }
.people-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.people-head .section-title { margin: 0; }
.add-person-wide { margin-bottom: 16px; max-width: 900px; }
.people-table { font-size: 13px; width: 100%; }
.people-table td, .people-table th { padding: 6px 8px; white-space: nowrap; }
.people-table .pw-flag { margin-left: 4px; }
.ws-chip-logo { height: 12px; }
.people-row { cursor: pointer; }
.people-row:hover td { background: var(--hover); }
.people-row:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.people-name { display: flex; align-items: center; gap: 9px; font-weight: 600; }
.ws-chip { display: inline-flex; align-items: center; gap: 5px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; font-size: 12px; white-space: nowrap; }
.ws-chip-logo { height: 11px; width: auto; max-width: 40px; object-fit: contain; display: block; }
.ws-chip-logo.ws-monogram { display: none; }
.add-person { padding: 18px; }
.form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 560px) { .form-2col { grid-template-columns: 1fr; } }
.role-help { font-size: 12.5px; margin: 0 0 12px; }
.add-person-note { font-size: 12.5px; align-self: center; }
.ws-checks { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.ws-check { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 10px; padding: 7px 12px; cursor: pointer; background: var(--surface); }
.ws-check:has(input:checked) { border-color: var(--blue); background: var(--blue-bg); }
.ws-check input { width: auto; margin: 0; }
.ws-check-logo { height: 15px; width: auto; max-width: 64px; object-fit: contain; display: block; }
.ws-check-logo.ws-monogram { width: 20px; height: 16px; font-size: 9px; }
.collapsible { margin-top: 18px; padding: 12px 16px; }
.collapsible summary { cursor: pointer; }
.person-head { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.person-danger { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; border-top: 1px solid var(--border); margin-top: 14px; padding-top: 14px; }
.person-reset { display: flex; align-items: flex-end; gap: 8px; }
.person-reset label { margin: 0; }

/* Workspaces: expandable cards */
.ws-acc { margin-bottom: 12px; padding: 0; overflow: hidden; }
.ws-acc.archived { opacity: .75; }
.ws-acc-head { display: flex; gap: 14px; align-items: center; padding: 14px 16px; cursor: pointer; list-style: none; }
.ws-acc-head::-webkit-details-marker { display: none; }
.ws-acc-head:hover { background: var(--hover); }
.ws-acc-title { flex: 1; min-width: 0; }
.ws-acc-caret { color: var(--muted); transition: transform .15s ease; }
.ws-acc[open] .ws-acc-caret { transform: rotate(180deg); }
.ws-acc-body { padding: 4px 16px 16px; border-top: 1px solid var(--border); }
.ws-form-section { margin-top: 14px; }
.ws-form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.ws-hint { font-size: 12.5px; margin: 4px 0 0; }
.ws-acc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.ws-acc-spacer { flex: 1; }
.link-row { grid-template-columns: 1fr 1.5fr auto auto auto auto; }
.link-row select { margin: 0; width: auto; }
@media (max-width: 760px) { .link-row { grid-template-columns: 1fr 1fr; } }
.link-kind { display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 600; color: var(--blue-dark); background: var(--blue-bg); border-radius: 999px; padding: 1px 8px; vertical-align: middle; }

/* profile modal */
.profile-grid { display: grid; grid-template-columns: 160px 1fr; gap: 22px; align-items: start; }
@media (max-width: 560px) { .profile-grid { grid-template-columns: 1fr; } }
.profile-pic { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.profile-upload { cursor: pointer; }
.profile-hint { font-size: 12px; margin: 0; }
.profile-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 16px 0; font-size: 13.5px; }
.profile-facts dt { color: var(--muted); }
.profile-facts dd { margin: 0; }
.add-person .link-row { grid-template-columns: 1fr 1fr; }
.add-person .link-row .lr-url { grid-column: 1 / -1; grid-row: 2; }
.add-person .ws-form-2 { grid-template-columns: 1fr; }

/* Zapier Interfaces embed (Marlink booking form) + My meetings action row, 2026-10-13 */
.zap-embed { display: block; width: 100%; max-width: 900px; margin: 0 auto; }
.zap-embed-tab { height: 720px; }
.zap-embed-modal { height: 100%; min-height: 0; }
.reconnect-zap { flex: 1; min-height: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.my-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 16px; }
.my-actions .muted { font-size: 13px; }
.marlink-mark { height: 34px; width: 34px; object-fit: contain; }

/* meeting the client moved to another day (2026-10-14) */
.meeting-moved { color: var(--amber); font-weight: 600; }

/* Nooks: not-logged bookings + live counts (2026-10-14) */
.nooks-box { margin: 0 0 18px; padding: 14px 16px; border: 1px solid var(--amber-line); background: var(--amber-bg); border-radius: var(--radius); }
.nooks-row { align-items: center; }
.nooks-summary { font-size: 12.5px; color: var(--muted); margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nooks-missing { display: inline-block; min-width: 24px; padding: 1px 8px; border-radius: 999px; background: var(--amber-bg); color: var(--amber); font-weight: 700; }
.nooks-group { margin-bottom: 10px; }
.nooks-names select { margin: 0; min-width: 240px; }

/* ---------- 2026-10-15: client icons, call backs, time zones, daily table, HQ landing ---------- */
.lb-client { white-space: nowrap; }
.client-icons { display: inline-flex; gap: 4px; align-items: center; }
.client-icon { width: 20px; height: 20px; border-radius: 5px; object-fit: contain; display: inline-block; vertical-align: middle; background: #fff; }
.client-icon-letter { display: inline-flex; align-items: center; justify-content: center; background: var(--neutral-bg); color: var(--neutral); font-size: 11px; font-weight: 700; }
.link-row { grid-template-columns: 1fr 1.5fr auto auto auto auto auto; }
.lr-move { display: inline-flex; gap: 2px; }
.lr-move .btn { padding: 2px 7px; }
@media (max-width: 760px) { .link-row { grid-template-columns: 1fr 1fr; } }
.add-person .link-row { grid-template-columns: 1fr 1fr; }
.calllog-grid { grid-template-columns: 1.3fr 1fr 1.3fr 1fr; align-items: end; }
/* 2026-10-19: Job position + LinkedIn on a second line */
.calllog-li-label { grid-column: span 2; }
.calllog-li { display: flex; align-items: center; gap: 6px; }
.calllog-li input { flex: 1; min-width: 0; }
.calllog-li a { text-decoration: none; font-weight: 600; }
.calllog-grid .calllog-delete { justify-self: end; }
.calllog-grid label { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; font-weight: 600; color: var(--muted); margin: 0; }
@media (max-width: 860px) { .calllog-grid { grid-template-columns: 1fr 1fr; } }
.callback-box { margin: 0 0 18px; padding: 14px 16px; border: 1px solid var(--blue-bg); background: #f3f8f6; border-radius: var(--radius); }
.callback-late { color: var(--red); font-weight: 700; }
.meeting-time-zone-label { width: auto; min-width: 18px; }
/* the meeting's own zone is the main line (2026-10-22); the profile zone follows, lighter */
.meeting-time-booked-zone { font-weight: 700; }
.meeting-time-booked-zone + .meeting-time-zone { color: var(--muted); }
.meeting-time-tag { font-size: 10px; color: var(--faint); text-transform: uppercase; letter-spacing: .04em; }
.daily-table .daily-today { background: var(--blue-bg); }
.hq-landing { display: grid; gap: 20px; }
.hq-columns { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .hq-columns { grid-template-columns: 1fr; } }
.hq-block { margin-bottom: 16px; }
.hq-block-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.hq-block-head .section-title { margin: 0; }
.hq-announce, .hq-section { margin-bottom: 10px; padding: 14px 16px; }
.hq-item-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hq-section > summary { cursor: pointer; list-style: none; }
.hq-section > summary::-webkit-details-marker { display: none; }
.hq-meta { font-size: 12px; margin-top: 2px; }
.hq-text { margin-top: 8px; line-height: 1.55; }
.hq-text p { margin: 0 0 8px; }
.hq-text ul { margin: 0 0 8px; padding-left: 20px; }
.hq-ctl { display: inline-flex; gap: 4px; flex: none; }
.hq-ctl .btn { padding: 2px 8px; }
.hq-links { display: grid; gap: 6px; }
.hq-link-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hq-doc { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; margin-bottom: 6px; }
.hq-doc-icon { font-size: 20px; }
.hq-doc-main { flex: 1; min-width: 0; }
.hq-empty { padding: 10px 0; font-size: 13px; }

/* app-wide date filter + trends (2026-10-15) */
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; max-width: 1280px; margin: 10px auto 0; padding: 8px 20px; }
.filter-label { font-weight: 700; font-size: 13px; }
.filter-date { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.filter-date input { width: auto; margin: 0; padding: 5px 8px; }
.filter-note { font-size: 12.5px; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--surface); }
.seg-btn { font: inherit; font-size: 13px; font-weight: 600; border: none; background: none; padding: 6px 12px; cursor: pointer; color: var(--muted); }
.seg-btn + .seg-btn { border-left: 1px solid var(--border); }
.seg-btn.active { background: var(--blue); color: #fff; }
.lb-range-note { font-size: 13px; color: var(--muted); font-weight: 600; }
.lb-former td { color: var(--muted); font-style: italic; }
.lb-former-item td { font-size: 12.5px; }
.trends-bar label { display: inline-flex; align-items: center; gap: 6px; }
.trends-bar select { width: auto; margin: 0; }
.trends-chart-card { margin: 0 0 16px; padding: 14px; }
.trend-up { color: var(--green); font-weight: 700; }
.trend-down { color: var(--red); font-weight: 700; }

/* login: Marlink logo + the LinkedIn cover line (2026-10-15) */
.login-quote { margin: 4px 0 0; font-size: 17px; font-weight: 600; color: var(--blue-dark); letter-spacing: -.01em; text-align: center; }

/* Marlink home: grouped tab dropdowns (2026-10-15) */
.tab-group { position: relative; display: inline-flex; }
.tab-group-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; min-width: 220px; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-pop); padding: 6px; }
.tab-group-menu[hidden] { display: none; }
.tab-group-item { font: inherit; font-size: 13.5px; text-align: left; background: none; border: none; border-radius: 8px; padding: 8px 10px; cursor: pointer; color: var(--text); white-space: nowrap; }
.tab-group-item:hover { background: var(--hover); }
.tab-group-item.current { font-weight: 700; color: var(--blue-dark); }
.nooks-start { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; }
.nooks-start input { margin-left: 6px; }

/* paid-sit source / not-paid reason on meeting rows (2026-10-16) */
.pay-badge { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 11px; line-height: 18px; background: var(--surface-2, #eef3f1); color: var(--text-2, #3c4a46); border: 1px solid var(--line, #d6dfdb); white-space: nowrap; }
.pay-badge.pay-no { background: #fff4e0; color: #8a5a00; border-color: #f0d3a0; }

/* Google sign-in (2026-10-16) */
.google-signin { margin: 4px 0 14px; }
.google-signin #google-btn { display: flex; justify-content: center; min-height: 44px; }
.login-or { display: flex; align-items: center; gap: 10px; margin: 14px 0 2px; color: var(--muted, #6b7280); font-size: 12.5px; }
.login-or::before, .login-or::after { content: ''; flex: 1; height: 1px; background: var(--line, #d6dfdb); }

/* Admin > Security (2026-10-16) */
.sec-google { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; padding: 14px; margin-bottom: 18px; }
.sec-google label { flex: 1 1 360px; }
.sec-google input { width: 100%; }
.sec-google p { flex-basis: 100%; margin: 0; }
tr.sec-fail td { background: #fff6f4; }
.count-pill.warn { background: #fde8e4; color: #a3311d; }

/* SDR invoices (2026-10-16) */
.inv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin: 16px 0; }
.inv-grid section { background: var(--surface); border: 1px solid var(--line, #e2e6e4); border-radius: 12px; padding: 14px; }
.inv-grid h3 { margin: 0 0 10px; font-size: 14px; }
.inv-grid label { display: block; margin-bottom: 10px; font-size: 13px; }
.inv-grid input, .inv-grid textarea, .inv-grid select { width: 100%; box-sizing: border-box; }
.inv-lines { width: 100%; border-collapse: collapse; margin-top: 8px; }
.inv-lines th, .inv-lines td { padding: 6px 4px; border-bottom: 1px solid var(--line, #e2e6e4); text-align: left; }
.inv-lines .num { text-align: right; }
.inv-lines tfoot td { border-bottom: none; border-top: 2px solid currentColor; font-size: 15px; }
.inv-history { font-size: 12px; margin-top: 10px; }
tr.inv-todo td { background: #fffbea; }
.inv-rates input { width: 100px; }
.inv-rates input[data-f="byClient"] { width: 200px; }
.inv-paid-on { display: inline-flex; align-items: center; gap: 6px; margin-right: 8px; }
.inv-totals { background: var(--surface); border: 1px solid var(--line, #e2e6e4); border-radius: 12px; padding: 6px 14px 10px; margin-bottom: 14px; }
#sec-days { width: auto; display: inline-block; }
.beta-tag { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; font-size: 10.5px; font-weight: 600; line-height: 17px; letter-spacing: .04em; text-transform: uppercase; background: #ede7fb; color: #5b2fa8; vertical-align: middle; }
/* invoice line editor (2026-10-16 v2) */
.inv-h { margin: 18px 0 8px; font-size: 15px; }
.inv-edit { width: 100%; border-collapse: collapse; background: var(--surface); }
.inv-edit th, .inv-edit td { padding: 8px 6px; border-bottom: 1px solid var(--line, #e2e6e4); text-align: left; vertical-align: top; }
.inv-edit .num { text-align: right; white-space: nowrap; }
.inv-edit select, .inv-edit input { box-sizing: border-box; }
.inv-edit td:first-child select { min-width: 230px; }
.inv-edit input[data-k="qty"], .inv-edit input[data-k="rate"] { width: 90px; text-align: right; }
.inv-edit tfoot td { border-bottom: none; border-top: 2px solid currentColor; font-size: 15px; }
.inv-edit tr.inv-locked td { background: var(--surface-2, #f0efe9); }
.inv-other { display: flex; gap: 6px; margin-top: 6px; }
.inv-other input { flex: 1; }
.inv-details { display: block; width: 100%; margin-top: 6px; font-size: 12.5px; }
.inv-rates-note { margin: 8px 0 0; }
.inv-rates input[type="number"] { width: 84px; text-align: right; }
.inv-rate-actions { white-space: nowrap; }
.inv-other input[data-k="label"] { flex: 1 1 auto; min-width: 0; width: auto; }
.inv-other select { flex: 0 0 110px; width: 110px; min-width: 0; }
.inv-edit td:first-child .inv-other select { min-width: 0; width: 110px; }
.client-icon.client-icon-logo { width: auto; max-width: 72px; height: 20px; border-radius: 4px; padding: 0 2px; }

/* tracker setup (2026-10-16) */
.tracker-stats { margin: 8px 0 12px; }
.trk-status select { min-width: 230px; }

/* My team: per person, per day (2026-10-19) */
.team-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.team-day { border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; background: var(--surface); }
.team-day-head { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.team-day-item { font-size: 12.5px; padding: 2px 0; }
.meeting-time-tz-unknown { color: var(--amber); font-size: 11px; font-weight: 600; }

/* My meetings: every booking in the dates (2026-10-20) */
.my-bookings { margin: 0 0 20px; padding: 14px 16px; }
.my-bookings > summary { cursor: pointer; margin: 0 0 10px; list-style-position: inside; }
.my-bookings-sub { font-size: 12.5px; font-weight: 400; }
.my-bookings-table td { white-space: normal; vertical-align: top; }
.my-bookings-table td.nowrap { white-space: nowrap; }

/* Resources tab (2026-10-20) */
.res-upload { display: inline-flex; margin-bottom: 14px; cursor: pointer; }
.res-list { display: grid; gap: 10px; }
.res-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; flex-wrap: wrap; }
.res-title { font-weight: 600; text-decoration: none; }
.res-meta { font-size: 12.5px; margin-top: 2px; }
.res-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* workspaces that hide no-shows and cancellations (Guidde, 2026-10-20) */
.hide-red .col-rebook { display: none !important; }

/* Add meeting (2026-10-21) */
.am-results { display: grid; gap: 4px; margin: 6px 0 12px; max-height: 260px; overflow-y: auto; }
.am-hit { text-align: left; border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; background: var(--surface); cursor: pointer; font: inherit; font-size: 13px; }
.am-hit:hover { border-color: var(--green); }
.am-lead { padding: 10px 12px; margin-bottom: 12px; font-size: 13px; line-height: 1.6; }
.added-diff { color: var(--amber); font-size: 12px; font-weight: 600; }

/* Resources viewer (2026-10-21, NDA: view only, watermarked) */
.modal.modal-viewer { width: min(960px, calc(100vw - 32px)); max-width: none; }
.res-viewer { max-height: 75vh; overflow: auto; display: grid; gap: 10px; justify-items: center; background: var(--surface); padding: 8px; border-radius: 10px; user-select: none; -webkit-user-select: none; }
.res-viewer canvas { box-shadow: 0 1px 4px rgba(0,0,0,.15); background: #fff; }
.res-note { font-size: 12px; }
@media print { .res-viewer { display: none !important; } }

/* leaderboards: date filter inside, sortable columns (2026-10-22) */
.filter-bar.filter-inline { margin: 0; padding: 0; background: none; border: 0; box-shadow: none; flex-wrap: wrap; }
.lb-sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.lb-sortable:hover { color: var(--text); text-decoration: underline; }
.lb-sortable.active { color: var(--green); }

/* Sit check (2026-10-22) */
.sc-month { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.sc-group { margin: 0 0 12px; padding: 12px 14px; }
.sc-group > summary { cursor: pointer; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sc-help { font-size: 12.5px; flex-basis: 100%; }
.sc-empty > summary strong { color: var(--muted); }
.count-pill.warn { background: var(--amber-bg, #fdecc8); color: var(--amber); }
.sc-table td { white-space: normal; vertical-align: top; }

/* Bank details (2026-10-22) */
.bank-form label { display: block; }
.bank-form textarea { width: 100%; }
.bank-detected { font-size: 12.5px; color: var(--green); }

/* Invoices v3 (2026-10-22) */
.inv-mine-list { margin: 0 0 14px; padding: 12px 14px; }
.inv-mine-list > summary { cursor: pointer; }
.inv-period-bar { flex-wrap: wrap; gap: 10px; }
.inv-details p { line-height: 1.55; }

/* 2026-10-26: Marlink tabs in the header, form tick, lead details, No show names, Chase, month picker */
.tabs.tabs-home { overflow: visible; flex-wrap: wrap; }
.tabs .tab-group-menu { top: calc(100% + 8px); }
.tab .tab-badge { margin-left: 4px; }
.form-tick { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--green-bg); color: var(--green); vertical-align: middle; cursor: help; }
.form-tick-no { background: var(--red-bg); color: var(--red); }
.lead-info { margin: 6px 0 2px; font-size: 13px; }
.lead-info > summary { cursor: pointer; color: var(--muted); font-weight: 600; width: max-content; }
.lead-info > summary:hover { color: var(--text); }
.lead-info dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 8px 0 4px; padding: 10px 12px; background: var(--bg, #f7f6f2); border: 1px solid var(--border); border-radius: 10px; }
.lead-info dt { color: var(--muted); font-weight: 600; }
.lead-info dd { margin: 0; overflow-wrap: anywhere; }
.noshow-names { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.noshow-name { padding: 6px 12px; border-radius: 999px; background: var(--red-bg); color: var(--red); font-weight: 600; font-size: 13.5px; }
.chase-card { margin-bottom: 14px; }
.chase-sdr { margin: 0 0 10px; font-size: 16px; }
.chase-table td { vertical-align: top; }
.filter-month { width: auto; max-width: 260px; font: inherit; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); }

/* Owner "Change status" override (2026-10-27) */
.override-btn { margin: 6px 6px 0 0; border-style: dashed; }
.override-btn.override-on { background: var(--green-bg); color: var(--green); border-style: solid; }
.override-lead { margin: 0 0 14px; line-height: 1.6; }
.override-form label { display: block; margin: 0 0 10px; }
.override-form input[type="date"], .override-form #ov-reason { width: 100%; }

/* Admin > Weekly e-mail (2026-10-27) */
.wk-form label { display: block; margin: 0 0 10px; }
.wk-form #wk-to { width: 100%; }
.wk-frame { width: 100%; height: 900px; border: 1px solid var(--border); border-radius: 10px; background: #fff; margin-top: 12px; }

/* Owner view (2026-10-27) */
.owner-tiles { flex-wrap: wrap; }
.owner-h3 { margin: 22px 0 8px; font-size: 16px; }
.owner-note { font-size: 12px; margin: 6px 0 0; }
.owner-sdrs tr.muted-row td { opacity: .7; }
.owner-trend td.num { white-space: nowrap; }
.owner-settings { margin-top: 22px; padding: 12px 16px; }
.owner-settings summary { cursor: pointer; }
.owner-sheet { display: flex; gap: 8px; flex-wrap: wrap; }
.owner-sheet input { flex: 1 1 320px; min-width: 0; }
.owner-names select { max-width: 320px; }
/* Invoice bonuses (2026-10-27) */
.inv-bonus-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 0 0 12px; }
.inv-bonus-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.inv-bonus-form .inv-bonus-reason { flex: 1 1 260px; }

/* Self-service: time off calendar, help (2026-10-28) */
#avatar-btn.has-dot { position: relative; }
#avatar-btn.has-dot::after { content: ''; position: absolute; top: 0; right: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--red, #c0392f); border: 2px solid var(--navy, #0f1830); }
.ss-form { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; padding: 14px 16px; margin-bottom: 18px; }
.ss-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.ss-form .msel-opt { flex-direction: row; align-items: center; }
.ss-form .ss-note { flex: 1 1 220px; }
.ss-form .ss-wide { flex: 1 1 100%; }
.ss-form .ss-wide input, .ss-form .ss-wide textarea { width: 100%; }
.ss-help { flex: 1 1 100%; margin: 0; font-size: 12px; }
.ss-cal-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.ss-cal-nav { display: flex; align-items: center; gap: 8px; }
.ss-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-bottom: 6px; }
.ss-dow { font-size: 11px; font-weight: 600; color: var(--muted); text-align: center; padding: 4px 0; }
.ss-cell { min-height: 78px; border: 1px solid var(--border); border-radius: 8px; padding: 4px 5px; background: var(--surface); overflow: hidden; }
.ss-pad { border: none; background: transparent; }
.ss-weekend { background: var(--surface-2); }
.ss-today { border-color: var(--blue, #2f6fb0); box-shadow: inset 0 0 0 1px var(--blue, #2f6fb0); }
.ss-date { font-size: 11px; font-weight: 700; color: var(--muted); margin-bottom: 2px; }
.ss-ev { font-size: 11px; line-height: 1.3; border-radius: 4px; padding: 1px 4px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-off { background: var(--green-bg); color: var(--green); }
.ss-bday { background: var(--amber-bg); color: var(--amber); }
.ss-done { margin: 6px 0 18px; }
.pf-bday { display: flex; gap: 8px; }
.help-form .seg { flex: 1 1 100%; }
.help-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.help-item { padding: 12px 14px; }
.help-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.help-text { white-space: pre-wrap; margin: 8px 0 4px; }
.help-meta { font-size: 12px; }
.help-reply { margin: 8px 0 0; padding: 8px 10px; background: var(--surface-2); border-radius: 8px; }
.help-manage { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.help-manage input { flex: 1 1 240px; min-width: 0; }
@media (max-width: 640px) { .ss-cell { min-height: 54px; padding: 3px; } .ss-ev { font-size: 10px; } }

/* FAQ + dictionary (2026-10-28) */
.faq-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.faq-bar input[type="search"] { flex: 1 1 260px; min-width: 0; }
.faq-topic { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 14px 0 6px; }
.faq-item { margin-bottom: 8px; }
.faq-client { background: var(--blue-bg); color: var(--blue-dark); margin-left: 6px; }
.faq-terms { margin: 0; padding: 4px 16px; }
.faq-term { padding: 10px 0; border-bottom: 1px solid var(--border); }
.faq-term:last-child { border-bottom: none; }
.faq-term dt { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.faq-term dt .hq-ctl { margin-left: auto; }
.faq-term dd { margin: 4px 0 0; }

/* Phone layout (2026-10-28, Liron on a phone): compact header, tabs in fewer rows,
   leaderboard and owner tables scroll sideways with the name column kept in view,
   full-width pop-ups. */
@media (max-width: 640px) {
  .topbar { padding: 8px 12px; gap: 8px; position: static; } /* too tall to stay pinned on a phone */
  .topbar-logo { height: 17px; }
  .ws-switch { padding: 5px 8px; font-size: 12.5px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
  .topbar-user { gap: 6px; }
  .topbar-user .btn { padding: 5px 9px; font-size: 12.5px; }
  .tabs { gap: 2px; }
  .tab { font-size: 12.5px; padding: 6px 8px; }
  .tab-group-menu { min-width: 200px; max-width: calc(100vw - 24px); }
  .main { padding: 14px 12px 48px; }
  .footer, .filter-bar { padding-left: 12px; padding-right: 12px; }
  .lb-hero-band { margin: -14px -12px 16px; padding: 22px 12px 4px; }
  table { min-width: 0; }
  th, td { padding: 8px 9px; }
  .lb-table { font-size: 13px; }
  /* keep the name column in view: the 2nd column when the 1st is the rank */
  .table-wrap .lb-table:has(td.lb-rank) tr > :nth-child(2),
  .table-wrap .lb-table:not(:has(td.lb-rank)) tr > :first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: 1px 0 0 var(--border); }
  .modal { width: 96vw; padding: 18px 16px; max-height: 92vh; overflow-y: auto; }
  .modal-lg { width: 98vw; height: 92vh; }
  .modal-actions { flex-wrap: wrap; }
  .modal-actions .btn { flex: 1 1 auto; }
  .faq-bar .seg { width: 100%; }
}

/* Leaderboards fit the screen without sideways scrolling (Luka, 2026-10-28):
   header labels wrap, tighter cells; phones keep the sticky name column */
.lb-table { min-width: 0; }
.lb-table th { white-space: normal; line-height: 1.2; vertical-align: bottom; }
.lb-table th.num { min-width: 52px; }
.lb-table td, .lb-table th { padding-left: 8px; padding-right: 8px; }
.lb-table td.lb-name { white-space: normal; min-width: 130px; }

/* Welcome page (2026-10-28) */
.welcome-hero { display: flex; align-items: center; gap: 18px; padding: 22px; margin-bottom: 14px; }
.welcome-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; font-size: 22px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; }
.welcome-title { margin: 0 0 4px; font-size: 26px; }
.welcome-line { margin: 8px 0 0; }
.welcome-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.week-bar { gap: 10px; flex-wrap: wrap; }
.chase-table tr.week-past td { opacity: .65; }
.followup-select { font: inherit; font-size: 12.5px; padding: 4px 6px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); max-width: 190px; }
.followup-chip { white-space: nowrap; }
.daily-detail .stat-row { margin-bottom: 8px; }

/* Calendar (2026-10-28, Luka): Monday to Friday fully visible, no sideways scrolling.
   The page uses the full screen width, weekends are narrow, names wrap instead of cutting off. */
.main.main-wide { max-width: 1800px; }
.cal-wrap { overflow-x: visible; }
.cal-grid { min-width: 0; grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(0, .55fr) minmax(0, .55fr); }
.cal-day.cal-weekend { background: color-mix(in srgb, var(--bg) 60%, transparent); }
.cal-name, .cal-co { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .cal-grid { grid-template-columns: 1fr; }
  .cal-day { min-height: 0; }
  .cal-day.cal-weekend:not(:has(.cal-item)) { display: none; }
}

/* Cancelled by Datarails on their side (2026-10-28): pink, still an opportunity */
:root { --pink: #c2185b; --pink-bg: #fde7f0; }
.chip.dlcancel { background: var(--pink-bg); color: var(--pink); }
.meeting-row-dlcancel { border-left: 3px solid var(--pink); background: var(--pink-bg); }
