/*
 * Candidate-seat brief (2026-07-29): the app-shell chrome + strip layout,
 * adapted from docs/design/native_adaptation/candidate_seat.html (the
 * architect's approved our-stack proof) into real selectors. Structure and
 * values are carried over almost verbatim; every class is prefixed
 * `seat-` so this — loaded application-wide via application.postcss.css —
 * can never collide with an existing generic class (.card, .btn, .chip,
 * etc. all already exist elsewhere in the app under their own meaning).
 *
 * First consumer: shared/_seat_nav + candidate_app/dashboard/show.
 * Leader/Recruiter/Admin reuse this same stylesheet when they adopt the
 * shell in their own increments — nothing here is candidate-specific
 * except the "This seat" sub-nav items, which live in the partial, not
 * here.
 */

/* Viewer-shell brief (2026-07-30) fixed a real bug here: this class was
   defined from the start but never applied in any consuming view — every
   seat page rendered shared/_seat_nav + <main class="seat-main"> as plain
   siblings of <body>, which is itself `display:flex; flex-direction:
   column` (application layout). That stacked the sidebar ABOVE the main
   content instead of beside it, wasting the entire top-right quadrant on
   every seat page since the Candidate seat shipped — not caught visually
   because the sidebar's own height happened to roughly span typical
   above-the-fold content, so screenshots read as "looks right" without
   measuring. Every seat_nav consumer now wraps
   `<%= render "shared/seat_nav" %><main class="seat-main">...</main>` in
   `<div class="seat-shell">`. */
.seat-shell { display: flex; min-height: 100vh; }
.seat-side {
  width: 238px; flex: none; border-right: 1px solid var(--rp-hair);
  background: var(--rp-bg); display: flex; flex-direction: column; padding: 18px 14px;
}
.seat-brand { display: flex; align-items: center; gap: 9px; padding: 4px 8px 20px; text-decoration: none; }
.seat-brand .seat-ic {
  width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #7FD0FF, #3DA5FF 60%, #1D5FA8);
  box-shadow: 0 0 10px rgba(61,165,255,.5);
}
.seat-brand .seat-nm { font-weight: 600; letter-spacing: .13em; font-size: 13px; color: var(--rp-text); }
.seat-navgrp { margin-bottom: 18px; }
.seat-lbl {
  font-family: 'IBM Plex Mono', monospace; font-size: 9.5px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--rp-dim); padding: 0 8px 8px; display: block;
}
.seat-navitem {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 7px;
  color: var(--rp-muted); font-size: 13px; cursor: pointer; text-decoration: none;
}
.seat-navitem:hover { background: rgba(255,255,255,.03); color: var(--rp-text); }
.seat-navitem.on { background: rgba(41,242,255,.08); color: var(--rp-text); }
.seat-navitem .seat-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--rp-accent2); flex: none; }
.seat-navitem.sub { padding-left: 12px; font-size: 12.5px; }
.seat-side .seat-user {
  margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 8px 2px;
  border-top: 1px solid var(--rp-hair);
}
.seat-side .seat-user .seat-av {
  width: 30px; height: 30px; border-radius: 50%; background: var(--rp-accent); color: #04101E;
  display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 12px; flex: none;
  text-decoration: none;
}
.seat-side .seat-user > div { flex: 1; min-width: 0; }
.seat-side .seat-user .seat-un { font-size: 12.5px; color: var(--rp-text); }
.seat-side .seat-user .seat-un-link { color: inherit; text-decoration: none; }
.seat-side .seat-user .seat-un-link:hover { color: var(--rp-accent); }
.seat-side .seat-user .seat-ur { font-size: 11px; color: var(--rp-dim); }
.seat-side .seat-user .seat-theme-toggle { margin-right: 2px; }

/* mobile topbar (hidden on desktop) */
.seat-topbar { display: none; }

.seat-main { flex: 1; min-width: 0; padding: 26px 30px 60px; max-width: 1180px; }
.seat-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-bottom: 18px; margin-bottom: 22px; border-bottom: 1px solid var(--rp-hair);
}
.seat-head h1 {
  font-family: 'Newsreader', Georgia, serif; font-weight: 400; font-size: 31px; line-height: 1.1;
  letter-spacing: -.015em; margin: 8px 0 0; text-wrap: balance; max-width: 20ch; color: var(--rp-text);
}
.seat-head .seat-acts { display: flex; gap: 9px; flex-shrink: 0; }
.seat-btn {
  font-size: 13px; padding: 8px 15px; border-radius: 8px; border: 1px solid var(--rp-hair2);
  color: var(--rp-text); background: transparent; cursor: pointer; display: inline-flex; gap: 7px;
  align-items: center; text-decoration: none; font-family: inherit;
}
.seat-btn:hover { border-color: var(--rp-accent); color: var(--rp-accent); }

