/* ============================================================
   RECRUITERVIEW · COMPONENT KIT (rv-kit.css)
   All selectors .rv-* prefixed — coexists with Tailwind.
   ============================================================ */

/* ---------- Typography ---------- */
.rv-display { font-size: 32px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.1; margin: 0; }
.rv-h1      { font-size: 22px; font-weight: 600; letter-spacing: -0.02em;  line-height: 1.2; margin: 0; }
.rv-h2      { font-size: 15px; font-weight: 600; letter-spacing: -0.01em;  line-height: 1.3; margin: 0; }
.rv-body    { font-size: 13px; font-weight: 400; line-height: 1.55; margin: 0; color: var(--fg); }
.rv-kicker  { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand); margin: 0; }
.rv-mono    { font-family: var(--font-mono); font-size: 12px; color: var(--fg-muted); }
.rv-muted   { color: var(--fg-muted); }
.rv-subtle  { color: var(--fg-subtle); }

/* ---------- BUTTON (.rv-btn) ---------- */
.rv-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-family: inherit; font-size: 13px; font-weight: 600; letter-spacing: -0.005em;
  padding: 0 14px; height: 32px;
  border-radius: var(--radius-sm); border: 1px solid transparent;
  cursor: pointer; user-select: none; white-space: nowrap;
  transition: background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
a.rv-btn { text-decoration: none; box-sizing: border-box; }
.rv-btn:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; }
.rv-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.rv-btn--primary { background: var(--brand); color: var(--brand-ink); }
.rv-btn--primary:hover:not(:disabled) { background: var(--brand-2); }
.rv-btn--ghost { background: transparent; color: var(--fg); border-color: var(--border-strong); }
.rv-btn--ghost:hover:not(:disabled) { background: var(--bg-raised); border-color: var(--fg-muted); }
.rv-btn--danger { background: var(--sla-breach); color: #fff; }
.rv-btn--danger:hover:not(:disabled) { background: #DC2626; }
.rv-btn--success { background: var(--sla-safe); color: var(--fg-on-brand); }
.rv-btn--success:hover:not(:disabled) { background: #16A34A; color: #fff; }
.rv-btn--subtle { background: var(--bg-raised); color: var(--fg); }
.rv-btn--subtle:hover:not(:disabled) { background: var(--border-strong); }
.rv-btn--sm { height: 26px; padding: 0 10px; font-size: 12px; }
.rv-btn--lg { height: 40px; padding: 0 18px; font-size: 14px; }
.rv-btn--icon { width: 32px; padding: 0; }
.rv-btn--icon.rv-btn--sm { width: 26px; }

/* ---------- PILL (.rv-pill) ---------- */
.rv-pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 22px; padding: 0 10px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.02em;
  border-radius: var(--radius-pill); border: 1px solid;
  white-space: nowrap;
}
.rv-pill--neutral { background: var(--bg-raised); color: var(--fg-muted); border-color: var(--border); }
.rv-pill--brand   { background: rgba(245,158,11,0.10); color: var(--brand-2); border-color: rgba(245,158,11,0.30); }
.rv-pill--info    { background: rgba(56,189,248,0.08);  color: #7DD3FC;      border-color: rgba(56,189,248,0.25); }
/* Active / on-track status (tables — tokens only, no inline rgba in templates) */
.rv-pill--dot-active {
  background: color-mix(in srgb, var(--sla-safe) 10%, transparent);
  color: var(--sla-safe-fg);
  border-color: color-mix(in srgb, var(--sla-safe) 30%, transparent);
}
.rv-pill--dot::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: currentColor; }

/* ---------- INPUT (.rv-input / .rv-field) ---------- */
.rv-field { display: flex; flex-direction: column; gap: 6px; }
.rv-field__label { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-muted); }
.rv-field__hint  { font-size: 11px; color: var(--fg-subtle); }
.rv-field__error { font-size: 11px; color: var(--sla-breach-fg); }
.rv-input, .rv-select, .rv-textarea {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 34px; padding: 0 12px;
  background: var(--bg-inset); color: var(--fg);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 13px; line-height: 1.4;
  transition: border-color var(--dur-1) var(--ease), background var(--dur-1) var(--ease);
}
/* Tailwind CDN injects [type='text']{background:#fff} dynamically (same specificity 0,1,0).
   element.class = 0,1,1 always wins regardless of injection order. */
input.rv-input, textarea.rv-textarea {
  background: var(--bg-inset); color: var(--fg);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 13px; padding: 0 12px;
}
.rv-input::placeholder, .rv-textarea::placeholder { color: var(--fg-subtle); }
input.rv-input::placeholder, textarea.rv-textarea::placeholder { color: var(--fg-subtle); }
.rv-input:hover, .rv-select:hover, .rv-textarea:hover { border-color: var(--border-strong); }
input.rv-input:hover, textarea.rv-textarea:hover { border-color: var(--border-strong); }
.rv-input:focus, .rv-select:focus, .rv-textarea:focus { outline: none; border-color: var(--border-focus); background: var(--bg-surface); }
input.rv-input:focus, textarea.rv-textarea:focus { outline: none; border-color: var(--border-focus); background: var(--bg-surface); }
.rv-input:disabled { opacity: 0.5; cursor: not-allowed; }
.rv-field--error .rv-input, .rv-field--error .rv-select { border-color: var(--sla-breach); }
.rv-textarea { height: auto; min-height: 88px; padding: 10px 12px; resize: vertical; }

/* ---------- SELECT (.rv-select) ---------- */
.rv-select {
  appearance: none; -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--fg-muted) 50%),
    linear-gradient(135deg, var(--fg-muted) 50%, transparent 50%);
  background-position: right 14px center, right 9px center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 30px;
}
.rv-check {
  appearance: none; -webkit-appearance: none;
  width: 16px; height: 16px;
  background: var(--bg-inset); border: 1px solid var(--border-strong);
  border-radius: 4px; cursor: pointer;
  display: inline-grid; place-items: center;
  transition: all var(--dur-1) var(--ease);
}
.rv-check:checked { background: var(--brand); border-color: var(--brand); }
.rv-check:checked::after {
  content: "";
  width: 8px; height: 4px;
  border-left: 2px solid var(--brand-ink);
  border-bottom: 2px solid var(--brand-ink);
  transform: rotate(-45deg) translate(1px,-1px);
}

