/*
 * HuntrIQ — global styles
 */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --brand: #0D132B;
  --brand-light: #131B42;
  --accent: #5B5CF6;
  --accent-hover: #4c4def;
  --accent-soft: #8B5CF6; /* second stop for accent gradients — vivid, NOT a pale tint */
  --accent-tint: #ede9fe; /* pale accent background behind accent-coloured text */
  --success: #22C55E;
  --text: #0D132B;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --bg: #f3f4f6;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.04);
  --shadow-lg: 0 18px 48px rgba(13,19,43,.12);
  /* ADDED: Satoshi Variable via Fontshare (weights 300–900) */
  --font-sans: "Satoshi", ui-sans-serif, system-ui, -apple-system, sans-serif;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Brand ────────────────────────────────────────────── */
.brand-lockup { display: block; }
.brand-wordmark {
  display: block;
  height: 32px;
  width: auto;
  max-width: 100%;
}

.brand-wordmark-text {
  display: flex;
  align-items: center;
  height: 32px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffffff;
  line-height: 1;
}

.brand-wordmark-iq {
  color: var(--accent);
}

.brand-beta {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(91, 92, 246, 0.12);
  border: 1px solid rgba(91, 92, 246, 0.28);
  border-radius: 4px;
  padding: 2px 5px;
  line-height: 1;
  vertical-align: middle;
  margin-left: 7px;
  flex-shrink: 0;
}

/* ── App shell ────────────────────────────────────────── */
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: radial-gradient(circle at 25% 8%, rgba(139,92,246,.32), transparent 28%), linear-gradient(180deg, var(--brand), #081026);
  color: #fff;
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.sidebar-nav {
  display: grid;
  gap: 8px;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 8px;
  color: rgba(255,255,255,.78);
  font-size: 14px;
  font-weight: 600;
}
.sidebar-link-label { flex: 1; min-width: 0; }
.sidebar-soon {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 99px;
  background: rgba(255,255,255,.1);
  color: rgba(255,255,255,.62);
}
.sidebar-link-disabled {
  opacity: .88;
  cursor: default;
  user-select: none;
}
.sidebar-link svg { width: 18px; height: 18px; flex-shrink: 0; }
/* UPDATED: sidebar links never underline on hover */
.sidebar a.sidebar-link,
.sidebar a.sidebar-link:hover,
.sidebar a.sidebar-link.active,
.sidebar a.sidebar-link.active:hover {
  text-decoration: none;
}
.sidebar a.sidebar-link:hover {
  color: #fff;
  background: rgba(255,255,255,.1);
}
.sidebar-link.active,
.sidebar a.sidebar-link.active,
.sidebar a.sidebar-link.active:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  box-shadow: 0 12px 30px rgba(91,92,246,.28);
}
.sidebar-card {
  margin-top: auto;
  position: relative;
  border: 1px solid rgba(255,255,255,.1);
  background: linear-gradient(135deg, rgba(91,92,246,.22), rgba(139,92,246,.12));
  border-radius: 12px;
  padding: 16px;
}
.sidebar-card-pro { padding-top: 34px; }
.sidebar-pro-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.72);
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 99px;
  padding: 4px 8px;
}
.sidebar-card h3 {
  font-size: 14px;
  margin: 0 0 6px;
}
.sidebar-card p {
  color: rgba(255,255,255,.64);
  font-size: 12px;
  margin: 0 0 14px;
}
.sidebar-account {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 18px;
  display: grid;
  gap: 10px;
}
.account-email {
  color: rgba(255,255,255,.68);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sign-out {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1);
  color: #fff;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 9px 12px;
  width: 100%;
}
.sign-out:hover { background: rgba(255,255,255,.13); }
.app-main { min-width: 0; }

.demo-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(91, 92, 246, 0.08);
  border-bottom: 1px solid rgba(91, 92, 246, 0.18);
  padding: 8px 28px;
  font-size: 12.5px;
  color: var(--accent);
  font-weight: 500;
}
.demo-banner-sign-out {
  background: none;
  border: 1px solid rgba(91, 92, 246, 0.3);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
}
.demo-banner-sign-out:hover { background: rgba(91, 92, 246, 0.1); }

/* ── Page shell ───────────────────────────────────────── */
.page { max-width: 1120px; margin: 0 auto; padding: 40px 32px 64px; }

/* ── Auth layout (login page) ─────────────────────────── */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 40px 36px 36px;
}
.auth-logo { margin-bottom: 28px; }
.auth-logo .brand-wordmark {
  height: 40px;
  width: auto;
  max-width: 100%;
}
.auth-title { font-size: 22px; font-weight: 700; margin: 0 0 4px; color: var(--text); }
.auth-subtitle { font-size: 13px; color: var(--text-muted); margin: 0 0 28px; }