.seat-sect { margin-top: 26px; }
.seat-sect > .seat-kick { margin-bottom: 12px; }

.seat-kick {
  font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--rp-dim);
}
.seat-kick b { color: var(--rp-accent); font-weight: 400; }

.seat-card { background: var(--rp-card); border: 1px solid var(--rp-hair2); border-radius: 12px; padding: 18px; }

/* hero */
.seat-hero { display: grid; grid-template-columns: 1fr 300px; gap: 0; overflow: hidden; padding: 0; }
.seat-hero .seat-stage { position: relative; padding: 16px 16px 8px; border-right: 1px solid var(--rp-hair); }
.seat-hero .seat-stage .seat-who { font-size: 13px; color: var(--rp-text); }
.seat-hero .seat-stage .seat-who b { font-weight: 600; }
.seat-hero .seat-stage .seat-who span { color: var(--rp-muted); }
.seat-hero .seat-stage .seat-render { display: flex; justify-content: center; align-items: center; padding: 6px 0; }
.seat-hero .seat-stage .seat-render svg { max-width: 100%; height: auto; }
.seat-hero .seat-stage .seat-ctrls { position: absolute; top: 16px; right: 16px; display: flex; gap: 7px; }
.seat-chip { font-size: 11px; padding: 5px 11px; border-radius: 6px; border: 1px solid var(--rp-hair2); color: var(--rp-muted); }
.seat-hero .seat-stage .seat-hint {
  font-family: 'IBM Plex Mono', monospace; font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--rp-dim); padding: 2px 2px 10px;
}
.seat-hero .seat-node { padding: 16px 18px; }
.seat-hero .seat-node .seat-nl {
  font-family: 'IBM Plex Mono', monospace; font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--rp-dim);
}
.seat-hero .seat-node .seat-nn { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-top: 6px; color: var(--rp-text); }
.seat-hero .seat-node .seat-nn::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--rp-accent2); }
.seat-hero .seat-node .seat-nm2 { font-size: 12px; color: var(--rp-muted); margin: 3px 0 14px; }
.seat-hero .seat-node .seat-ev {
  font-family: 'IBM Plex Mono', monospace; font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--rp-dim); margin-bottom: 8px;
}
.seat-hero .seat-node ul { list-style: none; margin: 0 0 14px; padding: 0; }
.seat-hero .seat-node li { display: flex; gap: 8px; font-size: 12px; color: var(--rp-body); padding: 3px 0; }
.seat-hero .seat-node li::before { content: "◆"; color: var(--rp-accent); font-size: 9px; line-height: 1.4; }
.seat-hero .seat-node .seat-link { color: var(--rp-accent); font-size: 12px; text-decoration: none; }
.seat-hero .seat-node .seat-empty { font-size: 12.5px; color: var(--rp-muted); }

/* two-col strip: main + side */
.seat-strip { display: grid; grid-template-columns: 1fr 260px; gap: 14px; }
.seat-side-card { background: var(--rp-card); border: 1px solid var(--rp-hair2); border-radius: 12px; padding: 16px; }
.seat-side-card.accent { border-color: rgba(41,242,255,.25); }
.seat-side-card .seat-ct { font-family: 'IBM Plex Mono', monospace; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--rp-accent2); }
.seat-side-card .seat-big { font-family: 'Newsreader', Georgia, serif; font-size: 20px; margin: 6px 0 8px; color: var(--rp-text); }
.seat-side-card p { margin: 0; font-size: 12.5px; color: var(--rp-muted); line-height: 1.55; }

/* illustrative / placeholder badge — every honest-placeholder strip carries
   this so it never reads as live data (brief's lab rule). */
.seat-illustrative {
  font-family: 'IBM Plex Mono', monospace; font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--rp-dim); border: 1px dashed var(--rp-hair2); border-radius: 5px; padding: 2px 7px;
}