/* ---------- CARD (.rv-card) ---------- */
.rv-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.rv-card--flush { padding: 0; }
.rv-card--inset { background: var(--bg-inset); }
.rv-card__hd { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.rv-card__ft { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }

/* ---------- ONBOARDING (dashboard checklist + first-login wizard) ---------- */
.rv-onboarding-card {
  margin-bottom: var(--space-6);
  padding: 20px 24px;
  border-top: 3px solid var(--brand);
}
.rv-onboarding-card .rv-card__hd {
  margin-bottom: 0;
  align-items: center;
}
.rv-onboarding-card .rv-h1 + .rv-body {
  margin-top: 8px;
}
.rv-onboarding-checklist__optional {
  margin-left: 6px;
  font-size: 11px;
}
.rv-progress {
  width: 100%;
  height: 10px;
  border-radius: var(--radius-pill);
  background: var(--bg-inset);
  overflow: hidden;
  margin-top: 10px;
  margin-bottom: 4px;
}
.rv-progress__fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  transition: width 0.45s var(--ease);
}
.rv-onboarding-checklist {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rv-onboarding-checklist__row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.45;
}
.rv-onboarding-checklist__icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 4px;
  display: grid;
  place-items: center;
}
.rv-onboarding-checklist__icon--done {
  background: rgba(34, 197, 94, 0.14);
  color: var(--sla-safe-fg);
  border: 1px solid rgba(34, 197, 94, 0.35);
}
.rv-onboarding-checklist__icon--done::after {
  content: "";
  width: 8px;
  height: 4px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg) translate(0, -1px);
}
.rv-onboarding-checklist__icon--todo {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  border-radius: 999px;
  border: 2px solid rgba(239, 68, 68, 0.55);
  background: rgba(239, 68, 68, 0.08);
}
.rv-onboarding-checklist__title--done {
  color: var(--sla-safe-fg);
  font-weight: 600;
}
.rv-onboarding-checklist__link {
  color: var(--fg);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}
