/* QuillHire Studio — typography redesign (Instrument Sans + JetBrains Mono). */

:root {
  --qh-ink: #0d1512;
  --qh-ink-soft: #42544d;
  --qh-muted: #8b9a94;
  --qh-muted-2: #7d8d87;
  --qh-muted-3: #6b7d76;
  --qh-teal: #0f9d7a;
  --qh-teal-deep: #0f766e;
  --qh-teal-bright: #3ddc9a;
  --qh-teal-soft: #eef7f4;
  --qh-sand: #f7f9f8;
  --qh-paper: #ffffff;
  --qh-paper-soft: #fbfcfb;
  --qh-line: #e6ebe8;
  --qh-line-strong: #d6e0db;
  --qh-danger: #dc4c4c;
  --qh-warn: #e0a83b;
  --qh-ok: #0f9d7a;
  --qh-blue: #2563eb;
  --qh-radius: 16px;
  --qh-radius-sm: 10px;
  --qh-shadow: 0 12px 36px rgba(13, 21, 18, 0.06);
  --qh-shadow-sm: 0 4px 16px rgba(13, 21, 18, 0.04);
  --font-sans: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* Bridge old gentelella vars used by forms/tables/buttons */
  --primary: var(--qh-teal);
  --primary-dk: var(--qh-teal-deep);
  --primary-lt: rgba(15, 157, 122, 0.12);
  --body-bg: var(--qh-sand);
  --bg-surface: var(--qh-paper);
  --bg-surface-secondary: #f1f5f3;
  --border-color: var(--qh-line);
  --border-color-light: #eef2f0;
  --text: var(--qh-ink);
  --text-secondary: var(--qh-ink-soft);
  --text-muted: var(--qh-muted);
  --green: var(--qh-ok);
  --red: var(--qh-danger);
  --yellow: var(--qh-warn);
  --blue: var(--qh-blue);
  --radius: 10px;
  --radius-lg: var(--qh-radius);
  --shadow: var(--qh-shadow-sm);
}

[data-theme="dark"] {
  --qh-ink: #eef7f4;
  --qh-ink-soft: #b7cdc7;
  --qh-muted: #87a09a;
  --qh-muted-2: #9aa8a3;
  --qh-muted-3: #7d8d87;
  --qh-teal: #3ddc9a;
  --qh-teal-deep: #5eead4;
  --qh-teal-bright: #3ddc9a;
  --qh-teal-soft: rgba(61, 220, 154, 0.14);
  --qh-sand: #0c1618;
  --qh-paper: #142225;
  --qh-paper-soft: #1a2b2f;
  --qh-line: rgba(255, 255, 255, 0.1);
  --qh-line-strong: rgba(255, 255, 255, 0.14);
  --qh-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --qh-shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.28);
  --body-bg: var(--qh-sand);
  --bg-surface: var(--qh-paper);
  --bg-surface-secondary: #1a2b2f;
  --border-color: var(--qh-line);
  --border-color-light: rgba(255, 255, 255, 0.06);
  --text: var(--qh-ink);
  --text-secondary: var(--qh-ink-soft);
  --text-muted: var(--qh-muted);
  --primary: var(--qh-teal);
  --primary-dk: var(--qh-teal-deep);
  --primary-lt: rgba(61, 220, 154, 0.14);
}

/* —— Kill Gentelella admin chrome when studio shell is on —— */
body[data-shell="studio"] {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--qh-ink);
  background: var(--qh-sand);
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01" 1;
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--qh-muted-2);
  line-height: 1.4;
}

body[data-shell="studio"] .sidebar,
body[data-shell="studio"] .topbar,
body[data-shell="studio"] .sidebar-backdrop,
body[data-shell="studio"] .main,
body[data-shell="studio"] .page-wrapper {
  all: unset;
}

body[data-shell="studio"] .sidebar,
body[data-shell="studio"] .topbar,
body[data-shell="studio"] .sidebar-backdrop {
  display: none !important;
}

.studio-mesh {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 0% -8%, rgba(15, 157, 122, 0.14), transparent 55%),
    linear-gradient(180deg, #f7f9f8 0%, #eef1ef 100%);
}

[data-theme="dark"] .studio-mesh {
  background:
    radial-gradient(ellipse 80% 55% at 0% -10%, rgba(61, 220, 154, 0.14), transparent 55%),
    linear-gradient(180deg, #0c1618 0%, #101c1f 100%);
}

/* —— App shell: left sidebar + topbar —— */
.studio-shell {
  display: flex;
  align-items: flex-start;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.studio-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
  color: var(--qh-ink);
}

.studio-brand:hover,
.studio-brand:focus,
.studio-brand:active {
  text-decoration: none !important;
}

.studio-brand img {
  display: block;
  width: 30px;
  height: 30px;
  object-fit: contain;
  background: transparent;
  flex-shrink: 0;
}

.studio-wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.03em;
  font-size: 19px;
  color: var(--qh-ink);
  white-space: nowrap;
}

.studio-wordmark span {
  color: var(--qh-teal);
}

.studio-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--qh-line);
  background: transparent;
  color: var(--qh-ink-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.studio-icon-btn:hover {
  background: var(--bg-surface-secondary);
  color: var(--qh-ink);
}

.theme-toggle .theme-icon-light { display: none; }
.theme-toggle .theme-icon-dark { display: block; }
[data-theme="dark"] .theme-toggle .theme-icon-light { display: block; }
[data-theme="dark"] .theme-toggle .theme-icon-dark { display: none; }

.studio-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--qh-teal-deep);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}

/* —— Sidebar —— */
.studio-sidebar {
  width: 264px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 22px 16px 18px;
  border-right: 1px solid var(--qh-line);
  background: var(--qh-paper);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  transition: width 0.18s ease, padding 0.18s ease;
}

[data-theme="dark"] .studio-sidebar {
  background: rgba(12, 22, 24, 0.92);
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 8px 26px;
  margin-bottom: 0;
}

.sidebar-collapse-btn {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid var(--qh-line);
  background: transparent;
  color: var(--qh-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.sidebar-collapse-btn:hover {
  background: var(--bg-surface-secondary);
  color: var(--qh-ink);
}

.sidebar-section-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--qh-muted);
  padding: 0 10px 10px;
  margin-bottom: 0;
  white-space: nowrap;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  /* gentelella.css (loaded before this file) sets .sidebar-nav to
     flex:1 + overflow-y:auto for its own (unused-here) sidebar design —
     this file only ever overrode display/flex-direction/gap, so those two
     properties leaked through: nav ended up competing with .sidebar-spacer
     for flex-grow space and clipping its own links behind a separate inner
     scrollbar instead of just taking its natural content height. Explicitly
     reset both here rather than relying on override-by-omission. */
  flex: none;
  overflow-y: visible;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 9px;
  color: var(--qh-ink-soft);
  font-weight: 500;
  font-size: 14.5px;
  letter-spacing: -0.012em;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.sidebar-link:hover,
.sidebar-link:focus,
.sidebar-link:active,
.sidebar-link:visited {
  text-decoration: none !important;
}

.sidebar-link:hover {
  background: var(--bg-surface-secondary);
  color: var(--qh-ink);
}

.sidebar-link.is-active {
  background: var(--qh-ink);
  color: #fff;
  font-weight: 600;
}

.sidebar-link.is-active svg {
  color: var(--qh-teal-bright);
}

[data-theme="dark"] .sidebar-link.is-active {
  background: var(--qh-teal);
  color: #0c1618;
}

/* flex-basis:auto (not the flex:1 shorthand's 0%) so this spacer's shrink
   weight is actually nonzero when the sidebar's content overflows — with
   flex:1's implicit flex-basis:0, the browser can't shrink this to reclaim
   space and shrinks the nav links instead, pushing them off-screen while
   this empty spacer still sits at full size. See nav item count growing
   (Billing, then Phone numbers) for when this first became visible. */
.sidebar-spacer { flex: 1 1 auto; min-height: 0; }

.sidebar-minutes-card {
  border: 1px solid var(--qh-line);
  border-radius: 14px;
  background: var(--qh-paper-soft);
  padding: 16px;
  margin: 0 0 14px;
}

.sidebar-minutes-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--qh-muted);
  margin-bottom: 8px;
}

.sidebar-minutes-value {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 30px;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--qh-ink);
  margin-bottom: 12px;
  font-variant-numeric: tabular-nums;
}

.sidebar-minutes-value span {
  font-weight: 500;
  color: var(--qh-muted);
  font-size: 15px;
  letter-spacing: -0.02em;
}

.sidebar-minutes-track {
  height: 5px;
  border-radius: 999px;
  background: var(--qh-line);
  overflow: hidden;
  margin-bottom: 11px;
}

.sidebar-minutes-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--qh-teal);
}

.sidebar-minutes-plan {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--qh-muted-3);
}

.sidebar-footer {
  border-top: 1px solid var(--qh-line);
  padding-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sidebar-user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border-radius: 10px;
  text-decoration: none !important;
  color: inherit;
  min-width: 0;
  flex: 1;
  transition: opacity 0.15s ease;
}

.sidebar-user-chip:hover,
.sidebar-user-chip:focus {
  background: transparent;
  opacity: 0.85;
  text-decoration: none !important;
  color: inherit;
}

