/*


 */

/* ============================================================
 * AUTH PAGES
 * ============================================================ */
.auth-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  background:
    radial-gradient(circle at 50% -10%, rgba(84, 206, 151, 0.10) 0%, transparent 60%),
    var(--bg-alt);
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, sans-serif;
}

.auth-wordmark {
  font-family: "IBM Plex Serif", Georgia, serif;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #1a1a1a;
  text-decoration: none;
  margin-bottom: 32px;
}

/* ============================================================
 * Agent-login hero wordmark — glossy, animated, dramatic
 * ============================================================ */
.agent-hero-wordmark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin: 8px 0 36px;
  position: relative;
}

.wm-mode {
  flex: none;
  display: inline-block;
  padding: 8px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, #1b7a5a 0%, #2ead78 100%);
  color: #fff;
  font-family: var(--ff-body);
  font-size: clamp(16px, 2.2vw, 26px);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
  box-shadow: 0 10px 26px rgba(27, 122, 90, 0.30), inset 0 1px 0 rgba(255,255,255,0.25);
}
@media (max-width: 640px) {
  .agent-hero-wordmark { flex-wrap: wrap; }
  .wm-mode { font-size: 16px; }
}

.wm-sparkle {
  display: inline-flex;
  width: 28px;
  height: 28px;
  color: #fcd34d;
  filter: drop-shadow(0 0 6px rgba(252, 211, 77, 0.55));
  animation: wm-sparkle-pulse 2.4s ease-in-out infinite;
}
.wm-sparkle-l { animation-delay: 0s; }
.wm-sparkle-r { animation-delay: 1.2s; transform: scaleX(-1); }
.wm-sparkle svg { width: 100%; height: 100%; }

@keyframes wm-sparkle-pulse {
  0%, 100% { opacity: 0.45; transform: scale(0.92) rotate(0deg); }
  50%      { opacity: 1;    transform: scale(1.08) rotate(8deg); }
}
.wm-sparkle-r { animation-name: wm-sparkle-pulse-r; }
@keyframes wm-sparkle-pulse-r {
  0%, 100% { opacity: 0.45; transform: scale(0.92) scaleX(-1) rotate(0deg); }
  50%      { opacity: 1;    transform: scale(1.08) scaleX(-1) rotate(-8deg); }
}

.wm-link {
  position: relative;
  display: inline-block;
  text-decoration: none;
  padding: 4px 6px;
  isolation: isolate;
}

.wm-text {
  font-family: "IBM Plex Serif", Georgia, serif;
  font-size: clamp(40px, 7vw, 60px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1;
  background: linear-gradient(135deg,
    #074e39 0%,
    #1b7a5a 30%,
    #2ead78 55%,
    #1b7a5a 70%,
    #0a4a37 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
          color: transparent;
  filter:
    drop-shadow(0 10px 22px rgba(27, 122, 90, 0.18))
    drop-shadow(0 2px 4px rgba(15, 31, 26, 0.10));
  animation: wm-text-sweep 6s ease-in-out infinite;
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes wm-text-sweep {
  0%, 100% { background-position:   0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* The gloss highlight that streaks across the text periodically */
.wm-shine {
  pointer-events: none;
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255, 255, 255, 0.9) 50%,
    transparent 70%
  );
  background-size: 220% 100%;
  background-repeat: no-repeat;
  -webkit-mask-image: linear-gradient(0deg, #000 0%, #000 100%);
          mask-image: linear-gradient(0deg, #000 0%, #000 100%);
  -webkit-mask-clip: text;
          mask-clip: text;
  -webkit-mask-composite: source-in;
          mask-composite: intersect;
  /* Fallback for browsers without mask-clip: text — soft inline white */
  mix-blend-mode: screen;
  animation: wm-shine-sweep 4.5s ease-in-out infinite;
  z-index: 2;
}
@keyframes wm-shine-sweep {
  0%      { background-position: -120% 0; opacity: 0; }
  15%     { opacity: 0.85; }
  60%     { background-position:  120% 0; opacity: 0; }
  100%    { background-position:  120% 0; opacity: 0; }
}

/* Animated gradient underline that breathes */
.wm-underline {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -10px;
  height: 2px;
  background: linear-gradient(to right,
    transparent 0%,
    rgba(27, 122, 90, 0.30) 15%,
    #55ce97 50%,
    rgba(252, 211, 77, 0.55) 80%,
    transparent 100%);
  border-radius: 2px;
  transform-origin: center;
  animation: wm-underline-breathe 3.5s ease-in-out infinite;
}
@keyframes wm-underline-breathe {
  0%, 100% { transform: scaleX(0.85); opacity: 0.7; }
  50%      { transform: scaleX(1);    opacity: 1;   }
}

.wm-link:hover .wm-text { transform: translateY(-1px) scale(1.012); }

@media (max-width: 640px) {
  .agent-hero-wordmark { gap: 14px; }
  .wm-sparkle { width: 22px; height: 22px; }
}

/* ---- Login intro hero (glossy, classy, brand-led) ---- */
.auth-shell-intro {
  padding-top: 64px;
  padding-bottom: 64px;
  background:
    radial-gradient(circle at 50% -8%, rgba(84, 206, 151, 0.16) 0%, transparent 55%),
    radial-gradient(circle at 12% 95%, rgba(84, 206, 151, 0.08) 0%, transparent 50%),
    var(--bg-alt);
}

.intro-hero {
  width: 100%;
  max-width: 720px;
  margin: 0 auto 44px;
  text-align: center;
  position: relative;
}

.intro-eyebrow {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #1b7a5a;
  font-family: "IBM Plex Sans", sans-serif;
}
.intro-eyebrow::before,
.intro-eyebrow::after {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(27, 122, 90, 0.45), transparent);
  vertical-align: middle;
  margin: 0 14px 4px;
}

.intro-brand {
  margin: 0;
  font-family: "IBM Plex Serif", Georgia, serif;
  font-size: clamp(54px, 8vw, 92px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 0.98;
  position: relative;
}
.intro-brand-text {
  background: linear-gradient(135deg,
    #074e39 0%,
    #1b7a5a 25%,
    #2ead78 55%,
    #1b7a5a 85%,
    #0a4a37 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
          color: transparent;
  filter: drop-shadow(0 12px 28px rgba(27, 122, 90, 0.18))
          drop-shadow(0 2px 6px rgba(15, 31, 26, 0.10));
  position: relative;
}
.intro-brand-text::after {
  /* Subtle gloss highlight along the top edge */
  content: "Launch Engine";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0.55) 0%,
    rgba(255, 255, 255, 0.10) 38%,
    transparent 55%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
          color: transparent;
  pointer-events: none;
  mix-blend-mode: screen;
}

.intro-brand-mode {
  display: inline-block;
  vertical-align: middle;
  margin-left: 16px;
  transform: translateY(-0.32em);
  padding: 8px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, #1b7a5a 0%, #2ead78 100%);
  color: #fff;
  font-family: var(--ff-body);
  font-size: clamp(18px, 2.6vw, 30px);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
  -webkit-text-fill-color: #fff;
  box-shadow: 0 10px 26px rgba(27, 122, 90, 0.30), inset 0 1px 0 rgba(255,255,255,0.25);
}
@media (max-width: 640px) {
  .intro-brand-mode { display: block; margin: 14px auto 0; transform: none; width: max-content; }
}

.intro-tagline {
  margin: 18px 0 0;
  font-family: "IBM Plex Serif", Georgia, serif;
  font-style: italic;
  font-size: clamp(20px, 2.6vw, 26px);
  font-weight: 400;
  color: #4a4a4a;
  letter-spacing: -0.005em;
  line-height: 1.35;
}
.intro-cm {
  font-style: normal;
  font-weight: 600;
  color: #1a1a1a;
  background: linear-gradient(180deg, transparent 62%, rgba(84, 206, 151, 0.28) 62%, rgba(84, 206, 151, 0.28) 92%, transparent 92%);
  padding: 0 3px;
}

.intro-sub {
  margin: 22px auto 0;
  max-width: 460px;
  font-size: 14.5px;
  color: #6b6b6b;
  line-height: 1.6;
}

/* Customer portrait illustration on the sign-in card */
.auth-illustration {
  margin: 0 0 22px;
  display: flex;
  justify-content: center;
  filter: drop-shadow(0 10px 20px rgba(15, 31, 26, 0.10));
}
.auth-illustration svg {
  width: 160px;
  height: 160px;
  display: block;
}

/* Glossy card edge under the hero */
.auth-card-glossy {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, #ffffff 30%),
    #ffffff;
  border-color: rgba(229, 229, 229, 0.95);
  box-shadow:
    0 24px 60px rgba(15, 31, 26, 0.10),
    0 4px 14px rgba(15, 31, 26, 0.05),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
}
.auth-card-glossy::before {
  /* Top highlight stripe for the gloss feel */
  content: "";
  position: absolute;
  top: 0;
  left: 18px;
  right: 18px;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(84, 206, 151, 0.45), transparent);
  border-radius: 1px;
}

@media (max-width: 640px) {
  .intro-hero { margin-bottom: 32px; }
  .intro-eyebrow::before,
  .intro-eyebrow::after { width: 18px; margin: 0 8px 4px; }
  .intro-sub { max-width: 320px; font-size: 13.5px; }
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 18px;
  padding: 36px 36px 32px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.06),
              0 1px 2px rgba(15, 23, 42, 0.04);
  text-align: left;
}

.auth-card-check { text-align: center; }

.auth-eyebrow {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #1b7a5a;
}

.auth-title {
  font-family: "IBM Plex Serif", Georgia, serif;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0 0 8px;
  color: #1a1a1a;
}

/* Larger, more inspirational title used on the agent login screen */
.auth-title-agent {
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.auth-title-accent {
  background: linear-gradient(135deg, #1b7a5a 0%, #2ead78 60%, #074e39 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
          color: transparent;
  font-weight: 700;
}

.auth-subtitle {
  margin: 0 0 22px;
  color: #6b6b6b;
  font-size: 14.5px;
  line-height: 1.55;
}
.auth-subtitle strong { color: #1a1a1a; font-weight: 600; }

.auth-form { display: flex; flex-direction: column; gap: 16px; margin-bottom: 18px; }

.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field label {
  font-size: 12px;
  font-weight: 600;
  color: #6b6b6b;
  letter-spacing: 0.02em;
}
.auth-field input,
.auth-field select,
.auth-field textarea {
  font-family: inherit;
  font-size: 14px;
  padding: 11px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  background: #fff;
  color: #1a1a1a;
  transition: border-color .15s ease, box-shadow .15s ease;
  width: 100%;
}
.auth-field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b6b6b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  padding-right: 36px;
  cursor: pointer;
}
.auth-field input:focus,
.auth-field select:focus,
.auth-field textarea:focus {
  outline: none;
  border-color: #55ce97;
  box-shadow: 0 0 0 4px rgba(84, 206, 151, 0.18);
}

.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s ease, transform .08s ease, box-shadow .15s ease;
}
.auth-btn:active { transform: translateY(1px); }
.auth-btn-primary {
  background: #55ce97;
  color: #fff;
  border-color: #55ce97;
  box-shadow: 0 6px 18px rgba(84, 206, 151, 0.28);
}
.auth-btn-primary:hover { background: #2ead78; border-color: #2ead78; }

.auth-fineprint {
  margin: 0;
  color: #9a9a9a;
  font-size: 12.5px;
  line-height: 1.6;
}
.auth-fineprint a { color: #1b7a5a; font-weight: 600; }

.auth-switch {
  margin-top: 22px;
  font-size: 13.5px;
  color: #6b6b6b;
}
.auth-switch a {
  color: #1b7a5a;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px dashed rgba(27, 122, 90, 0.4);
}
.auth-switch a:hover { border-bottom-color: #1b7a5a; }

.auth-flash {
  margin: 0 0 18px;
  padding: 10px 14px;
  border-radius: 9px;
  font-size: 13px;
  line-height: 1.5;
}
.auth-flash-alert { background: #fef2f2; color: #7f1d1d; border: 1px solid #fecaca; }
.auth-flash-notice { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }

.auth-check-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: #f0faf7;
  color: #1b7a5a;
  border: 1px solid #d4ede6;
  margin: 0 auto 18px;
}

.auth-dev-banner {
  margin: 18px 0;
  padding: 16px 18px;
  background: linear-gradient(180deg, #f7f9fb 0%, #eef9f3 100%);
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  text-align: center;
}
.auth-dev-eyebrow {
  margin: 0 0 4px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #1b7a5a;
}
.auth-dev-note {
  margin: 0 0 12px;
  font-size: 12px;
  color: #6b6b6b;
}
.auth-btn-dev { width: 100%; }

/* ============================================================
 * SIGNED-IN USER BAR (app pages)
 * ============================================================ */
.user-bar {
  background: #0f1f1a;
  color: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.user-bar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 9px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 12.5px;
}
.user-bar-meta strong { color: #fff; font-weight: 600; }
.user-bar-company { color: rgba(255, 255, 255, 0.5); }
.user-bar-logout {
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: background .12s ease;
}
.user-bar-logout:hover { background: rgba(255, 255, 255, 0.12); }

.user-bar-agent {
  background: linear-gradient(180deg, #0f1f1a 0%, #134937 100%);
  border-bottom-color: rgba(84, 206, 151, 0.2);
}
.user-bar-tag {
  display: inline-block;
  margin-right: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
}
.user-bar-link {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 255, 255, 0.35);
}
.user-bar-link:hover { color: #fff; text-decoration-color: #fff; }

/* ---- Chat bubble meta + read/mark-read ---- */
.chat-bubble-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 4px;
}
.chat-bubble-read {
  display: inline-flex;
  align-items: center;
  color: #2ead78;
}
.chat-bubble-mark-read {
  font-family: var(--ff-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid #d4ede6;
  background: #fff;
  color: #1b7a5a;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
}
.chat-bubble-mark-read:hover {
  background: var(--green-xl);
  border-color: var(--green);
}

/* ============================================================
 * AGENT DASHBOARD (workspace picker)
 * ============================================================ */
.agent-header {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 24px 24px;
}
.agent-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
}
.agent-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.agent-new-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  background: var(--ink);
  color: #fff;
  border: 1px solid var(--ink);
  border-radius: 8px;
  font-family: var(--ff-body);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background .12s ease, transform .08s ease;
}
.agent-new-cta:hover { background: #000; }
.agent-new-cta:active { transform: translateY(1px); }
.agent-new-cta svg { color: var(--green); }

/* === Agent Workbench — green-themed, vertical customer tabs === */
.wb-page-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 80px;
}
.wb-toprow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 16px 0 22px;
  flex-wrap: wrap;
}
.wb-title {
  margin: 0;
  font-family: var(--ff-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
}
.wb-toprow-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.wb-sort { display: inline-flex; align-items: center; gap: 8px; }
.wb-sort-label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.wb-sort-select {
  padding: 9px 30px 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font-family: var(--ff-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.wb-sort-select:hover { border-color: #cfcfd6; }
.wb-sort-select:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-l); }
.wb-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  background: linear-gradient(135deg, #1b7a5a 0%, #2ead78 100%);
  color: #fff;
  border: 1px solid #1b7a5a;
  border-radius: 8px;
  font-family: var(--ff-body);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(20, 108, 79, 0.18);
  transition: filter .12s ease, box-shadow .15s ease, transform .08s ease;
}
.wb-add-btn:hover { filter: brightness(1.08); box-shadow: 0 6px 14px rgba(20, 108, 79, 0.24); }
.wb-add-btn:active { transform: translateY(1px); }
.wb-back { margin: 0 !important; }

.wb-empty {
  padding: 48px 28px;
  background: #f6fbf8;
  border: 1px dashed var(--border-g, #b6e1c5);
  border-radius: 14px;
  text-align: center;
  color: var(--green-dd, #146c4f);
  font-size: 15px;
}

/* Vertical layout: left sidebar = customers, right pane = tasks */
.wb-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.wb-side {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  position: sticky;
  top: 16px;
}
.wb-vtab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  background: transparent;
  border: 0;
  border-radius: 8px;
  text-align: left;
  font-family: var(--ff-body);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.wb-vtab:hover { background: #f6fbf8; }
.wb-vtab-active {
  background: linear-gradient(135deg, #1b7a5a 0%, #2ead78 100%);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(20, 108, 79, 0.18);
}
.wb-vtab-active:hover { filter: brightness(1.08); background: linear-gradient(135deg, #1b7a5a 0%, #2ead78 100%); }
.wb-vtab-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wb-vtab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: #d8f3e3;
  color: var(--green-dd, #146c4f);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.wb-vtab-active .wb-vtab-count {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.wb-main { min-width: 0; }
.wb-tab-panel { display: none; }
.wb-tab-panel-active { display: block; }
.wb-tab-panel[hidden] { display: none; }

.wb-blank {
  margin: 0;
  padding: 24px;
  background: #fafafa;
  border: 1px dashed var(--border);
  border-radius: 10px;
  color: var(--mid);
  font-size: 14px;
  text-align: center;
}
.wb-blank em { font-style: normal; font-weight: 700; color: var(--green-dd, #146c4f); }

.ct-open-program {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--green-dd, #146c4f);
  text-decoration: none;
  transition: color .12s ease;
}
.ct-open-program:hover { color: #0b4a37; text-decoration: underline; }

.ct-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}
.ct-edit-link {
  background: transparent;
  border: 0;
  padding: 4px 8px;
  margin: 0;
  font-family: var(--ff-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--green-dd, #146c4f);
  text-decoration: underline;
  text-decoration-color: rgba(20, 108, 79, 0.25);
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color .12s ease, text-decoration-color .12s ease;
}
.ct-edit-link:hover {
  color: #0b4a37;
  text-decoration-color: #0b4a37;
}

.wb-project-block { margin-bottom: 22px; }
.wb-project-block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 10px;
  padding: 0 4px;
}
.wb-project-block-title {
  margin: 0;
  font-family: var(--ff-display);
  font-size: 16.5px;
  font-weight: 600;
  color: var(--ink);
}
.wb-project-block-link {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--green-dd, #146c4f);
  text-decoration: none;
}
.wb-project-block-link:hover { text-decoration: underline; }

/* Add-task modal */
.wb-modal {
  width: min(520px, calc(100vw - 32px));
  border: 0;
  border-radius: 14px;
  padding: 0;
  background: #fff;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.22);
}
.wb-modal::backdrop {
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(2px);
}
.wb-modal-form { display: flex; flex-direction: column; }
.wb-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 14px;
  border-bottom: 1px solid var(--border);
}
.wb-modal-eyebrow {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-dd, #146c4f);
}
.wb-modal-title {
  margin: 0;
  font-family: var(--ff-display);
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
}
.wb-modal-close {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.wb-modal-close:hover { color: var(--ink); }

.wb-modal-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 22px;
}
.wb-modal-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.wb-modal-field span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mid);
}
.wb-modal-field input,
.wb-modal-field select {
  padding: 10px 12px;
  font-family: var(--ff-body);
  font-size: 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.wb-modal-field input:focus,
.wb-modal-field select:focus {
  outline: 2px solid var(--green-xl, #d8f3e3);
  border-color: var(--green, #2ead78);
}

.wb-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 22px 18px;
  border-top: 1px solid var(--border);
}
.wb-modal-cancel,
.wb-modal-submit {
  padding: 9px 16px;
  font-family: var(--ff-body);
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
}
.wb-modal-cancel {
  background: transparent;
  color: var(--mid);
  border: 1px solid var(--border);
}
.wb-modal-cancel:hover { background: var(--bg-alt, #f3f4f6); color: var(--ink); }
.wb-modal-submit {
  background: linear-gradient(135deg, #1b7a5a 0%, #2ead78 100%);
  color: #fff;
  border: 1px solid #1b7a5a;
}
.wb-modal-submit:hover { filter: brightness(1.08); }

@media (max-width: 800px) {
  .wb-layout { grid-template-columns: 1fr; }
  .wb-side {
    position: static;
    max-height: none;
    flex-direction: row;
    overflow-x: auto;
  }
  .wb-vtab { flex-shrink: 0; }
}

.agent-workbench-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  background: linear-gradient(135deg, #1b7a5a 0%, #2ead78 100%);
  color: #fff;
  border: 1px solid #1b7a5a;
  border-radius: 8px;
  font-family: var(--ff-body);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(20, 108, 79, 0.22);
  transition: filter .12s ease, transform .08s ease, box-shadow .15s ease;
}
.agent-workbench-cta:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 16px rgba(20, 108, 79, 0.32);
}
.agent-workbench-cta:active { transform: translateY(1px); }
.agent-workbench-cta svg { color: #b6e1c5; }

.agent-page-shell {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}
.agent-breadcrumb {
  margin: 0 0 18px;
  font-size: 13px;
}
.agent-breadcrumb a {
  color: var(--mid);
  text-decoration: none;
  font-weight: 500;
}
.agent-breadcrumb a:hover { color: var(--ink); }

.agent-create-card-page { max-width: none; padding: 32px 36px; }
.agent-create-card-page .agent-create-actions { gap: 10px; }

.agent-eyebrow {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-dd);
}
.agent-title {
  margin: 0;
  font-family: var(--ff-display);
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.agent-sub {
  margin: 8px 0 0;
  color: var(--mid);
  font-size: 14px;
}

.agent-grid {
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px 24px 64px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.agent-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color .15s var(--ease), transform .15s var(--ease), box-shadow .15s var(--ease);
}
.agent-card:hover {
  border-color: var(--green);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.agent-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}
.agent-card-company {
  margin: 0;
  font-family: var(--ff-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
}
.agent-card-unread {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #be3144;
  font-size: 11px;
  font-weight: 700;
}
.agent-card-email {
  margin: 0 0 16px;
  font-size: 12.5px;
  color: var(--mid);
}

.agent-card-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.agent-stat-num {
  font-family: var(--ff-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.agent-stat-num span {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
  margin-left: 1px;
}
.agent-stat-label {
  margin: 4px 0 0;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mid);
}

.agent-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background .12s ease;
}
.agent-card-cta:hover { background: #000; }
.agent-card-cta svg { color: var(--green); }

.agent-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.agent-card-edit {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: #fff;
  color: var(--slate);
  font-family: var(--ff-body);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color .12s ease, color .12s ease, background .12s ease;
}
.agent-card-edit:hover {
  border-color: var(--green);
  color: var(--green-dd);
  background: var(--green-xl);
}
.agent-card-edit svg { color: var(--mid); }
.agent-card-edit:hover svg { color: var(--green-dd); }

.agent-card-empty {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
}

.agent-card-creator {
  margin: -8px 0 4px;
  font-size: 11.5px;
  color: var(--mid);
}
.agent-card-creator strong { color: var(--ink); font-weight: 600; }

.agent-card-renewal {
  margin: 0 0 12px;
  font-size: 11.5px;
  color: var(--mid);
}
.agent-card-renewal strong { color: var(--ink); font-weight: 600; }
.agent-card-renewal-soon {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.agent-card-renewal-past {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #be3144;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* For the agent-select dropdown in edit form (wide so the dropdown breathes) */
.auth-field.auth-field-wide { grid-column: 1 / -1; }

/* ---- Team management (super admin) ---- */
.agent-team-grid {
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px 24px 64px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.agent-team-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color .15s var(--ease), transform .15s var(--ease), box-shadow .15s var(--ease);
}
.agent-team-card:hover {
  border-color: var(--green);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.agent-team-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.agent-team-card-name {
  margin: 0;
  font-family: var(--ff-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}
.agent-team-card-email {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--mid);
}

.agent-team-card-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--mid);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  white-space: nowrap;
}
.agent-team-card-badge-super {
  background: linear-gradient(135deg, #1b7a5a 0%, #2ead78 100%);
  color: #fff;
  border-color: transparent;
}

.agent-team-card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.agent-team-card-footer {
  display: flex;
  justify-content: flex-end;
}

/* Inline checkbox row in agent create/edit form */
.agent-checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--slate);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}
.agent-checkbox-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
}

/* Super-admin badge in the user bar */
.user-bar-tag-super {
  background: linear-gradient(135deg, #1b7a5a 0%, #2ead78 100%);
}

.agent-eyebrow {
  color: var(--green-dd);
}

/* --- Customer single page (Onboarding + Programs) --- */
.cust-page-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* Welcome landing — one row at the top, three cards below */
.welcome-toprow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 8px 0 14px;
  flex-wrap: wrap;
}
.welcome-toprow-meta { min-width: 0; }
.welcome-back { margin: 0 !important; }
.welcome-title {
  margin: 0 0 6px;
  font-family: var(--ff-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
}
.welcome-sub {
  margin: 0;
  font-size: 14px;
  color: var(--mid);
  line-height: 1.5;
}
.cust-eyebrow-small {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-dd, #146c4f);
}
.welcome-intro {
  margin: 0 0 28px;
  font-family: var(--ff-display);
  font-style: normal;
  font-size: 26px;
  line-height: 1.55;
  letter-spacing: 0.1px;
  color: var(--slate);
}

.welcome-cards {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 22px;
}
@media (max-width: 980px) {
  .welcome-cards { grid-template-columns: 1fr; }
}

/* Minimalist pull-quote beneath the three cards on the customer home page. */
.welcome-quote {
  margin: 72px 0 24px;
  max-width: 680px;
  padding: 0 2px;
  text-align: left;
}
.welcome-quote-mark {
  display: block;
  font-family: var(--ff-display);
  font-size: 64px;
  line-height: 0.6;
  color: var(--green-d);
  opacity: 0.5;
  margin-bottom: 8px;
}
.welcome-quote-text {
  margin: 0;
  font-family: var(--ff-display);
  font-style: italic;
  font-size: 26px;
  line-height: 1.55;
  letter-spacing: 0.1px;
  color: var(--slate);
}
.welcome-quote-sub {
  margin: 16px 0 0;
  max-width: 560px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--mid);
}
@media (max-width: 640px) {
  .welcome-quote { margin-top: 48px; }
  .welcome-quote-text { font-size: 21px; }
}

.welcome-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border-g, #b6e1c5);
  border-radius: 18px;
  padding: 24px 24px 20px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 3px rgba(20, 108, 79, 0.04);
  transition: transform .15s var(--ease), box-shadow .15s var(--ease), border-color .15s var(--ease);
  min-height: 280px;
}
a.welcome-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(20, 108, 79, 0.14);
  border-color: var(--green, #2ead78);
}

/* Onboarding card split: pre-onboarding (top) + onboarding (bottom) */
.welcome-card-split { min-height: 280px; }
.welcome-pre-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.welcome-pre-count { font-size: 12px; font-weight: 700; color: var(--green-dd, #20805a); background: var(--green-xl, #eaf7f0); border: 1px solid var(--border-g, #b6e1c5); border-radius: 999px; padding: 2px 9px; }
.welcome-pre-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.welcome-pre-form { margin: 0; }
.welcome-pre-step { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 11px; border: 1px solid var(--border, #e3e6ee); border-radius: 10px; background: #fff; cursor: pointer; font-family: var(--ff-body); font-size: 13.5px; font-weight: 500; color: var(--ink, #1f2430); text-align: left; transition: background .12s ease, border-color .12s ease; }
.welcome-pre-step:hover { background: var(--bg-alt, #f6f7fb); }
.welcome-pre-check { flex: none; width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid #c5ccd8; display: inline-flex; align-items: center; justify-content: center; color: #fff; transition: background .12s ease, border-color .12s ease; }
.welcome-pre-step.is-done { border-color: var(--border-g, #b6e1c5); background: var(--green-xl, #eef8f2); }
.welcome-pre-step.is-done .welcome-pre-check { background: var(--green, #2ead78); border-color: var(--green, #2ead78); }
.welcome-pre-step.is-done .welcome-pre-label { color: var(--green-dd, #20805a); }
.welcome-card-divider { border: 0; border-top: 1px solid var(--border-g, #d8ecdf); margin: 16px -24px; }
.welcome-onb { display: flex; flex-direction: column; flex: 1; text-decoration: none; color: inherit; }
.welcome-onb:hover .welcome-card-cta { color: var(--green, #2ead78); }
.welcome-card-head {
  margin: 0 0 18px;
}
.welcome-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #d8f3e3 0%, #b6e1c5 100%);
  color: #146c4f;
  margin-bottom: 14px;
}
.welcome-card-eyebrow {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #2ead78;
}
.welcome-card-title {
  margin: 0;
  font-family: var(--ff-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
}

/* About card — definition list */
.welcome-card-about { background: linear-gradient(180deg, #fff 0%, #f6fbf8 100%); }
.welcome-card-rows {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.welcome-card-rows > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px dashed rgba(20, 108, 79, 0.14);
  padding-bottom: 8px;
}
.welcome-card-rows > div:last-child { border-bottom: 0; }
.welcome-card-rows dt {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mid);
}
.welcome-card-rows dd {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  text-align: right;
  word-break: break-word;
}

/* Big % + progress bar — used by Onboarding & Programs cards */
.welcome-card-pct {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 4px 0 12px;
}
.welcome-card-pct-num {
  font-family: var(--ff-display);
  font-size: 42px;
  font-weight: 800;
  color: #146c4f;
  line-height: 1;
}
.welcome-card-pct-num small {
  font-size: 18px;
  font-weight: 600;
  margin-left: 2px;
  color: var(--mid);
}
.welcome-card-pct-label {
  font-size: 13px;
  color: var(--mid);
  margin-bottom: 2px;
}
.welcome-card-bar {
  height: 10px;
  border-radius: 999px;
  background: #ecfdf5;
  overflow: hidden;
  margin-bottom: 14px;
}
.welcome-card-fill {
  height: 100%;
  background: linear-gradient(90deg, #1b7a5a 0%, #2ead78 100%);
  border-radius: 999px;
  transition: width .4s ease;
}

/* Onboarding card mini-stats */
.welcome-card-stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  flex: 1;
}
.welcome-card-stats li {
  background: #f6fbf8;
  border: 1px solid #d8f3e3;
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
}
.welcome-stat-num {
  display: block;
  font-family: var(--ff-display);
  font-size: 16px;
  font-weight: 700;
  color: #146c4f;
}
.welcome-stat-label {
  display: block;
  margin-top: 2px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mid);
}

/* Programs card mini-list */
.welcome-program-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.welcome-program-list li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  background: #f6fbf8;
  border: 1px solid #d8f3e3;
  border-radius: 10px;
}
.welcome-program-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}
.welcome-program-meta {
  font-size: 11.5px;
  color: var(--mid);
}
.welcome-program-more {
  background: transparent !important;
  border: 1px dashed #b6e1c5 !important;
  text-align: center;
  font-size: 12px;
  color: var(--mid);
}
.welcome-empty-line {
  margin: 0;
  flex: 1;
  font-size: 13.5px;
  color: var(--mid);
  font-style: italic;
}

/* Card footer cta */
.welcome-card-foot {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #ecfdf5;
}
.welcome-card-cta,
.welcome-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 700;
  color: #146c4f;
  text-decoration: none;
}
.welcome-card-cta svg { transition: transform .15s ease; }
a.welcome-card:hover .welcome-card-cta svg { transform: translateX(3px); }

.cust-toprow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 8px 0 22px;
  flex-wrap: wrap;
}
.cust-toprow-meta { min-width: 0; }
.cust-toprow-back { margin: 0 !important; }
.cust-header {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
  align-items: end;
  margin: 4px 0 26px;
  flex-wrap: wrap;
}
.cust-header-eyebrow {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #be3a6e;
}
.cust-header-title {
  margin: 0 0 6px;
  font-family: var(--ff-display);
  font-size: 30px;
  font-weight: 700;
  color: var(--ink);
}
.cust-header-sub {
  margin: 0;
  font-size: 13.5px;
  color: var(--mid);
  line-height: 1.5;
}
.cust-header-progress {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.cust-progress-eyebrow {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mid);
}
.cust-progress-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.cust-progress-bar {
  flex: 1;
  height: 10px;
  background: var(--bg-alt, #f3f4f6);
  border-radius: 999px;
  overflow: hidden;
}
.cust-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #1b7a5a 0%, #2ead78 100%);
  transition: width .4s ease;
}
.cust-progress-num {
  margin: 0;
  font-family: var(--ff-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
}
.cust-progress-num span {
  font-size: 13px;
  font-weight: 500;
  color: var(--mid);
  margin-left: 1px;
}
.cust-progress-sub {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--mid);
}
@media (max-width: 860px) {
  .cust-header { grid-template-columns: 1fr; }
}

/* Chapter tabs — large, prominent, enterprise */
.cust-chapter-bar {
  display: flex;
  gap: 4px;
  border-bottom: 1.5px solid var(--border);
  margin-bottom: 28px;
}
.cust-chapter {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 26px;
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  margin-bottom: -1.5px;
  font-family: var(--ff-body);
  font-size: 16px;
  font-weight: 600;
  color: var(--mid);
  cursor: pointer;
  transition: color .18s var(--ease), border-color .18s var(--ease), background .18s var(--ease);
}
.cust-chapter:hover {
  color: var(--ink);
  background: rgba(107, 31, 74, 0.04);
}
.cust-chapter-active {
  color: #4f1d3f;
  border-bottom-color: #4f1d3f;
  font-weight: 700;
}
.cust-chapter-active:hover { background: transparent; }
.cust-chapter-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--bg-alt, #f3f4f6);
  color: var(--mid);
  transition: background .18s ease, color .18s ease;
}
.cust-chapter-active .cust-chapter-icon {
  background: linear-gradient(135deg, #4f1d3f 0%, #6b1f4a 100%);
  color: #fff;
}
.cust-chapter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--bg-alt, #f3f4f6);
  border: 1px solid var(--border);
  color: var(--mid);
  font-size: 11.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.cust-chapter-active .cust-chapter-count {
  background: #4f1d3f;
  border-color: #4f1d3f;
  color: #fff;
}
.cust-chapter-panel { display: none; }
.cust-chapter-panel-active { display: block; }
.cust-chapter-panel[hidden] { display: none; }

/* Program page one-row header: name + launch date + countdown + back */
.program-toprow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 24px;
  flex-wrap: wrap;
}
.program-toprow-meta { min-width: 0; }
.program-toprow-title {
  margin: 0 0 4px;
  font-family: var(--ff-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.15;
}
.program-toprow-sub {
  margin: 0;
  font-size: 14px;
  color: var(--mid);
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.program-toprow-sub strong { color: var(--ink); font-weight: 600; }
.program-toprow-back { margin: 0 !important; }

/* === Participation Science section (Launch phase) === */
.ps-block {
  background: linear-gradient(135deg, #fff 0%, #faf7fb 100%);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px 20px;
  margin-bottom: 16px;
}
.ps-eyebrow {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6b1f4a;
}
.ps-title {
  margin: 0 0 8px;
  font-family: var(--ff-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
}
.ps-intro {
  margin: 0 0 16px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--mid);
  max-width: 720px;
}
.ps-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 18px;
}
.ps-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 9px;
}
.ps-num {
  flex: 0 0 24px;
  font-family: var(--ff-display);
  font-size: 12px;
  font-weight: 700;
  color: #be3a6e;
  letter-spacing: 0.04em;
}
.ps-body { flex: 1; min-width: 0; }
.ps-head {
  margin: 0 0 3px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.ps-text {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--slate);
}
.ps-download {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #4f1d3f 0%, #6b1f4a 100%);
  border-radius: 10px;
  color: #fff;
}
.ps-download-meta {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.82);
  max-width: 560px;
}
.ps-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  background: #fff;
  color: #4f1d3f;
  border-radius: 8px;
  font-family: var(--ff-body);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: filter .12s ease, transform .08s ease;
}
.ps-download-btn:hover { filter: brightness(0.96); }
.ps-download-btn:active { transform: translateY(1px); }
@media (max-width: 720px) {
  .ps-list { grid-template-columns: 1fr; }
  .ps-download { flex-direction: column; align-items: flex-start; }
}

/* Onboarding chapter 2-col layout (mirrors `.layout` from program page) */
.cust-onboarding-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 32px;
  align-items: start;
}
.cust-onboarding-main { min-width: 0; }
.cust-onboarding-sidebar {
  position: sticky;
  top: 24px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
@media (max-width: 1000px) {
  .cust-onboarding-layout { grid-template-columns: 1fr; }
  .cust-onboarding-sidebar { position: static; }
}

/* Setup/Data tab counter pill (alongside .tab-number/.tab-label) */
.tab-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 22px;
  padding: 0 9px;
  margin-left: 8px;
  border-radius: 999px;
  background: var(--bg-alt, #f3f4f6);
  border: 1px solid var(--border);
  color: var(--mid);
  font-size: 11.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.tab-active .tab-count-pill {
  background: var(--green-xl, #d8f3e3);
  border-color: var(--border-g, #b6e1c5);
  color: var(--green-dd, #146c4f);
}

/* Onboarding banner */
.cust-onboarding-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  margin: 0 0 18px;
  background: linear-gradient(135deg, #fbe8f0 0%, #f3d3e2 100%);
  border: 1px solid #f3c9da;
  border-radius: 10px;
  color: #4f1d3f;
}
.cust-onboarding-banner-icon {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: #4f1d3f;
  color: #fff;
  flex-shrink: 0;
}
.cust-onboarding-banner-text {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
}
.cust-onboarding-banner-text strong { font-weight: 700; color: #4f1d3f; }

/* Sub-tabs (Setup / Data) — prominent, mutually exclusive */
.cust-subtab-bar {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  background: #f1e8ed;
  border: 1px solid #e3d2dd;
  border-radius: 12px;
  margin-bottom: 22px;
}
.cust-subtab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 22px;
  background: transparent;
  border: 0;
  border-radius: 8px;
  font-family: var(--ff-body);
  font-size: 14.5px;
  font-weight: 600;
  color: #6b1f4a;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}
.cust-subtab:hover {
  background: rgba(107, 31, 74, 0.08);
}
.cust-subtab-active {
  background: linear-gradient(135deg, #4f1d3f 0%, #6b1f4a 100%);
  color: #fff;
  box-shadow: 0 6px 14px rgba(79, 29, 63, 0.32);
}
.cust-subtab-active:hover { background: linear-gradient(135deg, #4f1d3f 0%, #6b1f4a 100%); }
.cust-subtab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(107, 31, 74, 0.10);
  color: #6b1f4a;
  font-size: 11.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.cust-subtab-active .cust-subtab-count {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}
.cust-subtab-panel { display: none; }
.cust-subtab-panel-active { display: block; }
.cust-subtab-panel[hidden] { display: none; }

/* Item list inside a tab */
.cust-item-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cust-empty {
  padding: 28px;
  background: #fafafa;
  border: 1px dashed var(--border);
  border-radius: 12px;
  color: var(--mid);
  font-size: 14px;
  text-align: center;
}
.cust-empty-large { padding: 48px 28px; }

/* Programs chapter */
.cust-programs-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.cust-programs-title {
  margin: 0 0 4px;
  font-family: var(--ff-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
}
.cust-programs-sub {
  margin: 0;
  font-size: 13px;
  color: var(--mid);
}
.cust-program-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cust-program-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 22px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.cust-program-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
.cust-program-eyebrow {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mid);
}
.cust-program-name {
  margin: 0 0 4px;
  font-family: var(--ff-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}
a.cust-program-name-link {
  display: inline-block;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color .12s ease, border-color .12s ease;
}
a.cust-program-name-link:hover {
  color: #1b7a5a;
  border-bottom-color: #2ead78;
}
.cust-program-meta {
  margin: 0;
  font-size: 13px;
  color: var(--mid);
}
.cust-program-meta strong { color: var(--ink); font-weight: 600; }

/* Inline message thread on customer onboarding items */
.coi-confirm {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  margin: 0 0 16px;
  background: var(--bg-alt, #f7f9f8);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.coi-confirm-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  margin: 0;
}
.coi-confirm-box {
  width: 18px;
  height: 18px;
  accent-color: var(--green-d);
  cursor: pointer;
  flex: none;
}
.coi-confirm-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.coi-confirm-state {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
}
.coi-confirm-state-yes { color: var(--green-dd); background: var(--green-l); }
.coi-confirm-state-no  { color: var(--mid);      background: #ececec; }

.coi-conversation {
  margin: 18px 0 0;
}
.coi-conversation-eyebrow {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mid);
}

.coi-thread {
  margin: 18px 0 0;
  padding: 16px;
  background: #fafbfc;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.coi-thread-eyebrow {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mid);
}
.coi-thread-eyebrow span {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  font-size: 10px;
  border-radius: 999px;
  background: var(--bg-alt, #f3f4f6);
  color: var(--mid);
}
.coi-thread-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.coi-msg {
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--border);
}
.coi-msg-agent { background: #fbe8f0; border-color: #f3c9da; }
.coi-msg-customer { background: #fff; }
.coi-msg-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.coi-msg-author { font-size: 12px; font-weight: 700; color: var(--ink); }
.coi-msg-meta   { font-size: 11px; color: var(--mid); flex: 1; }
.coi-msg-del button {
  background: transparent;
  border: 0;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.coi-msg-del button:hover { color: #be3144; }
.coi-msg-body {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--slate);
  white-space: pre-wrap;
}
.coi-thread-form { display: flex; flex-direction: column; gap: 8px; }
.coi-thread-form textarea {
  width: 100%;
  padding: 8px 10px;
  font-family: var(--ff-body);
  font-size: 13.5px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
}
.coi-thread-form button { align-self: flex-end; }

/* Top-row actions wrapper on the programs page */
.welcome-toprow-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* + New program disclosure */
.cust-new-program { position: relative; }
.cust-new-program > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}
.cust-new-program > summary::-webkit-details-marker { display: none; }

.cust-new-program-trigger-green {
  padding: 10px 18px;
  background: linear-gradient(135deg, #1b7a5a 0%, #2ead78 100%);
  color: #fff;
  border: 1px solid #1b7a5a;
  border-radius: 8px;
  font-family: var(--ff-body);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(20, 108, 79, 0.18);
  transition: filter .12s ease, transform .08s ease, box-shadow .15s ease;
}
.cust-new-program-trigger-green:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 14px rgba(20, 108, 79, 0.24);
}
.cust-new-program-trigger-green:active { transform: translateY(1px); }
.cust-new-program-form {
  margin-top: 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
}
.cust-new-program-fields {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 12px;
  margin-bottom: 12px;
}
.cust-new-program-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cust-new-program-field span {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--mid);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.cust-new-program-field input {
  padding: 8px 10px;
  font-size: 13.5px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
}
@media (max-width: 720px) {
  .cust-new-program-fields { grid-template-columns: 1fr; }
}

/* --- Beyond Work hero illustration --- */
.bw-hero-lockup {
  display: flex;
  align-items: center;
  gap: 18px;
}
.bw-hero-art {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.bw-hero-art svg {
  width: 64px;
  height: 64px;
  filter: drop-shadow(0 8px 18px rgba(75, 20, 55, 0.18));
}

/* ---- Workspace filter tabs (super admin only) ---- */
/* Controls row: agent filter tabs (left) + table/grid toggle (right). */
.workspace-controls {
  max-width: 1180px;
  margin: 0 auto 18px;
  padding: 0 24px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border);
}
.workspace-controls .workspace-tabs {
  margin: 0;
  padding: 0;
  max-width: none;
  border-bottom: 0;
  flex: 1 1 auto;
  min-width: 0;
}
.view-toggle {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  margin-bottom: 8px;
  background: var(--bg-alt, #f3f4f6);
  border: 1px solid var(--border);
  border-radius: 9px;
  flex: none;
}
.view-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 28px;
  border: 0;
  background: transparent;
  border-radius: 7px;
  color: var(--muted);
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}
.view-toggle-btn:hover { color: var(--ink); }
.view-toggle-btn-active {
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(15, 23, 42, 0.06));
}

/* Table view of the customer workspaces. */
.workspace-table-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 24px;
  overflow-x: auto;
}
.workspace-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.workspace-table thead th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.workspace-table tbody td {
  padding: 14px;
  border-bottom: 1px solid var(--border);
  color: var(--slate);
  vertical-align: middle;
  white-space: nowrap;
}
.workspace-table tbody tr:hover { background: var(--bg-alt, #f7f9f8); }
.wt-customer { min-width: 220px; white-space: normal; }
.wt-company {
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
}
.wt-company:hover { color: var(--green-dd); }
.wt-email { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.wt-unread { margin-left: 8px; }
.workspace-table td.wt-num { font-weight: 600; color: var(--ink); }
.workspace-table td.wt-actions { text-align: right; }
.wt-open {
  display: inline-block;
  padding: 6px 13px;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
}
.wt-open:hover { opacity: 0.9; }
.wt-edit {
  margin-left: 12px;
  color: var(--mid);
  text-decoration: none;
  font-size: 13px;
}
.wt-edit:hover { color: var(--ink); }

/* The grid uses display:grid, which would otherwise override the [hidden]
   attribute the toggle sets — this makes hiding it actually take effect. */
.agent-grid[hidden] { display: none; }

.workspace-tabs {
  max-width: 1180px;
  margin: 0 auto 18px;
  padding: 0 24px;
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: thin;
}
.workspace-tabs::-webkit-scrollbar { height: 6px; }
.workspace-tabs::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }

.workspace-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--mid);
  font-family: var(--ff-body);
  font-size: 13.5px;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: color .15s var(--ease), border-color .15s var(--ease);
}
.workspace-tab:hover { color: var(--ink); }
.workspace-tab-active {
  color: var(--green-dd);
  border-bottom-color: var(--green);
  font-weight: 600;
}

.workspace-tab-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.workspace-tab-badge {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 1px 5px;
  border-radius: 4px;
  background: linear-gradient(135deg, #1b7a5a 0%, #2ead78 100%);
  color: #fff;
}
.workspace-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--mid);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.workspace-tab-active .workspace-tab-count {
  background: var(--green-xl);
  border-color: var(--border-g);
  color: var(--green-dd);
}

/* ---- Provision workspace card ---- */
.agent-just-created {
  max-width: 1180px;
  margin: 0 auto 16px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border: 1px solid #a7f3d0;
  border-radius: 12px;
  color: #065f46;
}
.agent-just-created-eyebrow {
  margin: 0 0 2px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.agent-just-created-msg {
  margin: 0;
  font-size: 13.5px;
}
.agent-code-pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #a7f3d0;
  color: #065f46;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-left: 4px;
}
.agent-just-created-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-weight: 700;
}

.agent-create-card {
  max-width: 1180px;
  margin: 0 auto 28px;
  padding: 24px 28px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.agent-create-head { margin-bottom: 18px; }
.agent-create-eyebrow {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-dd);
}
.agent-create-title {
  margin: 0;
  font-family: var(--ff-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
}
.agent-create-sub {
  margin: 6px 0 0;
  color: var(--mid);
  font-size: 13.5px;
}
.agent-create-meta {
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--border, #e8e8ec);
  color: var(--mid);
  font-size: 12.5px;
}
.agent-create-meta strong { color: var(--ink); font-weight: 600; }
.agent-create-form .agent-create-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
}
.agent-create-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.agent-list-heading {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 8px;
  font-family: var(--ff-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}

@media (max-width: 640px) {
  .agent-create-form .agent-create-grid { grid-template-columns: 1fr; }
}

/* ---- Locked-launch-date badge (shown to customers in hero) ---- */
.launch-hero-locked {
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.20);
  color: rgba(255, 255, 255, 0.75);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: not-allowed;
}

.app-flash {
  max-width: 1180px;
  margin: 16px auto 0;
  padding: 10px 16px;
  border-radius: 9px;
  font-size: 13px;
}
.app-flash-notice {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.app-flash-alert {
  background: #fef2f2;
  color: #9f1239;
  border: 1px solid #fecaca;
}

/* Celebration banner shown when a phase / the onboarding chapter hits 100%.
   Elegant deep-plum on the CultureMonkey brand colour (#4f1d3f). */
.celebrate-banner {
  position: relative;
  overflow: hidden;
  max-width: 1180px;
  margin: 16px auto 0;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  border-radius: 16px;
  background:
    radial-gradient(120% 160% at 0% 0%, rgba(255, 255, 255, 0.10), transparent 60%),
    linear-gradient(125deg, #4f1d3f 0%, #6a2a59 58%, #843f72 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 42px rgba(79, 29, 63, 0.42);
  color: #fdf3fa;
  transition: opacity 200ms ease, transform 200ms ease;
  animation: celebrate-pop 0.5s var(--ease, ease) both;
}
@keyframes celebrate-pop {
  from { opacity: 0; transform: translateY(-10px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
.celebrate-burst {
  font-size: 30px;
  line-height: 1;
  flex: none;
  animation: celebrate-bounce 0.9s var(--ease, ease) 0.2s both;
}
@keyframes celebrate-bounce {
  0%   { transform: scale(0.4) rotate(-12deg); opacity: 0; }
  60%  { transform: scale(1.18) rotate(6deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); }
}
.celebrate-copy { flex: 1; min-width: 0; position: relative; }
.celebrate-title {
  margin: 0;
  font-family: var(--ff-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: #ffffff;
}
.celebrate-note {
  margin: 3px 0 0;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.78);
}
.celebrate-close {
  position: relative;
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: #ffffff;
  cursor: pointer;
  opacity: 0.6;
  flex: none;
  transition: opacity 150ms ease;
}
.celebrate-close:hover { opacity: 1; }

/* CultureMonkey theme tokens (lifted from culturemonkey.io) */
:root {
  --green:     #55ce97;
  --green-d:   #2ead78;
  --green-dd:  #1b7a5a;
  --green-l:   #e0f5ec;
  --green-xl:  #f0faf7;

  --ink:       #1a1a1a;
  --slate:     #4a4a4a;
  --mid:       #6b6b6b;
  --muted:     #9a9a9a;

  --border:    #e5e5e5;
  --border-g:  #d4ede6;

  --bg:        #ffffff;
  --bg-alt:    #f7f9f8;

  --amber:     #d97706;
  --amber-bg:  #fef3c7;
  --amber-bd:  #fde68a;

  --ff-body:    "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ff-display: "IBM Plex Serif", Georgia, "Times New Roman", serif;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 16px rgba(84, 206, 151, 0.18);
  --ease:      cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-alt);
  color: var(--ink);
  font-family: var(--ff-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.app-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 24px 96px;
}

/* "Beyond Work" CTA — deep wine + dusty rose accent.
   Sits ABOVE the agent workbench ribbon, visible only to super admins. */
.beyond-work-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px;
  margin: 0 0 12px;
  background:
    linear-gradient(135deg, #1f1024 0%, #3a1b3d 55%, #4f1d3f 100%);
  color: #fff;
  border-radius: 12px;
  text-decoration: none;
  border: 1px solid rgba(244, 114, 182, 0.20);
  box-shadow:
    0 12px 32px rgba(31, 16, 36, 0.32),
    0 1px 0 rgba(255, 255, 255, 0.05) inset;
  transition: transform .12s ease, box-shadow .12s ease;
  position: relative;
  overflow: hidden;
}
.beyond-work-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 88% 16%, rgba(244, 114, 182, 0.20) 0%, transparent 50%),
    radial-gradient(circle at 8% 90%, rgba(244, 114, 182, 0.10) 0%, transparent 50%);
  pointer-events: none;
}
.beyond-work-cta:hover {
  transform: translateY(-1px);
  box-shadow:
    0 18px 40px rgba(31, 16, 36, 0.38),
    0 1px 0 rgba(255, 255, 255, 0.06) inset;
}
.beyond-work-cta > * { position: relative; z-index: 1; }

.bw-cta-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.bw-cta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(244, 114, 182, 0.14);
  color: #f9a8d4;
  border: 1px solid rgba(244, 114, 182, 0.36);
  flex-shrink: 0;
}
.bw-cta-text { display: flex; flex-direction: column; min-width: 0; }
.bw-cta-eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #f9a8d4;
}
.bw-cta-title {
  font-family: var(--ff-display);
  font-size: 17px;
  font-weight: 500;
  color: #fff;
  letter-spacing: -0.005em;
  margin-top: 2px;
}
.bw-cta-title strong { font-weight: 700; color: #fce7f3; }

.bw-cta-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  background: rgba(244, 114, 182, 0.16);
  border: 1px solid rgba(244, 114, 182, 0.36);
  color: #fce7f3;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
  transition: background .12s ease, border-color .12s ease;
}
.beyond-work-cta:hover .bw-cta-arrow {
  background: rgba(244, 114, 182, 0.24);
  border-color: rgba(244, 114, 182, 0.5);
}
.bw-cta-arrow svg { color: #f9a8d4; }

@media (max-width: 640px) {
  .beyond-work-cta { flex-direction: column; align-items: stretch; }
  .bw-cta-arrow { justify-content: center; }
}

/* Workbench CTA on the project page — midnight navy + warm champagne accent,
   intentionally different from the brand green so it reads as "internal / agent only" */
.workbench-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px;
  margin: 0 0 24px;
  background:
    linear-gradient(135deg, #0a1226 0%, #1b2540 55%, #232f4f 100%);
  color: #fff;
  border-radius: 12px;
  text-decoration: none;
  border: 1px solid rgba(252, 211, 77, 0.18);
  box-shadow:
    0 12px 32px rgba(10, 18, 38, 0.30),
    0 1px 0 rgba(255, 255, 255, 0.05) inset;
  transition: transform .12s ease, box-shadow .12s ease;
  position: relative;
  overflow: hidden;
}
.workbench-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 92% 12%, rgba(252, 211, 77, 0.18) 0%, transparent 50%),
    radial-gradient(circle at 8% 100%, rgba(252, 211, 77, 0.08) 0%, transparent 50%);
  pointer-events: none;
}
.workbench-cta:hover {
  transform: translateY(-1px);
  box-shadow:
    0 18px 40px rgba(10, 18, 38, 0.35),
    0 1px 0 rgba(255, 255, 255, 0.06) inset;
}
.workbench-cta > * { position: relative; z-index: 1; }

.workbench-cta-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.workbench-cta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(252, 211, 77, 0.12);
  color: #fcd34d;
  border: 1px solid rgba(252, 211, 77, 0.35);
  flex-shrink: 0;
}
.workbench-cta-text { display: flex; flex-direction: column; min-width: 0; }
.workbench-cta-eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fcd34d;
}
.workbench-cta-title {
  font-family: var(--ff-display);
  font-size: 17px;
  font-weight: 500;
  color: #fff;
  letter-spacing: -0.005em;
  margin-top: 2px;
}
.workbench-cta-title strong { font-weight: 700; color: #fef3c7; }

.workbench-cta-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  background: rgba(252, 211, 77, 0.14);
  border: 1px solid rgba(252, 211, 77, 0.35);
  color: #fef3c7;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  flex-shrink: 0;
  transition: background .12s ease, border-color .12s ease;
}
.workbench-cta:hover .workbench-cta-arrow {
  background: rgba(252, 211, 77, 0.22);
  border-color: rgba(252, 211, 77, 0.5);
}
.workbench-cta-arrow svg { color: #fcd34d; }

@media (max-width: 640px) {
  .workbench-cta { flex-direction: column; align-items: stretch; }
  .workbench-cta-arrow { justify-content: center; }
}

/* Dedicated workbench page wrapper */
.workbench-page-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.bw-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 28px;
  flex-wrap: wrap;
}
.bw-top-bar .back-to-project { margin: 0; }
.bw-top-bar-actions { display: inline-flex; align-items: center; gap: 8px; }

.back-to-project {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px 10px 12px;
  margin: 0 0 28px;
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink);
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.04);
  transition: border-color .15s var(--ease),
              background .15s var(--ease),
              transform .12s var(--ease),
              box-shadow .15s var(--ease);
}
.back-to-project:hover {
  border-color: var(--green);
  background: var(--green-xl);
  transform: translateX(-2px);
  box-shadow: 0 6px 14px rgba(84, 206, 151, 0.18);
}
.back-to-project-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--green-xl);
  border: 1px solid var(--border-g);
  color: var(--green-dd);
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.back-to-project:hover .back-to-project-arrow {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  transform: translateX(-2px);
}
.back-to-project-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
}
.back-to-project-eyebrow {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
}
.back-to-project-title {
  font-family: var(--ff-display);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
  margin-top: 1px;
}
.workbench-page-header {
  margin: 16px 0 24px;
}
.workbench-page-title {
  margin: 6px 0 0;
  font-family: var(--ff-display);
  font-size: 32px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.workbench-page-sub {
  margin: 8px 0 0;
  color: var(--mid);
  font-size: 14px;
}
.workbench-page-sub strong { color: var(--ink); font-weight: 600; }

/* ============================================================
 * SUPER ADMIN LAYOUT — left sidebar
 * ============================================================ */
.sa-body { margin: 0; padding: 0; min-height: 100vh; background: var(--bg-alt); }

.sa-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 240px;
  background: linear-gradient(180deg, #0c0810 0%, #1a1228 50%, #0c0810 100%);
  color: rgba(255, 255, 255, 0.78);
  z-index: 50;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(168, 85, 247, 0.18);
  box-shadow: 1px 0 0 rgba(0, 0, 0, 0.12);
}
.sa-sidebar-inner {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 22px 16px 18px;
  min-height: 0;
}

.sa-main {
  margin-left: 240px;
  min-height: 100vh;
  padding: 0 0 28px;
}
.sa-main-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 32px 64px;
}

.sa-main .app-flash {
  max-width: 1180px;
  margin: 0 auto 16px;
  padding: 10px 16px;
  border-radius: 9px;
  font-size: 13px;
}
.sa-main .app-flash-alert {
  background: #fef2f2;
  color: #7f1d1d;
  border: 1px solid #fecaca;
}

@media (max-width: 880px) {
  .sa-sidebar { position: static; width: 100%; height: auto; }
  .sa-main { margin-left: 0; padding: 16px 0; }
  .sa-main-inner { padding: 0 16px 32px; }
}

/* Wordmark inside sidebar */
.sa-wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  text-decoration: none;
  margin-bottom: 22px;
}
.sa-wordmark-mark { display: inline-flex; }
.sa-wordmark-text {
  font-family: var(--ff-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: #fff;
}

.sa-sidebar-eyebrow {
  margin: 0 8px 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(252, 211, 77, 0.78);
}

.sa-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sa-nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--ff-body);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  transition: background .12s ease, color .12s ease;
}
.sa-nav-link:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.sa-nav-link-active {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(124, 58, 237, 0.18));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(168, 85, 247, 0.35);
}
.sa-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: rgba(252, 211, 77, 0.85);
}
.sa-nav-link-active .sa-nav-icon { color: #fcd34d; }
.sa-nav-label { flex: 1; min-width: 0; }
.sa-nav-count {
  font-variant-numeric: tabular-nums;
  font-size: 11.5px;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.sa-nav-link-active .sa-nav-count {
  background: rgba(252, 211, 77, 0.18);
  border-color: rgba(252, 211, 77, 0.30);
  color: #fde68a;
}
.sa-nav-count-soon {
  background: rgba(252, 211, 77, 0.10);
  color: rgba(252, 211, 77, 0.75);
  border-color: rgba(252, 211, 77, 0.20);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sa-sidebar-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 16px 8px;
}

.sa-nav-secondary .sa-nav-link {
  font-size: 12.5px;
  padding: 8px 12px;
}
.sa-nav-link-small .sa-nav-icon { color: rgba(255, 255, 255, 0.45); }

/* ---- Grouped sidebar (scalable IA) ---- */
.sa-nav { margin-bottom: 4px; }
.sa-nav-section {
  margin: 14px 12px 5px; font-size: 10px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: rgba(255, 255, 255, 0.32);
}
.sa-nav:first-of-type .sa-nav-section { margin-top: 2px; }

/* Command palette trigger */
.sa-cmdk {
  display: flex; align-items: center; gap: 9px; width: 100%; margin: 4px 0 12px;
  padding: 9px 12px; border: 1px solid rgba(255, 255, 255, 0.10); border-radius: 9px;
  background: rgba(255, 255, 255, 0.04); color: rgba(255, 255, 255, 0.55);
  font-family: var(--ff-body); font-size: 13px; cursor: pointer;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.sa-cmdk:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.20); color: rgba(255, 255, 255, 0.85); }
.sa-cmdk-ic { display: inline-flex; color: rgba(255, 255, 255, 0.45); flex: none; }
.sa-cmdk-text { flex: 1; text-align: left; }
.sa-cmdk-kbd { flex: none; font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 5px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.10); color: rgba(255, 255, 255, 0.6); }

/* Collapsible Admin group */
.sa-nav-group { display: block; }
.sa-nav-group-head { display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; }
.sa-nav-group-head::-webkit-details-marker { display: none; }
.sa-nav-group-caret { color: rgba(255, 255, 255, 0.4); transition: transform .15s ease; }
.sa-nav-group[open] .sa-nav-group-caret { transform: rotate(180deg); }

.sa-sidebar-spacer { flex: 1; }

.sa-sidebar-user {
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}
.sa-sidebar-user-tag {
  display: inline-block;
  margin-bottom: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #1b7a5a 0%, #2ead78 100%);
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
}
.sa-sidebar-user-name {
  margin: 0;
  font-family: var(--ff-display);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}
.sa-sidebar-user-email {
  margin: 2px 0 10px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.55);
}
.sa-sidebar-signout {
  display: block;
  width: 100%;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--ff-body);
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: background .12s ease;
}
.sa-sidebar-signout:hover { background: rgba(255, 255, 255, 0.12); }

/* Page headers inside the super-admin layout */
.sa-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin: 12px 0 28px;
  flex-wrap: wrap;
}
.sa-page-eyebrow {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-dd);
}
.sa-page-title {
  margin: 0;
  font-family: var(--ff-display);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.sa-page-sub {
  margin: 8px 0 0;
  color: var(--mid);
  font-size: 14px;
  max-width: 600px;
  line-height: 1.55;
}
.sa-page-header-bw .sa-page-eyebrow { color: #be3a6e; }

/* ============================================================
 * BEYOND WORK dashboard cards
 * ============================================================ */
.bw-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.bw-stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 22px 20px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  position: relative;
  overflow: hidden;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
.bw-stat-card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08); }
.bw-stat-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(to right, #be3a6e, #9d174d);
}
.bw-stat-card-primary::before { background: linear-gradient(to right, #4f1d3f, #6b1f4a); }
.bw-stat-card-warn::before    { background: linear-gradient(to right, #d97706, #be3144); }
.bw-stat-card-renew::before   { background: linear-gradient(to right, #1b7a5a, #2ead78); }

.bw-stat-eyebrow {
  margin: 0 0 8px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mid);
}
.bw-stat-num {
  margin: 0;
  font-family: var(--ff-display);
  font-size: 44px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.025em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.bw-stat-num-sub {
  font-size: 18px;
  color: var(--muted);
  font-weight: 500;
  margin-left: 4px;
}
.bw-stat-label {
  margin: 10px 0 0;
  font-size: 12.5px;
  color: var(--mid);
  line-height: 1.45;
}

.bw-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}
.bw-breakdown-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
}
.bw-breakdown-label {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--mid);
}
.bw-breakdown-num {
  margin: 0;
  font-family: var(--ff-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.bw-breakdown-num span {
  font-family: var(--ff-body);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--mid);
  margin-left: 5px;
}

/* Recent meetings stream */
.bw-recent {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.bw-recent-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
}
.bw-recent-title {
  margin: 0;
  font-family: var(--ff-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
}
.bw-recent-all {
  color: #6b1f4a;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
}
.bw-recent-all:hover { text-decoration: underline; }

.bw-recent-list { list-style: none; margin: 0; padding: 0; }
.bw-recent-row {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.bw-recent-row:last-child { border-bottom: none; }
.bw-recent-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 44px;
  flex-shrink: 0;
  padding-top: 2px;
}
.bw-recent-date strong {
  font-family: var(--ff-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.1;
}
.bw-recent-date span {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-top: 2px;
}
.bw-recent-body { flex: 1; min-width: 0; }
.bw-recent-title-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.bw-recent-title-link:hover { color: #6b1f4a; text-decoration: underline; }
.bw-recent-meta {
  margin: 2px 0 0;
  font-size: 11.5px;
  color: var(--mid);
}
.bw-recent-empty {
  margin: 14px 0;
  padding: 28px;
  background: var(--bg-alt);
  border: 1px dashed var(--border);
  border-radius: 10px;
  color: var(--mid);
  text-align: center;
  font-size: 13.5px;
}

.bw-new-cta-ghost {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--border-strong);
}
.bw-new-cta-ghost:hover { filter: brightness(1.15); }

/* Tier-1 coming soon */
.tier1-soon {
  margin: 24px auto;
  max-width: 640px;
  text-align: center;
  padding: 56px 32px;
  background: #fff;
  border: 1px dashed var(--border);
  border-radius: 14px;
}
.tier1-soon-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  margin-bottom: 16px;
  box-shadow: 0 8px 22px rgba(146, 64, 14, 0.12);
}
.tier1-soon-title {
  margin: 0 0 8px;
  font-family: var(--ff-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
}
.tier1-soon-sub {
  margin: 0;
  color: var(--mid);
  font-size: 14px;
  line-height: 1.6;
  max-width: 460px;
  margin: 0 auto;
}

/* Tier-1 accounts — prominent agent tabs */
.tier1-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 4px 0 18px;
}
.tier1-tab {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 150px;
  padding: 13px 18px 12px;
  border-radius: 13px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  text-decoration: none;
  transition: transform .14s var(--ease), box-shadow .14s var(--ease), border-color .14s var(--ease);
}
.tier1-tab:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.10);
  border-color: var(--border-strong);
}
.tier1-tab-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.tier1-tab-name {
  font-family: var(--ff-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.tier1-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 21px;
  height: 19px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--mid);
  font-size: 10.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.tier1-tab-arr {
  font-size: 12px;
  font-weight: 600;
  color: var(--mid);
  font-variant-numeric: tabular-nums;
}
.tier1-tab-active {
  background: linear-gradient(135deg, #1c1917 0%, #292524 60%, #3b2f1e 100%);
  border-color: #44403c;
  box-shadow: 0 10px 26px rgba(28, 25, 23, 0.28);
}
.tier1-tab-active:hover {
  border-color: #57534e;
  box-shadow: 0 12px 30px rgba(28, 25, 23, 0.32);
}
.tier1-tab-active .tier1-tab-name { color: #fafaf9; }
.tier1-tab-active .tier1-tab-arr  { color: #fbbf24; }
.tier1-tab-active .tier1-tab-count {
  background: rgba(251, 191, 36, 0.16);
  border-color: rgba(251, 191, 36, 0.35);
  color: #fde68a;
}

/* Tier-1 accounts — ARR hero card that opens every tab */
.tier1-hero {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 24px;
  flex-wrap: wrap;
  margin: 18px 0 22px;
  padding: 26px 30px;
  border-radius: 16px;
  background: linear-gradient(135deg, #1c1917 0%, #292524 55%, #3b2f1e 100%);
  border: 1px solid #44403c;
  box-shadow: 0 14px 38px rgba(28, 25, 23, 0.22);
  position: relative;
  overflow: hidden;
}
.tier1-hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(to right, #f59e0b, #fbbf24, #fde68a);
}
.tier1-hero-eyebrow {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fbbf24;
}
.tier1-hero-num {
  margin: 0;
  font-family: var(--ff-display);
  font-size: 52px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  color: #fafaf9;
  font-variant-numeric: tabular-nums;
}
.tier1-hero-label {
  margin: 12px 0 0;
  font-size: 13.5px;
  color: #d6d3d1;
}
.tier1-hero-label strong { color: #fde68a; font-weight: 700; }
.tier1-hero-side {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.tier1-hero-stat {
  min-width: 150px;
  padding: 14px 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
}
.tier1-hero-stat-num {
  margin: 0;
  font-family: var(--ff-display);
  font-size: 21px;
  font-weight: 600;
  color: #fafaf9;
  font-variant-numeric: tabular-nums;
}
.tier1-hero-stat-label {
  margin: 4px 0 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: #a8a29e;
}

/* Tier-1 table accents */
.tier1-rank-col { width: 36px; }
.tier1-rank {
  font-family: var(--ff-display);
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.tier1-table td.tier1-arr { color: #92400e; }
.tier1-share-col { min-width: 140px; }
.tier1-share-bar {
  display: inline-block;
  vertical-align: middle;
  width: 84px;
  height: 7px;
  border-radius: 999px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-right: 8px;
}
.tier1-share-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(to right, #f59e0b, #fbbf24);
}
.tier1-share-pct {
  font-size: 12px;
  font-weight: 600;
  color: var(--mid);
  font-variant-numeric: tabular-nums;
}

/* Last-touch activity signal */
.tier1-touch-cell { white-space: nowrap; }
.tier1-touch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.tier1-touch-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  flex-shrink: 0;
}
.tier1-touch-fresh { color: #1b7a5a; }
.tier1-touch-fresh .tier1-touch-dot {
  background: #2ead78;
  box-shadow: 0 0 0 3px rgba(46, 173, 120, 0.16);
}
.tier1-touch-warm { color: #b45309; }
.tier1-touch-warm .tier1-touch-dot {
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.14);
}
.tier1-touch-cold { color: #be3144; }
.tier1-touch-cold .tier1-touch-dot {
  background: #e25563;
  box-shadow: 0 0 0 3px rgba(226, 85, 99, 0.13);
}
.tier1-touch-never { color: var(--muted); font-weight: 500; font-style: italic; }

/* ============================================================
 * BEYOND WORK pages (super admin only)
 * ============================================================ */
.bw-page-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.bw-header,
.bw-meeting-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin: 16px 0 28px;
  flex-wrap: wrap;
}
.bw-header-eyebrow {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #be3a6e;
}
.bw-header-title {
  margin: 0;
  font-family: var(--ff-display);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.bw-header-sub {
  margin: 8px 0 0;
  color: var(--mid);
  font-size: 14px;
  max-width: 560px;
  line-height: 1.55;
}
.bw-new-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  background: linear-gradient(135deg, #4f1d3f 0%, #6b1f4a 100%);
  color: #fff;
  border: 1px solid #6b1f4a;
  border-radius: 8px;
  font-family: var(--ff-body);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: filter .12s ease, transform .08s ease;
}
.bw-new-cta:hover { filter: brightness(1.15); }
.bw-new-cta:active { transform: translateY(1px); }
.bw-new-cta-large { padding: 13px 22px; font-size: 14px; margin-top: 14px; }

.bw-header-actions { display: inline-flex; align-items: center; gap: 10px; }

.bw-capture-picker { position: relative; }
.bw-capture-picker > summary {
  list-style: none;
  cursor: pointer;
}
.bw-capture-picker > summary::-webkit-details-marker { display: none; }
.bw-capture-picker-chev { transition: transform .15s ease; }
.bw-capture-picker[open] .bw-capture-picker-chev { transform: rotate(180deg); }
.bw-capture-picker-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 240px;
  max-height: 360px;
  overflow-y: auto;
  background: var(--bg, #fff);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0,0,0,.12);
  padding: 8px;
  z-index: 20;
}
.bw-capture-picker-hint {
  margin: 4px 8px 6px;
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--mid, #6b7280);
}
.bw-capture-picker-item {
  display: block;
  padding: 9px 10px;
  border-radius: 6px;
  color: inherit;
  font-size: 14px;
  text-decoration: none;
}
.bw-capture-picker-item:hover { background: var(--bg-alt, #f3f4f6); }

/* --- Table --- */
.bw-table-wrap {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.bw-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.bw-table thead th {
  text-align: left;
  padding: 12px 16px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mid);
}
.bw-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--slate);
}
.bw-table tbody tr:last-child td { border-bottom: none; }
.bw-table tbody tr:hover { background: rgba(244, 114, 182, 0.04); }

.bw-cell-date { line-height: 1.3; vertical-align: middle; }
.bw-cell-date .bw-cell-day {
  display: block;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}
.bw-cell-title a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.bw-cell-title a:hover { color: #6b1f4a; text-decoration: underline; }
.bw-cell-author { color: var(--mid); font-size: 12.5px; }
.bw-todo-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: #fdf2f8;
  border: 1px solid #fbcfe8;
  color: #9d174d;
  font-size: 11.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.bw-todo-pill-zero { background: var(--bg-alt); border-color: var(--border); color: var(--muted); }
.bw-row-open {
  color: #6b1f4a;
  font-weight: 600;
  font-size: 12.5px;
  text-decoration: none;
}
.bw-row-open:hover { text-decoration: underline; }

.bw-empty {
  text-align: center;
  padding: 64px 24px;
  background: #fff;
  border: 1px dashed var(--border);
  border-radius: 12px;
}
.bw-empty-headline {
  font-family: var(--ff-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 6px;
}
.bw-empty-sub { color: var(--mid); margin: 0 0 4px; }

/* --- AI transcript auto-fill --- */
.bw-find-replace {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 22px;
  background: #fff;
}
.bw-find-replace-head { margin: 0 0 12px; }
.bw-find-replace-eyebrow {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b1f4a;
}
.bw-find-replace-sub {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--mid);
}
.bw-find-replace-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.bw-find-replace-input {
  flex: 1 1 200px;
  min-width: 0;
  padding: 8px 12px;
  font-size: 13.5px;
  font-family: var(--ff-body);
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.bw-find-replace-input:focus {
  outline: 2px solid #fbe8f0;
  border-color: #be3a6e;
}
.bw-find-replace-btn {
  flex: 0 0 auto;
  padding: 9px 16px;
  font-size: 13px;
  font-family: var(--ff-body);
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #4f1d3f 0%, #6b1f4a 100%);
  border: 1px solid #6b1f4a;
  border-radius: 8px;
  cursor: pointer;
}
.bw-find-replace-btn:hover { filter: brightness(1.12); }
.bw-find-replace-status {
  margin: 10px 0 0;
  font-size: 12.5px;
}
.bw-find-replace-status-success { color: #1b7a5a; }
.bw-find-replace-status-neutral { color: var(--mid); }
.bw-find-replace-status-error   { color: #be3144; }

.transcript-extract {
  background: linear-gradient(135deg, #1f1024 0%, #3a1b3d 100%);
  border: 1px solid rgba(244, 114, 182, 0.25);
  border-radius: 14px;
  padding: 22px 26px;
  margin-bottom: 22px;
  color: #fff;
  box-shadow: 0 10px 28px rgba(31, 16, 36, 0.22);
  position: relative;
  overflow: hidden;
}
.transcript-extract::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 92% 12%, rgba(244, 114, 182, 0.20) 0%, transparent 50%);
  pointer-events: none;
}
.transcript-extract > * { position: relative; z-index: 1; }

.transcript-extract-eyebrow {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #f9a8d4;
}
.transcript-extract-title {
  margin: 0 0 6px;
  font-family: var(--ff-display);
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.005em;
}
.transcript-extract-sub {
  margin: 0 0 14px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.55;
  max-width: 56ch;
}

.transcript-extract-input {
  width: 100%;
  font-family: var(--ff-body);
  font-size: 13.5px;
  line-height: 1.55;
  padding: 14px 16px;
  border: 1px solid rgba(244, 114, 182, 0.30);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  color: #fff;
  resize: vertical;
  min-height: 130px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.transcript-extract-input::placeholder { color: rgba(255, 255, 255, 0.45); }
.transcript-extract-input:focus {
  border-color: #f9a8d4;
  box-shadow: 0 0 0 3px rgba(244, 114, 182, 0.22);
}

.transcript-extract-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.transcript-extract-status {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
}
.transcript-extract-status-busy    { background: rgba(244, 114, 182, 0.14); color: #fce7f3; border: 1px solid rgba(244, 114, 182, 0.32); }
.transcript-extract-status-success { background: rgba(84, 206, 151, 0.14); color: #d1fae5; border: 1px solid rgba(84, 206, 151, 0.35); }
.transcript-extract-status-error   { background: rgba(190, 49, 68, 0.14); color: #fecaca; border: 1px solid rgba(190, 49, 68, 0.40); }

.transcript-suggested-todos {
  list-style: disc inside;
  margin: 10px 0 0;
  padding: 0;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.85);
}
.transcript-suggested-todos li { margin: 2px 0; }

/* --- Capture meeting form --- */
.bw-form-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 32px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.bw-form-card-head { margin-bottom: 22px; }
.bw-form-card-title {
  margin: 4px 0 6px;
  font-family: var(--ff-display);
  font-size: 26px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.015em;
}
.bw-form-card-sub { margin: 0; color: var(--mid); font-size: 14px; }

.bw-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
  margin-bottom: 22px;
}

.bw-notes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.bw-note-field {
  background: #fdf2f8;
  border: 1px solid #fbcfe8;
  border-radius: 12px;
  padding: 16px 18px;
}
.bw-note-eyebrow {
  margin: 0 0 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9d174d;
}
.bw-note-label {
  display: block;
  font-family: var(--ff-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
}
.bw-note-hint {
  font-size: 12px;
  color: var(--mid);
  margin: 0 0 10px;
  line-height: 1.5;
}
.bw-note-textarea {
  width: 100%;
  font-family: var(--ff-body);
  font-size: 14px;
  padding: 10px 12px;
  border: 1px solid #fbcfe8;
  border-radius: 8px;
  background: #fff;
  resize: vertical;
  min-height: 90px;
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.bw-note-textarea:focus {
  outline: none;
  border-color: #be3a6e;
  box-shadow: 0 0 0 3px rgba(190, 58, 110, 0.18);
}

.bw-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

@media (max-width: 720px) {
  .bw-form-grid,
  .bw-notes-grid { grid-template-columns: 1fr; }
}

/* --- Meeting show page --- */
.bw-meeting-header-title {
  margin: 4px 0 0;
  font-family: var(--ff-display);
  font-size: 32px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.bw-meeting-header-sub {
  margin: 8px 0 0;
  color: var(--mid);
  font-size: 13.5px;
}
.bw-meeting-header-actions { display: flex; gap: 8px; }
.btn-danger-ghost {
  background: #fff;
  color: #be3144;
  border: 1px solid #fecaca;
  padding: 9px 14px;
  border-radius: 8px;
  font-family: var(--ff-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .12s ease;
}
.btn-danger-ghost:hover { background: #fef2f2; }

.bw-notes-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}
.bw-note-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 22px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.bw-note-card-empty { background: #fafafa; border-style: dashed; }
.bw-note-card-eyebrow {
  margin: 0 0 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #be3a6e;
}
.bw-note-card-label {
  margin: 0 0 12px;
  font-family: var(--ff-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}
.bw-note-card-body {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--slate);
  white-space: pre-wrap;
}
.bw-note-card-empty-msg {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.bw-note-card-empty-msg a {
  color: #6b1f4a;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(107, 31, 74, 0.4);
}

@media (max-width: 720px) {
  .bw-notes-section { grid-template-columns: 1fr; }
}

/* --- Tabs (Aspects / Todos) on the meeting show page --- */
.bw-tabs { margin-bottom: 32px; }
.bw-tab-bar {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 22px;
}
.bw-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-family: var(--ff-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--mid);
  cursor: pointer;
  transition: color .15s var(--ease), border-color .15s var(--ease);
}
.bw-tab:hover { color: var(--ink); }
.bw-tab-active {
  color: #6b1f4a;
  border-bottom-color: #6b1f4a;
  font-weight: 600;
}
.bw-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--mid);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.bw-tab-active .bw-tab-count {
  background: #fbe8f0;
  border-color: #f3c9da;
  color: #6b1f4a;
}
.bw-tab-panel { display: none; }
.bw-tab-panel-active { display: block; }
.bw-tab-panel[hidden] { display: none; }

/* --- Participants (form fields) --- */
.bw-participants {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px 8px;
  margin-bottom: 22px;
  background: #fcfbfd;
}
.bw-participants-head { margin: 0 0 14px; }
.bw-participants-eyebrow {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b1f4a;
}
.bw-participants-sub {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--mid);
}
.bw-participants-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.bw-participant-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}
.bw-participant-role {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mid);
}
@media (max-width: 720px) {
  .bw-participants-grid { grid-template-columns: 1fr; }
}

/* --- Participants (show page big DPs) --- */
.bw-participants-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 22px 24px;
  margin: 0 0 28px;
  background: linear-gradient(135deg, #fbe8f0 0%, #f3d3e2 100%);
  border-radius: 16px;
  border: 1px solid rgba(107, 31, 74, 0.08);
}
.bw-participant-avatar {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #4f1d3f;
}
.bw-participant-avatar > img,
.bw-participant-avatar-fallback {
  width: 76px;
  height: 76px;
  border-radius: 999px;
  border: 3px solid #fff;
  box-shadow: 0 4px 12px rgba(75, 20, 55, 0.15);
  object-fit: cover;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #be3a6e;
}
.bw-participant-avatar:hover > img,
.bw-participant-avatar:hover .bw-participant-avatar-fallback {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(75, 20, 55, 0.22);
  transition: transform .12s ease, box-shadow .15s ease;
}
.bw-participant-role-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b1f4a;
}
.bw-participants-connector {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #6b1f4a;
}
.bw-participants-line {
  display: inline-block;
  width: 32px;
  height: 1px;
  background: rgba(107, 31, 74, 0.35);
}
.bw-participants-dot {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(107, 31, 74, 0.18);
}

/* --- Met-stack (listing table small DPs) --- */
.bw-cell-met { width: 1%; white-space: nowrap; padding-right: 4px; }
.bw-met-stack {
  display: inline-flex;
  align-items: center;
}
.bw-met-dp {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 2px solid #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
  object-fit: cover;
  background: var(--bg-alt, #f3f4f6);
  display: inline-block;
}
.bw-met-dp-cust { margin-left: -8px; }
.bw-met-dp-empty {
  background: linear-gradient(135deg, #f3d3e2 0%, #fbe8f0 100%);
}

/* --- Score pills (show page Most Vital tab) --- */
.bw-scores-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 18px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.bw-scores-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.bw-score-pill {
  border-radius: 10px;
  padding: 14px 12px;
  text-align: center;
  border: 1px solid;
}
.bw-score-label {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.25;
}
.bw-score-num {
  margin: 0;
  font-family: var(--ff-display);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}
.bw-score-denom {
  font-size: 13px;
  font-weight: 500;
  opacity: 0.7;
  margin-left: 2px;
}
.bw-score-na { font-size: 22px; opacity: 0.5; }

.bw-score-red    { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.bw-score-yellow { background: #fefce8; border-color: #fde68a; color: #92400e; }
.bw-score-green  { background: #ecfdf5; border-color: #bbf7d0; color: #166534; }
.bw-score-neutral{ background: #f4f4f5; border-color: #e5e7eb; color: #4b5563; }

@media (max-width: 720px) {
  .bw-scores-grid { grid-template-columns: repeat(2, 1fr); }
}

/* --- Average score graph (dashboard) --- */
.bw-scores-avg-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 20px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.bw-scores-avg-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.bw-scores-avg-row {
  display: grid;
  grid-template-columns: 220px 1fr 70px;
  align-items: center;
  gap: 16px;
}
.bw-scores-avg-label { display: flex; flex-direction: column; gap: 2px; }
.bw-scores-avg-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}
.bw-scores-avg-count {
  font-size: 11px;
  color: var(--mid);
}
.bw-scores-avg-bar-wrap {
  position: relative;
  height: 14px;
  background: var(--bg-alt, #f3f4f6);
  border-radius: 999px;
  overflow: hidden;
}
.bw-scores-avg-bar {
  height: 100%;
  border-radius: 999px;
  transition: width .4s ease;
}
.bw-scores-avg-bar-red    { background: linear-gradient(90deg, #fecaca 0%, #ef4444 100%); }
.bw-scores-avg-bar-yellow { background: linear-gradient(90deg, #fde68a 0%, #f59e0b 100%); }
.bw-scores-avg-bar-green  { background: linear-gradient(90deg, #bbf7d0 0%, #16a34a 100%); }
.bw-scores-avg-bar-neutral{ background: linear-gradient(90deg, #e5e7eb 0%, #9ca3af 100%); }
.bw-scores-avg-value {
  text-align: right;
  font-family: var(--ff-display);
}
.bw-scores-avg-value strong {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
}
.bw-scores-avg-value span { font-size: 12px; color: var(--mid); margin-left: 2px; }
.bw-scores-avg-na { font-size: 14px; color: var(--muted); }

@media (max-width: 720px) {
  .bw-scores-avg-row { grid-template-columns: 1fr; }
  .bw-scores-avg-value { text-align: left; }
}

/* --- Renewal signal badge (show page header) --- */
.bw-signal-badge {
  display: inline-block;
  margin-left: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  font-family: var(--ff-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: middle;
  border: 1px solid transparent;
}
.bw-signal-red    { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.bw-signal-yellow { background: #fefce8; border-color: #fde68a; color: #92400e; }
.bw-signal-green  { background: #ecfdf5; border-color: #bbf7d0; color: #166534; }
.bw-signal-neutral{ background: #f4f4f5; border-color: #e5e7eb; color: #4b5563; }

/* --- Dashboard 2-up row (chart + health list) --- */
.bw-row-2up {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 20px;
}
.bw-row-2up > .bw-chart-card,
.bw-row-2up > .bw-health-card {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  height: 460px;
}
.bw-row-2up .bw-chart-list,
.bw-row-2up .bw-health-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(107, 31, 74, 0.28) transparent;
}
.bw-row-2up .bw-chart-list::-webkit-scrollbar,
.bw-row-2up .bw-health-list::-webkit-scrollbar { width: 6px; }
.bw-row-2up .bw-chart-list::-webkit-scrollbar-track,
.bw-row-2up .bw-health-list::-webkit-scrollbar-track { background: transparent; }
.bw-row-2up .bw-chart-list::-webkit-scrollbar-thumb,
.bw-row-2up .bw-health-list::-webkit-scrollbar-thumb {
  background: rgba(107, 31, 74, 0.28);
  border-radius: 3px;
}
.bw-row-2up .bw-chart-list::-webkit-scrollbar-thumb:hover,
.bw-row-2up .bw-health-list::-webkit-scrollbar-thumb:hover {
  background: rgba(107, 31, 74, 0.5);
}
@media (max-width: 900px) {
  .bw-row-2up { grid-template-columns: 1fr; }
  .bw-row-2up > .bw-chart-card,
  .bw-row-2up > .bw-health-card { height: auto; }
  .bw-row-2up .bw-chart-list,
  .bw-row-2up .bw-health-list { overflow-y: visible; }
}

/* --- Dashboard bar chart --- */
.bw-chart-card,
.bw-health-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 20px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.bw-chart-head { margin: 0 0 18px; }
.bw-chart-title {
  margin: 0 0 4px;
  font-family: var(--ff-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}
.bw-chart-sub {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--mid);
  max-width: 720px;
}
.bw-chart-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.bw-chart-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  align-items: center;
  gap: 14px;
}
.bw-chart-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bw-chart-bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bw-chart-bar {
  height: 20px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  min-width: 4px;
  transition: width .3s ease;
}
.bw-chart-bar-total {
  background: linear-gradient(90deg, #f3d3e2 0%, #fbe8f0 100%);
  color: #6b1f4a;
}
.bw-chart-bar-confirmed {
  background: linear-gradient(90deg, #1b7a5a 0%, #2ead78 100%);
  color: #fff;
}
.bw-chart-bar-value {
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

/* --- Renewal health list --- */
.bw-health-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bw-health-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 14px;
}
.bw-health-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 10px;
  background: var(--muted);
}
.bw-health-name { flex: 1; font-weight: 600; }
.bw-health-signal {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid currentColor;
}
.bw-health-row-red {
  background: #fef2f2;
  border-color: #fecaca;
}
.bw-health-row-red .bw-health-name,
.bw-health-row-red .bw-health-signal { color: #b91c1c; }
.bw-health-row-red .bw-health-dot { background: #ef4444; }

.bw-health-row-yellow {
  background: #fefce8;
  border-color: #fde68a;
}
.bw-health-row-yellow .bw-health-name,
.bw-health-row-yellow .bw-health-signal { color: #92400e; }
.bw-health-row-yellow .bw-health-dot { background: #eab308; }

.bw-health-row-green {
  background: #ecfdf5;
  border-color: #bbf7d0;
}
.bw-health-row-green .bw-health-name,
.bw-health-row-green .bw-health-signal { color: #166534; }
.bw-health-row-green .bw-health-dot { background: #16a34a; }

.bw-health-row-neutral .bw-health-name { color: var(--ink); }
.bw-health-row-neutral .bw-health-signal { color: var(--mid); border-color: var(--border); }

@media (max-width: 720px) {
  .bw-chart-row { grid-template-columns: 1fr; }
}

/* --- Most Vital tab --- */
.bw-vital-card {
  background: linear-gradient(135deg, #2a0f23 0%, #4f1d3f 60%, #6b1f4a 100%);
  color: #fff;
  border-radius: 16px;
  padding: 28px 32px;
  box-shadow: 0 8px 24px rgba(75, 20, 55, 0.25);
}
.bw-vital-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 0 0 22px;
}
.bw-vital-icon {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  color: #fbe8f0;
}
.bw-vital-title {
  margin: 0 0 4px;
  font-family: var(--ff-display);
  font-size: 18px;
  font-weight: 600;
  color: #fff;
}
.bw-vital-sub {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.72);
}
.bw-vital-list {
  margin: 0;
  padding-left: 28px;
  list-style: decimal;
  counter-reset: vital;
}
.bw-vital-list li {
  padding: 8px 0 8px 6px;
  font-size: 15px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.bw-vital-list li:last-child { border-bottom: 0; }
.bw-vital-list li::marker {
  color: #fbe8f0;
  font-weight: 700;
  font-size: 14px;
}
.bw-vital-empty {
  padding: 28px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: #fafafa;
  color: var(--mid);
  font-size: 14px;
  text-align: center;
}
.bw-vital-empty a { color: #6b1f4a; font-weight: 600; }

/* --- Aspect cards (2-up grid with numbered bullets inside) --- */
.bw-aspect-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.bw-aspect-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  height: 468px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.bw-aspect-card-empty { background: #fafafa; border-style: dashed; }
.bw-aspect-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.bw-aspect-icon {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #fbe8f0 0%, #f3d3e2 100%);
  color: #6b1f4a;
}
.bw-aspect-card-empty .bw-aspect-icon {
  background: #f1f1f1;
  color: var(--muted);
}
.bw-aspect-label {
  margin: 0;
  font-family: var(--ff-display);
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink);
}
.bw-aspect-points {
  margin: 0;
  padding-left: 22px;
  padding-right: 6px;
  list-style: decimal;
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(107, 31, 74, 0.28) transparent;
}
.bw-aspect-points::-webkit-scrollbar { width: 6px; }
.bw-aspect-points::-webkit-scrollbar-track { background: transparent; }
.bw-aspect-points::-webkit-scrollbar-thumb {
  background: rgba(107, 31, 74, 0.28);
  border-radius: 3px;
}
.bw-aspect-points::-webkit-scrollbar-thumb:hover {
  background: rgba(107, 31, 74, 0.5);
}
.bw-aspect-points li {
  padding-left: 6px;
  margin-bottom: 12px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--slate);
}
.bw-aspect-points li:last-child { margin-bottom: 0; }
.bw-aspect-points li::marker {
  color: #be3a6e;
  font-weight: 600;
}
.bw-aspect-empty-msg {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  flex: 1;
}
.bw-aspect-empty-msg a {
  color: #6b1f4a;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(107, 31, 74, 0.4);
}
@media (max-width: 720px) {
  .bw-aspect-grid { grid-template-columns: 1fr; }
}

/* --- Todos within meeting --- */
.bw-todos-section {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 26px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.bw-todos-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
  gap: 16px;
}
.bw-todos-title {
  margin: 0;
  font-family: var(--ff-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
}
.bw-todos-sub { margin: 6px 0 0; color: var(--mid); font-size: 13px; }
.bw-todos-stat {
  font-size: 12px;
  color: var(--mid);
  white-space: nowrap;
}
.bw-todos-stat strong { color: var(--ink); font-weight: 700; }

.bw-tasks-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.bw-tasks-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.bw-todo-add {
  display: grid;
  grid-template-columns: 1fr 220px auto;
  gap: 8px;
  margin-bottom: 14px;
}
.bw-todo-add-title,
.bw-todo-add-agent {
  font-family: var(--ff-body);
  font-size: 13.5px;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
.bw-todo-add-title:focus, .bw-todo-add-agent:focus {
  outline: none;
  border-color: #be3a6e;
  box-shadow: 0 0 0 3px rgba(190, 58, 110, 0.18);
}
.bw-todo-add-btn {
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: var(--ff-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.bw-todo-add-btn:hover { background: #000; }

.bw-todo-list { list-style: none; margin: 0; padding: 0; }
.bw-todo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 6px;
  background: #fff;
}
.bw-todo-row-done {
  background: var(--bg-alt);
}
.bw-todo-row-done .bw-todo-title {
  text-decoration: line-through;
  color: var(--muted);
}
.bw-todo-toggle {
  background: transparent;
  border: none;
  padding: 2px;
  cursor: pointer;
}
.bw-todo-checkbox {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--mid);
  border-radius: 4px;
  color: #fff;
}
.bw-todo-row-done .bw-todo-checkbox {
  background: var(--green);
  border-color: var(--green);
}
.bw-todo-body { flex: 1; min-width: 0; }
.bw-todo-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.bw-todo-meta { margin: 2px 0 0; font-size: 12px; color: var(--mid); }
.bw-todo-meta strong { color: var(--ink); font-weight: 600; }
.bw-todo-unassigned { color: var(--muted); font-style: italic; }

.bw-todo-inline-form {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 6px 0 0;
}
.bw-todo-inline-agent,
.bw-todo-inline-due {
  padding: 5px 8px;
  font-size: 12px;
  font-family: var(--ff-body);
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
}
.bw-todo-inline-agent { min-width: 180px; max-width: 260px; }
.bw-todo-inline-due { width: 140px; }
.bw-todo-inline-agent:focus,
.bw-todo-inline-due:focus { outline: 2px solid #fbe8f0; border-color: #be3a6e; }
.bw-todo-disregard {
  background: transparent;
  border: 0;
  padding: 4px 8px;
  margin: 0;
  color: var(--muted);
  font-family: var(--ff-body);
  font-size: 12px;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(0, 0, 0, 0.15);
  text-underline-offset: 3px;
  cursor: pointer;
  align-self: center;
  transition: color .12s ease, text-decoration-color .12s ease;
}
.bw-todo-disregard:hover {
  color: #be3144;
  text-decoration-color: #be3144;
}
.bw-todo-empty {
  padding: 24px;
  text-align: center;
  color: var(--mid);
  background: var(--bg-alt);
  border: 1px dashed var(--border);
  border-radius: 10px;
  font-size: 13px;
  margin: 0;
}

@media (max-width: 720px) {
  .bw-todo-add { grid-template-columns: 1fr; }
}

/* --- My todos card on agent dashboard --- */
.my-todos-card {
  max-width: 1180px;
  margin: 0 auto 18px;
  padding: 20px 24px;
  background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%);
  border: 1px solid #fbcfe8;
  border-radius: 14px;
}
.my-todos-head { margin-bottom: 12px; }
.my-todos-eyebrow {
  margin: 0 0 2px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9d174d;
}
.my-todos-title {
  margin: 0;
  font-family: var(--ff-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
}
.my-todos-list { list-style: none; margin: 0; padding: 0; }
.my-todo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(190, 58, 110, 0.18);
}
.my-todo-row:last-child { border-bottom: none; }
.my-todo-body { flex: 1; min-width: 0; }
.my-todo-title { margin: 0; font-size: 14px; font-weight: 600; color: var(--ink); }
.my-todo-meta {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--mid);
  display: flex;
  gap: 8px;
  align-items: center;
}
.my-todo-link { color: #6b1f4a; text-decoration: none; font-weight: 600; }
.my-todo-link:hover { text-decoration: underline; }
.my-todo-date { color: var(--muted); font-variant-numeric: tabular-nums; }

/* "Saved" pill that flashes in section summary after a save */
.saved-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(84, 206, 151, 0.4);
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 180ms ease, transform 180ms ease;
}
.auto-dismiss--in {
  opacity: 1;
  transform: translateY(0);
}
.auto-dismiss--out {
  opacity: 0;
  transform: translateY(-2px) scale(0.95);
}

/* ============================================================
 * AGENT WORKBENCH (per-project; hidden from customers)
 * ============================================================ */
.agent-workbench {
  margin: 0 0 24px;
  padding: 22px 26px 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  position: relative;
}
.agent-workbench::before {
  content: "";
  position: absolute;
  top: 0;
  left: 26px;
  right: 26px;
  height: 2px;
  background: linear-gradient(to right, #1e293b 0%, #475569 60%, transparent 100%);
  border-radius: 0 0 1px 1px;
}

.agent-workbench-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.agent-workbench-eyebrow {
  margin: 0 0 2px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #1e293b;
}
.agent-workbench-title {
  margin: 0;
  font-family: var(--ff-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
}
.agent-workbench-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  line-height: 1.05;
}
.agent-workbench-stat-num {
  font-family: var(--ff-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
}
.agent-workbench-stat-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mid);
  margin-top: 2px;
}

/* Add-task form */
.ct-add-form {
  display: grid;
  grid-template-columns: 1fr 180px 160px auto;
  gap: 8px;
  margin-bottom: 14px;
}
.ct-add-agent {
  padding: 9px 12px;
  font-family: var(--ff-body);
  font-size: 13.5px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.ct-add-input,
.ct-add-date {
  font-family: var(--ff-body);
  font-size: 13.5px;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.ct-add-input:focus, .ct-add-date:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(84, 206, 151, 0.18);
}
.ct-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  border: 1px solid var(--ink);
  border-radius: 8px;
  font-family: var(--ff-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .12s ease;
}
.ct-add-btn:hover { background: #000; }
.ct-add-btn svg { color: var(--green); }

/* Task list */
.ct-list {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
}
.ct-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 6px;
  background: #fff;
  transition: background .1s ease, border-color .1s ease;
}
.ct-row-overdue { border-color: #fecaca; background: #fef9f9; }
.ct-row-done {
  background: var(--bg-alt);
  border-color: var(--border);
}
.ct-row-done .ct-title {
  text-decoration: line-through;
  color: var(--muted);
}

.ct-toggle {
  background: transparent;
  border: none;
  padding: 2px;
  cursor: pointer;
}
.ct-toggle-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--mid);
  border-radius: 4px;
  color: #fff;
}
.ct-row-done .ct-toggle-box {
  background: var(--green);
  border-color: var(--green);
}

.ct-body { flex: 1; min-width: 0; }
.ct-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  word-wrap: break-word;
}
.ct-meta {
  margin: 2px 0 0;
  font-size: 11.5px;
  color: var(--mid);
}
.ct-meta strong { color: var(--ink); font-weight: 600; }
.ct-author { color: var(--muted); font-size: 11px; }

.ct-pill {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ct-pill-done    { background: var(--green-l); color: var(--green-dd); border: 1px solid var(--border-g); }
.ct-pill-soon    { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.ct-pill-overdue { background: #fef2f2; color: #be3144; border: 1px solid #fecaca; }

.ct-delete {
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .12s ease, color .12s ease;
}
.ct-delete:hover {
  background: #fef2f2;
  color: #be3144;
}

.ct-empty {
  margin: 0 0 18px;
  padding: 18px;
  text-align: center;
  color: var(--mid);
  background: var(--bg-alt);
  border: 1px dashed var(--border);
  border-radius: 10px;
  font-size: 13px;
}

/* Pending sections sub-list */
.ct-pending {
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.ct-pending-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mid);
}
.ct-pending-count {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--slate);
  font-size: 11px;
  letter-spacing: 0;
}
.ct-pending-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 4px 12px;
}
.ct-pending-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  font-size: 13px;
  color: var(--slate);
}
.ct-pending-num {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  width: 22px;
  flex-shrink: 0;
}
.ct-pending-title { flex: 1; min-width: 0; }
.ct-pending-status {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 1px 7px;
  border-radius: 999px;
}
.ct-pending-status-pending     { background: var(--bg-alt); color: var(--slate); border: 1px solid var(--border); }
.ct-pending-status-in_progress { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }

.ct-pending-empty {
  margin: 0;
  font-size: 13px;
  color: var(--green-dd);
}

@media (max-width: 720px) {
  .ct-add-form { grid-template-columns: 1fr; }
}

/* ---- Launch date hero ---- */
.launch-hero {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  padding: 22px 26px;
  margin-bottom: 22px;
  background: linear-gradient(135deg, #0f1f1a 0%, #152b22 60%, #1b3b30 100%);
  border-radius: 16px;
  color: #fff;
  box-shadow: 0 12px 32px rgba(15, 31, 26, 0.18), 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  position: relative;
  overflow: hidden;
}
.launch-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 88% 18%, rgba(84, 206, 151, 0.25) 0%, transparent 55%),
    radial-gradient(circle at 10% 110%, rgba(84, 206, 151, 0.12) 0%, transparent 55%);
  pointer-events: none;
}
.launch-hero > * { position: relative; z-index: 1; }

.launch-hero-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(84, 206, 151, 0.18);
  color: var(--green);
  border: 1px solid rgba(84, 206, 151, 0.32);
}

.launch-hero-main { min-width: 0; }

.launch-hero-eyebrow {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.launch-hero-date {
  margin: 0;
  font-family: var(--ff-display);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: #fff;
}
.launch-hero-date-empty {
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
}

.launch-hero-meta {
  margin: 8px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.7);
}

.launch-hero-countdown {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(84, 206, 151, 0.18);
  color: var(--green);
  border: 1px solid rgba(84, 206, 151, 0.35);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.02em;
}
.launch-hero-countdown-today {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}
.launch-hero-countdown-past {
  background: rgba(190, 49, 68, 0.18);
  border-color: rgba(190, 49, 68, 0.4);
  color: #fca5a5;
}

.launch-hero-sep { color: rgba(255, 255, 255, 0.3); }

.launch-hero-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-self: stretch;
  justify-content: flex-end;
  margin: 0;
}

.launch-hero-input-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.launch-hero-input {
  font: inherit;
  font-size: 14px;
  font-family: var(--ff-body);
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  color: #fff;
  color-scheme: dark;
  min-width: 170px;
}
.launch-hero-input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(84, 206, 151, 0.22);
}

@media (max-width: 720px) {
  .launch-hero {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "icon main"
      "form form";
    gap: 14px 18px;
  }
  .launch-hero-icon { grid-area: icon; }
  .launch-hero-main { grid-area: main; }
  .launch-hero-form { grid-area: form; }
  .launch-hero-date { font-size: 24px; }
}

/* ============================================================
 * CONVERSATION (per section, enterprise styling)
 * ============================================================ */

/* Non-clickable count badge in the section summary */
.chat-count {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  color: var(--mid);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  letter-spacing: 0.01em;
  user-select: none;
  cursor: default;
}
.chat-count-unread {
  background: #fef2f2;
  border-color: #fecaca;
  color: #be3144;
  font-weight: 600;
}
.chat-count strong { font-weight: 700; font-size: 11.5px; }

/* Clickable trigger inside the action row (only when section is expanded) */
.chat-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: 8px;
  font-family: var(--ff-body);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  color: var(--slate);
  background: #fff;
  border: 1px solid var(--border-strong);
  transition: background .12s var(--ease), border-color .12s var(--ease), color .12s var(--ease);
  cursor: pointer;
}
.chat-trigger:hover { border-color: var(--mid); color: var(--ink); }
.chat-trigger svg { color: var(--mid); }
.chat-trigger strong { font-weight: 700; }

.chat-trigger-unread {
  background: #fef2f2;
  border-color: #fecaca;
  color: #be3144;
}
.chat-trigger-unread svg { color: #be3144; }
.chat-trigger-unread:hover { border-color: #be3144; }

/* Modal dialog — enterprise restyle */
.chat-modal {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0;
  max-width: min(640px, calc(100vw - 32px));
  width: 640px;
  max-height: calc(100vh - 48px);
  height: 760px;
  background: #ffffff;
  color: var(--ink);
  box-shadow:
    0 28px 64px rgba(15, 23, 42, 0.22),
    0 4px 16px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}
.chat-modal[open] {
  display: flex;
  flex-direction: column;
  animation: modalPop 160ms var(--ease);
}
.chat-modal::backdrop {
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(3px);
}

/* Header — clean white with a hairline brand accent */
.chat-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  position: relative;
}
.chat-modal-header::after {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(to right, var(--green) 0%, var(--green-d) 60%, transparent 100%);
}
.chat-modal-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.chat-modal-title {
  margin: 0;
  font-family: var(--ff-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.chat-modal-sub {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--mid);
}
.chat-modal-close {
  background: transparent;
  border: 1px solid transparent;
  color: var(--mid);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background .12s ease, color .12s ease;
}
.chat-modal-close:hover { background: var(--bg-alt); color: var(--ink); }

/* Thread surface — soft neutral, no pattern */
.chat-modal-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: var(--bg-alt);
}

.chat-thread {
  height: 100%;
  overflow-y: auto;
  padding: 22px 22px 14px;
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-empty {
  text-align: center;
  color: var(--mid);
  font-size: 13px;
  padding: 56px 18px;
}

/* Rows */
.chat-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 84%;
}
.chat-row-agent    { align-self: flex-start; }
.chat-row-customer { align-self: flex-end; flex-direction: row-reverse; }

/* Avatars */
.chat-avatar {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #1e293b;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.02em;
}
.chat-avatar-agent {
  background: #fff;
  border: 1px solid var(--border);
}
.chat-avatar-customer {
  background: linear-gradient(135deg, #1b7a5a 0%, #2ead78 100%);
}
.chat-avatar-img { width: 100%; height: 100%; object-fit: contain; padding: 2px; }
.chat-avatar-sm { width: 36px; height: 36px; }

/* Bubbles */
.chat-bubble {
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.55;
  position: relative;
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  word-wrap: break-word;
  overflow-wrap: anywhere;
  min-width: 0;
}
.chat-bubble-agent {
  background: #fff;
  border-top-left-radius: 2px;
}
.chat-bubble-customer {
  background: #f0f5fb;
  border-color: #d6e2f0;
  border-top-right-radius: 2px;
}

.chat-bubble-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.chat-bubble-author {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.chat-bubble-customer .chat-bubble-author { color: #1e3a5f; }
.chat-bubble-agent    .chat-bubble-author { color: #1b7a5a; }

.chat-bubble-delete {
  background: transparent;
  border: none;
  padding: 2px;
  margin: -2px -4px -2px 0;
  border-radius: 4px;
  cursor: pointer;
  color: var(--muted);
  opacity: 0;
  transition: opacity .12s ease, color .12s ease, background .12s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.chat-bubble:hover .chat-bubble-delete,
.chat-bubble-delete:focus-visible { opacity: 1; }
.chat-bubble-delete:hover {
  color: #be3144;
  background: rgba(190, 49, 68, 0.08);
}

.chat-bubble-body {
  margin: 0;
  white-space: pre-wrap;
  color: var(--ink);
}
.chat-bubble-body span { display: block; }

.chat-bubble-time {
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* Composer — bigger, calmer */
.chat-modal-footer {
  padding: 14px 18px;
  background: #fff;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.chat-form {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin: 0;
}
.chat-input {
  flex: 1;
  font-family: var(--ff-body);
  font-size: 14px;
  line-height: 1.5;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  background: #fff;
  border-radius: 8px;
  color: var(--ink);
  resize: none;
  min-height: 84px;
  max-height: 220px;
  outline: none;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.chat-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(84, 206, 151, 0.18);
}
.chat-send {
  flex-shrink: 0;
  align-self: flex-end;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .12s ease, transform .08s ease;
}
.chat-send:hover  { background: #000; }
.chat-send:active { transform: translateY(1px); }

@media (max-width: 640px) {
  .chat-modal { width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; }
}

/* ---- Reminder schedule (summary in section, calendar in modal) ---- */
.reminder-empty {
  padding: 18px 20px;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 10px;
  color: var(--mid);
  background: var(--bg-alt);
  font-size: 13.5px;
  margin: 8px 0 4px;
}

.reminder-summary-block { margin-bottom: 6px; }

.reminder-summary-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}
.reminder-summary-eyebrow {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mid);
}
.reminder-summary-headline {
  margin: 0;
  font-family: var(--ff-display);
  font-size: 16px;
  color: var(--ink);
}
.reminder-summary-headline strong {
  color: var(--green-dd);
  font-weight: 700;
}

.open-calendar-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green-dd);
  font-family: var(--ff-body);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(27, 122, 90, 0.35);
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color .12s var(--ease), text-decoration-color .12s var(--ease);
}
.open-calendar-link:hover {
  color: var(--green-d);
  text-decoration-color: var(--green);
}
.open-calendar-link svg { color: var(--green); }

/* ---- Selected-reminders table ---- */
.reminder-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  margin-top: 4px;
}
.reminder-table thead th {
  text-align: left;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mid);
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}
.reminder-table tbody td {
  padding: 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.reminder-table tbody tr:last-child td { border-bottom: none; }
.reminder-table-day {
  width: 84px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.reminder-table-dow {
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
}
.reminder-table-offset {
  font-size: 11px;
  color: var(--green-dd);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.reminder-table-date {
  width: 130px;
  color: var(--slate);
  font-variant-numeric: tabular-nums;
}
.reminder-table-channels {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.channel-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--green-xl);
  border: 1px solid var(--border-g);
  color: var(--green-dd);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ---- Modal dialog ---- */
.reminder-modal {
  border: none;
  border-radius: 16px;
  padding: 0;
  max-width: min(820px, calc(100vw - 32px));
  width: 820px;
  max-height: calc(100vh - 48px);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28), 0 2px 8px rgba(15, 23, 42, 0.12);
  background: #fff;
  color: var(--ink);
  overflow: hidden;
}
.reminder-modal[open] {
  display: flex;
  flex-direction: column;
  animation: modalPop 160ms var(--ease);
}
.reminder-modal::backdrop {
  background: rgba(15, 31, 26, 0.55);
  backdrop-filter: blur(3px);
}
@keyframes modalPop {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}

.reminder-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}
.reminder-modal-eyebrow {
  margin: 0 0 2px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
}
.reminder-modal-title {
  margin: 0;
  font-family: var(--ff-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.reminder-modal-close {
  background: transparent;
  border: 1px solid transparent;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 24px;
  line-height: 1;
  color: var(--mid);
  cursor: pointer;
  transition: background .12s var(--ease), color .12s var(--ease);
}
.reminder-modal-close:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--ink);
}

.reminder-modal-body {
  padding: 20px 22px;
  overflow-y: auto;
}

.reminder-modal-footer {
  display: flex;
  justify-content: flex-end;
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}

.reminder-week-labels,
.reminder-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.reminder-week-labels {
  margin-bottom: 4px;
}
.reminder-week-label {
  text-align: center;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 4px 0;
}

.reminder-cell {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 9px;
  min-height: 96px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color .15s var(--ease), background .15s var(--ease);
  position: relative;
}
.reminder-cell-empty {
  background: transparent;
  border: 1px dashed rgba(229, 229, 229, 0.6);
  min-height: 96px;
}

.reminder-cell:hover:not(.reminder-cell-launch):not(.reminder-cell-empty) {
  border-color: var(--mid);
}

.reminder-cell-active {
  border-color: var(--green);
  background: var(--green-xl);
  box-shadow: 0 2px 8px rgba(84, 206, 151, 0.12);
}

.reminder-cell-launch {
  background: linear-gradient(180deg, var(--green) 0%, var(--green-d) 100%);
  border-color: var(--green-d);
  color: #fff;
  box-shadow: 0 4px 16px rgba(84, 206, 151, 0.35);
}
.reminder-cell-launch .reminder-cell-day,
.reminder-cell-launch .reminder-cell-month { color: #fff; }

.reminder-cell-head {
  display: flex;
  align-items: baseline;
  gap: 4px;
  line-height: 1;
}
.reminder-cell-day {
  font-family: var(--ff-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.reminder-cell-month {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--mid);
  font-weight: 600;
}

.reminder-cell-launch-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  align-self: flex-start;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-top: auto;
}

/* Channel chips inside a date cell */
.reminder-channels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  margin-top: auto;
}
.channel-chip {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--mid);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 4px 6px;
  border-radius: 6px;
  cursor: pointer;
  transition: background .12s var(--ease), color .12s var(--ease), border-color .12s var(--ease), transform .08s var(--ease);
  font-family: var(--ff-body);
  text-align: center;
  line-height: 1.2;
  width: 100%;
}
.channel-chip:hover {
  border-color: var(--green);
  color: var(--green-dd);
}
.channel-chip:active { transform: translateY(1px); }
.channel-chip-on {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  box-shadow: 0 1px 4px rgba(84, 206, 151, 0.35);
}
.channel-chip-on:hover {
  background: var(--green-d);
  border-color: var(--green-d);
  color: #fff;
}

@media (max-width: 720px) {
  .reminder-week-labels,
  .reminder-grid { gap: 4px; }
  .reminder-cell { min-height: 80px; padding: 6px; }
  .reminder-cell-day { font-size: 17px; }
  .channel-chip { font-size: 9px; padding: 3px 4px; }
  .reminder-summary { flex-direction: column; align-items: flex-start; }
  .reminder-summary-note { text-align: left; }
}

/* ---- Completion ribbon (100% celebration) ---- */
.completion-ribbon {
  position: relative;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 22px 28px;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #0f1f1a 0%, #134937 45%, #1b7a5a 100%);
  border: 1px solid rgba(84, 206, 151, 0.3);
  border-radius: 16px;
  color: #fff;
  box-shadow: 0 20px 48px rgba(15, 31, 26, 0.22),
              0 4px 12px rgba(84, 206, 151, 0.18),
              0 1px 0 rgba(255, 255, 255, 0.06) inset;
  overflow: hidden;
}
.completion-ribbon::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 85% 12%, rgba(255, 255, 255, 0.16) 0%, transparent 45%),
    radial-gradient(circle at 18% 110%, rgba(84, 206, 151, 0.32) 0%, transparent 55%);
  z-index: 0;
}
.completion-ribbon > * { position: relative; z-index: 1; }

.completion-ribbon-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(84, 206, 151, 0.18);
}

.completion-ribbon-body {
  flex: 1 1 auto;
  min-width: 0;
}

.completion-ribbon-eyebrow {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}

.completion-ribbon-headline {
  margin: 0;
  font-family: var(--ff-display);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.15;
  color: #fff;
}

.completion-ribbon-sub {
  margin: 6px 0 0;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.55;
  max-width: 56ch;
}
.completion-ribbon-sub strong {
  color: #fff;
  font-weight: 600;
}

.completion-ribbon-stat {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding-left: 22px;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  line-height: 1;
}

.completion-ribbon-stat-num {
  font-family: var(--ff-display);
  font-size: 44px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: #fff;
  white-space: nowrap;
}
.completion-ribbon-stat-pct {
  font-size: 22px;
  color: rgba(255, 255, 255, 0.6);
  margin-left: 2px;
}
.completion-ribbon-stat-label {
  margin-top: 6px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
}

@media (max-width: 760px) {
  .completion-ribbon {
    flex-wrap: wrap;
    gap: 14px 18px;
    padding: 20px 22px;
  }
  .completion-ribbon-body { flex: 1 1 100%; order: 3; }
  .completion-ribbon-stat {
    padding-left: 0;
    border-left: none;
    margin-left: auto;
  }
  .completion-ribbon-headline { font-size: 22px; }
  .completion-ribbon-stat-num { font-size: 36px; }
}

/* ---- SLA breach ribbon ---- */
.sla-ribbon {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  margin-bottom: 24px;
  background: linear-gradient(180deg, #fef2f2 0%, #fee2e2 100%);
  border: 1px solid #fecaca;
  border-left: 4px solid #be3144;
  border-radius: 10px;
  color: #7f1d1d;
  font-size: 14px;
  line-height: 1.5;
  box-shadow: 0 2px 8px rgba(190, 49, 68, 0.08);
}
.sla-ribbon-icon {
  display: inline-flex;
  flex-shrink: 0;
  color: #be3144;
  margin-top: 1px;
}
.sla-ribbon-text { min-width: 0; }
.sla-ribbon-text strong {
  color: #7f1d1d;
  font-weight: 700;
  margin-right: 2px;
}

/* ---- Two-column layout (main + sticky sidebar) ---- */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 32px;
  align-items: start;
}

.layout-main { min-width: 0; }

.layout-sidebar {
  position: sticky;
  top: 24px;
  align-self: start;
}

/* ---- Header ---- */
.app-header {
  margin-bottom: 32px;
}

.app-title-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 18px;
}

.app-title {
  font-family: var(--ff-display);
  font-size: 72px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1;
  margin: 0;
  color: var(--ink);
}

.app-tagline {
  font-family: var(--ff-body);
  font-size: 15px;
  font-weight: 400;
  color: var(--mid);
  line-height: 1.4;
  max-width: 360px;
}

.customer-meta {
  font-family: var(--ff-display);
  font-size: 26px;
  font-weight: 500;
  color: var(--slate);
  margin: 14px 0 22px;
  letter-spacing: -0.015em;
  line-height: 1.25;
}
.customer-meta strong {
  color: var(--ink);
  font-weight: 600;
}

.launch-countdown { white-space: nowrap; }
.launch-countdown-pill {
  display: inline-block;
  font-family: var(--ff-body);
  font-size: 15px;
  font-weight: 600;
  color: #be3144;
  letter-spacing: 0;
}
.launch-countdown-past { color: var(--muted); }

/* ---- Readiness card (sidebar) ---- */
.readiness {
  padding: 22px 24px;
  border: 1px solid var(--border-g);
  border-radius: 14px;
  background: var(--green-xl);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.04);
}

.readiness-label {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--green-dd);
}

.readiness-percent {
  font-family: var(--ff-display);
  font-size: 44px;
  font-weight: 600;
  color: var(--green-dd);
  margin: 6px 0 0;
  letter-spacing: -0.02em;
  line-height: 1;
}

.readiness-text {
  margin: 8px 0 14px;
  font-size: 13.5px;
  color: var(--slate);
}
.readiness-text strong {
  color: var(--green-dd);
  font-weight: 600;
}

.progress-bar {
  height: 8px;
  background: rgba(84, 206, 151, 0.15);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green) 0%, var(--green-d) 100%);
  border-radius: 999px;
  transition: width 280ms var(--ease);
}

.readiness-count {
  margin: 12px 0 0;
  color: var(--mid);
  font-size: 13px;
}

/* ---- Sidebar checklist (ruled note) ---- */
.checklist-card {
  margin-top: 16px;
  padding: 20px 22px;
  background: #fffdf7;
  border: 1px solid #ede4cf;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.03);
  position: relative;
  overflow: hidden;
}
/* Subtle red margin line, like a paper notebook */
.checklist-card::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 14px;
  width: 1px;
  background: rgba(190, 49, 68, 0.22);
}

.checklist-title {
  font-family: var(--ff-display);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate);
  margin: 0 0 2px;
  padding-left: 14px;
}

.checklist-pending {
  margin: 0 0 10px;
  padding-left: 14px;
  font-size: 11.5px;
  font-weight: 600;
  color: #be3144;
  letter-spacing: 0.02em;
}
.checklist-pending-done {
  color: var(--green-dd);
}

.checklist {
  list-style: none;
  margin: 0;
  padding: 0 0 0 14px;
  counter-reset: none;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 0;
  font-size: 13px;
  color: var(--slate);
  border-bottom: 1px dashed rgba(154, 154, 154, 0.28);
  line-height: 1.35;
}
.checklist-item:last-child { border-bottom: none; }

.checklist-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--muted);
  border-radius: 4px;
  background: #fff;
  color: #fff;
  transition: background 150ms var(--ease), border-color 150ms var(--ease);
}

.checklist-num {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  flex-shrink: 0;
}

.checklist-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.checklist-item-done .checklist-box {
  background: var(--green);
  border-color: var(--green);
}
.checklist-item-done .checklist-text {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: rgba(154, 154, 154, 0.6);
}
.checklist-item-done .checklist-num { color: var(--muted); }

/* ---- Tabs ---- */
.tabs {
  display: flex;
  gap: 2px;
  margin: 0 0 22px;
  border-bottom: 1px solid var(--border);
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 20px;
  text-decoration: none;
  color: var(--mid);
  font-family: var(--ff-body);
  font-weight: 500;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-size: 17px;
  transition: color .15s var(--ease), border-color .15s var(--ease);
  cursor: pointer;
}
.tab:hover { color: var(--ink); }

.tab-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--mid);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}

.tab-label { line-height: 1; }

.tab-lock {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  margin-left: 2px;
}
.tab-lock svg { width: 16px; height: 16px; }

.tab-active {
  color: var(--green-dd);
  border-bottom-color: var(--green);
  font-weight: 600;
}
.tab-active .tab-number {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

.tab-locked {
  color: var(--muted);
  cursor: not-allowed;
}
.tab-locked:hover { color: var(--muted); }
.tab-locked .tab-number {
  background: var(--bg-alt);
  color: var(--muted);
  border-color: var(--border);
}

.phase-panel { margin-top: 8px; }

/* ---- Section cards ---- */
.sections-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.section-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color 180ms var(--ease), background 180ms var(--ease);
}

.section-card-progress {
  border-color: var(--amber-bd);
  background: #fffbeb;
}

.section-card-completed {
  border-color: var(--border-g);
  background: var(--green-xl);
}

.section-summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  transition: background 120ms var(--ease);
}
.section-summary:hover { background: rgba(0, 0, 0, 0.015); }
.section-summary::-webkit-details-marker { display: none; }

.section-summary-left { flex: 1; min-width: 0; }

.section-title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 10px;
  letter-spacing: -0.005em;
}

.section-position {
  color: var(--muted);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  letter-spacing: 0.04em;
}

.section-description {
  margin: 0;
  color: var(--mid);
  font-size: 13.5px;
  line-height: 1.5;
}

.section-summary-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* ---- Status badge ---- */
.badge {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid transparent;
}
.badge-pending {
  background: var(--bg-alt);
  color: var(--slate);
  border-color: var(--border);
}
.badge-progress {
  background: var(--amber-bg);
  color: var(--amber);
  border-color: var(--amber-bd);
}
.badge-completed {
  background: var(--green-l);
  color: var(--green-dd);
  border-color: var(--border-g);
}

.chevron {
  color: var(--muted);
  transition: transform 180ms var(--ease);
}
details[open] .chevron { transform: rotate(180deg); }

/* ---- Section body ---- */
.section-body {
  padding: 16px 22px 22px;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.55);
}
.section-card-completed .section-body { border-top-color: var(--border-g); }
.section-card-progress .section-body  { border-top-color: var(--amber-bd); }

.section-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
}

/* ---- Form fields ---- */
.field { display: flex; flex-direction: column; }
.field label {
  font-size: 11px;
  font-weight: 600;
  color: var(--mid);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.required-mark {
  color: #be3144;
  margin-left: 2px;
  font-weight: 700;
}

.optional-mark {
  color: var(--muted);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: 11px;
  margin-left: 4px;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="number"],
.field input[type="date"],
.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  background: #fff;
  color: var(--ink);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.field textarea {
  resize: vertical;
  min-height: 76px;
  line-height: 1.5;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(84, 206, 151, 0.18);
}

.field.file-upload-placeholder { grid-column: 1 / -1; }
.field.field-notes-start { grid-column-start: 1; }

/* Multi-select checkbox group */
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  padding: 6px 0;
}
.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  color: var(--slate);
  background: #fff;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  transition: border-color .15s var(--ease), background .15s var(--ease), color .15s var(--ease);
}
.checkbox-row:hover { border-color: var(--mid); }
.checkbox-row input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--green);
  cursor: pointer;
  margin: 0;
}
.checkbox-row:has(input:checked) {
  background: var(--green-xl);
  border-color: var(--green);
  color: var(--green-dd);
}
.upload-box {
  padding: 16px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--mid);
  font-size: 13px;
  background: var(--bg-alt);
}

.section-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 8px;
  font: inherit;
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background .2s var(--ease), border-color .2s var(--ease), transform .1s var(--ease), box-shadow .2s var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn-secondary {
  background: #fff;
  color: var(--slate);
  border-color: var(--border);
}
.btn-secondary:hover {
  border-color: var(--mid);
  color: var(--ink);
}

.btn-complete {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
  box-shadow: 0 4px 16px rgba(84, 206, 151, 0.25);
}
.btn-complete:hover {
  background: var(--green-d);
  border-color: var(--green-d);
}

.btn-undo {
  background: #fff;
  color: var(--green-dd);
  border-color: var(--border-g);
}
.btn-undo:hover {
  background: var(--green-xl);
  border-color: var(--green);
}

.inline-form { margin: 0; }

.section-actions-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}
/* Chat trigger sits on the LEFT of the action row, buttons stay on the right */
.section-actions-row .chat-trigger {
  margin-right: auto;
}

/* ---- Placeholder cards (Launch / Reports phases) ---- */
.placeholder-card {
  text-align: center;
  padding: 72px 24px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: var(--bg);
  color: var(--mid);
}
.placeholder-card h2 {
  font-family: var(--ff-display);
  color: var(--ink);
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 600;
}
.placeholder-card p { margin: 0; font-size: 14px; }

/* ---- Responsive ---- */
@media (max-width: 960px) {
  .layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .layout-sidebar {
    position: static;
    order: -1;
  }
}

@media (max-width: 640px) {
  .app-shell { padding: 28px 16px 64px; }
  .app-title { font-size: 48px; }
  .app-title-row { gap: 10px; }
  .app-tagline { font-size: 13.5px; }
  .customer-meta { font-size: 20px; }
  .section-form { grid-template-columns: 1fr; }
  .section-summary { flex-direction: column; gap: 12px; align-items: stretch; }
  .section-summary-right { justify-content: space-between; }
  .tabs { overflow-x: auto; }
  .tab { white-space: nowrap; }
}

/* ============================================================
   Launch Engine presentation (/present) — elegant, on-brand
   walkthrough of the 2 chapters / 5 phases. Plum + mint, serif.
   ============================================================ */
.le-body {
  margin: 0;
  font-family: var(--ff-body);
  color: var(--ink);
  background:
    radial-gradient(120% 70% at 50% -10%, #f4e9f1 0%, rgba(244,233,241,0) 55%),
    linear-gradient(180deg, #fbf8fb 0%, #f7f9f8 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
.le-shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 64px 24px 96px;
}

/* Hero */
.le-hero { text-align: center; max-width: 760px; margin: 0 auto 56px; }
.le-eyebrow {
  margin: 0 0 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #843f72;
}
.le-title {
  margin: 0;
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: clamp(46px, 8vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, #4f1d3f 0%, #843f72 60%, #2ead78 130%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.le-lede {
  margin: 22px 0 0;
  font-family: var(--ff-display);
  font-size: clamp(20px, 3vw, 26px);
  font-style: italic;
  color: var(--slate);
}
.le-intro {
  margin: 16px auto 0;
  max-width: 640px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--mid);
}
.le-intro strong { color: #4f1d3f; font-weight: 600; }
.le-summary {
  margin: 28px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 10px 20px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border-g, #e4d3df);
  box-shadow: 0 6px 22px rgba(79,29,63,0.07);
  font-size: 13.5px;
  color: var(--slate);
}
.le-summary strong { color: #4f1d3f; font-weight: 700; }
.le-summary-dot { width: 4px; height: 4px; border-radius: 50%; background: #d6c2cf; }

/* Journey */
.le-journey { display: flex; flex-direction: column; align-items: center; }
.le-chapter { width: 100%; }
.le-chapter-head { text-align: center; margin: 0 0 26px; }
.le-chapter-index {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #b58aa6;
  margin-bottom: 6px;
}
.le-chapter-name {
  margin: 0;
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: clamp(28px, 4vw, 38px);
  color: #4f1d3f;
  letter-spacing: -0.01em;
}
.le-chapter-tagline { margin: 6px 0 0; font-size: 15px; color: var(--mid); }

.le-phases {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 8px 0;
}
.le-phase-wrap { display: flex; align-items: center; }

.le-phase {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 230px;
  min-height: 188px;
  padding: 22px 22px 18px;
  background: #fff;
  border: 1px solid #ece2e9;
  border-radius: 18px;
  box-shadow: 0 8px 28px rgba(79,29,63,0.06);
  cursor: pointer;
  text-align: left;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), border-color 0.18s var(--ease);
}
.le-phase:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 44px rgba(79,29,63,0.14);
  border-color: #dcc6d6;
}
.le-phase-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 18px;
  color: #fff;
  margin-bottom: 14px;
  background: linear-gradient(135deg, #4f1d3f, #843f72);
  box-shadow: 0 6px 16px rgba(79,29,63,0.28);
}
.le-phase-name {
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 21px;
  color: var(--ink);
  margin-bottom: 6px;
}
.le-phase-blurb { font-size: 13.5px; line-height: 1.5; color: var(--mid); flex: 1; }
.le-phase-cue {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: #843f72;
}
.le-phase:hover .le-phase-cue { color: #4f1d3f; }

/* Onboarding chapter phases lean mint; Programs lean plum (set above). */
.le-phase-setup .le-phase-num,
.le-phase-data .le-phase-num,
.le-modal-num.le-phase-setup,
.le-modal-num.le-phase-data {
  background: linear-gradient(135deg, #1b7a5a, #2ead78);
  box-shadow: 0 6px 16px rgba(27,122,90,0.28);
}
.le-phase-setup .le-phase-cue,
.le-phase-data .le-phase-cue { color: #1b7a5a; }

.le-arrow { display: inline-flex; color: #cdbac6; margin: 0 10px; flex: none; }

/* Bridge between the two chapters */
.le-chapter-bridge {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 14px 0;
}
.le-chapter-bridge-line { width: 2px; height: 26px; background: linear-gradient(#dcc6d6, #cdbac6); }
.le-chapter-bridge-dot { width: 9px; height: 9px; border-radius: 50%; background: #843f72; margin: 3px 0; }

/* Phase modal */
.le-modal {
  width: min(560px, 92vw);
  border: 0;
  border-radius: 22px;
  padding: 0;
  background: #fff;
  box-shadow: 0 40px 100px rgba(40,12,32,0.4);
  overflow: hidden;
}
.le-modal::backdrop { background: rgba(50,16,40,0.5); backdrop-filter: blur(2px); }
.le-modal[open] { animation: le-modal-in 0.26s var(--ease); }
@keyframes le-modal-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
.le-modal-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 22px 16px;
  border-bottom: 1px solid #f0e8ee;
}
.le-modal-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 13px; flex: none;
  font-family: var(--ff-display); font-weight: 600; font-size: 20px; color: #fff;
  background: linear-gradient(135deg, #4f1d3f, #843f72);
}
.le-modal-head-text { flex: 1; min-width: 0; }
.le-modal-eyebrow {
  margin: 0; font-size: 11px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: #b58aa6;
}
.le-modal-title { margin: 2px 0 0; font-family: var(--ff-display); font-weight: 600; font-size: 24px; color: var(--ink); }
.le-modal-close {
  border: 0; background: transparent; font-size: 26px; line-height: 1;
  color: #b9a6b3; cursor: pointer; flex: none; align-self: flex-start;
}
.le-modal-close:hover { color: #4f1d3f; }
.le-modal-blurb { margin: 0; padding: 16px 22px 4px; font-size: 15px; line-height: 1.6; color: var(--slate); }
.le-modal-split { display: flex; gap: 12px; padding: 14px 22px 4px; flex-wrap: wrap; }
.le-modal-col { flex: 1 1 200px; padding: 14px 16px; border-radius: 13px; }
.le-modal-col p:last-child { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--slate); }
.le-modal-col-label { margin: 0 0 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.le-modal-we { background: #f6eef3; }
.le-modal-we .le-modal-col-label { color: #843f72; }
.le-modal-you { background: #e9f7f0; }
.le-modal-you .le-modal-col-label { color: #1b7a5a; }
.le-modal-items { padding: 16px 22px 24px; }
.le-modal-items-label { margin: 0 0 10px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.le-modal-items ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.le-modal-items li { display: flex; align-items: flex-start; gap: 9px; font-size: 14px; color: var(--slate); }
.le-modal-items li svg { color: #2ead78; margin-top: 3px; flex: none; }

/* Closing */
.le-foot {
  margin: 64px auto 0;
  max-width: 680px;
  text-align: center;
  padding: 36px 28px;
  border-radius: 22px;
  background: linear-gradient(135deg, #4f1d3f, #6a2a59 60%, #843f72);
  color: #fdf3fa;
  box-shadow: 0 24px 60px rgba(79,29,63,0.3);
}
.le-foot-title { margin: 0; font-family: var(--ff-display); font-weight: 600; font-size: clamp(22px, 3vw, 28px); color: #fff; }
.le-foot-text { margin: 12px auto 0; max-width: 560px; font-size: 15px; line-height: 1.7; color: rgba(255,255,255,0.82); }
.le-foot-back {
  display: inline-block; margin-top: 22px; padding: 11px 22px;
  background: rgba(255,255,255,0.14); color: #fff; border: 1px solid rgba(255,255,255,0.25);
  border-radius: 10px; text-decoration: none; font-weight: 600; font-size: 14px;
  transition: background 0.15s ease;
}
.le-foot-back:hover { background: rgba(255,255,255,0.24); }

@media (max-width: 760px) {
  .le-phase { width: 100%; }
  .le-phase-wrap { width: 100%; flex-direction: column; }
  .le-arrow { transform: rotate(90deg); margin: 8px 0; }
}

/* "Present Launch Engine" link in the welcome About card. */
.welcome-card-foot-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.welcome-card-present {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: #843f72;
  text-decoration: none;
}
.welcome-card-present svg { color: #843f72; }
.welcome-card-present:hover { color: #4f1d3f; }

/* ============================================================
   Beyond Work — Compose Email tab
   ============================================================ */
.ce-shell { display: block; }

/* Running cloud-spend counter */
.ce-costbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  margin: 0 0 20px;
  border-radius: 14px;
  background: linear-gradient(120deg, #f6eef3, #efe6ed);
  border: 1px solid #e6d6e1;
}
.ce-cost-label { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: #843f72; }
.ce-cost-amount { font-family: var(--ff-display); font-weight: 700; font-size: 26px; color: #4f1d3f; font-variant-numeric: tabular-nums; }

/* Vertical Generate / History layout */
.ce-layout { display: flex; gap: 22px; align-items: flex-start; }
.ce-vnav { display: flex; flex-direction: column; gap: 4px; width: 168px; flex: none; }
.ce-vtab {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 14px; border: 1px solid transparent; border-radius: 11px;
  background: transparent; color: var(--mid); cursor: pointer;
  font-size: 14px; font-weight: 600; text-align: left; width: 100%;
  transition: background 0.14s ease, color 0.14s ease;
}
.ce-vtab:hover { color: var(--ink); background: var(--bg-alt, #f5f3f5); }
.ce-vtab-active { background: #fff; color: #4f1d3f; border-color: #e6d6e1; box-shadow: var(--shadow-sm, 0 1px 2px rgba(0,0,0,.05)); }
.ce-vtab svg { color: #843f72; flex: none; }
.ce-vtab-count {
  margin-left: auto; font-size: 11px; font-weight: 700;
  background: #efe1ea; color: #843f72; border-radius: 999px; padding: 1px 8px;
}
.ce-vbody { flex: 1; min-width: 0; }

.ce-intro { margin: 0 0 16px; font-size: 14px; line-height: 1.6; color: var(--mid); max-width: 640px; }

/* Chips */
.ce-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 18px; }
.ce-chip {
  display: flex; flex-direction: column; gap: 3px; align-items: flex-start;
  padding: 11px 16px; border: 1px solid var(--border); border-radius: 13px;
  background: #fff; cursor: pointer; text-align: left;
  transition: border-color 0.14s ease, box-shadow 0.14s ease, transform 0.14s ease;
}
.ce-chip:hover { border-color: #c9aabb; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(79,29,63,0.08); }
.ce-chip:disabled { opacity: 0.5; cursor: default; transform: none; }
.ce-chip-name { font-size: 14px; font-weight: 700; color: var(--ink); }
.ce-chip-desc { font-size: 12px; color: var(--muted); }
.ce-chip-active {
  border-color: #4f1d3f;
  background: linear-gradient(120deg, #4f1d3f, #843f72);
  box-shadow: 0 8px 20px rgba(79,29,63,0.25);
}
.ce-chip-active .ce-chip-name { color: #fff; }
.ce-chip-active .ce-chip-desc { color: rgba(255,255,255,0.78); }

/* Prompt / edit box */
.ce-prompt-wrap { margin: 0 0 16px; }
.ce-prompt-label { display: block; font-size: 12px; font-weight: 600; color: var(--mid); margin: 0 0 7px; }
.ce-label-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ce-label-row .ce-prompt-label { margin-bottom: 0; }
.ce-fetch-usage { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 7px; padding: 5px 11px; border: 1px solid var(--border, #e3e6ee); border-radius: 8px; background: #fff; color: var(--ink, #1f2430); font-family: var(--ff-body); font-size: 12px; font-weight: 600; cursor: pointer; transition: background .12s ease, border-color .12s ease; }
.ce-fetch-usage:hover { background: var(--bg-alt, #f6f7fb); border-color: #c8cedd; }
.ce-fetch-usage:disabled { opacity: .6; cursor: default; }
.ce-prompt-row { display: flex; gap: 10px; align-items: flex-end; }
.ce-prompt {
  flex: 1; resize: vertical; min-height: 46px;
  padding: 11px 13px; border: 1px solid var(--border); border-radius: 11px;
  font-family: var(--ff-body); font-size: 14px; color: var(--ink); background: #fff;
}
.ce-prompt:focus { outline: none; border-color: #843f72; box-shadow: 0 0 0 3px rgba(132,63,114,0.12); }
.ce-prompt:disabled { background: var(--bg-alt, #f5f3f5); }
.ce-gen-btn {
  flex: none; padding: 12px 20px; border: 0; border-radius: 11px;
  background: #4f1d3f; color: #fff; font-weight: 600; font-size: 14px; cursor: pointer;
  transition: opacity 0.14s ease;
}
.ce-gen-btn:hover { opacity: 0.92; }
.ce-gen-btn:disabled { opacity: 0.45; cursor: default; }

.ce-status { margin: 0 0 14px; font-size: 13px; color: #843f72; }
.ce-status-error { color: #b3253c; }

/* Account-level composer — the three grounding boxes */
.ce-ground {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 0 0 16px;
}
.ce-ground-field-wide { grid-column: 1 / -1; }
.ce-ground-box { width: 100%; }
@media (max-width: 860px) {
  .ce-ground { grid-template-columns: 1fr; }
}

/* All-emails table */
.bw-cell-arr { font-weight: 600; color: #6b1f4a; font-variant-numeric: tabular-nums; }

/* Generated email output */
.ce-output { border: 1px solid #e6d6e1; border-radius: 16px; overflow: hidden; background: #fff; box-shadow: 0 10px 30px rgba(79,29,63,0.07); }
.ce-output-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  padding: 16px 18px; border-bottom: 1px solid #f0e8ee; background: #faf6f9;
}
.ce-output-eyebrow { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #b58aa6; }
.ce-output-subject { margin: 3px 0 0; font-family: var(--ff-display); font-weight: 600; font-size: 19px; color: var(--ink); }
.ce-copy {
  flex: none; padding: 8px 16px; border: 1px solid #d8c2d1; border-radius: 9px;
  background: #fff; color: #4f1d3f; font-weight: 600; font-size: 13px; cursor: pointer;
  transition: background 0.14s ease;
}
.ce-copy:hover { background: #f6eef3; }
.ce-output-body,
.ce-hist-body {
  margin: 0; padding: 18px; white-space: pre-wrap; word-wrap: break-word;
  font-family: var(--ff-body); font-size: 14.5px; line-height: 1.65; color: var(--slate);
}

/* History */
.ce-hist-empty { font-size: 14px; color: var(--muted); padding: 8px 0; }
.ce-hist-list { display: flex; flex-direction: column; gap: 10px; }
.ce-hist-item { border: 1px solid var(--border); border-radius: 13px; overflow: hidden; background: #fff; }
.ce-hist-summary {
  display: flex; align-items: center; gap: 12px; padding: 13px 16px; cursor: pointer;
  list-style: none;
}
.ce-hist-summary::-webkit-details-marker { display: none; }
.ce-hist-kind {
  flex: none; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: #843f72; background: #f3e7ee; border-radius: 999px; padding: 3px 10px;
}
.ce-hist-subject { flex: 1; min-width: 0; font-weight: 600; color: var(--ink); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ce-hist-date { flex: none; font-size: 12px; color: var(--muted); }
.ce-hist-item[open] .ce-hist-summary { border-bottom: 1px solid #f0e8ee; }
.ce-hist-body { background: #fff; }

@media (max-width: 720px) {
  .ce-layout { flex-direction: column; }
  .ce-vnav { flex-direction: row; width: 100%; }
  .ce-vtab { flex: 1; justify-content: center; }
}

/* Persona selector inside Compose Email */
.ce-persona {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 16px;
  padding: 12px 14px;
  background: var(--bg-alt, #f7f9f8);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.ce-persona-label { font-size: 13px; font-weight: 600; color: var(--slate); }
.ce-persona-select {
  padding: 8px 12px; border: 1px solid var(--border); border-radius: 9px;
  background: #fff; font-family: var(--ff-body); font-size: 13.5px; color: var(--ink);
  min-width: 220px;
}
.ce-persona-select:focus { outline: none; border-color: #843f72; box-shadow: 0 0 0 3px rgba(132,63,114,0.12); }
.ce-persona-link { margin-left: auto; font-size: 12.5px; font-weight: 600; color: #843f72; text-decoration: none; }
.ce-persona-link:hover { color: #4f1d3f; }

/* Persona create/edit form + list extras */
.persona-form { max-width: 760px; margin: 0 auto; padding: 0 24px 48px; }
.persona-field { display: block; margin: 0 0 20px; }
.persona-field-label { display: block; margin: 0 0 7px; font-size: 14px; font-weight: 600; color: var(--ink); }
.persona-field-label small { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 400; color: var(--muted); }
.persona-field input[type="text"],
.persona-field textarea {
  width: 100%; box-sizing: border-box;
  padding: 11px 13px; border: 1px solid var(--border); border-radius: 11px;
  font-family: var(--ff-body); font-size: 14px; color: var(--ink); background: #fff;
}
.persona-field textarea { resize: vertical; line-height: 1.55; }
.persona-field input:focus,
.persona-field textarea:focus { outline: none; border-color: #843f72; box-shadow: 0 0 0 3px rgba(132,63,114,0.12); }
.persona-form-actions { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.persona-delete { display: inline-flex; }
.persona-delete button {
  padding: 11px 18px;
  border: 1px solid #f0c2cb;
  border-radius: 11px;
  background: #fff;
  color: #b3253c;
  font-family: var(--ff-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease;
}
.persona-delete button:hover { background: #fdf2f4; border-color: #e09aa7; }
.agent-persona-about { margin: 0 0 14px; font-size: 13px; line-height: 1.55; color: var(--mid); }

/* Prominent "composing…" loading state */
.ce-loading {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 4px 0 16px;
  padding: 20px 22px;
  border-radius: 16px;
  background: linear-gradient(120deg, #f6eef3, #efe6ed);
  border: 1px solid #e4d0de;
  box-shadow: 0 10px 30px rgba(79,29,63,0.08);
  animation: ce-loading-pulse 1.8s ease-in-out infinite;
}
@keyframes ce-loading-pulse {
  0%, 100% { box-shadow: 0 10px 30px rgba(79,29,63,0.08); }
  50%      { box-shadow: 0 14px 40px rgba(79,29,63,0.18); }
}
.ce-loading-spinner {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 3px solid #e0c8d6;
  border-top-color: #843f72;
  animation: ce-spin 0.8s linear infinite;
}
@keyframes ce-spin { to { transform: rotate(360deg); } }
.ce-loading-text { min-width: 0; }
.ce-loading-title {
  margin: 0;
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 17px;
  color: #4f1d3f;
}
.ce-loading-sub { margin: 3px 0 0; font-size: 13px; color: #8a5d79; }

/* [hidden] must win over the flex display above. */
.ce-loading[hidden] { display: none; }
trix-editor {
  border: 1px solid #bbb;
  border-radius: 3px;
  margin: 0;
  padding: 0.4em 0.6em;
  min-height: 5em;
  outline: none;
}

trix-toolbar * {
  box-sizing: border-box;
}
trix-toolbar .trix-button-row {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  overflow-x: auto;
}
trix-toolbar .trix-button-group {
  display: flex;
  margin-bottom: 10px;
  border: 1px solid #bbb;
  border-top-color: #ccc;
  border-bottom-color: #888;
  border-radius: 3px;
}
trix-toolbar .trix-button-group:not(:first-child) {
  margin-left: 1.5vw;
}
@media (max-width: 768px) {
  trix-toolbar .trix-button-group:not(:first-child) {
    margin-left: 0;
  }
}
trix-toolbar .trix-button-group-spacer {
  flex-grow: 1;
}
@media (max-width: 768px) {
  trix-toolbar .trix-button-group-spacer {
    display: none;
  }
}
trix-toolbar .trix-button {
  position: relative;
  float: left;
  color: rgba(0, 0, 0, 0.6);
  font-size: 0.75em;
  font-weight: 600;
  white-space: nowrap;
  padding: 0 0.5em;
  margin: 0;
  outline: none;
  border: none;
  border-bottom: 1px solid #ddd;
  border-radius: 0;
  background: transparent;
}
trix-toolbar .trix-button:not(:first-child) {
  border-left: 1px solid #ccc;
}
trix-toolbar .trix-button.trix-active {
  background: #cbeefa;
  color: rgb(0, 0, 0);
}
trix-toolbar .trix-button:not(:disabled) {
  cursor: pointer;
}
trix-toolbar .trix-button:disabled {
  color: rgba(0, 0, 0, 0.125);
}
@media (max-width: 768px) {
  trix-toolbar .trix-button {
    letter-spacing: -0.01em;
    padding: 0 0.3em;
  }
}
trix-toolbar .trix-button--icon {
  font-size: inherit;
  width: 2.6em;
  height: 1.6em;
  max-width: calc(0.8em + 4vw);
  text-indent: -9999px;
}
@media (max-width: 768px) {
  trix-toolbar .trix-button--icon {
    height: 2em;
    max-width: calc(0.8em + 3.5vw);
  }
}
trix-toolbar .trix-button--icon::before {
  display: inline-block;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  opacity: 0.6;
  content: "";
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}
@media (max-width: 768px) {
  trix-toolbar .trix-button--icon::before {
    right: 6%;
    left: 6%;
  }
}
trix-toolbar .trix-button--icon.trix-active::before {
  opacity: 1;
}
trix-toolbar .trix-button--icon:disabled::before {
  opacity: 0.125;
}
trix-toolbar .trix-button--icon-attach::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M10.5%2018V7.5c0-2.25%203-2.25%203%200V18c0%204.125-6%204.125-6%200V7.5c0-6.375%209-6.375%209%200V18%22%20stroke%3D%22%23000%22%20stroke-width%3D%222%22%20stroke-miterlimit%3D%2210%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E");
  top: 8%;
  bottom: 4%;
}
trix-toolbar .trix-button--icon-bold::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M6.522%2019.242a.5.5%200%200%201-.5-.5V5.35a.5.5%200%200%201%20.5-.5h5.783c1.347%200%202.46.345%203.24.982.783.64%201.216%201.562%201.216%202.683%200%201.13-.587%202.129-1.476%202.71a.35.35%200%200%200%20.049.613c1.259.56%202.101%201.742%202.101%203.22%200%201.282-.483%202.334-1.363%203.063-.876.726-2.132%201.12-3.66%201.12h-5.89ZM9.27%207.347v3.362h1.97c.766%200%201.347-.17%201.733-.464.38-.291.587-.716.587-1.27%200-.53-.183-.928-.513-1.198-.334-.273-.838-.43-1.505-.43H9.27Zm0%205.606v3.791h2.389c.832%200%201.448-.177%201.853-.497.399-.315.614-.786.614-1.423%200-.62-.22-1.077-.63-1.385-.418-.313-1.053-.486-1.905-.486H9.27Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-italic::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M9%205h6.5v2h-2.23l-2.31%2010H13v2H6v-2h2.461l2.306-10H9V5Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-link::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M18.948%205.258a4.337%204.337%200%200%200-6.108%200L11.217%206.87a.993.993%200%200%200%200%201.41c.392.39%201.027.39%201.418%200l1.623-1.613a2.323%202.323%200%200%201%203.271%200%202.29%202.29%200%200%201%200%203.251l-2.393%202.38a3.021%203.021%200%200%201-4.255%200l-.05-.049a1.007%201.007%200%200%200-1.418%200%20.993.993%200%200%200%200%201.41l.05.049a5.036%205.036%200%200%200%207.091%200l2.394-2.38a4.275%204.275%200%200%200%200-6.072Zm-13.683%2013.6a4.337%204.337%200%200%200%206.108%200l1.262-1.255a.993.993%200%200%200%200-1.41%201.007%201.007%200%200%200-1.418%200L9.954%2017.45a2.323%202.323%200%200%201-3.27%200%202.29%202.29%200%200%201%200-3.251l2.344-2.331a2.579%202.579%200%200%201%203.631%200c.392.39%201.027.39%201.419%200a.993.993%200%200%200%200-1.41%204.593%204.593%200%200%200-6.468%200l-2.345%202.33a4.275%204.275%200%200%200%200%206.072Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-strike::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M6%2014.986c.088%202.647%202.246%204.258%205.635%204.258%203.496%200%205.713-1.728%205.713-4.463%200-.275-.02-.536-.062-.781h-3.461c.398.293.573.654.573%201.123%200%201.035-1.074%201.787-2.646%201.787-1.563%200-2.773-.762-2.91-1.924H6ZM6.432%2010h3.763c-.632-.314-.914-.715-.914-1.273%200-1.045.977-1.739%202.432-1.739%201.475%200%202.52.723%202.617%201.914h2.764c-.05-2.548-2.11-4.238-5.39-4.238-3.145%200-5.392%201.719-5.392%204.316%200%20.363.04.703.12%201.02ZM4%2011a1%201%200%201%200%200%202h15a1%201%200%201%200%200-2H4Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-quote::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M4.581%208.471c.44-.5%201.056-.834%201.758-.995C8.074%207.17%209.201%207.822%2010%208.752c1.354%201.578%201.33%203.555.394%205.277-.941%201.731-2.788%203.163-4.988%203.56a.622.622%200%200%201-.653-.317c-.113-.205-.121-.49.16-.764.294-.286.567-.566.791-.835.222-.266.413-.54.524-.815.113-.28.156-.597.026-.908-.128-.303-.39-.524-.72-.69a3.02%203.02%200%200%201-1.674-2.7c0-.905.283-1.59.72-2.088Zm9.419%200c.44-.5%201.055-.834%201.758-.995%201.734-.306%202.862.346%203.66%201.276%201.355%201.578%201.33%203.555.395%205.277-.941%201.731-2.789%203.163-4.988%203.56a.622.622%200%200%201-.653-.317c-.113-.205-.122-.49.16-.764.294-.286.567-.566.791-.835.222-.266.412-.54.523-.815.114-.28.157-.597.026-.908-.127-.303-.39-.524-.72-.69a3.02%203.02%200%200%201-1.672-2.701c0-.905.283-1.59.72-2.088Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-heading-1::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21.5%207.5v-3h-12v3H14v13h3v-13h4.5ZM9%2013.5h3.5v-3h-10v3H6v7h3v-7Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-code::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3.293%2011.293a1%201%200%200%200%200%201.414l4%204a1%201%200%201%200%201.414-1.414L5.414%2012l3.293-3.293a1%201%200%200%200-1.414-1.414l-4%204Zm13.414%205.414%204-4a1%201%200%200%200%200-1.414l-4-4a1%201%200%201%200-1.414%201.414L18.586%2012l-3.293%203.293a1%201%200%200%200%201.414%201.414Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-bullet-list::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%207.5a1.5%201.5%200%201%200%200-3%201.5%201.5%200%200%200%200%203ZM8%206a1%201%200%200%201%201-1h11a1%201%200%201%201%200%202H9a1%201%200%200%201-1-1Zm1%205a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm0%206a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm-2.5-5a1.5%201.5%200%201%201-3%200%201.5%201.5%200%200%201%203%200ZM5%2019.5a1.5%201.5%200%201%200%200-3%201.5%201.5%200%200%200%200%203Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-number-list::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3%204h2v4H4V5H3V4Zm5%202a1%201%200%200%201%201-1h11a1%201%200%201%201%200%202H9a1%201%200%200%201-1-1Zm1%205a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm0%206a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm-3.5-7H6v1l-1.5%202H6v1H3v-1l1.667-2H3v-1h2.5ZM3%2017v-1h3v4H3v-1h2v-.5H4v-1h1V17H3Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-undo::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3%2014a1%201%200%200%200%201%201h6a1%201%200%201%200%200-2H6.257c2.247-2.764%205.151-3.668%207.579-3.264%202.589.432%204.739%202.356%205.174%205.405a1%201%200%200%200%201.98-.283c-.564-3.95-3.415-6.526-6.825-7.095C11.084%207.25%207.63%208.377%205%2011.39V8a1%201%200%200%200-2%200v6Zm2-1Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-redo::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21%2014a1%201%200%200%201-1%201h-6a1%201%200%201%201%200-2h3.743c-2.247-2.764-5.151-3.668-7.579-3.264-2.589.432-4.739%202.356-5.174%205.405a1%201%200%200%201-1.98-.283c.564-3.95%203.415-6.526%206.826-7.095%203.08-.513%206.534.614%209.164%203.626V8a1%201%200%201%201%202%200v6Zm-2-1Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-decrease-nesting-level::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%206a1%201%200%200%201%201-1h12a1%201%200%201%201%200%202H6a1%201%200%200%201-1-1Zm4%205a1%201%200%201%200%200%202h9a1%201%200%201%200%200-2H9Zm-3%206a1%201%200%201%200%200%202h12a1%201%200%201%200%200-2H6Zm-3.707-5.707a1%201%200%200%200%200%201.414l2%202a1%201%200%201%200%201.414-1.414L4.414%2012l1.293-1.293a1%201%200%200%200-1.414-1.414l-2%202Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-increase-nesting-level::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%206a1%201%200%200%201%201-1h12a1%201%200%201%201%200%202H6a1%201%200%200%201-1-1Zm4%205a1%201%200%201%200%200%202h9a1%201%200%201%200%200-2H9Zm-3%206a1%201%200%201%200%200%202h12a1%201%200%201%200%200-2H6Zm-2.293-2.293%202-2a1%201%200%200%200%200-1.414l-2-2a1%201%200%201%200-1.414%201.414L3.586%2012l-1.293%201.293a1%201%200%201%200%201.414%201.414Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-dialogs {
  position: relative;
}
trix-toolbar .trix-dialog {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  font-size: 0.75em;
  padding: 15px 10px;
  background: #fff;
  box-shadow: 0 0.3em 1em #ccc;
  border-top: 2px solid #888;
  border-radius: 5px;
  z-index: 5;
}
trix-toolbar .trix-input--dialog {
  font-size: inherit;
  font-weight: normal;
  padding: 0.5em 0.8em;
  margin: 0 10px 0 0;
  border-radius: 3px;
  border: 1px solid #bbb;
  background-color: #fff;
  box-shadow: none;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}
trix-toolbar .trix-input--dialog.validate:invalid {
  box-shadow: #F00 0px 0px 1.5px 1px;
}
trix-toolbar .trix-button--dialog {
  font-size: inherit;
  padding: 0.5em;
  border-bottom: none;
}
trix-toolbar .trix-dialog--link {
  max-width: 600px;
}
trix-toolbar .trix-dialog__link-fields {
  display: flex;
  align-items: baseline;
}
trix-toolbar .trix-dialog__link-fields .trix-input {
  flex: 1;
}
trix-toolbar .trix-dialog__link-fields .trix-button-group {
  flex: 0 0 content;
  margin: 0;
}

trix-editor [data-trix-mutable]:not(.attachment__caption-editor) {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

trix-editor [data-trix-mutable] ::-moz-selection, trix-editor [data-trix-mutable]::-moz-selection,
trix-editor [data-trix-cursor-target]::-moz-selection {
  background: none;
}
trix-editor [data-trix-mutable] ::selection, trix-editor [data-trix-mutable]::selection,
trix-editor [data-trix-cursor-target]::selection {
  background: none;
}

trix-editor [data-trix-mutable].attachment__caption-editor:focus::-moz-selection {
  background: highlight;
}
trix-editor [data-trix-mutable].attachment__caption-editor:focus::selection {
  background: highlight;
}

trix-editor [data-trix-mutable].attachment.attachment--file {
  box-shadow: 0 0 0 2px highlight;
  border-color: transparent;
}
trix-editor [data-trix-mutable].attachment img {
  box-shadow: 0 0 0 2px highlight;
}
trix-editor .attachment {
  position: relative;
}
trix-editor .attachment:hover {
  cursor: default;
}
trix-editor .attachment--preview .attachment__caption:hover {
  cursor: text;
}
trix-editor .attachment__progress {
  position: absolute;
  z-index: 1;
  height: 20px;
  top: calc(50% - 10px);
  left: 5%;
  width: 90%;
  opacity: 0.9;
  transition: opacity 200ms ease-in;
}
trix-editor .attachment__progress[value="100"] {
  opacity: 0;
}
trix-editor .attachment__caption-editor {
  display: inline-block;
  width: 100%;
  margin: 0;
  padding: 0;
  font-size: inherit;
  font-family: inherit;
  line-height: inherit;
  color: inherit;
  text-align: center;
  vertical-align: top;
  border: none;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}
trix-editor .attachment__toolbar {
  position: absolute;
  z-index: 1;
  top: -0.9em;
  left: 0;
  width: 100%;
  text-align: center;
}
trix-editor .trix-button-group {
  display: inline-flex;
}
trix-editor .trix-button {
  position: relative;
  float: left;
  color: #666;
  white-space: nowrap;
  font-size: 80%;
  padding: 0 0.8em;
  margin: 0;
  outline: none;
  border: none;
  border-radius: 0;
  background: transparent;
}
trix-editor .trix-button:not(:first-child) {
  border-left: 1px solid #ccc;
}
trix-editor .trix-button.trix-active {
  background: #cbeefa;
}
trix-editor .trix-button:not(:disabled) {
  cursor: pointer;
}
trix-editor .trix-button--remove {
  text-indent: -9999px;
  display: inline-block;
  padding: 0;
  outline: none;
  width: 1.8em;
  height: 1.8em;
  line-height: 1.8em;
  border-radius: 50%;
  background-color: #fff;
  border: 2px solid highlight;
  box-shadow: 1px 1px 6px rgba(0, 0, 0, 0.25);
}
trix-editor .trix-button--remove::before {
  display: inline-block;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  opacity: 0.7;
  content: "";
  background-image: url("data:image/svg+xml,%3Csvg%20height%3D%2224%22%20width%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M19%206.41%2017.59%205%2012%2010.59%206.41%205%205%206.41%2010.59%2012%205%2017.59%206.41%2019%2012%2013.41%2017.59%2019%2019%2017.59%2013.41%2012z%22%2F%3E%3Cpath%20d%3D%22M0%200h24v24H0z%22%20fill%3D%22none%22%2F%3E%3C%2Fsvg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 90%;
}
trix-editor .trix-button--remove:hover {
  border-color: #333;
}
trix-editor .trix-button--remove:hover::before {
  opacity: 1;
}
trix-editor .attachment__metadata-container {
  position: relative;
}
trix-editor .attachment__metadata {
  position: absolute;
  left: 50%;
  top: 2em;
  transform: translate(-50%, 0);
  max-width: 90%;
  padding: 0.1em 0.6em;
  font-size: 0.8em;
  color: #fff;
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 3px;
}
trix-editor .attachment__metadata .attachment__name {
  display: inline-block;
  max-width: 100%;
  vertical-align: bottom;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
trix-editor .attachment__metadata .attachment__size {
  margin-left: 0.2em;
  white-space: nowrap;
}

.trix-content {
  line-height: 1.5;
  overflow-wrap: break-word;
  word-break: break-word;
}
.trix-content * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
.trix-content h1 {
  font-size: 1.2em;
  line-height: 1.2;
}
.trix-content blockquote {
  border: 0 solid #ccc;
  border-left-width: 0.3em;
  margin-left: 0.3em;
  padding-left: 0.6em;
}
.trix-content [dir=rtl] blockquote,
.trix-content blockquote[dir=rtl] {
  border-width: 0;
  border-right-width: 0.3em;
  margin-right: 0.3em;
  padding-right: 0.6em;
}
.trix-content li {
  margin-left: 1em;
}
.trix-content [dir=rtl] li {
  margin-right: 1em;
}
.trix-content pre {
  display: inline-block;
  width: 100%;
  vertical-align: top;
  font-family: monospace;
  font-size: 0.9em;
  padding: 0.5em;
  white-space: pre;
  background-color: #eee;
  overflow-x: auto;
}
.trix-content img {
  max-width: 100%;
  height: auto;
}
.trix-content .attachment {
  display: inline-block;
  position: relative;
  max-width: 100%;
}
.trix-content .attachment a {
  color: inherit;
  text-decoration: none;
}
.trix-content .attachment a:hover, .trix-content .attachment a:visited:hover {
  color: inherit;
}
.trix-content .attachment__caption {
  text-align: center;
}
.trix-content .attachment__caption .attachment__name + .attachment__size::before {
  content: " •";
}
.trix-content .attachment--preview {
  width: 100%;
  text-align: center;
}
.trix-content .attachment--preview .attachment__caption {
  color: #666;
  font-size: 0.9em;
  line-height: 1.2;
}
.trix-content .attachment--file {
  color: #333;
  line-height: 1;
  margin: 0 2px 2px 2px;
  padding: 0.4em 1em;
  border: 1px solid #bbb;
  border-radius: 5px;
}
.trix-content .attachment-gallery {
  display: flex;
  flex-wrap: wrap;
  position: relative;
}
.trix-content .attachment-gallery .attachment {
  flex: 1 0 33%;
  padding: 0 0.5em;
  max-width: 33%;
}
.trix-content .attachment-gallery.attachment-gallery--2 .attachment, .trix-content .attachment-gallery.attachment-gallery--4 .attachment {
  flex-basis: 50%;
  max-width: 50%;
}
/* ============================================================
   Actions board (Trello-style) — board + list + card modal
   ============================================================ */
.ab-shell { max-width: 1380px; }
.welcome-actions-cta { text-decoration: none; }

.ab-controls {
  display: flex; align-items: center; justify-content: space-between;
  margin: 0 0 16px;
}
.ab-count { margin: 0; font-size: 13.5px; color: var(--mid); }

/* Board */
.ab-board {
  display: flex; gap: 14px; align-items: stretch;
  overflow-x: auto; padding-bottom: 18px;
}
.ab-board[hidden] { display: none; }
.ab-col {
  flex: 0 0 252px; width: 252px;
  display: flex; flex-direction: column;
  height: clamp(440px, 64vh, 700px);   /* one standard height for every lane */
  background: linear-gradient(180deg, #f4f1f3 0%, #efebee 100%);  /* monochrome plum-grey */
  border: 1px solid #e7e1e5;
  border-radius: 14px;
  padding: 10px;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.ab-col-over { background: #ece6ea; border-color: #c9bcc4; }
.ab-col-cards {
  flex: 1;
  overflow-y: auto;
  padding: 2px 2px 6px;
  scrollbar-width: thin;
  scrollbar-color: #d4cad0 transparent;
}
.ab-col-cards::-webkit-scrollbar { width: 6px; }
.ab-col-cards::-webkit-scrollbar-thumb { background: #d4cad0; border-radius: 3px; }
.ab-col-cards::-webkit-scrollbar-track { background: transparent; }
.ab-col-head { display: flex; align-items: center; gap: 7px; padding: 4px 4px 10px; }
.ab-col-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.ab-col-slate  .ab-col-dot { background: #64748b; }
.ab-col-blue   .ab-col-dot { background: #3b82f6; }
.ab-col-amber  .ab-col-dot { background: #d97706; }
.ab-col-red    .ab-col-dot { background: #dc2626; }
.ab-col-purple .ab-col-dot { background: #8b5cf6; }
.ab-col-green  .ab-col-dot { background: #16a34a; }
.ab-col-muted  .ab-col-dot { background: #b0b0b0; }
.ab-col-title { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--slate); flex: 1; }
.ab-col-count { font-size: 11px; font-weight: 700; color: var(--mid); background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; }
.ab-col-cards { display: flex; flex-direction: column; gap: 8px; min-height: 24px; }

.ab-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 11px 12px;
  cursor: grab;
  box-shadow: 0 1px 2px rgba(15,23,42,0.05);
  transition: box-shadow 0.12s ease, transform 0.12s ease;
}
.ab-card:hover { box-shadow: 0 6px 18px rgba(15,23,42,0.1); transform: translateY(-1px); }
.ab-card-dragging { opacity: 0.45; cursor: grabbing; }
.ab-card-title {
  margin: 0; font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;          /* ~1.5–2 lines, then “…” — full title in the modal */
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ab-card-meta { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.ab-card-due, .ab-card-comments {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; color: var(--mid);
}
.ab-overdue { color: #dc2626 !important; font-weight: 700; }
.ab-card-assignee {
  margin-left: auto;
  width: 22px; height: 22px; border-radius: 50%; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  background: #4f1d3f; color: #fff; font-size: 10.5px; font-weight: 700;
}

/* List view */
.ab-list[hidden] { display: none; }
.ab-row { cursor: pointer; }
.ab-pill {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.03em;
  text-transform: uppercase; border-radius: 999px; padding: 3px 10px;
  background: #eef0f2; color: var(--slate);
}
.ab-pill-blue   { background: #dbeafe; color: #1d4ed8; }
.ab-pill-amber  { background: #fef3c7; color: #b45309; }
.ab-pill-red    { background: #fee2e2; color: #b91c1c; }
.ab-pill-purple { background: #ede9fe; color: #6d28d9; }
.ab-pill-green  { background: #dcfce7; color: #15803d; }
.ab-pill-muted  { background: #f1f1f1; color: #8a8a8a; }

/* Agent filter tabs on the workbench (reuse the tier1-tab cards) */
.wb-agent-tabs { max-width: none; margin: 4px 0 20px; padding: 0; }

/* Renewal-window + sort filters (Workspaces, Tier-1, SMB) */
.list-filters {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
/* Dedicated filter row on the Workspaces page (keeps the tabs row uncramped) */
.workspace-filterbar {
  max-width: 1180px;
  margin: -6px auto 16px;
  padding: 0 24px;
  display: flex;
  justify-content: flex-end;
}
.workspace-filterbar .list-filters { flex-wrap: nowrap; }
.renewal-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.renewal-filter-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--mid, #6b6b6b);
  text-transform: uppercase;
  white-space: nowrap;
}
.renewal-filter-select {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink, #1a1a1a);
  background: #fff
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b6b6b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>")
    no-repeat right 10px center;
  border: 1px solid #e2e2e6;
  border-radius: 9px;
  padding: 7px 30px 7px 12px;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.renewal-filter-select:hover  { border-color: #cfcfd6; }
.renewal-filter-select:focus  { outline: none; border-color: #a855f7; box-shadow: 0 0 0 3px rgba(168,85,247,0.15); }

/* Right-side cluster on the Workspaces controls row */
.workspace-controls-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Priority pill — on cards and in the list view */
.ab-priority {
  display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; border-radius: 999px; padding: 2px 8px; margin: 6px 0 0;
  background: #eef0f2; color: var(--slate, #475569);
}
.ab-priority-red   { background: #fee2e2; color: #b91c1c; }
.ab-priority-amber { background: #fef3c7; color: #b45309; }
.ab-priority-slate { background: #eef0f2; color: #475569; }

/* Action modal */
.ab-modal {
  width: min(640px, 94vw);
  max-height: 88vh;
  border: 0; border-radius: 18px; padding: 0;
  background: #fff;
  box-shadow: 0 40px 100px rgba(20,20,30,0.4);
  overflow-y: auto;
}
.ab-modal::backdrop { background: rgba(25,20,28,0.5); backdrop-filter: blur(2px); }
.ab-modal-head {
  display: flex; align-items: flex-start; gap: 14px; justify-content: space-between;
  padding: 20px 20px 14px;
}
.ab-modal-head > div { flex: 1; min-width: 0; }
.ab-modal-eyebrow { margin: 0 0 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.ab-title-input {
  width: 100%; box-sizing: border-box;
  border: 1px solid transparent; border-radius: 9px; padding: 6px 8px; margin-left: -8px;
  font-family: var(--ff-display); font-weight: 600; font-size: 21px; color: var(--ink);
  background: transparent;
}
.ab-title-input:hover { border-color: var(--border); }
.ab-title-input:focus { outline: none; border-color: #843f72; background: #fff; }
.ab-modal-close { border: 0; background: transparent; font-size: 24px; line-height: 1; color: var(--muted); cursor: pointer; flex: none; }
.ab-modal-close:hover { color: var(--ink); }

.ab-form { padding: 0 0 4px; }
.ab-form-grid { display: flex; gap: 12px; flex-wrap: wrap; padding: 0 20px; }
.ab-field { display: flex; flex-direction: column; gap: 5px; flex: 1 1 150px; }
.ab-field > span { font-size: 12px; font-weight: 600; color: var(--mid); }
.ab-field select, .ab-field input[type="date"], .ab-field input[type="number"] {
  padding: 9px 11px; border: 1px solid var(--border); border-radius: 9px;
  font-family: var(--ff-body); font-size: 13.5px; color: var(--ink); background: #fff;
}
.ab-field-wide { flex-basis: 100%; }
.ab-textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px;
  font-family: var(--ff-body); font-size: 13.5px; line-height: 1.5; color: var(--ink);
  background: #fff; resize: vertical; min-height: 64px;
}
.ab-textarea:focus { outline: none; border-color: #843f72; }
.ab-field-desc { padding: 14px 20px 0; }
.ab-trix {
  min-height: 110px; border: 1px solid var(--border); border-radius: 11px;
  padding: 10px 12px; font-family: var(--ff-body); font-size: 14px; color: var(--ink);
}
.ab-trix:focus { outline: none; border-color: #843f72; box-shadow: 0 0 0 3px rgba(132,63,114,0.1); }
trix-toolbar .trix-button-group { border-color: var(--border); border-radius: 8px; overflow: hidden; }
trix-toolbar { margin-bottom: 6px; }
.ab-form-foot {
  display: flex; align-items: center; justify-content: flex-end; gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.ab-delete-link { margin-right: auto; font-size: 13px; font-weight: 600; color: #b3253c; text-decoration: none; }
.ab-delete-link:hover { text-decoration: underline; }

/* Comments */
.ab-comments-block { padding: 16px 20px 20px; background: #fafbfc; }
.ab-comments-eyebrow { margin: 0 0 10px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mid); }
.ab-comment-list { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ab-comment { display: flex; gap: 10px; align-items: flex-start; }
.ab-comment-avatar { flex: none; width: 28px; height: 28px; }
.ab-comment-body { flex: 1; min-width: 0; }
.ab-comment-head { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink); }
.ab-comment-time { color: var(--muted); font-size: 11.5px; }
.ab-comment-del { display: inline-flex; margin-left: auto; }
.ab-comment-del button { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 2px; }
.ab-comment-del button:hover { color: #b3253c; }
.ab-comment-text { margin: 3px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--slate); }
.ab-comments-empty { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.ab-comment-form { display: flex; gap: 10px; align-items: flex-end; }
.ab-comment-input {
  flex: 1; resize: none; min-height: 40px;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px;
  font-family: var(--ff-body); font-size: 13.5px; background: #fff;
}
.ab-comment-input:focus { outline: none; border-color: #843f72; box-shadow: 0 0 0 3px rgba(132,63,114,0.1); }

@media (max-width: 760px) {
  .ab-board { flex-direction: column; }
  .ab-col { width: 100%; flex-basis: auto; }
}

/* ============================================================
   Audit log (super admin)
   ============================================================ */
.audit-shell { max-width: 1380px; margin: 0 auto; padding: 0 24px 48px; }
.audit-filters {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 0 0 16px;
}
.audit-filters select, .audit-search {
  padding: 8px 12px; border: 1px solid var(--border); border-radius: 9px;
  font-family: var(--ff-body); font-size: 13.5px; background: #fff; color: var(--ink);
}
.audit-search { min-width: 230px; }
.audit-writes-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--slate); }
.audit-total { margin-left: auto; font-size: 13px; color: var(--muted); }

.audit-table tbody td { white-space: normal; font-size: 13px; vertical-align: top; }
.audit-when { white-space: nowrap !important; color: var(--mid); font-variant-numeric: tabular-nums; }
.audit-tz {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  vertical-align: 1px;
}
.audit-row-write { background: #fbf8fa; }
.audit-role {
  display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; border-radius: 999px; padding: 2px 8px; margin-right: 6px;
}
.audit-role-super_admin { background: #f3e7ee; color: #843f72; }
.audit-role-agent       { background: #e0f2ec; color: #1b7a5a; }
.audit-role-customer    { background: #e3edf8; color: #1d4ed8; }
.audit-role-guest       { background: #efefef; color: #8a8a8a; }
.audit-actor { font-weight: 600; color: var(--ink); }
.audit-summary { color: var(--slate); }
.audit-req code {
  font-size: 12px; color: var(--slate); word-break: break-all;
  background: transparent;
}
.audit-method { font-weight: 700; margin-right: 4px; }
.audit-method-get    { color: #6b7280; }
.audit-method-post   { color: #1d4ed8; }
.audit-method-patch,
.audit-method-put    { color: #b45309; }
.audit-method-delete { color: #b91c1c; }
.audit-status-bad { color: #b91c1c !important; }
.audit-ip { color: var(--muted); font-size: 12px !important; }
.audit-params summary { cursor: pointer; font-size: 11.5px; color: #843f72; margin-top: 3px; }
.audit-params pre {
  margin: 6px 0 0; padding: 10px 12px; max-width: 460px; max-height: 220px; overflow: auto;
  background: #f7f5f7; border: 1px solid var(--border); border-radius: 9px;
  font-size: 11.5px; line-height: 1.5; white-space: pre-wrap; word-break: break-all;
}
.audit-pager { display: flex; align-items: center; gap: 16px; justify-content: center; padding: 18px 0; color: var(--muted); font-size: 13px; }

/* Action-type marker — tiny square + quiet small-caps label under the title.
   Colours deliberately differ from the status column dots. */
.ab-type-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 2.5px;
  background: var(--type-color, var(--muted));
  flex: none;
}
.ab-card-account { margin: -2px 0 2px; font-size: 12px; font-weight: 600; color: var(--mid); }

/* Product Thinking ticket badges: estimate + risk */
.pt-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.pt-est { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--mid, #5b6273); background: var(--bg-alt, #f1f3f9); border: 1px solid var(--border, #e3e6ee); border-radius: 999px; padding: 2px 9px; }
.pt-risk { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; padding: 2px 9px; border-radius: 999px; }
.pt-risk-low  { background: #e7f6ee; color: #1f8a54; }
.pt-risk-mid  { background: #fef3e2; color: #b45309; }
.pt-risk-high { background: #fde8e8; color: #c0392b; }
.ab-card-desc { margin: 2px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--mid); }
.ab-card-attach { display: inline-flex; align-items: center; color: var(--mid); }
.ab-field-file { flex-basis: 100%; gap: 7px; margin-top: 2px; }
.ab-file {
  width: 100%; font-size: 13px; color: var(--mid); cursor: pointer;
  border: 1px dashed var(--border); border-radius: 9px; padding: 9px 12px; background: var(--bg-alt);
}
.ab-file::file-selector-button {
  margin-right: 12px; padding: 7px 14px; border: 1px solid var(--border); border-radius: 7px;
  background: #fff; color: var(--ink); font-family: var(--ff-body); font-weight: 600; font-size: 12.5px; cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
}
.ab-file::file-selector-button:hover { background: var(--bg-alt); border-color: #c8cedd; }
.ab-file-current { display: inline-flex; align-items: center; gap: 10px; color: var(--green-dd); font-weight: 600; font-size: 13px; text-decoration: none; }
.ab-file-thumb { width: 56px; height: 40px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }
.ab-field-hint { color: var(--muted); font-size: 11.5px; line-height: 1.4; }
.ab-card-type {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 5px 0 0;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Action modal: side-by-side layout — form left, comments rail right. */
.ab-modal-wide { width: min(980px, 96vw); }
.ab-modal-layout { display: flex; align-items: stretch; min-height: 480px; }
.ab-modal-main { flex: 1; min-width: 0; }
.ab-comments-side {
  flex: 0 0 320px;
  width: 320px;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
  max-height: 88vh;
}
.ab-comments-side #action-comments-,
.ab-comments-side .ab-comments { flex: 1; overflow-y: auto; min-height: 0; scrollbar-width: thin; }
.ab-comments-side .ab-comment-form { flex: none; flex-direction: column; align-items: stretch; gap: 8px; }
.ab-comments-side .ab-comment-form .btn { align-self: flex-end; }
.ab-modal-main .ab-form-foot { border-bottom: 0; }

@media (max-width: 860px) {
  .ab-modal-layout { flex-direction: column; }
  .ab-comments-side { flex-basis: auto; width: auto; border-left: 0; border-top: 1px solid var(--border); max-height: none; }
}

/* "Viewing as customer" impersonation banner */
.impersonate-bar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 9px 18px;
  background: linear-gradient(120deg, #4f1d3f, #6a2a59);
  color: #fdf3fa;
  font-size: 13px;
}
.impersonate-bar strong { color: #fff; }
.impersonate-bar-exit {
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.12);
  color: #fff;
  border-radius: 8px;
  padding: 5px 14px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.impersonate-bar-exit:hover { background: rgba(255,255,255,0.22); }
.welcome-card-link-row { display: flex; gap: 16px; flex-wrap: wrap; }

/* Modal close lives at the far right of the comments rail. */
.ab-comments-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 0 0 10px;
}
.ab-comments-head .ab-comments-eyebrow { margin: 0; }

/* ---- Danger zone (delete workspace — super admin only, edit page) ---- */
.agent-danger-card { border-color: #fecaca; }
.agent-danger-eyebrow { color: #b91c1c; }
.agent-danger-form {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}
.agent-danger-field { flex: 1 1 280px; }
.agent-danger-btn {
  padding: 10px 18px;
  border: 1px solid #b91c1c;
  border-radius: 8px;
  background: #dc2626;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.agent-danger-btn:hover:not(:disabled) { background: #b91c1c; }
.agent-danger-btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ===== Bulk CSV import — full-screen blocking overlay ===================== */
/* Freeze the page behind the overlay so nothing else can be clicked or
   scrolled while the import runs. */
body.is-importing { overflow: hidden; }

.import-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(20, 16, 24, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: import-overlay-fade 0.18s ease-out;
}
/* [hidden] must beat the flex display above. */
.import-overlay[hidden] { display: none; }
@keyframes import-overlay-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.import-overlay-card {
  width: min(420px, 100%);
  box-sizing: border-box;
  text-align: center;
  padding: 36px 32px 32px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid #e4d0de;
  box-shadow: 0 24px 70px rgba(20, 16, 24, 0.35);
  animation: import-overlay-pop 0.22s cubic-bezier(0.2, 0.8, 0.3, 1.1);
}
@keyframes import-overlay-pop {
  from { transform: translateY(10px) scale(0.96); opacity: 0; }
  to   { transform: translateY(0)    scale(1);    opacity: 1; }
}

.import-overlay-spinner {
  width: 52px;
  height: 52px;
  margin: 0 auto 22px;
  border-radius: 50%;
  border: 4px solid #e6f5ee;
  border-top-color: #2ead78;
  animation: ce-spin 0.8s linear infinite;
}

.import-overlay-title {
  margin: 0;
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 21px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.import-overlay-sub {
  margin: 8px auto 0;
  max-width: 30ch;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--mid);
}

/* ===================== HEGEL — matches the Launch Engine theme ============== */
.sa-nav-badge-ai { margin-left: auto; font-size: 9px; font-weight: 700; letter-spacing: 0.1em; padding: 1px 6px; border-radius: 999px; color: #fff; background: var(--green-d); }
.sa-nav-link-hegel .sa-nav-icon { color: var(--green-dd); }

.hegel { max-width: 940px; margin: 0 auto; padding-bottom: 44px; font-family: var(--ff-body); color: var(--ink); }

/* ---- Hero ---- */
.hegel-hero {
  position: relative; display: flex; align-items: center; gap: 22px;
  padding: 24px 26px; margin: 8px 0 18px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow-sm);
}
.hegel-face { flex: none; width: 78px; height: 78px; padding: 0; background: none; box-shadow: none; }
.hegel-portrait { display: block; width: 78px; height: 78px; border-radius: 50%; object-fit: cover; object-position: 50% 18%; border: 1px solid var(--border-g); box-shadow: var(--shadow-sm); }
.hegel-hero-text { flex: 1; }
.hegel-eyebrow { margin: 0 0 3px; font-family: var(--ff-display); font-style: italic; font-size: 15px; color: var(--green-dd); }
.hegel-title { margin: 0; font-family: var(--ff-display); font-weight: 600; font-size: 34px; line-height: 1.05; letter-spacing: -0.01em; color: var(--ink); }
.hegel-sub { margin: 8px 0 0; max-width: 580px; font-size: 13.5px; line-height: 1.55; color: var(--mid); }

.hegel-spend { position: absolute; top: 16px; right: 18px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--green-dd); background: var(--green-xl); border: 1px solid var(--border-g); cursor: default; transition: background .15s ease; }
.hegel-spend:hover { background: var(--green-l); }
.hegel-spend-spark { color: var(--green-d); font-size: 11px; }

/* ---- Control bar ---- */
.hegel-control { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 46px 14px 18px; margin-bottom: 16px; background: var(--bg); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-sm); }
.hegel-status { font-size: 13px; color: var(--mid); }
.hegel-status strong { color: var(--ink); font-weight: 600; }
.hegel-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #cfcfcf; margin-right: 8px; vertical-align: middle; }
.hegel-dot-on { background: var(--green-d); box-shadow: 0 0 0 3px var(--green-l); }
.hegel-dot-warn { background: var(--amber); }
.hegel-actions { display: flex; gap: 10px; }
.hegel-btn { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-family: var(--ff-body); font-size: 13px; font-weight: 600; padding: 9px 16px; border-radius: 8px; border: 1px solid transparent; transition: background .12s ease, color .12s ease, transform .08s ease, opacity .12s ease; }
.hegel-btn:active { transform: translateY(1px); }
.hegel-btn:disabled { opacity: .45; cursor: not-allowed; }
.hegel-btn-index { background: var(--bg); color: var(--ink); border-color: var(--border); }
.hegel-btn-index:hover:not(:disabled) { background: var(--bg-alt); border-color: #d6d6d6; }
.hegel-btn-insights { background: var(--green); color: #fff; border-color: var(--green); box-shadow: 0 4px 14px rgba(84,206,151,0.28); }
.hegel-btn-insights:hover:not(:disabled) { background: var(--green-d); border-color: var(--green-d); }
.hegel-btn-spinner { display: none; width: 13px; height: 13px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; animation: ce-spin .7s linear infinite; }
.hegel-btn.is-busy .hegel-btn-spinner { display: inline-block; }

.hegel-close { border: none; background: transparent; cursor: pointer; font-size: 19px; line-height: 1; color: var(--muted); width: 26px; height: 26px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; transition: background .12s ease, color .12s ease; }
.hegel-close:hover { background: var(--bg-alt); color: var(--ink); }
.hegel-control .hegel-close { position: absolute; top: 50%; right: 12px; transform: translateY(-50%); }

/* ---- Indexing overlay ---- */
.hegel-indexing { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; background: rgba(26,33,30,0.5); backdrop-filter: blur(4px); }
.hegel-indexing[hidden] { display: none; }
.hegel-indexing-card { text-align: center; padding: 34px 38px; background: var(--bg); border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 24px 60px rgba(15,23,42,0.22); width: min(420px, 92vw); }
.hegel-indexing-orb { width: 44px; height: 44px; margin: 0 auto 20px; border-radius: 50%; border: 3px solid var(--green-l); border-top-color: var(--green-d); animation: ce-spin .9s linear infinite; }
.hegel-indexing-title { margin: 0; font-family: var(--ff-display); font-weight: 600; font-size: 20px; color: var(--ink); }
.hegel-indexing-sub { margin: 8px auto 0; max-width: 34ch; font-size: 13px; line-height: 1.5; color: var(--mid); }

/* ---- Insight panel ---- */
.hegel-insight-panel { margin-bottom: 18px; padding: 22px 24px; background: var(--green-xl); border: 1px solid var(--border-g); border-radius: 16px; box-shadow: var(--shadow-sm); }
.hegel-insight-panel[hidden] { display: none; }
.hegel-insight-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border-g); }
.hegel-insight-spark { color: var(--green-d); font-size: 15px; }
.hegel-insight-title { margin: 0; font-family: var(--ff-display); font-weight: 600; font-size: 19px; color: var(--green-dd); }
.hegel-insight-at { margin-left: auto; font-size: 11.5px; color: var(--mid); }
.hegel-close-insight { margin-left: 8px; }

/* ---- Chat (tabs: Conversation / History) ---- */
.hegel-chat { background: var(--bg); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-sm); overflow: hidden; }
.hegel-tabs { display: flex; gap: 4px; padding: 8px 10px 0; border-bottom: 1px solid var(--border); background: var(--bg-alt); }
.hegel-tab { position: relative; font-family: var(--ff-body); font-size: 13.5px; font-weight: 600; color: var(--mid); background: transparent; border: none; padding: 10px 14px; cursor: pointer; border-radius: 8px 8px 0 0; }
.hegel-tab:hover { color: var(--ink); }
.hegel-tab-active { color: var(--green-dd); }
.hegel-tab-active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--green-d); border-radius: 2px; }
.hegel-tab-count { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 17px; padding: 0 5px; margin-left: 4px; font-size: 10.5px; font-weight: 700; border-radius: 999px; background: var(--green-l); color: var(--green-dd); }
.hegel-panel { display: flex; flex-direction: column; }
.hegel-panel[hidden] { display: none; }

/* Executive insights + Settings tabs */
.hegel-panel[data-panel="insights"] .hegel-insight-panel { margin: 16px; }
.hegel-insights-empty { margin: 0; padding: 32px 20px; text-align: center; color: var(--muted); font-size: 14px; }
.hegel-insights-foot { padding: 16px; border-top: 1px solid var(--border); }
.hegel-settings { display: flex; flex-direction: column; gap: 16px; padding: 20px; }
.hegel-settings-status { font-size: 14px; }

.hegel-conv-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.hegel-conv-title { flex: 1 1 auto; min-width: 0; font-size: 13px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hegel-conv-head .button_to { display: inline-flex; margin: 0; }
.hegel-conv-close { border: none; background: transparent; cursor: pointer; font-size: 19px; line-height: 1; color: var(--muted); width: 28px; height: 28px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; transition: background .12s ease, color .12s ease; }
.hegel-conv-close:hover { background: var(--bg-alt); color: var(--ink); }
.hegel-conv-actions { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.hegel-conv-new { display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px; border: 1px solid var(--border); background: #fff; border-radius: 8px; cursor: pointer; font-family: var(--ff-body); font-size: 12.5px; font-weight: 600; color: var(--ink); transition: background .12s ease, border-color .12s ease; }
.hegel-conv-new:hover { background: var(--bg-alt); border-color: #c8cedd; }
.hegel-conv-del, .hegel-history-del { border: none; background: transparent; cursor: pointer; color: var(--muted); width: 28px; height: 28px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; transition: background .12s ease, color .12s ease; }
.hegel-conv-del:hover, .hegel-history-del:hover { background: #fdecec; color: #c0392b; }

.hegel-thread { max-height: 500px; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.hegel-empty { text-align: center; padding: 24px 10px; margin: auto 0; }
.hegel-empty-title { margin: 0 0 16px; font-family: var(--ff-display); font-size: 18px; color: var(--ink); }
.hegel-suggestions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.hegel-chip { font-family: var(--ff-body); font-size: 12.5px; padding: 8px 13px; border-radius: 999px; border: 1px solid var(--border-g); background: var(--green-xl); color: var(--green-dd); cursor: pointer; transition: background .12s ease; }
.hegel-chip:hover { background: var(--green-l); }
.hegel-empty-hint { margin: 16px auto 0; max-width: 46ch; font-size: 12.5px; line-height: 1.5; color: var(--mid); }
.hegel-empty-hint strong { color: var(--green-dd); }
.hegel-msg { max-width: 88%; }
.hegel-msg-user { align-self: flex-end; }
.hegel-msg-user .hegel-md { background: var(--green); color: #fff; padding: 11px 15px; border-radius: 14px 14px 4px 14px; }
.hegel-msg-assistant { align-self: flex-start; }
.hegel-msg-assistant .hegel-md { background: var(--bg-alt); color: var(--ink); padding: 12px 16px; border-radius: 14px 14px 14px 4px; border: 1px solid var(--border); }
.hegel-err { color: #b91c1c; margin: 0; }

.hegel-ask { display: flex; gap: 10px; align-items: flex-end; padding: 13px; border-top: 1px solid var(--border); background: var(--bg); }
.hegel-ask-input { flex: 1; resize: none; font-family: var(--ff-body); font-size: 14px; line-height: 1.5; padding: 10px 13px; border-radius: 11px; border: 1px solid var(--border); background: var(--bg); color: var(--ink); max-height: 160px; }
.hegel-ask-input:focus { outline: none; border-color: var(--green-d); box-shadow: 0 0 0 3px var(--green-l); }
.hegel-ask-input:disabled { background: var(--bg-alt); }
.hegel-ask-send { flex: none; width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 11px; border: none; background: var(--green); color: #fff; cursor: pointer; transition: background .12s ease, opacity .12s ease; }
.hegel-ask-send:hover:not(:disabled) { background: var(--green-d); }
.hegel-ask-send:disabled { opacity: .45; cursor: not-allowed; }

.hegel-thinking { display: inline-flex; gap: 4px; }
.hegel-thinking i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: hegel-typing 1s infinite ease-in-out; }
.hegel-thinking i:nth-child(2) { animation-delay: .15s; }
.hegel-thinking i:nth-child(3) { animation-delay: .3s; }
@keyframes hegel-typing { 0%,80%,100% { transform: scale(.6); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }

/* history list */
.hegel-history-list { list-style: none; margin: 0; padding: 12px; display: flex; flex-direction: column; gap: 4px; max-height: 520px; overflow-y: auto; }
.hegel-history-empty { padding: 28px 20px; text-align: center; font-size: 13px; color: var(--mid); }
.hegel-history-item { display: block; padding: 11px 13px; border-radius: 10px; text-decoration: none; border: 1px solid transparent; transition: background .12s ease, border-color .12s ease; }
.hegel-history-item:hover { background: var(--bg-alt); }
.hegel-history-item.is-active { background: var(--green-xl); border-color: var(--border-g); }
.hegel-history-row { display: flex; align-items: center; gap: 4px; }
.hegel-history-row .hegel-history-item { flex: 1 1 auto; min-width: 0; }
.hegel-history-row .button_to { display: inline-flex; margin: 0; }
.hegel-history-del { flex: none; opacity: 0; }
.hegel-history-row:hover .hegel-history-del, .hegel-history-del:focus-visible { opacity: 1; }
.hegel-history-title { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hegel-history-time { display: block; margin-top: 2px; font-size: 11.5px; color: var(--muted); }

/* Hegel markdown */
.hegel-md { font-family: var(--ff-body); font-size: 14px; line-height: 1.6; }
.hegel-md > :first-child { margin-top: 0; }
.hegel-md > :last-child { margin-bottom: 0; }
.hegel-md p { margin: 0 0 10px; }
.hegel-md .hegel-md-h { font-family: var(--ff-display); font-weight: 600; font-size: 15px; margin: 14px 0 7px; color: var(--green-dd); }
.hegel-md .hegel-md-list { margin: 6px 0 12px; padding-left: 0; list-style: none; }
.hegel-md .hegel-md-list li { position: relative; margin: 6px 0; padding-left: 20px; }
.hegel-md .hegel-md-list li::before { content: ""; position: absolute; left: 5px; top: 0.62em; width: 5px; height: 5px; background: var(--green-d); transform: rotate(45deg); }
.hegel-msg-user .hegel-md .hegel-md-list li::before { background: #fff; }
.hegel-md strong { font-weight: 700; }
.hegel-md code { font-family: "IBM Plex Mono", monospace; background: rgba(27,122,90,0.08); padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }
.hegel-msg-user .hegel-md code { background: rgba(255,255,255,0.2); }

/* ---- Hegel two-column layout + book summary panel ---- */
.hegel { max-width: 1240px; }
.hegel-layout { display: grid; grid-template-columns: minmax(0, 1fr) 344px; gap: 22px; align-items: start; }
.hegel-main { min-width: 0; }

.hegel-book { position: sticky; top: 14px; background: var(--bg); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-sm); padding: 18px 18px 16px; }
.hegel-bk-head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.hegel-bk-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green-d); box-shadow: 0 0 0 3px var(--green-l); }
.hegel-bk-title { margin: 0; font-family: var(--ff-display); font-size: 17px; font-weight: 600; color: var(--ink); }

.hegel-bk-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.hegel-bk-tile { padding: 12px 14px; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 12px; }
.hegel-bk-tile-num { margin: 0; font-family: var(--ff-display); font-size: 20px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.hegel-bk-tile-label { margin: 2px 0 0; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }

.hegel-bk-split { margin-bottom: 6px; }
.hegel-bk-split-bar { height: 8px; border-radius: 999px; background: #e4e1d9; overflow: hidden; }
.hegel-bk-split-t1 { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--green-d)); }
.hegel-bk-split-legend { display: flex; flex-direction: column; gap: 3px; margin-top: 8px; font-size: 12px; color: var(--mid); }
.hegel-bk-split-legend strong { color: var(--ink); font-weight: 600; }
.hegel-bk-sw { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 7px; vertical-align: middle; }
.hegel-bk-sw-t1 { background: var(--green-d); }
.hegel-bk-sw-smb { background: #cfccc3; }

.hegel-bk-section { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.hegel-bk-sec-label { margin: 0 0 8px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }

.hegel-bk-fold { border-radius: 9px; }
.hegel-bk-fold + .hegel-bk-fold { margin-top: 2px; }
.hegel-bk-summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 8px 9px; border-radius: 9px; cursor: pointer; transition: background .12s ease; }
.hegel-bk-summary::-webkit-details-marker { display: none; }
.hegel-bk-summary:hover { background: var(--bg-alt); }
.hegel-bk-chev { color: var(--muted); font-size: 15px; line-height: 1; transition: transform .15s ease; }
.hegel-bk-fold[open] .hegel-bk-chev { transform: rotate(90deg); }
.hegel-bk-sum-label { flex: 1; font-size: 13px; font-weight: 600; color: var(--ink); }
.hegel-bk-pill { min-width: 20px; text-align: center; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hegel-bk-pill-soon { background: var(--green-l); color: var(--green-dd); }
.hegel-bk-pill-warm { background: var(--amber-bg); color: var(--amber); }
.hegel-bk-pill-over { background: #fee2e2; color: #b91c1c; }
.hegel-bk-acct-list { list-style: none; margin: 2px 0 6px; padding: 0 4px 0 26px; }
.hegel-bk-acct { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px dashed var(--border); }
.hegel-bk-acct:last-child { border-bottom: none; }
.hegel-bk-acct-name { font-size: 12.5px; font-weight: 600; color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hegel-bk-acct-name:hover { color: var(--green-dd); text-decoration: underline; }
.hegel-bk-acct-meta { flex: none; font-size: 11.5px; color: var(--mid); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hegel-bk-acct-empty, .hegel-bk-acct-more { font-size: 12px; color: var(--muted); padding: 4px 0; }

.hegel-bk-top { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.hegel-bk-top-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: baseline; }
.hegel-bk-top-name { font-size: 12.5px; font-weight: 600; color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hegel-bk-top-name:hover { color: var(--green-dd); }
.hegel-bk-top-amt { font-size: 12px; color: var(--mid); font-variant-numeric: tabular-nums; }
.hegel-bk-top-bar { grid-column: 1 / -1; height: 4px; border-radius: 999px; background: var(--bg-alt); overflow: hidden; }
.hegel-bk-top-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--green-d)); border-radius: 999px; }

.hegel-bk-agents { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.hegel-bk-agent-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 5px 0; }
.hegel-bk-agent-name { font-size: 12.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hegel-bk-agent-meta { flex: none; font-size: 11.5px; color: var(--mid); font-variant-numeric: tabular-nums; }

.hegel-bk-gaps { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.hegel-bk-gap { font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--amber-bg); color: var(--amber); border: 1px solid var(--amber-bd); }

@media (max-width: 980px) {
  .hegel-layout { grid-template-columns: 1fr; }
  .hegel-book { position: static; }
}

/* ===================== Lifecycle Dashboard ================================= */
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 1180px; margin: 0 auto; padding: 0 24px 36px; }
.dash-card { background: var(--bg); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-sm); padding: 18px; display: flex; flex-direction: column; height: 480px; }
.dash-card-head { display: flex; align-items: center; gap: 11px; padding-bottom: 14px; margin-bottom: 6px; border-bottom: 1px solid var(--border); }
.dash-card-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--mid); }
.dash-card-blue  .dash-card-dot { background: #2563eb; }
.dash-card-green .dash-card-dot { background: var(--green-d); }
.dash-card-slate .dash-card-dot { background: #64748b; }
.dash-card-amber .dash-card-dot { background: var(--amber); }
.dash-card-titles { flex: 1; min-width: 0; }
.dash-card-title { margin: 0; font-family: var(--ff-display); font-size: 17px; font-weight: 600; color: var(--ink); }
.dash-card-sub { margin: 1px 0 0; font-size: 12px; color: var(--muted); }
.dash-card-count { flex: none; min-width: 30px; height: 26px; padding: 0 9px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: var(--bg-alt); color: var(--ink); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.dash-card-blue  .dash-card-count { background: #dbeafe; color: #1d4ed8; }
.dash-card-green .dash-card-count { background: var(--green-l); color: var(--green-dd); }
.dash-card-slate .dash-card-count { background: #eef2f6; color: #475569; }
.dash-card-amber .dash-card-count { background: var(--amber-bg); color: var(--amber); }

.dash-card-money { display: flex; flex-direction: column; align-items: flex-end; text-align: right; margin: 0; }
.dash-card-arr { font-family: var(--ff-display); font-size: 16px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.dash-card-arr-label { font-size: 9.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }

.dash-empty { margin: 8px 2px 2px; font-size: 13px; color: var(--muted); }
.dash-section { flex: none; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.dash-section-scroll { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.dash-section-scroll .dash-accts { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.dash-sec-label { margin: 0 0 6px; flex: none; font-size: 10.5px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }

.dash-agent-pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 2px; }
.dash-pill-agent { display: inline-flex; align-items: center; gap: 7px; padding: 4px 5px 4px 11px; border-radius: 999px; background: var(--bg-alt); border: 1px solid var(--border); font-size: 12px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.dash-pill-n { display: inline-flex; align-items: center; justify-content: center; min-width: 19px; height: 18px; padding: 0 6px; border-radius: 999px; background: #fff; border: 1px solid var(--border); font-size: 10.5px; font-weight: 700; color: var(--mid); font-variant-numeric: tabular-nums; }

.dash-accts { list-style: none; margin: 0; padding: 0; }
.dash-acct { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 7px 2px; border-bottom: 1px solid var(--border); }
.dash-acct:last-child { border-bottom: none; }
.dash-acct-head { padding-top: 0; }
.dash-acct-head > span, .dash-acct-head .dash-acct-cols span { font-size: 10px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.dash-acct-id { min-width: 0; display: flex; flex-direction: column; }
.dash-acct-name { font-size: 13px; font-weight: 600; color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-acct-name:hover { color: var(--green-dd); text-decoration: underline; }
.dash-acct-agent { font-size: 11px; color: var(--mid); margin-top: 1px; }
.dash-acct-cols { flex: none; display: flex; gap: 14px; align-items: baseline; }
.dash-acct-arr { width: 76px; text-align: right; font-size: 12.5px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.dash-acct-ren { width: 84px; text-align: right; font-size: 12px; color: var(--mid); font-variant-numeric: tabular-nums; white-space: nowrap; }

@media (max-width: 860px) { .dash-grid { grid-template-columns: 1fr; } }

/* ======================= Renewal Outlook ================================== */
.ro-page { max-width: 1240px; margin: 0 auto; padding: 0 24px 28px; }
.ro-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 2px 0 12px; margin-bottom: 6px; }
.ro-eyebrow { margin: 0 0 2px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--green-dd); }
.ro-title { margin: 0; font-family: var(--ff-display); font-size: 25px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.ro-sub { margin: 4px 0 0; font-size: 13px; color: var(--mid); }
.ro-sub strong { color: var(--ink); font-weight: 600; }
.ro-head-right { text-align: right; flex: none; }
.ro-arr { margin: 0; font-family: var(--ff-display); font-size: 19px; font-weight: 600; color: var(--ink); }
.ro-renew { margin: 2px 0 0; font-size: 12.5px; color: var(--mid); }
.ro-renew-soon { color: var(--amber); font-weight: 600; }
.ro-renew-over { color: #b91c1c; font-weight: 600; }

.ro-layout { display: grid; grid-template-columns: minmax(0, 1fr) 344px; gap: 18px; align-items: start; }
.ro-main { min-width: 0; }
.ro-side { position: sticky; top: 14px; }

.ro-card { background: var(--bg); border: 1px solid var(--border); border-radius: 13px; box-shadow: var(--shadow-sm); padding: 15px 18px; margin-bottom: 12px; }
.ro-side .ro-card:last-child { margin-bottom: 0; }
.ro-card-label { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 10.5px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.ro-label-ic { color: var(--green-d); }
.ro-card-hint { margin: 4px 0 0; font-size: 12px; color: var(--mid); }

.ro-field { display: flex; flex-direction: column; gap: 5px; }
.ro-card-label + .ro-field, .ro-field + .ro-field { margin-top: 11px; }
.ro-field > span { font-size: 12px; font-weight: 600; color: var(--slate); }
.ro-field input, .ro-field select { font: inherit; font-size: 13.5px; padding: 8px 11px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg); color: var(--ink); }
.ro-field input:focus, .ro-field select:focus { outline: none; border-color: var(--green-d); box-shadow: 0 0 0 3px var(--green-l); }

/* signal chips */
.ro-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.ro-chip { cursor: pointer; }
.ro-chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.ro-chip span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg); font-size: 12px; font-weight: 600; color: var(--mid); transition: all .12s ease; }
.ro-chip-ic { color: inherit; opacity: 0.75; flex: none; }
.ro-chip:hover span { border-color: #d2d2d2; }
.ro-chip-green input:checked + span { background: var(--green-l); border-color: var(--green); color: var(--green-dd); }
.ro-chip-red   input:checked + span { background: #fee2e2; border-color: #fecaca; color: #b91c1c; }

/* essential customer info */
.ro-info-list { margin: 10px 0 0; padding: 0; }
.ro-info-list > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--border); }
.ro-info-list > div:last-child { border-bottom: none; }
.ro-info-list dt { margin: 0; font-size: 12.5px; color: var(--mid); }
.ro-info-list dd { margin: 0; font-size: 13px; font-weight: 600; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }

.ro-level { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 11px 0; border-top: 1px solid var(--border); }
.ro-level:first-of-type { border-top: none; padding-top: 12px; }
.ro-level-head { display: inline-flex; align-items: center; gap: 8px; }
.ro-level-code { font-size: 10.5px; font-weight: 800; letter-spacing: 0.05em; color: var(--green-dd); background: var(--green-l); padding: 2px 7px; border-radius: 5px; }
.ro-level-role { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.ro-verdicts { display: inline-flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.ro-verdict { cursor: pointer; }
.ro-verdict input { position: absolute; opacity: 0; width: 0; height: 0; }
.ro-verdict span { display: inline-block; padding: 5px 13px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg); font-size: 12.5px; font-weight: 600; color: var(--mid); transition: all .12s ease; }
.ro-verdict:hover span { border-color: #d2d2d2; }
.ro-verdict-green input:checked + span { background: var(--green-l); border-color: var(--green); color: var(--green-dd); }
.ro-verdict-amber input:checked + span { background: var(--amber-bg); border-color: var(--amber-bd); color: var(--amber); }
.ro-verdict-red   input:checked + span { background: #fee2e2; border-color: #fecaca; color: #b91c1c; }
.ro-reason { flex: 1 1 100%; resize: vertical; font: inherit; font-size: 13px; line-height: 1.45; padding: 8px 11px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg); color: var(--ink); min-height: 52px; }
.ro-reason:focus { outline: none; border-color: var(--green-d); box-shadow: 0 0 0 3px var(--green-l); }

.ro-form-actions { display: flex; justify-content: flex-end; margin-bottom: 16px; }
.ro-form-actions .auth-btn { padding: 9px 18px; }

.ro-insights { background: linear-gradient(180deg, var(--green-xl), #fbfdfc); border-color: var(--border-g); }
.ro-insights-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.ro-gen { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; }
.ro-insights .ro-empty { margin: 12px 0 0; font-size: 12.5px; color: var(--muted); }
.ro-insight { margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--border); }
.ro-insight-label { margin: 0 0 3px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--green-dd); }
.ro-insight-body { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--ink); }
.ro-insight-body p { margin: 0 0 7px; }

@media (max-width: 820px) {
  .ro-layout { grid-template-columns: 1fr; }
  .ro-verdicts { margin-left: 0; }
}

/* renewal outlook insights spend pill */
.ro-spend { display: inline-flex; align-items: center; gap: 3px; margin-left: 8px; padding: 1px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--green-dd); background: var(--green-l); border: 1px solid var(--border-g); }

/* ============================ FOUNDER NOTES =============================== */
.welcome-title-row { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.fn-trigger { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; padding: 3px 0; border-bottom: 1px dashed transparent; transition: color .14s ease, border-color .14s ease; }
.fn-trigger:hover { color: #7c3aed; border-bottom-color: #c4b5fd; }

/* ---- Modal ---- */
.fn-modal { width: min(660px, 94vw); max-height: 92vh; padding: 0; border: none; border-radius: 22px; background: #fff; box-shadow: 0 40px 100px rgba(20, 12, 36, 0.4); overflow: hidden; }
.fn-modal::backdrop { background: rgba(18, 12, 26, 0.55); backdrop-filter: blur(5px); }
.fn-modal[open] { animation: fn-pop .24s cubic-bezier(.2,.8,.3,1.1); }
@keyframes fn-pop { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.fn-modal-inner { position: relative; max-height: 92vh; overflow-y: auto; }
.fn-modal-glow { position: absolute; top: -120px; right: -80px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(168,85,247,0.45), transparent 65%); pointer-events: none; }

.fn-modal-head { position: relative; padding: 26px 28px 22px; color: #fff; background: linear-gradient(135deg, #2a1736 0%, #4c1d95 55%, #6d28d9 100%); display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.fn-modal-eyebrow { margin: 0 0 4px; font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: #d6bcfa; }
.fn-modal-title { margin: 0; font-family: var(--ff-display); font-size: 26px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.1; }
.fn-modal-sub { margin: 6px 0 0; font-size: 13px; color: #cbb6e8; font-variant-numeric: tabular-nums; }
.fn-modal-close { flex: none; width: 34px; height: 34px; border-radius: 10px; border: none; background: rgba(255,255,255,0.12); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; transition: background .14s ease; }
.fn-modal-close:hover { background: rgba(255,255,255,0.24); }

.fn-form { padding: 22px 28px 26px; }
.fn-field { margin-bottom: 18px; }
.fn-label { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; font-size: 12.5px; font-weight: 700; color: var(--ink); }
.fn-dot { width: 8px; height: 8px; border-radius: 50%; }
.fn-dot-red { background: #ef4444; }
.fn-dot-green { background: var(--green-d); }
.fn-input, .fn-textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 14px; padding: 11px 13px; border: 1px solid var(--border); border-radius: 11px; background: #fff; color: var(--ink); transition: border-color .14s ease, box-shadow .14s ease; }
.fn-textarea { resize: vertical; line-height: 1.5; }
.fn-input:focus, .fn-textarea:focus { outline: none; border-color: #a855f7; box-shadow: 0 0 0 3px rgba(168,85,247,0.16); }

.fn-shots { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.fn-shot { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); }
.fn-upload { position: relative; display: flex; align-items: center; justify-content: center; gap: 9px; padding: 18px; border: 1.5px dashed #d8c9f0; border-radius: 12px; background: #faf7ff; color: #7c3aed; font-size: 13px; font-weight: 600; cursor: pointer; transition: border-color .14s ease, background .14s ease; }
.fn-upload:hover { border-color: #a855f7; background: #f5efff; }
.fn-upload.is-drag { border-color: #7c3aed; background: #efe6ff; }
.fn-file { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.fn-row { display: flex; gap: 14px; }
.fn-field-grow { flex: 1; }
.fn-select { cursor: pointer; }

.fn-chips { display: flex; flex-wrap: wrap; gap: 9px; }
.fn-chip { cursor: pointer; }
.fn-chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.fn-chip span { display: inline-block; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--border); background: #fff; font-size: 13px; font-weight: 600; color: var(--mid); transition: all .14s ease; }
.fn-chip:hover span { border-color: #cfcfcf; }
.fn-chip-violet input:checked + span { background: #f3e8ff; border-color: #c084fc; color: #7c3aed; }
.fn-chip-green  input:checked + span { background: var(--green-l); border-color: var(--green); color: var(--green-dd); }
.fn-chip-amber  input:checked + span { background: var(--amber-bg); border-color: var(--amber-bd); color: var(--amber); }

.fn-modal-foot { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--border); }
.fn-cancel { font: inherit; font-size: 13.5px; font-weight: 600; color: var(--mid); background: none; border: none; cursor: pointer; padding: 10px 8px; }
.fn-cancel:hover { color: var(--ink); }
.fn-save { font: inherit; font-size: 14px; font-weight: 700; color: #fff; padding: 11px 22px; border: none; border-radius: 11px; cursor: pointer; background: linear-gradient(135deg, #7c3aed, #a855f7); box-shadow: 0 8px 22px rgba(124,58,237,0.34); transition: box-shadow .14s ease, transform .08s ease; }
.fn-save:hover { box-shadow: 0 10px 28px rgba(124,58,237,0.46); }
.fn-save:active { transform: translateY(1px); }

/* ---- Index ---- */
.fn-quote { max-width: 1180px; margin: 0 auto 22px; padding: 0 24px; position: relative; }
.fn-quote-mark { position: absolute; left: 8px; top: -18px; font-family: var(--ff-display); font-size: 64px; color: #e4d4ff; line-height: 1; }
.fn-quote p { margin: 0; padding-left: 34px; font-family: var(--ff-display); font-style: italic; font-size: 22px; color: var(--slate); }
.fn-quote strong { color: #7c3aed; font-style: normal; font-weight: 600; }
.fn-index-empty { max-width: 1180px; margin: 0 auto; padding: 0 24px; color: var(--muted); font-size: 14px; }
.fn-table-wrap { max-width: 1180px; margin: 0 auto; }
.fn-note-title { font-size: 13.5px; color: var(--ink); }
.fn-tag { display: inline-block; margin: 0 4px 2px 0; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; background: #f3e8ff; color: #7c3aed; }
.fn-muted { color: var(--muted); }
.fn-open { font-size: 13px; font-weight: 600; color: #7c3aed; cursor: pointer; white-space: nowrap; }
.fn-open:hover { text-decoration: underline; }

/* renewal outlook: generating / fill-in modals + bullet insights */
.ro-gen-modal { border: none; padding: 0; background: transparent; }
.ro-gen-modal::backdrop { background: rgba(20, 33, 28, 0.5); backdrop-filter: blur(4px); }
.ro-gen-modal[open] { animation: import-overlay-pop .22s cubic-bezier(.2, .8, .3, 1.1); }
.ro-gen-card { width: min(380px, 92vw); text-align: center; padding: 34px 32px; background: var(--bg); border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25); }
.ro-gen-orb { width: 46px; height: 46px; margin: 0 auto 18px; border-radius: 50%; border: 3px solid var(--green-l); border-top-color: var(--green-d); animation: ce-spin .9s linear infinite; }
.ro-gen-title { margin: 0; font-family: var(--ff-display); font-size: 19px; font-weight: 600; color: var(--ink); }
.ro-gen-sub { margin: 8px auto 0; max-width: 32ch; font-size: 13px; line-height: 1.5; color: var(--mid); }
.ro-fill-ic { width: 46px; height: 46px; margin: 0 auto 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--ff-display); font-size: 24px; font-weight: 700; color: var(--amber); background: var(--amber-bg); border: 1px solid var(--amber-bd); }
.ro-fill-ok { margin-top: 18px; font: inherit; font-size: 13.5px; font-weight: 600; padding: 9px 20px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--ink); cursor: pointer; }
.ro-fill-ok:hover { background: var(--bg-alt); }

.ro-insight-list { margin: 4px 0 0; padding-left: 0; list-style: none; }
.ro-insight-list li { position: relative; padding-left: 18px; margin: 5px 0; font-size: 13.5px; line-height: 1.5; color: var(--ink); }
.ro-insight-list li::before { content: ""; position: absolute; left: 4px; top: 0.62em; width: 5px; height: 5px; background: var(--green-d); border-radius: 50%; }

/* ---- Founder notes: toolbar (tabs + sort) ---- */
.fn-toolbar { max-width: 1180px; margin: 0 auto 14px; padding: 0 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.fn-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.fn-tab { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg); font-size: 13px; font-weight: 600; color: var(--mid); text-decoration: none; transition: all .12s ease; }
.fn-tab:hover { border-color: #d2d2d2; color: var(--ink); }
.fn-tab-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.fn-tab-n { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 17px; padding: 0 5px; border-radius: 999px; background: var(--bg-alt); color: var(--mid); font-size: 10.5px; font-weight: 700; }
.fn-tab-active .fn-tab-n { background: rgba(255,255,255,0.22); color: #fff; }
.fn-tab-red.fn-tab-active   { background: #b91c1c; border-color: #b91c1c; }
.fn-tab-amber.fn-tab-active { background: var(--amber); border-color: var(--amber); }
.fn-tab-slate.fn-tab-active { background: #475569; border-color: #475569; }
.fn-sort { display: inline-flex; align-items: center; gap: 8px; }
.fn-sort-label { font-size: 12px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: var(--muted); }
.fn-sort-select { appearance: none; -webkit-appearance: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink); padding: 7px 28px 7px 12px; border: 1px solid var(--border); border-radius: 9px; background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b6b6b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>") no-repeat right 9px center; cursor: pointer; }
.fn-sort-select:focus { outline: none; border-color: var(--green-d); box-shadow: 0 0 0 3px var(--green-l); }

/* priority tag in the table */
.fn-prio { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.fn-prio-red   { background: #fee2e2; color: #b91c1c; }
.fn-prio-amber { background: var(--amber-bg); color: var(--amber); }
.fn-prio-slate { background: #eef2f6; color: #475569; }

/* ---- Founder note show page ---- */
.fn-show { max-width: 860px; margin: 0 auto; padding: 0 24px 44px; }
.fn-show-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 4px 0 16px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.fn-show-eyebrow { margin: 0 0 4px; font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: #7c3aed; }
.fn-show-title { margin: 0; font-family: var(--ff-display); font-size: 28px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
.fn-show-sub { margin: 7px 0 0; font-size: 13.5px; color: var(--mid); }
.fn-show-cust { color: var(--ink); font-weight: 600; text-decoration: none; }
.fn-show-cust:hover { color: #7c3aed; text-decoration: underline; }
.fn-show-head-right { text-align: right; flex: none; }
.fn-show-arr { margin: 0; font-family: var(--ff-display); font-size: 19px; font-weight: 600; color: var(--ink); }
.fn-show-tags { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; }
.fn-show-block { background: var(--bg); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-sm); padding: 20px 22px; margin-bottom: 14px; }
.fn-show-block-red   { border-left: 3px solid #ef4444; }
.fn-show-block-green { border-left: 3px solid var(--green-d); }
.fn-show-label { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.fn-show-text { font-size: 14.5px; line-height: 1.65; color: var(--ink); }
.fn-show-text p { margin: 0 0 9px; }
.fn-show-empty { margin: 0; font-size: 13.5px; color: var(--muted); font-style: italic; }
.fn-show-shots { display: flex; flex-wrap: wrap; gap: 12px; }
.fn-show-shot { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-sm); transition: transform .14s ease, box-shadow .14s ease; }
.fn-show-shot:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(15,23,42,0.14); }
.fn-show-shot img { display: block; max-width: 240px; max-height: 200px; object-fit: cover; }

/* founder notes: trigger count + multi-note modal + show delete */
.fn-trigger-n { display: inline-flex; align-items: center; justify-content: center; min-width: 17px; height: 16px; padding: 0 5px; margin-left: 2px; border-radius: 999px; background: #f3e8ff; color: #7c3aed; font-size: 10.5px; font-weight: 700; }

.fn-modal-body { padding: 20px 28px 26px; }
.fn-form { padding: 0; }
.fn-section-label { margin: 0 0 10px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.fn-existing { padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--border); }
.fn-existing-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.fn-existing-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 11px; background: var(--bg-alt); border: 1px solid var(--border); }
.fn-existing-title { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fn-existing-open { flex: none; font-size: 12.5px; font-weight: 600; color: #7c3aed; text-decoration: none; white-space: nowrap; }
.fn-existing-open:hover { text-decoration: underline; }

.fn-show-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fn-delete-form { margin: 0; }
.fn-delete { font: inherit; font-size: 12.5px; font-weight: 600; color: #b91c1c; background: none; border: 1px solid #fecaca; border-radius: 8px; padding: 7px 14px; cursor: pointer; transition: background .12s ease; }
.fn-delete:hover { background: #fee2e2; }
.fn-show-delete { margin-top: 18px; display: flex; justify-content: flex-end; }

/* internal tasks modal (green variant of the founder-note modal) */
.it-trigger:hover { color: var(--green-dd); border-bottom-color: #a7e3c7; }
.it-trigger-n { background: var(--green-l); color: var(--green-dd); }
.it-modal .fn-modal-head { background: linear-gradient(135deg, #0f3d2a 0%, #15803d 55%, #22c55e 100%); }
.it-modal .fn-modal-eyebrow { color: #bbf7d0; }
.it-modal .fn-modal-sub { color: #bbf7d0; }
.it-modal .fn-modal-glow { background: radial-gradient(circle, rgba(34,197,94,0.45), transparent 65%); }
.it-hint { margin: 0 0 10px; font-size: 12.5px; line-height: 1.55; color: var(--mid); }
.it-hint code { background: var(--bg-alt); padding: 1px 5px; border-radius: 4px; font-size: 12px; }
.it-hint strong { color: var(--ink); }
.it-textarea { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 13px; line-height: 1.6; }
.it-save { background: linear-gradient(135deg, #15803d, #22c55e); box-shadow: 0 8px 22px rgba(34,197,94,0.32); }
.it-save:hover { box-shadow: 0 10px 28px rgba(34,197,94,0.44); }

/* internal tasks: wider modal + subtle blue link */
.it-modal { width: min(900px, 95vw); }
.it-modal .it-textarea { min-height: 220px; }
.it-link-row { margin: -2px 0 18px; }
.it-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: #2563eb; cursor: pointer; border-bottom: 1px dashed transparent; padding: 2px 0; transition: color .14s ease, border-color .14s ease; }
.it-link:hover { color: #1d4ed8; border-bottom-color: #93c5fd; }
.it-link-n { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 16px; padding: 0 5px; border-radius: 999px; background: #dbeafe; color: #1d4ed8; font-size: 10.5px; font-weight: 700; }

/* workbench customer list: subtle separators between items */
.wb-side { gap: 0; }
.wb-side .wb-vtab:not(:last-child):not(.wb-vtab-active) { border-bottom: 1px solid var(--border); }
.wb-side .wb-vtab-active { margin: 4px 0; }

/* workbench agent tabs: use the app green for the active tab (not the tier1 brown) */
.wb-agent-tabs .tier1-tab-active { background: linear-gradient(135deg, #1b7a5a 0%, #2ead78 100%); border-color: #2ead78; box-shadow: 0 8px 22px rgba(46,174,120,0.30); }
.wb-agent-tabs .tier1-tab-active:hover { border-color: #2ead78; box-shadow: 0 10px 26px rgba(46,174,120,0.36); }
.wb-agent-tabs .tier1-tab-active .tier1-tab-name { color: #fff; }
.wb-agent-tabs .tier1-tab-active .tier1-tab-count { background: rgba(255,255,255,0.22); border-color: rgba(255,255,255,0.35); color: #fff; }

/* workbench: "Only my tasks" toggle */
.wb-title-group { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.wb-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--mid); text-decoration: none; cursor: pointer; }
.wb-toggle:hover { color: var(--ink); }
.wb-toggle-track { width: 36px; height: 20px; border-radius: 999px; background: #d4d4d4; position: relative; flex: none; transition: background .15s ease; }
.wb-toggle-knob { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.2); transition: transform .15s ease; }
.wb-toggle-on { color: var(--green-dd); }
.wb-toggle-on .wb-toggle-track { background: var(--green-d); }
.wb-toggle-on .wb-toggle-knob { transform: translateX(16px); }

/* clickable task title */
.ct-title-open { cursor: pointer; }
.ct-title-open:hover { color: var(--green-dd); text-decoration: underline; }

/* task detail modal */
.tk-modal { width: min(540px, 94vw); padding: 0; border: none; border-radius: 18px; background: #fff; box-shadow: 0 30px 80px rgba(15, 23, 42, 0.32); }
.tk-modal::backdrop { background: rgba(20, 33, 28, 0.5); backdrop-filter: blur(4px); }
.tk-modal[open] { animation: import-overlay-pop .22s cubic-bezier(.2, .8, .3, 1.1); }
.tk-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 22px 24px 16px; border-bottom: 1px solid var(--border); }
.tk-modal-eyebrow { margin: 0 0 4px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--green-dd); }
.tk-modal-title { margin: 0; font-family: var(--ff-display); font-size: 21px; font-weight: 600; color: var(--ink); line-height: 1.25; }
.tk-modal-close { flex: none; width: 32px; height: 32px; border-radius: 9px; border: none; background: var(--bg-alt); color: var(--mid); font-size: 20px; line-height: 1; cursor: pointer; transition: background .12s ease, color .12s ease; }
.tk-modal-close:hover { background: #ececec; color: var(--ink); }
.tk-modal-body { padding: 18px 24px 22px; }
.tk-block { margin-bottom: 16px; }
.tk-label { margin: 0 0 5px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.tk-text { font-size: 14px; line-height: 1.6; color: var(--ink); }
.tk-meta { margin: 0; }
.tk-meta > div { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.tk-meta > div:last-child { border-bottom: none; }
.tk-meta dt { margin: 0; font-size: 13px; color: var(--mid); }
.tk-meta dd { margin: 0; font-size: 13.5px; font-weight: 600; color: var(--ink); text-align: right; }
.tk-link { color: var(--green-dd); text-decoration: none; }
.tk-link:hover { text-decoration: underline; }
.tk-status { font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.tk-status-open { background: var(--bg-alt); color: var(--slate); }
.tk-status-done { background: var(--green-l); color: var(--green-dd); }
.tk-status-over { background: #fee2e2; color: #b91c1c; }
.tk-modal-foot { margin-top: 18px; display: flex; justify-content: flex-end; }
.tk-open-cust { font-size: 13px; font-weight: 600; color: var(--green-dd); text-decoration: none; }
.tk-open-cust:hover { text-decoration: underline; }

/* task modal — inline edit */
.tk-modal-title { display: inline-flex; align-items: center; gap: 9px; }
.tk-edit-btn { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border: none; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; transition: background .12s ease, color .12s ease; }
.tk-edit-btn:hover { background: var(--green-l); color: var(--green-dd); }
.tk-edit-form { padding: 18px 24px 22px; display: flex; flex-direction: column; gap: 14px; }
.tk-edit-form[hidden] { display: none; }
.tk-field { display: flex; flex-direction: column; gap: 5px; }
.tk-field > span { font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.tk-field input[type="text"], .tk-field input[type="date"], .tk-field textarea, .tk-field select {
  width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; color: var(--ink); background: #fff; font-family: inherit;
}
.tk-field input:focus, .tk-field textarea:focus, .tk-field select:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-l); }
.tk-field textarea { resize: vertical; line-height: 1.5; }
.tk-edit-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.tk-edit-cancel { padding: 8px 16px; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--mid); font-size: 13px; font-weight: 600; cursor: pointer; }
.tk-edit-cancel:hover { background: var(--bg-alt); }
.tk-edit-save { padding: 8px 18px; border: none; border-radius: 8px; background: var(--green-dd); color: #fff; font-size: 13px; font-weight: 700; cursor: pointer; }
.tk-edit-save:hover { background: var(--green); }

/* dashboard "Internal tasks" button (standard green) */
.dash-tasks-btn { display: inline-flex; align-items: center; gap: 8px; flex: none; padding: 11px 18px; border-radius: 9px; background: var(--green); color: #fff; border: 1px solid var(--green); font-family: var(--ff-body); font-size: 13.5px; font-weight: 600; text-decoration: none; box-shadow: 0 4px 14px rgba(84, 206, 151, 0.28); transition: background .12s ease, box-shadow .12s ease; }
.dash-header-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.dash-programs-btn { display: inline-flex; align-items: center; gap: 8px; flex: none; padding: 11px 18px; border-radius: 9px; background: #fff; color: var(--ink); border: 1px solid var(--border); font-family: var(--ff-body); font-size: 13.5px; font-weight: 600; text-decoration: none; transition: background .12s ease, border-color .12s ease; }
.dash-programs-btn:hover { background: var(--bg-alt); border-color: #c8cedd; }
.dash-programs-btn svg { flex: none; color: var(--green-dd); }
.ps-header-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.ps-stdsci-btn { display: inline-flex; align-items: center; gap: 8px; flex: none; padding: 11px 18px; border-radius: 9px; background: #fff; color: var(--ink); border: 1px solid var(--border); font-family: var(--ff-body); font-size: 13.5px; font-weight: 600; text-decoration: none; transition: background .12s ease, border-color .12s ease; }
.ps-stdsci-btn:hover { background: var(--bg-alt); border-color: #c8cedd; }
.ps-newreq-btn { display: inline-flex; align-items: center; gap: 8px; flex: none; padding: 11px 18px; border-radius: 9px; background: var(--green); color: #fff; border: 1px solid var(--green); font-family: var(--ff-body); font-size: 13.5px; font-weight: 600; text-decoration: none; box-shadow: 0 4px 14px rgba(84, 206, 151, 0.28); transition: background .12s ease, box-shadow .12s ease; }

/* Standard Science library */
.ss-page { max-width: 920px; }
.ss-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ss-item { display: flex; align-items: center; gap: 16px; padding: 16px 18px; background: #fff; border: 1px solid var(--border); border-radius: 14px; transition: border-color .12s ease, box-shadow .12s ease; }
.ss-item:hover { border-color: #d6dcd9; box-shadow: 0 6px 18px rgba(16,40,30,0.06); }
.ss-item-ic { flex: none; width: 46px; height: 46px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; letter-spacing: .5px; color: #fff; }
.ss-item-ic-xlsx { background: linear-gradient(135deg, #15803d, #22c55e); }
.ss-item-ic-pdf { background: linear-gradient(135deg, #b91c1c, #ef4444); }
.ss-item-body { flex: 1 1 auto; min-width: 0; }
.ss-item-name { margin: 0 0 3px; font-size: 15px; font-weight: 600; color: var(--ink); }
.ss-item-meta { margin: 0; font-size: 13px; line-height: 1.5; color: var(--mid); }
.ss-dl { display: inline-flex; align-items: center; gap: 7px; flex: none; padding: 9px 15px; border-radius: 9px; background: var(--green); color: #fff; border: 1px solid var(--green); font-size: 13px; font-weight: 600; text-decoration: none; transition: background .12s ease; }
.ss-dl:hover { background: var(--green-dd); }
.ss-dl-pending { background: var(--bg-alt); color: var(--muted); border-color: var(--border); cursor: default; }
.ps-newreq-btn:hover { background: var(--green-dd); box-shadow: 0 6px 18px rgba(84, 206, 151, 0.34); }
.dash-tasks-btn:hover { background: var(--green-d); border-color: var(--green-d); box-shadow: 0 6px 18px rgba(46, 174, 120, 0.34); }

/* task toggle in-flight state — row dims until the Turbo Stream swaps it */
.ct-row-saving { opacity: 0.6; }
.ct-row-saving .ct-toggle { pointer-events: none; }

/* workbench: customer heading inside each task panel (shown in "All customers") */
.wb-panel-cust {
  margin: 18px 0 8px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink-2, #5b6470);
  text-transform: uppercase;
}
.wb-tab-panel:first-child .wb-panel-cust { margin-top: 2px; }
.tk-muted { color: var(--ink-3, #8a929c); }

/* ============================================================
   Hegel — chat-only mobile UI (.hgm). Full-screen overlay that
   reuses .hegel-msg / .hegel-md bubbles from the desktop chat.
   ============================================================ */
.hgm {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(46,173,120,0.10), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #f6faf8 100%);
  font-family: var(--ff-body);
  overscroll-behavior: none;
}

/* ---- Top bar ---- */
.hgm-bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px 12px;
  background: linear-gradient(135deg, #14532d 0%, #1b7a5a 55%, #2ead78 100%);
  color: #fff;
  box-shadow: 0 6px 22px rgba(20, 83, 45, 0.22);
}
.hgm-ava { position: relative; flex: none; width: 42px; height: 42px; }
.hgm-ava img {
  width: 42px; height: 42px; border-radius: 50%; object-fit: cover; object-position: 50% 18%;
  border: 1.5px solid rgba(255,255,255,0.55); box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.hgm-ava-dot {
  position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%;
  background: #34d399; border: 2px solid #14532d;
}
.hgm-id { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; flex: 1; }
.hgm-name { font-family: var(--ff-display); font-weight: 600; font-size: 18px; letter-spacing: 0.01em; }
.hgm-tag { font-size: 11.5px; color: rgba(255,255,255,0.78); margin-top: 1px; }
.hgm-new {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 11px; border: 1px solid rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.12); color: #fff; cursor: pointer; padding: 0;
  transition: background .14s ease;
}
.hgm-new:hover, .hgm-new:active { background: rgba(255,255,255,0.22); }
.hgm-new form { display: contents; }

/* ---- Thread ---- */
.hgm-thread {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 14px 8px;
  scroll-behavior: smooth;
}
.hgm-thread .hegel-msg { max-width: 86%; animation: hgm-pop .22s ease; }
.hgm-thread .hegel-msg-user .hegel-md {
  background: linear-gradient(135deg, #1b7a5a, #2ead78);
  box-shadow: 0 4px 12px rgba(27,122,90,0.28);
  border-radius: 18px 18px 6px 18px;
  font-size: 15px;
}
.hgm-thread .hegel-msg-assistant .hegel-md {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px 18px 18px 6px;
  box-shadow: 0 4px 16px rgba(20, 50, 38, 0.06);
  font-size: 15px;
  line-height: 1.62;
}
@keyframes hgm-pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Empty-state suggestions, sized for a phone */
.hgm-thread .hegel-empty { padding: 30px 8px; }
.hgm-thread .hegel-empty-title { font-size: 19px; }
.hgm-thread .hegel-suggestions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.hgm-thread .hegel-chip { font-size: 13px; padding: 9px 14px; }

/* ---- Composer ---- */
.hgm-ask {
  flex: none;
  display: flex;
  align-items: flex-end;
  gap: 9px;
  padding: 10px 12px calc(env(safe-area-inset-bottom, 0px) + 10px);
  background: rgba(255,255,255,0.94);
  backdrop-filter: saturate(1.2) blur(8px);
  border-top: 1px solid var(--border);
}
.hgm-input {
  flex: 1 1 auto;
  min-height: 46px;
  max-height: 42vh;
  padding: 12px 15px;
  border: 1px solid var(--border);
  border-radius: 23px;
  background: var(--bg-alt, #f4f6f5);
  font-family: var(--ff-body);
  font-size: 16px;            /* >=16px stops iOS from zooming on focus */
  line-height: 1.4;
  color: var(--ink);
  resize: none;
  outline: none;
  transition: border-color .14s ease, box-shadow .14s ease, background .14s ease;
}
.hgm-input:focus { border-color: var(--green); background: #fff; box-shadow: 0 0 0 3px var(--green-l); }
.hgm-send {
  flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 50%;
  border: none; cursor: pointer; color: #fff;
  background: linear-gradient(135deg, #1b7a5a, #2ead78);
  box-shadow: 0 4px 14px rgba(27,122,90,0.34);
  transition: filter .12s ease, transform .08s ease;
}
.hgm-send:hover { filter: brightness(1.06); }
.hgm-send:active { transform: scale(0.94); }
.hgm-send:disabled { opacity: 0.5; box-shadow: none; cursor: default; }
.hgm-send svg { transform: translateX(1px); }

/* ============================================================
   Audit log — Today / This week digest tabs
   ============================================================ */
.audit-tabs { max-width: none; margin: 4px 0 18px; }
/* Audit tabs are <button>s — strip the native chrome so they read as the
   same underline tabs as the link-based workspace tabs. */
.audit-tabs .workspace-tab { background: none; border: none; border-bottom: 2px solid transparent; cursor: pointer; }
.audit-tabs .workspace-tab.workspace-tab-active { border-bottom-color: var(--green); }
.audit-panel { display: none; }
.audit-panel-active { display: block; }
.audit-panel[hidden] { display: none; }

.aud-empty { padding: 40px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--border); border-radius: 12px; background: var(--bg-alt); }
.aud-empty p { margin: 0; font-size: 14px; }

.audit-digest { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.aud-item {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 13px;
  box-shadow: 0 1px 2px rgba(16, 40, 30, 0.04);
}
.aud-avatar {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--ff-display); font-weight: 700; font-size: 15px; color: #fff;
  background: var(--slate, #64748b);
}
.aud-avatar-super_admin { background: linear-gradient(135deg, #7c3aed, #a855f7); }
.aud-avatar-agent       { background: linear-gradient(135deg, #1b7a5a, #2ead78); }
.aud-avatar-customer    { background: linear-gradient(135deg, #b45309, #f59e0b); }

.aud-body { flex: 1 1 auto; min-width: 0; }
.aud-line { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--ink); }
.aud-name { font-weight: 700; color: var(--ink); }
.aud-role {
  display: inline-block; margin: 0 7px 0 7px; padding: 1px 8px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  border-radius: 999px; vertical-align: 1.5px;
}
.aud-role-super_admin { background: #ede9fe; color: #6d28d9; }
.aud-role-agent       { background: var(--green-l); color: var(--green-dd); }
.aud-role-customer    { background: #fef3c7; color: #b45309; }
.aud-did { color: var(--ink); }
.aud-meta { margin: 5px 0 0; font-size: 12px; color: var(--muted); }
.aud-dot { margin: 0 3px; }

/* ============================================================
   Customer edit — two-column layout with a sticky phase pane
   ============================================================ */
/* The edit page needs room for two columns, so it overrides the narrow
   single-column shell width used by the other agent forms. */
.agent-page-shell-edit { max-width: 1140px; }
.edit-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}
.edit-main { min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.edit-main > .agent-create-card-page { width: 100%; max-width: none; }
.edit-side { position: sticky; top: 20px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
@media (max-width: 980px) {
  .agent-page-shell-edit { max-width: 720px; }
  .edit-layout { grid-template-columns: 1fr; }
  .edit-side { position: static; }
}

.phase-pane {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 20px;
  box-shadow: 0 6px 22px rgba(16, 40, 30, 0.06);
}
.phase-pane-eyebrow { margin: 0 0 4px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--green-dd); }
.phase-pane-title { margin: 0 0 6px; font-family: var(--ff-display); font-size: 19px; font-weight: 600; color: var(--ink); }
.phase-pane-sub { margin: 0 0 16px; font-size: 13px; line-height: 1.55; color: var(--mid); }
.phase-pane-link { color: var(--green-dd); font-weight: 600; text-decoration: none; }
.phase-pane-link:hover { text-decoration: underline; }

.phase-chips { display: flex; flex-direction: column; gap: 9px; }
.phase-chip-form { display: block; }
.phase-chip {
  width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: #fff;
  font-family: var(--ff-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--slate, #475569);
  cursor: pointer;
  transition: border-color .14s ease, background .14s ease, box-shadow .14s ease, color .14s ease;
}
.phase-chip:hover { border-color: #cfd4d8; background: var(--bg-alt); }
.phase-chip-dot { flex: none; width: 11px; height: 11px; border-radius: 50%; background: var(--chip, #94a3b8); }
.phase-chip-label { flex: 1 1 auto; text-align: left; }
.phase-chip-check { flex: none; color: currentColor; }

/* per-phase accent (matches the Dashboard box tones) */
.phase-chip-onboarding { --chip: #3b82f6; }
.phase-chip-surveying  { --chip: #2ead78; }
.phase-chip-silent     { --chip: #64748b; }
.phase-chip-renewal    { --chip: #f59e0b; }

.phase-chip-active {
  border-color: var(--chip);
  color: var(--ink);
  background: color-mix(in srgb, var(--chip) 9%, #fff);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--chip) 16%, transparent);
}
.phase-chip-active .phase-chip-dot { box-shadow: 0 0 0 3px color-mix(in srgb, var(--chip) 22%, transparent); }
.phase-chip-active .phase-chip-check { color: var(--chip); }

.phase-pane-current { margin: 16px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--mid); }
.phase-pane-unset { color: var(--muted); }

.dash-unset-note { display: inline-block; margin-top: 6px; font-size: 12.5px; color: #b45309; }

/* ============================================================
   Account context pane (customer edit page right side)
   ============================================================ */
.ctx-pane {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 20px;
  box-shadow: 0 6px 22px rgba(16, 40, 30, 0.06);
}
.ctx-form { display: flex; flex-direction: column; gap: 13px; margin-top: 4px; }
.ctx-field { display: flex; flex-direction: column; gap: 5px; }
.ctx-field > span { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.ctx-field input[type="text"], .ctx-field select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px;
  font-family: var(--ff-body); font-size: 14px; color: var(--ink); background: #fff;
}
.ctx-field input:focus, .ctx-field select:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-l); }

/* xxxx.culturemonkey.io input group */
.ctx-url { display: flex; align-items: stretch; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; background: #fff; }
.ctx-url:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-l); }
.ctx-url-input { flex: 1 1 auto; min-width: 0; border: none !important; box-shadow: none !important; border-radius: 0 !important; padding: 10px 12px; }
.ctx-url-input:focus { box-shadow: none !important; }
.ctx-url-suffix {
  flex: none; display: inline-flex; align-items: center; padding: 0 12px;
  background: var(--bg-alt); border-left: 1px solid var(--border);
  font-size: 13px; font-weight: 600; color: var(--mid); white-space: nowrap;
}
.ctx-actions { margin-top: 4px; }
.ctx-save {
  width: 100%; padding: 10px 14px; border: none; border-radius: 9px; cursor: pointer;
  background: var(--green-dd); color: #fff; font-family: var(--ff-body); font-size: 13.5px; font-weight: 700;
}
.ctx-save:hover { background: var(--green); }

/* Context reference (read-only) on the renewal outlook page */
.ro-ctx-list { margin: 6px 0 10px; }
.ro-ctx-list > div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.ro-ctx-list > div:last-child { border-bottom: none; }
.ro-ctx-list dt { margin: 0; font-size: 12.5px; color: var(--mid); }
.ro-ctx-list dd { margin: 0; font-size: 13px; font-weight: 600; color: var(--ink); text-align: right; word-break: break-word; }
.ro-ctx-edit { margin: 4px 0 0; font-size: 12.5px; }
.ro-ctx-edit a { color: var(--green-dd); font-weight: 600; text-decoration: none; }
.ro-ctx-edit a:hover { text-decoration: underline; }

/* ============================================================
   Renewal outlook — immutable version history
   ============================================================ */
.ro-versions { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ro-version { padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-alt); }
.ro-version-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 9px; }
.ro-version-num { font-family: var(--ff-display); font-weight: 700; font-size: 13px; color: var(--green-dd); }
.ro-version-when { font-size: 12px; color: var(--mid); }
.ro-version-who { font-size: 12px; color: var(--muted); }
.ro-version-reads { display: flex; flex-direction: column; gap: 7px; }
.ro-version-read { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ro-version-code { flex: none; font-size: 10.5px; font-weight: 800; letter-spacing: 0.05em; color: var(--mid); width: 22px; }
.ro-version-verdict { flex: none; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.ro-version-verdict.ro-verdict-green { background: var(--green-l); color: var(--green-dd); }
.ro-version-verdict.ro-verdict-amber { background: #fef3c7; color: #b45309; }
.ro-version-verdict.ro-verdict-red   { background: #fee2e2; color: #b91c1c; }
.ro-version-reason { font-size: 13px; line-height: 1.5; color: var(--ink); white-space: pre-line; }
.ro-version-signals { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.ro-version-sig { font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: #eef1f0; color: var(--slate); }
.ro-version-sig.ro-chip-green { background: var(--green-l); color: var(--green-dd); }
.ro-version-sig.ro-chip-red   { background: #fee2e2; color: #b91c1c; }

/* ============================================================
   Lifecycle phase section — agent customer page (below the pillars)
   ============================================================ */
.cust-phase {
  margin-top: 22px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px 26px;
  box-shadow: 0 6px 22px rgba(16, 40, 30, 0.05);
}
.cust-phase-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.cust-phase-headline { min-width: 0; }
.cust-phase-eyebrow { margin: 0 0 4px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--green-dd); }
.cust-phase-title { margin: 0 0 5px; font-family: var(--ff-display); font-size: 20px; font-weight: 600; color: var(--ink); }
.cust-phase-sub { margin: 0; font-size: 13px; line-height: 1.55; color: var(--mid); }
.cust-phase-link { color: var(--green-dd); font-weight: 600; text-decoration: none; }
.cust-phase-link:hover { text-decoration: underline; }
.cust-phase-badge {
  flex: none; align-self: center; font-size: 12px; font-weight: 700; padding: 5px 13px; border-radius: 999px;
  background: color-mix(in srgb, var(--badge, #94a3b8) 12%, #fff); color: var(--badge, #475569);
  border: 1px solid color-mix(in srgb, var(--badge, #94a3b8) 35%, transparent);
}
.cust-phase-badge-onboarding { --badge: #3b82f6; }
.cust-phase-badge-surveying  { --badge: #1b7a5a; }
.cust-phase-badge-silent     { --badge: #475569; }
.cust-phase-badge-renewal    { --badge: #b45309; }

.cust-phase-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 720px) { .cust-phase-chips { grid-template-columns: repeat(2, 1fr); } }
.cust-phase-chips .phase-chip { padding: 14px 16px; font-size: 14.5px; }
.cust-phase-note { margin: 14px 0 0; font-size: 12.5px; color: var(--mid); }

/* ============================================================
   Agent top nav bar (below the signed-in bar)
   ============================================================ */
.agent-nav { background: #fff; border-bottom: 1px solid var(--border); box-shadow: 0 1px 2px rgba(16,40,30,0.03); }
.agent-nav-inner { max-width: 1180px; margin: 0 auto; padding: 9px 24px; display: flex; gap: 6px; overflow-x: auto; }
.agent-nav-link {
  flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 9px;
  font-family: var(--ff-body); font-size: 13.5px; font-weight: 600; color: var(--mid); text-decoration: none;
  white-space: nowrap; transition: background .14s ease, color .14s ease;
}
.agent-nav-link svg { flex: none; opacity: 0.85; }
.agent-nav-link:hover { background: var(--bg-alt); color: var(--ink); }
.agent-nav-link-active,
.agent-nav-link-active:hover { background: var(--green-dd); color: #fff; }
.agent-nav-link-active svg { opacity: 1; }

/* ============================================================
   Team table
   ============================================================ */
.agent-page-pad { max-width: 1180px; margin: 0 auto; padding: 0 24px 52px; }
.team-table td { vertical-align: middle; }
.team-cell-agent { display: flex; align-items: center; gap: 12px; }
.team-avatar {
  flex: none; width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--ff-display); font-weight: 700; font-size: 14px; color: #fff;
  background: linear-gradient(135deg, #1b7a5a, #2ead78);
}
.team-id { display: flex; flex-direction: column; line-height: 1.3; }
.team-name { font-weight: 600; color: var(--ink); text-decoration: none; }
.team-name:hover { color: var(--green-dd); }
.team-email { font-size: 12px; color: var(--muted); }
.team-actions { display: flex; gap: 14px; justify-content: flex-end; align-items: center; }
.team-link-work { font-size: 13px; font-weight: 700; color: var(--green-dd); text-decoration: none; }
.team-link-work:hover { text-decoration: underline; }

/* ============================================================
   My Work page
   ============================================================ */
.mw-page { max-width: 1180px; margin: 0 auto; padding: 0 24px 56px; }
.mw-empty { padding: 60px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--border); border-radius: 14px; background: var(--bg-alt); }

/* Completeness hero */
.mw-hero {
  display: flex; align-items: center; gap: 32px; flex-wrap: wrap;
  background: linear-gradient(135deg, #ffffff 0%, #f4faf7 100%);
  border: 1px solid var(--border); border-radius: 20px; padding: 28px 30px;
  box-shadow: 0 8px 26px rgba(16,40,30,0.05);
}
.mw-ring-wrap { position: relative; flex: none; width: 150px; height: 150px; }
.mw-ring { width: 150px; height: 150px; transform: rotate(-90deg); }
.mw-ring-track { fill: none; stroke: #e7ece9; stroke-width: 11; }
.mw-ring-fill { fill: none; stroke: url(#mwgrad); stroke: #2ead78; stroke-width: 11; stroke-linecap: round; transition: stroke-dashoffset .6s cubic-bezier(.4,0,.2,1); }
.mw-ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.mw-ring-pct { font-family: var(--ff-display); font-size: 36px; font-weight: 700; color: var(--green-dd); line-height: 1; }
.mw-ring-pct small { font-size: 17px; }
.mw-ring-label { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.mw-hero-body { flex: 1 1 320px; min-width: 280px; }
.mw-hero-title { margin: 0 0 5px; font-family: var(--ff-display); font-size: 22px; font-weight: 600; color: var(--ink); }
.mw-hero-sub { margin: 0 0 16px; font-size: 13.5px; line-height: 1.55; color: var(--mid); }
.mw-cats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 22px; }
@media (max-width: 560px) { .mw-cats { grid-template-columns: 1fr; } }
.mw-cat-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 5px; }
.mw-cat-label { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.mw-cat-num { font-size: 12px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.mw-cat-bar { height: 7px; border-radius: 999px; background: #e7ece9; overflow: hidden; }
.mw-cat-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #1b7a5a, #2ead78); transition: width .5s ease; }

/* Workload stat cards */
.mw-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 18px 0 0; }
@media (max-width: 800px) { .mw-stats { grid-template-columns: 1fr; } }
.mw-stat { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px; box-shadow: 0 1px 2px rgba(16,40,30,0.04); }
.mw-stat-alert { border-color: #fcd9b6; background: #fffaf3; }
.mw-stat-ic { flex: none; width: 40px; height: 40px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.mw-stat-ic-blue { background: linear-gradient(135deg, #3b82f6, #60a5fa); }
.mw-stat-ic-green { background: linear-gradient(135deg, #1b7a5a, #2ead78); }
.mw-stat-ic-amber { background: linear-gradient(135deg, #d97706, #f59e0b); }
.mw-stat-num { margin: 0; font-family: var(--ff-display); font-size: 26px; font-weight: 700; color: var(--ink); line-height: 1; }
.mw-stat-label { margin: 4px 0 0; font-size: 13px; font-weight: 600; color: var(--ink); }
.mw-stat-sub { margin: 3px 0 0; font-size: 12px; color: var(--muted); }
.mw-stat-link { color: var(--green-dd); font-weight: 600; text-decoration: none; }
.mw-stat-link:hover { text-decoration: underline; }

/* Accounts list */
.mw-accounts { margin-top: 26px; }
.mw-section-title { margin: 0 0 12px; font-family: var(--ff-display); font-size: 17px; font-weight: 600; color: var(--ink); }
.mw-acct-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.mw-acct {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  background: #fff; border: 1px solid var(--border); border-radius: 13px; padding: 14px 18px;
  box-shadow: 0 1px 2px rgba(16,40,30,0.04);
}
.mw-acct-main { min-width: 0; flex: 1 1 auto; }
.mw-acct-head { display: flex; align-items: center; gap: 9px; }
.mw-acct-name { font-size: 15px; font-weight: 700; color: var(--ink); text-decoration: none; }
.mw-acct-name:hover { color: var(--green-dd); }
.mw-acct-phase { font-size: 10.5px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: #eef1f0; color: var(--slate); }
.mw-acct-phase-onboarding { background: #e0edff; color: #2563eb; }
.mw-acct-phase-surveying  { background: var(--green-l); color: var(--green-dd); }
.mw-acct-phase-silent     { background: #eef1f4; color: #475569; }
.mw-acct-phase-renewal    { background: #fef3c7; color: #b45309; }
.mw-acct-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.mw-miss { font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: #fff4ed; color: #c2410c; border: 1px solid #fcdcc6; }
.mw-allset { font-size: 11.5px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--green-l); color: var(--green-dd); }
.mw-acct-meta { flex: none; display: flex; align-items: center; gap: 12px; }
.mw-pill { font-size: 12px; font-weight: 700; color: var(--mid); background: var(--bg-alt); border: 1px solid var(--border); border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.mw-pill-msg { background: #fffaf3; color: #b45309; border-color: #fcd9b6; }
.mw-acct-prog { display: flex; align-items: center; gap: 8px; }
.mw-acct-bar { width: 84px; height: 7px; border-radius: 999px; background: #e7ece9; overflow: hidden; }
.mw-acct-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #1b7a5a, #2ead78); }
.mw-acct-pct { font-size: 12px; font-weight: 700; color: var(--mid); width: 34px; text-align: right; font-variant-numeric: tabular-nums; }
.mw-acct-cta { font-size: 13px; font-weight: 700; color: var(--green-dd); text-decoration: none; white-space: nowrap; }
.mw-acct-cta:hover { text-decoration: underline; }
@media (max-width: 680px) {
  .mw-acct { flex-direction: column; align-items: flex-start; }
  .mw-acct-meta { flex-wrap: wrap; }
}

/* ============================================================
   Renewal Outlook — tabs
   ============================================================ */
.ro-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin: 8px 0 22px; overflow-x: auto; }
.ro-tab {
  flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 12px 16px;
  background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer;
  font-family: var(--ff-body); font-size: 14px; font-weight: 600; color: var(--mid); white-space: nowrap;
  transition: color .14s ease, border-color .14s ease;
}
.ro-tab:hover { color: var(--ink); }
.ro-tab-active { color: var(--green-dd); border-bottom-color: var(--green); }
.ro-tab-count {
  display: inline-flex; align-items: center; justify-content: center; min-width: 19px; height: 18px; padding: 0 6px;
  border-radius: 999px; background: var(--green-l); color: var(--green-dd); font-size: 11px; font-weight: 700;
}
.ro-panel { display: none; }
.ro-panel-active { display: block; }
.ro-panel[hidden] { display: none; }

/* Coming soon */
.ro-soon { text-align: center; padding: 56px 24px; }
.ro-soon-ic { font-size: 34px; opacity: 0.5; }
.ro-soon-title { margin: 14px 0 4px; font-family: var(--ff-display); font-size: 20px; font-weight: 600; color: var(--ink); }
.ro-soon-sub { margin: 0 auto 16px; max-width: 46ch; font-size: 13.5px; line-height: 1.55; color: var(--mid); }
.ro-soon-badge { display: inline-block; padding: 5px 14px; border-radius: 999px; background: var(--bg-alt); border: 1px solid var(--border); font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: 0.03em; }

/* ============================================================
   Account usage
   ============================================================ */
.ro-usage-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.ro-usage-fetch { flex: none; }
.ro-usage-tenant { font-family: "IBM Plex Mono", monospace; font-size: 12px; background: var(--bg-alt); padding: 1px 6px; border-radius: 5px; }
.ro-usage-error { background: #fee2e2; border: 1px solid #fca5a5; color: #b91c1c; padding: 11px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 14px; }
.ro-usage-error-soft { background: #fffaf3; border-color: #fcd9b6; color: #b45309; }
.ro-usage-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 4px; }
.ro-usage-tiles-sm { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.ro-usage-tile { background: var(--bg-alt); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.ro-usage-tile-num { font-family: var(--ff-display); font-size: 22px; font-weight: 700; color: var(--green-dd); line-height: 1.15; overflow-wrap: anywhere; }
/* String values (names, dates, labels) read better at body size than as big serif numerals */
.ro-usage-tile-str { font-family: var(--ff-body); font-size: 15px; font-weight: 700; line-height: 1.35; overflow-wrap: break-word; }
.ro-usage-tile-label { font-size: 12px; font-weight: 600; color: var(--mid); }

/* Long descriptive values rendered as a definition list, not giant tiles */
.ro-usage-notes { margin: 4px 0 0; display: flex; flex-direction: column; gap: 8px; }
.ro-usage-notes > div { display: grid; grid-template-columns: 160px 1fr; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.ro-usage-notes > div:last-child { border-bottom: none; }
.ro-usage-notes dt { margin: 0; font-size: 12.5px; font-weight: 700; color: var(--ink); }
.ro-usage-notes dd { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--mid); }
@media (max-width: 560px) { .ro-usage-notes > div { grid-template-columns: 1fr; gap: 2px; } }

/* Documentation blocks (context / meta) — quieter */
.ro-usage-block-meta { opacity: 0.92; }
.ro-usage-block-meta .ro-usage-block-title { color: var(--muted); }
.ro-usage-empty { margin: 0; font-size: 13px; color: var(--muted); }
.ro-usage-block { margin-top: 20px; }
.ro-usage-block-title { margin: 0 0 10px; font-size: 12.5px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--slate); }
.ro-usage-count { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--ink); }
.ro-usage-raw { margin-top: 8px; }
.ro-usage-raw summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--green-dd); }
.ro-usage-raw pre { margin: 8px 0 0; padding: 12px 14px; background: #0f1f1a; color: #d7e6df; border-radius: 10px; font-family: "IBM Plex Mono", monospace; font-size: 12px; line-height: 1.5; overflow-x: auto; max-height: 420px; }

/* ============================================================
   People Science — customer-profile table
   ============================================================ */
.aud-role-people { background: #ede9fe; color: #6d28d9; }

.ps-table td { vertical-align: middle; }
.ps-name-cell { display: flex; flex-direction: column; line-height: 1.3; }
.ps-name { font-weight: 700; color: var(--ink); }
.ps-email { font-size: 12px; color: var(--muted); }
.ps-prog { display: flex; align-items: center; gap: 12px; max-width: 320px; }
.ps-bar { flex: 1 1 auto; max-width: 220px; height: 8px; border-radius: 999px; background: #e7ece9; overflow: hidden; }
.ps-fill { height: 100%; border-radius: 999px; transition: width .4s ease; }
.ps-fill-full { background: linear-gradient(90deg, #1b7a5a, #2ead78); }
.ps-fill-mid  { background: linear-gradient(90deg, #d97706, #f59e0b); }
.ps-fill-low  { background: linear-gradient(90deg, #dc2626, #f87171); }
.ps-pct { font-size: 13px; font-weight: 700; color: var(--ink); width: 38px; text-align: right; font-variant-numeric: tabular-nums; }
.ps-frac { font-size: 11.5px; color: var(--muted); }
.ps-missing { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.ps-miss { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #fff4ed; color: #c2410c; border: 1px solid #fcdcc6; }
.ps-complete { font-size: 11.5px; font-weight: 700; color: var(--green-dd); }
.ps-edit { font-size: 13px; font-weight: 700; color: var(--green-dd); text-decoration: none; white-space: nowrap; }
.ps-edit:hover { text-decoration: underline; }

/* People Science sees only the Account Context box on the edit page */
.edit-layout-solo { grid-template-columns: 1fr; max-width: 560px; }
.edit-layout-solo .edit-side { position: static; }

/* People Science trigger link */
.it-link-row { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.ps-link { color: #7c3aed; }
.ps-link:hover { color: #6d28d9; border-bottom-color: #c4b5fd; }
.fp-link { color: #0f766e; }
.fp-link:hover { color: #0b5d56; border-bottom-color: #5eead4; }

/* ============================================================
   People Science report module
   ============================================================ */
.psr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.psr-card {
  display: flex; flex-direction: column; gap: 8px; padding: 22px 22px 18px;
  background: #fff; border: 1px solid var(--border); border-radius: 16px; text-decoration: none;
  box-shadow: 0 1px 2px rgba(16,40,30,0.04); transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.psr-card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(16,40,30,0.10); border-color: #d6dcd9; }
.psr-card-icon { width: 46px; height: 46px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; color: #fff; margin-bottom: 4px; }
.psr-icon-engagement { background: linear-gradient(135deg, #7c3aed, #a855f7); }
.psr-icon-benchmark { background: linear-gradient(135deg, #0f766e, #14b8a6); }
.psr-icon-thematic { background: linear-gradient(135deg, #c2410c, #f59e0b); }
.psr-icon-lifecycle { background: linear-gradient(135deg, #0e7490, #22d3ee); }
.psr-icon-regression { background: linear-gradient(135deg, #4338ca, #6366f1); }
.psr-icon-need_assessment { background: linear-gradient(135deg, #be123c, #fb7185); }
.psr-icon-executive { background: linear-gradient(135deg, #1e293b, #475569); }
.psr-icon-ebu { background: linear-gradient(135deg, #7c2d12, #ea580c); }
.psr-icon-three_d { background: linear-gradient(135deg, #4338ca, #7c3aed); }
.psr-icon-soon { background: var(--bg-alt); color: var(--muted); font-size: 24px; font-weight: 700; }
.psr-card-name { margin: 0; font-family: var(--ff-display); font-size: 18px; font-weight: 600; color: var(--ink); }
.psr-card-tag { margin: 0; font-size: 13px; line-height: 1.5; color: var(--mid); flex: 1 1 auto; }
.psr-card-cta { margin-top: 8px; font-size: 13px; font-weight: 700; color: var(--green-dd); }
.psr-card-soon { cursor: default; opacity: 0.85; }
.psr-card-soon:hover { transform: none; box-shadow: 0 1px 2px rgba(16,40,30,0.04); border-color: var(--border); }
.psr-card-soon .psr-card-cta { color: var(--muted); }

.psr-card { position: relative; overflow: hidden; }
.psr-card-num {
  position: absolute; top: 10px; right: 18px;
  font-family: var(--ff-display); font-size: 46px; font-weight: 700; line-height: 1;
  letter-spacing: -2px; color: #8a92a5;
}
.psr-card-comingsoon .psr-card-cta { color: var(--muted); }

/* Coming-soon report detail panel */
.psr-soon {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px;
  padding: 56px 24px; background: #fff; border: 1px solid var(--border); border-radius: 16px;
}
.psr-soon-ic { width: 56px; height: 56px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.psr-soon-ic svg { width: 28px; height: 28px; }
.psr-soon-title { margin: 0; font-family: var(--ff-display); font-size: 22px; font-weight: 600; color: var(--ink); }
.psr-soon-text { margin: 0 0 4px; max-width: 440px; font-size: 14px; line-height: 1.6; color: var(--mid); }

.psr-context-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 10px; }
.psr-context-list li { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.psr-context-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.psr-context-list span { color: var(--mid); }
.psr-context-list strong { color: var(--ink); font-weight: 600; }

.psr-status { display: flex; align-items: center; gap: 9px; padding: 11px 16px; border-radius: 10px; font-size: 13px; margin-bottom: 20px; }
.psr-status code { font-family: "IBM Plex Mono", monospace; font-size: 12px; background: rgba(0,0,0,0.05); padding: 1px 5px; border-radius: 4px; }
.psr-status-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.psr-status-ok { background: var(--green-l); color: var(--green-dd); }
.psr-status-ok .psr-status-dot { background: var(--green); }
.psr-status-warn { background: #fffaf3; color: #b45309; border: 1px solid #fcd9b6; }
.psr-status-warn .psr-status-dot { background: #f59e0b; }

.psr-form { display: flex; flex-direction: column; gap: 18px; }
.psr-config-card { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 22px 24px; box-shadow: 0 1px 2px rgba(16,40,30,0.04); }
.psr-config-title { margin: 0 0 14px; font-family: var(--ff-display); font-size: 17px; font-weight: 600; color: var(--ink); }
.psr-config-hint { margin: -8px 0 14px; font-size: 13px; color: var(--mid); }
.psr-field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.psr-field { display: flex; flex-direction: column; gap: 5px; }
.psr-field > span { font-size: 12.5px; font-weight: 700; color: var(--ink); }
.psr-field > span em { font-weight: 500; color: var(--muted); font-style: normal; }
.psr-field small { font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.psr-field small code { font-family: "IBM Plex Mono", monospace; }
.psr-input { padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px; font-size: 14px; font-family: var(--ff-body); color: var(--ink); background: #fff; }
.psr-input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-l); }

.psr-attrs { display: flex; flex-wrap: wrap; gap: 9px; }
.psr-attr { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1.5px solid var(--border); border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--slate); cursor: pointer; transition: border-color .14s ease, background .14s ease, color .14s ease; }
.psr-attr:hover { border-color: #cfd4d8; }
.psr-attr input { accent-color: #7c3aed; }
.psr-attr-on { border-color: #c4b5fd; background: #f5f3ff; color: #6d28d9; }
.psr-actions { display: flex; justify-content: flex-end; gap: 12px; }
.psr-export { display: inline-flex; align-items: center; gap: 8px; }

/* View-as-agent impersonation */
.impersonate-bar-agent { background: linear-gradient(135deg, #6d28d9, #7c3aed); }
.team-link-viewas { font-size: 13px; font-weight: 700; color: #7c3aed; text-decoration: none; white-space: nowrap; }
.team-link-viewas:hover { text-decoration: underline; }

/* People Science table search */
.ps-search-row { position: relative; max-width: 360px; margin: 0 0 16px; }
.ps-search-ic { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.ps-search-input { width: 100%; padding: 10px 14px 10px 38px; border: 1px solid var(--border); border-radius: 10px; font-family: var(--ff-body); font-size: 14px; color: var(--ink); background: #fff; }
.ps-search-input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-l); }
.ps-no-match { text-align: center; color: var(--muted); padding: 28px 0; font-size: 14px; }

/* People Science table: row-hover reveal of the reports link (beside the name) */
.ps-name-row { display: inline-flex; align-items: center; gap: 12px; }
.ps-row-actions { display: inline-flex; align-items: center; gap: 16px; justify-content: flex-end; }
.ps-row-ps {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: #7c3aed;
  text-decoration: none; white-space: nowrap; opacity: 0; transition: opacity .14s ease;
}
.ps-row-ps:hover { text-decoration: underline; }
.ps-table tbody tr:hover .ps-row-ps,
.ps-row-ps:focus-visible { opacity: 1; }

/* People Science readiness check box (landing) */
.ps-status-box { border: 1px solid var(--border); border-radius: 14px; background: #fff; padding: 16px 18px; margin-bottom: 22px; box-shadow: 0 1px 2px rgba(16,40,30,0.04); }
.ps-ready { border-color: var(--border-g); background: var(--green-xl, #f4faf7); }
.ps-notready { border-color: #fcd9b6; background: #fffaf3; }
.ps-status-loading { display: flex; align-items: center; gap: 11px; font-size: 14px; color: var(--mid); }
.ps-status-loading[hidden], .ps-status-body[hidden] { display: none !important; }
.ps-spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--border); border-top-color: var(--green); animation: ps-spin .7s linear infinite; flex: none; }
@keyframes ps-spin { to { transform: rotate(360deg); } }
.ps-status-body { display: flex; flex-direction: column; gap: 12px; }
.ps-check { display: flex; align-items: flex-start; gap: 11px; }
.ps-check-ic { flex: none; width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; margin-top: 1px; }
.ps-check-ok .ps-check-ic { background: var(--green); }
.ps-check-bad .ps-check-ic { background: #ef4444; }
.ps-check-label { margin: 0; font-size: 13.5px; font-weight: 700; color: var(--ink); }
.ps-check-msg { margin: 2px 0 0; font-size: 12.5px; color: var(--mid); line-height: 1.45; }

/* Accounts segment sub-nav (folded out of the global sidebar) */
.acct-segs { display: flex; gap: 8px; margin: 4px 0 22px; flex-wrap: wrap; }
.acct-seg { display: inline-flex; align-items: center; gap: 8px; padding: 8px 15px; border-radius: 999px; border: 1px solid var(--border); background: #fff; font-family: var(--ff-body); font-size: 13.5px; font-weight: 600; color: var(--mid); text-decoration: none; transition: border-color .12s ease, color .12s ease, background .12s ease; }
.acct-seg:hover { border-color: #cfd4d8; color: var(--ink); }
.acct-seg-active { background: var(--green-dd); border-color: var(--green-dd); color: #fff; }
.acct-seg-n { font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--bg-alt); color: var(--mid); font-variant-numeric: tabular-nums; }
.acct-seg-active .acct-seg-n { background: rgba(255,255,255,0.22); color: #fff; }

/* ============================================================
   Command palette (⌘K)
   ============================================================ */
.cmdk-dialog { padding: 0; border: none; background: transparent; max-width: 640px; width: 92vw; margin-top: 12vh; }
.cmdk-dialog::backdrop { background: rgba(15, 12, 26, 0.45); backdrop-filter: blur(3px); }
.cmdk-box { background: #fff; border-radius: 16px; box-shadow: 0 30px 80px rgba(20, 12, 36, 0.35); overflow: hidden; border: 1px solid var(--border); }
.cmdk-search { display: flex; align-items: center; gap: 11px; padding: 15px 18px; border-bottom: 1px solid var(--border); }
.cmdk-search-ic { color: var(--muted); display: inline-flex; flex: none; }
.cmdk-input { flex: 1; border: none; outline: none; font-family: var(--ff-body); font-size: 16px; color: var(--ink); background: transparent; }
.cmdk-input::placeholder { color: var(--muted); }
.cmdk-esc { flex: none; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg-alt); color: var(--muted); cursor: pointer; }
.cmdk-results { max-height: 56vh; overflow-y: auto; padding: 8px; }
.cmdk-group-head { margin: 8px 10px 4px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.cmdk-item { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 9px; text-decoration: none; color: var(--ink); }
.cmdk-item-active, .cmdk-item:hover { background: var(--green-l); }
.cmdk-item-ic { flex: none; width: 26px; height: 26px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; background: var(--bg-alt); color: var(--green-dd); }
.cmdk-item-avatar { background: linear-gradient(135deg, #1b7a5a, #2ead78); color: #fff; font-family: var(--ff-display); font-weight: 700; font-size: 12px; }
.cmdk-item-label { display: flex; flex-direction: column; line-height: 1.25; font-size: 14px; font-weight: 600; min-width: 0; }
.cmdk-item-sub { font-size: 11.5px; font-weight: 400; color: var(--muted); }
.cmdk-empty { padding: 26px; text-align: center; color: var(--muted); font-size: 14px; }

/* Collapsible "Accounts" group in the sidebar */
.sa-nav-accordion { display: block; }
.sa-nav-accordion-head { list-style: none; cursor: pointer; }
.sa-nav-accordion-head::-webkit-details-marker { display: none; }
.sa-nav-acc-caret { flex: none; margin-left: 2px; color: rgba(255, 255, 255, 0.42); transition: transform .15s ease; }
.sa-nav-accordion[open] .sa-nav-acc-caret { transform: rotate(180deg); }
.sa-nav-sub { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 2px 17px; padding-left: 9px; border-left: 1px solid rgba(255, 255, 255, 0.09); }
.sa-nav-sub .sa-nav-link { padding: 7px 10px; font-size: 12.7px; }
.sa-nav-sub .sa-nav-icon { width: 18px; height: 18px; }
/* Active sub-item: no filled box, just a clean underline */
.sa-nav-sub .sa-nav-link-active { background: none; box-shadow: none; }
.sa-nav-sub .sa-nav-link-active .sa-nav-label { font-weight: 700; }
.sa-nav-sub .sa-nav-link-active .sa-nav-count {
  background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.7);
}

/* ============================================================
   Super-admin top bar
   ============================================================ */
.sa-topbar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; height: 58px;
  background: rgba(248, 250, 249, 0.88); backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--border);
}
.sa-topbar-inner { max-width: 1180px; width: 100%; margin: 0 auto; padding: 0 32px; display: grid; grid-template-columns: minmax(280px, 440px) 1fr; align-items: center; gap: 16px; }
.sa-topbar-center { justify-self: start; width: 100%; min-width: 0; }
.sa-topbar-right { justify-self: end; display: flex; align-items: center; gap: 16px; }

/* Advanced dropdown */
.sa-adv { position: relative; }
.sa-adv-trigger { display: inline-flex; align-items: center; gap: 5px; padding: 7px 12px; border: 1px solid var(--border); border-radius: 9px; background: #fff; font-family: var(--ff-body); font-size: 13.5px; font-weight: 600; color: var(--ink); cursor: pointer; transition: background .12s ease, border-color .12s ease; }
.sa-adv-trigger:hover { background: var(--bg-alt); }
.sa-adv.is-open .sa-adv-trigger { background: var(--bg-alt); border-color: #cfd4d8; }
.sa-adv-caret { color: var(--muted); transition: transform .15s ease; }
.sa-adv.is-open .sa-adv-caret { transform: rotate(180deg); }
.sa-adv-menu { position: absolute; top: calc(100% + 8px); right: 0; min-width: 190px; background: #fff; border: 1px solid var(--border); border-radius: 11px; box-shadow: 0 16px 40px rgba(16,40,30,0.14); padding: 6px; z-index: 60; }
.sa-adv-menu[hidden] { display: none; }
.sa-adv-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; font-size: 13.5px; font-weight: 500; color: var(--ink); text-decoration: none; }
.sa-adv-item:hover { background: var(--bg-alt); }
.sa-adv-ic { display: inline-flex; flex: none; color: var(--green-dd); }

/* Hegel pill */
.sa-topbar-hegel { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 9px; border: 1px solid var(--border-g, #cdeadd); background: var(--green-l); color: var(--green-dd); font-size: 13.5px; font-weight: 700; text-decoration: none; transition: background .12s ease; }
.sa-topbar-hegel:hover { background: var(--green-xl, #eaf6f0); }
.sa-topbar-hegel.is-active { background: var(--green-dd); color: #fff; border-color: var(--green-dd); }
.sa-topbar-ai { font-size: 9.5px; font-weight: 800; letter-spacing: 0.05em; padding: 1px 5px; border-radius: 4px; background: var(--green); color: #fff; }
.sa-topbar-hegel.is-active .sa-topbar-ai { background: rgba(255,255,255,0.25); }

/* Profile avatar + dropdown */
.sa-profile { position: relative; }
.sa-profile-btn { padding: 0; border: none; background: none; cursor: pointer; border-radius: 50%; line-height: 0; }
.sa-profile-btn:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.sa-profile-avatar { width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1b7a5a, #2ead78); color: #fff; font-family: var(--ff-display); font-weight: 700; font-size: 15px; box-shadow: 0 2px 6px rgba(27,122,90,0.25); transition: transform .1s ease; }
.sa-profile-btn:hover .sa-profile-avatar { transform: translateY(-1px); }
.sa-profile-menu { position: absolute; top: calc(100% + 8px); right: 0; min-width: 230px; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 16px 40px rgba(16,40,30,0.16); padding: 14px; display: flex; flex-direction: column; gap: 9px; align-items: flex-start; z-index: 60; }
.sa-profile-menu[hidden] { display: none; }
.sa-profile-role { font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--green-dd); background: var(--green-l); padding: 3px 10px; border-radius: 999px; }
.sa-profile-email { font-size: 13px; color: var(--mid); word-break: break-all; }
.sa-profile-signout-form { width: 100%; border-top: 1px solid var(--border); padding-top: 9px; margin-top: 2px; }
.sa-profile-signout { background: none; border: none; padding: 0; cursor: pointer; font-family: var(--ff-body); font-size: 13.5px; font-weight: 600; color: var(--ink); }
.sa-profile-signout:hover { color: var(--green-dd); text-decoration: underline; }
@media (max-width: 720px) { .sa-topbar-inner { padding: 0 16px; gap: 10px; grid-template-columns: 1fr auto; } .sa-topbar-center { display: none; } }

/* ===== Global account search (top bar typeahead) ===== */
.acct-search { position: relative; width: 100%; }
.acct-search-box { display: flex; align-items: center; gap: 9px; height: 40px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--border); background: #fff; transition: border-color .12s ease, box-shadow .12s ease; }
.acct-search-box:focus-within { border-color: var(--green-d); box-shadow: 0 0 0 3px rgba(85,206,151,0.16); }
.acct-search-ic { flex: none; color: var(--muted); }
.acct-search-box:focus-within .acct-search-ic { color: var(--green-dd); }
.acct-search-input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font-family: var(--ff-body); font-size: 14px; color: var(--ink); }
.acct-search-input::placeholder { color: var(--muted); }
.acct-search-kbd { flex: none; font-family: var(--ff-body); font-size: 12px; font-weight: 700; color: var(--muted); background: var(--bg-alt); border: 1px solid var(--border); border-radius: 6px; padding: 1px 7px; line-height: 1.5; }

.acct-search-panel { position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 70; background: #fff; border: 1px solid var(--border); border-radius: 13px; box-shadow: 0 18px 44px rgba(16,40,30,0.16); overflow: hidden; }
.acct-search-panel[hidden] { display: none; }
.acct-search-results { max-height: min(60vh, 420px); overflow-y: auto; padding: 6px; }
.acct-search-note { margin: 0; padding: 16px 14px; font-size: 13px; color: var(--muted); text-align: center; }

.acct-search-group + .acct-search-group { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 4px; }
.acct-search-group-head { margin: 0; padding: 8px 11px 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.acct-search-list { list-style: none; margin: 0; padding: 0; }
.acct-search-item { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 9px; text-decoration: none; color: var(--ink); }
.acct-search-item:hover, .acct-search-item-active { background: var(--bg-alt); }
.acct-search-avatar { flex: none; width: 32px; height: 32px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; background: var(--green-l); color: var(--green-dd); font-family: var(--ff-display); font-weight: 700; font-size: 14px; }
.acct-search-avatar-agent { background: #e8eefc; color: #2f52b0; }
.acct-search-avatar-meeting { background: #f3ecfb; color: #7040b0; }
.acct-search-avatar-task { background: #fdf0e3; color: #b56a13; }
.acct-search-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.acct-search-name { font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-search-sub { font-size: 12px; color: var(--mid); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-search-badge { flex: none; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px; border-radius: 999px; background: var(--bg-alt); color: var(--mid); border: 1px solid var(--border); }

/* Search inside the regular-agent top bar (application layout) */
.user-bar-search { flex: 0 1 440px; margin: 0 auto 0 28px; }
.user-bar-search .acct-search-box { height: 36px; }
@media (max-width: 720px) { .user-bar-search { display: none; } }

/* Dashboard: per-phase count chips under the subtitle */
.dash-phase-counts { display: flex; flex-wrap: wrap; gap: 8px 12px; margin: 10px 0 0; }
.dash-pc { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--mid); }
.dash-pc strong { color: var(--ink); font-weight: 700; }
.dash-pc::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--pc, #94a3b8); flex: none; }
.dash-pc-blue  { --pc: #3b82f6; }
.dash-pc-green { --pc: #2ead78; }
.dash-pc-slate { --pc: #1f2937; }
.dash-pc-amber { --pc: #f59e0b; }
.dash-pc-sep { align-self: center; width: 1px; height: 13px; background: #d9deea; flex: none; margin: 0 2px; }
.dash-pc-tasks { color: var(--mid); }
.dash-pc-tasks::before { display: none; }
.dash-pc-tasks svg { color: #7c3aed; flex: none; }

/* Agent accounts page: filters + view toggle + create in one row */
.workspace-controls-onerow { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.workspace-filters-inline { flex: 1 1 auto; min-width: 0; }
.workspace-controls-right { display: flex; align-items: center; gap: 12px; flex: none; }
.agent-new-cta-sm { padding: 9px 15px; font-size: 13.5px; }
@media (max-width: 720px) {
  .workspace-controls-onerow { flex-direction: column; align-items: stretch; }
  .workspace-controls-right { justify-content: space-between; }
}

/* ===== Five Phases — serpentine journey mind map ===== */
.fp-page { max-width: 1080px; margin: 0 auto; }
.fp-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.fp-picker-select {
  appearance: none; border: 1px solid var(--border, #e3e6ee); background: #fff;
  border-radius: 10px; padding: 9px 34px 9px 13px; font-size: 14px; font-weight: 600;
  color: var(--text, #1f2430); cursor: pointer; min-width: 230px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}

.fp-back {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 16px;
  font-size: 13px; font-weight: 600; color: #5b6273; text-decoration: none;
  transition: color .14s ease;
}
.fp-back:hover { color: #0f766e; }

.fp-account {
  display: inline-flex; align-items: center; padding: 8px 14px; border-radius: 10px;
  background: #f1f3f9; color: #2b3142; font-size: 14px; font-weight: 700;
}

.fp-summary { display: flex; align-items: center; gap: 22px; margin-bottom: 30px; }
.fp-ring {
  position: relative; flex: none; width: 88px; height: 88px; border-radius: 50%;
  display: grid; place-items: center;
  background: conic-gradient(#7c3aed calc(var(--p) * 1%), #e9ecf3 0);
}
.fp-ring::after { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: #fff; }
.fp-ring-num { position: relative; z-index: 1; font-size: 20px; font-weight: 700; color: #4c2dab; }
.fp-summary-line { margin: 0 0 10px; font-size: 15px; color: var(--text, #1f2430); }
.fp-summary-line strong { font-weight: 700; }
.fp-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.fp-legend-item { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: #4a5163; }
.fp-legend-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--fp); }
.fp-legend-count { color: #98a0b3; font-weight: 600; }

/* Map + wires */
.fp-map { position: relative; padding: 18px 8px 8px; }
.fp-wires { position: absolute; inset: 18px 8px 8px; z-index: 0; pointer-events: none; overflow: visible; }
.fp-wire { fill: none; stroke: #d4d9e6; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.fp-grid {
  position: relative; z-index: 1; display: grid; gap: 84px 0;
  justify-items: center; align-items: center;
}

/* Nodes — the box is the circle itself, so wires connect circle centres */
.fp-node {
  position: relative; width: 30px; height: 30px; display: grid; place-items: center;
  cursor: default; outline: none; transition: transform .14s ease;
}
.fp-node:hover, .fp-node:focus-visible { transform: scale(1.16); z-index: 5; }
.fp-dot {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; border: 2.5px solid var(--fp); color: #fff;
  box-shadow: 0 1px 3px rgba(20, 25, 40, .10); transition: background .14s ease, box-shadow .14s ease;
}
.fp-node.is-done .fp-dot { background: var(--fp); box-shadow: 0 2px 8px color-mix(in srgb, var(--fp) 40%, transparent); }
.fp-node:not(.is-done) .fp-dot { background: #fff; }

/* A relevant line-icon when pending; a tick replaces it when done */
.fp-glyph { color: var(--fp); opacity: .92; }
.fp-tick { color: #fff; }

/* Tiny step name under the circle (full title lives in the hover popover) */
.fp-label {
  position: absolute; top: calc(100% + 7px); left: 50%; transform: translateX(-50%);
  width: 104px; text-align: center; font-size: 9.5px; line-height: 1.25; font-weight: 600;
  color: #8b93a6; letter-spacing: .1px; pointer-events: none;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.fp-node.is-done .fp-label { color: #5b6273; }

/* Hover popover */
.fp-pop {
  position: absolute; bottom: calc(100% + 12px); left: 50%; transform: translateX(-50%) translateY(4px);
  min-width: 150px; max-width: 250px; width: max-content; padding: 9px 12px;
  background: #1f2430; color: #fff; border-radius: 9px; box-shadow: 0 10px 26px rgba(15, 20, 35, .28);
  opacity: 0; pointer-events: none; transition: opacity .14s ease, transform .14s ease; z-index: 20;
  text-align: left;
}
.fp-pop::after {
  content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: #1f2430;
}
.fp-pop-title { display: block; font-size: 13px; font-weight: 600; line-height: 1.35; }
.fp-pop-meta { display: block; margin-top: 3px; font-size: 11.5px; font-weight: 500; color: #aeb6c8; }
.fp-node:hover .fp-pop, .fp-node:focus-visible .fp-pop { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Phase colours */
.fp-c-blue   { --fp: #3b82f6; }
.fp-c-violet { --fp: #8b5cf6; }
.fp-c-teal   { --fp: #14b8a6; }
.fp-c-amber  { --fp: #f59e0b; }
.fp-c-rose   { --fp: #f43f5e; }

.fp-empty { padding: 40px; text-align: center; color: #98a0b3; font-size: 15px; }

/* Share button + popover */
.fp-header-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.fp-share { position: relative; }
.fp-share-btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; border-radius: 9px; background: #fff; border: 1px solid var(--border, #e3e6ee); color: var(--text, #1f2430); font-family: var(--ff-body); font-size: 13.5px; font-weight: 600; cursor: pointer; transition: background .12s ease, border-color .12s ease; }
.fp-share-btn:hover { background: var(--bg-alt, #f6f7fb); border-color: #c8cedd; }
.fp-share-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 30; width: 340px; max-width: 86vw; padding: 16px; background: #fff; border: 1px solid var(--border, #e3e6ee); border-radius: 12px; box-shadow: 0 16px 40px rgba(15, 20, 35, .16); }
.fp-share-menu[hidden] { display: none; }
.fp-share-title { margin: 0 0 4px; font-size: 13.5px; font-weight: 700; color: var(--ink, #1f2430); }
.fp-share-hint { margin: 0 0 12px; font-size: 12px; line-height: 1.45; color: var(--mid, #6b7280); }
.fp-share-row { display: flex; gap: 8px; }
.fp-share-input { flex: 1 1 auto; min-width: 0; padding: 9px 11px; border: 1px solid var(--border, #e3e6ee); border-radius: 8px; background: var(--bg-alt, #f6f7fb); font-size: 12.5px; color: var(--mid, #4a5163); }
.fp-share-copy { flex: none; padding: 9px 15px; border-radius: 8px; background: var(--green, #54ce97); border: 1px solid var(--green, #54ce97); color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .12s ease; }
.fp-share-copy:hover { background: var(--green-dd, #2ead78); }
.fp-share-copy.is-copied { background: #1f9d63; border-color: #1f9d63; }

/* Public read-only share page */
.fp-public-body { background: #f7f8fb; }
.fp-public-shell { max-width: 1040px; margin: 0 auto; padding: 40px 24px 64px; }
.fp-public { max-width: none; }
.fp-public-head { margin-bottom: 30px; }
.fp-public-brand { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; font-size: 14px; font-weight: 700; color: #4c2dab; }
.fp-public-mark { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, #7c3aed, #a855f7); color: #fff; }
.fp-public-foot { margin-top: 34px; text-align: center; font-size: 12px; color: #aab2c4; }
.fp-public-missing { max-width: 520px; margin: 12vh auto 0; text-align: center; padding: 0 24px; }
.fp-public-missing .fp-public-mark { width: 48px; height: 48px; border-radius: 13px; margin-bottom: 18px; }
.fp-public-missing h1 { font-family: var(--ff-display); font-size: 24px; color: var(--ink, #1f2430); margin: 0 0 10px; }
.fp-public-missing p { font-size: 14.5px; line-height: 1.6; color: var(--mid, #6b7280); margin: 0; }

@media (max-width: 720px) {
  .fp-header { flex-direction: column; }
  .fp-map { overflow-x: auto; }
  .fp-grid { min-width: 560px; }
}

/* Dashboard owner picker (super admin) */
.dash-title-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.dash-owner-picker { margin: 4px 0 2px; }
.dash-owner-select {
  appearance: none; border: 1px solid var(--border, #e3e6ee); background: #fff;
  border-radius: 10px; padding: 8px 32px 8px 13px; font-size: 13.5px; font-weight: 600;
  color: var(--text, #1f2430); cursor: pointer; min-width: 190px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
}
.dash-owner-select:hover { border-color: #c8cedd; }

/* ===== Communication Summary analysis (renewal outlook comms tab) ===== */
.ca-shell { padding: 0; }
.ca-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 24px 30px; border-bottom: 1px solid var(--border, #eef0f5); }
.ca-actions { display: inline-flex; align-items: center; gap: 12px; flex: none; }
.ca-config-link { background: none; border: 0; padding: 0; cursor: pointer; font-family: var(--ff-body); font-size: 13px; font-weight: 600; color: #6b1f4a; }
.ca-config-link:hover { text-decoration: underline; }
.ca-reindex { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 9px; background: #6b1f4a; color: #fff; border: 1px solid #6b1f4a; font-family: var(--ff-body); font-size: 13px; font-weight: 600; cursor: pointer; transition: filter .12s ease; }
.ca-reindex:hover { filter: brightness(1.12); }
.ca-reindex:disabled { opacity: .65; cursor: default; }

.ca-statusline { margin: 0; padding: 14px 30px; font-size: 13px; font-weight: 600; }
.ca-statusline-busy { color: #6b1f4a; background: #fbeef5; }
.ca-statusline-error { color: #c0392b; background: #fdf0f0; }

.ca-empty { padding: 64px 30px; text-align: center; color: var(--mid, #5b6273); font-size: 14px; line-height: 1.6; }
.ca-error { margin: 20px 30px 0; padding: 12px 15px; background: #fdf0f0; border: 1px solid #f4cfcf; border-radius: 10px; font-size: 13px; color: #991b1b; }
.ca-error-soft { background: #fff7ed; border-color: #fed7aa; color: #9a3412; }

/* Three airy columns: metrics, shortcomings + alerts, product gaps. */
.ca-split { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0; padding: 30px 34px 38px; align-items: start; }
.ca-col { padding: 0 34px; min-width: 0; }
.ca-col:first-child { padding-left: 0; }
.ca-col:last-child { padding-right: 0; }
.ca-col:not(:last-child) { border-right: 1px solid var(--border, #eef0f5); }
.ca-col-title { margin: 0 0 16px; font-family: var(--ff-body); font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted, #98a0b3); }
.ca-col-note { margin: -10px 0 16px; font-size: 11.5px; font-style: italic; color: var(--muted, #98a0b3); }

/* Overall metrics score banner */
.ca-overall { display: flex; flex-direction: column; gap: 12px; padding: 15px 15px 17px; margin-bottom: 18px; border-radius: 14px; background: var(--bg-alt, #f9fafc); }
.ca-overall-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.ca-overall-label { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted, #98a0b3); }
.ca-overall-score { font-family: var(--ff-display); font-size: 27px; font-weight: 700; line-height: 1; color: var(--ink, #1f2430); }
.ca-overall-score small { font-size: 13px; font-weight: 600; color: var(--muted, #98a0b3); }
.ca-tone-green .ca-overall-score { color: #1f8a54; }
.ca-tone-amber .ca-overall-score { color: #b45309; }
.ca-tone-red   .ca-overall-score { color: #c0392b; }
.ca-col-sep { border: 0; border-top: 1px solid var(--border, #eef0f5); margin: 40px 0 24px; }

.ca-item { border-top: 1px solid #f2f4f8; }
.ca-item:first-child { border-top: 0; }
.ca-item[open] { background: var(--bg-alt, #f9fafc); border-radius: 12px; margin: 4px 0; border-top-color: transparent; }
.ca-item[open] + .ca-item { border-top-color: transparent; }
.ca-item-row { display: flex; flex-direction: column; gap: 11px; padding: 16px 12px; cursor: pointer; list-style: none; border-radius: 12px; transition: background .12s ease; }
.ca-item-row::-webkit-details-marker { display: none; }
.ca-item:not([open]) .ca-item-row:hover { background: var(--bg-alt, #f9fafc); }
.ca-item-head { display: flex; align-items: center; gap: 12px; }
.ca-item-label { flex: 1 1 auto; min-width: 0; font-size: 13.5px; font-weight: 600; line-height: 1.4; color: var(--ink, #1f2430); }
.ca-item-score { flex: none; font-family: var(--ff-display); font-size: 19px; font-weight: 700; line-height: 1; color: var(--ink, #1f2430); }
.ca-item-score small { font-size: 11px; font-weight: 600; color: var(--muted, #98a0b3); }
.ca-caret { flex: none; width: 8px; height: 8px; border-right: 2px solid #c2c8d4; border-bottom: 2px solid #c2c8d4; transform: rotate(45deg); transition: transform .15s ease; margin-left: 2px; margin-top: -3px; }
.ca-item[open] .ca-caret { transform: rotate(-135deg); margin-top: 2px; }

.ca-bar-track { display: block; height: 8px; border-radius: 999px; background: #edeff4; overflow: hidden; }
.ca-bar-fill { display: block; height: 100%; border-radius: 999px; background: #aab2c4; }
.ca-tone-green .ca-bar-fill { background: #2ead78; }
.ca-tone-amber .ca-bar-fill { background: #f59e0b; }
.ca-tone-red   .ca-bar-fill { background: #e11d48; }
.ca-tone-green .ca-item-score { color: #1f8a54; }
.ca-tone-amber .ca-item-score { color: #b45309; }
.ca-tone-red   .ca-item-score { color: #c0392b; }

.ca-item-detail { padding: 2px 12px 18px; font-size: 13px; line-height: 1.65; color: var(--mid, #5b6273); }
.ca-item-detail span { display: block; margin-bottom: 6px; }

/* Circled bullet points inside an expanded item */
.ca-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.ca-points li { position: relative; padding-left: 20px; font-size: 13px; line-height: 1.6; color: var(--mid, #5b6273); }
.ca-points li::before { content: ""; position: absolute; left: 3px; top: 7px; width: 6px; height: 6px; border-radius: 50%; border: 1.5px solid #c2c8d4; }
.ca-tone-green .ca-points li::before { border-color: #86d3ac; }
.ca-tone-amber .ca-points li::before { border-color: #f6c667; }
.ca-tone-red   .ca-points li::before { border-color: #f0a0ac; }

.ca-alert-judgment { position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; font-size: 11px; font-weight: 700; text-transform: uppercase; background: #eef2f7; color: #5b6273; cursor: help; }
.ca-alert-judgment::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 7px); left: 50%; transform: translateX(-50%); white-space: nowrap; background: #1f2430; color: #fff; font-size: 11px; font-weight: 600; text-transform: none; letter-spacing: normal; padding: 4px 9px; border-radius: 7px; opacity: 0; visibility: hidden; transition: opacity .12s ease; pointer-events: none; z-index: 20; }
.ca-alert-judgment::before { content: ""; position: absolute; bottom: calc(100% + 2px); left: 50%; transform: translateX(-50%); border: 5px solid transparent; border-top-color: #1f2430; opacity: 0; visibility: hidden; transition: opacity .12s ease; pointer-events: none; z-index: 20; }
.ca-alert-judgment:hover::after, .ca-alert-judgment:hover::before { opacity: 1; visibility: visible; }
.ca-alert-raised .ca-alert-judgment { background: #fde8e8; color: #c0392b; }
.ca-alert-clear .ca-alert-judgment { background: #e7f6ee; color: #1f8a54; }
.ca-alert-raised .ca-item-label::before,
.ca-alert-clear .ca-item-label::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.ca-alert-raised .ca-item-label::before { background: #e11d48; }
.ca-alert-clear .ca-item-label::before { background: #2ead78; }
.ca-alert-neutral .ca-item-label::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 8px; vertical-align: middle; background: #cbd2e0; }
.ca-alert-note { margin: 0 0 8px; font-size: 12px; color: var(--muted, #98a0b3); }

/* Sources chip (ChatGPT-style citations) */
.ca-sources { margin-top: 9px; }
.ca-sources-chip { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; list-style: none; font-size: 11px; font-weight: 600; color: var(--mid, #5b6273); background: var(--bg-alt, #f1f3f9); border: 1px solid var(--border, #e3e6ee); border-radius: 999px; padding: 3px 11px; transition: background .12s ease, color .12s ease, border-color .12s ease; }
.ca-sources-chip::-webkit-details-marker { display: none; }
.ca-sources-chip:hover { background: #fff; color: var(--ink, #1f2430); border-color: #c8cedd; }
.ca-sources-n { font-weight: 700; color: #6b1f4a; }
.ca-sources-list { list-style: none; margin: 9px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ca-sources-list li { font-size: 12px; line-height: 1.45; color: var(--mid, #5b6273); padding: 7px 11px; background: var(--bg-alt, #f8f9fc); border: 1px solid var(--border, #eef0f5); border-radius: 8px; }
.ca-src-date { font-weight: 700; color: var(--ink, #1f2430); margin-right: 8px; font-variant-numeric: tabular-nums; }
.ca-src-subject { color: var(--mid, #5b6273); }

@media (max-width: 1000px) {
  .ca-split { grid-template-columns: 1fr; padding: 24px 24px 30px; }
  .ca-col { padding: 28px 0 0; border-right: 0 !important; border-top: 1px solid var(--border, #eef0f5); margin-top: 28px; }
  .ca-col:first-child { padding-top: 0; margin-top: 0; border-top: 0; }
}

.ca-prompt-modal { max-width: 720px; }
.ca-prompt-title { margin: 0; font-family: var(--ff-display); font-size: 18px; font-weight: 600; color: var(--ink, #1f2430); }
.ca-prompt-hint { margin: 0 20px 12px; font-size: 12.5px; line-height: 1.5; color: var(--mid, #5b6273); }
.ca-prompt-textarea { width: calc(100% - 40px); margin: 0 20px; padding: 12px 13px; border: 1px solid var(--border, #e3e6ee); border-radius: 10px; font-family: var(--ff-mono, ui-monospace, monospace); font-size: 12.5px; line-height: 1.6; color: var(--ink, #1f2430); resize: vertical; }
.ca-prompt-textarea:focus { outline: none; border-color: #843f72; }

/* ===== Leadership tasks board ===== */
.lt-header-actions { display: flex; align-items: center; gap: 12px; flex: none; }
.lt-filter { display: inline-flex; align-items: center; gap: 10px; }
.lt-filter-select { padding: 9px 14px; border: 1px solid var(--border); border-radius: 9px; background: #fff; font-family: var(--ff-body); font-size: 13.5px; font-weight: 600; color: var(--ink); cursor: pointer; transition: background .12s ease, border-color .12s ease; }
.lt-filter-select:hover { background: var(--bg-alt); border-color: #cfd4d8; }
.lt-filter-select:focus { outline: none; border-color: #8b5cf6; }

/* Why-leadership + confidence chips on a board card */
.lt-card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 2px; }
.lt-tag { font-size: 10.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; letter-spacing: .02em; white-space: nowrap; }
.lt-tag-why { background: #eaf0f7; color: #2f4d7d; }
.lt-conf-low { background: #fde8e8; color: #c0392b; }
.lt-conf-medium { background: #fef3e2; color: #b45309; }
.lt-conf-high { background: #e7f6ee; color: #1f8a54; }
.lt-conf-low, .lt-conf-medium, .lt-conf-high { font-size: 10.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }

/* Function colour bar above the card title */
.lt-fn-bar { display: block; width: 15%; height: 4px; border-radius: 999px; margin-bottom: 11px; }
.lt-fn-bar-engineering { background: #2ead78; }
.lt-fn-bar-cs { background: #8b5cf6; }
.lt-fn-bar-both { background: #eab308; }

/* Function colour legend above the board */
.lt-controls-left { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.lt-legend { display: inline-flex; align-items: center; gap: 16px; }
.lt-legend-item { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--mid); }
.lt-legend-dot { width: 11px; height: 11px; border-radius: 3px; flex: none; }
.lt-legend-engineering { background: #2ead78; }
.lt-legend-cs { background: #8b5cf6; }
.lt-legend-both { background: #eab308; }

/* Function radio group on the form */
.ltf-field-radios { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.ltf-radios { display: inline-flex; gap: 10px; flex-wrap: wrap; }
.ltf-radio { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 1px solid var(--border); border-radius: 11px; background: #fff; cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--mid); transition: border-color .12s ease, box-shadow .12s ease, color .12s ease; }
.ltf-radio input { position: absolute; opacity: 0; width: 0; height: 0; }
.ltf-radio::before { content: ""; width: 11px; height: 11px; border-radius: 3px; background: var(--_fn, #c2c8d4); flex: none; }
.ltf-radio-engineering { --_fn: #2ead78; }
.ltf-radio-cs { --_fn: #8b5cf6; }
.ltf-radio-both { --_fn: #eab308; }
.ltf-radio:hover { border-color: #c8cedd; }
.ltf-radio:has(input:checked) { color: var(--ink); border-color: var(--_fn); box-shadow: inset 0 0 0 1px var(--_fn); }

/* Prominent "waiting for review by" banner on a card */
.lt-review { display: flex; align-items: center; gap: 6px; margin: 10px 0 2px; padding: 6px 9px; border-radius: 8px; background: #f4f5f7; color: #3f4451; font-size: 11.5px; font-weight: 600; line-height: 1.3; }
.lt-review strong { font-weight: 800; }
.lt-review svg { flex: none; }

/* Capped textareas (define success, biggest risk, optics, strategy) */
.ab-field-full { flex: 1 1 100%; }
.lt-textareas { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.lt-textarea { width: 100%; padding: 9px 11px; border: 1px solid var(--border, #e3e6ee); border-radius: 9px; font-family: var(--ff-body); font-size: 13px; line-height: 1.5; color: var(--ink); resize: vertical; }
.lt-textarea:focus { outline: none; border-color: #843f72; }
.lt-wordcount { font-weight: 600; font-size: 11px; color: var(--muted); text-transform: none; letter-spacing: 0; }
.lt-wordcount-full { color: #b45309; }

/* Learnings link in the ticket modal */
.lt-learnings-linkrow { margin: 0 0 12px; }
.lt-learnings-link { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--border-g, #cdeadd); border-radius: 8px; background: var(--green-l); color: var(--green-dd); font-family: var(--ff-body); font-size: 12.5px; font-weight: 700; cursor: pointer; }
.lt-learnings-link:hover { background: var(--green-xl, #eaf6f0); }
.lt-learnings-link svg { flex: none; }

/* ===== Leadership task form page (classy full-page form) ===== */
.ltf-page { max-width: 880px; margin: 0 auto; padding: 2px 0 40px; }
.ltf-back { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--mid); text-decoration: none; margin-bottom: 16px; }
.ltf-back:hover { color: var(--ink); }
.ltf-back svg { flex: none; }
.ltf-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }

.ltf-form { display: flex; flex-direction: column; gap: 20px; }
.ltf-errors { padding: 12px 16px; border-radius: 12px; background: #fdf0f0; border: 1px solid #f4cfcf; color: #991b1b; font-size: 13px; }
.ltf-errors strong { display: block; margin-bottom: 4px; }
.ltf-errors ul { margin: 0; padding-left: 18px; }

.ltf-hero { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 6px 22px; box-shadow: 0 1px 2px rgba(16,24,40,0.04); }
.ltf-title { width: 100%; border: none; outline: none; background: transparent; font-family: var(--ff-display); font-size: 26px; font-weight: 600; color: var(--ink); padding: 16px 0; }
.ltf-title::placeholder { color: #c3c7d2; }

.ltf-section { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 22px 24px 24px; box-shadow: 0 1px 2px rgba(16,24,40,0.04); }
.ltf-section-head { display: flex; align-items: center; gap: 13px; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.ltf-section-ic { flex: none; width: 38px; height: 38px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #f3ecfb, #eaf6f0); color: #6b1f4a; }
.ltf-section-title { margin: 0; font-family: var(--ff-display); font-size: 17px; font-weight: 600; color: var(--ink); }
.ltf-section-sub { margin: 1px 0 0; font-size: 12.5px; color: var(--muted); }

.ltf-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 18px; }
.ltf-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.ltf-field-label { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--mid); }
.ltf-field-ic { display: inline-flex; color: #843f72; }

.ltf-select-wrap { position: relative; display: block; }
.ltf-select-wrap::after { content: ""; position: absolute; right: 14px; top: 50%; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-65%) rotate(45deg); pointer-events: none; }
.ltf-select { -webkit-appearance: none; appearance: none; width: 100%; padding: 11px 36px 11px 13px; border: 1px solid var(--border); border-radius: 11px; background: #fff; font-family: var(--ff-body); font-size: 14px; font-weight: 500; color: var(--ink); cursor: pointer; transition: border-color .12s ease, box-shadow .12s ease; }
.ltf-select:hover { border-color: #c8cedd; }
.ltf-select:focus { outline: none; border-color: #843f72; box-shadow: 0 0 0 3px rgba(132,63,114,0.14); }

.ltf-stack { display: flex; flex-direction: column; gap: 18px; }
.ltf-ta-field { display: flex; flex-direction: column; gap: 8px; }
.ltf-ta-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ltf-wordcount { font-size: 11px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.ltf-wordcount.is-full { color: #b45309; }
.ltf-textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-alt, #f9fafc); font-family: var(--ff-body); font-size: 14px; line-height: 1.55; color: var(--ink); resize: vertical; min-height: 52px; transition: border-color .12s ease, box-shadow .12s ease, background .12s ease; }
.ltf-textarea::placeholder { color: var(--muted); }
.ltf-textarea:focus { outline: none; background: #fff; border-color: #843f72; box-shadow: 0 0 0 3px rgba(132,63,114,0.14); }

.ltf-foot { display: flex; align-items: center; gap: 12px; position: sticky; bottom: 0; margin-top: 2px; padding: 14px 4px; background: linear-gradient(to top, var(--bg-alt, #f7f9f8) 62%, rgba(247,249,248,0)); }
.ltf-foot-right { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.ltf-submit { display: inline-flex; align-items: center; gap: 8px; padding: 12px 26px; border: none; border-radius: 11px; background: #6b1f4a; color: #fff; font-family: var(--ff-body); font-size: 14px; font-weight: 700; cursor: pointer; box-shadow: 0 6px 18px rgba(107,31,74,0.24); transition: filter .12s ease; }
.ltf-submit:hover { filter: brightness(1.12); }
.ltf-cancel { font-size: 13.5px; font-weight: 600; color: var(--mid); text-decoration: none; }
.ltf-cancel:hover { color: var(--ink); }
.ltf-delete { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: #c0392b; text-decoration: none; }
.ltf-delete:hover { text-decoration: underline; }
.ltf-delete svg { flex: none; }

.ltf-learnings-btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border: 1px solid var(--border-g, #cdeadd); border-radius: 10px; background: var(--green-l); color: var(--green-dd); font-family: var(--ff-body); font-size: 13px; font-weight: 700; cursor: pointer; }
.ltf-learnings-btn:hover { background: var(--green-xl, #eaf6f0); }

.ltf-comments { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 22px 24px; box-shadow: 0 1px 2px rgba(16,24,40,0.04); margin-top: 6px; }
.ltf-comments-title { margin: 0 0 14px; font-family: var(--ff-display); font-size: 16px; font-weight: 600; color: var(--ink); }

/* Two-pane edit: form centre, comments right */
.ltf-page-wide { max-width: 1200px; }
.ltf-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 26px; align-items: start; }
.ltf-main { min-width: 0; }
.ltf-side { position: sticky; top: 18px; }
.ltf-side .ltf-comments { display: flex; flex-direction: column; height: calc(75vh - 36px); margin-top: 0; }
.ltf-comments-scroll { flex: 1 1 auto; overflow-y: auto; min-height: 60px; margin: 0 -6px 12px; padding: 0 6px; }
.ltf-comment-form { margin-top: auto; display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.ltf-comment-form .ab-comment-input { width: 100%; min-height: 68px; }
.ltf-comment-form button { align-self: flex-start; }
/* Line separator between comments in the right pane */
.ltf-comments .ab-comment-list { gap: 0; }
.ltf-comments .ab-comment { padding: 14px 0; border-top: 1px solid var(--border); }
.ltf-comments .ab-comment:first-child { border-top: 0; padding-top: 2px; }
@media (max-width: 940px) {
  .ltf-layout { grid-template-columns: 1fr; }
  .ltf-side { position: static; }
  .ltf-side .ltf-comments { height: 50vh; }
}

.lt-row-link { color: var(--ink); text-decoration: none; font-weight: 600; }
.lt-row-link:hover { color: var(--green-dd); text-decoration: underline; }

@media (max-width: 680px) { .ltf-grid { grid-template-columns: 1fr; } }

/* Learnings capture / view modal */
.lt-learnings-modal { width: min(560px, 94vw); }
.lt-learnings-head { padding: 22px 24px 8px; }
.lt-learnings-title { margin: 2px 0 0; font-family: var(--ff-display); font-size: 20px; font-weight: 600; color: var(--ink); }
.lt-learnings-body { padding: 0 24px 24px; }
.lt-learnings-prompt { margin: 4px 0 12px; font-size: 13.5px; font-weight: 600; color: var(--slate); }
.lt-learnings-textarea { width: 100%; box-sizing: border-box; padding: 12px 13px; border: 1px solid var(--border, #e3e6ee); border-radius: 10px; font-family: var(--ff-body); font-size: 14px; line-height: 1.6; color: var(--ink); resize: vertical; min-height: 130px; }
.lt-learnings-textarea::placeholder { color: var(--muted); }
.lt-learnings-textarea:focus { outline: none; border-color: #843f72; box-shadow: 0 0 0 3px rgba(132,63,114,0.14); }
.lt-learnings-foot { display: flex; justify-content: flex-end; margin-top: 16px; }

/* Read-only list of past learnings */
.lt-learning-list { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-direction: column; gap: 12px; max-height: 40vh; overflow-y: auto; }
.lt-learning-entry { padding: 12px 14px; border: 1px solid var(--border); border-radius: 11px; background: var(--bg-alt, #f9fafc); }
.lt-learning-text { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--ink); }
.lt-learning-text span { display: block; }
.lt-learning-meta { margin: 8px 0 0; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.lt-learning-add { border-top: 1px solid var(--border); padding-top: 16px; }

.prog-agent-tabs { margin: 6px 0 20px; }

/* ===== Programs table (sortable) ===== */
.prog-table th.wt-sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.prog-table th.wt-sortable:hover { color: var(--ink); }
.prog-table th.wt-sortable::after { content: ""; display: inline-block; width: 0; height: 0; margin-left: 6px; vertical-align: middle; border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 5px solid var(--muted); opacity: 0; transition: opacity .12s ease; }
.prog-table th.wt-sortable:hover::after { opacity: .4; }
.prog-table th.wt-sort-asc::after { opacity: 1; border-bottom: 5px solid var(--green-dd); border-top: 0; }
.prog-table th.wt-sort-desc::after { opacity: 1; border-top: 5px solid var(--green-dd); border-bottom: 0; }
.prog-table td { vertical-align: middle; }

.prog-cust { font-weight: 600; color: var(--ink); text-decoration: none; }
.prog-cust:hover { color: var(--green-dd); text-decoration: underline; }
.prog-name { color: var(--slate); text-decoration: none; }
.prog-name:hover { color: var(--green-dd); text-decoration: underline; }
.prog-agent { color: var(--slate); font-weight: 500; }
.prog-agent-none { color: var(--muted); font-style: italic; font-weight: 400; }

.prog-days { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--slate); }
.prog-days-none { color: var(--muted); font-weight: 500; }
.prog-days-soon { color: #b45309; }
.prog-days-over { color: #c0392b; }

.prog-pct { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 14px; color: var(--slate); }
.prog-pct-full { color: #1f8a54; }
.prog-pct-mid { color: #b45309; }
.prog-pct-low { color: #c0392b; }

/* Left-align the Five phases column so header and button line up */
.prog-table th.wt-actions, .prog-table td.wt-actions { text-align: left; }
.prog-fp { display: inline-flex; align-items: center; gap: 6px; font-family: var(--ff-body); font-size: 12.5px; font-weight: 600; color: var(--green-dd); text-decoration: none; padding: 6px 12px; border: 1px solid var(--border-g, #cdeadd); border-radius: 8px; background: var(--green-l); white-space: nowrap; cursor: pointer; transition: background .12s ease; }
.prog-fp:hover { background: var(--green-xl, #eaf6f0); }
.prog-fp svg { flex: none; }

/* In-page Five Phases modal (from the Programs table) */
.fp-modal-dialog { width: min(1080px, 94vw); max-width: 94vw; max-height: 88vh; padding: 0; border: none; border-radius: 16px; box-shadow: 0 30px 80px rgba(20,12,36,0.35); overflow: visible; }
.fp-modal-dialog::backdrop { background: rgba(20,20,30,0.45); }
.fp-modal-close { position: absolute; top: 14px; right: 16px; z-index: 5; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border); background: #fff; color: var(--mid); font-size: 20px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.fp-modal-close:hover { background: var(--bg-alt); color: var(--ink); }
.fp-modal-body { max-height: 88vh; overflow: auto; padding: 26px 28px 30px; border-radius: 16px; background: #fff; }
.fp-modal-head { margin-bottom: 10px; }
.fp-modal-title { margin: 2px 0 0; font-family: var(--ff-display); font-size: 22px; font-weight: 600; color: var(--ink); }
.fp-modal-fullink { display: inline-block; margin-top: 8px; font-size: 12.5px; font-weight: 600; color: var(--green-dd); text-decoration: none; }
.fp-modal-fullink:hover { text-decoration: underline; }
.fp-modal-loading { padding: 64px 20px; text-align: center; color: var(--muted); font-size: 14px; }
.fp-page-modal { margin-top: 4px; }

/* ===================== Prep Center ===================== */
.prep-page [hidden] { display: none !important; }
.prep-page { max-width: 1240px; margin: 0 auto; padding: 2px 0 60px; }
.prep-back { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--mid); text-decoration: none; margin-bottom: 14px; }
.prep-back:hover { color: var(--ink); }
.prep-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.prep-eyebrow { margin: 0 0 2px; font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: #a67c33; }
.prep-title { margin: 0; font-family: var(--ff-display); font-size: 30px; font-weight: 600; color: var(--ink); }
.prep-sub { margin: 4px 0 0; font-size: 13.5px; color: var(--mid); }
.prep-regen { flex: none; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: #fff; color: var(--mid); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.prep-regen:hover { background: var(--bg-alt); color: var(--ink); }

/* CTA */
.prep-cta { display: flex; flex-direction: column; align-items: center; padding: 40px 0 60px; }
.prep-cta-card { max-width: 520px; text-align: center; background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 40px 40px 34px; box-shadow: 0 8px 34px rgba(16,24,40,0.06); }
.prep-cta-mark { display: inline-flex; align-items: center; justify-content: center; width: 68px; height: 68px; border-radius: 18px; background: linear-gradient(135deg, #eaf1ec, #f3ecdd); color: #2f5d50; margin-bottom: 18px; }
.prep-cta-title { margin: 0 0 8px; font-family: var(--ff-display); font-size: 24px; font-weight: 600; color: var(--ink); }
.prep-cta-text { margin: 0 0 22px; font-size: 14px; line-height: 1.6; color: var(--mid); }
.prep-cta-btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 28px; border: none; border-radius: 12px; background: #2f5d50; color: #fff; font-family: var(--ff-body); font-size: 14.5px; font-weight: 700; cursor: pointer; box-shadow: 0 8px 22px rgba(47,93,80,0.28); transition: filter .12s ease; }
.prep-cta-btn:hover { filter: brightness(1.1); }
.prep-cta-note { margin: 16px 0 0; font-size: 12.5px; color: var(--muted); }
.prep-cta-fail { color: #c0392b; }
.prep-cta-error { margin: 16px 0 0; padding: 10px 14px; background: #fdf0f0; border: 1px solid #f4cfcf; border-radius: 10px; font-size: 13px; color: #991b1b; }

/* Timer */
.prep-timer { display: flex; flex-direction: column; align-items: center; padding: 34px 0; }
.prep-orb { width: 64px; height: 64px; border-radius: 50%; background: radial-gradient(circle at 34% 30%, #6fae97, #2f5d50); box-shadow: 0 0 0 0 rgba(47,93,80,0.35); animation: prep-pulse 1.7s ease-out infinite; margin-bottom: 20px; }
@keyframes prep-pulse { 0% { box-shadow: 0 0 0 0 rgba(47,93,80,0.35); } 70% { box-shadow: 0 0 0 22px rgba(47,93,80,0); } 100% { box-shadow: 0 0 0 0 rgba(47,93,80,0); } }
.prep-timer-count { margin: 0; font-family: var(--ff-display); font-size: 46px; font-weight: 700; color: var(--ink); line-height: 1; font-variant-numeric: tabular-nums; }
.prep-timer-count small { font-size: 20px; font-weight: 600; color: var(--muted); margin-left: 2px; }
.prep-timer-label { margin: 12px 0 0; font-size: 13.5px; color: var(--mid); }

/* Result layout */
.prep-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 26px; align-items: start; }
.prep-main { min-width: 0; }
.prep-side { position: sticky; top: 18px; display: flex; flex-direction: column; gap: 12px; }
.prep-notes-btn { display: inline-flex; align-items: center; gap: 9px; padding: 13px 16px; border: 1px solid var(--border-g, #cdeadd); border-radius: 12px; background: var(--green-l); color: var(--green-dd); font-family: var(--ff-body); font-size: 14px; font-weight: 700; cursor: pointer; }
.prep-notes-btn:hover { background: var(--green-xl, #eaf6f0); }
.prep-notes-count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: #fff; color: var(--green-dd); font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.prep-side-hint, .prep-side-meta { margin: 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
.prep-regen:disabled { opacity: .4; cursor: not-allowed; }
.prep-fresh { padding: 12px 14px; border-radius: 12px; }
.prep-fresh-locked { background: #f4f5f7; border: 1px solid var(--border); }
.prep-fresh-open { background: var(--green-l); border: 1px solid var(--border-g, #cdeadd); }
.prep-fresh-title { margin: 0 0 4px; font-size: 12px; font-weight: 700; }
.prep-fresh-locked .prep-fresh-title { color: #4b5563; }
.prep-fresh-open .prep-fresh-title { color: var(--green-dd); }
.prep-fresh-line { margin: 0 0 6px; font-size: 12.5px; line-height: 1.5; color: var(--mid); }
.prep-fresh-line strong { color: var(--ink); }
.prep-fresh .prep-side-meta { margin: 0; }

/* ---- The briefing (report aesthetic) ---- */
.prep-report { --pos:#3b7a57; --watch:#b9761f; --risk:#ae4634; --fair:#2f5d50; --fair-deep:#21453b; --brass:#a67c33; --brass-soft:#c9a968; --pline:#e2e1d7; --pcard:#fcfbf7; color: #1a2320; font-size: 13px; line-height: 1.5; }
/* Two separate parchment cards: the summary (verdict + timeline) sits apart, then the tabbed body below it. */
.prep-summary, .prep-body { background: #f5f4ee; border: 1px solid var(--pline); border-radius: 14px; padding: 26px 28px; }
.prep-summary { margin-bottom: 22px; }
.prep-report b, .prep-report strong { font-weight: 700; color: #14201c; }
.prep-report .prep-sec { display: flex; align-items: center; gap: 8px; margin: 24px 0 10px; font-family: var(--ff-mono, ui-monospace, monospace); font-size: 11px; letter-spacing: .13em; text-transform: uppercase; color: var(--fair-deep); font-weight: 700; }
.prep-report .prep-n { color: var(--brass); }
.prep-report .prep-rule { flex: 1; height: 1px; background: var(--pline); }

/* Solutioning / Business tabs: a prominent segmented control */
.prep-tabs { display: inline-flex; gap: 5px; margin: 0 0 22px; padding: 5px; background: #e8e7de; border: 1px solid var(--pline); border-radius: 13px; }
.prep-tab { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; background: none; border: none; border-radius: 9px; font-family: inherit; font-size: 13.5px; font-weight: 700; letter-spacing: .005em; color: #6b7a72; cursor: pointer; transition: background .14s ease, color .14s ease, box-shadow .14s ease; }
.prep-tab:hover:not(.prep-tab-active) { color: var(--fair-deep); background: rgba(255,255,255,.55); }
.prep-tab svg { opacity: .85; }
.prep-tab:focus { outline: none; }
.prep-tab:focus-visible { outline: 2px solid var(--fair); outline-offset: 2px; }
.prep-tab-active { color: #fff; background: var(--fair); box-shadow: 0 2px 6px rgba(33, 69, 59, .28); }
.prep-tab-active svg { opacity: 1; }
.prep-tab-panel[hidden] { display: none; }
.prep-tab-panel > .prep-sec:first-child,
.prep-tab-panel > .prep-win:first-child .prep-sec { margin-top: 18px; }

/* Current context: the last ~3 weeks, for call prep */
.prep-cc { margin-top: 18px; }
.prep-cc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 16px 18px; background: linear-gradient(180deg, #ebf0ec, #e4ece6); border-left: 3px solid var(--fair); border-radius: 4px; }
.prep-cc-headline { margin: 6px 0 0; font-size: 15px; line-height: 1.5; font-weight: 600; color: #14201c; }
.prep-cc-asof { margin: 6px 0 0; font-family: var(--ff-mono, monospace); font-size: 10.5px; letter-spacing: .04em; color: #727870; }
.prep-cc-mood { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; text-align: right; max-width: 44%; flex-shrink: 0; }
.prep-cc-mood-line { font-size: 11.5px; line-height: 1.4; color: #5b6560; }
.prep-cc-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 22px; margin-top: 20px; }
@media (max-width: 900px) { .prep-cc-grid { grid-template-columns: 1fr; } }
.prep-cc-feed { list-style: none; margin: 0; padding: 0; }
.prep-cc-ev { display: grid; grid-template-columns: 74px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--pline); }
.prep-cc-ev:last-child { border-bottom: none; }
.prep-cc-ev-meta { display: flex; flex-direction: column; gap: 3px; }
.prep-cc-ev-date { font-family: var(--ff-mono, monospace); font-size: 11px; font-weight: 700; color: var(--fair-deep); }
.prep-cc-ev-ch { font-size: 9.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: #9aa39c; padding: 2px 6px; border-radius: 3px; width: fit-content; }
.prep-cc-ch-email .prep-cc-ev-ch { background: #5a7d92; }
.prep-cc-ch-call .prep-cc-ev-ch { background: var(--brass); }
.prep-cc-ch-meeting .prep-cc-ev-ch { background: var(--fair); }
.prep-cc-ev-note { font-size: 13px; line-height: 1.5; color: #2a3330; }
.prep-cc-know { margin-top: 22px; padding: 15px 18px; background: #f0f5f1; border: 1px solid #d3e4d8; border-radius: 10px; }
.prep-cc-raise { margin-top: 18px; }
.prep-cc-raise-h { color: var(--brass) !important; }
.prep-cc-empty { text-align: center; padding: 44px 24px; color: #8a9088; }
.prep-cc-empty svg { color: #b7bdb5; }
.prep-cc-empty-h { margin: 14px 0 6px; font-size: 15px; font-weight: 700; color: #4b5563; }
.prep-cc-empty-t { margin: 0 auto; max-width: 420px; font-size: 13px; line-height: 1.6; }

/* Data-source readiness shown under the countdown */
.prep-ready { width: 100%; max-width: 380px; margin: 26px auto 0; text-align: left; }
.prep-ready-h { margin: 0 0 10px; font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #8a9088; text-align: center; }
.prep-ready-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.prep-ready-item { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 10px; padding: 9px 13px; background: #fff; border: 1px solid #e7e6df; border-radius: 10px; }
.prep-ready-ic { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; }
.prep-ready-item.ok .prep-ready-ic { background: #e6f2ea; color: #2f7d54; }
.prep-ready-item.miss .prep-ready-ic { background: #f4e7e4; color: #b0523f; }
.prep-ready-lbl { font-size: 13px; font-weight: 600; color: #2a3330; }
.prep-ready-detail { font-size: 12px; color: #8a9088; white-space: nowrap; }
.prep-ready-item.miss .prep-ready-detail { color: #b0523f; }
.prep-ready-nudge { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 10px 13px; background: #fbf4e9; border: 1px solid #ecdcbf; border-radius: 10px; font-size: 12.5px; line-height: 1.4; font-weight: 500; color: #8a5a1a; text-decoration: none; }
.prep-ready-nudge:hover { background: #f8eeda; }
.prep-ready-nudge svg { flex-shrink: 0; color: #c08a2e; }

/* "What went well" moved into the right rail */
.prep-side-well { padding: 14px 15px; background: #eef4ef; border: 1px solid #cfe3d5; border-radius: 12px; }
.prep-side-well-h { margin: 0 0 8px; font-size: 12px; font-weight: 700; color: #2f5d50; }
.prep-side-well-list { margin: 0; }

.prep-verdict { padding: 16px 18px; background: linear-gradient(180deg, #ebf0ec, #e4ece6); border-left: 3px solid var(--fair); border-radius: 4px; }
.prep-verdict-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.prep-lbl { font-family: var(--ff-mono, monospace); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--fair-deep); font-weight: 700; }
.prep-health { font-family: var(--ff-mono, monospace); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #fff; background: var(--fair); padding: 4px 11px; border-radius: 3px; }
.prep-verdict-text { margin: 0; font-size: 14.5px; line-height: 1.55; }
.prep-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 12px; }
.prep-meta-item { font-size: 12.5px; }
.prep-meta-k { font-family: var(--ff-mono, monospace); font-size: 10px; letter-spacing: .04em; text-transform: uppercase; color: #727870; margin-right: 5px; }

.prep-timeline { margin: 14px 0 4px; padding: 12px 0 2px; }
/* Horizontal scroller: fixed-width stops so many events never squish or overflow. */
.prep-tl-track { display: flex; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; position: relative; padding-bottom: 8px; scrollbar-width: thin; scrollbar-color: var(--brass-soft) transparent; scroll-snap-type: x proximity; }
.prep-tl-track::-webkit-scrollbar { height: 7px; }
.prep-tl-track::-webkit-scrollbar-thumb { background: var(--brass-soft); border-radius: 4px; }
.prep-tl-track::-webkit-scrollbar-track { background: transparent; }
.prep-tl-item { position: relative; text-align: center; flex: 0 0 96px; padding: 0 4px; scroll-snap-align: start; }
/* Each stop paints its own line segment, so the connector scrolls with content. */
.prep-tl-item::before { content: ""; position: absolute; top: 6px; left: 0; right: 0; height: 2px; background: var(--pline); z-index: 0; }
.prep-tl-item:first-child::before { left: 50%; }
.prep-tl-item:last-child::before { right: 50%; }
.prep-tl-dot { display: block; width: 12px; height: 12px; border-radius: 50%; background: #f5f4ee; border: 2px solid var(--fair); margin: 0 auto 7px; position: relative; z-index: 1; }
.prep-tl-item.key .prep-tl-dot { background: var(--brass); border-color: var(--brass); width: 14px; height: 14px; }
.prep-tl-date { display: block; font-family: var(--ff-mono, monospace); font-size: 10.5px; font-weight: 700; color: var(--fair-deep); }
.prep-tl-label { display: block; font-size: 11px; color: #727870; line-height: 1.3; margin-top: 3px; }
.prep-tl-item.key .prep-tl-label { color: #1a2320; font-weight: 600; }

.prep-persona-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.prep-pcard { background: var(--pcard); border: 1px solid var(--pline); border-radius: 4px; padding: 12px 14px; border-left: 3px solid var(--pos); }
.prep-pcard.feature { grid-column: 1 / -1; border-left-color: var(--brass); background: linear-gradient(180deg, #fbf7ef, #fcfbf7); }
.prep-tone-watch { border-left-color: var(--watch); }
.prep-tone-neutral { border-left-color: var(--brass); }
.prep-tone-risk { border-left-color: var(--risk); }
.prep-pc-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.prep-pc-name { font-weight: 700; font-size: 14.5px; }
.prep-pc-name small { font-weight: 500; color: #727870; font-size: 11.5px; }
.feature .prep-pc-name { font-family: var(--ff-display); font-size: 17px; }
.prep-chip { font-family: var(--ff-mono, monospace); font-size: 9.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 3px 8px; border-radius: 3px; white-space: nowrap; flex: none; }
.prep-chip-pos { background: #e1efe6; color: var(--pos); }
.prep-chip-watch { background: #f5e9d6; color: var(--watch); }
.prep-chip-neutral { background: #f0e7d4; color: var(--brass); }
.prep-chip-risk { background: #f6e0da; color: var(--risk); }
.prep-pc-body { display: flex; gap: 14px; }
.feature .prep-pc-body { gap: 18px; }
.prep-pc-pts { margin: 0; padding: 0; list-style: none; flex: 1; }
.prep-pc-pts li { position: relative; padding: 0 0 4px 13px; font-size: 12.5px; line-height: 1.4; color: #3a423c; }
.prep-pc-pts li::before { content: ""; position: absolute; left: 1px; top: 7px; width: 5px; height: 5px; border-radius: 50%; background: var(--fair); }
.prep-quote { border-left: 2px solid var(--brass-soft); padding: 2px 0 2px 11px; font-family: var(--ff-display); font-style: italic; font-size: 13.5px; line-height: 1.45; color: var(--fair-deep); flex: none; width: 42%; align-self: center; }
.prep-quote cite { display: block; font-family: var(--ff-mono, monospace); font-style: normal; font-size: 9.5px; letter-spacing: .05em; text-transform: uppercase; color: #727870; margin-top: 5px; }

.prep-team-strip { margin-top: 10px; background: #eef2ee; border: 1px solid var(--line-soft, #eae9e0); border-radius: 4px; padding: 9px 13px; font-size: 12.5px; color: #3a423c; display: flex; gap: 9px; }
.prep-k { font-family: var(--ff-mono, monospace); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--brass); font-weight: 700; flex: none; }

.prep-two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.prep-sub-h { margin: 0 0 8px; font-family: var(--ff-mono, monospace); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; }
.prep-good { color: var(--pos); }
.prep-bad { color: var(--risk); }
.prep-clist { margin: 0; padding: 0; list-style: none; }
.prep-clist li { position: relative; padding: 0 0 6px 16px; font-size: 12.8px; line-height: 1.45; }
.prep-clist li::before { content: ""; position: absolute; left: 3px; top: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--pos); }
.prep-risklist li::before { background: var(--risk); }
.prep-risklist .prep-lvl-watch::before { background: var(--watch); }

.prep-win { margin-top: 6px; }
.prep-cap { margin: 0 0 10px; font-size: 12.5px; color: #727870; }
.prep-checks { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; }
.prep-checks li { position: relative; padding: 0 0 0 20px; font-size: 12.8px; line-height: 1.45; }
.prep-checks svg { position: absolute; left: 0; top: 2px; }

.prep-ladder { display: flex; align-items: flex-end; gap: 6px; margin: 6px 0 2px; }
.prep-rung { flex: 1; border-radius: 4px 4px 0 0; padding: 9px 10px; color: #fff; display: flex; flex-direction: column; justify-content: flex-end; }
.prep-step { font-family: var(--ff-mono, monospace); font-size: 9px; letter-spacing: .07em; opacity: .85; margin-bottom: 4px; }
.prep-rt { font-weight: 700; font-size: 12px; line-height: 1.2; }
.prep-rs { font-size: 10.5px; opacity: .92; margin-top: 3px; line-height: 1.3; }
.prep-rung-1 { min-height: 74px; background: var(--fair-deep); }
.prep-rung-2 { min-height: 90px; background: var(--fair); }
.prep-rung-3 { min-height: 106px; background: #3f7a5f; }
.prep-rung-4 { min-height: 122px; background: #5c8f5a; }
.prep-rung-5 { min-height: 140px; background: var(--brass); }

.prep-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 12px; }
.prep-panel { background: var(--pcard); border: 1px solid var(--pline); border-radius: 4px; padding: 12px 14px; }
.prep-panel-h { margin: 0 0 8px; font-family: var(--ff-mono, monospace); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--fair-deep); font-weight: 700; }
.prep-kv { display: flex; gap: 9px; font-size: 12.5px; padding: 3px 0; line-height: 1.4; }
.prep-kk { font-family: var(--ff-mono, monospace); font-size: 9.5px; letter-spacing: .03em; text-transform: uppercase; color: #727870; width: 66px; flex: none; padding-top: 2px; }
.prep-vv { color: #3a423c; }

.prep-moves { margin-top: 14px; background: linear-gradient(180deg, #fbf6ec, #fcfbf7); border: 1px solid var(--pline); border-top: 2px solid var(--brass); border-radius: 4px; padding: 14px 16px; }
.prep-moves .prep-sec { margin-top: 0; color: var(--brass); }
.prep-moveslist { columns: 2; column-gap: 24px; }
.prep-moveslist li { break-inside: avoid; }
.prep-moveslist li::before { background: var(--brass); border-radius: 1px; }

/* Notes modal */
.prep-notes-modal { width: min(540px, 94vw); }
.prep-notes-title { margin: 2px 0 0; font-family: var(--ff-display); font-size: 19px; font-weight: 600; color: var(--ink); }
.prep-notes-body { padding: 4px 22px 22px; }
.prep-notes-list { display: flex; flex-direction: column; margin-bottom: 14px; max-height: 46vh; overflow-y: auto; }
.prep-notes-empty { padding: 22px 0; text-align: center; color: var(--muted); font-size: 13.5px; }
.prep-note { display: flex; gap: 11px; padding: 12px 0; border-top: 1px solid var(--border); }
.prep-note:first-child { border-top: 0; }
.prep-note-avatar { flex: none; width: 30px; height: 30px; border-radius: 8px; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; background: #4f1d3f; color: #fff; font-size: 11px; font-weight: 700; }
.prep-note-main { flex: 1; min-width: 0; }
.prep-note-head { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.prep-note-head strong { font-size: 13.5px; color: var(--ink); }
.prep-note-time { font-size: 11.5px; color: var(--muted); }
.prep-note-del { margin-left: auto; }
.prep-note-del button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1; }
.prep-note-del button:hover { color: #c0392b; }
.prep-note-text { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--slate); }
.prep-note-form { display: flex; flex-direction: column; align-items: stretch; gap: 10px; border-top: 1px solid var(--border); padding-top: 14px; }
.prep-note-input { width: 100%; box-sizing: border-box; padding: 11px 13px; border: 1px solid var(--border); border-radius: 10px; font-family: var(--ff-body); font-size: 14px; line-height: 1.5; color: var(--ink); resize: vertical; min-height: 70px; }
.prep-note-input:focus { outline: none; border-color: #843f72; }
.prep-note-form button { align-self: flex-start; }

@media (max-width: 980px) {
  .prep-layout { grid-template-columns: 1fr; }
  .prep-side { position: static; }
  .prep-persona-grid, .prep-two, .prep-panels, .prep-checks { grid-template-columns: 1fr; }
  .prep-pc-body { flex-direction: column; gap: 10px; }
  .prep-quote { width: 100%; }
  .prep-moveslist { columns: 1; }
}

/* Agent profile pictures (uploaded via URL) */
.agent-avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.team-avatar, .sa-profile-avatar, .ab-comment-avatar { overflow: hidden; }
.auth-field-wide { grid-column: 1 / -1; }
.agent-avatar-preview { display: inline-block; margin-top: 8px; }
.agent-avatar-preview img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); }

/* ===== Background logs ===== */
.bg-schedulers { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 6px 0 26px; }
.bg-sched { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; box-shadow: 0 1px 2px rgba(16,24,40,0.04); }
.bg-sched-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bg-sched-name { margin: 0; font-family: var(--ff-display); font-size: 15px; font-weight: 600; color: var(--ink); }
.bg-sched-env { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 2px 8px; border-radius: 999px; background: var(--green-l); color: var(--green-dd); }
.bg-sched-env-all { background: var(--bg-alt); color: var(--mid); }
.bg-sched-schedule { margin: 8px 0 10px; font-size: 12.5px; color: var(--mid); line-height: 1.45; }
.bg-sched-last { margin: 0; font-size: 12.5px; color: var(--muted); }
.bg-sched-last strong { color: var(--ink); font-weight: 600; }

.bg-runs-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px 6px; box-shadow: 0 1px 2px rgba(16,24,40,0.04); }
.bg-runs-title { margin: 0 0 10px; font-family: var(--ff-display); font-size: 15px; font-weight: 600; color: var(--ink); }
.bg-runs-empty { padding: 24px 0; color: var(--muted); font-size: 14px; }
.bg-runs { width: 100%; border-collapse: collapse; font-size: 13px; }
.bg-runs thead th { text-align: left; padding: 8px 10px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); border-bottom: 1px solid var(--border); }
.bg-runs td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.bg-runs tr:last-child td { border-bottom: 0; }
.bg-when { white-space: nowrap; color: var(--mid); font-variant-numeric: tabular-nums; }
.bg-dur { white-space: nowrap; color: var(--mid); font-variant-numeric: tabular-nums; }
.bg-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--mid); }
.bg-detail { color: var(--slate); line-height: 1.45; }
.bg-job { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.bg-job-nudge { background: #f3ecfb; color: #6b21a8; }
.bg-job-weekly { background: #eaf0f7; color: #2f4d7d; }
.bg-job-index { background: #e7f6ee; color: #1f8a54; }
.bg-job-call { background: #fdf0e3; color: #b56a13; }
.bg-status { display: inline-block; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 2px 9px; border-radius: 999px; }
.bg-status-success { background: #e7f6ee; color: #1f8a54; }
.bg-status-failed { background: #fde8e8; color: #c0392b; }
.bg-status-running { background: #fef3e2; color: #b45309; }

/* ===== Call transcripts tab ===== */
.cc-empty { padding: 28px 4px; color: var(--muted); font-size: 14px; }
.cc-list { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.cc-item { border: 1px solid var(--border); border-radius: 12px; background: #fff; overflow: hidden; }
.cc-item[open] { box-shadow: 0 2px 10px rgba(16,24,40,0.05); }
.cc-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; list-style: none; }
.cc-head::-webkit-details-marker { display: none; }
.cc-head-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cc-date { font-size: 14px; font-weight: 700; color: var(--ink); }
.cc-participants { font-size: 12.5px; color: var(--mid); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-status { flex: none; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 3px 10px; border-radius: 999px; background: var(--bg-alt); color: var(--mid); }
.cc-status-ready { background: #e7f6ee; color: #1f8a54; }
.cc-status-failed { background: #fde8e8; color: #c0392b; }
.cc-status-pending, .cc-status-analyzing { background: #fef3e2; color: #b45309; }
.cc-caret { flex: none; width: 8px; height: 8px; border-right: 2px solid #c2c8d4; border-bottom: 2px solid #c2c8d4; transform: rotate(45deg); transition: transform .15s ease; }
.cc-item[open] .cc-caret { transform: rotate(-135deg); }

.cc-body { padding: 4px 16px 18px; border-top: 1px solid var(--border); }
.cc-summary { margin: 14px 0 16px; }
.cc-summary p { margin: 0 0 4px; font-size: 14px; line-height: 1.55; color: var(--ink); }
.cc-analysis-note { margin: 14px 0; font-size: 13.5px; color: var(--mid); }
.cc-analysis-error { color: #c0392b; }

.cc-aspects { width: 100%; border-collapse: collapse; margin: 6px 0 18px; font-size: 13px; }
.cc-aspects thead th { text-align: left; padding: 8px 10px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); border-bottom: 1px solid var(--border); }
.cc-aspects td { padding: 10px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.cc-aspect-label { font-weight: 600; color: var(--ink); white-space: nowrap; }
.cc-aspect-note { color: var(--mid); line-height: 1.5; }
.cc-level { display: inline-block; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 2px 9px; border-radius: 999px; }
.cc-level-red { background: #fde8e8; color: #c0392b; }
.cc-level-amber { background: #fef3e2; color: #b45309; }
.cc-level-green { background: #e7f6ee; color: #1f8a54; }

.cc-transcript { margin-top: 6px; }
.cc-transcript-label { margin: 0 0 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.cc-transcript-body { margin: 0; max-height: 360px; overflow: auto; padding: 14px 15px; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 10px; font-family: var(--ff-mono, ui-monospace, monospace); font-size: 12.5px; line-height: 1.6; color: var(--slate); white-space: pre-wrap; word-break: break-word; }
.cc-actions { margin-top: 14px; }
.cc-reanalyse-form { display: inline; }
.cc-reanalyse { padding: 8px 15px; border: 1px solid var(--border); border-radius: 9px; background: #fff; font-family: var(--ff-body); font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer; }
.cc-reanalyse:hover { background: var(--bg-alt); }