.rv-onboarding-checklist__link:hover {
  color: var(--brand-2);
  border-bottom-color: rgba(245, 158, 11, 0.45);
}
.rv-onboarding-wizard__backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  background: rgba(8, 14, 26, 0.78);
  backdrop-filter: blur(5px);
}
.rv-onboarding-wizard__panel {
  width: 100%;
  max-width: 32rem;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-3);
  padding: 48px 28px 24px;
  position: relative;
}
.rv-onboarding-wizard__panel--spotlight {
  background:
    radial-gradient(900px 280px at 90% -40%, rgba(245, 158, 11, 0.16), transparent 60%),
    radial-gradient(600px 220px at 10% -30%, rgba(251, 191, 36, 0.10), transparent 65%),
    var(--bg-surface);
}
.rv-onboarding-wizard__hero {
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.rv-onboarding-wizard__skip {
  position: absolute;
  right: 20px;
  top: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: color var(--dur-1) var(--ease), background var(--dur-1) var(--ease);
}
.rv-onboarding-wizard__skip:hover {
  color: var(--fg);
  background: var(--bg-raised);
}
.rv-onboarding-wizard__progress {
  width: 100%;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--bg-inset);
  overflow: hidden;
  margin-top: 6px;
  margin-bottom: 12px;
}
.rv-onboarding-wizard__progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  transition: width 0.45s var(--ease);
}
.rv-onboarding-wizard__text {
  margin-top: 10px;
}
.rv-onboarding-wizard__text--sub {
  margin-top: 6px;
}
.rv-onboarding-wizard__title-gap {
  margin-top: 4px;
}
.rv-onboarding-wizard__actions {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.rv-onboarding-wizard__nav {
  margin-top: 16px;
}
.rv-kicker.rv-onboarding-wizard__step-label {
  color: var(--fg-muted);
}

.rv-onboarding-resume {
  margin-bottom: var(--space-6);
  border-color: var(--border-strong);
  background:
    radial-gradient(520px 180px at 90% -60%, rgba(245, 158, 11, 0.14), transparent 60%),
    var(--bg-surface);
}
.rv-onboarding-resume__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.rv-onboarding-resume__body {
  margin-top: 10px;
}
.rv-onboarding-resume__actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
}

/* ---------- EMPTY STATE (.rv-empty) ---------- */
.rv-empty {
  padding: 48px 24px;
  text-align: center;
  background: var(--bg-surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
}
.rv-empty__icon {
  width: 40px; height: 40px; margin: 0 auto 14px;
  border-radius: var(--radius-pill);
  background: var(--bg-raised);
  display: grid; place-items: center;
  color: var(--fg-muted); font-size: 20px;
}
.rv-empty__title { font-size: 15px; font-weight: 600; margin: 0 0 4px; color: var(--fg); }
.rv-empty__body  { font-size: 12.5px; color: var(--fg-muted); margin: 0 auto 16px; max-width: 360px; line-height: 1.55; }

/* ---------- SLA BADGE (.rv-sla) ---------- */
.rv-sla {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 12px;
  border: 1px solid; border-radius: var(--radius-md);
  font-family: var(--font-sans);
}
.rv-sla__ring { width: 32px; height: 32px; flex-shrink: 0; }
.rv-sla__ring-track { fill: none; stroke-width: 4; }
.rv-sla__ring-fill  { fill: none; stroke-width: 4; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; }
.rv-sla__meta { display: flex; flex-direction: column; line-height: 1.1; }
.rv-sla__label { font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.rv-sla__time  { font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--fg); margin-top: 2px; }
.rv-sla--safe   { background: var(--sla-safe-bg);   border-color: rgba(34,197,94,0.30); }
.rv-sla--safe   .rv-sla__ring-track { stroke: rgba(34,197,94,0.20); }
.rv-sla--safe   .rv-sla__ring-fill  { stroke: var(--sla-safe); }
.rv-sla--safe   .rv-sla__label      { color: var(--sla-safe-fg); }
.rv-sla--warn   { background: var(--sla-warn-bg);   border-color: rgba(245,158,11,0.35); }
.rv-sla--warn   .rv-sla__ring-track { stroke: rgba(245,158,11,0.20); }
.rv-sla--warn   .rv-sla__ring-fill  { stroke: var(--sla-warn); }
.rv-sla--warn   .rv-sla__label      { color: var(--sla-warn-fg); }
.rv-sla--breach { background: var(--sla-breach-bg); border-color: rgba(239,68,68,0.35); }
.rv-sla--breach .rv-sla__ring-track { stroke: rgba(239,68,68,0.20); }
.rv-sla--breach .rv-sla__ring-fill  { stroke: var(--sla-breach); }
.rv-sla--breach .rv-sla__label      { color: var(--sla-breach-fg); }
@keyframes rvPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.0); } 50% { box-shadow: 0 0 0 4px rgba(239,68,68,0.18); } }
.rv-sla--pulse { animation: rvPulse 1.8s ease-in-out infinite; }
.rv-sla--compact { padding: 0; background: transparent; border: none; gap: 6px; }
.rv-sla--compact .rv-sla__ring { width: 24px; height: 24px; }
.rv-sla--compact .rv-sla__label { display: none; }

