:root {
  --navy-950: #0d1a2b;
  --navy-900: #112640;
  --navy-800: #20395d;
  --navy-700: #375883;
  --sky-500: #89c6e8;
  --sky-300: #c9e7fb;
  --mint-500: #63d6be;
  --mint-200: #d8f7ef;
  --coral-500: #ff7e69;
  --coral-200: #ffe1da;
  --sand-100: #f4f8fc;
  --white: rgba(255, 255, 255, 0.82);
  --white-strong: rgba(255, 255, 255, 0.94);
  --line: rgba(28, 54, 88, 0.12);
  --line-strong: rgba(34, 69, 112, 0.22);
  --text: #12233b;
  --muted: #5d708d;
  --success: #157f68;
  --warning: #a96a19;
  --danger: #bd4f3f;
  --shadow-lg: 0 32px 90px rgba(20, 43, 75, 0.18);
  --shadow-md: 0 16px 44px rgba(20, 43, 75, 0.12);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

[hidden] {
  display: none !important;
}

body {
  position: relative;
  overflow-x: hidden;
  background:
    linear-gradient(160deg, #edf5fb 0%, #f6fbff 46%, #eef4fb 100%);
  color: var(--text);
  font-family: "Figtree", "Avenir Next", Avenir, sans-serif;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: "Montserrat", "Figtree", sans-serif;
  letter-spacing: -0.03em;
}

p {
  margin: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

.ambient {
  position: fixed;
  border-radius: 999px;
  filter: blur(12px);
  opacity: 0.7;
  pointer-events: none;
}

.ambient-one {
  top: -120px;
  left: -60px;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(137, 198, 232, 0.65), rgba(137, 198, 232, 0));
}

.ambient-two {
  top: 18%;
  right: -80px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(55, 88, 131, 0.32), rgba(55, 88, 131, 0));
}

.ambient-three {
  bottom: -140px;
  left: 22%;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(99, 214, 190, 0.3), rgba(99, 214, 190, 0));
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1720px, calc(100vw - 16px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.site-footer {
  margin-top: 20px;
  padding: 18px 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 18px;
  color: rgba(18, 35, 59, 0.62);
  font-size: 0.84rem;
  font-weight: 700;
  text-align: center;
}

.site-footer a {
  color: var(--navy-700);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--navy-900);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.panel {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.76));
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-xl);
}

.auth-view,
#appPanel {
  display: grid;
  gap: 20px;
}

.auth-view-clean {
  min-height: calc(100vh - 130px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 0;
}

.client-login-panel {
  width: min(540px, calc(100vw - 28px));
  padding: 34px 30px;
  display: grid;
  gap: 18px;
  box-shadow: var(--shadow-lg);
}

.client-login-brand {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 10px;
}

.client-login-brand .brand-logo {
  width: min(360px, 90%);
}

.client-login-brand h1 {
  font-size: clamp(1.9rem, 3.5vw, 2.5rem);
  color: var(--navy-900);
}

.client-login-brand .subtle {
  max-width: 34ch;
}

.client-login-form {
  margin-top: 4px;
}

.client-login-form .primary-button {
  width: 100%;
}

.client-login-panel .demo-hint,
.client-login-panel .error-message {
  margin-top: 0;
  text-align: center;
}

.auth-internals {
  display: none;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.9fr);
  gap: 20px;
  padding: 28px;
  box-shadow: var(--shadow-lg);
  align-items: start;
}

.hero-copy {
  display: grid;
  align-content: start;
  gap: 18px;
}

.brand-logo {
  width: min(420px, 100%);
  height: auto;
  object-fit: contain;
}

.brand-logo-small {
  width: 220px;
}

.hero-copy h1 {
  font-size: clamp(2.5rem, 4vw, 4.6rem);
  line-height: 0.96;
  max-width: 12ch;
  color: var(--navy-900);
}