/* ── Form elements (shared across auth + workspace) ─── */
.form-group { margin-bottom: 16px; }
.form-label,
.form-row label,
.workspace-form label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}
.form-control,
.form-input,
.form-select,
.form-row input:not([type="submit"]):not([type="button"]):not([type="hidden"]):not([type="radio"]):not([type="checkbox"]),
.form-row select,
.form-row textarea,
.workspace-form input:not([type="submit"]):not([type="button"]):not([type="hidden"]):not([type="radio"]):not([type="checkbox"]),
.workspace-form select,
.workspace-form textarea,
.journey-stage-controls select,
.auth-card input:not([type="submit"]):not([type="button"]):not([type="hidden"]):not([type="radio"]):not([type="checkbox"]),
.auth-card select,
.auth-card textarea {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
  outline: none;
  box-shadow: inset 0 1px 2px rgba(13, 19, 43, .04);
}
.form-control:focus,
.form-input:focus,
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus,
.workspace-form input:focus,
.workspace-form select:focus,
.workspace-form textarea:focus,
.journey-stage-controls select:focus,
.auth-card input:focus,
.auth-card select:focus,
.auth-card textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(91, 92, 246, .12);
}
.form-control::placeholder,
.form-input::placeholder,
.form-row input::placeholder,
.workspace-form input::placeholder,
.workspace-form textarea::placeholder,
.auth-card input::placeholder { color: #94a3b8; }
.form-control-select,
.form-row select,
.workspace-form select,
.journey-stage-controls select,
.auth-card select,
select.form-control,
select.form-control-sm,
select.form-select,
select.admin-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
.admin-select {
  font-size: 12px;
  padding: 4px 28px 4px 6px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  background-color: #fff;
  font-family: inherit;
  color: var(--text);
  background-position: right 8px center;
}
.form-row textarea,
.workspace-form textarea,
.auth-card textarea {
  min-height: 80px;
  resize: vertical;
  line-height: 1.5;
}
.form-control-sm,
.journey-stage-controls select {
  width: auto;
  min-width: 120px;
  padding: 6px 28px 6px 10px;
  font-size: 13px;
}
.workspace-form { display: flex; flex-direction: column; gap: 14px; }
.form-panel {
  background: var(--surface-soft);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}
.form-row { margin-bottom: 0; }
.form-row-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 14px;
}
@media (max-width: 960px) {
  .form-row-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .form-row-grid > .form-row:first-child {
    grid-column: 1 / -1;
  }
}
@media (max-width: 560px) {
  .form-row-grid {
    grid-template-columns: 1fr;
  }
  .form-row-grid > .form-row:first-child {
    grid-column: auto;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  line-height: 1;
  cursor: pointer;
  border: none;
  overflow: hidden;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .15s, filter .15s;
  text-decoration: none;
}
.btn-compact {
  min-height: 0;
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 8px;
}
.btn-primary,
.btn.btn-primary,
.token-box .btn-primary {
  min-height: 44px;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  color: #fff;
  box-shadow: 0 12px 30px rgba(91, 92, 246, .28);
  width: auto;
}
.auth-card .btn-primary,
.auth-card .btn.btn-primary {
  width: 100%;
}
.btn-primary-block {
  width: 100%;
}
/* ADDED: Canonical in-app primary actions — medium width, left-aligned, calmer than auth CTAs */
.btn-management,
.btn.btn-management,
input[type="submit"].btn-management,
button.btn-management {
  min-height: 38px;
  padding: 8px 18px;
  width: auto;
  align-self: flex-start;
  background: var(--accent);
  box-shadow: none;
}
.btn-management:hover,
.btn.btn-management:hover,
input[type="submit"].btn-management:hover,
button.btn-management:hover {
  filter: brightness(1.05);
  box-shadow: 0 4px 14px rgba(91, 92, 246, .16);
  text-decoration: none;
}
.btn-management:active,
.btn.btn-management:active,
input[type="submit"].btn-management:active,
button.btn-management:active {
  transform: translateY(1px);
  box-shadow: none;
}
.btn-primary:hover,
.btn.btn-primary:hover,
.token-box .btn-primary:hover {
  filter: brightness(1.04);
  box-shadow: 0 14px 34px rgba(91, 92, 246, .34);
}
.btn-primary:active,
.btn.btn-primary:active,
.token-box .btn-primary:active {
  transform: translateY(1px);
  box-shadow: 0 8px 20px rgba(91, 92, 246, .22);
}
.btn-secondary {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-secondary:hover {
  background: rgba(91, 92, 246, .06);
  border-color: rgba(91, 92, 246, .18);
  color: var(--text);
  text-decoration: none;
}
.btn-secondary:active {
  transform: translateY(1px);
  background: rgba(91, 92, 246, .1);
}
input[type="submit"].btn,
input[type="submit"].btn-primary,
input[type="submit"].btn-secondary,
button.btn,
button.btn-primary,
button.btn-secondary {
  appearance: none;
  -webkit-appearance: none;
  border-radius: var(--radius);
}
input[type="submit"].btn-primary {
  border: none;
}
input[type="submit"].btn-secondary {
  border: 1px solid var(--border);
}
.btn.btn-primary.btn-management,
input[type="submit"].btn.btn-primary.btn-management,
button.btn.btn-primary.btn-management,
a.btn.btn-primary.btn-management {
  min-height: 38px;
  padding: 8px 18px;
  width: auto;
  align-self: flex-start;
  background: var(--accent);
  box-shadow: none;
}
.btn.btn-primary.btn-management:hover,
input[type="submit"].btn.btn-primary.btn-management:hover,
button.btn.btn-primary.btn-management:hover,
a.btn.btn-primary.btn-management:hover {
  filter: brightness(1.05);
  box-shadow: 0 4px 14px rgba(91, 92, 246, .16);
}
.btn.btn-primary.btn-management:active,
input[type="submit"].btn.btn-primary.btn-management:active,
button.btn.btn-primary.btn-management:active,
a.btn.btn-primary.btn-management:active {
  transform: translateY(1px);
  box-shadow: none;
}
.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 2px;
}
.btn-link-danger {
  background: none;
  border: none;
  color: #b91c1c;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 0;
  font-family: inherit;
}
.btn-link-danger:hover { color: #991b1b; text-decoration: underline; }

.form-footer { margin-top: 20px; text-align: center; font-size: 13px; color: var(--text-muted); }
.form-footer a { color: var(--accent); }

.auth-demo-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 0;
  color: var(--text-muted);
  font-size: 12px;
}
.auth-demo-divider::before,
.auth-demo-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.btn-demo,
.auth-card .btn-demo {
  display: block;
  width: 100%;
  margin-top: 12px;
  min-height: 44px;
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  text-align: center;
}
.btn-demo:hover,
.auth-card .btn-demo:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(91, 92, 246, 0.04);
  text-decoration: none;
}

/* ── Alerts ───────────────────────────────────────────── */
.alert {
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 20px;
}
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #dc2626; }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #16a34a; }

/* ── Flash bar notifications ──────────────────────────── */
.flash-bar-stack {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
}
.flash-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  animation: flash-bar-in .2s ease;
  transition: opacity .2s ease, transform .2s ease;
}
.flash-bar-success {
  background: #f0fdf4;
  border-bottom: 1px solid #bbf7d0;
  color: #15803d;
}
.flash-bar-error {
  background: #fef2f2;
  border-bottom: 1px solid #fecaca;
  color: #b91c1c;
}
.flash-bar-dismiss {
  margin-left: auto;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  opacity: .5;
}
.flash-bar-dismiss:hover { opacity: 1; }
.toast-dismissed {
  opacity: 0;
  transform: translateY(-100%);
}
@keyframes flash-bar-in {
  from { opacity: 0; transform: translateY(-100%); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── App header (inside authenticated pages) ──────────── */
.page-header { margin-bottom: 28px; }
.page-header h1 { font-size: 28px; font-weight: 800; margin: 0 0 4px; letter-spacing: 0; }
.page-header p { color: var(--text-muted); font-size: 13px; margin: 0; }

.settings-beta-notice {
  font-size: 12.5px;
  color: var(--text-muted);
  background: rgba(91, 92, 246, 0.06);
  border: 1px solid rgba(91, 92, 246, 0.18);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 28px;
}
.dashboard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}
.profile-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  box-shadow: 0 10px 24px rgba(91,92,246,.28);
}

/* ── Dashboard ────────────────────────────────────────── */
.dashboard-page .asset-section:first-of-type {
  margin-top: 0;
}
.dashboard-page .asset-section + .asset-section {
  margin-top: 28px;
}
.dashboard-summary-card {
  padding-top: 16px;
  padding-bottom: 16px;
}
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.dashboard-stat {
  padding: 4px 0;
}
.dashboard-stat + .dashboard-stat {
  border-left: 1px solid var(--border);
  padding-left: 20px;
}
.dashboard-stat-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.dashboard-stat-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
  letter-spacing: -0.02em;
}
.dashboard-table-card {
  padding: 0;
  overflow: hidden;
}
.dashboard-table-card .table-wrap {
  margin: 0;
}
.dashboard-table-card table {
  margin: 0;
}
.dashboard-empty-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.dashboard-empty-action {
  margin-top: 4px;
}
.table-muted-cell {
  color: var(--text-muted);
}
@media (max-width: 640px) {
  /* !important overrides inline style on pipeline which sets 4 cols */
  .dashboard-stats {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }
  .dashboard-stat + .dashboard-stat {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--border);
    padding-top: 16px;
  }

  /* ── Filter bar: stack on narrow screens ─────────────── */
  .apps-filter-bar { flex-wrap: wrap; }
  .apps-filter-bar .apps-search { min-width: 100%; }
  /* !important needed because base .apps-filter-select rule is later in file */
  .apps-filter-select { flex: 1 1 auto !important; min-width: 0; width: 100% !important; }
  .apps-source-filter { display: none !important; }
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 20px 22px;
}
.stat-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.stat-value {
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  color: var(--text);
}
.dashboard-section { margin-top: 8px; }
.dashboard-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.dashboard-section-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}
.dashboard-section-header a {
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: border-color .15s, background .15s, color .15s, box-shadow .15s;
}
.filter-chip:hover {
  border-color: #c7d2fe;
  color: var(--text);
  text-decoration: none;
}
.filter-chip.active {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(91,92,246,.1), rgba(139,92,246,.06));
  color: var(--accent);
  box-shadow: 0 0 0 3px rgba(91,92,246,.12);
}
.chip-count {
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--surface-soft);
  color: var(--text-muted);
  font-size: 12px;
}
.apps-filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  align-items: center;
}
.apps-search { flex: 1; min-width: 0; }
.apps-filter-select { flex: 0 0 auto; width: auto; min-width: 130px; }
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}
.dot-draft { background: #fbbf24; }
.dot-submitted { background: var(--success); }

/* ── Table ────────────────────────────────────────────── */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--text-muted);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
td {
  padding: 13px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--surface-soft); }
