/* ---------- App shell ---------- */
.ssc-shell {
  display: grid;
  grid-template-columns: 232px 1fr;
  min-height: 100vh;
}

.ssc-sidebar {
  border-right: 1px solid var(--c-border);
  background: linear-gradient(180deg, rgba(15, 22, 40, 0.9), rgba(11, 18, 32, 0.9));
  padding: var(--sp-5) var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
  position: sticky;
  top: 0;
  height: 100vh;
}

.ssc-brand {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0 var(--sp-1);
}
/* The image itself (assets/brand-mark.png) already carries its own dark
   app-icon background and corner radius -- this wrapper just adds lift. */
.ssc-brand__mark {
  display: flex; align-items: center; justify-content: center;
  filter: drop-shadow(0 6px 14px rgba(37, 99, 235, 0.45));
  flex: none;
}
.ssc-brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.ssc-brand__name { font-weight: 700; font-size: var(--fs-sm); letter-spacing: 0.01em; }
.ssc-brand__desc { font-size: 10px; color: var(--c-text-muted); letter-spacing: 0.03em; text-transform: uppercase; }

.ssc-nav { display: flex; flex-direction: column; gap: var(--sp-1); }
.ssc-nav__item {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: 10px var(--sp-3);
  border-radius: var(--r-md);
  color: var(--c-text-muted);
  font-size: var(--fs-sm);
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s var(--ease), color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.ssc-nav__item svg { width: 17px; height: 17px; flex: none; opacity: 0.85; }
.ssc-nav__item:hover { background: var(--c-panel-hover); color: var(--c-text); }
.ssc-nav__item.is-active {
  background: rgba(37, 99, 235, 0.16);
  border-color: var(--c-border-accent);
  color: var(--c-text);
}
.ssc-nav__item.is-active svg { opacity: 1; color: var(--c-accent-2); }

/* "Live call" is a state, not a permanent destination -- it only renders
   in the nav (see components.js's navHtml) while a session is actually
   open, and gets its own strong treatment so it reads as urgent/temporary
   rather than a normal menu item. */
.ssc-nav__item--live {
  color: var(--c-success);
  font-weight: 700;
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.28);
}
.ssc-nav__item--live:hover { background: rgba(52, 211, 153, 0.18); color: var(--c-success); }
.ssc-live-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--c-success); flex: none;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6);
  animation: ssc-live-pulse 1.8s ease-out infinite;
}
@keyframes ssc-live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5); }
  100% { box-shadow: 0 0 0 7px rgba(52, 211, 153, 0); }
}