.eyebrow {
  color: var(--navy-700);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.subtle,
.demo-hint,
.role-copy,
.candidate-muted,
.metric-copy {
  color: var(--muted);
}

.hero-chips,
.link-row,
.decision-actions,
.timeline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip,
.viewer-pill,
.pill,
.decision-pill,
.timeline-chip,
.rule-tag,
.account-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
}

.chip-sky,
.viewer-pill {
  background: rgba(137, 198, 232, 0.18);
  color: var(--navy-700);
}

.chip-coral {
  background: rgba(255, 126, 105, 0.16);
  color: #bf513c;
}

.chip-mint,
.account-card-badge.client-badge,
.status-hired,
.decision-advance {
  background: rgba(99, 214, 190, 0.18);
  color: var(--success);
}

.viewer-pill-strong,
.account-card-badge.admin-badge {
  background: linear-gradient(135deg, var(--navy-800), var(--navy-700));
  color: #eff7ff;
}

.spotlight-panel {
  padding: 22px;
  display: grid;
  gap: 16px;
}

.auth-spotlight {
  align-content: start;
  background:
    linear-gradient(180deg, rgba(22, 44, 73, 0.92), rgba(23, 51, 85, 0.78)),
    radial-gradient(circle at top right, rgba(137, 198, 232, 0.28), transparent 44%);
  color: #f2f8ff;
}

.auth-spotlight .eyebrow,
.auth-spotlight .subtle {
  color: rgba(242, 248, 255, 0.76);
}

.auth-spotlight h2 {
  font-size: clamp(1.6rem, 2vw, 2.4rem);
}

.signal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.signal-card,
.metric-card,
.info-card,
.rule-card {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.1);
}

.signal-card {
  padding: 16px;
  display: grid;
  gap: 8px;
}

.signal-label,
.metric-label {
  font-size: 0.82rem;
  color: inherit;
  opacity: 0.76;
}

.signal-value {
  font-size: 1.7rem;
  font-family: "Montserrat", "Figtree", sans-serif;
}

.auth-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 20px;
}

.account-panel,
.notes-panel,
.topbar,
.roles-panel,
.candidates-panel,
.filter-bar {
  padding: 24px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.candidates-panel .section-heading {
  margin-bottom: 12px;
}

.candidate-review-sticky {
  position: relative;
  top: auto;
  z-index: 1;
  margin: 0;
  padding: 10px 10px 4px;
  border: 1px solid rgba(28, 54, 88, 0.08);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 252, 255, 0.92));
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 36px rgba(20, 43, 75, 0.08);
}

.candidate-review-sticky .section-heading {
  margin-bottom: 8px;
}

.review-scope-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -2px 0 12px;
}

.review-scope-label {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(55, 88, 131, 0.78);
}

.review-scope-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(34, 69, 112, 0.12);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 10px 24px rgba(20, 43, 75, 0.06);
}

.review-scope-button {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 9px 14px;
  transition:
    background-color 140ms ease,
    color 140ms ease,
    box-shadow 140ms ease;
}

.review-scope-button:hover {
  color: var(--navy-800);
}

.review-scope-button.is-active {
  background: linear-gradient(135deg, rgba(137, 198, 232, 0.28), rgba(99, 214, 190, 0.24));
  color: var(--navy-900);
  box-shadow: inset 0 0 0 1px rgba(55, 88, 131, 0.16);
}

:root {
  --candidate-col-status: 60px;
  --candidate-col-candidate: 206px;
  --candidate-col-role: 252px;
  --candidate-col-rate: 82px;
  --candidate-col-stage: 124px;
  --candidate-col-cvweek: 98px;
  --candidate-col-interviews: 88px;
  --candidate-col-profile: 104px;
  --candidate-col-call: 154px;
}

.candidate-review-sticky #roleMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}

.count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(137, 198, 232, 0.22);
  color: var(--navy-800);
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
}

.candidate-review-sticky .link-row:empty {
  display: none;
}

