/* ══════════════════════════════════════════════════════════════════
   TPT Marketplace — official-site design language (techplustalent.com)
   Matches the company website: warm off-white ground, ink #0b1023,
   Sora display / Inter body, pill buttons, red-orange-amber flame.
   Motion is entrance/feedback/continuity only, honors reduced-motion.
   Strict-CSP safe: no inline styles anywhere.
   ══════════════════════════════════════════════════════════════════ */

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

:root {
  /* Ground & ink */
  --paper: #fbfbf9;
  --card: #ffffff;
  --ink: #0b1023;
  --ink-2: #3f4557;
  --muted: #6a7080;
  --hairline: #e7e8ee;
  --grid: #f3f4fb;
  --rule: #d6d8e4;

  /* Brand */
  --brand: #0b1023;
  --brand-2: #161d3a;
  --navy-deep: #070b19;
  --accent: #f04e23;
  --accent-strong: #a72b0f;
  /* TechPlus Talent flame — red to orange to amber, exact site gradient */
  --grad-text: linear-gradient(100deg, #b91c1c, #f04e23 55%, #f59e0b 105%);

  /* Status */
  --good: #0ca30c;
  --good-ink: #056709;
  --warning: #fab219;
  --warning-ink: #7a5200;
  --critical: #d03b3b;
  --critical-ink: #9c2020;

  --radius: 16px;
  --shadow-1: 0 1px 1px rgba(11, 16, 35, 0.04), 0 3px 10px -2px rgba(11, 16, 35, 0.06);
  --shadow-2: 0 2px 6px rgba(11, 16, 35, 0.06), 0 18px 44px -16px rgba(11, 16, 35, 0.18);
  --ring: 0 0 0 3px rgba(240, 78, 35, 0.28);
  /* Data-viz series blue — graphs keep real color coding, never all-brand-orange */
  --viz: #2a78d6;
  --viz-strong: #1c5cab;

  --display: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-fast: 150ms;
  --t-med: 280ms;
  --t-slow: 520ms;

  font-family: var(--sans);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  /* Warm paper with a faint light source at the top — depth without noise */
  background:
    radial-gradient(1100px 420px at 50% -80px, rgba(252, 107, 63, 0.04), transparent 70%),
    radial-gradient(rgba(11, 16, 35, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: auto, 26px 26px, auto;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: rgba(240, 78, 35, 0.2); }
a { color: var(--accent-strong); text-decoration: none; transition: color var(--t-fast); }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c6c9d8; border-radius: 999px; border: 2px solid var(--paper); }
::-webkit-scrollbar-thumb:hover { background: #a9adc0; }

/* ── Keyframes ───────────────────────────────────────────── */
@keyframes fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes scale-in { from { opacity: 0; transform: scale(0.965) translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes drift-a { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(60px, -40px) scale(1.12); } 100% { transform: translate(-30px, 30px) scale(0.95); } }
@keyframes drift-b { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-70px, 30px) scale(1.08); } 100% { transform: translate(40px, -20px) scale(1.02); } }
@keyframes drift-c { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(30px, 50px) scale(0.9); } 100% { transform: translate(-50px, -30px) scale(1.1); } }
@keyframes pulse-dot { 0%, 100% { box-shadow: 0 0 0 0 rgba(12, 163, 12, 0.4); } 55% { box-shadow: 0 0 0 6px rgba(12, 163, 12, 0); } }
@keyframes shimmer { from { background-position: -300px 0; } to { background-position: 300px 0; } }
@keyframes toast-in { from { opacity: 0; transform: translateX(24px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(24px) scale(0.97); } }
@keyframes toast-life { from { width: 100%; } to { width: 0%; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes step-right { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
@keyframes step-left { from { opacity: 0; transform: translateX(-26px); } to { opacity: 1; transform: none; } }
@keyframes shake {
  10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(3px); }
  30%, 70% { transform: translateX(-5px); } 40%, 60% { transform: translateX(5px); } 50% { transform: translateX(-4px); }
}
@keyframes draw-stroke { to { stroke-dashoffset: 0; } }
@keyframes confetti-fall {
  from { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  to { transform: translate(var(--drift, 0px), 110vh) rotate(var(--spin, 540deg)); opacity: 0.4; }
}

.anim-in { animation: fade-up var(--t-slow) var(--ease-out) both; }
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 10px 21px; border-radius: 999px; border: 1px solid transparent;
  font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none;
  font-family: var(--sans);
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast),
    transform var(--t-fast) var(--ease-out), box-shadow var(--t-med) var(--ease-out);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.98); transition-duration: 60ms; }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn-primary {
  background: var(--brand); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 2px 8px rgba(16, 54, 95, 0.28);
}
.btn-primary:hover {
  background: var(--brand-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 6px 18px rgba(16, 54, 95, 0.32);
}
.btn-accent { background: var(--accent-strong); color: #fff; box-shadow: var(--shadow-1); }
.btn-accent:hover { background: var(--brand); }
.btn-outline { background: #ffffff; color: var(--brand); border-color: #c9ccda; }
.btn-outline:hover { border-color: var(--brand); background: #fff; box-shadow: var(--shadow-1); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: rgba(26, 32, 44, 0.06); color: var(--ink); }
.btn-sm { padding: 5px 12px; font-size: 13px; border-radius: 7px; }
.btn-danger { background: transparent; color: var(--critical-ink); border-color: rgba(208, 59, 59, 0.45); }
.btn-danger:hover { background: rgba(208, 59, 59, 0.07); border-color: var(--critical); }
.btn-good { background: transparent; color: var(--good-ink); border-color: rgba(12, 163, 12, 0.45); }
.btn-good:hover { background: rgba(12, 163, 12, 0.08); border-color: var(--good); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ── Landing: header ─────────────────────────────────────── */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 6vw; position: sticky; top: 0; z-index: 50;
  background: rgba(243, 241, 234, 0.7);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  border-bottom: 1px solid transparent;
  transition: background var(--t-med), border-color var(--t-med), box-shadow var(--t-med);
}
.site-header.scrolled { background: rgba(243, 241, 234, 0.92); border-bottom-color: var(--hairline); box-shadow: 0 4px 20px rgba(26, 32, 44, 0.06); }

.logo { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 17.5px; color: var(--brand); font-family: var(--display); }
/* The mark: the TechPlus Talent flame monogram on a transparent ground, so it
   sits cleanly on both the dark rail and the paper landing. */
.logo-mark {
  height: 40px; width: auto; flex-shrink: 0; object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(214, 51, 108, 0.22));
  transition: transform var(--t-med) var(--ease-spring);
}
.logo:hover .logo-mark { transform: translateY(-2px) scale(1.06); }
/* The word "Plus" carries the brand flame inside the wordmark */
.logo .plus {
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  font-weight: inherit;
}
.logo small { display: block; font-size: 10px; font-weight: 700; color: var(--muted); letter-spacing: 0.16em; font-family: var(--sans); }
.header-actions { display: flex; gap: 10px; }

/* ── Landing: minimal brand door ─────────────────────────── */
.home-min {
  min-height: calc(100vh - 90px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; text-align: center; padding: 40px 20px;
  position: relative; overflow: hidden; isolation: isolate;
  background: radial-gradient(rgba(28, 24, 16, 0.045) 1px, transparent 1px);
  background-size: 27px 27px;
}
.home-logo {
  width: min(460px, 82vw); height: auto; object-fit: contain;
  margin-bottom: 34px;
  filter: drop-shadow(0 6px 16px rgba(240, 78, 35, 0.22));
  animation: scale-in 0.6s var(--ease-spring) both;
}
.home-wordmark {
  font-family: var(--display); font-size: clamp(56px, 10vw, 108px); font-weight: 800;
  letter-spacing: -0.02em; margin: 0;
  animation: fade-up var(--t-slow) var(--ease-out) 120ms both;
}
/* Quiet serif tagline under the wordmark, orgp-style */
.home-tagline {
  font-family: var(--display); font-size: clamp(17px, 2.6vw, 23px);
  color: var(--ink-2); margin: 2px 0 26px; max-width: 720px;
  animation: fade-up var(--t-slow) var(--ease-out) 180ms both;
}
.home-wordmark .ww { color: var(--good-ink); }
.home-wordmark .wt { color: var(--ink); }
.home-min .hero-ctas { animation: fade-up var(--t-slow) var(--ease-out) 220ms both; }
.home-footer { border-top: none; display: flex; justify-content: center; align-items: baseline; gap: 22px; }
.home-footer a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--rule); padding-bottom: 1px; transition: color var(--t-fast), border-color var(--t-fast); }
.home-footer a:hover { color: var(--ink); border-color: var(--ink); }

/* ── Landing: hero ───────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden; text-align: center;
  padding: 88px 6vw 60px; isolation: isolate;
  background: radial-gradient(rgba(11, 16, 35, 0.07) 1px, transparent 1px);
  background-size: 26px 26px;
}
.aurora { position: absolute; inset: -20%; z-index: -1; filter: blur(70px); pointer-events: none; }
.aurora i { position: absolute; border-radius: 50%; opacity: 0.45; will-change: transform; }
.aurora i:nth-child(1) { width: 46vw; height: 46vw; left: -8%; top: -18%; background: radial-gradient(circle, #ffb59a, transparent 65%); animation: drift-a 24s ease-in-out infinite alternate; }
.aurora i:nth-child(2) { width: 38vw; height: 38vw; right: -6%; top: -6%; background: radial-gradient(circle, #fcd9a8, transparent 65%); animation: drift-b 28s ease-in-out infinite alternate; }
.aurora i:nth-child(3) { width: 34vw; height: 34vw; left: 32%; bottom: -28%; background: radial-gradient(circle, #f9c2b5, transparent 65%); animation: drift-c 32s ease-in-out infinite alternate; }

.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 15px; border-radius: 999px; margin-bottom: 24px;
  background: rgba(255, 254, 251, 0.8); border: 1px solid var(--rule);
  color: var(--brand); font-size: 12px; font-weight: 700; letter-spacing: 0.09em;
  animation: fade-up var(--t-slow) var(--ease-out) both;
}
.hero .eyebrow::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--good); animation: pulse-dot 2.4s ease-out infinite;
}
.hero h1 {
  font-family: var(--display);
  font-size: clamp(32px, 5vw, 56px); margin: 0 0 18px; font-weight: 700;
  color: var(--brand-2); letter-spacing: -0.02em;
  animation: fade-up var(--t-slow) var(--ease-out) 90ms both;
}
.hero h1 .grad {
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  font-style: italic;
}
.hero p.sub {
  max-width: 600px; margin: 0 auto 30px; color: var(--ink-2); font-size: 17px;
  animation: fade-up var(--t-slow) var(--ease-out) 180ms both;
}
.hero-ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; animation: fade-up var(--t-slow) var(--ease-out) 260ms both; }

.ms-icon { display: inline-grid; grid-template-columns: 7px 7px; grid-template-rows: 7px 7px; gap: 1px; }
.ms-icon i { display: block; }
.ms-icon i:nth-child(1) { background: #f25022; }
.ms-icon i:nth-child(2) { background: #7fba00; }
.ms-icon i:nth-child(3) { background: #00a4ef; }
.ms-icon i:nth-child(4) { background: #ffb900; }

/* ── Landing: journey strip ──────────────────────────────── */
.journey-section { padding: 44px 6vw 8px; max-width: 1100px; margin: 0 auto; text-align: center; }
.journey-section h2 { font-family: var(--display); color: var(--brand-2); font-size: 27px; margin-bottom: 26px; }
.journey { display: flex; align-items: stretch; justify-content: center; gap: 14px; flex-wrap: wrap; }
.journey-step {
  background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius);
  box-shadow: var(--shadow-1); padding: 24px 26px; width: 280px; text-align: left; position: relative;
  transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med), border-color var(--t-med);
}
.journey-step:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); border-color: var(--rule); }
.journey-num {
  width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--brand); color: var(--brand); font-family: var(--display);
  font-weight: 700; font-size: 16px; margin-bottom: 12px;
}
.journey-step h3 { margin: 0 0 6px; font-size: 16px; color: var(--brand-2); }
.journey-step p { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.journey-arrow { align-self: center; font-size: 22px; color: var(--muted); }
@media (max-width: 900px) { .journey-arrow { display: none; } }

/* ── Landing: services ───────────────────────────────────── */
.services-section { padding: 44px 6vw 70px; max-width: 1220px; margin: 0 auto; }
.services-section h2 { font-family: var(--display); text-align: center; color: var(--brand-2); font-size: 27px; margin-bottom: 6px; }
.services-section .section-sub { text-align: center; color: var(--muted); margin: 0 0 28px; font-size: 15px; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(272px, 350px)); justify-content: center; gap: 18px; }
.service-card {
  background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 22px;
  position: relative; overflow: hidden;
  transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med), border-color var(--t-med);
}
.service-card::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform var(--t-med) var(--ease-out);
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); border-color: var(--rule); }
.service-card:hover::after { transform: scaleX(1); }
.service-card .tech {
  display: inline-block; font-size: 11px; font-weight: 800; color: var(--accent-strong);
  letter-spacing: 0.1em; text-transform: uppercase;
  border: 1px solid rgba(240, 78, 35, 0.35); padding: 2px 9px; border-radius: 3px; margin-bottom: 4px;
}
.service-card h3 { font-family: var(--display); margin: 10px 0 6px; font-size: 17px; }
.service-card p { margin: 0; font-size: 13.5px; color: var(--ink-2); }

.site-footer { padding: 30px 6vw; border-top: 1px solid var(--hairline); color: var(--muted); font-size: 13px; text-align: center; }

/* Legal pages (Terms, Privacy) */
.legal-page { max-width: 760px; margin: 0 auto; padding: 40px 24px 80px; }
.legal-brand img { height: 64px; width: auto; margin-bottom: 20px; }
.legal-page h1 { font-family: var(--display); color: var(--brand-2); font-size: 32px; margin: 0 0 6px; }
.legal-page h2 { font-family: var(--display); color: var(--brand); font-size: 19px; margin: 26px 0 6px; }
.legal-page p { color: var(--ink-2); line-height: 1.65; margin: 0 0 12px; }
.legal-meta { color: var(--muted); font-size: 13.5px; }
.legal-back { margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--hairline); font-size: 14px; }
.legal-brand img { filter: none; }

/* ── Banners & toasts ────────────────────────────────────── */
.banner {
  max-width: 760px; margin: 18px auto 0; padding: 13px 20px; border-radius: 10px;
  font-size: 14px; display: none; border: 1px solid; box-shadow: var(--shadow-1); background: var(--card);
}
.banner.show { display: block; animation: fade-up var(--t-med) var(--ease-out) both; }
.banner-info { border-color: rgba(240, 78, 35, 0.4); color: var(--accent-strong); }
.banner-warn { border-color: rgba(250, 178, 25, 0.55); color: var(--warning-ink); }
.banner-error { border-color: rgba(208, 59, 59, 0.45); color: var(--critical-ink); }

#toast-region { position: fixed; bottom: 22px; right: 22px; display: flex; flex-direction: column; gap: 10px; z-index: 100; }
.toast {
  background: rgba(11, 16, 35, 0.95); color: #fff; padding: 13px 18px 15px; border-radius: 10px; font-size: 14px;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.3); max-width: 380px; position: relative; overflow: hidden;
  animation: toast-in 0.3s var(--ease-spring) both;
}
.toast.out { animation: toast-out 0.25s var(--ease-out) both; }
.toast::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 100%;
  background: rgba(255, 255, 255, 0.4);
  animation: toast-life var(--toast-ms, 4200ms) linear both;
}
.toast.toast-error { background: rgba(156, 32, 32, 0.96); }
.toast.toast-success { background: rgba(5, 103, 9, 0.96); }