.sidebar-user-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--qh-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-email {
  font-size: 12px;
  font-weight: 400;
  color: var(--qh-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-logout {
  flex-shrink: 0;
  color: var(--qh-muted-3);
  text-decoration: none !important;
  font-size: 12.5px;
  font-weight: 600;
  padding: 4px 6px;
}

.sidebar-logout:hover {
  color: var(--qh-ink);
  text-decoration: none !important;
}

/* Collapsed state — icon rail only. Toggled on <body> (see app.js) so it
   persists via localStorage the same way the drawer-open pattern below
   doesn't need to (that one's inherently transient/mobile-only). */
body.sidebar-collapsed .studio-sidebar { width: 76px; padding: 18px 10px; }
body.sidebar-collapsed .studio-wordmark,
body.sidebar-collapsed .sidebar-section-label,
body.sidebar-collapsed .sidebar-link span,
body.sidebar-collapsed .sidebar-minutes-card,
body.sidebar-collapsed .sidebar-user-meta,
body.sidebar-collapsed .sidebar-logout {
  display: none;
}
body.sidebar-collapsed .sidebar-head { justify-content: center; }
body.sidebar-collapsed .sidebar-collapse-btn svg { transform: rotate(180deg); }
body.sidebar-collapsed .sidebar-link { justify-content: center; padding: 9px; }
body.sidebar-collapsed .sidebar-footer { justify-content: center; }
body.sidebar-collapsed .sidebar-user-chip { flex: 0; }

.studio-sidebar-backdrop { display: none; }

@media (max-width: 900px) {
  .studio-sidebar { display: none; }
  .studio-menu-toggle { display: inline-flex !important; }

  .studio-sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(10, 30, 28, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 50;
  }

  body.drawer-open .studio-sidebar {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 60;
    box-shadow: var(--qh-shadow);
  }

  body.drawer-open .studio-sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
}

/* —— Topbar —— */
.studio-shell-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.studio-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 32px;
  background: var(--qh-paper);
  border-bottom: 1px solid var(--qh-line);
}

[data-theme="dark"] .studio-topbar {
  background: rgba(12, 22, 24, 0.92);
}

.topbar-breadcrumb {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: var(--qh-ink);
}

.topbar-breadcrumb .crumb-parent {
  color: var(--qh-muted);
  font-weight: 500;
  text-decoration: none !important;
}

.topbar-breadcrumb .crumb-parent:hover {
  color: var(--qh-ink);
  text-decoration: none !important;
}

.topbar-breadcrumb .crumb-sep {
  color: #c9d4cf;
  margin: 0 9px;
  font-weight: 500;
}

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

.topbar-search {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 340px;
  min-width: 220px;
  padding: 0 12px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--qh-line);
  background: var(--qh-paper-soft);
  color: var(--qh-muted);
}

.topbar-search svg { width: 15px; height: 15px; flex-shrink: 0; }

.topbar-search input {
  flex: 1;
  width: 100%;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  color: var(--qh-ink);
}

.topbar-search input::placeholder { color: var(--qh-muted); }

.topbar-search-kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--qh-muted);
  border: 1px solid var(--qh-line);
  border-radius: 5px;
  padding: 2px 6px;
  background: var(--qh-paper);
  flex-shrink: 0;
}

.studio-menu-toggle { display: none; }

@media (max-width: 640px) {
  .topbar-search { display: none; }
}

/* —— Page canvas —— */
.studio-main {
  position: relative;
  z-index: 1;
  flex: 1;
}

.studio-page {
  max-width: 1600px;
  margin: 0 auto;
  padding: 26px 32px 64px;
}

.page-header {
  margin-bottom: 22px;
}

.page-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.page-pretitle {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--qh-teal-deep);
  margin-bottom: 8px;
}

.page-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.4vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: var(--qh-ink);
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 22px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: -0.012em;
  text-decoration: none !important;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

/* A disabled button (e.g. app.js's double-submit guard right after a
   click, or the "no jobs yet" case in candidate_form.html) previously
   looked completely unchanged, which made it easy to genuinely miss that a
   second click did nothing. */
button.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn[hidden] {
  display: none !important;
}

a.btn,
a.btn:hover,
a.btn:focus,
a.btn:active,
a.btn:visited,
button.btn,
button.btn:hover,
button.btn:focus,
button.btn:active {
  text-decoration: none !important;
}

.btn svg { width: 16px; height: 16px; }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--qh-teal-deep);
  color: #fff !important;
  border-color: var(--qh-teal-deep);
  box-shadow: none;
}

.btn-primary:hover {
  background: #0b5c56;
  color: #fff !important;
  border-color: #0b5c56;
  box-shadow: none;
}

.btn-success {
  background: rgba(15, 157, 122, 0.14);
  color: #0f5c55 !important;
  border-color: rgba(15, 157, 122, 0.28);
  box-shadow: none;
}

.btn-success:hover {
  background: rgba(15, 157, 122, 0.22);
  color: #0b5c56 !important;
  border-color: rgba(15, 157, 122, 0.4);
  box-shadow: none;
}

.btn-outline {
  background: var(--qh-paper);
  border-color: var(--qh-line-strong);
  color: var(--qh-ink);
}

.btn-outline:hover {
  background: var(--qh-paper);
  color: var(--qh-ink);
  border-color: var(--qh-teal-deep);
}

.btn-danger {
  background: #fff;
  color: var(--qh-danger);
  border-color: #f0d5d5;
}

.btn-sm {
  min-height: 34px;
  padding: 0 14px;
  font-size: 13.5px;
  border-radius: 9px;
}

/* —— Cards / surfaces —— */
.card {
  background: var(--qh-paper);
  border: 1px solid var(--qh-line);
  border-radius: var(--qh-radius);
  box-shadow: none;
  overflow: hidden;
}

[data-theme="dark"] .card {
  background: rgba(20, 34, 37, 0.86);
}

.card-body,
.card-header,
.card-footer {
  padding: 18px 20px;
  border-color: var(--border-color-light);
}

.card-title,
.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--qh-ink);
}

.row {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

.row.col-4 { grid-template-columns: repeat(4, 1fr); }
.row.col-2 { grid-template-columns: repeat(2, 1fr); }
.row.col-1 { grid-template-columns: 1fr; }
.row.col-4-8 { grid-template-columns: 1fr 2fr; }
.row.col-5-7 { grid-template-columns: 5fr 7fr; }

@media (max-width: 980px) {
  .row.col-4 { grid-template-columns: 1fr 1fr; }
  .row.col-4-8,
  .row.col-5-7,
  .row.col-2 { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .row.col-4 { grid-template-columns: 1fr; }
}

/* —— Dashboard bento —— */
.hero-panel {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 24px 28px;
  background: linear-gradient(90deg, #e7f4ef 0%, #f4faf7 60%, #fbfcfb 100%);
  border: 1px solid #dbe9e3;
  box-shadow: none;
  margin-bottom: 20px;
}

[data-theme="dark"] .hero-panel {
  background:
    linear-gradient(135deg, rgba(61, 220, 154, 0.16), rgba(20, 34, 37, 0.9) 50%, rgba(37, 99, 235, 0.1)),
    var(--qh-paper);
}

.hero-panel::after {
  display: none;
}

/* Dashboard-only variant — a returning user doesn't need the full marketing
   hero (headline + long copy) repeated on every visit; this keeps the same
   branded background but collapses it into a single-row header bar with
   just a greeting and the two primary actions. The full .hero-panel
   (headline/copy/stacked layout) stays as-is for wherever it's still used
   as an actual intro/landing moment. */
.hero-panel--compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  padding: 24px 28px;
}

.hero-panel--compact .hero-kicker {
  margin-bottom: 7px;
}

.hero-panel--compact .hero-copy {
  max-width: none;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: var(--qh-ink);
}

.hero-panel--compact .hero-actions {
  margin-top: 0;
  flex: 0 0 auto;
}

.hero-panel--compact::after {
  display: none;
}

.hero-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--qh-teal-deep);
  margin-bottom: 10px;
}

.hero-title {
  margin: 0 0 10px;
  max-width: none;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.2vw, 2.55rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

@media (max-width: 520px) {
  .hero-title {
    white-space: normal;
  }
}

.hero-copy {
  margin: 0;
  max-width: 42ch;
  color: var(--qh-ink-soft);
  font-size: 1.02rem;
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
  position: relative;
  z-index: 1;
}

.hero-actions .btn-primary {
  background: var(--qh-teal-deep);
  color: #fff !important;
  border-color: var(--qh-teal-deep);
  box-shadow: none;
  padding: 12px 22px;
  min-height: 44px;
}

.hero-actions .btn-primary:hover {
  background: #0b5c56;
  color: #fff !important;
  border-color: #0b5c56;
  box-shadow: none;
}

.hero-actions .btn-outline {
  background: #fff;
  color: var(--qh-ink);
  border-color: var(--qh-line-strong);
  padding: 12px 22px;
  min-height: 44px;
}

.hero-actions .btn-outline:hover {
  border-color: var(--qh-teal-deep);
}

.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.stat-tile {
  grid-column: span 3;
  padding: 18px 18px 16px;
  border-radius: 14px;
  border: 1px solid var(--qh-line);
  background: var(--qh-paper);
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: border-color 0.15s ease;
}

[data-theme="dark"] .stat-tile {
  background: var(--qh-paper);
}

.stat-tile:hover {
  border-color: var(--qh-teal-deep);
}

.stat-tile-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stat-tile-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-tile-icon svg { width: 14px; height: 14px; }

.stat-tile-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--qh-muted-2);
  line-height: 1.4;
}

.stat-tile-value {
  margin: 12px 0 8px;
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--qh-ink);
}

.stat-tile-hint {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.006em;
  color: var(--qh-muted-3);
}