.roles-panel .section-heading {
  margin-bottom: 10px;
}

.roles-section-heading {
  align-items: center;
}

.roles-scroll-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.roles-scroll-button {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(34, 69, 112, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--navy-800);
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  transition:
    transform 140ms ease,
    background-color 140ms ease,
    border-color 140ms ease;
}

.roles-scroll-button:hover {
  transform: translateY(-1px);
  background: rgba(137, 198, 232, 0.18);
  border-color: rgba(55, 88, 131, 0.22);
}

.section-heading h2,
.section-heading h3 {
  font-size: clamp(1.4rem, 1.8vw, 1.9rem);
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.account-card {
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--white-strong);
  display: grid;
  gap: 12px;
  cursor: pointer;
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.account-card:hover {
  transform: translateY(-2px);
  border-color: rgba(55, 88, 131, 0.36);
  box-shadow: 0 18px 34px rgba(32, 57, 93, 0.1);
}

.account-card.is-selected {
  border-color: rgba(55, 88, 131, 0.42);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(233, 245, 255, 0.94));
  box-shadow: 0 20px 40px rgba(36, 64, 102, 0.12);
}

.account-card-title {
  font-family: "Montserrat", "Figtree", sans-serif;
  font-size: 1.05rem;
  color: var(--navy-900);
}

.account-card-copy {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy-800);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  padding: 14px 16px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(55, 88, 131, 0.42);
  box-shadow: 0 0 0 4px rgba(137, 198, 232, 0.18);
}

.password-input {
  position: relative;
  display: block;
}

.password-input input {
  padding-right: 82px;
}

.access-visibility-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  min-width: 58px;
  border: 1px solid rgba(34, 69, 112, 0.14);
  border-radius: 999px;
  background: rgba(137, 198, 232, 0.18);
  color: var(--navy-800);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 8px 10px;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.access-visibility-toggle:hover {
  background: rgba(99, 214, 190, 0.18);
  border-color: rgba(21, 127, 104, 0.24);
  color: var(--success);
}

.compact input,
.compact select {
  padding: 14px 18px;
  min-height: 56px;
}

.primary-button,
.ghost-button,
.decision-button,
.link-button,
.mini-button,
.dialog-close {
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.primary-button {
  padding: 14px 18px;
  color: #f7fbff;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-700));
  box-shadow: 0 16px 30px rgba(28, 54, 88, 0.2);
}

.ghost-button,
.dialog-close,
.link-button,
.mini-button {
  background: rgba(255, 255, 255, 0.86);
  color: var(--navy-900);
  border: 1px solid var(--line);
}

.ghost-button,
.dialog-close {
  padding: 12px 16px;
}

.link-button,
.mini-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
}

.link-button {
  padding: 10px 14px;
}

.mini-button {
  padding: 8px 12px;
  font-size: 0.84rem;
}

.demo-hint,
.error-message {
  margin-top: 14px;
  font-size: 0.92rem;
}

.error-message {
  color: var(--danger);
}

.rule-list {
  display: grid;
  gap: 12px;
}

.rule-card {
  padding: 18px;
  border-color: var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(240, 248, 255, 0.88));
  display: grid;
  gap: 12px;
}

.rule-tag {
  width: fit-content;
  background: rgba(17, 38, 64, 0.08);
  color: var(--navy-700);
}

.topbar {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  overflow: hidden;
  padding: 18px 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(231, 245, 255, 0.84)),
    radial-gradient(circle at 74% 24%, rgba(99, 214, 190, 0.18), transparent 34%);
}

.topbar::after {
  content: "";
  position: absolute;
  right: 22%;
  top: 12px;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: rgba(137, 198, 232, 0.16);
  filter: blur(24px);
  pointer-events: none;
}

.topbar-brand,
.topbar-client-card,
.topbar-actions {
  position: relative;
  z-index: 1;
}

.topbar-brand {
  display: flex;
  align-items: center;
  padding-right: 18px;
  border-right: 1px solid rgba(34, 69, 112, 0.12);
}