.ssc-sidebar__footer {
  margin-top: auto;
  display: flex; flex-direction: column; gap: var(--sp-3);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--c-border);
}
.ssc-user-chip { display: flex; align-items: center; gap: var(--sp-2); }
.ssc-user-chip__avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--c-panel-raised);
  border: 1px solid var(--c-border-strong);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-xs); font-weight: 700; color: var(--c-accent-2);
  flex: none;
}
.ssc-user-chip__meta { min-width: 0; }
.ssc-user-chip__name { font-size: var(--fs-sm); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ssc-user-chip__role { font-size: 11px; color: var(--c-text-muted); }
.ssc-signout {
  font-size: var(--fs-xs); color: var(--c-text-muted);
  cursor: pointer; background: none; border: none; padding: 0; text-align: left;
}
.ssc-signout:hover { color: var(--c-danger); }

.ssc-main {
  min-width: 0;
  padding: var(--sp-6) var(--sp-6) var(--sp-7);
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
}
.ssc-main--full { max-width: none; padding: var(--sp-5) var(--sp-6); }

/* ---------- Mobile: sidebar becomes a top navigation bar ---------- */
@media (max-width: 760px) {
  .ssc-shell { display: flex; flex-direction: column; min-height: 100vh; }
  .ssc-sidebar {
    position: sticky; top: 0; z-index: 10; height: auto;
    flex-direction: row; align-items: center; flex-wrap: nowrap;
    gap: var(--sp-4); padding: var(--sp-3) var(--sp-4);
    border-right: none; border-bottom: 1px solid var(--c-border);
  }
  .ssc-brand__text { display: none; }
  .ssc-nav {
    flex-direction: row; gap: var(--sp-1); overflow-x: auto; flex: 1;
    -ms-overflow-style: none; scrollbar-width: none;
  }
  .ssc-nav::-webkit-scrollbar { display: none; }
  .ssc-nav__item { padding: 8px 10px; white-space: nowrap; }
  .ssc-nav__item span { display: none; }
  .ssc-nav__item svg, .ssc-live-dot { margin: 0; }
  .ssc-nav__item--live span { display: inline; } /* the one label worth keeping on mobile */
  .ssc-sidebar__footer {
    margin-top: 0; padding-top: 0; border-top: none; flex-direction: row; align-items: center; flex: none;
  }
  .ssc-user-chip__meta { display: none; }
  .ssc-main { padding: var(--sp-4); }
}

.ssc-page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--sp-4); margin-bottom: var(--sp-6); flex-wrap: wrap;
}
.ssc-page-head__eyebrow { font-size: var(--fs-xs); color: var(--c-accent-2); font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }
.ssc-page-head__title { font-size: var(--fs-xl); font-weight: 700; margin-top: var(--sp-1); }
.ssc-page-head__sub { font-size: var(--fs-sm); color: var(--c-text-muted); margin-top: var(--sp-1); max-width: 56ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  border-radius: var(--r-md);
  padding: 11px 18px;
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.12s var(--ease), background 0.15s var(--ease), border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-primary {
  background: var(--c-accent-grad);
  color: #ffffff;
  box-shadow: 0 12px 28px -12px rgba(37, 99, 235, 0.65);
}
.btn-primary:hover:not(:disabled) { box-shadow: 0 16px 36px -12px rgba(56, 189, 248, 0.55); }
.btn-secondary {
  background: var(--c-panel-raised);
  color: var(--c-text);
  border-color: var(--c-border-strong);
}
.btn-secondary:hover:not(:disabled) { background: var(--c-panel-hover); border-color: var(--c-border-accent); }
.btn-ghost {
  background: transparent; color: var(--c-text-muted); border-color: transparent;
}
.btn-ghost:hover:not(:disabled) { color: var(--c-text); background: var(--c-panel-hover); }
.btn-danger { background: rgba(248, 113, 113, 0.12); color: #FCA5A5; border-color: rgba(248, 113, 113, 0.3); }
.btn-danger:hover:not(:disabled) { background: rgba(248, 113, 113, 0.2); }
.btn-sm { padding: 7px 12px; font-size: var(--fs-xs); }
.btn-lg { padding: 14px 24px; font-size: var(--fs-base); }
.btn-block { width: 100%; }

/* ---------- Cards ---------- */
.card {
  background: var(--c-panel);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  box-shadow: var(--shadow-soft);
}
.card--raised { background: var(--c-panel-raised); }
.card--interactive { cursor: pointer; transition: border-color 0.15s var(--ease), transform 0.15s var(--ease); }
.card--interactive:hover { border-color: var(--c-border-accent); transform: translateY(-2px); }

.stat-card { display: flex; flex-direction: column; gap: var(--sp-2); }
.stat-card__label { font-size: var(--fs-xs); color: var(--c-text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.stat-card__value { font-size: var(--fs-2xl); font-weight: 700; letter-spacing: -0.01em; }
.stat-card__hint { font-size: var(--fs-xs); color: var(--c-text-muted); }
.stat-card__hint.is-up { color: var(--c-success); }

.grid { display: grid; gap: var(--sp-4); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 980px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: var(--r-pill);
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  border: 1px solid transparent;
}
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-live { background: rgba(52, 211, 153, 0.14); color: var(--c-success); border-color: rgba(52, 211, 153, 0.3); }
.badge-waiting { background: rgba(245, 158, 11, 0.14); color: var(--c-warning); border-color: rgba(245, 158, 11, 0.3); }
.badge-info { background: rgba(56, 189, 248, 0.12); color: var(--c-accent-2); border-color: rgba(56, 189, 248, 0.28); }
.badge-neutral { background: rgba(148, 163, 184, 0.12); color: var(--c-text-muted); border-color: var(--c-border-strong); }
.badge-danger { background: rgba(248, 113, 113, 0.12); color: var(--c-danger); border-color: rgba(248, 113, 113, 0.28); }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-size: var(--fs-sm); font-weight: 600; color: var(--c-text-soft); }
.field__hint { font-size: var(--fs-xs); color: var(--c-text-muted); }
.input, .textarea, select.input {
  width: 100%;
  background: var(--c-bg-raised);
  border: 1px solid var(--c-border-strong);
  border-radius: var(--r-md);
  color: var(--c-text);
  padding: 11px 13px;
  font-size: var(--fs-sm);
  font-family: inherit;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.textarea { resize: vertical; min-height: 84px; line-height: 1.5; }
.input:focus, .textarea:focus, select.input:focus {
  outline: none;
  border-color: var(--c-accent-2);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.16);
}
.input::placeholder, .textarea::placeholder { color: var(--c-text-faint); }
.chip-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.chip-option {
  padding: 7px 13px; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 600;
  border: 1px solid var(--c-border-strong); color: var(--c-text-muted); cursor: pointer;
  background: var(--c-bg-raised); transition: all 0.15s var(--ease);
}
.chip-option.is-selected { border-color: var(--c-accent-2); color: var(--c-text); background: rgba(56, 189, 248, 0.12); }

/* ---------- Empty / loading states ---------- */
.empty-state {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: var(--sp-3); padding: var(--sp-7) var(--sp-5); color: var(--c-text-muted);
}
.empty-state__icon {
  width: 44px; height: 44px; border-radius: var(--r-md);
  background: var(--c-panel-raised); border: 1px solid var(--c-border);
  display: flex; align-items: center; justify-content: center; color: var(--c-accent-2);
}
.empty-state__title { color: var(--c-text); font-weight: 600; font-size: var(--fs-base); }
.empty-state__body { font-size: var(--fs-sm); max-width: 40ch; }

.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(148, 163, 184, 0.25); border-top-color: var(--c-accent-2);
  animation: ssc-spin 0.7s linear infinite; flex: none;
}
@keyframes ssc-spin { to { transform: rotate(360deg); } }

.skeleton {
  border-radius: var(--r-sm);
  background: linear-gradient(90deg, var(--c-panel-raised) 0%, var(--c-panel-hover) 50%, var(--c-panel-raised) 100%);
  background-size: 200% 100%;
  animation: ssc-shimmer 1.4s ease-in-out infinite;
}
@keyframes ssc-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ---------- Live coaching layout ---------- */
.live-shell { display: flex; flex-direction: column; gap: var(--sp-4); height: calc(100vh - 100px); }
.live-topbar { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; }
.live-topbar__title { display: flex; align-items: center; gap: var(--sp-3); }
.live-topbar__actions { display: flex; align-items: center; gap: var(--sp-2); }

.live-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.35fr;
  gap: var(--sp-4);
  flex: 1;
  min-height: 0;
}
@media (max-width: 1100px) { .live-grid { grid-template-columns: 1fr; } .live-shell { height: auto; } }

.pane {
  background: var(--c-panel);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  display: flex; flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.pane__head {
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--c-border);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2);
  flex: none;
}
.pane__title { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--c-text-muted); }
.pane__body { flex: 1; min-height: 0; overflow-y: auto; padding: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-3); }