.panel {
  grid-column: span 8;
  border-radius: 16px;
  border: 1px solid var(--qh-line);
  background: var(--qh-paper);
  box-shadow: none;
  overflow: hidden;
}

.panel.narrow { grid-column: span 4; }

[data-theme="dark"] .panel {
  background: rgba(20, 34, 37, 0.88);
}

.panel-head {
  padding: 22px 24px 0;
}

.panel-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--qh-ink);
}

.panel-head p {
  margin: 3px 0 0;
  color: var(--qh-muted-2);
  font-size: 13.5px;
  font-weight: 400;
}

.panel-body {
  padding: 18px 24px 18px;
}

@media (max-width: 980px) {
  .stat-tile { grid-column: span 6; }
  .panel,
  .panel.narrow { grid-column: span 12; }
}

@media (max-width: 560px) {
  .stat-tile { grid-column: span 12; }
}

/* The dashboard's 5 top stat tiles get their own column count instead of
   sharing .bento's generic 12-column/span-3 grid (12 doesn't divide evenly
   by 5) — this is what actually gets all 5 onto one row on desktop, which
   the generic grid can't do no matter how narrow .stat-tile's own span is. */
.bento-stats { grid-template-columns: repeat(5, 1fr); }
.bento-stats .stat-tile { grid-column: span 1; }
.bento-stats-4 { grid-template-columns: repeat(4, 1fr); }
.bento-stats-4 .stat-tile { grid-column: span 1; }

@media (max-width: 980px) {
  .bento-stats,
  .bento-stats-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .bento-stats,
  .bento-stats-4 { grid-template-columns: 1fr; }
}

/* —— Legacy .stat inside cards (other pages) —— */
.stat {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon svg { width: 20px; height: 20px; }
.stat-icon.teal { background: var(--primary-lt); color: var(--qh-teal-deep); }
.stat-icon.blue { background: rgba(43, 123, 185, 0.12); color: var(--qh-blue); }
.stat-icon.green { background: rgba(47, 179, 68, 0.12); color: var(--qh-ok); }
.stat-icon.yellow { background: rgba(230, 162, 60, 0.14); color: #b7791f; }

.stat-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--qh-muted-2);
}

.stat-value {
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

/* —— Tables —— */
.table-responsive { overflow-x: auto; }

.table {
  width: 100%;
  border-collapse: collapse;
}

.table thead th {
  text-align: left;
  padding: 13px 24px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--qh-muted-2);
  background: var(--qh-paper-soft);
  border-bottom: 1px solid var(--qh-line);
}

.table tbody td {
  padding: 16px 24px;
  border-bottom: 1px solid #f0f4f2;
  vertical-align: middle;
  font-size: 14.5px;
}

.table tbody tr:hover td {
  background: var(--qh-paper-soft);
}

.table a {
  color: var(--qh-ink);
  font-weight: 600;
  letter-spacing: -0.022em;
  text-decoration: none;
}

.table a:hover { color: var(--qh-teal-deep); }

.cell-strong { font-weight: 600; letter-spacing: -0.015em; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 600;
  background: var(--bg-surface-secondary);
  color: var(--qh-ink-soft);
}

.status-green { background: rgba(15, 157, 122, 0.14); color: #0f5c55; }
.status-yellow { background: rgba(224, 168, 59, 0.16); color: #9a6700; }
.status-red { background: rgba(220, 76, 76, 0.12); color: #b23c3c; }
.status-blue { background: rgba(37, 99, 235, 0.12); color: #1d5f91; }

/* —— Forms —— */
.form-group { margin-bottom: 0; }

.form-label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--qh-ink-soft);
}

.form-control {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--qh-line-strong);
  background: var(--qh-paper-soft);
  color: var(--qh-ink);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  box-sizing: border-box;
}

[data-theme="dark"] .form-control {
  background: rgba(255, 255, 255, 0.04);
}

.form-control:focus {
  outline: none;
  border-color: var(--qh-teal-deep);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

/* Client-side validation state (see e.g. candidate_form.html's inline
   script) — a styled equivalent of the browser's native :invalid outline,
   used instead of it so the error message next to the field (not a
   generic browser tooltip) is what the user actually sees. */
.form-control.field-invalid {
  border-color: var(--qh-danger, #dc4c4c);
}
.form-control.field-invalid:focus {
  box-shadow: 0 0 0 3px rgba(220, 76, 76, 0.16);
}

textarea.form-control {
  min-height: auto;
  resize: vertical;
  font-weight: 400;
  line-height: 1.65;
}

.form-hint {
  display: block;
  margin-top: 6px;
  color: var(--qh-muted);
  font-size: 12.5px;
  font-weight: 400;
}

.form-hint[hidden] {
  display: none !important;
}

.form-select,
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16' fill='none' stroke='%238b9a94' stroke-width='1.5'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.input-group {
  position: relative;
}

.input-group .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--qh-muted);
}

.input-group .form-control {
  padding-left: 40px;
}

/* —— Auth (standalone pages) —— */
.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
  font-family: var(--font-sans);
  letter-spacing: -0.011em;
  background:
    radial-gradient(ellipse 70% 55% at 10% 10%, rgba(15, 157, 122, 0.16), transparent 55%),
    radial-gradient(ellipse 55% 45% at 95% 85%, rgba(15, 118, 110, 0.08), transparent 50%),
    var(--qh-sand);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 34px 32px;
  border-radius: 18px;
  background: var(--qh-paper);
  border: 1px solid var(--qh-line);
  box-shadow: var(--qh-shadow);
}

[data-theme="dark"] .auth-card {
  background: rgba(20, 34, 37, 0.92);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.auth-brand .brand-logo {
  display: block;
  width: 32px;
  height: 32px;
  object-fit: contain;
  background: transparent;
}

.auth-brand .brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.03em;
  color: var(--qh-ink);
}

.auth-brand .brand-name span {
  color: var(--qh-teal);
}

.auth-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.auth-subtitle {
  color: var(--qh-muted);
  margin-bottom: 22px;
  line-height: 1.45;
}

/* —— Pipeline / misc —— */
.pipeline-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

@media (max-width: 960px) {
  .pipeline-steps { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .pipeline-steps { grid-template-columns: 1fr; }
}

.pipeline-step {
  border: 1px solid var(--qh-line);
  background: linear-gradient(180deg, #fff, var(--bg-surface-secondary));
  border-radius: 16px;
  padding: 14px 16px;
}

.pipeline-step-num {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--qh-teal-deep);
  margin-bottom: 6px;
}

.pipeline-step-title {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
}

.pipeline-step-desc {
  margin: 0;
  font-size: 0.8rem;
  color: var(--qh-muted);
  line-height: 1.4;
}

.stack-sm > * + * { margin-top: 12px; }
.stack-md > * + * { margin-top: 16px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.w-full { width: 100%; }
.text-muted { color: var(--qh-muted); }
.text-secondary { color: var(--qh-ink-soft); }
.text-success { color: var(--qh-ok); }

.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.dl-grid {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px 12px;
  margin: 0;
}

.dl-grid dt { color: var(--qh-muted); font-size: 0.82rem; }
.dl-grid dd { margin: 0; }

.pre-box {
  white-space: pre-wrap;
  background: var(--bg-surface-secondary);
  border: 1px solid var(--qh-line);
  border-radius: 14px;
  padding: 12px;
  margin: 0;
  font-size: 0.82rem;
}

/* —— Evaluation scorecard (candidate_detail.html) —— */
.eval-score-grid {
  display: grid;
  grid-template-columns: 160px 1fr 40px;
  gap: 6px 12px;
  align-items: center;
}

.eval-score-label { font-size: 0.82rem; color: var(--qh-muted); }

.eval-score-track {
  height: 8px;
  border-radius: 999px;
  background: var(--bg-surface-secondary);
  overflow: hidden;
}

.eval-score-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--primary);
}

.eval-score-value { font-size: 0.82rem; font-weight: 700; text-align: right; }

/* Free-plan insight lock — placeholder blur only (no real data in DOM). */
.insights-locked {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border, rgba(0,0,0,0.08));
  background: var(--bg-surface-secondary, rgba(0,0,0,0.03));
  min-height: 160px;
}
.insights-locked-blur {
  padding: 16px;
  filter: blur(7px);
  user-select: none;
  pointer-events: none;
  opacity: 0.55;
}
.insights-locked-cta {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  text-align: center;
  background: linear-gradient(180deg, rgba(255,255,255,0.55), rgba(255,255,255,0.82));
}
[data-theme="dark"] .insights-locked-cta {
  background: linear-gradient(180deg, rgba(20,24,28,0.55), rgba(20,24,28,0.88));
}
.insights-locked-cta p {
  margin: 0;
  max-width: 28rem;
  color: var(--qh-muted);
  font-size: 0.9rem;
}

/* Granular free-plan blur — unlike .insights-locked above (a fixed
   placeholder teaser with no real data in the DOM), this blurs the ACTUAL
   evaluation content in place: structure (score badges, section headers,
   metric labels) stays fully visible, only the judged/scored values
   (reasoning text, score bars/numbers, flag tags) are blurred. Real values
   are present in the rendered HTML, just visually obscured — a determined
   user could still read them via view-source/devtools, unlike the fully
   server-side-withheld version above. Deliberate tradeoff, chosen so a
   Free-plan recruiter sees enough real shape of the evaluation to want to
   upgrade, not just a generic unrelated placeholder. */
.insight-blur {
  filter: blur(4px);
  user-select: none;
  pointer-events: none;
}

.insight-upgrade-note {
  margin-top: 4px;
  font-size: 0.85rem;
  color: var(--qh-muted);
}