.topbar-client-card {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  width: fit-content;
  max-width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(34, 69, 112, 0.12);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.48);
}

.client-logo-frame {
  display: grid;
  place-items: center;
  width: 96px;
  height: 54px;
  flex: 0 0 96px;
  padding: 8px 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(34, 69, 112, 0.12);
  box-shadow: 0 12px 28px rgba(20, 43, 75, 0.08);
}

.client-logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.topbar-kicker {
  margin-bottom: 2px;
  font-size: 0.68rem;
  color: rgba(55, 88, 131, 0.78);
}

.topbar-client-card h2 {
  max-width: 48vw;
  overflow: hidden;
  color: var(--navy-900);
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  line-height: 1.03;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.topbar-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(137, 198, 232, 0.18);
  color: var(--navy-700);
  font-size: 0.86rem;
  font-weight: 700;
}

.topbar-meta #syncStamp {
  background: rgba(255, 255, 255, 0.64);
  color: var(--muted);
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
}

.refresh-status {
  flex-basis: 100%;
  text-align: right;
  font-size: 0.82rem;
}

.spotlight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.spotlight-panel h3 {
  font-size: 1.5rem;
}

.spotlight-panel h4 {
  font-size: 1.02rem;
}

.spotlight-panel ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  display: grid;
  gap: 8px;
}

.pipeline-funnel {
  display: grid;
  gap: 10px;
}

.funnel-step {
  display: grid;
  grid-template-columns: minmax(132px, 0.62fr) minmax(140px, 1fr) minmax(62px, auto);
  gap: 12px;
  align-items: center;
}

.funnel-label {
  color: var(--navy-800);
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.15;
}

.funnel-track {
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(32, 57, 93, 0.08);
}

.funnel-bar {
  display: block;
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(99, 214, 190, 0.95), rgba(137, 198, 232, 0.96) 58%, rgba(55, 88, 131, 0.9));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32);
}

.funnel-count {
  color: var(--navy-900);
  font-size: 0.9rem;
  font-weight: 900;
  text-align: right;
  white-space: nowrap;
}

.funnel-count small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.activity-chart {
  min-height: 150px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(54px, 1fr));
  gap: 12px;
  align-items: end;
  padding: 6px 2px 0;
}

.activity-week {
  min-width: 0;
  display: grid;
  gap: 8px;
  align-items: end;
  text-align: center;
}

.activity-bars {
  height: 112px;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 5px;
  padding: 0 3px;
  border-bottom: 1px solid rgba(32, 57, 93, 0.12);
}

.activity-bar {
  width: 11px;
  min-height: 0;
  border-radius: 999px 999px 5px 5px;
}

.activity-bar-submitted {
  background: linear-gradient(180deg, var(--sky-500), rgba(137, 198, 232, 0.48));
}

.activity-bar-interviews {
  background: linear-gradient(180deg, var(--mint-500), rgba(99, 214, 190, 0.45));
}

.activity-bar-outcomes {
  background: linear-gradient(180deg, var(--coral-500), rgba(255, 126, 105, 0.42));
}

.activity-week-label {
  color: var(--navy-700);
  font-size: 0.76rem;
  font-weight: 900;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.chart-legend span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  display: inline-block;
}

.legend-submitted {
  background: var(--sky-500);
}

.legend-interviews {
  background: var(--mint-500);
}

.legend-outcomes {
  background: var(--coral-500);
}

.chart-empty {
  padding: 18px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.metric-card {
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--white);
  display: grid;
  gap: 8px;
}

.metric-value {
  font-size: 1.9rem;
  font-family: "Montserrat", "Figtree", sans-serif;
  color: var(--navy-900);
}

.role-filter-bar,
.candidate-filter-bar {
  display: grid;
  gap: 10px;
  padding: 10px 14px 12px;
  position: relative;
  overflow: visible;
}