/* ---------- OWNER CHIP (.rv-owner) ---------- */
.rv-owner {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 10px;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none; color: inherit;
  transition: background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}
a.rv-owner:hover { background: var(--bg-raised); border-color: var(--border-strong); }
.rv-owner__avatar {
  width: 24px; height: 24px; border-radius: var(--radius-pill);
  background: var(--brand); color: var(--brand-ink);
  display: grid; place-items: center;
  font-size: 10px; font-weight: 700;
  flex-shrink: 0;
}
.rv-owner--muted .rv-owner__avatar { background: var(--bg-raised); color: var(--fg-muted); }
.rv-owner__meta { display: flex; flex-direction: column; line-height: 1.15; }
.rv-owner__name { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--fg); }
.rv-owner--muted .rv-owner__name { color: var(--fg-subtle); }
.rv-owner__crown { width: 6px; height: 6px; border-radius: 999px; background: var(--brand); }
.rv-owner__role { font-size: 11px; color: var(--fg-muted); }

/* ---------- NEXT ACTION (.rv-next) ---------- */
.rv-next {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-sm);
}
.rv-next--urgent { border-left-color: var(--sla-breach); background: var(--sla-breach-bg); }
.rv-next--soft   { border-left-color: var(--fg-muted); }
.rv-next__icon {
  width: 26px; height: 26px; border-radius: var(--radius-sm);
  background: var(--bg-raised); color: var(--brand);
  display: grid; place-items: center; flex-shrink: 0;
  font-size: 13px;
}
.rv-next--urgent .rv-next__icon { background: rgba(239,68,68,0.15); color: var(--sla-breach-fg); }
.rv-next__meta { flex: 1; min-width: 0; }
.rv-next__verb { font-size: 13px; font-weight: 600; color: var(--fg); line-height: 1.25; }
.rv-next__hint { font-size: 11px; color: var(--fg-muted); margin-top: 1px; line-height: 1.35; }
.rv-next__cta { flex-shrink: 0; }
.rv-next--compact { padding: 8px 10px; gap: 8px; }
.rv-next--compact .rv-next__icon { display: none; }
.rv-next--compact .rv-next__verb { font-size: 12px; }
.rv-next--compact .rv-next__hint { display: none; }

/* SLA ring only (no duplicate time text) — applications queue */
.rv-sla--ring-only .rv-sla__meta { display: none; }

/* ---------- APPLICATION QUEUE ROW ---------- */
.rv-queue-row {
  position: relative;
  transition: background var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}
.rv-queue-row > td {
  transition: background-color var(--dur-1) var(--ease);
}
.rv-queue-row--breach {
  background: rgba(239, 68, 68, 0.125);
  box-shadow: inset 4px 0 0 0 var(--sla-breach);
}
.rv-queue-row--risk {
  background: rgba(245, 158, 11, 0.06);
  box-shadow: inset 3px 0 0 0 var(--sla-warn);
}
.rv-queue-row--breach:hover {
  background: rgba(239, 68, 68, 0.155);
  box-shadow: inset 4px 0 0 0 var(--sla-breach), var(--shadow-1);
}
.rv-queue-row--risk:hover {
  background: rgba(245, 158, 11, 0.095);
  box-shadow: inset 3px 0 0 0 var(--sla-warn), var(--shadow-1);
}
.rv-queue-row--normal:hover {
  background: transparent;
  box-shadow: var(--shadow-1);
}
.rv-queue-row--normal:hover > td {
  background-color: var(--bg-raised);
}