/* —— Integrity flags panel (candidate Meet interviews) —— */
.integrity-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.integrity-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.integrity-count {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--qh-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.integrity-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.integrity-flag {
  border-radius: 10px;
  padding: 12px 14px;
  border: 1px solid transparent;
  background: var(--bg-surface-secondary, rgba(0, 0, 0, 0.03));
}
.integrity-flag.severity-high {
  background: rgba(185, 28, 28, 0.07);
  border-color: rgba(185, 28, 28, 0.18);
}
.integrity-flag.severity-medium {
  background: rgba(180, 83, 9, 0.08);
  border-color: rgba(180, 83, 9, 0.18);
}
.integrity-flag.severity-low {
  background: rgba(71, 85, 105, 0.07);
  border-color: rgba(71, 85, 105, 0.14);
}
.integrity-flag-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.integrity-severity {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  line-height: 1.4;
}
.severity-high .integrity-severity {
  background: rgba(185, 28, 28, 0.14);
  color: #991b1b;
}
.severity-medium .integrity-severity {
  background: rgba(180, 83, 9, 0.14);
  color: #9a3412;
}
.severity-low .integrity-severity {
  background: rgba(71, 85, 105, 0.14);
  color: #334155;
}
.integrity-types {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.integrity-type {
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--qh-ink-soft, #334155);
  text-transform: capitalize;
}
.integrity-type-primary {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--qh-ink, #0f172a);
}
.integrity-type + .integrity-type::before {
  content: "·";
  margin-right: 6px;
  color: var(--qh-muted);
  font-weight: 500;
}
.integrity-detail {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--qh-ink-soft, #1e293b);
}
.integrity-flag-images {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.integrity-flag-thumb {
  height: 90px;
  width: auto;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(71, 85, 105, 0.16);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.integrity-flag-thumb:hover {
  transform: scale(1.03);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.15);
}
[data-theme="dark"] .integrity-flag-thumb {
  border-color: rgba(255, 255, 255, 0.12);
}
.integrity-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.integrity-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(71, 85, 105, 0.16);
  color: #334155;
}
[data-theme="dark"] .integrity-chip {
  background: rgba(0, 0, 0, 0.25);
  border-color: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
}
.integrity-disclaimer {
  margin: 0;
  font-size: 0.82rem;
  color: var(--qh-muted);
}

.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }

.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  background: var(--bg-surface-secondary);
  color: var(--qh-ink-soft);
}

.tag-green { background: rgba(47, 179, 68, 0.14); color: #1f7a2f; }
.tag-yellow { background: rgba(230, 162, 60, 0.16); color: #9a6700; }
.tag-red { background: rgba(214, 57, 57, 0.12); color: #b42318; }
.tag-blue { background: rgba(43, 123, 185, 0.14); color: #1d5f91; }

/* —— Rendered markdown (LLM-generated evaluation/live-score reasoning) —— */
.md-content > * { margin: 0 0 8px; }
.md-content > *:last-child { margin-bottom: 0; }

.md-content h1,
.md-content h2,
.md-content h3,
.md-content h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--qh-ink);
  font-size: 0.88rem;
  margin-top: 12px;
}

.md-content h1:first-child,
.md-content h2:first-child,
.md-content h3:first-child,
.md-content h4:first-child {
  margin-top: 0;
}

.md-content ul,
.md-content ol {
  padding-left: 20px;
}

.md-content li + li { margin-top: 4px; }
.md-content li > ul,
.md-content li > ol { margin-top: 4px; }

/* A fixed height (not just min-height) is what actually keeps these charts
   compact — without it, Chart.js's default maintainAspectRatio:true grows
   canvas height along with the wide dashboard panel's width, producing the
   oversized, sparse-looking widgets flagged in the product review. Paired
   with maintainAspectRatio:false on each chart's own options in
   dashboard.html, which is what makes Chart.js actually respect this. */
.chart-wrap { height: 220px; padding: 8px; }
.chart-header { padding: 16px 18px 0; }
.chart-header-left .card-title { margin: 0; }

.alert {
  border-radius: 16px;
  border: 1px solid var(--qh-line);
  padding: 12px 14px;
  background: var(--qh-paper);
}

.alert-error {
  border-color: rgba(214, 57, 57, 0.3);
  background: rgba(214, 57, 57, 0.08);
}

.alert-success {
  border-color: rgba(47, 179, 68, 0.3);
  background: rgba(47, 179, 68, 0.08);
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
  z-index: 100;
  background: #fff;
  padding: 8px 12px;
  border-radius: 8px;
}

.empty-block {
  text-align: center;
  padding: 48px 20px;
  color: var(--qh-muted);
  font-size: 13.5px;
  font-weight: 500;
}

.text-muted {
  color: var(--qh-muted-2) !important;
  font-weight: 400;
}

@media (prefers-reduced-motion: reduce) {
  .stat-tile,
  .btn,
  .sidebar-link {
    transition: none;
  }
  .stat-tile:hover { transform: none; }
}

/* —— Billing / plans —— */
.billing-hero {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 28px;
  align-items: stretch;
  margin-bottom: 32px;
}

.billing-hero-lead {
  margin: 10px 0 0;
  max-width: 36rem;
  color: var(--qh-ink-soft);
  font-size: 1.05rem;
  line-height: 1.55;
}

.billing-usage-card {
  background: linear-gradient(145deg, #0d1512 0%, #0f766e 100%);
  color: #eef7f4;
  border-radius: 16px;
  padding: 22px 24px;
  box-shadow: var(--qh-shadow);
}

.billing-usage-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.billing-usage-kicker {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.75;
}

.billing-usage-plan {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.65rem;
  margin-top: 2px;
}

.billing-usage-ring {
  --pct: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(closest-side, rgba(16, 36, 42, 0.95) 72%, transparent 73% 100%),
    conic-gradient(#5eead4 calc(var(--pct) * 1%), rgba(255, 255, 255, 0.18) 0);
  font-size: 0.8rem;
  font-weight: 700;
}

.billing-meter {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
  margin-bottom: 16px;
}

.billing-meter-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #5eead4, #a7f3d0);
  transition: width 0.4s ease;
}

.billing-usage-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.billing-usage-stats strong {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
}

.billing-usage-stats span {
  font-size: 0.78rem;
  opacity: 0.7;
}

.billing-usage-period {
  margin: 14px 0 0;
  font-size: 0.85rem;
  opacity: 0.72;
}

.billing-plans {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 20px;
}

.referral-link-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.referral-link-form {
  margin-top: auto;
  padding-top: 8px;
}

.billing-plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--qh-paper);
  border: 1px solid var(--qh-line);
  border-radius: 16px;
  padding: 22px 20px 20px;
  box-shadow: none;
  transition: border-color 0.15s ease;
}

.billing-plan-card:hover {
  transform: none;
  border-color: var(--qh-teal-deep);
  box-shadow: none;
}

.billing-plan-card.is-featured {
  border-color: rgba(15, 118, 110, 0.45);
  background:
    linear-gradient(180deg, #e7f4ef, var(--qh-paper) 42%);
}

.billing-plan-card.is-current {
  border-color: var(--qh-ink);
}

.billing-plan-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--qh-teal-deep);
  color: #fff;
}

.billing-plan-badge.is-current-badge {
  background: var(--qh-ink);
}

.billing-plan-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--qh-ink);
}

.billing-plan-head p {
  margin: 6px 0 0;
  color: var(--qh-muted);
  font-size: 0.92rem;
  line-height: 1.45;
  min-height: 2.7em;
}

.billing-plan-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.billing-price-amount {
  font-size: 2rem;
  font-weight: 700;
  color: var(--qh-ink);
  letter-spacing: -0.02em;
}

.billing-price-unit {
  color: var(--qh-muted);
  font-size: 0.9rem;
}

.billing-plan-mins {
  font-weight: 600;
  color: var(--qh-teal-deep);
  font-size: 0.95rem;
}

.billing-plan-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  flex: 1;
}

.billing-plan-features li {
  position: relative;
  padding-left: 1.2rem;
  color: var(--qh-ink-soft);
  font-size: 0.9rem;
  line-height: 1.4;
}

.billing-plan-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--qh-teal);
}

.billing-plan-cta .btn {
  width: 100%;
}