.filter-title {
  margin: 0;
  padding: 0;
  line-height: 1.35;
  display: block;
  white-space: nowrap;
}

.filter-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.filter-panel-head-main {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.filter-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 30px;
}

.filter-summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(137, 198, 232, 0.16);
  color: var(--navy-700);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.filter-summary-chip strong {
  color: var(--navy-900);
  font-weight: 800;
}

.filter-summary-chip.is-empty {
  background: rgba(17, 38, 64, 0.08);
  color: var(--muted);
}

.filter-toggle {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  color: var(--navy-700);
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 6px 10px;
  cursor: pointer;
}

.filter-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 12px;
}

.role-filter-bar .field,
.candidate-filter-bar .field {
  min-width: 0;
}

.filter-panel.is-collapsed .filter-fields {
  display: none;
}

.filter-panel.is-collapsed {
  padding-bottom: 10px;
}

.filter-fields .compact input,
.filter-fields .compact select {
  min-height: 40px;
  padding: 8px 11px;
}

.workspace-stack {
  display: grid;
  gap: 18px;
}

.workspace-stack > .panel {
  min-width: 0;
}

.roles-panel {
  position: sticky;
  top: 10px;
  z-index: 22;
  min-height: auto;
  padding: 16px 18px 18px;
  overflow: hidden;
}

.candidates-panel {
  min-height: 62vh;
  min-width: 0;
  overflow: hidden;
}

.roles-list {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 10px;
  scroll-snap-type: x proximity;
  scrollbar-gutter: stable both-edges;
  scrollbar-width: thin;
  scrollbar-color: rgba(55, 88, 131, 0.28) rgba(17, 38, 64, 0.06);
  -webkit-overflow-scrolling: touch;
}

.roles-list::-webkit-scrollbar {
  height: 8px;
}

.roles-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(55, 88, 131, 0.24);
}

.role-card {
  width: 188px;
  min-width: 188px;
  flex: 0 0 188px;
  scroll-snap-align: start;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  padding: 12px;
  display: grid;
  gap: 7px;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.role-card:hover {
  transform: translateY(-2px);
  border-color: rgba(55, 88, 131, 0.34);
  box-shadow: 0 16px 30px rgba(32, 57, 93, 0.08);
}

.role-card.active {
  border-color: rgba(55, 88, 131, 0.4);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(229, 243, 255, 0.92));
}

.role-title-row,
.role-meta-row,
.candidate-name-cell {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.role-title {
  font-weight: 800;
  color: var(--navy-900);
  line-height: 1.15;
  text-align: center;
  width: 100%;
}

.role-title-row-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  align-items: start;
}

.role-title-row-top > div {
  min-width: 0;
  width: 100%;
  display: grid;
  justify-items: center;
  text-align: center;
}

.role-title-row-top .pill {
  margin-top: 6px;
  justify-self: center;
}