/* Pull action column closer to candidate / next copy (applications table only) */
tr.rv-queue-row > td:first-child {
  padding-right: 14px;
}
tr.rv-queue-row > td:last-child {
  padding-left: 14px;
}

/* Breach: slightly stronger cue on SLA ring slot (same hue family) */
.rv-queue-row--breach .rv-app-queue__sla-slot .rv-sla {
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.32);
  border-radius: var(--radius-sm);
}
.rv-queue-row--breach .rv-app-queue__sla-slot .rv-sla__ring {
  filter: brightness(1.1);
}

.rv-app-queue__identity-email {
  opacity: 0.68;
}

/* SLA + next action read as one horizontal unit */
.rv-app-queue__sla-next-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  margin-top: 14px;
}
.rv-app-queue__sla-slot {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  padding-top: 2px;
  min-width: 30px;
}
/* Applications queue: ring is the left-side scan anchor */
.rv-app-queue__sla-slot .rv-sla {
  transform: scale(1.08);
  transform-origin: 50% 0;
}
.rv-app-queue__sla-slot .rv-sla__ring-track,
.rv-app-queue__sla-slot .rv-sla__ring-fill {
  stroke-width: 5;
}
.rv-app-queue__action-copy {
  flex: 1;
  min-width: 0;
}

.rv-app-queue__next-label {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  margin: 0 0 10px 0;
  line-height: 1.2;
}

.rv-app-queue__verb {
  font-size: 15px;
  font-weight: 700;
  color: var(--fg);
  line-height: 1.25;
  margin: 0;
  letter-spacing: -0.01em;
}

.rv-app-queue__hint {
  font-size: 10px;
  font-weight: 400;
  color: var(--fg-muted);
  line-height: 1.35;
  margin: 1px 0 0 0;
  opacity: 0.88;
}

/* Nudge Actions CTAs down to sit with the action copy (same column align-top) */
.rv-app-queue__cta-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.rv-app-queue__cta-wrap--with-next {
  padding-top: 3.15rem;
}

.rv-actions-inline {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

/* ---------- APPLICATION CREATE (left dock panel) ---------- */
@media (min-width: 1280px) {
  .rv-app-create-layout > .rv-app-create-panel {
    border-right: 1px solid var(--border-strong);
    padding-right: var(--space-6);
    margin-right: var(--space-2);
  }
  .rv-app-create-layout__main {
    padding-left: var(--space-5);
  }
}

.rv-app-create-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2);
  padding: var(--space-5);
  /* Do not clip Tom Select if dropdown is ever positioned inside this subtree */
  overflow: visible;
}

.rv-app-create-panel__title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 0;
  color: var(--fg);
}
.rv-app-create-panel__lede {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  margin: 8px 0 0 0;
  color: var(--fg-subtle);
  max-width: 36ch;
}
.rv-app-create-panel__body {
  margin-top: var(--space-6);
}

.rv-app-create-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.rv-app-create-form__field {
  margin-bottom: var(--space-5);
}
.rv-app-create-form__field:last-of-type {
  margin-bottom: var(--space-5);
}
.rv-app-create-panel .rv-field__label {
  color: var(--fg-subtle);
  font-weight: 500;
  letter-spacing: 0.07em;
  margin-bottom: 2px;
}

/* Native selects: combobox fields before Tom Select init; Source Type always */
.rv-app-create-panel select.js-app-create-combobox,
.rv-app-create-panel select[name="source_type"] {
  display: block;
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--fg);
  background-color: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    inset 0 -1px 0 rgba(0, 0, 0, 0.28),
    0 1px 2px rgba(0, 0, 0, 0.2);
  transition:
    border-color var(--dur-1) var(--ease),
    box-shadow var(--dur-1) var(--ease),
    background-color var(--dur-1) var(--ease);
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--fg-muted) 50%),
    linear-gradient(135deg, var(--fg-muted) 50%, transparent 50%);
  background-position: right 14px center, right 9px center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
}
.rv-app-create-panel select.js-app-create-combobox:hover,
.rv-app-create-panel select[name="source_type"]:hover {
  border-color: var(--border-focus);
  background-color: var(--bg-inset);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    inset 0 -1px 0 rgba(0, 0, 0, 0.22),
    0 0 0 1px rgba(245, 158, 11, 0.18),
    0 1px 2px rgba(0, 0, 0, 0.22);
}
.rv-app-create-panel select.js-app-create-combobox:focus,
.rv-app-create-panel select[name="source_type"]:focus {
  outline: none;
  border-color: var(--border-focus);
  background-color: var(--bg-inset);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2),
    0 0 0 2px rgba(245, 158, 11, 0.35),
    0 0 12px rgba(245, 158, 11, 0.12);
}
.rv-app-create-panel select.js-app-create-combobox:disabled,
.rv-app-create-panel select[name="source_type"]:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/*
 * Tom Select — application create comboboxes.
 * tom-select.css uses .ts-wrapper.single.input-active .ts-control { background: #fff } etc.;
 * these selectors intentionally beat the library + base.html .ts-wrapper rules.
 */