.billing-footnote {
  color: var(--qh-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.billing-footnote > span {
  display: block;
}

@media (max-width: 1100px) {
  .billing-plans {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .billing-plans.referral-link-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .billing-hero {
    grid-template-columns: 1fr;
  }
  .billing-plans {
    grid-template-columns: 1fr;
  }
}

/* —— Guided product tour (static/product_tour.js) —— */
.tour-highlight {
  position: relative;
  z-index: 40;
  border-radius: inherit;
  animation: tour-pulse 1.6s ease-in-out infinite;
}

@keyframes tour-pulse {
  0%, 100% { box-shadow: 0 0 0 3px var(--qh-teal), 0 0 12px 2px rgba(15, 157, 122, 0.45); }
  50% { box-shadow: 0 0 0 5px var(--qh-teal), 0 0 20px 6px rgba(15, 157, 122, 0.3); }
}

.tour-tooltip {
  position: fixed;
  z-index: 1000;
  width: 300px;
  max-width: calc(100vw - 32px);
  background: #16343a;
  color: #f4fffb;
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.32);
}

.tour-tooltip-arrow {
  position: absolute;
  top: -6px;
  left: 24px;
  width: 14px;
  height: 14px;
  background: #16343a;
  transform: rotate(45deg);
  border-radius: 3px;
}

.tour-tooltip--above .tour-tooltip-arrow {
  top: auto;
  bottom: -6px;
}

.tour-close-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: transparent;
  border: none;
  color: rgba(244, 255, 251, 0.65);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
}
.tour-close-btn:hover { color: #f4fffb; }

.tour-tooltip-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  padding-right: 18px;
}

.tour-tooltip-title {
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.3;
}

.tour-step-badge {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(244, 255, 251, 0.16);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.tour-tooltip-body {
  font-size: 0.87rem;
  line-height: 1.45;
  color: rgba(244, 255, 251, 0.82);
  margin-bottom: 12px;
}

.tour-progress-track {
  height: 4px;
  border-radius: 2px;
  background: rgba(244, 255, 251, 0.18);
  overflow: hidden;
  margin-bottom: 12px;
}

.tour-progress-fill {
  height: 100%;
  background: var(--qh-teal);
  border-radius: 2px;
  transition: width 0.2s ease;
}

.tour-tooltip-actions {
  display: flex;
  justify-content: flex-end;
}

.tour-next-btn {
  background: var(--qh-teal);
  color: #0b1f22;
  border: none;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 7px 16px;
  border-radius: 999px;
  cursor: pointer;
}
.tour-next-btn:hover { background: #3dd6b5; }

/* —— Studio list pages (Jobs / Candidates) —— */
.studio-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.studio-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.filter-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--qh-paper);
  border: 1px solid var(--qh-line);
  border-radius: 11px;
  padding: 4px;
  flex-wrap: wrap;
}

.filter-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.012em;
  color: var(--qh-muted-3);
  text-decoration: none !important;
  white-space: nowrap;
}

.filter-tab:hover {
  color: var(--qh-ink);
  text-decoration: none !important;
}

.filter-tab.is-active {
  background: var(--qh-ink);
  color: #fff;
}

.filter-tab-count {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--qh-muted);
  background: var(--bg-surface-secondary);
  border-radius: 5px;
  padding: 2px 6px;
}

.filter-tab.is-active .filter-tab-count {
  color: #c9ded6;
  background: rgba(255, 255, 255, 0.14);
}

.studio-list {
  background: var(--qh-paper);
  border: 1px solid var(--qh-line);
  border-radius: 16px;
  overflow: hidden;
}

.studio-list-head,
.studio-list-row {
  display: grid;
  gap: 20px;
  align-items: center;
  padding: 16px 24px;
}

.studio-list-head {
  padding: 13px 24px;
  background: var(--qh-paper-soft);
  border-bottom: 1px solid var(--qh-line);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--qh-muted-2);
}

.studio-list-grid-jobs {
  grid-template-columns: 2.1fr 1fr 1.35fr 0.85fr 0.9fr 44px;
}

.pipeline-cell {
  min-width: 0;
}

.pipeline-bar {
  display: flex;
  height: 7px;
  border-radius: 99px;
  overflow: hidden;
  background: #f1f5f3;
}

.pipeline-seg {
  display: block;
  height: 100%;
}

.pipeline-seg--screened { background: #0f766e; }
.pipeline-seg--interviewing { background: #3ddc9a; }
.pipeline-seg--new { background: #cfe6dd; }

.pipeline-label {
  margin-top: 7px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--qh-muted-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-pill--draft {
  color: #6b7d76;
  background: #f1f5f3;
}
.status-pill--draft .status-dot { background: #a3b0ab; }

.status-pill--paused {
  color: #8a6516;
  background: #fbf3e2;
}
.status-pill--paused .status-dot { background: #e0a83b; }

.studio-list-grid-candidates {
  grid-template-columns: 2.2fr 1.5fr 1.1fr 0.8fr 1.5fr 0.9fr;
}

.studio-list-row {
  border-bottom: 1px solid #f0f4f2;
  text-decoration: none !important;
  color: inherit;
  cursor: pointer;
  transition: background 0.12s ease;
}

a.studio-list-row:hover,
a.studio-list-row:focus {
  background: var(--qh-paper-soft);
  text-decoration: none !important;
  color: inherit;
}

.studio-list-primary {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.studio-list-title {
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.022em;
  color: var(--qh-ink);
}

.studio-list-meta {
  margin-top: 3px;
  font-size: 13px;
  font-weight: 400;
  color: var(--qh-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.studio-list-secondary {
  font-size: 14px;
  font-weight: 500;
  color: var(--qh-ink-soft);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.studio-list-metric {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--qh-ink);
}

.studio-list-metric.is-good { color: #0f5c55; }
.studio-list-metric.is-bad { color: #b23c3c; }

.studio-list-date {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--qh-muted-2);
  white-space: nowrap;
}

.studio-list-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 24px;
  background: var(--qh-paper-soft);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--qh-muted-2);
}

.is-right { text-align: right; }

.studio-person {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.avatar-chip {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #eef7f4;
  color: #0f5c55;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  border-radius: 7px;
  padding: 6px 10px;
  white-space: nowrap;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-pill--live {
  color: #0f5c55;
  background: #eef7f4;
}
.status-pill--live .status-dot { background: #0f9d7a; }

.status-pill--hired {
  color: #1d5f91;
  background: rgba(37, 99, 235, 0.1);
}
.status-pill--hired .status-dot { background: #2563eb; }

.status-pill--closed {
  color: #6b7d76;
  background: #f1f5f3;
}
.status-pill--closed .status-dot { background: #a3b0ab; }

.screen-bar {
  height: 6px;
  border-radius: 99px;
  background: #f1f5f3;
  overflow: hidden;
}

.screen-bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.screen-bar-fill--ok { background: #0f9d7a; }
.screen-bar-fill--warn { background: #e0a83b; }
.screen-bar-fill--bad { background: #dc4c4c; }

/* —— Form shell (job / candidate create-edit) —— */
.form-shell {
  background: var(--qh-paper);
  border: 1px solid var(--qh-line);
  border-radius: 18px;
  overflow: hidden;
}

.form-shell-head {
  padding: 28px 34px 8px;
  border-bottom: none;
}

.form-shell-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--qh-teal-deep);
}

.form-shell-title {
  margin: 8px 0 0;
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.038em;
  line-height: 1.12;
  color: var(--qh-ink);
}

.form-shell-sub {
  margin: 6px 0 0;
  font-size: 14.5px;
  font-weight: 400;
  color: #5d6f68;
}

.form-shell-body {
  padding: 26px 34px 30px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-shell-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 34px;
  border-top: 1px solid #eef2f0;
  background: var(--qh-paper-soft);
}

.form-section-card {
  background: var(--qh-paper);
  border: 1px solid var(--qh-line);
  border-radius: 16px;
  padding: 22px 20px;
  margin-bottom: 18px;
}

.form-section-card .card-title,
.form-section-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--qh-muted);
  margin: 0 0 14px;
}

.card-header {
  padding: 18px 22px 0;
  border: none;
  background: transparent;
}

.card-header .card-title {
  font-size: 18px !important;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.card-footer {
  padding: 18px 22px;
  border-top: 1px solid #eef2f0;
  background: var(--qh-paper-soft);
}

@media (max-width: 980px) {
  .studio-list-head { display: none; }
  .studio-list-grid-jobs,
  .studio-list-grid-candidates {
    grid-template-columns: 1fr auto;
    gap: 12px;
  }
  .studio-list-grid-jobs > :nth-child(n+3),
  .studio-list-grid-candidates > :nth-child(n+3):not(:nth-child(4)):not(:last-child) {
    display: none;
  }
  .studio-list-grid-candidates > :nth-child(4) {
    grid-column: 2;
    grid-row: 1;
  }
}

/* —— Job detail / hiring board —— */
.job-detail {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: -6px -2px 0;
}

.job-detail-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.job-detail-crumb {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--qh-ink);
  min-width: 0;
}

.job-detail-crumb a {
  color: var(--qh-muted);
  font-weight: 500;
  text-decoration: none;
}

.job-detail-crumb a:hover {
  color: var(--qh-ink);
}

.job-detail-crumb-sep {
  color: #c9d4cf;
}

.job-detail-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  flex-wrap: wrap;
}

.job-apply-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--qh-line);
  border-radius: 10px;
  padding: 9px 12px;
  background: var(--qh-paper-soft);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--qh-ink-soft);
  cursor: pointer;
  max-width: min(360px, 48vw);
}

.job-apply-chip:hover {
  border-color: #0f766e;
}

.job-apply-chip.is-copied {
  border-color: #0f766e;
  background: #eef7f4;
}

.job-apply-chip-url {
  color: #0f766e;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.job-apply-chip-icon {
  color: #c0ccc7;
  flex: 0 0 auto;
}

.job-detail-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}

.job-detail-intro {
  min-width: 0;
  flex: 1 1 280px;
}

.job-detail-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.job-detail-title {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--qh-ink);
}

.job-detail-meta {
  margin-top: 7px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--qh-ink-soft);
}

.job-detail-published {
  margin-top: 4px;
  font-size: 13.5px;
  font-weight: 400;
  color: var(--qh-muted);
}

.job-stat-row {
  display: flex;
  gap: 10px;
  flex: 0 0 auto;
  flex-wrap: wrap;
}

.job-stat-card {
  border: 1px solid var(--qh-line);
  border-radius: 12px;
  padding: 14px 18px;
  text-align: right;
  background: var(--qh-paper);
  min-width: 112px;
}

.job-stat-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--qh-muted-2);
}

.job-stat-value {
  margin-top: 8px;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--qh-ink);
}

.job-stat-value.is-teal {
  color: #0f5c55;
}

.job-board-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.job-board-search {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(340px, 100%);
  border: 1px solid var(--qh-line);
  border-radius: 10px;
  padding: 9px 12px;
  background: var(--qh-paper);
}

.job-board-search-icon {
  width: 13px;
  height: 13px;
  border: 1.5px solid #a3b0ab;
  border-radius: 50%;
  flex: 0 0 auto;
}

.job-board-search input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  color: var(--qh-ink);
  min-width: 0;
}

.job-board-search input::placeholder {
  color: var(--qh-muted);
}

.job-board-toolbar-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.job-board-count {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--qh-muted-2);
  white-space: nowrap;
}