.role-subline {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.role-company {
  font-size: 0.82rem;
  color: var(--muted);
}

.role-company-top {
  margin-bottom: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(55, 88, 131, 0.78);
}

.role-facts {
  display: grid;
  gap: 3px;
  justify-items: center;
  text-align: center;
}

.role-live-week {
  font-size: 0.72rem;
  color: var(--navy-700);
  font-weight: 700;
}

.role-candidate-summary {
  width: 100%;
  text-align: center;
  font-size: 0.72rem;
  line-height: 1.25;
  font-weight: 500;
  color: rgba(18, 35, 59, 0.6);
}

.role-candidate-summary strong {
  color: var(--navy-800);
  font-weight: 800;
}

.candidate-table {
  width: 100%;
  min-width: 960px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.table-wrap {
  overflow-x: auto;
  overflow-y: visible;
  max-width: 100%;
  width: 100%;
  min-width: 0;
  margin-top: 0;
  border-radius: var(--radius-lg);
  scrollbar-gutter: stable both-edges;
  scrollbar-width: thin;
  scrollbar-color: rgba(55, 88, 131, 0.28) rgba(17, 38, 64, 0.06);
  -webkit-overflow-scrolling: touch;
}

.candidate-table th,
.candidate-table td {
  padding: 10px 4px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-family: Avenir, "Avenir Next", sans-serif;
  font-size: 0.65625rem;
  line-height: 1.25;
}

.candidate-table thead {
  position: sticky;
  top: 0;
  z-index: 13;
}

.candidate-table thead th {
  background: rgba(248, 252, 255, 0.96);
  backdrop-filter: blur(18px);
  border-bottom: 0;
}

.candidate-label-row th:first-child {
  border-top-left-radius: 18px;
}

.candidate-label-row th:last-child {
  border-top-right-radius: 18px;
}

.candidate-table th {
  padding-block: 5px;
  font-family: Avenir, "Avenir Next", sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.candidate-filter-row th {
  padding-top: 0;
  padding-bottom: 6px;
  border-bottom: 0;
}

.candidate-filter-row select {
  width: 100%;
  min-width: 0;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  font-family: Avenir, "Avenir Next", sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.1;
  padding: 4px 7px;
}

.candidate-table th:nth-child(1),
.candidate-table td:nth-child(1),
.candidate-table th:nth-child(4),
.candidate-table th:nth-child(5),
.candidate-table th:nth-child(6),
.candidate-table th:nth-child(7),
.candidate-table th:nth-child(8),
.candidate-table td:nth-child(4),
.candidate-table td:nth-child(5),
.candidate-table td:nth-child(6),
.candidate-table td:nth-child(7),
.candidate-table td:nth-child(8) {
  text-align: center;
}

.candidate-table th:nth-child(1) select,
.candidate-table th:nth-child(4) select,
.candidate-table th:nth-child(5) select,
.candidate-table th:nth-child(6) select,
.candidate-table th:nth-child(7) select,
.candidate-table th:nth-child(8) select {
  text-align: center;
  text-align-last: center;
}

.table-sort {
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  white-space: nowrap;
  line-height: 1;
  width: 100%;
}

.table-sort:hover {
  color: var(--navy-700);
}

.candidate-table td:nth-child(2) {
  width: var(--candidate-col-candidate);
}

.candidate-table td:nth-child(2) > div {
  font-family: Avenir, "Avenir Next", sans-serif;
  font-size: 0.84rem;
  line-height: 1.25;
}

.candidate-table td:nth-child(1) {
  width: var(--candidate-col-status);
  text-align: center;
}

.candidate-table td:nth-child(1) .pill {
  margin-inline: auto;
}

.candidate-table td:nth-child(3) {
  width: var(--candidate-col-role);
}

.candidate-table td:nth-child(3) > div {
  font-family: Avenir, "Avenir Next", sans-serif;
  font-size: 0.82rem;
  line-height: 1.25;
}

.candidate-table td:nth-child(4) {
  width: var(--candidate-col-stage);
}

.candidate-table td:nth-child(5) {
  width: var(--candidate-col-cvweek);
  text-align: center;
}

.candidate-table td:nth-child(6) {
  width: var(--candidate-col-interviews);
  text-align: center;
}

.candidate-table td:nth-child(7) {
  width: var(--candidate-col-rate);
  text-align: center;
  font-weight: 800;
  color: var(--navy-900);
}

.candidate-table td:nth-child(8) {
  width: var(--candidate-col-profile);
  text-align: center;
}

.candidate-table td:nth-child(9) {
  width: var(--candidate-col-call);
  text-align: center;
}

.candidate-table td:nth-child(4) {
  color: var(--navy-900);
  font-weight: 800;
  white-space: nowrap;
}

.candidate-table td:nth-child(1) .pill,
.candidate-table td:nth-child(8) .profile-link-pill,
.candidate-table td:nth-child(9) .decision-pill,
.candidate-table td:nth-child(9) .decision-select {
  margin-inline: auto;
}

.candidate-table tbody tr:first-child td {
  padding-top: 6px;
}

.candidate-table td:nth-child(7),
.candidate-table td:nth-child(8) {
  white-space: nowrap;
}

.candidate-row-button {
  background: transparent;
  border: 0;
  padding: 0;
  font-family: Avenir, "Avenir Next", sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--navy-900);
  cursor: pointer;
  text-align: left;
}

.candidate-table td:nth-child(2),
.candidate-table td:nth-child(3),
.candidate-table td:nth-child(4) {
  font-size: 0.82rem;
}

.candidate-table td:nth-child(5),
.candidate-table td:nth-child(6),
.candidate-table td:nth-child(7) {
  font-size: 0.8rem;
}

.candidate-col-status { width: var(--candidate-col-status); }
.candidate-col-candidate { width: var(--candidate-col-candidate); }
.candidate-col-role { width: var(--candidate-col-role); }
.candidate-col-stage { width: var(--candidate-col-stage); }
.candidate-col-cvweek { width: var(--candidate-col-cvweek); }
.candidate-col-interviews { width: var(--candidate-col-interviews); }
.candidate-col-rate { width: var(--candidate-col-rate); }
.candidate-col-profile { width: var(--candidate-col-profile); }
.candidate-col-call { width: var(--candidate-col-call); }

.profile-link-pill {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid rgba(55, 88, 131, 0.2);
  background: rgba(137, 198, 232, 0.26);
  color: var(--navy-800);
  font-family: Avenir, "Avenir Next", sans-serif;
  font-size: 0.66rem;
  font-weight: 800;
  text-decoration: none;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(55, 88, 131, 0.08);
  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    box-shadow 140ms ease;
}

.profile-link-pill:hover {
  border-color: rgba(55, 88, 131, 0.28);
  background: rgba(137, 198, 232, 0.34);
  box-shadow: 0 10px 20px rgba(55, 88, 131, 0.11);
}

.profile-stack {
  display: grid;
  gap: 6px;
}

.profile-label {
  font-size: 0.8rem;
  color: var(--muted);
}

.empty-dash {
  display: inline-flex;
  min-width: 1.2ch;
  min-height: 1em;
  justify-content: center;
  color: rgba(18, 35, 59, 0.56);
  font-weight: 600;
}

.status-open,
.status-pending,
.decision-pill.decision-hold {
  background: rgba(249, 180, 58, 0.16);
  color: var(--warning);
}

.status-active {
  background: rgba(99, 214, 190, 0.18);
  color: var(--success);
}

.status-closed,
.status-rejected,
.decision-pill.decision-reject {
  background: rgba(255, 126, 105, 0.18);
  color: var(--danger);
}

.status-neutral,
.decision-pill.decision-undecided {
  background: rgba(17, 38, 64, 0.08);
  color: var(--muted);
}

.role-status-open {
  background: rgba(99, 214, 190, 0.2);
  color: var(--success);
}

.role-status-hold {
  background: rgba(249, 180, 58, 0.18);
  color: var(--warning);
}

.role-status-closed {
  background: rgba(255, 126, 105, 0.2);
  color: var(--danger);
}

.decision-select {
  appearance: none;
  width: 100%;
  min-width: 132px;
  max-width: 148px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 7px 28px 7px 12px;
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-align-last: center;
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:
    calc(100% - 15px) 50%,
    calc(100% - 10px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease,
    color 140ms ease;
}

.decision-select:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(137, 198, 232, 0.22);
}

.decision-select.decision-undecided {
  border-color: rgba(55, 88, 131, 0.28);
  background-color: rgba(137, 198, 232, 0.22);
  color: var(--navy-800);
  box-shadow: 0 8px 18px rgba(55, 88, 131, 0.1);
}

.decision-select.decision-undecided:hover {
  border-color: rgba(55, 88, 131, 0.38);
  background-color: rgba(137, 198, 232, 0.3);
}

.decision-select.decision-advance {
  border-color: rgba(21, 127, 104, 0.24);
  background-color: rgba(99, 214, 190, 0.2);
  color: var(--success);
}

.decision-select.decision-hold {
  border-color: rgba(169, 106, 25, 0.24);
  background-color: rgba(249, 180, 58, 0.18);
  color: var(--warning);
}

.decision-select.decision-reject {
  border-color: rgba(189, 79, 63, 0.24);
  background-color: rgba(255, 126, 105, 0.2);
  color: var(--danger);
}

.decision-select option {
  background: #fff;
  color: var(--text);
  font-weight: 700;
}

.empty-state {
  padding: 28px;
  text-align: center;
  color: var(--muted);
}

.candidate-dialog {
  width: min(860px, calc(100vw - 32px));
  border: 0;
  padding: 0;
  background: transparent;
}

.candidate-dialog::backdrop {
  background: rgba(13, 26, 43, 0.44);
  backdrop-filter: blur(8px);
}

.dialog-shell {
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 249, 255, 0.95));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  padding: 24px;
}