.rv-app-create-panel .rv-app-create-ts.ts-wrapper {
  width: 100%;
  border: none;
  background: transparent;
  box-shadow: none;
  padding: 0;
  margin: 0;
}

/* Closed control — match panel native <select> (same metrics as source_type) */
.rv-app-create-panel .rv-app-create-ts.ts-wrapper .ts-control,
.rv-app-create-panel .rv-app-create-ts.ts-wrapper.single .ts-control,
.rv-app-create-panel .rv-app-create-ts.ts-wrapper.full .ts-control,
.rv-app-create-panel .rv-app-create-ts.ts-wrapper.single.input-active .ts-control {
  min-height: 40px;
  padding: 0 12px;
  padding-right: max(32px, var(--ts-pr-min, 0.75rem)) !important;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--fg) !important;
  background-color: var(--bg-raised) !important;
  background-image: none !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: var(--radius-sm);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    inset 0 -1px 0 rgba(0, 0, 0, 0.28),
    0 1px 2px rgba(0, 0, 0, 0.2);
  transition:
    border-color var(--dur-1) var(--ease),
    box-shadow var(--dur-1) var(--ease),
    background-color var(--dur-1) var(--ease);
  cursor: pointer;
}

.rv-app-create-panel .rv-app-create-ts.ts-wrapper .ts-control > input {
  color: var(--fg) !important;
  background: transparent !important;
}

.rv-app-create-panel .rv-app-create-ts.ts-wrapper .ts-control .item {
  background: transparent !important;
  color: var(--fg) !important;
  font-weight: 600;
  border: none !important;
  box-shadow: none !important;
}

.rv-app-create-panel .rv-app-create-ts.ts-wrapper .ts-control .items.placeholder {
  color: var(--fg-muted) !important;
  font-weight: 400;
}

/* Hover / focus / open — same as panel native selects */
.rv-app-create-panel .rv-app-create-ts.ts-wrapper:hover .ts-control {
  border-color: var(--border-focus) !important;
  background-color: var(--bg-inset) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    inset 0 -1px 0 rgba(0, 0, 0, 0.22),
    0 0 0 1px rgba(245, 158, 11, 0.18),
    0 1px 2px rgba(0, 0, 0, 0.22);
}

.rv-app-create-panel .rv-app-create-ts.ts-wrapper.focus .ts-control,
.rv-app-create-panel .rv-app-create-ts.ts-wrapper.dropdown-active .ts-control,
.rv-app-create-panel .rv-app-create-ts.plugin-dropdown_input.focus.dropdown-active .ts-control {
  outline: none !important;
  border-color: var(--border-focus) !important;
  background-color: var(--bg-inset) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2),
    0 0 0 2px rgba(245, 158, 11, 0.35),
    0 0 12px rgba(245, 158, 11, 0.12) !important;
}

.rv-app-create-panel .rv-app-create-ts.ts-wrapper.disabled .ts-control {
  opacity: 0.55;
  cursor: not-allowed !important;
  background-color: var(--bg-raised) !important;
}

/* Dropdown (portaled to body): match panel surface + input borders */
.rv-app-create-ts-dropdown.ts-dropdown {
  /* Above main scroll area / panel / table; toast uses z-[100] */
  z-index: 95;
  margin-top: 4px;
  color: var(--fg) !important;
  border: 1px solid var(--border-strong) !important;
  border-top: 1px solid var(--border-strong) !important;
  border-radius: var(--radius-sm);
  background: var(--bg-surface) !important;
  box-shadow: var(--shadow-2) !important;
  overflow: hidden;
  pointer-events: auto;
}