.job-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
  overflow-x: auto;
  padding-bottom: 8px;
}

.job-board-col {
  background: #f7faf8;
  border: 1px solid var(--qh-line);
  border-radius: 16px;
  padding: 14px 12px 16px;
  min-height: 420px;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.12s ease, background-color 0.12s ease;
}

.job-board-col.is-drag-over {
  border-color: #0f766e;
  background: #eef6f4;
}

.job-board-col-head {
  padding: 2px 6px 12px;
}

.job-board-col-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.job-board-col-name {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--qh-ink-soft);
}

.job-board-col-count {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--qh-muted);
  font-variant-numeric: tabular-nums;
}

.job-board-col-sub {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 400;
  color: var(--qh-muted);
  line-height: 1.45;
}

.job-board-empty {
  border: 1px dashed #cfdad5;
  border-radius: 12px;
  padding: 26px 14px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 500;
  color: #9aa8a3;
  line-height: 1.5;
}

.job-board-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.job-cand-card {
  display: block;
  background: var(--qh-paper);
  border: 1px solid var(--qh-line);
  border-radius: 13px;
  padding: 14px;
  text-decoration: none;
  color: inherit;
  cursor: grab;
  transition: border-color 0.12s ease, opacity 0.12s ease;
}

.job-cand-card.is-dragging {
  opacity: 0.5;
  cursor: grabbing;
}

.job-cand-card:hover,
.job-cand-card:focus,
.job-cand-card:visited,
.job-cand-card:active {
  border-color: var(--qh-line);
  text-decoration: none;
  color: inherit;
  outline: none;
}

.job-cand-card:hover,
.job-cand-card:focus {
  border-color: #0f766e;
}

.job-cand-when {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  color: #a3b0ab;
}

.job-cand-identity {
  margin-top: 9px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.job-cand-avatar {
  width: 32px;
  height: 32px;
  font-size: 12.5px;
}

.job-cand-text {
  min-width: 0;
}

.job-cand-name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.018em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.job-cand-email {
  margin-top: 1px;
  font-size: 11.5px;
  font-weight: 400;
  color: var(--qh-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.job-cand-foot {
  margin-top: 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.job-cand-note {
  font-size: 12px;
  font-weight: 500;
  color: var(--qh-muted-2);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.job-cand-score {
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  border-radius: 6px;
  padding: 4px 8px;
  flex: 0 0 auto;
}

@media (max-width: 1100px) {
  .job-board {
    grid-template-columns: repeat(5, minmax(220px, 1fr));
  }
}

@media (max-width: 720px) {
  .job-detail-title {
    font-size: 22px;
  }
  .job-stat-card {
    min-width: 96px;
    padding: 12px 14px;
  }
  .job-stat-value {
    font-size: 22px;
  }
}

/* —— Add / Edit job wizard —— */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.btn-ghost {
  background: transparent;
  border: 1px solid transparent;
  color: var(--qh-muted);
  font-size: 13.5px;
  font-weight: 600;
  padding: 9px 12px;
  border-radius: 9px;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}

.btn-ghost:hover {
  color: var(--qh-ink);
}

.form-hint.is-error {
  color: #b23c3c;
}

.job-wizard {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: -6px -2px 0;
}

.job-wizard-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.job-wizard-crumb {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.job-wizard-crumb a {
  color: var(--qh-muted);
  font-weight: 500;
  text-decoration: none;
}

.job-wizard-crumb a:hover { color: var(--qh-ink); }

.job-wizard-crumb-sep { color: #c9d4cf; }

.job-wizard-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.job-wizard-layout {
  display: flex;
  gap: 28px;
  align-items: flex-start;
}

.job-wizard-side {
  width: 296px;
  flex: 0 0 296px;
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.job-wizard-steps-card {
  background: var(--qh-paper);
  border: 1px solid var(--qh-line);
  border-radius: 16px;
  padding: 22px 20px;
}

.job-wizard-side-kicker {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--qh-muted);
}

.job-wizard-steps {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.job-wizard-step {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 12px;
  cursor: pointer;
  padding: 9px 8px;
  border-radius: 10px;
  background: transparent;
  border: none;
  text-align: left;
  font: inherit;
  color: inherit;
}

.job-wizard-step.is-active {
  background: #f2f8f6;
}

.job-wizard-step-mark {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  background: #fff;
  color: #9aa8a3;
  border: 1.5px solid #dfe6e2;
}

.job-wizard-step.is-active .job-wizard-step-mark {
  background: #0f766e;
  color: #fff;
  border-color: #0f766e;
}

.job-wizard-step.is-done .job-wizard-step-mark {
  background: #0f9d7a;
  color: #fff;
  border-color: #0f9d7a;
}

.job-wizard-step-title {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: #6b7d76;
}

.job-wizard-step.is-active .job-wizard-step-title,
.job-wizard-step.is-done .job-wizard-step-title {
  color: var(--qh-ink);
}

.job-wizard-step-sub {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--qh-muted);
  line-height: 1.45;
}

.job-wizard-ai-card {
  border: 1px solid #dbe9e3;
  border-radius: 16px;
  padding: 18px 20px;
  background: linear-gradient(180deg, #e7f4ef, #f7fbf9);
}

.job-wizard-ai-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: #0f5c55;
}

.job-wizard-ai-body {
  margin-top: 5px;
  font-size: 13px;
  font-weight: 400;
  color: #4f6b64;
  line-height: 1.5;
}

.job-wizard-extract {
  background: var(--qh-paper);
  border: 1px solid var(--qh-line);
  border-radius: 16px;
  padding: 16px 18px;
}

.job-wizard-extract-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--qh-muted);
  margin-bottom: 10px;
}

.job-wizard-extract-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.job-wizard-extract-form input[type="file"] {
  font-size: 12.5px;
  color: var(--qh-muted-2);
}

.job-wizard-panel {
  flex: 1;
  min-width: 0;
  background: var(--qh-paper);
  border: 1px solid var(--qh-line);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.job-wizard-progress {
  height: 3px;
  background: #eef2f0;
}

.job-wizard-progress-bar {
  height: 100%;
  background: #0f9d7a;
  transition: width 0.3s ease;
}

.job-wizard-panel-head {
  padding: 28px 34px 8px;
}

.job-wizard-step-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #0f766e;
}

.job-wizard-panel-title {
  margin: 8px 0 0;
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.038em;
  line-height: 1.12;
  color: var(--qh-ink);
}

.job-wizard-panel-sub {
  margin: 6px 0 0;
  font-size: 14.5px;
  font-weight: 400;
  color: #5d6f68;
}

.job-wizard-pane {
  padding: 26px 34px 30px;
  display: none;
  flex-direction: column;
  gap: 22px;
}

.job-wizard-pane.is-active {
  display: flex;
}

.job-wizard-grid {
  display: grid;
  gap: 18px;
}

.job-wizard-grid-2 {
  grid-template-columns: 1.4fr 1fr;
}

.job-wizard-grid-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.job-wizard-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
}

.job-wizard-label-row .form-label {
  margin-bottom: 0;
}

.job-wizard-textarea {
  min-height: 150px;
  line-height: 1.65;
  resize: vertical;
}

.emp-toggle {
  display: flex;
  gap: 6px;
}

.emp-toggle-opt {
  flex: 1;
  text-align: center;
  border: 1px solid var(--qh-line);
  border-radius: 9px;
  padding: 11px 4px;
  font-size: 13.5px;
  font-weight: 500;
  color: #7d8d87;
  background: var(--qh-paper);
  cursor: pointer;
  user-select: none;
}

.emp-toggle-opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.emp-toggle-opt.is-active {
  border: 1.5px solid #0f766e;
  color: #0f5c55;
  background: #eef7f4;
  font-weight: 600;
}

.skill-chip-editor {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skill-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #dbe9e3;
  background: #eef7f4;
  border-radius: 99px;
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 600;
  color: #0f5c55;
  cursor: pointer;
  font-family: inherit;
}

.skill-chip:hover {
  border-color: #0f766e;
}

.skill-add-row {
  display: flex;
  gap: 8px;
  align-items: center;
  max-width: 420px;
}

.skill-add-input {
  min-height: 42px;
  flex: 1;
}

.skill-add-btn {
  min-height: 42px;
  padding: 0 16px;
  flex: 0 0 auto;
}

.skill-suggest-kicker {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--qh-muted-2);
}

.skill-suggest-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-suggest {
  border: 1px dashed #c9d4cf;
  border-radius: 99px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  color: #5d6f68;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}

.skill-suggest:hover {
  border-color: #0f766e;
  color: #0f5c55;
  background: #f2f8f6;
}

.lang-checkbox-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lang-checkbox-opt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--qh-line);
  border-radius: 99px;
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 500;
  color: #5d6f68;
  background: var(--qh-paper);
  cursor: pointer;
  user-select: none;
}

.lang-checkbox-opt input {
  margin: 0;
}

.lang-checkbox-opt:has(input:checked) {
  border: 1.5px solid #0f766e;
  color: #0f5c55;
  background: #eef7f4;
  font-weight: 600;
}

.hiring-stage-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hiring-stage-row {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--qh-line);
  border-radius: 13px;
  padding: 15px 16px;
  background: var(--qh-paper-soft);
}

.hiring-stage-num {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #eef7f4;
  color: #0f5c55;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.hiring-stage-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.018em;
}

.hiring-stage-sub {
  margin-top: 2px;
  font-size: 13px;
  font-weight: 400;
  color: var(--qh-muted);
}

.hiring-stage-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 6px;
  padding: 5px 9px;
}

