/*
 * HuntrIQ — global styles
 */

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

:root {
  --brand: #0D132B;
  --brand-light: #131B42;
  --accent: #5B5CF6;
  --accent-hover: #4c4def;
  --accent-soft: #8B5CF6;
  --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);
}

/* ── 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-pro-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.88);
  font-size: 13px;
  font-weight: 600;
}
.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; }

/* ── 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"]),
.form-row select,
.form-row textarea,
.workspace-form input:not([type="submit"]):not([type="button"]):not([type="hidden"]),
.workspace-form select,
.workspace-form textarea,
.journey-stage-controls select,
.auth-card input:not([type="submit"]):not([type="button"]):not([type="hidden"]),
.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); }

/* ── 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; }
.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) {
  .dashboard-stats {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .dashboard-stat + .dashboard-stat {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--border);
    padding-top: 16px;
  }
}
.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;
}
.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; }

/* ── 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);
}
.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-submitted { background: #dcfce7; color: #15803d; }

@media (max-width: 840px) {
  .app-shell { display: block; }
  .sidebar {
    position: relative;
    height: auto;
    padding: 18px;
    gap: 18px;
  }
  .sidebar-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sidebar-card { display: none; }
  .page { padding: 28px 18px 48px; }
  .dashboard-header { align-items: center; }
  .table-wrap { overflow-x: auto; }
  table { min-width: 760px; }
}

/* ── 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: 24px;
  margin-bottom: 28px;
}
.application-workspace .workspace-header-main {
  min-width: 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;
}
.application-workspace .workspace-header-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  flex-shrink: 0;
  padding-top: 24px;
}
.application-workspace .workspace-header-actions form.button_to {
  display: inline;
  margin: 0;
}
.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-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;
}
.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; }
.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; }
.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-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 ──────────────────────────────────────────────────── */

.fit-score-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

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

.fit-score-value  { font-size: 18px; font-weight: 700; color: var(--accent); }
.fit-score-meta   { flex: 1; }
.fit-score-label  { font-size: 15px; font-weight: 600; color: var(--text); }

/* 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: 13px; color: var(--text-muted); margin-top: 2px; }
.fit-score-hint   { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.fit-keyword-bar { margin-bottom: 16px; }
.fit-keyword-bar-label { font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
.fit-progress-track {
  height: 6px;
  background: var(--surface-soft);
  border-radius: 3px;
  overflow: hidden;
}
.fit-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
}

.fit-skills-section  { margin-bottom: 14px; }
.fit-skill-tags      { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.fit-skill-tag       { font-size: 12px; padding: 3px 10px; border-radius: 12px; font-weight: 500; }
.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: 14px; }
.fit-comparison-row  {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.fit-comparison-row:last-child { border-bottom: none; }
.fit-comparison-name  { color: var(--text); flex-shrink: 0; }
.fit-comparison-dots  { flex: 1; border-bottom: 1px dotted var(--border); margin-bottom: 2px; }
.fit-comparison-score { color: var(--text-muted); font-weight: 600; flex-shrink: 0; }

.fit-analysis-meta { font-size: 12px; color: var(--text-muted); margin-top: 12px; }

/* ── 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; }
.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; }