.rv-app-create-ts-dropdown.ts-dropdown .ts-dropdown-content {
  max-height: 240px;
  overflow-y: auto;
  background: var(--bg-surface);
}

.rv-app-create-ts-dropdown.plugin-dropdown_input .dropdown-input,
.rv-app-create-ts-dropdown .dropdown-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.35;
  color: var(--fg) !important;
  background: var(--bg-inset) !important;
  border: none !important;
  border-bottom: 1px solid var(--border) !important;
  border-radius: 0;
  box-shadow: none !important;
}

.rv-app-create-ts-dropdown .dropdown-input::placeholder {
  color: var(--fg-muted);
}

.rv-app-create-ts-dropdown .dropdown-input:focus {
  outline: none !important;
  background: var(--bg-raised) !important;
}

.rv-app-create-ts-dropdown .option,
.rv-app-create-ts-dropdown .no-results,
.rv-app-create-ts-dropdown .create {
  padding: 9px 12px;
  cursor: pointer;
  color: var(--fg) !important;
  background: transparent !important;
}

.rv-app-create-ts-dropdown .option:hover,
.rv-app-create-ts-dropdown .option.active,
.rv-app-create-ts-dropdown [data-selectable].option.active {
  background-color: var(--bg-raised) !important;
  color: var(--fg) !important;
}

.rv-app-create-ts-dropdown [data-selectable] .highlight,
.rv-app-create-ts-dropdown .option .highlight {
  background: transparent !important;
  color: var(--brand-2);
  font-weight: 700;
}

.rv-app-create-ts-dropdown .optgroup-header {
  color: var(--fg-muted) !important;
  background: var(--bg-inset) !important;
  border-color: var(--border) !important;
}

.rv-app-create-ts__empty {
  padding: 12px;
  font-size: 13px;
  color: var(--fg-muted);
  text-align: center;
}

.rv-app-create-form__errors {
  font-size: 13px;
  color: var(--sla-breach-fg);
  margin-bottom: var(--space-4);
  padding: var(--space-3);
  background: var(--sla-breach-bg);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: var(--radius-sm);
}

.rv-app-create-form__actions {
  margin-top: var(--space-5);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border);
}
.rv-app-create-form__actions .rv-btn--primary {
  min-height: 40px;
  font-size: 14px;
  font-weight: 700;
}

.rv-dropdown { position: relative; }
.rv-dropdown > summary {
  list-style: none;
  cursor: pointer;
}
.rv-dropdown > summary::-webkit-details-marker { display: none; }
.rv-dropdown__panel {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30;
  min-width: 200px; padding: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-2);
  display: flex; flex-direction: column; gap: 6px;
}
.rv-dropdown__panel .rv-btn { width: 100%; justify-content: center; }

/* ---------- TABLE (.rv-table) ---------- */
.rv-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rv-table th {
  text-align: left; font-size: 10px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--fg-muted); padding: 10px 14px; background: var(--bg-inset); border-bottom: 1px solid var(--border);
}
.rv-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); color: var(--fg); }
.rv-table tr:hover td { background: var(--bg-raised); }
.rv-table tr:last-child td { border-bottom: none; }

/* ---------- PIPELINE BOARD (.rv-pipeline) ---------- */
.rv-pipeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px; padding: 20px;
}
.rv-pipeline__col {
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex; flex-direction: column;
  min-height: 400px;
}
.rv-pipeline__col-hd {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.rv-pipeline__count {
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  color: var(--fg-muted);
  background: var(--bg-raised);
  padding: 2px 8px; border-radius: var(--radius-pill);
}
.rv-pipeline__cards {
  padding: 12px;
  display: flex; flex-direction: column; gap: 10px;
  flex: 1;
}

/* ─── Modal ─────────────────────────────────────────────────────────────── */
.rv-modal {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(2px);
}
.rv-modal__panel {
  width: 100%; max-width: 480px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 12px);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.32);
  max-height: 90vh; overflow-y: auto;
  display: flex; flex-direction: column;
}
.rv-modal__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.rv-modal__title {
  font-size: 15px; font-weight: 700; color: var(--fg);
}
.rv-modal__close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  border-radius: var(--radius-sm); border: none;
  background: transparent; color: var(--fg-muted);
  cursor: pointer;
  transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.rv-modal__close:hover { background: var(--bg-inset); color: var(--fg); }