.settings-toggle-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.settings-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid var(--qh-line);
  border-radius: 13px;
  padding: 16px 18px;
  background: var(--qh-paper-soft);
  cursor: pointer;
}

/* Same specificity as .settings-toggle-row's own `display: flex` above, so
   without this the boolean `hidden` attribute alone (e.g. job_form.html's
   #deep-dive-row toggled via JS) would lose to it and stay visible. */
.settings-toggle-row[hidden] {
  display: none;
}

.settings-toggle-name {
  display: block;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.018em;
}

.settings-toggle-sub {
  display: block;
  margin-top: 3px;
  font-size: 13.5px;
  font-weight: 400;
  color: var(--qh-muted-2);
  line-height: 1.5;
}

.settings-switch {
  position: relative;
  width: 46px;
  height: 26px;
  flex: 0 0 auto;
}

.settings-switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  z-index: 1;
}

.settings-switch-track {
  display: block;
  width: 46px;
  height: 26px;
  border-radius: 99px;
  background: #dfe6e2;
  padding: 3px;
  transition: background 0.15s ease;
  box-sizing: border-box;
}

.settings-switch-track::after {
  content: "";
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(13, 21, 18, 0.22);
  transition: transform 0.15s ease;
}

.settings-switch input:checked + .settings-switch-track {
  background: #0f9d7a;
}

.settings-switch input:checked + .settings-switch-track::after {
  transform: translateX(20px);
}

.job-wizard-panel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 34px;
  border-top: 1px solid #eef2f0;
  background: var(--qh-paper-soft);
  margin-top: auto;
}

.job-wizard-foot-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.job-wizard-counter {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #9aa8a3;
}

@media (max-width: 980px) {
  .job-wizard-layout {
    flex-direction: column;
  }
  .job-wizard-side {
    width: 100%;
    flex: none;
    position: static;
  }
  .job-wizard-grid-2,
  .job-wizard-grid-3 {
    grid-template-columns: 1fr;
  }
  .job-wizard-panel-head,
  .job-wizard-pane,
  .job-wizard-panel-foot {
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* —— Candidate detail (studio) —— */
.btn-danger-outline {
  background: #fff;
  border: 1px solid #f0d5d5;
  color: #b23c3c;
  font-size: 13.5px;
  font-weight: 600;
  padding: 9px 14px;
  border-radius: 9px;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
}

.btn-danger-outline:hover {
  background: #fdf4f4;
}

.cand-detail {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: -6px -2px 0;
}

.cand-detail-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.cand-detail-crumb {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  min-width: 0;
}

.cand-detail-crumb a {
  color: var(--qh-muted);
  font-weight: 500;
  text-decoration: none;
}

.cand-detail-crumb a:hover { color: var(--qh-ink); }
.cand-detail-crumb-sep { color: #c9d4cf; }

.cand-detail-topbar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.cand-action-form {
  margin: 0;
  display: flex;
}

.cand-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 7px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.012em;
  color: var(--qh-ink);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.cand-action svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.cand-action:hover {
  background: rgba(13, 21, 18, 0.04);
}

.cand-action--quiet {
  color: var(--qh-muted);
}

.cand-action--quiet:hover {
  color: var(--qh-ink);
  background: #f4f7f6;
}

.cand-action--reject {
  color: #d23c3c;
}

.cand-action--reject:hover {
  background: #fdf0f0;
}

.cand-action--hire {
  color: #1a7a4c;
}

.cand-action--hire:hover {
  background: #eef7f4;
}

.cand-hero {
  background: var(--qh-paper);
  border: 1px solid var(--qh-line);
  border-radius: 16px;
  padding: 24px 26px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}

.cand-hero-main {
  display: flex;
  gap: 18px;
  min-width: 0;
  flex: 1 1 320px;
}

.cand-hero-avatar {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.cand-hero-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.cand-hero-name {
  margin: 0;
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.038em;
  line-height: 1.1;
}

.cand-hero-meta {
  margin-top: 7px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--qh-ink-soft);
}

.cand-hero-contacts {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 13.5px;
  font-weight: 500;
  color: #6b7d76;
}

.cand-hero-resume {
  border: none;
  background: none;
  padding: 0;
  color: #0f766e;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.cand-hero-stats {
  display: flex;
  gap: 10px;
  flex: 0 0 auto;
  flex-wrap: wrap;
}

.cand-stat-card {
  border: 1px solid var(--qh-line);
  border-radius: 12px;
  padding: 14px 18px;
  text-align: right;
  background: var(--qh-paper-soft);
  min-width: 118px;
}

.cand-stat-card--wide { min-width: 150px; }

.cand-stat-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--qh-muted-2);
}

.cand-stat-value {
  margin-top: 8px;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.cand-stat-value--sm {
  font-size: 16px;
  letter-spacing: -0.02em;
}

.cand-stat-note {
  margin-top: 4px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--qh-muted);
}

.cand-resume-panel {
  background: var(--qh-paper);
  border: 1px solid var(--qh-line);
  border-radius: 14px;
  padding: 18px 22px;
}

.cand-resume-kicker {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--qh-muted);
  margin-bottom: 8px;
}

.cand-resume-panel p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--qh-ink-soft);
}

.cand-timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.cand-timeline-card {
  background: #fff;
  border: 1px solid var(--qh-line);
  border-radius: 14px;
  padding: 18px 18px 16px;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.cand-timeline-card.is-active {
  border-color: #0f766e;
  background: #fbfdfc;
  box-shadow: 0 0 0 3px rgba(15, 157, 122, 0.11);
}

.cand-timeline-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.cand-timeline-title {
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.25;
}

.cand-timeline-state {
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  flex: 0 0 auto;
}

.cand-timeline-meta {
  margin-top: 6px;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--qh-muted);
  line-height: 1.5;
}

.cand-timeline-value-row {
  margin: 14px 0 10px;
  display: flex;
  align-items: baseline;
  gap: 5px;
  font-variant-numeric: tabular-nums;
}

.cand-timeline-value {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1;
}

.cand-timeline-of {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--qh-muted);
}

.cand-timeline-bar {
  height: 6px;
  border-radius: 99px;
  background: #f1f5f3;
  overflow: hidden;
}

.cand-timeline-bar span {
  display: block;
  height: 100%;
  border-radius: 99px;
}

.cand-main-grid {
  display: grid;
  grid-template-columns: 1.35fr 1.05fr;
  gap: 18px;
  align-items: start;
}

.cand-panel,
.cand-side-card,
.cand-eval {
  background: var(--qh-paper);
  border: 1px solid var(--qh-line);
  border-radius: 16px;
  padding: 22px 24px 24px;
}

.cand-panel-title,
.cand-side-title,
.cand-eval-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.cand-eval-title { font-size: 20px; letter-spacing: -0.03em; }

.cand-panel-sub {
  margin: 3px 0 0;
  font-size: 13.5px;
  font-weight: 400;
  color: var(--qh-muted-2);
  line-height: 1.5;
}

.cand-stage-pane { margin-top: 14px; }
.cand-stage-pane[hidden],
.cand-eval[hidden] { display: none !important; }

.cand-empty {
  margin-top: 10px;
  border: 1px dashed #cfdad5;
  border-radius: 13px;
  padding: 26px 22px;
  background: var(--qh-paper-soft);
  text-align: center;
}

.cand-empty-title {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--qh-ink-soft);
}

.cand-empty-body {
  margin: 6px auto 0;
  max-width: 44ch;
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--qh-muted);
}

.cand-call-block + .cand-call-block {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #f0f4f2;
}

.cand-call-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.cand-call-when {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--qh-ink);
}

.cand-call-room {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--qh-muted);
}

.cand-video {
  margin-top: 14px;
}

.cand-video video {
  width: 100%;
  border-radius: 12px;
}

.cand-player {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--qh-paper-soft);
  border: 1px solid var(--qh-line);
  border-radius: 999px;
}

.cand-player audio { display: none; }

.cand-player-play {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--qh-teal);
  color: #fff;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.cand-player-play:hover { background: var(--qh-teal-deep); }
.cand-player-play svg { width: 15px; height: 15px; }
/* The bare `hidden` attribute is unreliable on inline <svg> in Chromium (its
   own SVG UA stylesheet reasserts display), so icon toggling uses this class
   instead — see candidate_detail.html's player JS. */
.cand-player-play svg.is-hidden,
.cand-player-icon-btn svg.is-hidden { display: none; }
.cand-player-play .icon-play { margin-left: 1px; }

.cand-player-body {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cand-player-track {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: var(--qh-line-strong);
  cursor: pointer;
  position: relative;
}

.cand-player-progress {
  position: absolute;
  inset: 0;
  width: 0%;
  border-radius: 999px;
  background: var(--qh-teal);
}

.cand-player-time {
  flex: none;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  color: var(--qh-muted-2);
  white-space: nowrap;
}

.cand-player-icon-btn {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--qh-muted-2);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.cand-player-icon-btn:hover {
  background: var(--qh-line);
  color: var(--qh-ink);
}
.cand-player-icon-btn svg { width: 15px; height: 15px; }

.cand-inline-score {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cand-inline-score-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--qh-ink-soft);
}