.clickable-row { cursor: pointer; }
.clickable-row:focus-visible td { background: var(--surface-soft); outline: 2px solid var(--accent); outline-offset: -2px; }
.company-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}
.company-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  flex-shrink: 0;
}
/* When a real company logo is available, show the image instead of the initials gradient. */
.company-avatar-img {
  object-fit: contain;
  background: #fff;
  border: 1px solid #e5e7eb;
  padding: 5px;
  box-sizing: border-box;
}

/* Workspace detail header: larger company avatar beside the company/role title. */
.workspace-header-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}
.workspace-header-identity-text { min-width: 0; }
.workspace-header-avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  font-size: 16px;
}
.workspace-header-avatar.company-avatar-img {
  padding: 7px;
}
.company-name { display: block; font-weight: 800; text-decoration: none; }
.company-name:hover { text-decoration: none; }
.company-url { display: block; color: var(--text-muted); font-size: 12px; }
.company-meta { display: block; color: var(--text-muted); font-size: 12px; }

/* ── Tables → Cards (mobile) ─────────────────────────── */
/* Declared AFTER desktop table styles so overrides take effect */
@media (max-width: 640px) {
  .table-wrap {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
  }
  .table-wrap table { display: block; min-width: 0; background: transparent; }
  .table-wrap thead { display: none; }
  .table-wrap tbody { display: block; background: transparent; }
  .table-wrap tr {
    display: block;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 10px;
    overflow: hidden;
  }
  .table-wrap tr:last-child { margin-bottom: 0; }
  .table-wrap tr:hover td { background: transparent; }
  .table-wrap td {
    display: block;
    border-bottom: none;
    padding: 10px 14px;
    font-size: 14px;
  }
  .table-wrap td:first-child { padding-top: 14px; }
  .table-wrap td:last-child { padding-bottom: 14px; }
  .table-wrap td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted);
    margin-bottom: 3px;
  }
  .table-wrap .company-cell { padding: 4px 0 2px; }
  .table-wrap td[data-label="Answer"] { border-top: 1px solid var(--border); padding-top: 12px; }
  /* Hide empty tags containers so they don't show as blank rows */
  .fit-skill-tags:not(:has(span)) { display: none; }
}

/* ── Settings / integration panels ───────────────────── */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 32px;
}
.eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
}
.panel h1 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.subtitle {
  margin: 0 0 24px;
  font-size: 14px;
  color: var(--text-muted);
  max-width: 52ch;
}
.integration-panel {
  max-width: 520px;
}
.integration-details {
  display: grid;
  gap: 14px;
  margin-bottom: 28px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
}
.integration-detail {
  display: grid;
  gap: 4px;
}
.integration-detail-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.integration-detail-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.integration-success {
  text-align: center;
}
.integration-success .subtitle {
  margin-left: auto;
  margin-right: auto;
}
.integration-success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: #dcfce7;
  color: #15803d;
  font-size: 28px;
  font-weight: 800;
}

/* ── Settings (Profile-aligned) ───────────────────────── */
.settings-page .asset-section:first-of-type {
  margin-top: 0;
}
.settings-page .asset-section + .asset-section {
  margin-top: 28px;
}
.settings-rows {
  list-style: none;
  margin: 0;
  padding: 0;
}
.settings-row {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.settings-row:last-child {
  border-bottom: none;
}
.settings-row-inner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.settings-row-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.settings-row-icon svg {
  width: 18px;
  height: 18px;
}
.settings-row-body {
  flex: 1;
  min-width: 0;
}
.settings-row-label,
.settings-row-title {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}
.settings-row-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}
.settings-row-value {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}
.settings-row-value-muted {
  color: var(--text-muted);
  letter-spacing: 0.08em;
}
.settings-row-meta {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
}
.settings-row-meta + .settings-row-meta {
  margin-top: 6px;
}
.settings-extension-card {
  padding-top: 10px;
  padding-bottom: 10px;
}
.settings-extension-card .settings-row {
  padding: 12px 0;
}
.settings-row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}
.settings-row-actions form.button_to {
  display: inline;
  margin: 0;
}
.settings-text-action {
  display: inline;
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  line-height: 1.4;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: none;
}
.settings-text-action:hover {
  color: var(--accent);
  text-decoration: underline;
}
.settings-text-action-coming-soon {
  color: rgba(100, 116, 139, .72);
  cursor: default;
}
.settings-text-action-coming-soon:hover {
  color: rgba(100, 116, 139, .72);
  text-decoration: none;
}
.settings-row-actions input[type="submit"].settings-text-action,
.settings-row-actions button.settings-text-action {
  appearance: none;
  -webkit-appearance: none;
  min-height: 0;
  width: auto;
  box-shadow: none;
}
.settings-account-hint {
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  line-height: 1.5;
  color: rgba(100, 116, 139, .88);
}
.settings-inline-link {
  color: var(--text-muted);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.settings-inline-link:hover {
  color: var(--accent);
}

/* Account page — identity card */
.account-identity-card {
  display: flex;
  align-items: center;
  gap: 16px;
}
.account-avatar {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
}
.account-identity-body {
  flex: 1 1 auto;
  min-width: 0;
}
.account-identity-name {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.account-identity-email {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
}
.account-identity-meta {
  margin: 4px 0 0;
  font-size: 12px;
  color: rgba(100, 116, 139, .88);
}
.account-beta-badge {
  flex: 0 0 auto;
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-hover);
  background: var(--accent-tint);
}

/* Account page — subscription */
.account-plan-name {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.account-plan-points {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 13px;
  color: var(--text-muted);
}
.account-plan-points li {
  margin: 2px 0;
}
.account-plan-note {
  margin: 10px 0 0;
  font-size: 12px;
  color: rgba(100, 116, 139, .88);
}

.settings-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
}
.settings-danger-section {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid rgba(251, 146, 60, .18);
}
.settings-danger-heading {
  margin: 0 0 16px;
  font-size: 14px;
  font-weight: 700;
  color: rgba(194, 65, 12, .72);
}
.settings-danger-block {
  display: grid;
  gap: 20px;
}
.settings-danger-row {
  display: grid;
  gap: 14px;
}
.settings-danger-copy {
  max-width: 520px;
}
.settings-danger-label {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.settings-danger-meta {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 520px;
}
.settings-delete-form {
  max-width: 320px;
}
.settings-delete-fields {
  display: grid;
  gap: 10px;
  justify-items: start;
}
.settings-delete-password {
  width: 100%;
  max-width: 320px;
}
.settings-text-action-danger-strong {
  color: #c2410c;
  font-weight: 600;
}
.settings-text-action-danger-strong:hover {
  color: #9a3412;
}
.settings-breadcrumb {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.settings-breadcrumb:hover { color: var(--accent); text-decoration: none; }

/* ── Token box ────────────────────────────────────────── */
.token-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  margin-top: 32px;
}
.token-box h3 { font-size: 13px; font-weight: 600; margin: 0 0 6px; }
.token-box p { font-size: 12px; color: var(--text-muted); margin: 0 0 10px; }
.token-value {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 8px 10px;
  word-break: break-all;
  color: var(--text);
}

/* ── Status badge ─────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
}
.badge-draft { background: #fef9c3; color: #854d0e; }
.badge-applying { background: #fef9c3; color: #854d0e; }
.badge-submitted { background: #dcfce7; color: #15803d; }

/* ── Mobile header + drawer (hidden on desktop) ──────── */
.mobile-header {
  display: none;
}
.mobile-bottom-nav {
  display: none;
}
.mobile-menu-btn {
  display: none;
}
.mobile-drawer-backdrop {
  display: none;
}
.mobile-drawer {
  display: none;
}

@media (max-width: 840px) {
  /* Replace sidebar with mobile header + bottom nav */
  .mobile-header {
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: 52px;
    padding: 0 18px;
    background: radial-gradient(circle at 20% 50%, rgba(139,92,246,.32), transparent 60%), linear-gradient(90deg, var(--brand), #081026);
    box-shadow: 0 1px 0 rgba(255,255,255,.06), 0 2px 12px rgba(0,0,0,.18);
  }
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: 62px;
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--brand);
    border-top: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 -4px 20px rgba(0,0,0,.2);
  }
  .mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: rgba(255,255,255,.55);
    font-size: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: color .15s;
  }
  .mobile-nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
  }
  .mobile-nav-item.active,
  .mobile-nav-item:hover { color: #fff; text-decoration: none; }
  .mobile-nav-item.active svg { filter: drop-shadow(0 0 6px rgba(139,92,246,.7)); }

  .app-shell { display: block; }
  .sidebar { display: none; }
  .app-main { padding-top: 52px; padding-bottom: 62px; }
  .page { padding: 24px 16px 40px; }
  .dashboard-header { flex-wrap: wrap; gap: 8px; }
  .page-header h1 { font-size: 22px; }

  /* Workspace header: stack main content + corner actions vertically */
  .application-workspace .workspace-header {
    flex-direction: column;
    gap: 12px;
  }
  .application-workspace .workspace-header-corner {
    flex-direction: row;
    justify-content: flex-start;
    padding-top: 0;
  }

  /* Workspace tabs: allow horizontal scroll if tabs overflow */
  .workspace-tabs,
  .application-workspace .workspace-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
    gap: 0;
  }
  .workspace-tabs::-webkit-scrollbar,
  .application-workspace .workspace-tabs::-webkit-scrollbar { display: none; }
  .workspace-tab { white-space: nowrap; flex-shrink: 0; padding: 8px 10px; font-size: 12px; }

  /* Long email addresses must not overflow their card */
  .asset-card { overflow-wrap: break-word; word-break: break-word; }

  /* Hamburger button */
  .mobile-menu-btn {
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255,255,255,.88);
    border-radius: 8px;
    flex-shrink: 0;
  }
  .mobile-menu-btn svg { width: 22px; height: 22px; }
  .mobile-menu-btn:hover { background: rgba(255,255,255,.1); }

  /* Drawer backdrop */
  .mobile-drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 199;
    background: rgba(0,0,0,.45);
    opacity: 0;
    transition: opacity .25s;
    pointer-events: none;
  }
  .mobile-drawer-backdrop.open {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }

  /* Drawer panel */
  .mobile-drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    width: min(300px, 85vw);
    background: radial-gradient(circle at 20% 20%, rgba(139,92,246,.28), transparent 60%), linear-gradient(180deg, var(--brand), #081026);
    transform: translateX(100%);
    transition: transform .25s ease;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .mobile-drawer.open { transform: translateX(0); }

  /* Drawer header */
  .mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255,255,255,.1);
  }
  .mobile-drawer-email {
    font-size: 12px;
    color: rgba(255,255,255,.6);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
  }
  .mobile-drawer-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255,255,255,.7);
    border-radius: 6px;
    flex-shrink: 0;
  }
  .mobile-drawer-close svg { width: 18px; height: 18px; }
  .mobile-drawer-close:hover { background: rgba(255,255,255,.1); color: #fff; }

  /* Drawer nav */
  .mobile-drawer-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 12px 10px;
    gap: 2px;
    overflow-y: auto;
  }
  .mobile-drawer-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255,255,255,.8);
    text-decoration: none;
    transition: background .15s, color .15s;
  }
  .mobile-drawer-link svg { width: 18px; height: 18px; flex-shrink: 0; }
  .mobile-drawer-link:hover { background: rgba(255,255,255,.1); color: #fff; text-decoration: none; }
  .mobile-drawer-link-disabled {
    opacity: .45;
    cursor: default;
    pointer-events: none;
  }

  /* Drawer footer */
  .mobile-drawer-footer {
    padding: 12px 10px;
    border-top: 1px solid rgba(255,255,255,.1);
  }
  .mobile-drawer-footer .sign-out {
    width: 100%;
    text-align: center;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    color: rgba(255,255,255,.8);
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s;
  }
  .mobile-drawer-footer .sign-out:hover { background: rgba(255,255,255,.14); }
}