.rv-modal__body {
  padding: 20px;
  display: flex; flex-direction: column; gap: 16px;
  flex: 1;
}
.rv-modal__footer {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.rv-modal__errors {
  font-size: 12px; color: var(--sla-breach-fg);
  padding: 8px 12px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.24);
  border-radius: var(--radius-sm);
}

/* ─── File input ─────────────────────────────────────────────────────────── */
.rv-file {
  width: 100%; font-size: 13px; color: var(--fg-muted); cursor: pointer;
  display: block;
}
.rv-file::file-selector-button {
  margin-right: 10px;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-inset);
  color: var(--fg);
  font-size: 12px; font-weight: 600;
  cursor: pointer;
  transition: background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}
.rv-file::file-selector-button:hover {
  background: var(--bg-raised);
  border-color: var(--border-strong);
}

/* Tom Select: dropdown uses dropdownParent: 'body' — stack above .rv-modal (50) and toasts (z-[100]) */
.ts-dropdown {
  z-index: 10050 !important;
}

/* Workflow settings — allowed next stages (Tom Select multi, dark shell) */
.rv-ts-allowed-next.ts-wrapper .ts-control {
  min-height: 40px;
  padding: 6px 10px;
  font-size: 13px;
  color: var(--fg) !important;
  background-color: var(--bg-inset) !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: var(--radius-sm);
}
.rv-ts-allowed-next.ts-wrapper .ts-control > input {
  color: var(--fg) !important;
}
.rv-ts-allowed-next.ts-wrapper .ts-control .item {
  background: var(--bg-raised) !important;
  color: var(--fg) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm);
}
.rv-ts-allowed-next.ts-wrapper .ts-control .items.placeholder {
  color: var(--fg-muted) !important;
}
.rv-ts-allowed-next.ts-wrapper.focus .ts-control,
.rv-ts-allowed-next.ts-wrapper.dropdown-active .ts-control {
  border-color: var(--border-focus) !important;
}

/* ── Application Timeline (.rv-tl-*) ──────────────────────────────────────── */
.rv-timeline { display: flex; flex-direction: column; }

.rv-tl-entry {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.rv-tl-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 3px;
  border: 2px solid;
}
.rv-tl-dot--submitted { background: var(--bg-surface);   border-color: var(--border-strong); }
.rv-tl-dot--progress  { background: var(--brand);        border-color: var(--brand); }
.rv-tl-dot--accepted  { background: var(--sla-safe);     border-color: var(--sla-safe); }
.rv-tl-dot--rejected  { background: var(--sla-breach);   border-color: var(--sla-breach); }
.rv-tl-dot--declined  { background: var(--fg-subtle);    border-color: var(--fg-subtle); }

.rv-tl-entry--active .rv-tl-dot { box-shadow: 0 0 0 3px rgba(245,158,11,.15); }

.rv-tl-body  { flex: 1; min-width: 0; }
.rv-tl-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rv-tl-meta  { display: flex; align-items: center; gap: 6px; margin-top: 3px; flex-wrap: wrap; }

/* Connector: vertical line + duration label between entries.
   Left margin (4px) = dot-center(5px) - border(1px) to visually
   continue the line from the dot above. */
.rv-tl-connector {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  margin-left: 4px;
  border-left: 1px solid var(--border);
  padding-left: 16px;   /* gap between line and duration text */
  min-height: 20px;
}

/* ── Candidate/Timeline Drawer (.rv-drawer) ────────────────────────────────── */
.rv-drawer { position: fixed; inset: 0; z-index: 9900; display: flex; justify-content: flex-end; }
.rv-drawer__backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(2px);
}
.rv-drawer__panel {
  position: relative; z-index: 1;
  width: 400px; max-width: 100vw;
  background: var(--bg-surface);
  border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
  box-shadow: -8px 0 32px rgba(0,0,0,.25);
  animation: rv-drawer-in .18s ease;
}
@keyframes rv-drawer-in {
  from { transform: translateX(40px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
.rv-drawer__header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.rv-drawer__body { flex: 1; overflow-y: auto; }