.pane--coach {
  border-color: var(--c-border-accent);
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.08), var(--c-panel) 40%);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.08), var(--shadow-elevated);
}
.pane--coach .pane__title { color: var(--c-accent-2); }

.transcript-row { display: flex; flex-direction: column; gap: 4px; max-width: 92%; }
.transcript-row--you { align-self: flex-end; align-items: flex-end; max-width: 92%; }
.transcript-row__meta { font-size: 10px; color: var(--c-text-faint); }
.transcript-row__bubble {
  background: var(--c-panel-raised);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 10px 13px;
  font-size: var(--fs-sm);
  color: var(--c-text-soft);
  line-height: 1.5;
}
.transcript-row--you .transcript-row__bubble {
  background: rgba(37, 99, 235, 0.16);
  border-color: rgba(37, 99, 235, 0.32);
  color: var(--c-text);
}

.coach-card {
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: var(--sp-4);
  background: var(--c-panel-raised);
}
.coach-card--latest {
  border-color: var(--c-border-accent);
  background: linear-gradient(150deg, rgba(37, 99, 235, 0.18), rgba(56, 189, 248, 0.06));
  box-shadow: var(--shadow-soft);
}
.coach-card__label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--c-accent-2); margin-bottom: 6px; }
.coach-card__primary { font-size: var(--fs-md); font-weight: 600; line-height: 1.45; }
.coach-card__followups { margin: var(--sp-3) 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.coach-card__followups li { font-size: var(--fs-sm); color: var(--c-text-muted); line-height: 1.45; }
.coach-card__time { font-size: 10px; color: var(--c-text-faint); margin-top: var(--sp-2); }

.identity-status {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  border: 1px solid var(--c-border);
  background: var(--c-panel-raised);
  font-size: var(--fs-sm);
}

/* ---------- Live coaching, Phase 2C: hero-first stack ----------
   Replaces the old three-equal-column PROSPECT|YOU|COACH grid. COACH NOW
   is the largest, most visually dominant block; PROSPECT sits above it
   for context; YOU and rolling history are strictly subordinate. Designed
   to read cleanly as a single narrow column first (a side panel next to
   Zoom, or a narrow browser window) and simply stays centered with a
   max-width on wide desktop screens rather than spreading into columns --
   see Phase 2C's report for why a narrow-first design was chosen over the
   old responsive-collapse-from-three-columns approach. */
.live-prep-strip {
  display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5);
  font-size: var(--fs-sm); color: var(--c-text-muted);
  padding: var(--sp-2) 0;
}
.live-prep-strip__item strong { color: var(--c-text); font-weight: 600; }