/* ── Empty state ──────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--text-muted);
}
.empty-state h2 { font-size: 16px; font-weight: 600; color: var(--text); margin: 0 0 8px; }
.empty-state p { font-size: 13px; margin: 0; }

/* ── Workspace tabs ───────────────────────────────────── */
.application-workspace .workspace-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}
.application-workspace .workspace-header-corner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-shrink: 0;
  padding-top: 28px;
}
.application-workspace .workspace-header-corner form.button_to {
  display: inline;
  margin: 0;
}
.application-workspace .workspace-header-record-action {
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  box-shadow: none !important;
  min-height: 0;
  width: auto;
}
.application-workspace .workspace-header-record-action:hover {
  color: var(--text);
  text-decoration: underline;
}
.application-workspace .workspace-header-record-action--danger {
  color: #dc2626;
}
.application-workspace .workspace-header-record-action--danger:hover {
  color: #b91c1c;
}
.application-workspace .workspace-header-main {
  min-width: 0;
}
.application-workspace .workspace-header-status-block {
  margin-top: 2px;
}
.application-workspace .workspace-header-status-primary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  --workspace-stage-pill-height: 24px;
}
.application-workspace .workspace-header-status-primary .badge {
  display: inline-flex;
  align-items: center;
  height: var(--workspace-stage-pill-height);
  padding: 0 10px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  box-sizing: border-box;
}
.application-workspace .workspace-header-status-primary .workspace-stage-chip {
  margin: 0;
}
.application-workspace .workspace-header-meta-line {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.3;
}
.application-workspace .workspace-header-lifecycle-extra {
  display: flex;
  align-items: center;
}
.application-workspace .workspace-stage-rail form.button_to {
  display: flex;
  margin: 0;
}
.application-workspace .workspace-back-link {
  display: inline-block;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 8px;
}
.application-workspace .workspace-back-link:hover {
  color: var(--accent);
  text-decoration: underline;
}
.application-workspace .workspace-header h1 {
  margin: 0 0 6px;
}
.application-workspace .workspace-header-role {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 10px;
  line-height: 1.4;
}
.application-workspace .workspace-header-status-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  line-height: 1.35;
}
.application-workspace .workspace-header-status-line .workspace-header-meta {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.3;
}
.application-workspace .workspace-header-subtitle {
  color: var(--text-muted);
  font-size: 13px;
  margin: 0;
  line-height: 1.5;
}
/* ADDED: HUN-55 — three-part stage rail (‹ action | current | action ›) */
.application-workspace .workspace-stage-rail {
  display: inline-flex;
  align-items: stretch;
  flex-shrink: 0;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  background: #fff;
  box-shadow: none;
}
.application-workspace .workspace-stage-rail__current {
  display: inline-flex;
  align-items: center;
  height: var(--workspace-stage-pill-height);
  min-height: var(--workspace-stage-pill-height);
  padding: 0 12px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: default;
  user-select: none;
  box-sizing: border-box;
  border-left: 1px solid #e5e7eb;
  border-right: 1px solid #e5e7eb;
}
/* Stage-rail centre chips use the same palette as opportunities list badges */
.application-workspace .workspace-stage-rail__current--wishlist {
  background: #e0e7ff;
  color: #3730a3;
}
.application-workspace .workspace-stage-rail__current--in-progress {
  background: #fef9c3;
  color: #854d0e;
}
.application-workspace .workspace-stage-rail__current--applied {
  background: #dbeafe;
  color: #1d4ed8;
}
.application-workspace .workspace-stage-rail__current--interviewing {
  background: #fce7f3;
  color: #9d174d;
}
.application-workspace .workspace-stage-rail__current--offer {
  background: #dcfce7;
  color: #15803d;
}
.application-workspace .workspace-stage-rail__current--rejected {
  background: #fee2e2;
  color: #b91c1c;
}
.application-workspace .workspace-stage-rail__current--withdrawn {
  background: #f3f4f6;
  color: #4b5563;
}
.application-workspace .workspace-stage-rail:not(.workspace-stage-rail--has-back) .workspace-stage-rail__current {
  border-left: none;
  border-top-left-radius: 999px;
  border-bottom-left-radius: 999px;
}
.application-workspace .workspace-stage-rail:not(.workspace-stage-rail--has-forward) .workspace-stage-rail__current {
  border-right: none;
  border-top-right-radius: 999px;
  border-bottom-right-radius: 999px;
}
.application-workspace .workspace-stage-rail__action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: var(--workspace-stage-pill-height);
  min-height: var(--workspace-stage-pill-height);
  padding: 0 12px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  border: none;
  border-radius: 0;
  box-shadow: none !important;
  background: #f9fafb;
  color: #374151;
  white-space: nowrap;
  cursor: pointer;
  box-sizing: border-box;
}
.application-workspace .workspace-stage-rail__action-label {
  line-height: 1.2;
}
.application-workspace .workspace-stage-rail__action-caret {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M4.5 3L7.5 6L4.5 9' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px 12px;
}
.application-workspace .workspace-stage-rail__action--back .workspace-stage-rail__action-caret {
  transform: rotate(180deg);
}
.application-workspace .workspace-stage-rail__action:hover {
  background: #f3f4f6;
  color: #111827;
}
.application-workspace .workspace-stage-rail__action:hover .workspace-stage-rail__action-caret {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M4.5 3L7.5 6L4.5 9' stroke='%23374151' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.application-workspace .workspace-stage-rail--has-back .workspace-stage-rail__action--back {
  border-top-left-radius: 999px;
  border-bottom-left-radius: 999px;
}
.application-workspace .workspace-stage-rail--has-forward .workspace-stage-rail__action--forward {
  border-top-right-radius: 999px;
  border-bottom-right-radius: 999px;
}
.workspace-text-action {
  display: inline;
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  line-height: 1.4;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: none;
}
.workspace-text-action:hover {
  color: var(--accent);
  text-decoration: underline;
}
.application-workspace .workspace-header-actions input[type="submit"].workspace-text-action,
.application-workspace .workspace-header-actions button.workspace-text-action {
  appearance: none;
  -webkit-appearance: none;
  min-height: 0;
  width: auto;
  box-shadow: none;
}
.workspace-text-action-danger {
  color: rgba(194, 65, 12, .82);
  font-weight: 600;
}
.workspace-text-action-danger:hover {
  color: #9a3412;
}
.application-workspace .workspace-tabs {
  margin-bottom: 24px;
}
.application-workspace .workspace-panels .asset-section:first-of-type {
  margin-top: 0;
}
.application-workspace .form-panel {
  padding: 14px;
  margin-bottom: 12px;
}
.application-workspace .workspace-form {
  gap: 12px;
}
.application-workspace .activity-compose {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.asset-section-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.asset-section-toolbar .asset-section-heading {
  margin: 0;
}
.asset-section-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.asset-section-action-sep {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1;
  user-select: none;
}
.asset-card-subheading {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}
.overview-detail-list {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
}
.overview-next-action {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}
.journey-step-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.next-steps-checklist { list-style: disc; margin: 0 0 12px; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-muted); }
.journey-step { display: flex; align-items: baseline; gap: 12px; font-size: 13px; }
.journey-step-label { color: var(--text-muted); white-space: nowrap; min-width: 120px; flex-shrink: 0; }
.journey-step-value { color: var(--text); }
.journey-step-link { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.journey-step-link:hover { color: var(--accent); }
.asset-card-subheading--spaced { margin-top: 16px; }
.identity-surface-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.identity-surface { display: flex; align-items: baseline; gap: 12px; font-size: 13px; padding: 4px 0; }
.identity-surface--primary { font-weight: 600; }
.identity-surface-kind { color: var(--text-muted); white-space: nowrap; min-width: 100px; flex-shrink: 0; }
.identity-surface--primary .identity-surface-kind { color: var(--text); }
.identity-surface-detail { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.identity-surface-title { color: var(--text); }
.identity-surface-link { font-size: 12px; color: var(--text-muted); text-decoration: none; white-space: nowrap; }
.identity-surface-link:hover { color: var(--accent); text-decoration: underline; }
.workspace-back-link { font-size: 13px; color: var(--text-muted); text-decoration: none; }
.workspace-header-role { color: var(--text-muted); font-size: 14px; margin: 0 0 10px; }
.workspace-header-status-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; line-height: 1.35; }
.workspace-header-status-line .workspace-header-meta { color: var(--text-muted); font-size: 12px; line-height: 1.3; }
.workspace-header-subtitle { color: var(--text-muted); font-size: 13px; margin: 8px 0 0; }
.workspace-header-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; }
.workspace-tabs { display: flex; gap: 4px; margin-bottom: 20px; border-bottom: 1px solid var(--border); padding-bottom: 0; }
.workspace-tab {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  margin-bottom: -1px;
  transition: color .15s, border-color .15s;
}
.workspace-tab:hover {
  text-decoration: none;
  color: var(--text);
}
.workspace-tab-active {
  color: var(--text);
  border-bottom-color: var(--accent);
}
.workspace-tab-active:hover {
  color: var(--text);
}
.overview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.journey-preview-list, .activity-preview-list, .activity-feed { list-style: none; padding: 0; margin: 0; }
.journey-preview-list li, .activity-preview-list li { font-size: 13px; padding: 4px 0; }
.activity-feed-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.activity-feed-item time { color: var(--text-muted); min-width: 90px; }
.activity-empty { font-size: 13px; color: var(--text-muted); margin: 0; }
.activity-compose {
  margin-top: 16px;
}
.journey-timeline, .timeline-feed { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.asset-card .journey-timeline { gap: 0; }
.asset-card .journey-timeline .journey-stage-card {
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 10px 0;
}
.asset-card .journey-timeline .journey-stage-card:first-child { padding-top: 0; }
.asset-card .journey-timeline .journey-stage-card:last-child { border-bottom: none; padding-bottom: 0; }
.timeline-item--primary { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.timeline-item--primary .timeline-item-body { display: flex; flex-direction: column; gap: 2px; }
.timeline-item--primary .timeline-item-title { font-size: 13px; font-weight: 600; color: var(--text); }
.timeline-item--primary .timeline-item-title--link { font-size: 13px; font-weight: 600; color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.timeline-item--primary .timeline-item-title--link:hover { color: var(--accent); }
.timeline-item--primary .timeline-item-time { font-size: 12px; color: var(--text-muted); }
.timeline-item--muted { color: var(--text-muted); }
.timeline-icon { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: var(--surface-soft); border: 1px solid var(--border); flex-shrink: 0; margin-top: 1px; font-size: 10px; }
.answers-preview { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-direction: column; gap: 8px; }
.answers-preview-item { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.answer-question { color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.03em; }
.answer-text { color: var(--text-primary); }
.journey-stage-card {
  padding: 10px 14px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.journey-stage-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.journey-stage-main {
  flex: 1 1 160px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.journey-stage-name { font-size: 14px; }
.journey-stage-notes {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.journey-stage-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.journey-stage-date { color: var(--text-muted); font-size: 12px; white-space: nowrap; }
.prepared-answer-details { margin-top: 2px; }
.prepared-answer-summary {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}
.prepared-answer-summary::-webkit-details-marker { display: none; }
.prepared-answer-summary::marker { display: none; }
.prepared-answer-summary::before {
  content: "";
  display: inline-block;
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M4.5 3L7.5 6L4.5 9' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px 12px;
  transition: transform 0.15s ease;
}
.prepared-answer-details[open] .prepared-answer-summary::before {
  transform: rotate(90deg);
}
.prepared-answer-body {
  margin: 6px 0 0 16px;
  font-size: 13px;
  color: var(--text);
  white-space: pre-wrap;
}
.btn-icon-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-height: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: #b91c1c;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .15s;
}
.btn-icon-danger:hover {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}
.btn-icon-danger:active { transform: translateY(1px); }
.btn-icon-danger svg {
  width: 16px;
  height: 16px;
}
.journey-outcome-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.journey-outcome-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin: 0;
}
.workspace-section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.workspace-section-header h3 { margin: 0; }

/* ── Pipeline Board ───────────────────────────────────── */
.pipeline-page { max-width: unset; }


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

.pipeline-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 100px;
}

.pipeline-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.pipeline-col-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.pipeline-col-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg);
  border-radius: 20px;
  padding: 1px 7px;
}

.pipeline-col-empty {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  padding: 20px 0;
  margin: 0;
}

.pipeline-card {
  display: block;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.pipeline-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  text-decoration: none;
}

.pipeline-card-header {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 8px;
}

.pipeline-card-avatar {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.pipeline-card-title {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.pipeline-card-company {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pipeline-card-role {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pipeline-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.pipeline-card-stale {
  font-size: 10px;
  font-weight: 600;
  color: var(--warning, #b45309);
  background: var(--warning-bg, #fef3c7);
  border-radius: 4px;
  padding: 1px 5px;
}

.pipeline-card-time {
  font-size: 10px;
  color: var(--text-muted);
  margin-left: auto;
}

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

  .pipeline-col { width: 100%; }
}

.badge-wishlist { background: #e0e7ff; color: #3730a3; }
.badge-draft { background: #fef9c3; color: #854d0e; }
.badge-applying { background: #fef9c3; color: #854d0e; }
.badge-applied { background: #dbeafe; color: #1d4ed8; }
.badge-interviewing { background: #fce7f3; color: #9d174d; }
.badge-offer { background: #dcfce7; color: #15803d; }
.badge-rejected { background: #fee2e2; color: #b91c1c; }
.badge-withdrawn { background: #f3f4f6; color: #4b5563; }

@media (max-width: 840px) {
  .overview-grid { grid-template-columns: 1fr; }
}

/* ── Assets tab cards ─────────────────────────────────── */
.asset-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 16px;
}
.asset-card-title { font-size: 13px; font-weight: 600; margin: 0 0 10px; }
.asset-card-meta { font-size: 13px; margin: 0 0 10px; color: var(--text); }
.asset-card-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .15s;
}
.btn-icon:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: var(--text);
}
.btn-icon:active { transform: translateY(1px); }
.btn-icon svg {
  width: 16px;
  height: 16px;
}
.asset-section + .asset-section { margin-top: 28px; }
.asset-section-heading { font-size: 14px; font-weight: 700; margin: 0 0 12px; }
.asset-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px 16px;
  margin: 0 0 12px;
  font-size: 13px;
}
.asset-meta-grid dt { font-weight: 600; color: var(--text-muted); margin: 0 0 2px; }
.asset-meta-grid dd { margin: 0; }
.asset-posting-link { font-size: 13px; margin: 0; }
.asset-posting-link a { font-weight: 600; }
.asset-intro { font-size: 13px; line-height: 1.5; margin: 0; color: var(--text); }
.asset-jd-content {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
}
.asset-jd-content > :first-child { margin-top: 0; }
.asset-jd-content > :last-child { margin-bottom: 0; }
.asset-jd-content h1,
.asset-jd-content h2,
.asset-jd-content h3,
.asset-jd-content h4 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  margin: 0 0 8px;
}
.asset-jd-content h1 { font-size: 20px; }
.asset-jd-content h2 { font-size: 16px; }
.asset-jd-content h3 { font-size: 14px; }
.asset-jd-content h4 { font-size: 13px; }
.asset-jd-content p {
  margin: 0 0 10px;
}
.asset-jd-content p:last-child { margin-bottom: 0; }
.asset-jd-content ul,
.asset-jd-content ol {
  margin: 0 0 10px;
  padding-left: 1.25rem;
}
.asset-jd-content li + li { margin-top: 4px; }
.asset-jd-content a {
  color: var(--accent);
  font-weight: 600;
}
.asset-jd-preview {
  max-height: 280px;
  overflow: hidden;
}
.asset-bullet-list {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.5;
}
.asset-bullet-list li + li { margin-top: 4px; }
.asset-empty-state,
.asset-section-unavailable {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}
.asset-details {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  background: var(--surface);
}
.asset-details summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  list-style: none;
}
.asset-details summary::-webkit-details-marker { display: none; }
.asset-details-body {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.5;
  max-height: 480px;
  overflow: auto;
}
.asset-plain-text {
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 13px;
  margin: 0;
}

/* ADDED: Candidate profile page (v0.13) — reuses asset-section / asset-card hierarchy */
.profile-page .asset-section:first-of-type {
  margin-top: 0;
}
.profile-page .profile-form + .asset-section {
  margin-top: 28px;
}
.profile-form .asset-card {
  margin-bottom: 0;
}
.profile-save-row {
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.form-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}
.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;
}
.resume-library-card {
  padding-top: 12px;
  padding-bottom: 12px;
}
.resume-library-empty {
  margin: 0 0 12px;
}
.resume-library-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.resume-library-row {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.resume-library-row:last-child {
  border-bottom: none;
}
.resume-library-row-inner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.resume-library-row-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.resume-library-row-icon svg {
  width: 18px;
  height: 18px;
}
.resume-library-add-icon {
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
  color: var(--accent);
  background: rgba(91, 92, 246, .06);
  border-color: rgba(91, 92, 246, .14);
}
.resume-library-row-body {
  flex: 1;
  min-width: 0;
}
.resume-library-row-body .resume-row-actions {
  margin-top: 10px;
}
.resume-library-add-row {
  padding-top: 14px;
}
.resume-library-add-action {
  font-size: 14px;
}
.resume-library-row-main {
  margin-bottom: 10px;
}
.resume-library-row-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.resume-library-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}
.resume-library-badge {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(100, 116, 139, .08);
  color: var(--text-muted);
  border: 1px solid rgba(100, 116, 139, .12);
}
.resume-library-meta {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
}
.resume-filename-meta {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}
.resume-row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.resume-inline-form,
.resume-upload-form-inline {
  display: inline;
  margin: 0;
}
.resume-row-actions form.button_to {
  display: inline;
  margin: 0;
}
.resume-text-action {
  display: inline;
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  line-height: 1.4;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: none;
}
.resume-text-action:hover {
  color: var(--accent);
  text-decoration: underline;
}
.resume-row-actions input[type="submit"].resume-text-action,
.resume-row-actions button.resume-text-action {
  appearance: none;
  -webkit-appearance: none;
  min-height: 0;
  width: auto;
  box-shadow: none;
}
.resume-text-action-strong {
  color: var(--text);
  font-weight: 600;
}
.resume-text-action-state {
  color: var(--text);
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(100, 116, 139, .08);
  border: 1px solid rgba(100, 116, 139, .14);
}
.resume-text-action-state:hover {
  color: var(--text);
  background: rgba(91, 92, 246, .08);
  border-color: rgba(91, 92, 246, .16);
  text-decoration: none;
}
.resume-row-actions button.resume-text-action-state,
.resume-row-actions input[type="submit"].resume-text-action-state {
  padding: 2px 8px;
}
.resume-text-action-danger {
  color: rgba(148, 163, 184, .75);
  font-weight: 400;
}
.resume-text-action-danger:hover {
  color: #c2410c;
  text-decoration: underline;
}
.resume-action-sep {
  color: #cbd5e1;
  font-size: 13px;
  user-select: none;
}
.resume-rename-form {
  margin-top: 4px;
}
.resume-rename-form .form-group {
  margin-bottom: 10px;
}

/* ── Fit Analysis ──────────────────────────────────────────────────── */

.asset-section:has(.fit-analysis-card) .asset-section-heading {
  margin-bottom: 6px;
}

.fit-analysis-card {
  padding: 12px 16px;
  margin-bottom: 0;
}
.fit-analysis-card .asset-card-subheading {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.fit-score-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.fit-score-circle {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-tint);
  display: flex;
  align-items: center;
  justify-content: center;
}

.fit-score-value  { font-size: 16px; font-weight: 700; color: var(--accent); line-height: 1; }
.fit-score-meta   { flex: 1; min-width: 0; }
.fit-score-label  { font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.3; }

/* Score tier colours */
.fit-score-circle.fit-excellent { background: #dcfce7; }
.fit-score-value.fit-excellent  { color: #16a34a; }
.fit-score-circle.fit-strong    { background: #dbeafe; }
.fit-score-value.fit-strong     { color: #1d4ed8; }
.fit-score-circle.fit-good      { background: #ede9fe; }
.fit-score-value.fit-good       { color: #7c3aed; }
.fit-score-circle.fit-moderate  { background: #fef3c7; }
.fit-score-value.fit-moderate   { color: #d97706; }
.fit-score-circle.fit-weak      { background: #fee2e2; }
.fit-score-value.fit-weak       { color: #dc2626; }
.fit-score-resume { font-size: 12px; color: var(--text-muted); margin-top: 1px; line-height: 1.3; }
.fit-score-hint   { font-size: 11px; color: var(--text-muted); margin-top: 2px; line-height: 1.35; }

.fit-keyword-bar { margin-bottom: 10px; }
.fit-keyword-bar-label { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; line-height: 1.3; }
.fit-progress-track {
  height: 8px;
  background: var(--surface-soft);
  border-radius: 4px;
  overflow: hidden;
}
.fit-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
}

.fit-skills-section  { margin-bottom: 8px; }
.fit-skills-section:last-child { margin-bottom: 0; }
.fit-skill-tags      { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.fit-skill-tag       { font-size: 11px; padding: 2px 8px; border-radius: 12px; font-weight: 500; line-height: 1.4; }
.fit-skill-match     { background: #dcfce7; color: #15803d; }
.fit-skill-gap       { background: var(--surface-soft); color: var(--text-muted); }
.fit-skill-more      { font-size: 12px; color: var(--text-muted); padding: 3px 0; align-self: center; }

.fit-comparison      { margin-bottom: 8px; }
.fit-comparison-row  {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(48px, 1.4fr);
  gap: 4px 6px;
  align-items: center;
  padding: 3px 0;
  font-size: 12px;
  line-height: 1.2;
}
.fit-comparison-name  {
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fit-comparison-score {
  color: #8b8cf8;
  font-weight: 600;
  font-size: 12px;
  flex-shrink: 0;
  min-width: 2.5em;
  text-align: right;
}
.fit-comparison-row--recommended .fit-comparison-score {
  color: var(--accent);
  font-weight: 700;
}
.fit-comparison-bar {
  height: 5px;
  background: #ede9fe;
  border-radius: 2px;
  overflow: hidden;
  min-width: 0;
}
.fit-comparison-bar-fill {
  height: 100%;
  background: #c4b5fd;
  border-radius: 2px;
}
.fit-comparison-row--recommended .fit-comparison-bar-fill {
  background: var(--accent);
}

.fit-analysis-meta { font-size: 11px; color: var(--text-muted); margin-top: 8px; margin-bottom: 0; line-height: 1.3; }

/* ── Career Insights ───────────────────────────────────────────────── */

.career-insight-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}
.career-insight-row:last-child    { border-bottom: none; }
.career-insight-keyword           { font-size: 14px; font-weight: 500; color: var(--text); }
.career-insight-count             { font-size: 13px; color: var(--text-muted); }

/* ── Admin Layout ─────────────────────────────────────────────────── */
.admin-layout    { background: #f8fafc; min-height: 100vh; }
.admin-header    { background: #1e293b; color: #fff; padding: 0 24px;
                   display: flex; align-items: center; gap: 24px; height: 52px; }
.admin-header-brand { font-size: 15px; font-weight: 700; color: #fff; flex-shrink: 0; }
.admin-nav       { display: flex; gap: 4px; flex: 1; }
.admin-nav-link  { color: rgba(255,255,255,0.7); font-size: 13px; padding: 6px 12px;
                   border-radius: 6px; text-decoration: none; }
.admin-nav-link:hover { color: #fff; background: rgba(255,255,255,0.1); text-decoration: none; }
.admin-nav-badge { display: inline-block; background: #ef4444; color: #fff; font-size: 10px;
                   font-weight: 700; border-radius: 10px; padding: 1px 6px; margin-left: 4px;
                   vertical-align: middle; line-height: 1.4; }
.admin-header-user { font-size: 12px; color: rgba(255,255,255,0.5); }
.admin-main      { padding: 32px 24px; max-width: 1100px; margin: 0 auto; }
.admin-page h1   { font-size: 22px; font-weight: 700; margin-bottom: 24px; color: #1e293b; }
.admin-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.admin-stat-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
                   padding: 20px; text-align: center; }
.admin-stat-card-highlight { border-color: var(--accent, #5B5CF6); }
.admin-stat-value { font-size: 28px; font-weight: 700; color: #1e293b; }
.admin-stat-label { font-size: 12px; color: #64748b; margin-top: 4px;
                    text-transform: uppercase; letter-spacing: 0.05em; }
.admin-table     { width: 100%; border-collapse: collapse; }
.admin-table th  { text-align: left; font-size: 12px; text-transform: uppercase;
                   letter-spacing: 0.05em; color: #64748b; padding: 8px 12px;
                   border-bottom: 2px solid #e2e8f0; }
.admin-table td  { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; font-size: 14px; }
.admin-table tr:hover td { background: #f8fafc; }
.admin-card      { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
                   padding: 24px; margin-bottom: 24px; }
.admin-card h2   { font-size: 16px; font-weight: 600; margin-bottom: 16px; }
.admin-badge     { display: inline-block; font-size: 11px; padding: 2px 8px;
                   border-radius: 10px; font-weight: 500; }
.admin-badge-pending  { background: #fef9c3; color: #854d0e; }
.admin-badge-approved { background: #dcfce7; color: #15803d; }
.admin-badge-ignored  { background: #f3f4f6; color: #6b7280; }
/* Feedback Centre statuses (HUN-122) */
.feedback-badge-new         { background: #dbeafe; color: #1d4ed8; }
.feedback-badge-triaged     { background: #ede9fe; color: #6d28d9; }
.feedback-badge-in-progress { background: #fef9c3; color: #854d0e; }
.feedback-badge-resolved    { background: #dcfce7; color: #15803d; }
.feedback-badge-closed      { background: #f3f4f6; color: #6b7280; }
.admin-filter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.admin-btn       { font-size: 13px; padding: 6px 14px; border-radius: 6px; border: none;
                   cursor: pointer; font-weight: 500; }
.admin-btn-approve { background: #dcfce7; color: #15803d; }
.admin-btn-approve:hover { background: #bbf7d0; }
.admin-btn-ignore  { background: #f3f4f6; color: #6b7280; }
.admin-btn-ignore:hover { background: #e5e7eb; }
.admin-flash     { padding: 10px 16px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; }
.admin-flash-notice { background: #dcfce7; color: #15803d; }
.admin-flash-alert  { background: #fee2e2; color: #b91c1c; }
.admin-subtitle   { color: #64748b; font-size: 14px; margin-bottom: 24px; }
.admin-confidence { font-size: 11px; color: #94a3b8; margin-left: 4px; }
.admin-unclassified { font-size: 12px; color: #cbd5e1; }
.admin-empty      { font-size: 14px; color: #94a3b8; }
.admin-log-row    { display: flex; align-items: center; gap: 10px; padding: 4px 0;
                    border-bottom: 1px solid #f1f5f9; font-size: 13px; }
.admin-log-meta   { color: #94a3b8; font-size: 12px; }

/* Interview Prep */
.interview-prep-section { margin-top: 8px; }
.interview-prep-section + .interview-prep-section { margin-top: 32px; }
.workspace-tab-soon { cursor: default; display: inline-flex; align-items: center; gap: 6px; }
.tab-badge-soon { font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 7px; border-radius: 99px; background: var(--border); color: var(--text-muted); }
.interview-question-cell { max-width: 480px; word-break: break-word; }
.occurrence-count { font-weight: 400; color: var(--text-muted); }
.autosave-status { font-size: 12px; color: var(--text-muted); margin: 6px 0 0; min-height: 16px; }
.notes-textarea { font-family: inherit; resize: vertical; }
.form-hint { font-size: 12px; color: var(--text-muted); margin: 4px 0 0; }

/* Tag pill input */
.tag-input-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  min-height: 42px;
  cursor: text;
}
.tag-input-container:focus-within { border-color: var(--accent); }
.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f3f4f6;
  color: #374151;
  border-radius: 20px;
  padding: 2px 10px 2px 10px;
  font-size: 13px;
  font-weight: 500;
}
.tag-pill-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  font-size: 16px;
  line-height: 1;
  padding: 0 0 0 2px;
}
.tag-pill-remove:hover { color: #374151; }

.tag-suggestions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}
.tag-suggestions-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  flex-shrink: 0;
}
.tag-suggestion-pill {
  display: inline-flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
}
.tag-suggestion-pill:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.tag-input-container .tag-input-field {
  border: none !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 13px;
  min-width: 120px;
  flex: 1;
  width: auto !important;
  display: inline !important;
  padding: 0 !important;
}
.tag-input-container .tag-input-field:focus {
  border: none !important;
  box-shadow: none !important;
}

/* ── Application tab two-column layout ─────────────────────────────── */

.application-tab-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 0 32px;
  align-items: start;
}

.application-tab-main > .asset-section:first-child {
  margin-top: 0;
}

.application-tab-sidebar {
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 180px);
  overflow-y: auto;
  padding-right: 2px;
}

.application-tab-sidebar .asset-section-heading {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 12px;
}

.answers-list {
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}

.answer-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.answer-row:first-child {
  padding-top: 0;
}

.answer-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.answer-question {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 3px;
}

.answer-value {
  font-size: 13px;
  color: var(--text);
  white-space: pre-wrap;
  line-height: 1.45;
}

@media (max-width: 900px) {
  .application-tab-layout {
    grid-template-columns: 1fr;
  }
  .application-tab-sidebar {
    position: static;
    max-height: none;
  }
}

/* HUN-117: Prepare tab — prompt assembly */
.prepare-task-group { border: 0; padding: 0; margin: 0 0 16px; }
/* Radios inherit the .workspace-form full-width text-input treatment
   (display:block, width:100%, border) — undo it so they sit inline with labels. */
.workspace-form label.prepare-task-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  margin-bottom: 0;
  font-weight: 400;
  cursor: pointer;
}
.workspace-form .prepare-task-option input[type="radio"] {
  display: inline-block;
  width: 16px;
  height: 16px;
  flex: none;
  margin: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
  accent-color: var(--accent);
}
.prepare-warning { color: var(--warning-text, #92600a); }
.prepare-warnings { list-style: none; margin: 0 0 0.75rem; padding: 0; }
.prepare-prompt-card { display: flex; flex-direction: column; gap: 0.75rem; align-items: flex-start; }
.prepare-prompt-output {
  width: 100%;
  max-height: 420px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8125rem;
  line-height: 1.5;
  background: var(--surface-sunken, #f6f7f9);
  border: 1px solid var(--border-color, #e2e5ea);
  border-radius: 8px;
  padding: 1rem;
  margin: 0;
}

/* ── Feedback report modal (HUN-122) ─────────────────────────────────────── */
.sidebar-feedback-trigger {
  display: block; width: 100%; margin-bottom: 8px; padding: 6px 10px;
  font-size: 13px; font-weight: 500; font-family: inherit; text-align: left;
  color: var(--text-muted, #64748b); background: none;
  border: 1px solid var(--border, #e2e8f0); border-radius: 8px; cursor: pointer;
}
.sidebar-feedback-trigger:hover { color: var(--text, #0D132B); background: var(--bg, #f3f4f6); }

.feedback-dialog {
  width: min(480px, calc(100vw - 32px));
  border: none; border-radius: 12px; padding: 24px;
  box-shadow: var(--shadow-lg, 0 18px 48px rgba(13,19,43,.12));
  font-family: var(--font-sans, inherit); color: var(--text, #0D132B);
}
.feedback-dialog::backdrop { background: rgba(13, 19, 43, 0.45); }
.feedback-dialog-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.feedback-dialog-header h2 { font-size: 17px; font-weight: 600; margin: 0; }
.feedback-dialog-close {
  border: none; background: none; font-size: 22px; line-height: 1;
  color: var(--text-muted, #64748b); cursor: pointer; padding: 0;
}
.feedback-dialog-field { margin-bottom: 14px; border: none; padding: 0; }
.feedback-dialog-field legend, .feedback-dialog-field > label {
  display: block; font-size: 12px; font-weight: 600; color: #475569; margin-bottom: 6px;
}
.feedback-dialog-field fieldset label,
fieldset.feedback-dialog-field label {
  display: flex; align-items: center; gap: 8px; font-size: 14px;
  font-weight: 400; color: var(--text, #0D132B); margin-bottom: 4px; cursor: pointer;
}
.feedback-dialog-field textarea {
  width: 100%; box-sizing: border-box; font-family: inherit; font-size: 14px;
  padding: 8px 10px; border: 1px solid var(--border, #e2e8f0); border-radius: 8px; resize: vertical;
}
.feedback-dialog-field textarea:focus { outline: none; border-color: var(--accent, #5B5CF6); }
.feedback-dialog-checkbox { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.feedback-dialog-note { font-size: 13px; color: var(--text-muted, #64748b); margin: 0 0 14px; }
.feedback-dialog-attach {
  border: none; background: none; padding: 0; font-family: inherit;
  font-size: 13px; font-weight: 500; color: var(--accent, #5B5CF6); cursor: pointer;
}
.feedback-dialog-hint { font-size: 12px; color: #94a3b8; margin-left: 8px; }
.feedback-dialog-chip {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px;
  background: var(--bg, #f3f4f6); border-radius: 8px; padding: 6px 10px; max-width: 100%;
}
.feedback-dialog-chip button { border: none; background: none; cursor: pointer; color: var(--text-muted, #64748b); padding: 0; }
.feedback-dialog-error {
  font-size: 13px; color: #b91c1c; background: #fee2e2; border-radius: 8px;
  padding: 8px 12px; margin: 0 0 14px;
}
.feedback-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.feedback-dialog-cancel {
  font-family: inherit; font-size: 14px; font-weight: 500; padding: 8px 16px;
  border: none; border-radius: 8px; background: var(--bg, #f3f4f6);
  color: var(--text-muted, #64748b); cursor: pointer;
}
.feedback-dialog-submit {
  font-family: inherit; font-size: 14px; font-weight: 500; padding: 8px 16px;
  border: none; border-radius: 8px; background: var(--accent, #5B5CF6); color: #fff; cursor: pointer;
}
.feedback-dialog-submit:disabled { opacity: 0.6; cursor: default; }
.feedback-dialog-success { text-align: center; padding: 12px 0; }
.feedback-dialog-success h2 { font-size: 17px; margin: 0 0 6px; }
.feedback-dialog-success p { color: var(--text-muted, #64748b); font-size: 14px; margin: 0 0 16px; }
.feedback-dialog-reference { margin-bottom: 18px; }
.feedback-dialog-reference-label {
  display: block; font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase;
  color: #94a3b8; margin-bottom: 2px;
}
.feedback-dialog-reference-id { font-size: 20px; font-weight: 700; }
.settings-feedback-row { margin-top: 24px; }
.settings-feedback-row p { font-size: 14px; color: var(--text-muted, #64748b); margin: 0 0 8px; }
.settings-feedback-trigger { width: auto; display: inline-block; }
.autosave-report-link { border: none; background: none; padding: 0; font-family: inherit;
  font-size: inherit; color: var(--accent, #5B5CF6); text-decoration: underline; cursor: pointer; }
.feedback-dialog-chip[hidden] { display: none; }