/* trajectory chart */
.seat-traj { position: relative; }
.seat-traj .seat-cap { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; flex-wrap: wrap; gap: 6px; }
.seat-traj .seat-cap b { font-weight: 600; color: var(--rp-text); }
.seat-traj .seat-cap span { font-size: 11px; color: var(--rp-muted); }
.seat-traj svg { width: 100%; height: auto; display: block; }
.seat-leg { display: flex; gap: 16px; margin-top: 8px; font-size: 11px; color: var(--rp-muted); flex-wrap: wrap; }
.seat-leg i { display: inline-block; width: 14px; height: 2px; vertical-align: middle; margin-right: 5px; }

/* gap coverage */
.seat-gap h3 { font-family: 'Newsreader', Georgia, serif; font-weight: 400; font-size: 19px; margin: 0 0 14px; line-height: 1.4; color: var(--rp-text); }
.seat-gap h3 b { font-weight: 600; }
.seat-gap .seat-cov { color: var(--rp-green); }
.seat-gap .seat-lnk { color: var(--rp-accent); }
.seat-cells { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.seat-cell { width: 30px; height: 26px; border-radius: 5px; }
.seat-cell.c { background: var(--rp-green); opacity: .85; }
.seat-cell.g { background: var(--rp-accent); }
.seat-covleg { display: flex; gap: 16px; font-size: 12px; color: var(--rp-muted); margin-bottom: 14px; flex-wrap: wrap; }
.seat-covleg i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: middle; margin-right: 6px; }
.seat-cta {
  background: var(--rp-accent); color: #04101E; font-weight: 600; font-size: 13px; border: none; border-radius: 8px;
  padding: 10px 18px; cursor: pointer; font-family: inherit;
}
.seat-cta:hover { background: var(--rp-accent2); }
.seat-cta[disabled], .seat-cta.is-placeholder { cursor: default; opacity: .55; }
.seat-cta[disabled]:hover, .seat-cta.is-placeholder:hover { background: var(--rp-accent); }
.seat-path .seat-rq { display: flex; gap: 10px; font-size: 12.5px; padding: 5px 0; border-bottom: 1px solid var(--rp-hair); color: var(--rp-muted); }
.seat-path .seat-rq:last-child { border-bottom: none; }

/* consent + purity */
.seat-consent .seat-row { display: flex; align-items: flex-start; gap: 11px; padding: 12px 0; border-bottom: 1px solid var(--rp-hair); }
.seat-consent .seat-row:last-child { border-bottom: none; }
.seat-consent .seat-row .seat-st { width: 7px; height: 7px; border-radius: 50%; margin-top: 5px; flex: none; }
.seat-consent .seat-row .seat-t { flex: 1; min-width: 0; }
.seat-consent .seat-row .seat-t b { font-weight: 600; font-size: 13px; color: var(--rp-text); }
.seat-consent .seat-row .seat-t span { display: block; font-size: 11.5px; color: var(--rp-dim); margin-top: 2px; }
.seat-consent .seat-row .seat-tag { font-size: 11px; color: var(--rp-muted); flex: none; }
.seat-consent .seat-row .seat-tag.rev { color: var(--rp-text); border: 1px solid var(--rp-hair2); border-radius: 6px; padding: 4px 10px; }
.seat-purity .seat-big { font-family: 'Newsreader', Georgia, serif; font-size: 38px; line-height: 1; color: var(--rp-text); }
.seat-purity .seat-big small { font-size: 13px; color: var(--rp-muted); font-family: 'Instrument Sans', sans-serif; margin-left: 6px; }
.seat-pbar { height: 6px; border-radius: 3px; background: rgba(255,255,255,.06); overflow: hidden; margin: 14px 0 10px; }
.seat-pbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--rp-accent), var(--rp-accent2)); }
.seat-refuse {
  font-family: 'IBM Plex Mono', monospace; font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--rp-dim); float: right;
}
.seat-foot {
  margin-top: 24px; padding: 14px 16px; border: 1px solid var(--rp-hair); border-radius: 10px;
  font-size: 12.5px; color: var(--rp-muted);
}
.seat-foot b { color: var(--rp-body); font-weight: 400; }

.seat-theme-toggle {
  display: flex; align-items: center; justify-content: center; width: 28px; height: 28px;
  background: none; border: 1px solid var(--rp-hair2); border-radius: 8px;
  color: var(--rp-muted); cursor: pointer; font-family: inherit; transition: all 0.2s; flex: none;
}
.seat-theme-toggle:hover { color: var(--rp-accent); border-color: var(--rp-accent); }