.live-poll-issue {
  font-size: var(--fs-xs); color: var(--c-text-muted);
  padding: 6px var(--sp-3); border-radius: var(--r-sm);
  background: var(--c-panel-raised); border: 1px solid var(--c-border);
  width: fit-content;
}

.live-hero-stack {
  display: flex; flex-direction: column; gap: var(--sp-4);
  max-width: 640px;
}

.live-block {
  background: var(--c-panel);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
}
.live-block__label {
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--c-text-muted); margin-bottom: var(--sp-2);
}
.live-block__empty { color: var(--c-text-muted); font-size: var(--fs-sm); line-height: 1.5; }
.live-block__statement { font-size: var(--fs-md); line-height: 1.5; color: var(--c-text); }
.live-block__statement--muted { color: var(--c-text-muted); }

.live-block--prospect { padding: var(--sp-3) var(--sp-4); }

.live-block--coach {
  border-color: var(--c-border-accent);
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.1), var(--c-panel) 55%);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.1), var(--shadow-elevated);
  padding: var(--sp-5);
}
.live-block--coach .live-block__label { color: var(--c-accent-2); font-size: var(--fs-sm); }

.live-block--you { padding: var(--sp-3) var(--sp-4); }

.live-coach__say-label { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--c-text-faint); margin-bottom: 6px; }
.live-coach__say { font-size: var(--fs-xl); font-weight: 600; line-height: 1.4; color: var(--c-text); }
.live-coach__followup-label { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--c-text-faint); margin-top: var(--sp-4); margin-bottom: 6px; }
.live-coach__followups { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.live-coach__followups li { font-size: var(--fs-sm); color: var(--c-text-muted); line-height: 1.45; }

.live-coach__thinking {
  display: flex; align-items: center; gap: var(--sp-2);
  font-size: var(--fs-sm); color: var(--c-text-muted);
}
.live-coach__thinking--inline { margin-bottom: var(--sp-3); }
.live-coach__spinner {
  width: 10px; height: 10px; border-radius: 50%;
  border: 2px solid var(--c-border-strong); border-top-color: var(--c-accent-2);
  animation: ssc-spin 0.8s linear infinite;
}
@keyframes ssc-spin { to { transform: rotate(360deg); } }

.live-history { max-width: 640px; }
.live-history__toggle {
  background: none; border: none; cursor: pointer; padding: var(--sp-2) 0;
  font-size: var(--fs-xs); font-weight: 600; color: var(--c-text-muted);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.live-history__toggle:hover { color: var(--c-accent-2); }
.live-history__toggle.is-open::before { content: "\25BE "; }
.live-history__toggle:not(.is-open)::before { content: "\25B8 "; }
.live-history__list { display: flex; flex-direction: column; gap: var(--sp-3); margin-top: var(--sp-2); }
.live-history__item {
  padding: var(--sp-3); border-radius: var(--r-md);
  background: var(--c-panel-raised); border: 1px solid var(--c-border);
}
.live-history__item-text { font-size: var(--fs-sm); color: var(--c-text-soft); line-height: 1.5; }
.live-history__item-time { font-size: 10px; color: var(--c-text-faint); margin-top: 4px; }

@media (max-width: 480px) {
  .live-hero-stack, .live-history { max-width: 100%; }
  .live-coach__say { font-size: var(--fs-lg); }
}

/* ---------- Modal / overlay ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(4, 7, 15, 0.72);
  display: flex; align-items: center; justify-content: center; z-index: 50;
  padding: var(--sp-5);
}
.overlay .card { max-width: 420px; width: 100%; }

.divider { height: 1px; background: var(--c-border); border: none; margin: 0; }