/* ── Auth pages & registration wizard ────────────────────── */
.auth-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 44px 20px; position: relative; overflow: hidden; }
.auth-wrap .aurora { filter: blur(80px); opacity: 0.5; }
.form-card {
  background: var(--card); border: 1px solid var(--hairline); border-radius: 14px;
  box-shadow: var(--shadow-2); padding: 34px; width: 100%; max-width: 540px; margin-top: 28px;
  animation: scale-in var(--t-slow) var(--ease-out) both;
  position: relative; z-index: 1;
}
.form-card h1 { font-family: var(--display); font-size: 23px; margin: 0 0 4px; color: var(--brand-2); }
.form-card .sub { color: var(--ink-2); font-size: 14px; margin: 0 0 24px; }
.form-card code { background: var(--grid); padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.field label .req { color: var(--critical); }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 13px; border: 1.5px solid #d9dbe6; border-radius: 8px;
  font-size: 14.5px; font-family: inherit; background: #fff; color: var(--ink);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: #b9bdcf; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
/* The white background above beats the browser's own disabled shading, so a
   locked control would otherwise look editable right up until you click it. */
.field input:disabled, .field select:disabled, .field textarea:disabled,
.field input:disabled:hover, .field select:disabled:hover, .field textarea:disabled:hover {
  background: #f1f2f7; border-color: var(--rule); color: var(--muted); cursor: not-allowed;
}
.field .error-text { color: var(--critical-ink); font-size: 12.5px; margin-top: 5px; display: none; }
/* Phone: country dial-code select + number input side by side */
.phone-row { display: flex; gap: 8px; align-items: stretch; }
.phone-row .phone-dial { width: auto; flex: 0 0 auto; min-width: 96px; padding-right: 8px; }
.phone-row .phone-num { flex: 1 1 auto; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--critical); }
.field.has-error .error-text { display: block; animation: fade-up var(--t-fast) var(--ease-out) both; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.form-actions { margin-top: 24px; display: flex; gap: 12px; align-items: center; }

.reg-shell {
  display: flex; width: 100%; max-width: 880px; margin-top: 28px; border-radius: 14px;
  overflow: hidden; box-shadow: var(--shadow-2); border: 1px solid var(--hairline);
  background: var(--card); position: relative; z-index: 1; min-height: 480px;
}
.reg-side {
  width: 290px; flex-shrink: 0; position: relative; overflow: hidden; color: #dfe1ec;
  background: linear-gradient(168deg, var(--brand-2) 0%, var(--navy-deep) 75%);
  padding: 34px 28px; display: flex; flex-direction: column;
}
.reg-side .aurora { filter: blur(50px); opacity: 0.5; inset: -30%; }
.reg-side .aurora i:nth-child(1) { background: radial-gradient(circle, rgba(240, 78, 35, 0.85), transparent 65%); }
.reg-side .aurora i:nth-child(2) { background: radial-gradient(circle, rgba(34, 184, 207, 0.5), transparent 65%); }
.reg-side-content { position: relative; flex: 1; }
.reg-side h2 { font-family: var(--display); color: #fff; font-size: 22px; margin: 0 0 10px; }
.reg-side #side-blurb { font-size: 13.5px; color: #a7abc4; min-height: 60px; margin: 0 0 26px; transition: opacity var(--t-med); }
.reg-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.reg-step {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px;
  font-size: 13.5px; font-weight: 600; color: #8e93ad;
  transition: background var(--t-med), color var(--t-med);
}
.reg-step.active { background: rgba(255, 255, 255, 0.09); color: #fff; }
.reg-step.done { color: #9fe8b8; }
.reg-dot {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid currentColor; font-size: 12px; font-weight: 800; font-family: var(--display);
  transition: background var(--t-med), border-color var(--t-med), transform var(--t-med) var(--ease-spring);
}
.reg-step.active .reg-dot { background: var(--accent); border-color: var(--accent); color: #fff; transform: scale(1.12); }
.reg-step.done .reg-dot { background: rgba(12, 163, 12, 0.25); border-color: transparent; font-size: 0; }
.reg-step.done .reg-dot::before { content: "✓"; font-size: 13px; }
.reg-side-foot { position: relative; font-size: 12.5px; color: #8e93ad; }
.reg-side-foot a { color: #ffcdb8; font-weight: 600; }

.reg-main { flex: 1; padding: 30px 34px 26px; display: flex; flex-direction: column; min-width: 0; }
.reg-progress { height: 3px; border-radius: 999px; background: var(--grid); overflow: hidden; margin-bottom: 24px; }
.reg-progress-fill { height: 100%; width: 0; border-radius: 999px; background: var(--accent); transition: width var(--t-slow) var(--ease-out); }
#register-form { display: flex; flex-direction: column; flex: 1; }
.step-panel { display: none; flex: 1; }
.step-panel.active { display: block; }
.step-panel.from-right { animation: step-right 0.4s var(--ease-out) both; }
.step-panel.from-left { animation: step-left 0.4s var(--ease-out) both; }
.step-panel h1 { font-family: var(--display); font-size: 22px; margin: 0 0 4px; color: var(--brand-2); }
.step-panel .sub { color: var(--ink-2); font-size: 13.5px; margin: 0 0 22px; }

.input-wrap { position: relative; }
.field.is-valid .input-wrap::after {
  content: "✓"; position: absolute; right: 13px; top: 50%; translate: 0 -50%;
  color: var(--good-ink); font-weight: 800; font-size: 14px;
  animation: scale-in 0.25s var(--ease-spring) both;
}
.field.is-valid input { border-color: rgba(12, 163, 12, 0.5); }
.field.shake { animation: shake 0.4s var(--ease-out); }

.wizard-nav { display: flex; align-items: center; gap: 14px; margin-top: auto; padding-top: 22px; }
.wizard-count { flex: 1; text-align: center; font-size: 12.5px; }

.review-list { display: flex; flex-direction: column; }
.review-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 4px;
  border-bottom: 1px solid var(--grid); opacity: 0; animation: fade-up 0.4s var(--ease-out) forwards;
}
.review-row:nth-child(1) { animation-delay: 0ms; } .review-row:nth-child(2) { animation-delay: 50ms; }
.review-row:nth-child(3) { animation-delay: 100ms; } .review-row:nth-child(4) { animation-delay: 150ms; }
.review-row:nth-child(5) { animation-delay: 200ms; } .review-row:nth-child(6) { animation-delay: 250ms; }
.review-label { width: 90px; flex-shrink: 0; font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.review-value { flex: 1; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.review-edit {
  border: none; background: none; color: var(--accent-strong); font-size: 12.5px; font-weight: 700;
  cursor: pointer; font-family: inherit; padding: 4px 8px; border-radius: 6px;
  transition: background var(--t-fast);
}
.review-edit:hover { background: rgba(240, 78, 35, 0.08); }

.reg-success {
  position: relative; z-index: 1; margin-top: 28px; width: 100%; max-width: 560px;
  background: var(--card); border: 1px solid var(--hairline); border-radius: 14px;
  box-shadow: var(--shadow-2); padding: 40px 38px; text-align: center;
  animation: scale-in 0.45s var(--ease-spring) both;
}
.reg-success h1 { font-family: var(--display); font-size: 25px; color: var(--brand-2); margin: 18px 0 8px; }
.reg-success .sub { color: var(--ink-2); font-size: 14px; margin: 0 0 26px; }
.success-check svg { display: block; margin: 0 auto; }
.check-circle { stroke: var(--good); stroke-dasharray: 202; stroke-dashoffset: 202; animation: draw-stroke 0.7s var(--ease-out) 0.15s forwards; }
.check-mark { stroke: var(--good-ink); stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw-stroke 0.45s var(--ease-out) 0.75s forwards; }

.timeline { list-style: none; margin: 0 0 28px; padding: 0; text-align: left; }
.tl-item { position: relative; padding: 0 0 20px 34px; opacity: 0; animation: fade-up 0.5s var(--ease-out) forwards; }
.tl-item:nth-child(1) { animation-delay: 1.0s; }
.tl-item:nth-child(2) { animation-delay: 1.25s; }
.tl-item:nth-child(3) { animation-delay: 1.5s; }
.tl-item::before {
  content: ""; position: absolute; left: 8px; top: 6px; width: 10px; height: 10px;
  border-radius: 50%; border: 2.5px solid var(--muted); background: #fff;
}
.tl-item.tl-done::before { background: var(--good); border-color: var(--good); }
.tl-item::after { content: ""; position: absolute; left: 14px; top: 22px; bottom: 2px; width: 2px; background: var(--grid); }
.tl-item:last-child::after { display: none; }
.tl-item strong { display: block; font-size: 14px; color: var(--ink); }
.tl-item span { font-size: 12.5px; color: var(--muted); }

.confetti { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 60; }
.confetti i {
  position: absolute; top: -14px; display: block;
  animation-name: confetti-fall; animation-timing-function: cubic-bezier(0.25, 0.4, 0.55, 1);
  animation-fill-mode: both;
}

@media (max-width: 760px) {
  .reg-shell { flex-direction: column; min-height: 0; }
  .reg-side { width: 100%; padding: 22px 24px; }
  .reg-side #side-blurb { min-height: 0; margin-bottom: 16px; }
  .reg-steps { flex-direction: row; gap: 4px; }
  .reg-step { padding: 8px; font-size: 0; gap: 0; }
  .reg-step .reg-dot { font-size: 12px; }
  .reg-step.done .reg-dot::before { font-size: 13px; }
  .reg-side-foot { display: none; }
  .reg-main { padding: 24px 22px 20px; }
}

/* ── Portal shell ────────────────────────────────────────── */
.portal { display: flex; min-height: 100vh; }
.sidebar {
  width: 236px; flex-shrink: 0; color: var(--ink-2);
  background: #ffffff;
  border-right: 1px solid var(--hairline);
  display: flex; flex-direction: column; padding: 22px 14px; position: sticky; top: 0; height: 100vh;
}
.sidebar::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 160px;
  background: radial-gradient(ellipse at 30% -20%, rgba(240, 78, 35, 0.05), transparent 70%);
  pointer-events: none;
}
/* (brand moved to the top bar; sidebar starts with navigation) */
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 15px; border-radius: 999px;
  color: var(--ink-2); font-size: 14px; font-weight: 600; cursor: pointer; border: none;
  background: transparent; width: 100%; text-align: left; font-family: var(--sans); margin-bottom: 3px;
  position: relative;
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast) var(--ease-out);
}
.nav-item:hover { background: var(--grid); color: var(--ink); transform: translateX(2px); }
.nav-item.active {
  background: rgba(240, 78, 35, 0.1);
  color: var(--accent-strong);
  box-shadow: inset 0 0 0 1px rgba(240, 78, 35, 0.18);
}
.nav-ico { width: 16px; height: 16px; flex-shrink: 0; transition: transform var(--t-med) var(--ease-spring); }
.nav-item:hover .nav-ico { transform: scale(1.12); }
/* Workspace color identity (matches OneTPT's module palette): the icon
   carries the hue, labels stay ink, the active pill stays brand rust. */
.nav-item[data-view="executive"] .nav-ico { color: #b96a00; }
.nav-item[data-view="partners"] .nav-ico,
.nav-item[data-view="admins"] .nav-ico { color: #c2255c; }
.nav-item[data-view="commission"] .nav-ico { color: #0a7a54; }
.nav-item[data-view="opportunities"] .nav-ico,
.nav-item[data-view="new"] .nav-ico { color: #f04e23; }
.nav-item[data-view="projects"] .nav-ico { color: #b96a00; }
.nav-item[data-view="messages"] .nav-ico { color: #1c5cab; }
.nav-item[data-view="services"] .nav-ico,
.nav-item[data-view="explore"] .nav-ico { color: #0c8599; }
.nav-item[data-view="meetings"] .nav-ico,
.nav-item[data-view="documents"] .nav-ico { color: #5f3dc4; }
.nav-item[data-view="alerts"] .nav-ico { color: #d03b3b; }
.nav-item[data-view="feedback"] .nav-ico,
.nav-item[data-view="news"] .nav-ico { color: #ae3ec9; }
.nav-item.active .nav-ico { color: inherit; }
.sidebar .spacer { flex: 1; }
.sidebar .who {
  margin: 0 4px 8px; padding: 11px 12px; font-size: 12.5px; color: var(--muted);
  background: var(--grid); border: 1px solid var(--hairline);
  border-radius: 12px; overflow-wrap: anywhere;
}
.sidebar .who strong { color: var(--ink); display: block; font-size: 13px; }

.main { flex: 1; padding: 30px clamp(26px, 3vw, 60px) 72px; min-width: 0; }
.page-title {
  display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap;
  gap: 12px; margin-bottom: 22px; padding: 16px 22px 15px;
  background: linear-gradient(115deg, rgba(252, 107, 63, 0.045), rgba(245, 158, 11, 0.025) 45%, rgba(255, 255, 255, 0.65));
  border: 1px solid var(--hairline); border-radius: var(--radius);
  position: relative;
}
.page-title::after {
  /* Brand signature: a short flame-gradient tick under the title */
  content: ""; position: absolute; left: 22px; bottom: 10px; width: 52px; height: 2.5px;
  background: var(--grad-text); border-radius: 2px;
}
.page-title h1 { font-family: var(--display); font-size: 27px; margin: 0; color: var(--brand-2); letter-spacing: -0.015em; }
.page-title .sub { color: var(--muted); font-size: 13.5px; }
.pt-lead { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.report-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.view { display: none; }
.view.active { display: block; animation: fade-up 0.4s var(--ease-out) both; }

/* ── Deck header ─────────────────────────────────────────── */
.deck-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
  margin-bottom: 24px; flex-wrap: wrap; padding: 20px 24px 18px;
  background: linear-gradient(115deg, rgba(252, 107, 63, 0.05), rgba(245, 158, 11, 0.025) 45%, rgba(255, 255, 255, 0.65));
  border: 1px solid var(--hairline); border-radius: var(--radius);
  position: relative;
}
.deck-head::after {
  content: ""; position: absolute; left: 24px; bottom: 12px; width: 52px; height: 2.5px;
  background: var(--grad-text); border-radius: 2px;
}
.deck-date { margin: 0 0 2px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; }
.deck-head h1 { font-family: var(--display); font-size: 30px; margin: 0 0 6px; color: var(--brand-2); letter-spacing: -0.015em; }
.deck-sub { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.rate-stamp {
  align-self: center; text-align: center; padding: 11px 20px 13px;
  border: 1.5px solid var(--rule); border-radius: 12px; color: var(--brand);
  background: linear-gradient(180deg, #ffffff, rgba(255, 254, 251, 0.7));
  box-shadow: var(--shadow-1); position: relative; overflow: hidden;
}
.rate-stamp::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2.5px;
  background: var(--grad-text);
}
.rate-stamp span { display: block; font-size: 10px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.rate-stamp strong { font-family: var(--display); font-size: 24px; line-height: 1.15; }

/* ── Stat strip: ruled columns, not cards ────────────────── */
/* Typography-led stat band: no boxes — a firm ink rule above, hairlines
   between the figures, big display numbers doing the hierarchy. */
.stat-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  border-top: 2px solid var(--brand-2);
  border-image: var(--grad-text) 1;
  margin-bottom: 30px;
}
.stat {
  padding: 18px 22px 16px 0; position: relative;
  opacity: 0; animation: fade-up 0.5s var(--ease-out) forwards;
}
.stat + .stat { border-left: 1px solid var(--hairline); padding-left: 22px; }
.stat:nth-child(1) { animation-delay: 0ms; } .stat:nth-child(2) { animation-delay: 70ms; }
.stat:nth-child(3) { animation-delay: 140ms; } .stat:nth-child(4) { animation-delay: 210ms; }
.stat:nth-child(5) { animation-delay: 280ms; }
.stat-label { display: block; font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 6px; }
.stat-value { display: block; font-family: var(--display); font-size: 31px; font-weight: 700; color: var(--ink); letter-spacing: -0.015em; font-variant-numeric: lining-nums; }
.stat-hero .stat-value { color: var(--good-ink); }
.stat-sub { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
.stat-sub.up { color: var(--good-ink); }
.stat-sub.down { color: var(--critical-ink); }
.stat-value.loading {
  color: transparent !important; border-radius: 6px; min-height: 1em; width: 70%;
  background: linear-gradient(90deg, var(--grid) 25%, #f7f8fc 40%, var(--grid) 55%);
  background-size: 300px 100%; animation: shimmer 1.1s linear infinite;
}
.stat-arc { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.arc-gauge { width: 54px; height: 54px; }
.arc-track { stroke: var(--grid); stroke-width: 6; }
.arc-fill { stroke: var(--viz); stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset 0.9s var(--ease-out); }
.arc-gauge.arc-good .arc-fill { stroke: var(--good); }
.arc-gauge.arc-warn .arc-fill { stroke: var(--warning, #b47908); }
.arc-gauge.arc-bad .arc-fill { stroke: var(--critical); }
.arc-text { font-family: var(--display); font-size: 15px; font-weight: 700; fill: var(--ink); }
.stat-arc .stat-sub { flex-basis: 100%; margin-top: 2px; }

/* ── Deck grid & panels ──────────────────────────────────── */
.deck-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 28px; align-items: start; }
/* Editorial deck — DASHBOARD views only: content splits, not boxes. Detail
   cockpits (project/opportunity/partner full views) keep boxed panels; dense
   charts need the frame and breathing room. */
#view-dashboard .deck-grid .panel, #view-dashboard .deck-grid .card {
  background: transparent; border: 0; box-shadow: none; border-radius: 0;
  padding: 0 0 4px;
}
#view-dashboard .deck-grid .panel:hover, #view-dashboard .deck-grid .card:hover { box-shadow: none; transform: none; }
#view-dashboard .deck-grid .panel-head { border-bottom: 1.5px solid var(--rule); }
#view-dashboard .deck-rail { border-left: 1px solid var(--hairline); padding-left: 24px; }
@media (max-width: 1080px) { #view-dashboard .deck-rail { border-left: 0; padding-left: 0; } }
.deck-main, .deck-rail { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
@media (max-width: 1080px) { .deck-grid { grid-template-columns: 1fr; } }

.panel, .card {
  background: linear-gradient(180deg, #ffffff 0%, var(--card) 100%);
  border: 1px solid var(--hairline); border-radius: var(--radius);
  box-shadow: var(--shadow-1); padding: 21px 24px; margin: 0;
  transition: box-shadow var(--t-med), transform var(--t-med) var(--ease-out);
}
.panel:hover, .card:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }
/* Every tab switch replays a staggered cascade — the page feels alive, not stamped */
.view.active .panel, .view.active .card {
  opacity: 0; animation: fade-up 0.45s var(--ease-out) forwards;
}
.view.active .panel:nth-of-type(2), .view.active .card:nth-of-type(2) { animation-delay: 70ms; }
.view.active .panel:nth-of-type(3), .view.active .card:nth-of-type(3) { animation-delay: 140ms; }
.view.active .panel:nth-of-type(4), .view.active .card:nth-of-type(4) { animation-delay: 210ms; }
.view.active .panel:nth-of-type(n+5), .view.active .card:nth-of-type(n+5) { animation-delay: 280ms; }
.card { margin-bottom: 20px; }
.panel h2, .card h2 { font-size: 12px; margin: 0 0 14px; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 800; }
.panel-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding-bottom: 10px; margin-bottom: 16px;
  border-bottom: 1px solid var(--grid); position: relative;
}
.panel-head::after {
  /* Brand signature: the flame tick from the page title, panel-sized */
  content: ""; position: absolute; left: 0; bottom: -1px; width: 34px; height: 2px;
  background: var(--grad-text); border-radius: 2px;
}
.panel-head h2 { margin: 0; }
.panel-note { font-size: 12px; color: var(--muted); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 980px) { .two-col { grid-template-columns: 1fr; } }

/* ── Column chart ────────────────────────────────────────── */
/* A real chart: top-lit gradient bars with rounded caps, a value label riding
   every column, a 0/mid/max scale on the trailing edge, and a styled tooltip
   on hover/focus. `.col-axis` is a decorative extra column built from the
   very same box classes as a real one — that's what keeps its ticks aligned
   to the tracks without hand-tuned pixel offsets. */
.colchart { display: flex; align-items: flex-end; gap: 12px; padding-top: 6px; }
.col { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0; }
.col-value {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 4px;
  font-size: 12px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; min-height: 16px;
}
.col-delta { font-size: 10px; font-weight: 800; }
.col-delta-up { color: var(--good-ink); }
.col-delta-down { color: var(--critical-ink); }
.col-track {
  position: relative; height: 132px; width: 100%; max-width: 48px;
  display: flex; align-items: flex-end; border-bottom: 1.5px solid var(--rule);
  /* Quiet mid-height gridline — half of the 0/mid/max scale on the axis edge. */
  background-image: linear-gradient(to top, transparent calc(50% - 1px), var(--grid) calc(50% - 1px), var(--grid) calc(50% + 1px), transparent calc(50% + 1px));
}
.col-fill {
  width: 100%; height: 0; border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, var(--viz), color-mix(in srgb, var(--viz) 65%, transparent));
  transition: height 0.8s var(--ease-out), filter var(--t-fast, 150ms);
}
/* Money columns (won revenue): green — won money is green everywhere else.
   (.chart-money, NOT .col-money — that class is the reward-model column gate.) */
.chart-money .col-fill { background: linear-gradient(180deg, var(--good), color-mix(in srgb, var(--good) 65%, transparent)); }
.col:hover .col-fill { filter: brightness(1.08) saturate(1.05); }
.col-label { font-size: 12px; color: var(--muted); font-weight: 600; min-height: 15px; }
.col-sub { font-size: 10.5px; color: var(--muted); min-height: 13px; }

/* Styled tooltip — label + exact value, shown on hover/focus. The title
   attribute (set alongside this in JS) is the accessible/no-CSS fallback. */
.col-tip {
  position: absolute; bottom: 100%; left: 50%; translate: -50% 6px; z-index: 6;
  display: flex; flex-direction: column; gap: 2px; min-width: 96px; margin-bottom: 6px;
  padding: 8px 11px; border-radius: 9px; background: #0b1023; color: #fff; font-size: 11.5px;
  box-shadow: 0 14px 34px -10px rgba(11, 16, 35, 0.5);
  opacity: 0; visibility: hidden; pointer-events: none; text-align: center;
  transition: opacity var(--t-fast), translate var(--t-med) var(--ease-out), visibility var(--t-fast);
}
.col-tip::after {
  content: ""; position: absolute; top: 100%; left: 50%; margin-left: -5px;
  border: 5px solid transparent; border-top-color: #0b1023;
}
.col-tip strong { font-family: var(--display); font-size: 12.5px; letter-spacing: 0.02em; }
.col-tip-value { font-weight: 700; font-variant-numeric: tabular-nums; }
.col-tip-sub { color: #b7bcd6; font-size: 10.5px; }
.col:hover .col-tip, .col:focus-visible .col-tip { opacity: 1; visibility: visible; translate: -50% 0; }
.col-edge-start .col-tip { left: 0; translate: 0 6px; }
.col-edge-start:hover .col-tip, .col-edge-start:focus-visible .col-tip { translate: 0 0; }
.col-edge-start .col-tip::after { left: 18px; }
.col-edge-end .col-tip { left: auto; right: 0; translate: 0 6px; }
.col-edge-end:hover .col-tip, .col-edge-end:focus-visible .col-tip { translate: 0 0; }
.col-edge-end .col-tip::after { left: auto; right: 13px; }

/* The trailing axis column — ticks only, never a click target. */
.col-axis { flex: 0 0 auto; }
.col-track.col-axis-track { width: 56px; max-width: 56px; border-bottom: none; background-image: none; }
.col-axis-tick {
  position: absolute; right: 0; font-size: 10px; font-weight: 600; color: var(--muted);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.col-axis-max { top: -6px; }
.col-axis-mid { top: 50%; transform: translateY(-50%); }
.col-axis-zero { bottom: -6px; }
/* The 8-week pulse is a sparkline, not a hero chart (see .pulse-cols below) —
   a full axis column only crowds it. */
.pulse-cols .col-axis { display: none; }

/* ── Pipeline board ──────────────────────────────────────── */
.pipe-track { display: flex; gap: 3px; height: 44px; border-radius: 11px; overflow: hidden; }
.pipe-seg {
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; min-width: 14px; cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease;
}
.pipe-seg:hover { filter: brightness(0.94); }
/* Stage colors — open stages deepen through one blue as the deal advances;
   Closed Won is the green payoff, Closed Lost a quiet rose. */
.pipe-submitted { background: #9ec5f4; color: #10365f; }
.pipe-working_deal { background: #6ba6e8; color: #0c2a4d; }
.pipe-pending_tpt { background: #4a90e2; color: #fff; }
.pipe-pending_partner { background: #3b7fd0; color: #fff; }
.pipe-deliverables_sent { background: #2f6fc0; color: #fff; }
.pipe-sow_sent { background: #275fae; color: #fff; }
.pipe-change_order_sent { background: #1f4f98; color: #fff; }
.pipe-pending_pax8 { background: #174082; color: #fff; }
.pipe-closed_won { background: #2fa34c; color: #fff; }
.pipe-closed_lost { background: #d9a3a3; color: #5c2020; }
.pipe-legend { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.pipe-key {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-2);
  background: var(--paper); border: 1px solid var(--hairline); border-radius: 999px;
  padding: 5px 11px; transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.pipe-key:hover { border-color: var(--flame-mid, #f04e23); transform: translateY(-1px); box-shadow: 0 3px 10px rgba(16, 24, 51, 0.08); }
.pipe-key b { font-weight: 800; color: var(--brand-2); }
.pipe-dot { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }

/* Pipeline stage rows — dashboard "Where your deals stand" */
.pipe-sum { display: flex; gap: 30px; margin-bottom: 14px; }
.pipe-sum-item b { display: block; font-family: var(--display); font-size: 25px; font-weight: 800; line-height: 1.05; color: var(--brand-2); font-variant-numeric: lining-nums; }
.pipe-sum-item span { font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.pipe-sum-won b { color: var(--good-ink); }
.pipe-sum-lost b { color: var(--critical-ink); }
.pipe-rows { display: flex; flex-direction: column; }
.pipe-row {
  display: grid; grid-template-columns: minmax(118px, 158px) 1fr 38px; gap: 12px; align-items: center;
  width: 100%; padding: 8px 6px; margin: 0; border: 0; background: none; text-align: left;
  font: inherit; cursor: pointer; border-top: 1px dashed var(--grid); border-radius: 8px;
  transition: background 0.15s ease;
}
.pipe-row:hover { background: rgba(42, 120, 214, 0.07); }
.pipe-row:focus-visible { outline: 2px solid #2a78d6; outline-offset: 1px; }
.pipe-row-label { font-size: 12.5px; font-weight: 700; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pipe-row-track { position: relative; height: 12px; border-radius: 6px; background: rgba(16, 54, 95, 0.07); overflow: hidden; }
.pipe-row-fill { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 6px; animation: bar-grow 0.7s var(--ease-out); }
.pipe-row-count { font-family: var(--display); font-size: 14.5px; font-weight: 800; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
@keyframes bar-grow { from { width: 0; } }

/* Milestone graph — project detail, replaces the plain date bar when the
   project carries certification milestones */
.mstone { display: flex; flex-direction: column; }
.mstone-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.mstone-headline b { font-family: var(--display); font-size: 21px; font-weight: 800; color: var(--brand-2); font-variant-numeric: lining-nums; }
.mstone-headline span { font-size: 12.5px; color: var(--ink-2); margin-left: 7px; }
.mstone-pct { font-family: var(--display); font-size: 21px; font-weight: 800; color: #1c5cab; }
.mstone-pct-done { color: var(--good-ink); }
.mstone-row { display: grid; grid-template-columns: minmax(140px, 225px) 1fr 96px; gap: 14px; align-items: center; padding: 9px 0; border-top: 1px dashed var(--grid); }
.mstone-label { min-width: 0; }
.mstone-label strong { display: block; font-size: 13px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mstone-label span { font-size: 10.5px; color: var(--muted); font-weight: 700; letter-spacing: 0.05em; }
.mstone-track { position: relative; height: 15px; border-radius: 8px; background: rgba(16, 54, 95, 0.08); overflow: hidden; }
.mstone-fill { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 8px; animation: bar-grow 0.8s var(--ease-out); }
.mstone-ach { background: linear-gradient(90deg, #0a7a2f, #2fa34c); }
.mstone-sched { background: repeating-linear-gradient(-55deg, #f2b52d 0 5px, #e0a41f 5px 10px); border-radius: 0 8px 8px 0; }
.mstone-tick { position: absolute; top: 0; bottom: 0; width: 1.5px; background: rgba(255, 255, 255, 0.8); }
.mstone-val { text-align: right; }
.mstone-val b { display: block; font-family: var(--display); font-size: 15px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.mstone-val span { font-size: 10.5px; color: var(--muted); font-weight: 600; }
.mstone-val-done b { color: var(--good-ink); }
.mstone-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 12px; padding-top: 9px; border-top: 1px solid var(--grid); font-size: 12px; color: var(--muted); }
.mstone-foot-mid { font-weight: 700; color: var(--ink-2); }

/* ── Milestone Gantt ─────────────────────────────────────── */
.gantt { overflow-x: auto; margin-bottom: 14px; }
.gantt-svg { width: 100%; min-width: 640px; display: block; }
.gantt-tick { font-family: var(--body, Inter, sans-serif); font-size: 10px; fill: var(--muted); }
.gantt-label { font-family: var(--body, Inter, sans-serif); font-size: 11.5px; font-weight: 600; fill: var(--ink); }
.gantt-label-done { fill: var(--good-ink); }
.gantt-today { font-size: 8.5px; font-weight: 800; letter-spacing: 0.08em; fill: #10365f; }
.mstone-due-over { color: var(--critical-ink); font-weight: 700; }

/* Delivery milestones — admin management list */
.ms-list { list-style: none; margin: 0 0 14px; padding: 0; }
.ms-item { display: flex; align-items: center; gap: 12px; padding: 9px 2px; border-top: 1px dashed var(--grid); }
.ms-item:first-child { border-top: 0; }
.ms-empty { padding: 4px 0 10px; }
.ms-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ms-name strong { font-size: 13.5px; }
.ms-status { padding: 6px 10px; border: 1px solid var(--rule); border-radius: 8px; background: var(--paper); font: inherit; font-size: 12.5px; }
.ms-composer { align-items: end; }
.team-role { display: block; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.team-row { margin-bottom: 9px; }
.team-row:last-child { margin-bottom: 0; }
.team-line { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.team-line strong { font-size: 13.5px; }

/* ── Delivery state, risks, escalation ───────────────────── */
.work-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: 999px;
  font-size: 12.5px; font-weight: 800; letter-spacing: 0.01em;
}
.work-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.work-tpt_working { background: rgba(42, 120, 214, 0.12); color: #1c5cab; }
.work-customer_pending { background: rgba(180, 121, 8, 0.13); color: #8a5b06; }
.work-third_party_pending { background: rgba(95, 61, 196, 0.11); color: #4f33a8; }
.risk-list { list-style: none; margin: 0; padding: 0; }
.risk-item { display: flex; align-items: flex-start; gap: 10px; padding: 9px 2px; border-top: 1px dashed var(--grid); }
.risk-item:first-child { border-top: 0; }
.risk-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; margin-top: 4px; }
.risk-dot.risk-high, .risk-high.sig-bar-fill { background: var(--critical, #d03b3b); }
.risk-dot.risk-medium, .risk-medium.sig-bar-fill { background: #b47908; }
.risk-dot.risk-low, .risk-low.sig-bar-fill { background: #2a78d6; }
.risk-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.risk-body strong { font-size: 13px; }
.risk-chip { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; padding: 3px 9px; border-radius: 999px; flex: none; }
.risk-chip-open { background: rgba(208, 59, 59, 0.1); color: var(--critical-ink); }
.risk-chip-mitigated { background: rgba(12, 163, 12, 0.1); color: var(--good-ink); }
.esc-consultant { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.esc-consultant strong { font-size: 14px; }
.esc-mail { font-size: 12.5px; color: #1c5cab; text-decoration: none; }
.esc-mail:hover { text-decoration: underline; }
.escm-list { list-style: none; margin: 0 0 12px; padding: 0; }
.escm-row { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; border-top: 1px dashed var(--grid); }
.escm-row:first-child { border-top: 0; }
.escm-level {
  flex: none; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  font-size: 11.5px; font-weight: 800; background: rgba(42, 120, 214, 0.12); color: #1c5cab;
}
.escm-ceo { background: var(--grad-text); color: #fff; }
.esc-btn-row { display: flex; gap: 8px; margin: 4px 0 8px; flex-wrap: wrap; }
.esc-status {
  font-size: 12.5px; font-weight: 700; color: var(--warning-ink, #8a5b06);
  background: rgba(250, 178, 25, 0.12); border-radius: 9px; padding: 8px 12px; margin: 0 0 10px;
}
.om-esc-row { display: flex; align-items: center; gap: 10px; margin-top: 14px; }

/* Admin escalations queue */
.esc-list { list-style: none; margin: 0; padding: 0; }
.esc-item { display: flex; gap: 14px; align-items: flex-start; padding: 12px 2px; border-top: 1px dashed var(--grid); }
.esc-item:first-child { border-top: 0; }
.esc-resolved { opacity: 0.55; }
.esc-body { flex: 1; min-width: 0; }
.esc-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.esc-level {
  font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 3px 9px; border-radius: 999px; background: rgba(42, 120, 214, 0.12); color: #1c5cab;
}
.esc-leadership { background: rgba(95, 61, 196, 0.11); color: #4f33a8; }
.esc-ceo { background: var(--grad-text); color: #fff; }
.esc-reason { font-size: 13px; color: var(--ink-2); margin: 5px 0 0; }
.esc-actions { display: flex; flex-direction: column; gap: 6px; flex: none; }
.esc-done { font-size: 11.5px; font-weight: 800; color: var(--good-ink); text-transform: uppercase; letter-spacing: 0.06em; }
.esc-cell { width: 100%; min-width: 90px; padding: 6px 9px; border: 1px solid var(--rule); border-radius: 7px; font: inherit; font-size: 12.5px; background: var(--paper); }

/* Delivery signals — dashboard graphical strip */
.sig-body { display: grid; grid-template-columns: minmax(230px, 1.2fr) 1fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 900px) { .sig-body { grid-template-columns: 1fr; } }
.sig-col { min-width: 0; }
.sig-donut-row { display: flex; align-items: center; gap: 16px; }
.sig-donut-wrap { position: relative; width: 118px; height: 118px; flex: none; }
.sig-donut { width: 118px; height: 118px; }
.sig-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.sig-center b { font-family: var(--display); font-size: 25px; line-height: 1; color: var(--brand-2); }
.sig-center span { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); }
.sig-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.sig-legend li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); }
.sig-legend b { font-family: var(--display); font-weight: 800; color: var(--ink); }
.sig-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.sig-bar-row { display: grid; grid-template-columns: 64px 1fr 26px; gap: 10px; align-items: center; padding: 6px 0; }
.sig-bar-label { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.sig-bar-track { position: relative; height: 11px; border-radius: 6px; background: rgba(16, 54, 95, 0.07); overflow: hidden; display: block; }
.sig-bar-fill { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 6px; animation: bar-grow 0.7s var(--ease-out); }
.sig-bar-count { font-family: var(--display); font-size: 13.5px; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.sig-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sig-clear { font-size: 12.5px; color: var(--good-ink); font-weight: 700; margin: 4px 0; }
.sig-esc-live {
  margin: 12px 0 0; font-size: 12.5px; font-weight: 700; color: var(--critical-ink);
  background: rgba(208, 59, 59, 0.07); border-radius: 9px; padding: 7px 11px;
}

/* ── Enterprise KPI band (delivery partners) ─────────────── */
.kpi-band { display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); gap: 14px; margin-bottom: 30px; }
.kpi-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 7px; margin: 0;
  padding: 16px 18px 15px; background: var(--paper); border: 1px solid var(--hairline);
  border-radius: var(--radius); text-align: left; cursor: pointer; font: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.kpi-tile:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(16, 24, 51, 0.09); border-color: var(--hairline-strong, #ccd3e0); }
.kpi-tile:focus-visible { outline: 2px solid #2a78d6; outline-offset: 2px; }
.kpi-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
.kpi-ic svg { width: 17px; height: 17px; }
.kt-accent { background: rgba(42, 120, 214, 0.11); color: #1c5cab; }
.kt-good { background: rgba(12, 163, 12, 0.11); color: var(--good-ink); }
.kt-bad { background: rgba(208, 59, 59, 0.1); color: var(--critical-ink); }
.kpi-count { font-family: var(--display); font-size: 34px; font-weight: 800; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.kpi-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.09em; color: var(--muted); }
.kpi-strip { display: flex; gap: 2px; width: 100%; height: 6px; border-radius: 4px; overflow: hidden; margin-top: 3px; }
.kpi-seg { height: 100%; }
.kf-good { background: #0ca30c; }
.kf-warn { background: #b47908; }
.kf-bad { background: #d03b3b; }
.kpi-foot { font-size: 11.5px; color: var(--muted); }

/* ── Top-5 visual rows ───────────────────────────────────── */
.stage-chip {
  display: inline-block; padding: 3px 10px; border-radius: 999px; white-space: nowrap;
  font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em;
}
.top5-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.top5-meta-main { font-family: var(--display); font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink); }
.top5-track { display: block; height: 5px; border-radius: 3px; background: rgba(16, 54, 95, 0.08); overflow: hidden; margin-top: 6px; }
.top5-fill { display: block; height: 100%; border-radius: 3px; background: #2a78d6; animation: bar-grow 0.7s var(--ease-out); }
.top5-fill.tf-completed { background: #0ca30c; }
.top5-fill.tf-at_risk { background: #b47908; }
.top5-fill.tf-delayed { background: #d03b3b; }
.top5-fill.tf-on_hold { background: var(--muted); }
.top5-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.top5-dot.td-on_track, .top5-dot.td-completed { background: #0ca30c; }
.top5-dot.td-at_risk { background: #b47908; }
.top5-dot.td-delayed { background: #d03b3b; }
.top5-dot.td-on_hold { background: var(--muted); }

/* ── Commission statement ────────────────────────────────── */
.stmt { display: flex; flex-direction: column; }
.stmt-row { display: flex; align-items: baseline; gap: 8px; padding: 7px 0; }
.stmt-label { font-size: 13px; color: var(--ink-2); }
.stmt-leader { flex: 1; border-bottom: 1px dotted var(--rule); transform: translateY(-3px); }
.stmt-value { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); }
.stmt-strong .stmt-value { font-family: var(--display); font-size: 20px; color: var(--good-ink); }
.stmt-note { font-family: var(--display); font-style: italic; font-size: 12.5px; color: var(--muted); margin: 14px 0 0; border-top: 1px solid var(--grid); padding-top: 12px; }

/* Click-to-edit facts (2026-08-20): the deal record is completed on its own
   page, one field at a time, instead of through a modal. The affordance stays
   quiet until the row is hovered so a read-only pass still reads as prose. */
.stmt-editable { cursor: text; border-radius: 6px; padding: 1px 5px; margin: -1px -5px; transition: background 120ms ease, box-shadow 120ms ease; }
.stmt-editable:hover { background: var(--grid); box-shadow: inset 0 0 0 1px var(--rule); }
.stmt-editable:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.stmt-row:hover .stmt-editable::after { content: '✎'; margin-left: 6px; font-size: 11px; font-weight: 400; color: var(--muted); }
.stmt-input { font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); background: var(--card); border: 1.5px solid var(--accent); border-radius: 6px; padding: 3px 7px; min-width: 140px; max-width: 260px; }
.stmt-input:focus { outline: none; box-shadow: 0 0 0 3px rgba(240, 78, 35, 0.18); }
textarea.stmt-input { min-height: 70px; min-width: 220px; resize: vertical; }
.stmt-error { display: block; margin-top: 4px; font-size: 11.5px; font-weight: 600; color: var(--critical-ink); }

/* ── Aging list / queues / feeds ─────────────────────────── */
.age-list, .action-queue, .feed { list-style: none; margin: 0; padding: 0; }
.age-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--grid); }
.age-item:last-child { border-bottom: none; }
.age-body { flex: 1; min-width: 0; }
.age-body strong { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.age-chip {
  font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink-2);
  border: 1px solid var(--rule); border-radius: 999px; padding: 2px 9px; white-space: nowrap;
}
.age-chip.age-stale { color: var(--critical-ink); border-color: rgba(208, 59, 59, 0.4); background: rgba(208, 59, 59, 0.06); }
.age-empty { padding: 10px 0; font-size: 13px; color: var(--muted); }

.queue-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--grid); font-size: 13.5px; }
.queue-item:last-child { border-bottom: none; }

.feed-item { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--grid); font-size: 13px; }
.feed-item:last-child { border-bottom: none; }
.feed-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); margin-top: 6px; flex-shrink: 0; }
.feed-dot.feed-partner { background: var(--accent); }
.feed-dot.feed-admin { background: var(--brand); }
.feed-body { flex: 1; min-width: 0; }
.feed-body strong { display: block; font-size: 13px; }
.feed-body .commission-hint { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.feed-time { font-size: 11.5px; color: var(--muted); white-space: nowrap; }

/* ── Certification line items ────────────────────────────── */
.cert-line { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.cert-line .cert-ta { flex: 1; }
.cert-line .cert-ta input, .cert-line .cert-name-input {
  width: 100%; padding: 9px 12px; border: 1.5px solid #d9dbe6; border-radius: 8px;
  font-size: 13.5px; font-family: inherit; background: #fff; color: var(--ink);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.cert-line .cert-name-input { flex: 1; }
.cert-line .cert-ta input:focus, .cert-line .cert-name-input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
/* Beat `.field input`'s width:100% — the name stays wide, the count stays small */
.cert-line input.cert-qty { width: 78px; flex: 0 0 78px; padding: 9px 10px; border: 1.5px solid #d9dbe6; border-radius: 8px; font-size: 13.5px; font-family: inherit; text-align: center; }
.cert-line input.cert-qty:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.ta-item.ta-other { border-top: 1px solid var(--grid); color: var(--accent-strong); font-weight: 600; }
/* Delivery timeline picker — the choice that prices a Certificate deal */
.delivery-opts { display: flex; gap: 12px; flex-wrap: wrap; }
.delivery-opt {
  flex: 1 1 230px; display: flex; align-items: flex-start; gap: 11px; cursor: pointer;
  padding: 13px 15px; border: 1.5px solid #d9dbe6; border-radius: 10px; background: #fff;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.delivery-opt:hover { border-color: #b9bdcf; }
.delivery-opt input { width: auto; margin: 3px 0 0; accent-color: var(--accent); }
.delivery-opt:has(input:checked) { border-color: var(--accent); box-shadow: var(--ring); background: rgba(240, 78, 35, 0.05); }
.do-body { display: flex; flex-direction: column; gap: 1px; font-size: 13.5px; }
.do-body b { font-size: 14.5px; }
.do-days { color: var(--ink-2); font-weight: 600; }
.do-rate { color: var(--muted); font-size: 12.5px; }
.cert-estimate {
  margin-top: 10px; padding: 9px 13px; border-radius: 8px; font-size: 13px; font-weight: 600;
  background: rgba(12, 163, 12, 0.08); border: 1px solid rgba(12, 163, 12, 0.35); color: var(--good-ink);
}

/* ── Top-bar actions: notification bell + user menu ──────────
   Right cluster on the navy top bar, on both portals. The dropdowns anchor
   to their wrapper and float above everything. */
.top-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.bell-wrap, .user-wrap { position: relative; }
.bell {
  position: relative; width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  background: var(--grid); border: 1px solid var(--hairline); color: var(--ink-2);
  transition: background var(--t-fast), border-color var(--t-fast);
}
.bell:hover { background: var(--grid); color: var(--ink); }
.bell svg { width: 20px; height: 20px; }
.bell-badge {
  position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: #f04e23; color: #fff; font-size: 11px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; border: 2px solid #ffffff;
}
.user-chip {
  display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 10px 4px 4px;
  border-radius: 999px; background: var(--grid); border: 1px solid var(--hairline); color: var(--ink);
  transition: background var(--t-fast);
}
.user-chip:hover { background: var(--grid); }
.user-avatar {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #f04e23, #b91c1c); color: #fff; font-size: 12px; font-weight: 800;
}
.user-name { font-size: 13px; font-weight: 700; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-caret { width: 12px; height: 12px; opacity: 0.75; }
@media (max-width: 620px) { .user-name, .user-caret { display: none; } }

/* Dropdowns */
.notif-panel, .user-menu {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 200;
  background: var(--card); border: 1px solid var(--hairline); border-radius: 14px;
  box-shadow: var(--shadow-2); color: var(--ink); animation: fade-up var(--t-fast) var(--ease-out) both;
}
.notif-panel { width: 340px; max-width: 88vw; overflow: hidden; }
.notif-head { display: flex; align-items: center; justify-content: space-between; padding: 13px 15px; border-bottom: 1px solid var(--hairline); }
.notif-head strong { font-size: 14px; }
.linklike { background: none; border: none; color: var(--accent-strong); font: inherit; font-size: 12.5px; cursor: pointer; padding: 0; }
.linklike:hover { text-decoration: underline; }
.notif-list { list-style: none; margin: 0; padding: 0; max-height: 60vh; overflow-y: auto; }
.notif-item { padding: 11px 15px; border-bottom: 1px solid var(--hairline); cursor: pointer; transition: background var(--t-fast); }
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: rgba(11,16,35,0.04); }
.notif-unread { background: rgba(240,78,35,0.06); }
.notif-unread .notif-title::before {
  content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); margin-right: 7px; vertical-align: middle;
}
.notif-title { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.notif-body { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.notif-time { font-size: 11px; color: var(--muted); margin-top: 4px; }
.notif-empty { padding: 26px 15px; text-align: center; color: var(--muted); font-size: 13px; }

.user-menu { width: 230px; padding: 6px; }
.user-menu-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--hairline); margin-bottom: 6px; }
.user-menu-head strong { display: block; font-size: 14px; }
.user-menu-head .commission-hint { display: block; overflow: hidden; text-overflow: ellipsis; }
.user-menu-role { margin-top: 3px; font-weight: 700; color: var(--accent-strong); }
.user-menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 9px;
  background: none; border: none; font: inherit; font-size: 13.5px; color: var(--ink); cursor: pointer; text-align: left;
}
.user-menu-item svg { width: 16px; height: 16px; color: var(--muted); }
.user-menu-item:hover { background: rgba(16,54,95,0.05); }

/* ── Partner messaging (two-way chat) ────────────────────────
   Shared by the admin conversation modal and the partner Messages view. */
.chat {
  display: flex; flex-direction: column; gap: 10px;
  max-height: 46vh; overflow-y: auto; padding: 6px 2px 14px; margin-bottom: 14px;
}
.chat-row { display: flex; }
.chat-row.chat-partner { justify-content: flex-start; }
.chat-row.chat-tpt { justify-content: flex-end; }
.chat-bubble {
  max-width: 78%; padding: 10px 14px; border-radius: 14px; font-size: 13.5px;
  border: 1px solid var(--hairline); box-shadow: var(--shadow-1);
}
.chat-partner .chat-bubble { background: var(--card); border-bottom-left-radius: 4px; }
.chat-tpt .chat-bubble {
  background: linear-gradient(180deg, #131a33, var(--navy-deep)); color: #eceef7;
  border-color: rgba(255,255,255,0.12); border-bottom-right-radius: 4px;
}
.chat-subject { font-weight: 800; margin-bottom: 3px; }
.chat-text { white-space: pre-wrap; }
.chat-meta { font-size: 11px; opacity: 0.7; margin-top: 5px; }
.chat-tpt .chat-meta { color: #ffcdb8; }

/* Admin thread list */
.thread-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.thread-row { padding: 13px 6px; border-bottom: 1px solid var(--hairline); cursor: pointer; transition: background var(--t-fast); }
.thread-row:last-child { border-bottom: none; }
.thread-row:hover { background: rgba(16, 54, 95, 0.03); }
.thread-head { display: flex; align-items: center; gap: 10px; }
.thread-head strong { font-size: 14.5px; }
.thread-flag {
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--warning-ink); background: rgba(250,178,25,0.15); border: 1px solid rgba(250,178,25,0.4);
  padding: 2px 8px; border-radius: 999px;
}
.thread-snippet { color: var(--ink-2); font-size: 13px; margin: 3px 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Unread badge on the Messages nav item */
.nav-badge {
  margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ── Partner reward models ───────────────────────────────────
   The partner dashboard shapes itself to how the partner is rewarded. Whole
   panels and money columns show or hide by the body's reward-* class; the
   server also blanks money for non-commission partners as defence in depth. */
body:not(.reward-commission) .panel-commission { display: none; }
body:not(.reward-points) .panel-points { display: none; }
body:not(.reward-delivery) .panel-delivery { display: none; }
body:not(.reward-commission) .col-commission,
body:not(.reward-commission) .col-money { display: none; }
.rate-stamp.hidden { display: none; }

/* Points ledger */
.points-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.points-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 2px; border-bottom: 1px solid var(--hairline);
}
.points-item:last-child { border-bottom: none; }
.points-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.points-body strong { font-size: 14px; }
.points-amount {
  flex-shrink: 0; font-family: var(--display); font-weight: 800; font-size: 18px;
  color: #0f7b3d; font-variant-numeric: tabular-nums;
}
.points-amount.points-neg { color: var(--critical-ink); }

/* Delivery-at-a-glance cards */
.delivery-glance { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.glance-card {
  border: 1px solid var(--hairline); border-radius: 12px; padding: 16px 14px;
  display: flex; flex-direction: column; gap: 4px; text-align: center;
}
.glance-count { font-family: var(--display); font-size: 30px; font-weight: 800; line-height: 1; }
.glance-label { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.glance-on_track { background: linear-gradient(135deg, rgba(12,163,12,0.1), transparent 70%); border-color: rgba(12,163,12,0.35); }
.glance-on_track .glance-count { color: var(--good-ink); }
.glance-at_risk { background: linear-gradient(135deg, rgba(250,178,25,0.14), transparent 70%); border-color: rgba(250,178,25,0.4); }
.glance-at_risk .glance-count { color: var(--warning-ink); }
.glance-delayed { background: linear-gradient(135deg, rgba(208,59,59,0.1), transparent 70%); border-color: rgba(208,59,59,0.4); }
.glance-delayed .glance-count { color: var(--critical-ink); }
.delivery-glance-4 { grid-template-columns: repeat(4, 1fr); margin-bottom: 28px; }

/* Top-5 lists: ranked, clickable rows on every dashboard */
.top5-list { list-style: none; margin: 0; padding: 0; }
.top5-list .age-empty { padding: 10px 0; }
.top5-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 6px;
  border-bottom: 1px solid var(--grid); cursor: pointer;
  transition: background var(--t-fast);
}
.top5-row:last-child { border-bottom: none; }
.top5-row:hover { background: rgba(11, 16, 35, 0.035); box-shadow: inset 2.5px 0 0 var(--accent); }
.top5-rank {
  flex: none; width: 24px; height: 24px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--grid); color: var(--ink-2);
  font-family: var(--display); font-size: 12.5px; font-weight: 800;
}
.top5-row:first-child .top5-rank { background: rgba(240, 78, 35, 0.12); color: var(--accent-strong); }
.top5-body { flex: 1; min-width: 0; }
.top5-title { display: block; font-weight: 600; font-size: 13.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top5-sub { display: block; font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top5-meta { flex: none; text-align: right; font-size: 12.5px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.top5-meta .commission-hint { display: block; font-weight: 500; }
.glance-sub { font-size: 11.5px; color: var(--muted); }
.glance-neutral { background: linear-gradient(135deg, rgba(11,16,35,0.05), transparent 70%); border-color: var(--hairline-strong); }
.glance-neutral .glance-count { color: var(--ink); }
.glance-opps { background: linear-gradient(135deg, rgba(42,120,214,0.1), transparent 70%); border-color: rgba(42,120,214,0.35); }
.glance-opps .glance-count { color: #1c5cab; }
@media (max-width: 900px) { .delivery-glance-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .delivery-glance, .delivery-glance-4 { grid-template-columns: 1fr; } }

/* ── Team roles ──────────────────────────────────────────── */
.role-chip {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 800; letter-spacing: 0.04em;
  border: 1px solid; text-transform: uppercase;
}
.role-chip-superadmin { color: #7c2d92; border-color: rgba(124, 45, 146, 0.45); background: rgba(124, 45, 146, 0.08); }
.role-chip-admin { color: var(--brand); border-color: rgba(16, 54, 95, 0.4); background: rgba(16, 54, 95, 0.07); }
.role-chip-manager { color: #0e5a6b; border-color: rgba(14, 116, 144, 0.45); background: rgba(14, 116, 144, 0.09); }
.role-chip-marketing { color: #a3480e; border-color: rgba(232, 89, 12, 0.45); background: rgba(232, 89, 12, 0.09); }
.role-chip-viewer { color: var(--ink-2); border-color: var(--rule); background: var(--grid); }
/* Reward-model tags on the admin partner cards */
.reward-tag {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; border: 1px solid;
}
.reward-tag-commission { color: var(--brand); border-color: rgba(16,54,95,0.35); background: rgba(16,54,95,0.06); }
.reward-tag-points { color: #a3480e; border-color: rgba(232,89,12,0.4); background: rgba(232,89,12,0.09); }
.reward-tag-delivery { color: #0e5a6b; border-color: rgba(14,116,144,0.4); background: rgba(14,116,144,0.09); }
.tier-tag-tier1 { color: #0a7a2f; border-color: rgba(10,122,47,0.4); background: rgba(10,122,47,0.08); }
.tier-tag-tier2 { color: #6b21a8; border-color: rgba(107,33,168,0.35); background: rgba(107,33,168,0.07); }

/* Project pulse — the dashboard band on a single project */
.stat .stat-value.stat-bad { color: #b42318; }
.stat .stat-value.stat-good { color: #0a7a2f; }
.proj-pulse {
  margin-top: 4px;
  background: linear-gradient(135deg, rgba(240,78,35,0.06), rgba(255,255,255,0) 55%), #fff;
}
.pulse-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 26px; margin-bottom: 18px; }
.pring { position: relative; width: 128px; height: 128px; flex: none; }
.pring svg { width: 128px; height: 128px; display: block; }
.pring-c {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.pring-c b { font-family: var(--display, inherit); font-size: 27px; line-height: 1; font-variant-numeric: tabular-nums; }
.pring-c span { margin-top: 3px; font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: #64748b; }
.pchips {
  flex: 1; min-width: 240px;
  display: grid; gap: 14px 26px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.pchip { display: flex; align-items: center; gap: 11px; min-width: 0; }
.pchip-ic {
  width: 38px; height: 38px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
}
.pchip-ic svg { width: 17px; height: 17px; }
.pchip-ic.pt-good { background: rgba(10,122,47,0.1); color: #0a7a2f; }
.pchip-ic.pt-bad { background: rgba(180,35,24,0.1); color: #b42318; }
.pchip-ic.pt-warn { background: rgba(180,83,9,0.12); color: #b45309; }
.pchip-ic.pt-accent { background: rgba(240,78,35,0.12); color: #a72b0f; }
.pchip-ic.pt-neutral { background: rgba(100,116,139,0.12); color: #475569; }
.pchip-tx { min-width: 0; display: flex; flex-direction: column; }
.pchip-tx strong { font-size: 17px; line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pchip-tx span { font-size: 11px; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pulse-quote {
  margin: 14px 0 4px; padding: 10px 14px;
  border-left: 3px solid #f04e23; border-radius: 0 10px 10px 0;
  background: rgba(240,78,35,0.05);
}
.pulse-quote-body { margin: 0; font-size: 13.5px; line-height: 1.45; }
.pulse-quote-meta { margin: 4px 0 0; font-size: 11.5px; color: #64748b; }
.psched { margin: 6px 0 16px; }
.psched-track {
  position: relative; height: 10px; border-radius: 999px;
  background: rgba(16,54,95,0.08); overflow: visible;
}
.psched-fill {
  position: absolute; inset: 0 auto 0 0; border-radius: 999px;
  background: linear-gradient(90deg, #2a78d6, #0b1023);
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.psched-fill.psched-done { background: linear-gradient(90deg, #12b76a, #0a7a2f); }
.psched-fill.psched-over { background: linear-gradient(90deg, #f04438, #b42318); }
.psched-today {
  position: absolute; top: -4px; bottom: -4px; width: 3px; border-radius: 2px;
  background: var(--ink); transform: translateX(-50%);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.85);
}
.psched-today-over { background: #b42318; }
.psched-scale {
  display: flex; justify-content: space-between; gap: 8px;
  margin-top: 7px; font-size: 11.5px; color: #64748b;
}
.psched-mid { font-weight: 700; color: var(--ink); }
.psched-mid-over { color: #b42318; }
.pulse-grid {
  display: grid; gap: 22px; align-items: start;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.pulse-label {
  margin: 0 0 6px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: #64748b;
}
.pulse-cols { min-height: 0; }
/* The pulse activity chart is a sparkline, not a hero chart — short tracks
   keep quiet weeks from reading as a wall of empty space. */
.pulse-cols .col-track { height: 64px; max-width: 40px; }
.pulse-cols .col-value { font-size: 11px; }
.pseat-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.pseat-label { width: 82px; flex: none; font-size: 12px; color: #64748b; }
.pseat-track { flex: 1; height: 8px; border-radius: 999px; background: rgba(16,54,95,0.08); overflow: hidden; }
.pseat-fill { display: block; height: 100%; border-radius: 999px; transition: width 0.5s ease; }
.pseat-fill.pseat-sched { background: #f2b705; }
.pseat-fill.pseat-pass { background: #0a7a2f; }
.pseat-fill.pseat-assoc { background: #2a78d6; }
.pseat-val { width: 48px; flex: none; text-align: right; font-family: var(--mono, ui-monospace, monospace); font-size: 12px; }

/* Multi-role picker: several custom roles per person */
.role-multi { position: relative; display: inline-block; margin-left: 8px; }
.role-multi-pop {
  position: absolute; z-index: 40; top: calc(100% + 6px); left: 0;
  min-width: 220px; padding: 12px 14px; border-radius: 12px;
  background: #fff; border: 1px solid var(--hairline);
  box-shadow: 0 12px 32px rgba(16,54,95,0.16);
  display: flex; flex-direction: column; gap: 7px; text-align: left;
}
.role-multi-pop strong { font-size: 13px; }
.role-multi-item { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.role-multi-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

/* Sectioned forms: tabbed steps with a visited gate (parity with OneTPT) */
.fs-rail {
  display: flex; flex-wrap: wrap; gap: 2px;
  margin: 14px 0 16px; border-bottom: 1px solid var(--hairline);
}
.fs-tab {
  position: relative; appearance: none; background: none; border: none;
  font: inherit; font-size: 13px; font-weight: 600; color: #64748b;
  padding: 8px 12px 11px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  transition: color var(--t-fast);
}
.fs-tab:hover { color: var(--ink); }
.fs-tab::after {
  content: ""; position: absolute; left: 9px; right: 9px; bottom: -1px;
  height: 2px; border-radius: 2px; background: transparent;
  transition: background var(--t-fast);
}
.fs-tab.active { color: var(--brand); }
.fs-tab.active::after { background: var(--brand); }
.fs-check {
  width: 16px; height: 16px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 9.5px; font-weight: 700; color: #64748b;
  background: rgba(100,116,139,0.16);
  transition: background var(--t-fast), color var(--t-fast);
}
.fs-check.done { background: #0a7a2f; color: #fff; }
.fs-err {
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
  background: #b91c1c; color: #fff; font-size: 10px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.fs-gate-hint { font-size: 12.5px; color: #64748b; margin-right: auto; }
.fs-in { animation: fsIn 0.18s ease; }
@keyframes fsIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .fs-in, .view.active .panel, .view.active .card, .stat { animation: none; opacity: 1; }
  .panel, .card, .ctr-bar { transition: none; }
}

/* Commission statistics tab */
.comm-row { cursor: pointer; transition: background var(--t-fast); }
.comm-row:hover { background: rgba(16,54,95,0.045); }
.comm-paid { color: #0a7a2f; border-color: rgba(10,122,47,0.4); background: rgba(10,122,47,0.08); }
.comm-pending { color: #a3480e; border-color: rgba(232,89,12,0.4); background: rgba(232,89,12,0.09); }
.comm-none { color: #64748b; border-color: rgba(100,116,139,0.35); background: rgba(100,116,139,0.08); }
.comm-cell-paid { color: #0a7a2f; font-variant-numeric: tabular-nums; }
.comm-cell-pending { color: #a3480e; font-weight: 600; font-variant-numeric: tabular-nums; }
.comm-partial { color: #b45309; border-color: rgba(180,83,9,0.4); background: rgba(180,83,9,0.09); }
.comm-pay-cell { white-space: nowrap; }
.comm-pay-cell .linklike { margin-left: 10px; }

/* Accrued vs paid monthly trend — two bars per month, shared scale */
/* Commission trend: grouped monthly columns — animated growth, gridlines,
   hover cards with exact figures. Accrued rides the data blue, paid the
   payout green; the current month's label glows brand rust. */
.comm-trend { padding: 4px 2px 0; }
.ctr-chart { position: relative; display: flex; align-items: flex-end; gap: 4px; height: 216px; padding: 10px 2px 0; }
.ctr-chart::before {
  content: ""; position: absolute; left: 0; right: 0; top: 10px; bottom: 26px;
  background: repeating-linear-gradient(to top, transparent 0, transparent calc(25% - 1px), var(--grid) calc(25% - 1px), var(--grid) 25%);
  pointer-events: none;
}
.ctr-group {
  position: relative; flex: 1; min-width: 0; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
}
.ctr-bars { position: relative; display: flex; align-items: flex-end; gap: 5px; height: calc(100% - 26px); }
.ctr-bar {
  display: block; width: clamp(12px, 2.4vw, 22px); height: 0;
  border-radius: 6px 6px 2px 2px;
  transition: height 0.75s var(--ease-out), filter var(--t-fast), transform var(--t-fast);
}
.ctr-accrued { background: linear-gradient(180deg, #4dabf7, #2a78d6 45%, #1c5cab); box-shadow: 0 6px 14px -6px rgba(42, 120, 214, 0.55); }
.ctr-paid { background: linear-gradient(180deg, #2fd582, #12b76a 45%, #0a7a2f); box-shadow: 0 6px 14px -6px rgba(18, 183, 106, 0.55); }
.ctr-group:hover .ctr-bar { filter: brightness(1.08) saturate(1.06); transform: translateY(-2px); }
/* Exact accrued value riding above the taller bar (bars only fill to 82% of
   the track — see SCALE in renderCommTrend — so there's always headroom for
   this without the label ever clipping the chart's own top edge). */
.ctr-value {
  position: absolute; bottom: 100%; left: 50%; translate: -50% 0; margin-bottom: 5px;
  display: flex; align-items: baseline; gap: 5px; white-space: nowrap; pointer-events: none;
  font-size: 11px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums;
}
.ctr-delta { font-size: 9.5px; font-weight: 800; }
.ctr-delta-up { color: var(--good-ink); }
.ctr-delta-down { color: var(--critical-ink); }
.ctr-month {
  margin-top: 8px; min-height: 15px; font-size: 11px; font-weight: 800; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
.ctr-month-now { color: var(--accent-strong); }
.ctr-tip {
  /* Pushed clear of the persistent .ctr-value label riding just above the bars. */
  position: absolute; bottom: calc(100% + 17px); left: 50%; translate: -50% 6px; z-index: 6;
  display: flex; flex-direction: column; gap: 3px; min-width: 138px; padding: 10px 13px;
  border-radius: 10px; background: #0b1023; color: #fff; font-size: 12px;
  box-shadow: 0 14px 34px -10px rgba(11, 16, 35, 0.5);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity var(--t-fast), translate var(--t-med) var(--ease-out), visibility var(--t-fast);
}
.ctr-tip::after {
  content: ""; position: absolute; top: 100%; left: 50%; margin-left: -5px;
  border: 5px solid transparent; border-top-color: #0b1023;
}
.ctr-group:hover .ctr-tip { opacity: 1; visibility: visible; translate: -50% 0; }
.ctr-group:first-child .ctr-tip { left: 0; translate: 0 6px; }
.ctr-group:first-child:hover .ctr-tip { translate: 0 0; }
.ctr-group:first-child .ctr-tip::after { left: 18px; }
/* .ctr-group-last, not :last-child — the trailing .ctr-axis column (ticks
   only, added after every real month) is the actual last child now. */
.ctr-group-last .ctr-tip { left: auto; right: 0; translate: 0 6px; }
.ctr-group-last:hover .ctr-tip { translate: 0 0; }
.ctr-group-last .ctr-tip::after { left: auto; right: 13px; }
.ctr-tip strong { font-family: var(--display); font-size: 13px; letter-spacing: 0.02em; }
.ctr-tip-row { display: flex; align-items: center; gap: 7px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ctr-tip-row::before { content: ""; width: 8px; height: 8px; border-radius: 3px; flex: none; }
.ctr-tip-accrued::before { background: #4dabf7; }
.ctr-tip-paid::before { background: #2fd582; }
.ctr-tip-pct { margin-top: 2px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #9ec5f4; }
.ctr-dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; vertical-align: -1px; margin: 0 3px 0 8px; }
.ctr-dot-accrued { background: linear-gradient(180deg, #4dabf7, #1c5cab); }
.ctr-dot-paid { background: linear-gradient(180deg, #2fd582, #0a7a2f); }
.panel-note .ctr-dot:first-child { margin-left: 0; }

/* Trailing y-axis column — 0/mid/max on the same SCALE the bars fill to. */
.ctr-axis { flex: 0 0 auto; height: 100%; display: flex; flex-direction: column; align-items: flex-end; justify-content: flex-end; padding-left: 8px; }
.ctr-axis-track { position: relative; height: calc(100% - 26px); width: 50px; }
.ctr-axis .ctr-axis-tick {
  position: absolute; right: 0; font-size: 9.5px; font-weight: 600; color: var(--muted);
  font-variant-numeric: tabular-nums; white-space: nowrap; transform: translateY(50%);
}

/* Certification candidates (admin project view + partner project card) */
.cand-completed { color: #0a7a2f; border-color: rgba(10,122,47,0.4); background: rgba(10,122,47,0.08); }
.cand-in_progress { color: var(--brand); border-color: rgba(16,54,95,0.35); background: rgba(16,54,95,0.06); }
.cand-not_started { color: #64748b; border-color: rgba(100,116,139,0.35); background: rgba(100,116,139,0.08); }
.cand-failed { color: #b91c1c; border-color: rgba(185,28,28,0.4); background: rgba(185,28,28,0.08); }
.cand-actions { white-space: nowrap; }
.cand-actions .linklike { margin-right: 10px; }
.cand-actions .cand-remove { color: #b91c1c; }
.cand-composer { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--hairline); }

/* Elevate 2.0 event splash — self-expires in JS after 31 July 2026 */
/* Launch splash — confetti + launch copy (see eventSplash in common.js). */
.event-splash {
  position: fixed; inset: 0; z-index: 4000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(8, 20, 38, 0.9); backdrop-filter: blur(3px); padding: 20px;
  animation: splash-fade 0.3s ease-out;
}
.event-splash canvas { position: absolute; inset: 0; pointer-events: none; }
/* No card — the words fill the screen itself, over the dimmed app. */
.event-splash-box {
  position: relative; width: min(96vw, 1200px); text-align: center;
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.65);
  animation: splash-pop 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.event-splash-eyebrow {
  margin: 0; font-family: ui-monospace, monospace; font-size: clamp(12px, 1.4vw, 16px);
  letter-spacing: 0.45em; text-transform: uppercase; color: #ff9d73;
}
.event-splash-title { margin: 26px 0 0; font-size: clamp(56px, 10.5vw, 118px); line-height: 1.05; font-weight: 800; color: #fff; }
.event-splash-title .brand-grad {
  background: linear-gradient(90deg, #ff8a3d, #ff5477, #c86dd7);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: none;
}
.event-splash-tagline { margin: 28px 0 0; font-size: clamp(24px, 3.4vw, 38px); font-weight: 600; color: #fff; }
.event-splash-sub { margin: 14px 0 0; font-size: clamp(16px, 2vw, 22px); color: #b9bdd4; }
.event-splash-cta {
  margin-top: 46px; padding: 17px 52px; border: none; border-radius: 999px; cursor: pointer;
  background: linear-gradient(90deg, #ff8a3d, #ff5477); color: #fff;
  font-size: clamp(16px, 1.8vw, 19px); font-weight: 700; box-shadow: 0 10px 36px rgba(255, 84, 119, 0.5);
  transition: transform 0.15s ease;
}
.event-splash-cta:hover { transform: scale(1.05); }
@keyframes splash-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes splash-pop { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }

/* Tier 1 vs Tier 2 strip above the partner list */
.tier-mix { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.tier-mix:empty { display: none; }
.tier-mix-cell {
  display: inline-flex; align-items: baseline; gap: 10px; padding: 8px 14px;
  border: 1px solid var(--hairline); border-radius: 10px; background: var(--card); font-size: 12.5px;
}
.tier-mix-cell strong { font-size: 11px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.tier-mix-t1 strong { color: #0a7a2f; }
.tier-mix-t2 strong { color: #6b21a8; }
.tier-mix-cell span { color: var(--muted); }
.tier-mix-note { font-size: 12px; color: var(--muted); }
.role-select {
  padding: 6px 9px; border: 1.5px solid #d9dbe6; border-radius: 8px;
  font-size: 12.5px; font-family: inherit; background: #fff; color: var(--ink); cursor: pointer;
}
.role-select:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
/* Read-only roles never see mutation entry points */
.role-viewer .update-composer { display: none; }

/* ── Inter shades: the admin register-a-deal form ────────────
   A layered-neutral, Inter-typeface treatment: each step of the form is a
   card on its own shade, headed by an icon badge, so a long form reads as
   a visual sequence instead of a wall of fields. */
.inter-form {
  --if-font: "Inter", "Inter Variable", -apple-system, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --if-s0: #ffffff;
  --if-s1: #f8fafc;
  --if-s2: #eef2f7;
  --if-s3: #e0e2ec;
  --if-ink: #0f172a;
  --if-ink2: #454a5e;
  --if-mut: #7d8296;
  font-family: var(--if-font);
}
.inter-form h3 { font-family: var(--if-font); font-weight: 800; letter-spacing: -0.02em; color: var(--if-ink); }
.inter-form > .sub { font-family: var(--if-font); color: var(--if-ink2); }
.if-section {
  background: var(--if-s1); border: 1px solid var(--if-s2); border-radius: 13px;
  padding: 15px 17px 13px; margin: 13px 0;
}
.if-head { display: flex; gap: 12px; align-items: center; margin-bottom: 13px; }
.if-badge {
  flex: 0 0 32px; width: 32px; height: 32px; border-radius: 9px;
  background: var(--if-s2); border: 1px solid var(--if-s3); color: var(--if-ink2);
  display: flex; align-items: center; justify-content: center;
}
.if-badge svg { width: 16px; height: 16px; }
.if-head h4 { margin: 0; font-size: 13.5px; font-weight: 700; color: var(--if-ink); letter-spacing: -0.01em; }
.if-head p { margin: 1px 0 0; font-size: 12px; color: var(--if-mut); }
.inter-form .field label { font-family: var(--if-font); font-size: 12.5px; color: var(--if-ink2); }
.inter-form .field input, .inter-form .field select, .inter-form .field textarea {
  font-family: var(--if-font); background: var(--if-s0); border-color: var(--if-s3); border-radius: 9px;
}
.inter-form .field .commission-hint, .inter-form .field .muted { font-family: var(--if-font); color: var(--if-mut); }
.inter-form .field { margin-bottom: 12px; }
.inter-form .if-section .field:last-child { margin-bottom: 2px; }
.inter-form .delivery-opt { border-radius: 11px; border-color: var(--if-s3); font-family: var(--if-font); }
.inter-form .cert-line .cert-ta input, .inter-form .cert-line .cert-name-input,
.inter-form .cert-line input.cert-qty { font-family: var(--if-font); border-color: var(--if-s3); border-radius: 9px; }
.inter-form .attach-list { font-family: var(--if-font); }
.cert-suggest {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: -2px 0 10px; padding: 8px 12px; border-radius: 8px;
  background: rgba(250, 178, 25, 0.1); border: 1px solid rgba(250, 178, 25, 0.4);
  font-size: 12.5px; color: var(--warning-ink);
}

/* Certification tracker (deal + project views) */
.cert-item.cert-total {
  background: rgba(16, 54, 95, 0.06); border: 1px solid var(--hairline);
  border-radius: 9px; padding: 9px 12px; margin-bottom: 10px;
}
.cert-item.cert-total .cert-name b { font-family: var(--display); font-size: 14.5px; }
.cert-track { list-style: none; margin: 0; padding: 0; }
.cert-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--grid); flex-wrap: wrap; }
.cert-item:last-child { border-bottom: none; }
.cert-name { flex: 1; min-width: 0; font-size: 13px; }
.cert-name b { color: var(--brand-2); }
.cert-qty-chip {
  font-size: 11.5px; font-weight: 800; color: var(--ink-2);
  border: 1px solid var(--rule); border-radius: 999px; padding: 1px 8px;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.cert-stage {
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase;
  border-radius: 5px; padding: 3px 9px; white-space: nowrap;
}
.cert-stage.cs-none { color: var(--ink-2); background: var(--grid); }
.cert-stage.cs-scheduled { color: var(--warning-ink); background: rgba(250, 178, 25, 0.16); }
.cert-stage.cs-achieved { color: var(--good-ink); background: rgba(12, 163, 12, 0.12); }
.cert-stage.cs-associated { color: #0e5a6b; background: rgba(14, 116, 144, 0.14); }
/* Admin milestone checkboxes */
.cert-item-track { align-items: flex-start; }
.cert-boxes { display: flex; gap: 10px; flex-wrap: wrap; flex-basis: 100%; margin-top: 6px; }
.cert-box {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  font-size: 12px; font-weight: 700; color: var(--ink-2);
  border: 1.5px solid var(--rule); border-radius: 999px; padding: 4px 12px;
  transition: border-color var(--t-fast), background var(--t-fast), color var(--t-fast);
}
.cert-box input { accent-color: var(--good); margin: 0; }
.cert-count {
  width: 46px; padding: 2px 6px; border: 1px solid var(--rule); border-radius: 6px;
  font-size: 12px; font-family: inherit; text-align: center; background: #fff;
}
.cert-count:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.cert-of { font-size: 11px; color: var(--muted); }
.cert-box.cb-scheduled.on { color: var(--warning-ink); border-color: rgba(250, 178, 25, 0.6); background: rgba(250, 178, 25, 0.12); }
.cert-box.cb-achieved.on { color: var(--good-ink); border-color: rgba(12, 163, 12, 0.5); background: rgba(12, 163, 12, 0.1); }
.cert-box.cb-associated.on { color: #0e5a6b; border-color: rgba(14, 116, 144, 0.5); background: rgba(14, 116, 144, 0.12); }

/* ── End-client details (opt-in + contact cards) ─────────── */
.opt-toggle {
  display: flex; align-items: center; gap: 9px; cursor: pointer;
  font-weight: 600; font-size: 14px; color: var(--ink);
}
.opt-toggle input { width: auto; accent-color: var(--accent); margin: 0; }
.contact-card {
  border: 1.5px solid #d9dbe6; border-radius: 10px; background: #fff;
  padding: 11px 13px 13px; margin-bottom: 10px;
}
.contact-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.contact-num { font-size: 11.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.contact-grid .contact-input {
  width: 100%; padding: 9px 12px; border: 1.5px solid #d9dbe6; border-radius: 8px;
  font-size: 13.5px; font-family: inherit; background: #fff; color: var(--ink);
}
.contact-grid .contact-input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.contact-phone-wrap { display: flex; gap: 6px; }
.contact-phone-wrap .contact-dial {
  width: auto; flex: 0 0 auto; min-width: 92px; padding: 9px 6px; border: 1.5px solid #d9dbe6;
  border-radius: 8px; font-size: 13px; font-family: inherit; background: #fff; cursor: pointer;
}
.contact-phone-wrap .contact-input { flex: 1; }
@media (max-width: 640px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-phones { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.contact-add-phone { text-align: left; font-size: 12.5px; padding: 2px 0; }

/* Read-only contact list on detail views */
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list .contact-item { padding: 9px 2px; border-bottom: 1px solid var(--hairline); }
.contact-list .contact-item:last-child { border-bottom: none; }
.contact-list .contact-item strong { font-size: 13.5px; display: block; }
.contact-item-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.contact-item-head strong { flex: 1; }

/* ── Delivery health ─────────────────────────────────────── */
/* Centered banner on the project page: status icon + plain words. The whole
   thing is a button — clicking opens the detail popup. */
.health-banner {
  display: flex; align-items: center; gap: 16px;
  width: min(720px, 100%); margin: 16px auto 8px; padding: 15px 24px;
  border: 1.5px solid; border-radius: 14px; cursor: pointer;
  font-family: inherit; text-align: left; box-shadow: var(--shadow-1);
  transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-med);
  animation: fade-up var(--t-med) var(--ease-out) both;
}
.health-banner:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.health-banner:focus-visible { outline: none; box-shadow: var(--ring); }
.hb-icon {
  flex: 0 0 46px; width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800; color: #fff;
}
.hb-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.hb-label { font-family: var(--display); font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.hb-sub { font-size: 12.5px; color: var(--ink-2); }
.hb-more { font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; align-self: center; }
.health-banner:hover .hb-more { color: var(--accent-strong); }
.health-banner.h-on_track { border-color: rgba(12, 163, 12, 0.4); background: linear-gradient(135deg, rgba(12, 163, 12, 0.1), rgba(12, 163, 12, 0.02) 65%); }
.health-banner.h-on_track .hb-icon { background: var(--good); }
.health-banner.h-on_track .hb-label { color: var(--good-ink); }
.health-banner.h-at_risk { border-color: rgba(250, 178, 25, 0.55); background: linear-gradient(135deg, rgba(250, 178, 25, 0.16), rgba(250, 178, 25, 0.03) 65%); }
.health-banner.h-at_risk .hb-icon { background: #e09112; animation: pulse-dot 2.2s ease-out infinite; }
.health-banner.h-at_risk .hb-label { color: var(--warning-ink); }
.health-banner.h-delayed { border-color: rgba(208, 59, 59, 0.5); background: linear-gradient(135deg, rgba(208, 59, 59, 0.12), rgba(208, 59, 59, 0.02) 65%); }
.health-banner.h-delayed .hb-icon { background: var(--critical); animation: pulse-dot 2.2s ease-out infinite; }
.health-banner.h-delayed .hb-label { color: var(--critical-ink); }
/* Derived-only states (the lifecycle outranks the stored health): delivered
   reads as a settled green, paused as a neutral — neither pulses, because
   there is no live risk left to draw the eye to. */
.health-banner.h-completed { border-color: rgba(12, 163, 12, 0.3); background: linear-gradient(135deg, rgba(12, 163, 12, 0.07), rgba(12, 163, 12, 0.02) 65%); }
.health-banner.h-completed .hb-icon { background: var(--good); }
.health-banner.h-completed .hb-label { color: var(--good-ink); }
.health-banner.h-on_hold { border-color: rgba(75, 82, 97, 0.28); background: linear-gradient(135deg, rgba(75, 82, 97, 0.08), rgba(75, 82, 97, 0.02) 65%); }
.health-banner.h-on_hold .hb-icon { background: var(--muted); }
.health-banner.h-on_hold .hb-label { color: var(--ink-2); }
.hm-status { font-family: var(--display); font-size: 23px; font-weight: 700; margin: 2px 0 8px; }
.hm-status.h-on_track { color: var(--good-ink); }
.hm-status.h-at_risk { color: var(--warning-ink); }
.hm-status.h-delayed { color: var(--critical-ink); }
.hm-status.h-completed { color: var(--good-ink); }
.hm-status.h-on_hold { color: var(--ink-2); }
.hm-text { font-size: 14px; color: var(--ink-2); margin: 0 0 14px; }

/* ── Connect with TPT (floating, bottom right) ──────────── */
.connect-widget { position: fixed; right: 22px; bottom: 22px; z-index: 85; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.connect-launcher {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 20px; border: none; border-radius: 999px; cursor: pointer;
  background: #6264a7; color: #fff; font-family: inherit; font-size: 14px; font-weight: 700;
  box-shadow: 0 8px 24px rgba(70, 71, 117, 0.42);
  transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-med), background var(--t-fast);
}
.connect-launcher:hover { background: #52549b; transform: translateY(-2px); box-shadow: 0 12px 30px rgba(70, 71, 117, 0.5); }
.connect-launcher:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(98, 100, 167, 0.4); }
.connect-launcher svg { width: 18px; height: 18px; }
.connect-card {
  width: 300px; background: var(--card); border: 1px solid var(--hairline);
  border-radius: 14px; box-shadow: var(--shadow-2); padding: 20px 22px;
  animation: scale-in 0.25s var(--ease-spring) both;
}
.connect-card .field { margin-bottom: 10px; }
.connect-card .field label { font-size: 12.5px; }
.connect-send { width: 100%; }
.connect-card .commission-hint { margin-top: 8px; }
.connect-card h3 { font-family: var(--display); font-size: 18px; margin: 0 0 6px; color: var(--brand-2); }
.connect-card p { font-size: 13px; color: var(--ink-2); margin: 0 0 14px; }
.connect-card .btn { width: 100%; justify-content: center; margin-bottom: 8px; }
.connect-card .connect-teams { background: #6264a7; box-shadow: none; }
.connect-card .connect-teams:hover { background: #52549b; }
.connect-card .connect-teams svg { width: 16px; height: 16px; }
.connect-card .commission-hint { margin: 4px 0 0; }
@media (max-width: 700px) { .connect-launcher span-label { display: none; } .connect-widget { right: 14px; bottom: 14px; } }

/* ── First sign-in tour ──────────────────────────────────── */
.tour-backdrop { background: rgba(24, 18, 10, 0.35); }
.tour-card { max-width: 420px; text-align: center; }
.tour-icon {
  width: 56px; height: 56px; margin: 0 auto 12px;
  background: no-repeat center / contain url('/img/tpt-icon-192.png');
}
.tour-card h3 { font-family: var(--display); font-size: 21px; color: var(--brand-2); margin: 0 0 8px; }
.tour-text { font-size: 14px; color: var(--ink-2); margin: 0 auto 16px; max-width: 40ch; min-height: 63px; }
.tour-dots { display: flex; justify-content: center; gap: 7px; margin-bottom: 16px; }
.tour-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--rule);
  transition: background var(--t-fast), transform var(--t-fast) var(--ease-spring);
}
.tour-dot.on { background: var(--accent); transform: scale(1.25); }
.tour-actions { align-items: center; }
.spacer-flex { flex: 1; }
/* The nav item the current step is talking about glows softly */
.nav-item.tour-glow {
  background: rgba(34, 184, 207, 0.18); color: #fff;
  box-shadow: 0 0 0 1.5px rgba(34, 184, 207, 0.55);
}

/* ── Explore services (coming soon) ──────────────────────── */
.explore-soon { max-width: 620px; margin: 24px auto 0; text-align: center; padding: 48px 40px; }
.explore-flame { width: 64px; height: 64px; margin: 0 auto 14px; display: block; filter: drop-shadow(0 4px 10px rgba(238, 75, 60, 0.25)); }
.explore-badge {
  display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--brand); border: 1px solid var(--rule);
  border-radius: 999px; padding: 4px 14px; margin-bottom: 14px;
  background: rgba(255, 254, 251, 0.8);
}
.explore-soon h2 { font-family: var(--display); font-size: 23px; margin: 0 0 10px; color: var(--brand-2); }
.explore-soon p { margin: 0 auto 14px; max-width: 46ch; font-size: 14.5px; color: var(--ink-2); }
.explore-soon .btn { margin-top: 8px; }

/* ── Feedback charts ─────────────────────────────────────── */
.fb-charts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 20px; margin-bottom: 20px;
}
/* Question averages carry the brand flame; star columns go gold */
#fbc-avgs .hbar-fill { background: linear-gradient(90deg, #b91c1c, #f04e23 55%, #f59e0b); }
#fbc-avgs .hbar-row:hover .hbar-fill { filter: brightness(0.95); }
#fbc-dist .col-fill { background: linear-gradient(180deg, var(--warning), color-mix(in srgb, var(--warning) 65%, transparent)); } /* fallback; JS sets a per-rating colour */
.fb-gauges { display: flex; justify-content: space-around; gap: 12px; padding-top: 6px; flex-wrap: wrap; }
.fb-gauge { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.fb-gauge .arc-gauge { width: 64px; height: 64px; }

/* ── Inline feedback cell (opportunity / project tables) ─── */
.cell-feedback { white-space: nowrap; }
.cell-feedback .btn-sm { padding: 4px 12px; }
.fb-rated { font-size: 12px; font-weight: 700; color: var(--warning-ink); white-space: nowrap; }

/* ── Feedback stars ──────────────────────────────────────── */
.fb-rows { display: flex; flex-direction: column; gap: 4px; margin-bottom: 18px; }
.fb-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--grid); }
.fb-row:last-child { border-bottom: none; }
.fb-label { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.fb-stars { display: inline-flex; gap: 2px; }
.fb-star {
  border: none; background: none; cursor: pointer; padding: 2px 3px;
  font-size: 21px; line-height: 1; color: var(--rule);
  transition: color var(--t-fast), transform var(--t-fast) var(--ease-spring);
}
.fb-star:hover { transform: scale(1.18); }
.fb-star.on { color: var(--warning); }
.fb-star:focus-visible { outline: none; border-radius: 4px; box-shadow: var(--ring); }
.fb-cell { color: var(--warning-ink); font-size: 12px; letter-spacing: 0.05em; white-space: nowrap; }
.fb-comment-cell { max-width: 220px; font-size: 12.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-yes { color: var(--good-ink); font-weight: 700; font-size: 12.5px; }
.fb-no { color: var(--critical-ink); font-weight: 700; font-size: 12.5px; }
.fb-label { max-width: 62%; }
.fb-choices { display: inline-flex; gap: 6px; }
.fb-choice {
  border: 1.5px solid var(--rule); background: #ffffff; color: var(--ink-2);
  font-family: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer;
  padding: 5px 16px; border-radius: 999px;
  transition: border-color var(--t-fast), background var(--t-fast), color var(--t-fast);
}
.fb-choice:hover { border-color: var(--brand); color: var(--brand); }
.fb-choice.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.fb-choice:focus-visible { outline: none; box-shadow: var(--ring); }
.fbd-row .stmt-label { max-width: 68%; color: var(--ink); }
.fbd-row .stmt-value { color: var(--warning-ink); }

/* ── Attachments ─────────────────────────────────────────── */
.attach-list { list-style: none; margin: 6px 0 0; padding: 0; }
.attach-item {
  display: flex; align-items: center; gap: 10px; padding: 7px 0;
  border-bottom: 1px solid var(--grid); font-size: 13px;
}
.attach-item:last-child { border-bottom: none; }
.attach-item::before {
  content: ""; width: 14px; height: 14px; flex-shrink: 0; opacity: 0.65;
  background: no-repeat center / contain
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="%23837f72" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M13 7.5 8.3 12.2a3.2 3.2 0 0 1-4.5-4.5L8.9 2.6a2.1 2.1 0 0 1 3 3l-5 5a1 1 0 0 1-1.5-1.4L9.9 4.7"/></svg>');
}
.attach-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--ink); }
a.attach-name { color: var(--accent-strong); }
.attach-size { font-size: 11.5px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.attach-item .btn-ghost { padding: 1px 7px; flex-shrink: 0; }
/* In-portal document review: modal with the file rendered in an iframe */
.doc-viewer .doc-viewer-box { max-width: 900px; width: 96%; padding: 18px 20px 20px; }
.doc-viewer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.doc-viewer-head h3 { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-viewer-tools { display: flex; gap: 8px; flex-shrink: 0; }
.doc-frame {
  width: 100%; height: min(72vh, 760px); border: 1px solid var(--grid);
  border-radius: 10px; background: #fff;
}

/* Company documents reuse the attachment rows with a document glyph.
   Rows wrap into tidy lines instead of spilling out of narrow panels:
   line 1 = glyph · name · size, line 2 = meta, line 3 = actions. */
.doc-list .attach-item { flex-wrap: wrap; row-gap: 3px; padding: 9px 0; }
.doc-list .attach-item::before {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="%23837f72" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M4 1.8h5.2L12.6 5v8.2a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V2.8a1 1 0 0 1 1-1z"/><path d="M9 1.8V5h3.4M5.4 8h5M5.4 10.6h5"/></svg>');
}
.doc-list .doc-meta {
  flex-basis: 100%; order: 3; white-space: normal; overflow-wrap: anywhere;
  padding-left: 24px; line-height: 1.45;
}
.doc-list .doc-actions {
  flex-basis: 100%; order: 4; display: flex; gap: 6px; flex-wrap: wrap;
  padding-left: 20px;
}
.doc-list .doc-actions .btn { flex-shrink: 0; }
.doc-list .doc-remove { margin-left: auto; color: var(--danger, #a33c3c); }

/* The share-document composer stacks in narrow panels instead of overflowing */
#pd-docs-controls .update-composer { flex-wrap: wrap; }
#pd-docs-controls .update-composer input[type="file"] { flex: 1 1 160px; min-width: 0; }
#pd-docs-controls .update-composer .btn { flex-shrink: 0; white-space: nowrap; }
.field input[type="file"] {
  padding: 8px; border: 1.5px dashed #d9dbe6; border-radius: 8px; width: 100%;
  font-size: 13px; color: var(--ink-2); background: #fff; cursor: pointer;
  transition: border-color var(--t-fast);
}
.field input[type="file"]:hover { border-color: var(--accent); }
.update-composer input[type="file"] { flex: 1; padding: 6px; border: 1.5px dashed #d9dbe6; border-radius: 8px; font-size: 12.5px; background: #fff; }

/* ── Announcements ───────────────────────────────────────── */
.ann-list { list-style: none; margin: 0; padding: 0; }
.ann-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--grid); }
.ann-item:last-child { border-bottom: none; }
.ann-item::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 6px;
  background: var(--grad-text);
}
.ann-body { flex: 1; min-width: 0; }
.ann-text { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.ann-meta { display: flex; align-items: center; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.ann-tag {
  font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--brand); border: 1px solid var(--rule); border-radius: 999px; padding: 1px 8px;
  background: rgba(255, 254, 251, 0.7);
}
.ann-date { font-size: 11.5px; color: var(--muted); }
.ann-item .btn-ghost { padding: 2px 8px; flex-shrink: 0; }

/* ── News / newsletters ──────────────────────────────────── */
.news-list { display: flex; flex-direction: column; gap: 16px; max-width: 760px; }
.news-item { opacity: 0; animation: fade-up 0.45s var(--ease-out) forwards; }
.news-date { margin: 0 0 2px; font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.news-title { font-family: var(--display); font-size: 19px; margin: 0 0 10px; color: var(--brand-2); }
.news-para { margin: 0 0 12px; font-size: 14px; color: var(--ink-2); line-height: 1.65; }
.news-para:last-child { margin-bottom: 0; }
.news-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.news-compact { border-bottom: 1px solid var(--grid); padding-bottom: 16px; }
.news-compact:last-child { border-bottom: none; padding-bottom: 0; }
.news-compact .news-title { font-size: 16px; margin-bottom: 6px; }
.news-compact .news-para { font-size: 13px; }

/* ── Leaderboard ─────────────────────────────────────────── */
.leaderboard { list-style: none; margin: 0; padding: 0; }
.lb-row { display: flex; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--grid); }
.lb-row:last-child { border-bottom: none; }
.lb-rank { font-family: var(--display); font-size: 22px; font-weight: 700; color: var(--rule); width: 26px; text-align: center; flex-shrink: 0; }
.lb-row:first-child .lb-rank { color: var(--brand); }
.lb-mid { flex: 1; min-width: 0; }
.lb-name { font-size: 14px; }
.lb-track { height: 6px; background: var(--grid); border-radius: 3px; margin: 6px 0 5px; overflow: hidden; }
.lb-fill { height: 100%; width: 0; background: var(--good); border-radius: 3px; transition: width 0.8s var(--ease-out); }
.lb-value { font-family: var(--display); font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ── Tables ──────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th {
  text-align: left; padding: 10px 12px; color: var(--muted); font-size: 11px; font-weight: 800;
  letter-spacing: 0.09em; text-transform: uppercase; border-bottom: 1.5px solid var(--rule); white-space: nowrap;
}
table.data td { padding: 12px; border-bottom: 1px solid var(--grid); vertical-align: middle; }
table.data th:first-child, table.data td:first-child { padding-left: 4px; }
table.data th:last-child, table.data td:last-child { padding-right: 4px; }
table.data tbody tr:last-child td { border-bottom: none; }
table.data tbody tr { transition: background var(--t-fast), box-shadow var(--t-fast); }
table.data tbody tr.row-in { opacity: 0; animation: fade-up 0.4s var(--ease-out) forwards; }
table.data tbody tr { transition: background var(--t-fast), box-shadow var(--t-fast); }
table.data tbody tr:hover { background: rgba(11, 16, 35, 0.035); box-shadow: inset 2.5px 0 0 var(--accent); }

/* Status-coded rows: a colour stripe on the left edge, tied to the data */
table.data tbody tr td:first-child { border-left: 3px solid transparent; }
table.data tbody tr.row-st-submitted td:first-child { border-left-color: #4dabf7; }
table.data tbody tr.row-st-in_progress td:first-child { border-left-color: var(--warning); }
table.data tbody tr.row-st-won td:first-child { border-left-color: var(--good); }
table.data tbody tr.row-st-lost td:first-child { border-left-color: #adb5bd; }
table.data tbody tr.row-st-won { background: rgba(12, 163, 12, 0.03); }
table.data tbody tr.row-st-lost td { color: var(--ink-2); }
/* Projects: stripe follows delivery health; completed goes green */
table.data tbody tr.row-h-on_track td:first-child { border-left-color: var(--good); }
table.data tbody tr.row-h-at_risk td:first-child { border-left-color: var(--warning); }
table.data tbody tr.row-h-at_risk { background: rgba(250, 178, 25, 0.045); }
table.data tbody tr.row-h-delayed td:first-child { border-left-color: var(--critical); }
table.data tbody tr.row-h-delayed { background: rgba(208, 59, 59, 0.04); }
table.data tbody tr.row-h-completed td:first-child { border-left-color: #74c69d; }
table.data tbody tr.row-h-completed { background: rgba(12, 163, 12, 0.03); }
table.data tbody tr.row-h-on_hold td:first-child { border-left-color: var(--muted); }

/* Category dot: one stable colour per program */
.cat-cell { white-space: nowrap; }
.cat-dot {
  display: inline-block; width: 9px; height: 9px; border-radius: 3px;
  margin-right: 7px; vertical-align: 1px;
}
table.data .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data .empty-row td {
  text-align: center; color: var(--muted); padding: 38px 20px;
  font-family: var(--display); font-style: italic; font-size: 14px;
}
table.data .empty-row:hover { background: transparent; box-shadow: none; }

/* ── Badges: small stamps ────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 2.5px 9px; border-radius: 4px;
  font-size: 11px; font-weight: 800; white-space: nowrap; letter-spacing: 0.06em; text-transform: uppercase;
  border: 1px solid currentColor; background: transparent;
  transition: transform var(--t-fast) var(--ease-out);
}
tr:hover .badge { transform: scale(1.03); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-submitted { color: var(--accent-strong); background: rgba(240, 78, 35, 0.09); }
.badge-in_progress { color: var(--warning-ink); background: rgba(250, 178, 25, 0.14); }
.badge-in_progress::before { animation: pulse-dot 2.2s ease-out infinite; }
.badge-won { color: var(--good-ink); background: rgba(12, 163, 12, 0.10); }
.badge-lost { color: var(--critical-ink); background: rgba(208, 59, 59, 0.08); }
/* The shared 10-status deal vocabulary (identical hues in OneTPT) */
.badge-working_deal { color: var(--warning-ink); background: rgba(250, 178, 25, 0.14); }
.badge-working_deal::before { animation: pulse-dot 2.2s ease-out infinite; }
.badge-pending_tpt { color: #5b4ea8; background: rgba(102, 86, 188, 0.12); }
.badge-pending_partner { color: #a05a1f; background: rgba(214, 128, 44, 0.13); }
.badge-deliverables_sent { color: #0e6b62; background: rgba(14, 140, 128, 0.12); }
.badge-sow_sent { color: #a72b0f; background: rgba(240, 78, 35, 0.12); }
.badge-change_order_sent { color: #4c5165; background: rgba(140, 110, 78, 0.14); }
.badge-pending_pax8 { color: #a03a72; background: rgba(200, 74, 143, 0.12); }
.badge-closed_won { color: var(--good-ink); background: rgba(12, 163, 12, 0.10); }
.badge-closed_lost { color: var(--critical-ink); background: rgba(208, 59, 59, 0.08); }
.badge-pending { color: var(--warning-ink); background: rgba(250, 178, 25, 0.14); }
.badge-pending::before { animation: pulse-dot 2.2s ease-out infinite; }
.badge-approved { color: var(--good-ink); background: rgba(12, 163, 12, 0.10); }
.badge-rejected { color: var(--critical-ink); background: rgba(208, 59, 59, 0.08); }
.badge-suspended { color: var(--ink-2); }
.badge-active { color: var(--good-ink); background: rgba(12, 163, 12, 0.10); }
.badge-inactive { color: var(--ink-2); }
.badge-on_hold { color: var(--warning-ink); background: rgba(250, 178, 25, 0.14); }
.badge-on_hold::before { animation: pulse-dot 2.2s ease-out infinite; }
.badge-completed { color: var(--good-ink); background: rgba(12, 163, 12, 0.10); }
/* Opportunities list only: pills must never clip at the fixed-layout cell edge.
   The hover scale pushed the widest pill past the cell; kill it just here. */
#view-opportunities table.data tr:hover .badge { transform: none; }
#view-opportunities table.data td .badge { max-width: 100%; }

/* ── Filters ─────────────────────────────────────────────── */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; align-items: center; }
.filters select, .filters input {
  padding: 8px 15px; border: 1.5px solid #d9dbe6; border-radius: 999px; font-size: 13.5px;
  font-family: inherit; background: #ffffff; color: var(--ink); height: 37px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
/* Selects draw their own chevron so text always clears the arrow — the
   native glyph's inset varies per browser and was clipping labels. */
.filters select, .field select, .inline-select, .role-select, .co-link select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%23565b6e' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; background-size: 12px;
  padding-right: 32px; text-overflow: ellipsis;
}
.filters select:hover, .filters input:hover { border-color: #b9bdcf; }
.filters select:focus, .filters input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.filters input[type="search"] { min-width: 220px; }
.filters .check-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); cursor: pointer; white-space: nowrap; user-select: none; }
.filters .check-inline input[type="checkbox"] {
  width: 15px; height: 15px; min-width: 0; padding: 0; margin: 0;
  border: none; background: none; accent-color: var(--accent); cursor: pointer;
}

/* ── Typeahead (partner filter) ──────────────────────────── */
.typeahead { position: relative; }
.typeahead input {
  min-width: 200px; padding: 8px 13px; border: 1.5px solid #d9dbe6; border-radius: 8px;
  font-size: 13.5px; font-family: inherit; background: #fff; color: var(--ink);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.typeahead input:hover { border-color: #b9bdcf; }
.typeahead input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.ta-list {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 40;
  max-height: 260px; overflow-y: auto; background: var(--card);
  border: 1px solid var(--hairline); border-radius: 10px; box-shadow: var(--shadow-2);
  padding: 4px;
}
.ta-item {
  padding: 8px 10px; border-radius: 7px; font-size: 13.5px; color: var(--ink);
  cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ta-item:hover { background: rgba(240, 78, 35, 0.08); }
.ta-item.ta-active { background: rgba(240, 78, 35, 0.12); font-weight: 700; color: var(--accent-strong); }
.ta-empty { padding: 8px 10px; font-size: 13px; color: var(--muted); }

/* ── Horizontal bars ─────────────────────────────────────── */
.hbar-chart { display: flex; flex-direction: column; gap: 12px; }
.hbar-row { display: grid; grid-template-columns: 110px 1fr 76px; align-items: center; gap: 10px; font-size: 13px; }
.hbar-row .hbar-label { color: var(--ink-2); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { background: var(--grid); border-radius: 4px; height: 14px; overflow: hidden; }
.hbar-fill { background: var(--viz); border-radius: 4px; height: 100%; min-width: 2px; width: 0; transition: width 0.9s var(--ease-out); }
.hbar-row:hover .hbar-fill { background: var(--viz-strong); }
.hbar-row .hbar-value { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 700; }
.chart-note { font-size: 12px; color: var(--muted); margin-top: 12px; }

/* ── Modal ───────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(8, 18, 33, 0.55); display: none;
  align-items: center; justify-content: center; z-index: 90; padding: 20px;
  backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
}
.modal-backdrop.show { display: flex; animation: fade-in 0.2s ease both; }
.modal {
  background: var(--card); border-radius: 16px; padding: 30px; width: 100%; max-width: 470px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  animation: scale-in 0.3s var(--ease-spring) both;
  max-height: 90vh; overflow-y: auto;
}
.modal h3 { font-family: var(--display); margin: 0 0 8px; font-size: 19px; color: var(--brand-2); }
.modal .sub { color: var(--ink-2); font-size: 13.5px; margin: 0 0 18px; }
.modal .form-actions { justify-content: flex-end; }

/* ── Misc ────────────────────────────────────────────────── */
.muted { color: var(--muted); }
.mono { font-variant-numeric: tabular-nums; }
.mt-0 { margin-top: 0; }
.hidden { display: none !important; }
.error-page { text-align: center; padding: 100px 20px; animation: fade-up var(--t-slow) var(--ease-out) both; }
.error-page h1 {
  font-family: var(--display); font-size: 88px; margin: 0 0 6px; font-weight: 700;
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.error-page p { color: var(--ink-2); margin-bottom: 26px; }
.commission-hint { font-size: 12px; color: var(--muted); }
/* Small print under a form control — an explanation, never a second label. */
.field-hint { margin: 6px 0 10px; font-size: 12px; line-height: 1.45; color: var(--muted); }
.inline-input {
  width: 78px; padding: 5px 9px; border: 1.5px solid #d9dbe6; border-radius: 7px;
  font-size: 13px; font-family: inherit; text-align: right;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.inline-input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }

@media (max-width: 860px) {
  .portal { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px; padding: 12px; }
  .sidebar .spacer, .sidebar .who { display: none; }
  .nav-item { width: auto; }
  .main { padding: 18px 16px 50px; }
  .hero { padding-top: 56px; }
  .rate-stamp { display: none; }
  .stat + .stat { border-left: none; }
  .stat { border-top: 1px solid var(--hairline); }
  .stat:first-child { border-top: none; }
}

/* ── Projects ────────────────────────────────────────────── */
.proj-list { display: flex; flex-direction: column; gap: 16px; }
.proj-card {
  background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius);
  box-shadow: var(--shadow-1); padding: 20px 22px;
  opacity: 0; animation: fade-up 0.45s var(--ease-out) forwards;
}
.proj-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.proj-title h3 { font-family: var(--display); font-size: 17px; margin: 0 0 3px; color: var(--brand-2); }
.proj-badges { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.chip {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.chip-paid { background: rgba(12, 163, 12, 0.1); color: var(--good-ink); }
.chip-due { background: rgba(250, 178, 25, 0.16); color: var(--warning-ink); }

/* In-table progress cell: mini bar + percent */
.cell-progress { white-space: nowrap; }
.mini-track {
  display: inline-block; vertical-align: middle; width: 64px; height: 7px;
  border-radius: 4px; background: var(--grid); overflow: hidden; margin-right: 7px;
}
.mini-fill { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.mini-fill.tl-done { background: var(--good); }
.mini-fill.tl-overdue { background: var(--critical); }
.mini-pct { font-size: 12px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; vertical-align: middle; }

/* Contract/delivery timeline bar */
.tl-bar { margin-bottom: 14px; }
.tl-bar-track { height: 10px; border-radius: 5px; background: var(--grid); overflow: hidden; }
.tl-bar-fill { height: 100%; width: 0; border-radius: 5px; background: var(--viz); transition: width 0.9s var(--ease-out); }
.tl-bar-fill.tl-done { background: var(--good); }
.tl-bar-fill.tl-overdue { background: var(--critical); }
.tl-bar-label { margin-top: 6px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tl-overdue-text { color: var(--critical-ink); font-weight: 600; }

.proj-updates { border-top: 1px solid var(--grid); padding-top: 12px; }
.proj-updates h4 { margin: 0 0 8px; font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.update-composer { display: flex; gap: 8px; margin-top: 10px; }
.update-composer input {
  flex: 1; padding: 8px 12px; border: 1.5px solid #d9dbe6; border-radius: 8px;
  font-size: 13.5px; font-family: inherit; background: #fff; color: var(--ink);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.update-composer input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }

/* ── Portal top bar: brand + project-fund ticker ─────────────
   The TPT mark and WinWithTPT wordmark live on the blue bar; the fund
   figures sit beside them, with the availability meter as the bar's
   bottom hairline. */
.top-bar {
  position: relative; z-index: 60;
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  padding: 8px 24px 10px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline);
  color: var(--ink);
}
.top-logo { height: 66px; width: auto; padding: 4px 0; }
/* WinWithTPT sits in the sidebar, right above Dashboard */
.side-brand {
  margin: 0 4px 14px; padding: 2px 10px 16px;
  border-bottom: 1px solid var(--hairline);
}
.side-wordmark { display: block; font-family: var(--display); font-size: 21px; font-weight: 800; letter-spacing: -0.01em; }
.side-brand .ww { color: var(--good-ink); }
.side-brand .wt { color: var(--ink); }
.side-brand small {
  display: block; margin-top: 3px; font-size: 10px; font-weight: 700;
  color: var(--subtle, #8a8fa3); letter-spacing: 0.16em;
}
/* Light-page headers (register, sign-in): same green treatment */
.logo .ww { color: var(--good-ink); }
.logo .wt { color: var(--ink); }
.fund-slot { display: none; margin-left: auto; }
.fund-slot.show { display: block; animation: fade-in 0.5s ease both; }
.fund-inner {
  display: flex; align-items: baseline; justify-content: flex-end;
  gap: 20px; flex-wrap: wrap; row-gap: 4px;
}
.fund-label {
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--muted); white-space: nowrap;
  align-self: center;
}
.fund-sep { width: 1px; height: 15px; background: var(--rule); align-self: center; }
.fund-figure { display: inline-flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.fund-figure em {
  font-style: normal; font-family: var(--display); font-size: 16.5px; font-weight: 700;
  color: var(--ink); font-variant-numeric: lining-nums tabular-nums; letter-spacing: 0.01em;
}
.fund-figure small {
  font-size: 10px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted);
}
.fund-avail em { color: #0a7a2f; }
.fund-live {
  width: 7px; height: 7px; border-radius: 50%; background: #4ade80;
  align-self: center; animation: pulse-dot 2.6s ease-out infinite;
}
.fund-edge { position: absolute; left: 0; right: 0; bottom: -1px; height: 2.5px; background: rgba(11, 16, 35, 0.06); display: block; }
.fund-edge i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, #b91c1c, #f04e23, #f59e0b);
  transition: width 1.2s var(--ease-out);
}
@media (max-width: 700px) {
  .fund-sep { display: none; }
  .fund-inner { gap: 12px; justify-content: flex-start; }
  .fund-slot { margin-left: 0; }
}

.chip-fund { background: rgba(238, 75, 60, 0.1); color: #b23c14; }
.fund-edit { border-top: 1px solid var(--grid); margin-top: 14px; padding-top: 14px; }
.fund-edit .field { margin-bottom: 10px; }

/* ── Partner logos & identity ────────────────────────────── */
.avatar {
  width: 34px; height: 34px; border-radius: 8px; flex-shrink: 0;
  background: var(--grid); color: var(--brand);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 12px; letter-spacing: 0.02em; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: contain; display: block; background: #fff; }
.avatar-lg { width: 56px; height: 56px; border-radius: 12px; font-size: 17px; }
.avatar-xl { width: 72px; height: 72px; border-radius: 16px; font-size: 24px; }
.company-cell { display: flex; align-items: center; gap: 10px; }

/* ── Partner master list ─────────────────────────────────── */
.plist { display: flex; flex-direction: column; gap: 10px; }
.plist-row {
  display: flex; align-items: center; gap: 16px; width: 100%; text-align: left;
  padding: 16px 18px; background: var(--card); border: 1px solid var(--hairline);
  border-radius: var(--radius); box-shadow: var(--shadow-1); cursor: pointer;
  font-family: var(--sans); color: var(--ink);
  opacity: 0; animation: fade-up 0.4s var(--ease-out) forwards;
  transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-med), border-color var(--t-med);
}
.plist-row:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--rule); }
.plist-row:focus-visible { outline: none; box-shadow: var(--ring); }
.plist-mid { flex: 1; min-width: 0; }
.plist-name { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.plist-name strong { font-family: var(--display); font-size: 16.5px; color: var(--brand-2); }
.plist-counters { display: flex; gap: 18px; flex-shrink: 0; }
.plist-counter { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.plist-counter em { font-style: normal; font-family: var(--display); font-size: 17px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.plist-counter small { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.plist-chevron { font-size: 22px; color: var(--rule); flex-shrink: 0; transition: color var(--t-fast), transform var(--t-fast); }
.plist-row:hover .plist-chevron { color: var(--accent); transform: translateX(2px); }
#partner-search { padding: 8px 13px; border: 1.5px solid #d9dbe6; border-radius: 8px; font-size: 13.5px; font-family: inherit; background: #fff; color: var(--ink); min-width: 240px; transition: border-color var(--t-fast), box-shadow var(--t-fast); }
#partner-search:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
@media (max-width: 520px) { .plist-counters { gap: 12px; } .plist-counter small { display: none; } }

/* ── Partner detail page ─────────────────────────────────── */
#pd-back { margin-bottom: 14px; }
.pd-head { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; flex-wrap: wrap; }
.pd-head-main { flex: 1; min-width: 0; }
.pd-title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pd-title-row h1 { font-family: var(--display); font-size: 27px; margin: 0; color: var(--brand-2); }
.pd-meta { margin: 6px 0 0; font-size: 13px; color: var(--ink-2); }
/* Traceability line under the partner meta — quieter than the meta itself */
.pd-provenance { margin-top: 3px; font-size: 12px; color: var(--ink-3, var(--ink-2)); }
.pd-head-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* The partner's own logo in their sidebar — a small "we know you" touch */
.side-logo {
  display: none; align-items: center; gap: 10px; margin: 0 4px 10px;
  padding: 10px 12px; background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 10px;
}
.side-logo.show { display: flex; animation: fade-up 0.5s var(--ease-out) both; }
.side-logo img { max-height: 32px; max-width: 64px; object-fit: contain; border-radius: 6px; background: #fff; padding: 2px; }
.side-logo span { font-size: 12px; font-weight: 700; color: #ffcdb8; line-height: 1.3; }

.row-click { cursor: pointer; }

/* Executive view */
.exec-verdict { font-family: var(--display); font-size: 21px; font-weight: 700; margin: 4px 0 14px; }
.exec-verdict.ok { color: var(--good-ink); }
.exec-verdict.off { color: var(--warning-ink); }
/* Scale header — 0/mid/max, aligned over the track via the same
   [label][track][value] column widths the rows below it use. */
.exec-scale { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 10px; font-weight: 600; color: var(--muted); }
.exec-scale-label { width: 34px; flex: none; }
.exec-scale-track { flex: 1; display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; }
.exec-scale-val { width: 110px; flex: none; }
.exec-mrow { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 12px; }
.exec-mlabel { width: 34px; color: var(--muted); font-weight: 700; }
.exec-mtrack { flex: 1; display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--grid); }
.exec-mnew, .exec-mexisting { transition: filter var(--t-fast, 150ms); }
.exec-mnew { background: linear-gradient(90deg, color-mix(in srgb, #2a78d6 60%, transparent), #2a78d6); }
.exec-mexisting { background: linear-gradient(90deg, color-mix(in srgb, #0e8c80 60%, transparent), #0e8c80); }
.exec-mrow:hover .exec-mnew, .exec-mrow:hover .exec-mexisting { filter: brightness(1.08) saturate(1.05); }
.exec-mval { width: 110px; display: flex; align-items: baseline; justify-content: flex-end; gap: 6px; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.exec-delta { font-size: 10px; font-weight: 800; }
.exec-delta-up { color: var(--good-ink); }
.exec-delta-down { color: var(--critical-ink); }
.exec-legend { display: flex; gap: 16px; margin-top: 10px; font-size: 12px; color: var(--ink-2); }
.exec-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; }

/* Strategic deals demand attention when nobody has touched them in 2+ days */
@keyframes strategic-blink {
  0%, 100% { background: rgba(208, 59, 59, 0.16); }
  50% { background: rgba(208, 59, 59, 0.02); }
}
tr.strategic-stale > td { animation: strategic-blink 1.6s ease-in-out infinite; }
.strategic-flag { color: #a03a3a; font-weight: 800; margin-left: 6px; letter-spacing: 0.03em; font-size: 10.5px; }

/* ── Clickable dashboard cards — everything browses through ── */
.card-click { cursor: pointer; transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease; }
li.card-click:hover, .glance-card.card-click:hover { background: var(--grid); border-color: var(--line-strong, var(--grid)); }
.glance-card.card-click:hover, .hbar-row.card-click:hover { transform: translateY(-1px); box-shadow: 0 7px 18px rgba(16, 24, 51, 0.1); }
.hbar-row.card-click:hover { background: var(--grid); border-radius: 8px; }
.pipe-key.card-click:hover span { text-decoration: underline; }
.pipe-seg.card-click:hover { filter: brightness(1.12); }
.stat.tile-click { cursor: pointer; transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease; }
.stat.tile-click:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(11, 31, 58, 0.1); border-color: var(--accent, #2f6f4f); }
.pm-profile { border-top: 1px solid var(--grid); margin-top: 16px; padding-top: 14px; }
.pm-profile h4 { margin: 0 0 10px; font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.pm-logo-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.om-desc { font-size: 13.5px; color: var(--ink-2); background: var(--grid); border-radius: 8px; padding: 10px 14px; margin: 12px 0 16px; white-space: pre-wrap; }

/* ── Payouts & misc admin bits ───────────────────────────── */
.payout-right { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.payout-amount { font-family: var(--display); font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.inline-select {
  padding: 5px 8px; border: 1.5px solid #d9dbe6; border-radius: 7px; font-size: 12.5px;
  font-family: inherit; background: #fff; color: var(--ink); max-width: 220px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.inline-select:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.modal-lg { max-width: 620px; }
.pm-add { border-top: 1px solid var(--grid); margin-top: 16px; padding-top: 16px; }
.who-role { display: block; margin-top: 3px; font-size: 11px; font-weight: 700; color: #22b8cf; letter-spacing: 0.05em; text-transform: uppercase; }

/* ── Reduced motion: instant content, nothing drifts ─────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .aurora i { animation: none; }
}

/* Speech-to-text dictation button — listening state */
.btn.is-listening { color: var(--critical-ink); border-color: rgba(208, 59, 59, 0.5); background: rgba(208, 59, 59, 0.06); }

/* Compact delivery-health chip for the projects tables — small pill, tinted
   background, leading dot. Replaces the oversized hm-status text in rows. */
.health-cell { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700;
  white-space: nowrap; padding: 2px 9px; border-radius: 999px; }
.health-cell::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.health-cell.h-on_track  { color: var(--good-ink);     background: rgba(12, 163, 12, 0.10); }
.health-cell.h-at_risk   { color: var(--warning-ink);  background: rgba(250, 178, 25, 0.16); }
.health-cell.h-delayed   { color: var(--critical-ink); background: rgba(208, 59, 59, 0.10); }
.health-cell.h-completed { color: var(--ink-2);        background: rgba(75, 82, 97, 0.08); }
.health-cell.h-on_hold   { color: var(--ink-2);        background: rgba(75, 82, 97, 0.08); }

/* ── Single-line list blades: STACKED cells so the whole table fits the
   viewport with no sideways scroll. Long text truncates with an ellipsis
   instead of forcing width; the full value lives on the detail views. ── */
table.data th { white-space: nowrap; }
#view-opportunities table.data,
#view-projects table.data { table-layout: fixed; width: 100%; }
#view-opportunities table.data td,
#view-projects table.data td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.cell-stack { display: table-cell; }
.cell-stack .stack-main { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-stack .commission-hint { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-stack .health-cell { margin-top: 3px; }
/* Column proportions (fixed layout): title-ish columns get the room.
   Scoped per portal — the two portals stack slightly different column sets. */
.portal-admin #view-opportunities table.data th:nth-child(1) { width: 22%; }
.portal-admin #view-opportunities table.data th:nth-child(2) { width: 15%; }
.portal-admin #view-opportunities table.data th:nth-child(3) { width: 12%; }
.portal-admin #view-opportunities table.data th:nth-child(4) { width: 12%; }
.portal-admin #view-opportunities table.data th:nth-child(5) { width: 12%; }
.portal-admin #view-opportunities table.data th:nth-child(6) { width: 11%; }
.portal-admin #view-opportunities table.data th:nth-child(7) { width: 16%; }
.portal-admin #view-projects table.data th:nth-child(1) { width: 26%; }
.portal-admin #view-projects table.data th:nth-child(2) { width: 17%; }
.portal-admin #view-projects table.data th:nth-child(3) { width: 15%; }
.portal-admin #view-projects table.data th:nth-child(4) { width: 20%; }
.portal-admin #view-projects table.data th:nth-child(5) { width: 12%; }
.portal-admin #view-projects table.data th:nth-child(6) { width: 10%; }
.portal-partner #view-opportunities table.data th:nth-child(1) { width: 25%; }
.portal-partner #view-opportunities table.data th:nth-child(2) { width: 16%; }
.portal-partner #view-opportunities table.data th:nth-child(3) { width: 13%; }
.portal-partner #view-opportunities table.data th:nth-child(4) { width: 14%; }
.portal-partner #view-opportunities table.data th:nth-child(5) { width: 11%; }
.portal-partner #view-opportunities table.data th:nth-child(6) { width: 13%; }
.portal-partner #view-opportunities table.data th:nth-child(7) { width: 8%; }
.portal-partner #view-projects table.data th:nth-child(1) { width: 22%; }
.portal-partner #view-projects table.data th:nth-child(2) { width: 15%; }
.portal-partner #view-projects table.data th:nth-child(3) { width: 14%; }
.portal-partner #view-projects table.data th:nth-child(4) { width: 17%; }
.portal-partner #view-projects table.data th:nth-child(5) { width: 11%; }
.portal-partner #view-projects table.data th:nth-child(6) { width: 13%; }
.portal-partner #view-projects table.data th:nth-child(7) { width: 8%; }
#view-opportunities .inline-select { max-width: 195px; }

/* ── Awaiting pick (mirrors OneTPT's owner column) ── */
.awaiting-pick { color: var(--warning-ink); font-weight: 700; font-size: 12px; white-space: nowrap; }

/* Awaiting-pick rail on top of the opportunities blade (mirrors OneTPT). */
.awaiting-box {
  border: 1px solid color-mix(in srgb, var(--warning-ink) 40%, transparent);
  background: color-mix(in srgb, var(--warning-bg, #fff8e6) 55%, transparent);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.awaiting-head { font-size: 16px; color: var(--warning-ink); display: flex; align-items: center; gap: 6px; }
.awaiting-head .muted { font-weight: 500; font-size: 13px; }
.awaiting-sub { margin: 4px 0 6px; font-size: 12px; color: var(--muted-ink, #6b7280); }
.awaiting-list { list-style: none; margin: 0; padding: 0; }
.awaiting-list li { display: flex; align-items: center; gap: 12px; padding: 7px 0; border-top: 1px solid color-mix(in srgb, var(--warning-ink) 15%, transparent); }
.awaiting-list li:first-child { border-top: 0; }
.awaiting-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: inherit; text-decoration: none; }
.awaiting-name:hover { color: var(--brand-navy, #0b1023); text-decoration: underline; }
.awaiting-value { font-variant-numeric: tabular-nums; font-weight: 600; }

/* ── "Needs focus" strip — slipping in-flight projects pulled above the list ── */
.focus-panel { border-left: 4px solid var(--critical); }
.focus-panel .panel-head h2 { color: var(--critical-ink); }
.focus-list { list-style: none; margin: 0; padding: 0; }
.focus-item { display: flex; align-items: center; gap: 14px; padding: 10px 4px; border-bottom: 1px solid var(--grid); cursor: pointer; }
.focus-item:last-child { border-bottom: none; }
.focus-item:hover { background: rgba(208, 59, 59, 0.04); }
.focus-main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.focus-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.focus-days { font-size: 12px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }

/* ── Row reminder button — compact bell ── */
.remind-btn { padding: 2px 7px; font-size: 13px; line-height: 1.4; }

/* ── Scroll affordance: a soft shadow hugs the right/left edge of a wide table
   while there's more to scroll, and vanishes at the end. Pure CSS (the cover
   gradients scroll with the content; the shadows stay pinned to the edges). ── */
.table-wrap {
  background:
    linear-gradient(to right, var(--card) 30%, rgba(255, 255, 255, 0)),
    linear-gradient(to left, var(--card) 30%, rgba(255, 255, 255, 0)) 100% 0,
    linear-gradient(to right, rgba(31, 27, 18, 0.14), rgba(31, 27, 18, 0)),
    linear-gradient(to left, rgba(31, 27, 18, 0.14), rgba(31, 27, 18, 0)) 100% 0;
  background-repeat: no-repeat;
  background-size: 44px 100%, 44px 100%, 12px 100%, 12px 100%;
  background-attachment: local, local, scroll, scroll;
}

/* Custom roles builder (Team view) */
.crole-item { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--grid); }
.crole-item:last-child { border-bottom: none; }
.crole-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px 16px; }
.crole-grant { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.crole-view { font-size: 12.5px; text-transform: capitalize; }

/* ── Deal ↔ project links: change-order rows + link controls ── */
.co-list { list-style: none; margin: 0; padding: 0; }
.co-item { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--grid); cursor: pointer; }
.co-item:last-child { border-bottom: none; }
.co-item:hover { background: rgba(240, 78, 35, 0.05); }
.co-title { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-money { font-size: 13px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.co-link { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.co-link select { padding: 5px 9px; border: 1.5px solid #d9dbe6; border-radius: 8px; font-size: 13px; font-family: inherit; background: #ffffff; color: var(--ink); max-width: 280px; }
.co-value { display: inline-flex; justify-content: flex-end; }

/* ── Status pipeline: connected chevrons across the top of a deal ──
   done = filled green-ink, now = brand navy, next = quiet parchment.
   Clicking a segment moves the deal there (statuses have no fixed order). */
.status-rail {
  display: flex; flex-wrap: wrap; gap: 3px 0; margin: 12px 0 6px;
  border: 1px solid var(--rule); border-radius: 8px; padding: 4px; background: var(--card);
  overflow-x: auto;
}
.pipe-seg {
  position: relative; flex: 1 1 auto; min-width: 104px;
  padding: 8px 14px 8px 20px; border: 0; background: transparent; cursor: pointer;
  font-family: inherit; font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; white-space: nowrap; color: var(--ink-2);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%, 10px 50%);
  transition: background var(--t-fast), color var(--t-fast);
}
.pipe-seg:first-child { clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%); padding-left: 14px; }
.pipe-seg:last-child  { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 10px 50%); }
.pipe-done { background: rgba(12, 163, 12, 0.14); color: var(--good-ink); }
.pipe-now  { background: var(--brand); color: #fff; }
.pipe-next { background: var(--grid); color: var(--muted); }
.pipe-seg:not(:disabled):hover { background: var(--accent); color: #fff; }
.pipe-seg:disabled { cursor: default; }
/* Closed states carry their own meaning even when they're the current step */
.pipe-now.pipe-k-closed_won  { background: var(--good); color: #fff; }
.pipe-now.pipe-k-closed_lost { background: var(--critical); color: #fff; }


/* ── Row status stripes (parity with OneTPT's left-edge color line) ──
   Opportunities: stage color. Projects: delivery-health color. */
tr[class*="row-st-"] > td:first-child,
tr[class*="row-h-"] > td:first-child { border-left: 4px solid transparent; }
tr.row-st-submitted > td:first-child { border-left-color: var(--muted); }
tr.row-st-working_deal > td:first-child,
tr.row-st-deliverables_sent > td:first-child { border-left-color: var(--accent); }
tr.row-st-pending_tpt > td:first-child,
tr.row-st-pending_partner > td:first-child,
tr.row-st-pending_pax8 > td:first-child { border-left-color: var(--warning); }
tr.row-st-sow_sent > td:first-child,
tr.row-st-change_order_sent > td:first-child { border-left-color: #5a5fcf; }
tr.row-st-closed_won > td:first-child { border-left-color: var(--good); }
tr.row-st-closed_lost > td:first-child { border-left-color: var(--critical); }
tr.row-h-on_track > td:first-child { border-left-color: var(--good); }
tr.row-h-at_risk > td:first-child { border-left-color: var(--warning); }
tr.row-h-delayed > td:first-child { border-left-color: var(--critical); }
tr.row-h-completed > td:first-child { border-left-color: var(--muted); }
tr.row-h-on_hold > td:first-child { border-left-color: var(--muted); }
.remind-btn svg { display: block; }
/* Actions cell may wrap to a second line rather than widening the table */
#view-opportunities table.data td:last-child { white-space: normal; overflow: visible; }
#view-opportunities table.data td:last-child .btn { padding: 3px 8px; font-size: 12px; margin-bottom: 2px; }
/* Fixed-layout blades: headers may wrap to two lines instead of overlapping */
#view-opportunities table.data th,
#view-projects table.data th { white-space: normal; overflow: hidden; }

/* Strategic star on list rows (same marker OneTPT shows) — blinks when the
   deal has gone 2+ days without movement. */
.strategic-star { color: var(--warning); margin-right: 5px; font-size: 12.5px; }
.strategic-stale-star { animation: strategic-blink 1.15s ease-in-out infinite; }

/* Segmented switch (My meetings / View as admin) */
.meet-head-actions { display: flex; align-items: center; gap: 10px; }
.seg-switch { display: inline-flex; overflow: hidden; border: 1.5px solid #d9dbe6; border-radius: 9px; }
.seg-btn {
  padding: 7px 13px; border: 0; background: transparent; cursor: pointer;
  font-family: inherit; font-size: 13px; color: var(--ink-2);
}
.seg-btn:hover { background: var(--grid); }
.seg-on { background: var(--brand); color: #fff; }
.seg-on:hover { background: var(--brand); }

/* Unread message traffic on a blade row: a count pill in front of the title,
   with the row lifted so it reads as "something new happened here". */
.unread-pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; margin-right: 6px;
  border-radius: 999px; background: var(--brand, #0b1023); color: #fff;
  font: 700 10px/1 var(--font-mono, ui-monospace, monospace);
  vertical-align: 1px;
}
tr.row-unread > td { background: color-mix(in srgb, var(--brand, #0b1023) 7%, transparent); }
.stack-main-strong { font-weight: 700; }

/* Page navigation under a long blade */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.pager-count { font: 11px/1 var(--font-mono, ui-monospace, monospace); color: var(--ink-2); }
.pager-nav { display: flex; align-items: center; gap: 4px; }
.pager-btn {
  min-width: 30px; height: 30px; padding: 0 7px;
  border: 1.5px solid var(--line-strong, #dcdee8); border-radius: 8px;
  background: var(--surface-raised, #fff); color: var(--ink-2); font-size: 13px; cursor: pointer;
}
.pager-btn:hover:not(:disabled) { color: var(--brand, #0b1023); border-color: var(--brand, #0b1023); }
.pager-btn:disabled { opacity: .4; cursor: default; }
.pager-current { background: var(--brand, #0b1023); border-color: var(--brand, #0b1023); color: #fff; }
.pager-gap { padding: 0 2px; color: var(--ink-3, var(--ink-2)); }

/* A file chip on a meeting row */
.chip-link {
  display: inline-flex; align-items: center; max-width: 220px; overflow: hidden;
  padding: 1px 8px; border: 1px solid var(--line-strong, #dcdee8); border-radius: 999px;
  font-size: 11px; color: var(--ink-2); text-decoration: none; white-space: nowrap; text-overflow: ellipsis;
}
.chip-link:hover { color: var(--brand, #0b1023); border-color: var(--brand, #0b1023); }


/* ── Milestone progress graph (project full view) ───────────────── */
.mg-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.mg-pct { font-family: var(--display); font-size: 38px; font-weight: 800; color: var(--brand-2); line-height: 1; }
.mg-pct.mg-done { color: var(--good-ink); }
.mg-cap { font-size: 13px; color: var(--muted); }
.mg-row { margin-bottom: 12px; }
.mg-row:last-child { margin-bottom: 0; }
.mg-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-bottom: 5px; }
.mg-name { font-weight: 700; font-size: 13.5px; color: var(--brand-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mg-meta { font-size: 12px; color: var(--muted); white-space: nowrap; }
.mg-bar { position: relative; height: 14px; border-radius: 7px; background: #eceef5; overflow: hidden; }
.mg-fill { position: absolute; inset: 0 auto 0 0; border-radius: 7px; transition: width 0.9s cubic-bezier(0.16, 1, 0.3, 1); width: 0; }
.mg-fill.mg-sch { background: #f2cd88; }
.mg-fill.mg-ach { background: linear-gradient(90deg, #0ca30c, #34c04b); }
.mg-legend { display: flex; gap: 16px; margin-top: 12px; font-size: 12px; color: var(--ink-2); }
.mg-legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; margin-right: 6px; }

/* Meta chips on detail views */
.meta-chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 6px 0 8px; }
.meta-chip {
  display: inline-flex; align-items: center; font-size: 12.5px; color: var(--ink-2);
  background: var(--paper); border: 1px solid var(--hairline); border-radius: 999px; padding: 4px 11px;
}

/* ── Deal journey band (opportunity detail) ──────────────────────────── */
.journey-band { margin: 4px 0 20px; }
.journey { display: flex; align-items: flex-start; margin-bottom: 14px; }
.j-step { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; position: relative; }
.j-node {
  width: 30px; height: 30px; border-radius: 50%; border: 2.5px solid var(--hairline);
  background: var(--card, #fff); display: grid; place-items: center;
  font-weight: 800; font-size: 13px; color: var(--muted); z-index: 1;
}
.j-step::before, .j-step::after { content: ""; position: absolute; top: 14px; height: 3px; background: var(--hairline); width: 50%; }
.j-step::before { left: 0; }
.j-step::after { right: 0; }
.j-step:first-child::before, .j-step:last-child::after { display: none; }
.j-step.done .j-node { background: var(--good); border-color: var(--good); color: #fff; }
.j-step.done::before, .j-step.done::after, .j-step.current::before, .j-step.lost::before { background: var(--good); }
.j-step.current .j-node { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 5px rgba(240, 78, 35, 0.14); }
.j-step.lost .j-node { background: var(--critical); border-color: var(--critical); color: #fff; }
.j-label { font-size: 12px; font-weight: 700; color: var(--muted); }
.j-step.current .j-label, .j-step.done .j-label { color: var(--ink); }
.j-status-chip { font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: rgba(240, 78, 35, 0.1); color: var(--accent); }
.j-step.done .j-status-chip { background: rgba(12, 163, 12, 0.1); color: var(--good-ink); }
.j-step.lost .j-status-chip { background: rgba(208, 59, 59, 0.12); color: var(--critical-ink); }
.journey-band .stat-strip { margin-bottom: 0; }

/* ── "Where this stands" guidance (opportunity detail) ───────────────── */
.guidance-card {
  display: grid; grid-template-columns: auto 1fr; gap: 14px 16px; align-items: start;
  border: 1px solid var(--hairline); border-left: 4px solid var(--accent);
  border-radius: 12px; padding: 16px 20px; margin-bottom: 20px; background: var(--card, #fff);
}
.guidance-card.won { border-left-color: var(--good); }
.guidance-card.lost { border-left-color: var(--critical); }
.guidance-card.waiting-you { border-left-color: #d99000; }
.guidance-icon { font-size: 22px; line-height: 1.2; grid-row: span 2; }
.guidance-now { font-weight: 700; color: var(--ink); font-size: 15px; }
.guidance-you { color: var(--muted); font-size: 13.5px; }
.guidance-meta { grid-column: 2; font-size: 12px; color: var(--muted); border-top: 1px solid var(--hairline); padding-top: 8px; margin-top: 2px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* WinWithTPT lockup standing in for the text wordmark */
.home-wwt { width: min(400px, 76vw); height: auto; display: inline-block; }
.side-wwt { height: 34px; width: auto; display: block; }
.auth-wwt { height: 32px; width: auto; }

/* ── Marketplace ──────────────────────────────────────────────────────── */
.mk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 20px; margin-top: 18px; }
.mk-card {
  border: 1px solid var(--hairline); border-radius: 16px; padding: 22px 24px; background: var(--card, #fff);
  display: flex; flex-direction: column; gap: 12px; transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med) var(--ease-out);
}
.mk-card:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(11, 16, 35, 0.08); }
.mk-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.mk-name { font-family: var(--display); font-size: 21px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
.mk-tagline { font-size: 14px; color: var(--muted); line-height: 1.55; }
.mk-price { font-family: var(--display); font-size: 26px; font-weight: 700; color: var(--ink); }
.mk-price span { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0.04em; }
.mk-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding-top: 6px; }
.mk-soon { border: 1px dashed var(--hairline); border-radius: 16px; padding: 40px 28px; text-align: center; }
.mk-soon h2 { font-family: var(--display); font-size: 22px; margin-bottom: 8px; color: var(--ink); }
.mk-soon p { color: var(--muted); font-size: 14px; max-width: 52ch; margin: 0 auto; line-height: 1.6; }
.mk-chip { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 11px; border-radius: 999px; background: rgba(240, 78, 35, 0.1); color: var(--accent); }

.mk-hero { border-bottom: 2px solid var(--hairline); padding-bottom: 20px; margin-bottom: 22px; }
.mk-hero h1 { font-family: var(--display); font-size: 32px; line-height: 1.2; letter-spacing: -0.02em; color: var(--ink); margin: 6px 0 10px; }
.mk-lede { font-size: 15.5px; color: var(--muted); line-height: 1.65; max-width: 64ch; }
.mk-cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: 28px; align-items: start; }
@media (max-width: 900px) { .mk-cols { grid-template-columns: 1fr; } }
.mk-h { font-size: 12px; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); margin: 22px 0 10px; }
.mk-hl { display: grid; gap: 14px; }
.mk-hl-item { border-left: 3px solid var(--accent); padding-left: 14px; }
.mk-hl-item b { display: block; font-size: 14.5px; color: var(--ink); margin-bottom: 2px; }
.mk-hl-item span { font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.mk-list { list-style: none; display: grid; gap: 9px; }
.mk-list li { position: relative; padding-left: 22px; font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.mk-list li::before { content: "✓"; position: absolute; left: 0; color: var(--good-ink); font-weight: 800; }
.mk-steps { list-style: none; counter-reset: mk; display: grid; gap: 11px; }
.mk-steps li { position: relative; padding-left: 34px; font-size: 13.5px; color: var(--muted); line-height: 1.55; counter-increment: mk; }
.mk-steps li::before {
  content: counter(mk); position: absolute; left: 0; top: -1px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 800; display: grid; place-items: center;
}
.mk-side { border: 1px solid var(--hairline); border-radius: 14px; padding: 20px; background: var(--card, #fff); position: sticky; top: 20px; }
.mk-req { display: grid; gap: 10px; }
.mk-req div { font-size: 13px; color: var(--muted); line-height: 1.5; }
.mk-req b { display: block; color: var(--ink); font-size: 13.5px; }
.mk-note { font-size: 12px; color: var(--muted); line-height: 1.5; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--hairline); }

.mk-run { border: 1px solid var(--hairline); border-radius: 14px; padding: 20px; margin-top: 18px; }
.mk-bar { height: 10px; border-radius: 999px; background: var(--hairline); overflow: hidden; margin: 12px 0 8px; }
.mk-bar i { display: block; height: 100%; border-radius: 999px; background: var(--grad-text, var(--accent)); background-color: var(--accent); transition: width 0.5s var(--ease-out); }
.mk-stage { font-size: 13px; color: var(--muted); }
.mk-orders { width: 100%; border-collapse: collapse; margin-top: 10px; }
.mk-orders th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--hairline); }
.mk-orders td { padding: 11px 10px; border-bottom: 1px solid var(--hairline); font-size: 13.5px; vertical-align: middle; }
.mk-orders tr:last-child td { border-bottom: 0; }

.mk-cta { margin-top: 18px; width: 100%; }
.mk-bar i.p0 { width: 2%; }
.mk-bar i.p5 { width: 5%; }
.mk-bar i.p10 { width: 10%; }
.mk-bar i.p15 { width: 15%; }
.mk-bar i.p20 { width: 20%; }
.mk-bar i.p25 { width: 25%; }
.mk-bar i.p30 { width: 30%; }
.mk-bar i.p35 { width: 35%; }
.mk-bar i.p40 { width: 40%; }
.mk-bar i.p45 { width: 45%; }
.mk-bar i.p50 { width: 50%; }
.mk-bar i.p55 { width: 55%; }
.mk-bar i.p60 { width: 60%; }
.mk-bar i.p65 { width: 65%; }
.mk-bar i.p70 { width: 70%; }
.mk-bar i.p75 { width: 75%; }
.mk-bar i.p80 { width: 80%; }
.mk-bar i.p85 { width: 85%; }
.mk-bar i.p90 { width: 90%; }
.mk-bar i.p95 { width: 95%; }
.mk-bar i.p100 { width: 100%; }

/* ── Click-to-sort table headers ──────────────────────────────────────── */
.th-sortable { cursor: pointer; user-select: none; position: relative; padding-right: 18px; }
.th-sortable:hover { color: var(--ink); }
.th-sortable::after {
  content: "⇅"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font-size: 10px; opacity: 0.35; font-weight: 700;
}
.th-sortable.sorted-asc::after { content: "↑"; opacity: 1; color: var(--accent); }
.th-sortable.sorted-desc::after { content: "↓"; opacity: 1; color: var(--accent); }
.th-sortable:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* Global back button — one step back from anywhere in the portal. */
.top-back {
  display: grid; place-items: center;
  width: 34px; height: 34px; flex: 0 0 auto;
  border: 1px solid var(--hairline); border-radius: 999px;
  background: transparent; color: var(--muted, #5a6072); cursor: pointer;
}
.top-back svg { width: 18px; height: 18px; }
.top-back:hover { background: rgba(0, 0, 0, 0.05); color: inherit; }

/* ── Marketplace coming-soon panel ──────────────────────────────────────
   One calm, brand-led moment: flame-gradient line art, a live-status chip,
   a headline and two lines. Motion is a slow float on the small glyphs,
   removed entirely under prefers-reduced-motion. */
.mk-soon {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 14px; max-width: 620px; margin: 0 auto; padding: 56px 24px 72px;
}
.mk-soon-art { width: min(340px, 82vw); height: auto; }
.mk-soon-orb { transform-box: fill-box; transform-origin: center; }
@media (prefers-reduced-motion: no-preference) {
  .mk-soon-orb-a { animation: mkFloat 5.2s ease-in-out infinite; }
  .mk-soon-orb-b { animation: mkFloat 6.1s ease-in-out 0.8s infinite; }
  .mk-soon-orb-c { animation: mkFloat 4.6s ease-in-out 1.6s infinite; }
  .mk-soon-dot { animation: mkPulse 2.4s ease-in-out infinite; }
}
@keyframes mkFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes mkPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.mk-soon-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 13px; border: 1px solid var(--hairline);
  border-radius: 999px; font-size: 12px; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase; color: #b45309;
  background: rgba(245, 158, 11, 0.08);
}
.mk-soon-dot { width: 7px; height: 7px; border-radius: 999px; background: #f04e23; }
.mk-soon h1 { font-size: 30px; margin: 2px 0 0; }
.mk-soon-copy { font-size: 15px; line-height: 1.6; color: var(--muted, #5a6072); margin: 0; max-width: 46ch; }
.mk-soon-note { font-size: 13.5px; color: var(--muted, #5a6072); margin: 4px 0 0; }
.mk-soon-note a { color: #f04e23; font-weight: 600; text-decoration: none; }
.mk-soon-note a:hover { text-decoration: underline; }

/* ── Small screens: content adapts, the page never pans sideways ───────── */
@media (max-width: 760px) {
  /* Wide tables scroll inside their own panel instead of stretching the page. */
  .panel:has(> table) { overflow-x: auto; }
  .panel:has(> .table-scroll) { overflow-x: auto; }
  /* Dashboard rows and heads shrink with the viewport; long labels truncate. */
  .top5-row { flex-wrap: wrap; row-gap: 4px; }
  .top5-row > * { min-width: 0; }
  .panel-head { flex-wrap: wrap; row-gap: 6px; }
}

/* Grid children default to min-width:auto, so a wide table inside a panel
   forces its whole column past the viewport instead of scrolling inside
   .table-wrap. min-width:0 restores the intended containment everywhere. */
.two-col > *, .deck-grid > * { min-width: 0; }
.panel { min-width: 0; }

/* Clickable chart columns — the whole slot is the target. */
.col-click { cursor: pointer; border-radius: 8px; transition: background var(--t-fast, 0.15s); }
.col-click:hover, .col-click:focus-visible { background: rgba(240, 78, 35, 0.06); outline: none; }

/* ── Required-field asterisks (2026-08-14 house rule) ─────────────────────
   Any .field whose control carries `required` marks its label automatically;
   labels that already carry an explicit <span class="req">*</span> chip are
   left alone so nothing double-marks. */
.field:has(input:required, select:required, textarea:required) > label::after {
  content: " *";
  color: var(--critical);
}
.field:has(label .req) > label::after { content: none; }

/* ── The saved pop: center-screen save confirmation ─────────────────────── */
@keyframes saved-pop-in {
  from { opacity: 0; transform: scale(0.88) translateY(6px); }
  60%  { opacity: 1; transform: scale(1.02); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes saved-pop-fade { to { opacity: 0; transform: scale(0.96); } }
@keyframes saved-check-draw { from { stroke-dashoffset: 26; } to { stroke-dashoffset: 0; } }
.saved-pop-host { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; pointer-events: none; }
.saved-pop {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 28px 34px; border-radius: 18px;
  background: var(--panel, #fff); border: 1px solid var(--line, #e5e5ea);
  box-shadow: 0 18px 50px rgba(11, 16, 35, 0.18);
  animation: saved-pop-in 240ms cubic-bezier(0.34, 1.4, 0.64, 1) both;
}
.saved-pop.out { animation: saved-pop-fade 240ms ease both; }
.saved-pop-ring {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  background: color-mix(in srgb, var(--ok, #2f9e44) 12%, transparent);
}
.saved-pop-check { stroke-dasharray: 26; animation: saved-check-draw 340ms 120ms ease-out both; }
.saved-pop-text { font-weight: 700; font-size: 15px; }
@media (prefers-reduced-motion: reduce) {
  .saved-pop, .saved-pop.out, .saved-pop-check { animation: none; }
}

/* Certification association evidence — the snip that proves seats really were
   associated, kept on the line it belongs to (2026-08-18). */
.cert-evidence { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; width: 100%; margin-top: 4px; }
.cert-snip {
  display: inline-flex; align-items: center; max-width: 200px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 1px 9px; font-size: 11px; color: var(--ink-2); text-decoration: none;
}
.cert-snip:hover { color: var(--brand); border-color: var(--brand); }
.cert-snip-add {
  border: 0; background: none; cursor: pointer;
  font-size: 11px; color: var(--brand); padding: 1px 2px;
}
.cert-snip-add:hover { text-decoration: underline; }

.cand-snips { white-space: nowrap; }
.cand-snips .cert-snip { margin-right: 6px; }