/* ---------- RESPONSIVE (the template's value-add — the React comp lacks it) ---------- */
@media (max-width: 900px) {
  .seat-shell { flex-direction: column; }
  .seat-side { display: none; }
  .seat-topbar {
    display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 5;
    padding: 11px 16px; background: var(--rp-bg); border-bottom: 1px solid var(--rp-hair); overflow-x: auto;
  }
  .seat-topbar .seat-brand { padding: 0; flex: none; }
  .seat-topbar .seat-tabs { display: flex; gap: 4px; flex: 1; }
  .seat-topbar .seat-tab {
    font-size: 12.5px; color: var(--rp-muted); padding: 5px 10px; border-radius: 6px; white-space: nowrap;
    text-decoration: none;
  }
  .seat-topbar .seat-tab.on { color: var(--rp-text); background: rgba(41,242,255,.08); }
  .seat-main { padding: 18px 16px 48px; }
  .seat-head h1 { font-size: 25px; max-width: none; }
  .seat-hero { grid-template-columns: 1fr; }
  .seat-hero .seat-stage { border-right: none; border-bottom: 1px solid var(--rp-hair); }
  /* The who-line ("Name · role · yrs") and the Rotate/Scrub chips share
     the same row on desktop, where there's room. Below 900px the who-line
     wraps to 2+ lines and the absolutely-positioned chips start overlapping
     it — drop them back into flow, below the text. */
  .seat-hero .seat-stage .seat-ctrls { position: static; margin: 8px 0 0; justify-content: flex-end; }
  .seat-strip { grid-template-columns: 1fr; }
  .seat-flow-row { grid-template-columns: 1fr; gap: 6px; text-align: left; }
  .seat-flow-rank { display: none; }
}
@media (prefers-reduced-motion: reduce) { .seat-shell, .seat-shell * { transition: none !important; } }

/*
 * Recruiter-seat brief (2026-07-29): "the flow" row grammar (rank, mini
 * shape-chip, who, score, tags, an action control). Promoted here from
 * that page's own inline <style> once the Leader seat (2026-07-30) reused
 * the same row markup for Open roles/Finalists — a page-local <style>
 * block only loads on that one page, so a second consumer needs this in
 * the shared stylesheet, not a copy-paste of the same rules.
 */
.seat-flow { padding: 6px 18px; }
.seat-flow-row {
  display: grid; grid-template-columns: 34px 44px 1fr 130px 1fr 170px;
  gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--rp-hair);
}
.seat-flow-row:last-child { border-bottom: none; }
.seat-flow-rank { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--rp-dim); }
.seat-flow-chip svg { width: 40px; height: 40px; display: block; }
.seat-flow-who { display: flex; flex-direction: column; min-width: 0; }
.seat-flow-name { color: var(--rp-text); font-size: 13px; font-weight: 600; text-decoration: none; }
.seat-flow-name:hover { color: var(--rp-accent); }
.seat-flow-job { font-size: 11.5px; color: var(--rp-dim); }
.seat-flow-score { position: relative; display: flex; align-items: center; font-size: 13px; }
.seat-flow-score .score-bar { position: absolute; left: 0; top: 50%; transform: translateY(-50%); height: 6px; border-radius: 3px; opacity: .3; min-width: 4px; }
.seat-flow-score strong { position: relative; z-index: 1; }
.seat-flow-reqs { display: flex; flex-direction: column; gap: 2px; font-size: 11.5px; min-width: 0; }
.seat-flow-tag { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat-flow-tag.ok { color: var(--rp-green); }
.seat-flow-tag.gap { color: var(--rp-accent); }
.seat-flow-stage { display: flex; gap: 6px; }
.seat-flow-stage-select {
  font-size: 12px; background: var(--rp-bg); color: var(--rp-text); border: 1px solid var(--rp-hair2);
  border-radius: 6px; padding: 4px 6px; font-family: inherit;
}
.seat-flow-stage-submit {
  font-size: 12px; background: none; border: 1px solid var(--rp-hair2); color: var(--rp-muted);
  border-radius: 6px; padding: 4px 10px; cursor: pointer; font-family: inherit;
}
.seat-flow-stage-submit:hover { color: var(--rp-accent); border-color: var(--rp-accent); }
.seat-empty { padding: 30px 4px; color: var(--rp-muted); font-size: 13px; }