.dialog-close {
  margin-left: auto;
  display: block;
  margin-bottom: 18px;
}

.dialog-body {
  display: grid;
  gap: 18px;
}

.dialog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.info-card {
  padding: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
}

.info-card h4 {
  margin-bottom: 12px;
}

.timeline-chip {
  background: rgba(137, 198, 232, 0.18);
  color: var(--navy-700);
}

.decision-button {
  padding: 12px 16px;
  color: #fff;
}

.decision-button[data-decision="advance"] {
  background: linear-gradient(135deg, #18a085, #157f68);
}

.decision-button[data-decision="hold"] {
  background: linear-gradient(135deg, #f0a63f, #c98422);
}

.decision-button[data-decision="reject"] {
  background: linear-gradient(135deg, #ef715f, #c25041);
}

.decision-button[data-decision="clear"] {
  background: linear-gradient(135deg, #687c99, #48607f);
}

.stack {
  display: grid;
  gap: 8px;
}

.sync-meta {
  display: grid;
  gap: 10px;
}

.sync-meta strong {
  color: var(--navy-900);
}

.sync-link {
  width: fit-content;
}

@media (max-width: 1240px) {
  .hero-panel,
  .auth-grid,
  .spotlight-grid {
    grid-template-columns: 1fr;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 860px) {
  .page-shell {
    width: min(100vw - 20px, 100%);
    padding: 12px 0 28px;
  }

  .hero-panel,
  .account-panel,
  .notes-panel,
  .topbar,
  .roles-panel,
  .candidates-panel,
  .filter-bar,
  .spotlight-panel {
    padding: 18px;
  }

  .topbar,
  .section-heading,
  .role-title-row,
  .role-meta-row,
  .candidate-name-cell,
  .topbar-brand {
    flex-direction: column;
    align-items: flex-start;
  }

  .funnel-step {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .funnel-track {
    grid-column: 1 / -1;
  }

  .topbar {
    grid-template-columns: 1fr;
  }

  .topbar-brand {
    flex-direction: row;
    padding-right: 0;
    border-right: 0;
  }

  .topbar-client-card {
    width: 100%;
  }

  .topbar-client-card h2 {
    max-width: 100%;
    white-space: normal;
  }

  .activity-chart {
    grid-template-columns: repeat(auto-fit, minmax(44px, 1fr));
  }

  .topbar-actions {
    justify-content: flex-start;
  }

  .review-scope-controls {
    flex-direction: column;
    align-items: flex-start;
  }

  .filter-panel-head {
    align-items: flex-start;
  }

  .filter-summary {
    min-height: 0;
  }

  .signal-grid,
  .account-grid,
  .metrics-grid,
  .filter-fields,
  .dialog-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    max-width: none;
    font-size: clamp(2rem, 11vw, 3.3rem);
  }
}