.cand-transcript {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cand-turn-who {
  font-size: 12.5px;
  font-weight: 600;
  color: #42544d;
}

.cand-turn-who.is-ai { color: #0f5c55; }

.cand-turn-text {
  margin-top: 4px;
  font-size: 14.5px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--qh-ink-soft);
}

.cand-notes-block { margin-top: 16px; }
.cand-notes-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.cand-notes-block p {
  margin: 6px 0 0;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--qh-ink-soft);
}

.cand-code-problem {
  border: 1px solid var(--qh-line);
  border-radius: 12px;
  padding: 14px 16px;
  background: var(--qh-paper-soft);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--qh-ink-soft);
}

.cand-code-snap {
  margin: 14px 0 0;
  padding: 16px 18px;
  border-radius: 12px;
  background: #0d1512;
  color: #c9ded6;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.75;
  overflow-x: auto;
  white-space: pre-wrap;
}

.cand-details { margin-top: 14px; }

.cand-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.cand-skill-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.cand-skill-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.cand-skill-name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.012em;
}

.cand-skill-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--qh-muted-2);
  font-variant-numeric: tabular-nums;
}

.cand-skill-track {
  margin-top: 6px;
  height: 6px;
  border-radius: 99px;
  background: #f1f5f3;
  overflow: hidden;
}

.cand-skill-track span {
  display: block;
  height: 100%;
  border-radius: 99px;
}

.cand-note-tabs {
  display: flex;
  gap: 4px;
  background: #f4f7f6;
  border-radius: 10px;
  padding: 3px;
  margin-bottom: 16px;
}

.cand-note-tab {
  flex: 1;
  text-align: center;
  cursor: pointer;
  padding: 8px 4px;
  border-radius: 8px;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #6b7d76;
  white-space: nowrap;
}

.cand-note-tab.is-active {
  background: #fff;
  color: var(--qh-ink);
  box-shadow: 0 1px 2px rgba(13, 21, 18, 0.06);
}

.cand-note-pane[hidden] { display: none !important; }

.cand-fu-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 500;
  color: #8b9a94;
}

.cand-fu-star {
  color: #c9a227;
  font-size: 12px;
}

.cand-fu-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cand-fu-card {
  border: 1px solid #e6eee9;
  border-radius: 12px;
  padding: 14px 14px 13px;
  background: #fff;
}

.cand-fu-badge {
  display: inline-block;
  margin-bottom: 8px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: #f1f5f3;
  color: #5a6b64;
}

.cand-fu-badge--meet,
.cand-fu-badge--flag {
  background: #fdf0f0;
  color: #b23c3c;
}

.cand-fu-badge--screen {
  background: #eef7f4;
  color: #0f5c55;
}

.cand-fu-q {
  margin: 0 0 8px;
  font-size: 14.5px;
  font-weight: 650;
  line-height: 1.45;
  letter-spacing: -0.015em;
  color: var(--qh-ink);
}

.cand-fu-why {
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.55;
  color: #6b7d76;
}

.cand-comment-form { margin-bottom: 8px; }

.cand-comment-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #dce6e1;
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
  color: var(--qh-ink);
  background: #fff;
  resize: vertical;
  min-height: 88px;
}

.cand-comment-input:focus {
  outline: none;
  border-color: #0f9d7a;
  box-shadow: 0 0 0 3px rgba(15, 157, 122, 0.12);
}

.cand-comment-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.cand-comment-btn { min-width: 96px; }

.cand-comment-empty {
  text-align: center;
  padding: 28px 8px 12px;
}

.cand-comment-list {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cand-comment-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
  font-size: 12.5px;
  color: #8b9a94;
}

.cand-comment-meta strong {
  color: var(--qh-ink-soft);
  font-weight: 600;
}

.cand-comment-body {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--qh-ink-soft);
  white-space: pre-wrap;
}

.cand-activity {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 2px;
}

.cand-activity-row {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 12px;
  align-items: start;
  padding: 0 0 18px;
  position: relative;
}

.cand-activity-row:last-child { padding-bottom: 0; }

.cand-activity-row::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 14px;
  bottom: 0;
  width: 1px;
  background: #e3ebe7;
}

.cand-activity-row:last-child::before { display: none; }

.cand-activity-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #c9d4cf;
  margin-top: 2px;
  z-index: 1;
  box-sizing: border-box;
}

.cand-activity-row--screen_done .cand-activity-dot,
.cand-activity-row--meet_done .cand-activity-dot,
.cand-activity-row--hired .cand-activity-dot {
  border-color: #0f9d7a;
  background: #eef7f4;
}

.cand-activity-row--screen_live .cand-activity-dot,
.cand-activity-row--meet_sched .cand-activity-dot {
  border-color: #5b8def;
  background: #eef3fd;
}

.cand-activity-row--rejected .cand-activity-dot {
  border-color: #d97070;
  background: #fdf0f0;
}

.cand-activity-when {
  font-size: 11.5px;
  font-weight: 500;
  color: #a3b0ab;
  margin-bottom: 3px;
}

.cand-activity-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--qh-ink);
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.cand-activity-sub {
  margin-top: 3px;
  font-size: 13px;
  font-weight: 500;
  color: #0f5c55;
  line-height: 1.4;
}

.cand-reval-kicker {
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--qh-muted-2);
}

.cand-reval-section { margin-bottom: 20px; }

.cand-skill-rate { margin-top: 14px; }

.cand-skill-rate-name {
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 550;
  color: var(--qh-ink-soft);
}

.cand-skill-rate-scale {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cand-skill-rate-opt {
  cursor: pointer;
}

.cand-skill-rate-opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cand-skill-rate-opt span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid #dce6e1;
  font-size: 12px;
  font-weight: 600;
  color: #6b7d76;
  background: #fff;
}

.cand-skill-rate-opt input:checked + span,
.cand-skill-rate-opt:hover span {
  border-color: #0f9d7a;
  background: #eef7f4;
  color: #0f5c55;
}

.cand-rec-pills {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cand-rec-pill {
  cursor: pointer;
}

.cand-rec-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cand-rec-pill span {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid #dce6e1;
  font-size: 13px;
  font-weight: 600;
  color: #5a6b64;
  background: #fff;
}

.cand-rec-pill input:checked + span {
  border-color: #0f9d7a;
  background: #eef7f4;
  color: #0f5c55;
}

.cand-req { color: #b23c3c; margin-left: 2px; }

.cand-kv {
  margin: 0;
  display: flex;
  flex-direction: column;
}

.cand-kv-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f4f2;
}

.cand-kv-row:last-child { border-bottom: none; }

.cand-kv-row dt {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--qh-muted);
}

.cand-kv-row dd {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.012em;
  color: var(--qh-ink);
  line-height: 1.45;
}

.cand-status-form { margin-bottom: 16px; }
.cand-final-review { margin-top: 8px; }

.cand-eval-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.cand-eval-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cand-signal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  border-radius: 8px;
  padding: 8px 14px;
  white-space: nowrap;
}

.cand-eval-top {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 40px;
  align-items: start;
}

.cand-eval-grid {
  margin-top: 26px;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 40px;
  align-items: start;
}

.cand-eval-summary,
.cand-eval-aside {
  min-width: 0;
}

.cand-eval-prose {
  margin: 0;
  font-size: 15.5px;
  font-weight: 400;
  line-height: 1.7;
  color: #33443e;
}

.cand-mono-kicker {
  margin-top: 26px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--qh-muted-2);
}

.cand-mono-kicker--flush {
  margin-top: 0;
}

.cand-mono-kicker.is-teal { color: #0f5c55; }
.cand-mono-kicker.is-amber { color: #8a6516; }

.cand-trait-list {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.cand-trait-list--eval {
  margin-top: 14px;
  gap: 14px;
}

.cand-trait-row {
  display: grid;
  grid-template-columns: 168px 1fr 52px;
  align-items: center;
  gap: 16px;
}

.cand-trait-row--eval {
  grid-template-columns: minmax(120px, 148px) 1fr 44px;
  gap: 12px 14px;
}

.cand-trait-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--qh-ink-soft);
  letter-spacing: -0.008em;
}

.cand-trait-track {
  height: 7px;
  border-radius: 99px;
  background: #f1f5f3;
  overflow: hidden;
}

.cand-trait-track span {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: #0f9d7a;
}

.cand-trait-val {
  text-align: right;
  font-size: 13.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--qh-ink);
}

.cand-sw-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.cand-chips {
  margin-top: 11px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.cand-chip {
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
}

.cand-chip.is-teal { background: #eef7f4; color: #0f5c55; }
.cand-chip.is-amber { background: #fbf3e2; color: #8a6516; }
.cand-chip.is-red { background: #fdf0f0; color: #b23c3c; }

@media (max-width: 1100px) {
  .cand-timeline { grid-template-columns: 1fr 1fr; }
  .cand-main-grid,
  .cand-eval-top,
  .cand-eval-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .cand-timeline { grid-template-columns: 1fr; }
  .cand-trait-row,
  .cand-trait-row--eval { grid-template-columns: 1fr; gap: 6px; }
  .cand-kv-row { grid-template-columns: 1fr; gap: 4px; }
  .cand-sw-grid { grid-template-columns: 1fr; }
}
