@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ─────────────────────────────────────────
   Amboit app shell — dark dashboard
   ───────────────────────────────────────── */

:root {
  --app-bg: #030303;
  --app-surface: rgba(255, 255, 255, 0.03);
  --app-surface-2: rgba(255, 255, 255, 0.05);
  --app-border: rgba(255, 255, 255, 0.08);
  --app-border-strong: rgba(255, 255, 255, 0.14);
  --app-text: #fafafa;
  --app-muted: rgba(255, 255, 255, 0.55);
  --app-dim: rgba(255, 255, 255, 0.38);
  --app-accent: #ffffff;
  --app-good: #34d399;
  --app-warn: #fbbf24;
  --app-bad: #f87171;
  --app-code-bg: #0a0a0a;
  --app-radius: 14px;
  --app-radius-sm: 10px;
  --app-max: 1180px;
}

* { box-sizing: border-box; }

/* Scroll works; scrollbars hidden everywhere */
html,
body,
* {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

*::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
  background: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--app-bg);
  color: var(--app-text);
  -webkit-font-smoothing: antialiased;
}

body:has(#landingPage:not(.hidden)) {
  background: #030303;
}

body.app-mode {
  height: 100vh;
  overflow: hidden;
}

.hidden { display: none !important; }

.app-boot-loader {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  align-items: center;
  justify-content: center;
  background: var(--app-bg);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
}

.app-boot-loader-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 28px 32px;
  border-radius: 18px;
  border: 1px solid var(--app-border);
  background: rgba(8, 8, 8, 0.92);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  min-width: 220px;
}

.app-boot-mark-wrap {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 14px;
  border-radius: 14px;
  border: 1px solid var(--app-border);
  background: rgba(255, 255, 255, 0.03);
  animation: boot-mark-pulse 1.8s ease-in-out infinite;
}

.app-boot-mark {
  display: block;
}

.app-boot-brand {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.app-boot-tag {
  margin: 4px 0 18px;
  font-size: 12px;
  color: var(--app-muted);
}

.app-boot-progress {
  width: 120px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.app-boot-progress span {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.2), #fff, rgba(255, 255, 255, 0.2));
  animation: boot-progress 1.1s ease-in-out infinite;
}

@keyframes boot-mark-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.04); opacity: 0.88; }
}

@keyframes boot-progress {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}

/* App shell */
.app-shell {
  min-height: 100vh;
  position: relative;
  background: var(--app-bg);
}

.app-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, black 0%, transparent 72%);
}

.app-shell > header,
.app-shell > main {
  position: relative;
  z-index: 1;
}

/* Header */
#appHeader {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: rgba(3, 3, 3, 0.82);
  border-bottom: 1px solid var(--app-border);
}

.app-header-inner {
  max-width: var(--app-max);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.app-header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.app-logo {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--app-border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.app-mark {
  display: block;
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.app-brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.app-brand-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.app-brand-tag {
  font-size: 12px;
  color: var(--app-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  position: relative;
}

.account-menu-wrap {
  position: relative;
}

.user-badge-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 320px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--app-border-strong);
  color: var(--app-text);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.user-badge-btn:hover,
.user-badge-btn[aria-expanded="true"] {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.09);
}

#userBadge {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}

.user-badge-chevron {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid rgba(255, 255, 255, 0.55);
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.55);
  transform: rotate(45deg) translateY(-2px);
  flex-shrink: 0;
  transition: transform 0.15s;
}

.user-badge-btn[aria-expanded="true"] .user-badge-chevron {
  transform: rotate(-135deg) translateY(2px);
}

.account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 50;
  width: min(320px, calc(100vw - 32px));
  padding: 14px 16px 16px;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-sm);
  background: rgba(12, 12, 14, 0.98);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.account-menu.hidden {
  display: none;
}

.account-menu-title {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
}

.account-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.account-field > span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--app-muted);
}

.account-field input {
  width: 100%;
}

.account-menu-hint {
  margin: 0 0 12px;
  font-size: 12px;
}

.account-menu-hint a,
.gmail-legal-hint a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.gmail-legal-hint {
  margin: 8px 0 0;
  font-size: 12px;
}

.account-menu-actions {
  display: flex;
  justify-content: flex-end;
}

.account-menu #saveSettingsBtn {
  background: var(--app-accent);
  color: #000;
  border: 0;
}

.account-sharing {
  margin: 0 0 12px;
  padding: 12px 0;
  border-top: 1px solid var(--app-border);
  border-bottom: 1px solid var(--app-border);
}

.account-sharing-title {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--app-muted);
}

.account-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.45;
  white-space: normal;
}

.badge {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--app-border-strong);
  color: var(--app-muted);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-subheader {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.app-subheader-inner {
  max-width: var(--app-max);
  margin: 0 auto;
  padding: 8px 24px 12px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.app-subheader-inner .tabs {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0;
}

.pipeline-compact {
  flex-shrink: 0;
  max-width: min(520px, 48vw);
}

.pipeline-compact-track {
  display: flex;
  gap: 5px;
  align-items: center;
  overflow-x: auto;
  padding: 2px 0;
  scrollbar-width: none;
}

.pipeline-compact-track::-webkit-scrollbar {
  display: none;
}

.pipeline-chip {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  padding: 4px 7px;
  border-radius: 8px;
  border: 1px solid var(--app-border);
  background: rgba(255, 255, 255, 0.03);
  transition: background 0.2s, border-color 0.2s;
}

.pipeline-chip.is-hot {
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.28);
}

.pipeline-chip-val {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.pipeline-chip-lbl {
  margin-top: 2px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--app-dim);
}

.pipeline-chip.accent-good .pipeline-chip-val { color: #86efac; }
.pipeline-chip.accent-hot .pipeline-chip-val { color: var(--app-good); }
.pipeline-chip.accent-bad .pipeline-chip-val { color: var(--app-bad); }

/* Main */
#appMain {
  max-width: var(--app-max);
  margin: 0 auto;
  padding: 16px 24px 40px;
}

.app-shell.app-ready:not(.onboarding-active) {
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.app-shell.app-ready:not(.onboarding-active) > header {
  flex-shrink: 0;
}

.app-shell.app-ready:not(.onboarding-active) #appMain {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 10px 24px 14px;
}

#appMain.app-main-wide {
  max-width: none;
  width: calc(100vw - 32px);
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}

#appMain.app-main-wide .panel-stage,
#appMain.app-main-wide #evaluate.panel.active,
#appMain.app-main-wide #applications.panel.active,
#appMain.app-main-wide #responses.panel.active,
#appMain.app-main-wide #manual.panel.active,
#appMain.app-main-wide .evaluate-workspace,
#appMain.app-main-wide .jobs-workspace,
#appMain.app-main-wide .responses-workspace,
#appMain.app-main-wide .tracker-workspace {
  width: 100%;
  max-width: none;
}

/* Legacy alias */
#appMain.app-main-evaluate {
  max-width: none;
  width: calc(100vw - 32px);
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}

#appMain.app-main-evaluate .panel-stage,
#appMain.app-main-evaluate #evaluate.panel.active,
#appMain.app-main-evaluate .evaluate-workspace {
  width: 100%;
  max-width: none;
}

.app-shell.app-ready:not(.onboarding-active) .panel-stage {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.app-shell.app-ready:not(.onboarding-active) .panel.active {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.app-shell.app-ready:not(.onboarding-active) .panel.active::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

#evaluate.panel.active,
#setup.panel.active,
#applications.panel.active,
#responses.panel.active,
#manual.panel.active {
  overflow: hidden;
}

.panel.active {
  display: block;
}

#evaluate.panel.active .panel-hero.compact {
  flex-shrink: 0;
  margin-bottom: 10px;
}

#evaluate.panel.active .panel-hero.compact h2 {
  font-size: 22px;
  margin-bottom: 4px;
}

#evaluate.panel.active .panel-lead {
  margin-bottom: 0;
  max-width: none;
}

/* Setup dashboard — fits viewport, scroll hidden inside body if needed */
.setup-dashboard {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

.setup-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
}

.setup-header-row .panel-hero.compact {
  margin-bottom: 0;
  flex: 1;
  min-width: 0;
}

.setup-header-row #editSetupBtn {
  flex-shrink: 0;
  margin-top: 18px;
}

#setup .setup-checklist {
  margin-top: 10px;
}

.setup-scroll-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 12px;
}

.setup-scroll-body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.profile-select-grid label.profile-select-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 2px;
}

.profile-select-grid {
  padding-bottom: 20px;
}

#setup .fold-body {
  padding: 0 14px 18px;
}

#setup .setup-scroll-body .fold-card {
  overflow: hidden;
  flex-shrink: 0;
}

#setup .setup-scroll-body .fold-card summary {
  position: relative;
  z-index: 2;
  background: var(--app-surface);
}

#setup .fold-card.fold-select-open {
  overflow: visible;
  z-index: 4;
}

#setup .fold-card.fold-select-open .fold-body {
  overflow: visible;
}

.profile-select-field > span:first-child {
  font-size: 13px;
  font-weight: 500;
}

.profile-select-field select {
  width: 100%;
}

.field-hint {
  display: block;
  font-size: 11px;
  line-height: 1.4;
  color: var(--app-muted);
}

#setup .fold-card {
  margin-bottom: 0;
}

#setup .fold-card summary {
  padding: 11px 14px;
  font-size: 13px;
}

#setup textarea {
  min-height: 52px;
  max-height: 80px;
}

#setup .prompt-preview {
  min-height: 100px;
  max-height: min(28vh, 240px);
}

#setup .actions.setup-save-row {
  flex-shrink: 0;
  margin-top: 0;
  padding-top: 4px;
}

.evaluate-workspace {
  flex: 1;
  min-height: 0;
  align-items: stretch;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  width: 100%;
}

#appMain.app-main-evaluate .evaluate-workspace .card {
  min-width: 0;
}

.evaluate-workspace .card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  margin-bottom: 0;
}

.evaluate-workspace .card h2 {
  flex-shrink: 0;
  margin-bottom: 10px;
}

.evaluate-workspace .card .row,
.evaluate-workspace .card .actions {
  flex-shrink: 0;
}

.evaluate-workspace #jdText,
.evaluate-workspace #resultBox {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.evaluate-workspace #jdText::-webkit-scrollbar,
.evaluate-workspace #resultBox::-webkit-scrollbar {
  display: none;
}

.responses-workspace {
  flex: 1;
  min-height: 0;
  align-items: stretch;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  width: 100%;
}

#responses.panel.active .panel-hero.compact {
  flex-shrink: 0;
  margin-bottom: 10px;
}

#responses.panel.active .panel-hero.compact h2 {
  font-size: 22px;
  margin-bottom: 0;
}

.responses-workspace .card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  margin-bottom: 0;
}

.responses-workspace .card h2 {
  flex-shrink: 0;
  margin-bottom: 12px;
}

.responses-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 10px;
}

.responses-inline-row {
  display: grid;
  grid-template-columns: 1fr 1fr 180px;
  gap: 12px;
  margin-bottom: 10px;
}

.responses-form-card label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.responses-form-card label > span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--app-muted);
}

.responses-form-card label.responses-grow {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin-bottom: 10px;
}

.responses-form-card #responseBody {
  flex: 1;
  min-height: 120px;
  max-height: none;
  resize: none;
  overflow-y: auto;
  scrollbar-width: none;
}

.responses-form-card #responseBody::-webkit-scrollbar {
  display: none;
}

.responses-form-card .responses-notes {
  min-height: 72px;
  max-height: 100px;
  resize: vertical;
}

.responses-form-card .actions {
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 4px;
}

.responses-list-head {
  flex-shrink: 0;
  align-items: center;
  margin-bottom: 12px;
}

.responses-list-head h2 {
  margin: 0;
}

.responses-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  margin-top: 0;
}

.responses-list::-webkit-scrollbar {
  display: none;
}

.evaluate-workspace #jdText {
  min-height: 0;
  resize: none;
}

/* Pipeline metrics */
.pipeline-strip {
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.015) 100%);
}

.pipeline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.pipeline-head .panel-eyebrow {
  margin: 0;
}

.pipeline-summary {
  font-size: 12px;
  color: var(--app-muted);
}

.pipeline-track {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.pipeline-node {
  flex: 1 0 72px;
  min-width: 72px;
  text-align: center;
  padding: 8px 4px;
  border-radius: 10px;
  transition: background 0.2s, transform 0.2s;
}

.pipeline-node.is-hot {
  background: rgba(52, 211, 153, 0.1);
  box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.22);
}

.pipeline-value {
  display: block;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.pipeline-label {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--app-dim);
}

.pipeline-node.accent-hot .pipeline-value { color: var(--app-good); }
.pipeline-node.accent-bad .pipeline-value { color: var(--app-bad); }
.pipeline-node.accent-good .pipeline-value { color: #86efac; }

.pipeline-connector {
  flex: 0 0 14px;
  height: 2px;
  background: var(--app-border);
  border-radius: 1px;
  transition: background 0.25s, box-shadow 0.25s;
}

.pipeline-connector.lit {
  background: rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.12);
}

/* Panel transitions */
.panel-stage {
  position: relative;
}

.panel {
  display: none;
}

.panel.panel-enter {
  animation: panelEnter 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes panelEnter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tab {
  transition: color 0.2s, background 0.2s, border-color 0.2s, transform 0.15s;
}

.tab.active {
  animation: tabPop 0.25s ease;
}

@keyframes tabPop {
  from { transform: scale(0.96); }
  to { transform: scale(1); }
}

/* Collapsible setup sections */
.fold-card {
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  margin-bottom: 10px;
  background: var(--app-surface);
  overflow: hidden;
}

.fold-card summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.15s;
}

.fold-card summary::-webkit-details-marker { display: none; }

.fold-card summary::after {
  content: '+';
  color: var(--app-muted);
  font-size: 18px;
  font-weight: 400;
  transition: transform 0.2s;
}

.fold-card[open] summary::after {
  content: '−';
}

.fold-card summary:hover {
  background: rgba(255, 255, 255, 0.03);
}

.fold-body {
  padding: 0 14px 14px;
  animation: foldOpen 0.28s ease;
}

@keyframes foldOpen {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.card.flat {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 4px 4px 0;
  margin-bottom: 0;
}

.panel-hero-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.panel-hero-row .setup-checklist {
  margin-top: 0;
  justify-content: flex-end;
  flex: 1;
  min-width: 200px;
}

/* Main (legacy tracker removed) */

/* Tabs */
.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding-top: 12px;
}

.tab {
  background: transparent;
  color: var(--app-muted);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.tab:hover {
  color: var(--app-text);
  background: rgba(255, 255, 255, 0.04);
}

.tab.active {
  background: var(--app-accent);
  color: #000;
  border-color: var(--app-accent);
  font-weight: 600;
}

.panel-hero {
  margin-bottom: 14px;
  padding-bottom: 0;
}

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

.panel-hero.compact h2 {
  font-size: 22px;
  margin-bottom: 0;
}

.panel-eyebrow {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--app-dim);
}

.panel-hero h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.panel-lead {
  margin: 0;
  max-width: 640px;
  color: var(--app-muted);
  font-size: 14px;
  line-height: 1.55;
}

/* Cards */
.card {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  padding: 20px;
  margin-bottom: 14px;
}

.card h2 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.grid.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.grid.two .card {
  margin-bottom: 0;
}

.grid.two + .card,
.grid.two + .actions {
  margin-top: 14px;
}

/* Forms */
label {
  display: block;
  color: var(--app-muted);
  font-weight: 500;
  font-size: 12px;
  margin-bottom: 14px;
}

textarea,
input,
select {
  width: 100%;
  margin-top: 6px;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-sm);
  padding: 11px 12px;
  font: inherit;
  font-size: 14px;
  color: var(--app-text);
  background: rgba(0, 0, 0, 0.35);
  transition: border-color 0.15s, box-shadow 0.15s;
}

textarea::placeholder,
input::placeholder {
  color: rgba(255, 255, 255, 0.28);
}

textarea:focus,
input:focus,
select:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}

textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.5;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

textarea::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

select {
  cursor: pointer;
}

#setup textarea {
  min-height: 64px;
}

#jdText {
  min-height: 320px;
}

#settingsEmail:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.meta {
  color: var(--app-muted);
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.5;
}

/* Buttons */
button {
  font: inherit;
  cursor: pointer;
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  transition: opacity 0.15s, transform 0.15s, background 0.15s;
}

button:hover { opacity: 0.92; }
button:active { transform: translateY(1px); }

.btn-primary,
#evaluateBtn,
#saveResponseBtn,
#saveTrackerBtn,
#refreshJobsBtn,
#saveSettingsBtn {
  background: var(--app-accent);
  color: #000;
}

button.secondary,
.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--app-text);
  border: 1px solid var(--app-border-strong);
}

.btn-ghost {
  padding: 8px 14px;
  font-size: 12px;
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.actions-sticky {
  position: sticky;
  bottom: 16px;
  z-index: 5;
  margin-top: 18px;
  padding: 12px 0;
}

.actions-sticky .btn-primary {
  padding: 12px 22px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

.row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  flex-wrap: wrap;
}

.row.compact { max-width: 100%; }

.check {
  white-space: nowrap;
  color: var(--app-muted);
  font-size: 13px;
}

.check input { width: auto; margin: 0 6px 0 0; }

.split {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  flex-wrap: wrap;
}

/* Setup */
.setup-banner {
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.28);
  color: #fde68a;
  border-radius: var(--app-radius-sm);
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: 12px;
  line-height: 1.45;
}

.setup-checklist {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.setup-checklist span {
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
}

.setup-checklist .ok {
  background: rgba(52, 211, 153, 0.1);
  color: var(--app-good);
  border-color: rgba(52, 211, 153, 0.25);
}

.setup-checklist .missing {
  background: rgba(248, 113, 113, 0.08);
  color: var(--app-bad);
  border-color: rgba(248, 113, 113, 0.22);
}

.resume-blocks {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 12px 0;
}

.resume-blocks-compact {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
}

.resume-blocks-compact .resume-block {
  display: none;
  margin: 0;
  animation: resumeSlotIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.resume-blocks-compact .resume-block.active {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
}

@keyframes resumeSlotIn {
  from {
    opacity: 0;
    transform: translateX(10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.resume-block-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.resume-field {
  display: block;
  margin: 0 !important;
  font-size: 12px;
}

.resume-block {
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-sm);
  padding: 14px;
  background: rgba(0, 0, 0, 0.22);
}

.resume-block label {
  display: block;
  margin-bottom: 10px;
}

.resume-block textarea {
  min-height: 120px;
}

.resume-blocks-compact .resume-block textarea {
  min-height: 72px;
  resize: vertical;
}

.secondary-sm {
  padding: 7px 12px;
  font-size: 12px;
}

.hidden-file {
  display: none !important;
}

.resume-upload {
  margin-bottom: 10px;
}

.resume-drop {
  border: 1px dashed var(--app-border-strong);
  border-radius: var(--app-radius-sm);
  padding: 14px 12px;
  text-align: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

.resume-blocks-compact .resume-drop {
  padding: 12px 10px;
}

.resume-drop:hover,
.resume-drop.drag {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.05);
}

.resume-drop-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.resume-drop-sub {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--app-muted);
}

.resume-file-status {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--app-muted);
}

.resume-file-status.ok { color: var(--app-good); }
.resume-file-status.err { color: var(--app-bad); }
.resume-file-status.parsing { color: var(--app-warn); }

.resume-text-fold {
  margin-top: 8px;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-sm);
  overflow: hidden;
}

.resume-text-fold summary {
  padding: 10px 12px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--app-muted);
  list-style: none;
  user-select: none;
}

.resume-text-fold summary::-webkit-details-marker { display: none; }

.resume-text-fold .resume-text {
  margin: 0;
  border: 0;
  border-radius: 0;
  border-top: 1px solid var(--app-border);
  min-height: 140px;
}

.gmail-setup-card.connected {
  border: 1px solid rgba(52, 211, 153, 0.25);
  border-radius: var(--app-radius-sm);
  padding: 12px;
  background: rgba(52, 211, 153, 0.06);
}

.prompt-preview {
  white-space: pre-wrap;
  min-height: 200px;
  max-height: 480px;
  background: var(--app-code-bg);
  color: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-sm);
  padding: 14px;
  overflow: auto;
  font-size: 12px;
  line-height: 1.55;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.eval-result-box {
  min-height: 360px;
  margin: 0;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-sm);
  padding: 16px 18px;
  overflow: auto;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
}

.eval-result-box.eval-result-compact {
  min-height: 0;
  margin-top: 10px;
}

.eval-empty {
  margin: 0;
  color: var(--app-muted);
  font-size: 13px;
}

.eval-loading {
  animation: evalPulse 1.4s ease-in-out infinite;
}

@keyframes evalPulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

.eval-result-box.eval-result-summary {
  min-height: 200px;
}

.eval-summary-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.88);
}

.eval-summary-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--app-muted);
}
.eval-timing,
.eval-model-note {
  margin: 0 0 10px;
  font-size: 11px;
  color: var(--app-muted);
}

.eval-model-note code {
  font-size: 10px;
}

.eval-verdict {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.eval-decision {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.eval-verdict-good .eval-decision {
  background: rgba(52, 211, 153, 0.18);
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.35);
}

.eval-verdict-warn .eval-decision {
  background: rgba(251, 191, 36, 0.16);
  color: #fcd34d;
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.eval-verdict-bad .eval-decision {
  background: rgba(248, 113, 113, 0.16);
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.35);
}

.eval-verdict-neutral .eval-decision {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--app-border);
}

.eval-match {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.eval-match-good { color: #6ee7b7; }
.eval-match-warn { color: #fcd34d; }
.eval-match-bad { color: #fca5a5; }

.eval-outreach-subject {
  margin: 0 0 8px;
  font-size: 13px;
}

.eval-outreach-body {
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--app-radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--app-border);
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
}

.eval-block-outreach {
  margin-top: 12px;
}

.eval-role {
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  color: #fff;
}

.eval-meta-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
}

.eval-meta-row em {
  font-style: normal;
  color: var(--app-muted);
  margin-right: 6px;
}

.eval-lead {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-left: 3px solid rgba(251, 191, 36, 0.55);
  background: rgba(251, 191, 36, 0.06);
  border-radius: 0 var(--app-radius-sm) var(--app-radius-sm) 0;
  color: rgba(255, 255, 255, 0.9);
}

.eval-detail {
  margin: 0 0 14px;
  padding: 0;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.78);
}

.eval-block {
  margin-bottom: 14px;
}

.eval-block-title {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--app-muted);
}

.eval-block-risk .eval-block-title {
  color: #fca5a5;
}

.eval-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.eval-list li {
  color: rgba(255, 255, 255, 0.82);
}

.eval-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin: 16px 0;
  padding: 12px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-sm);
}

.eval-fact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
}

.eval-fact span {
  color: var(--app-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 10px;
  font-weight: 600;
}

.eval-fact strong {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
}

.eval-verdict-text {
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid var(--app-border);
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

.eval-jd {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--app-border);
}

.eval-jd summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--app-muted);
  margin-bottom: 8px;
}

.eval-jd-text {
  margin: 0;
  white-space: pre-wrap;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.65);
  max-height: 240px;
  overflow: auto;
}

/* Lists */
.list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

#appMain.app-main-wide .evaluate-workspace .card {
  min-height: 0;
}

.jobs-workspace {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.jobs-card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 16px 18px;
}

.jobs-body {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.jobs-body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.jobs-body .jobs-list {
  flex: none;
  min-height: auto;
  max-width: 100%;
  overflow: visible;
}

.jobs-toolbar {
  flex-shrink: 0;
  margin-bottom: 14px;
  align-items: flex-start;
}

.jobs-toolbar h2 {
  margin: 4px 0 0;
  font-size: 20px;
}

.jobs-filters {
  position: relative;
  flex-shrink: 0;
}

.jobs-filters-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--app-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--app-text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: border-color 0.15s, background 0.15s;
}

.jobs-filters-btn::-webkit-details-marker {
  display: none;
}

.jobs-filters-btn:hover,
.jobs-filters[open] .jobs-filters-btn {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.07);
}

.jobs-filters-chevron {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid rgba(255, 255, 255, 0.55);
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.55);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.15s;
}

.jobs-filters[open] .jobs-filters-chevron {
  transform: rotate(-135deg) translateY(2px);
}

.jobs-filters-hint {
  font-size: 11px;
  color: var(--app-muted);
  font-weight: 400;
}

.jobs-filters-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: min(520px, calc(100vw - 48px));
  padding: 12px;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-sm);
  background: rgba(12, 12, 14, 0.98);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.jobs-filters-panel select {
  flex: 0 0 150px;
  min-width: 130px;
}

.jobs-filters-panel input[type="search"] {
  flex: 1 1 180px;
  min-width: 0;
}

.jobs-filters-panel button {
  flex-shrink: 0;
  white-space: nowrap;
}

.jobs-filters:not([open]) .jobs-filters-panel {
  display: none;
}

.recommended-section {
  margin-bottom: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--app-border);
}

.recommended-section.hidden {
  display: none;
}

#recommendedActive.hidden {
  display: none;
}

.recommended-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.recommended-lead {
  margin: 4px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recommended-quota {
  margin: 6px 0 0;
  font-size: 12px;
}

.recommended-quota-exhausted {
  color: #fca5a5;
}

.recommended-upgrade {
  display: inline-block;
  margin: 8px 0 0;
  padding: 0;
  border: none;
  background: none;
  color: var(--accent-hot, #f97316);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.recommended-upgrade.hidden {
  display: none;
}

.pool-enable-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  margin-bottom: 16px;
  border-radius: 10px;
  border: 1px dashed var(--app-border);
  background: rgba(255, 255, 255, 0.02);
}

.pool-enable-banner.hidden {
  display: none;
}

.pool-enable-banner p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}

.pool-stats-box {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--app-border);
}

.pool-stats-box.hidden {
  display: none;
}

.pool-stats-title {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.7;
}

.pool-stats-line {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
}

.account-plan-line {
  margin: 10px 0 0;
}

.account-upgrade-btn,
.account-manage-btn {
  width: 100%;
  margin-top: 8px;
}

.eval-pool-notice {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.4;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: #86efac;
}

.eval-pool-notice.eval-pool-muted {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--app-border);
  color: var(--app-muted, #94a3b8);
}

.wizard-pool-optin {
  margin-top: 20px;
  text-align: left;
}

.wizard-pool-optin .account-check {
  margin-top: 8px;
}

.pro-modal-card {
  max-width: 460px;
}

.pro-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 12px 0 8px;
}

.pro-price-compare {
  font-size: 18px;
  color: var(--app-muted, #94a3b8);
  text-decoration: line-through;
}

.pro-price-now {
  font-size: 32px;
  font-weight: 700;
  color: #fff;
}

.pro-price-period {
  font-size: 14px;
  color: var(--app-muted, #94a3b8);
}

.pro-modal-lead {
  margin: 0 0 12px;
}

.pro-feature-list {
  margin: 0 0 16px;
  padding-left: 0;
  list-style: none;
  font-size: 14px;
  line-height: 1.55;
}

.pro-feature-list li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 12px;
}

.pro-feature-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent-hot, #f97316);
  font-weight: 600;
}

.pro-feature-list li strong {
  display: block;
  margin-bottom: 2px;
  color: var(--app-text, #f1f5f9);
  font-weight: 600;
}

.pro-modal-lead strong {
  color: #fca5a5;
}

.pro-checkout-btn {
  width: 100%;
}

.pro-modal-note {
  margin: 10px 0 0;
  text-align: center;
}

.btn-apply.btn-find-job {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--app-border);
  color: var(--app-text, #e2e8f0);
}

.btn-apply.btn-find-job:hover {
  background: rgba(255, 255, 255, 0.12);
}

.recommended-status {
  margin: 0 0 8px;
  min-height: 18px;
  flex-shrink: 0;
}

.recommended-sync-progress {
  margin: 0 0 10px;
  flex-shrink: 0;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--app-border);
  background: rgba(255, 255, 255, 0.03);
}

.recommended-sync-progress-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.recommended-sync-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-top-color: #fff;
  flex-shrink: 0;
  animation: recommended-spin 0.8s linear infinite;
}

.recommended-sync-step {
  font-size: 14px;
  font-weight: 600;
  color: var(--app-text);
}

.recommended-sync-bar {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.recommended-sync-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.35), #fff);
  transition: width 0.6s ease;
}

.recommended-sync-detail {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--app-muted);
}

#syncRecommendationsBtn.is-loading {
  opacity: 0.72;
  pointer-events: none;
}

@keyframes recommended-spin {
  to { transform: rotate(360deg); }
}

.recommended-list {
  margin-top: 0;
}

.jobs-mine-section {
  padding-top: 14px;
}

.jobs-mine-head {
  margin-bottom: 10px;
}

.jobs-section-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.job-origin {
  display: inline-block;
  margin-left: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  vertical-align: middle;
  background: rgba(96, 165, 250, 0.16);
  color: #93c5fd;
  border: 1px solid rgba(96, 165, 250, 0.35);
}

.job-origin.hidden {
  display: none;
}

.jobs-list {
  flex: 1;
  min-height: 0;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  gap: 12px;
  margin-top: 0;
}

.jobs-list::-webkit-scrollbar {
  display: none;
}

.job-item {
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-sm);
  padding: 16px 18px;
  background: rgba(0, 0, 0, 0.2);
  transition: border-color 0.15s;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.job-item-head {
  align-items: flex-start;
  min-width: 0;
  width: 100%;
}

.job-item-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-apply {
  appearance: none;
  border: 1px solid rgba(52, 211, 153, 0.45);
  background: rgba(52, 211, 153, 0.16);
  color: #6ee7b7;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.btn-apply:hover {
  background: rgba(52, 211, 153, 0.28);
  border-color: rgba(52, 211, 153, 0.65);
}

.eval-apply-row {
  margin-top: 14px;
}

.eval-apply-hint {
  margin: 12px 0 0;
  font-size: 12px;
}

.job-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.job-link-row.hidden {
  display: none;
}

.job-link-input {
  flex: 1;
  min-width: 180px;
}

.job-link-save {
  appearance: none;
  border: 1px solid var(--app-border-strong);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.88);
  border-radius: var(--app-radius-sm);
  padding: 8px 12px;
  font-size: 12px;
  cursor: pointer;
}

.job-link-save:hover {
  background: rgba(255, 255, 255, 0.1);
}

.job-item-main {
  flex: 1;
  min-width: 0;
}

.job-decision {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.job-decision-good {
  background: rgba(52, 211, 153, 0.18);
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.35);
}

.job-decision-bad {
  background: rgba(248, 113, 113, 0.16);
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.35);
}

.job-decision-warn {
  background: rgba(251, 191, 36, 0.16);
  color: #fcd34d;
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.job-item h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.job-meta {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.job-verdict {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-left: 3px solid rgba(251, 191, 36, 0.55);
  background: rgba(251, 191, 36, 0.06);
  border-radius: 0 var(--app-radius-sm) var(--app-radius-sm) 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.job-evaluation {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
  overflow-wrap: anywhere;
}

.job-evaluation.hidden {
  display: none;
}

.job-details {
  margin-top: 12px;
}

.job-details .eval-result-box {
  min-height: 0;
  margin-top: 10px;
}

.job-item:hover {
  border-color: var(--app-border-strong);
}

.recommended-list .job-item {
  padding: 12px 14px;
}

.recommended-list .job-verdict {
  margin-top: 8px;
  padding: 8px 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recommended-list .job-evaluation {
  display: none !important;
}

.recommended-list .job-details .eval-result-box {
  font-size: 12px;
}

.recommended-list .job-details .eval-block,
.recommended-list .job-details .eval-facts,
.recommended-list .job-details .eval-outreach-body {
  display: none;
}

.recommended-list .job-details .eval-verdict,
.recommended-list .job-details .eval-role,
.recommended-list .job-details .eval-lead,
.recommended-list .job-details .eval-apply-row {
  display: block;
}

.fit { margin: 10px 0; color: var(--app-muted); font-size: 13px; }

details {
  margin-top: 8px;
}

details summary {
  cursor: pointer;
  color: var(--app-muted);
  font-size: 13px;
  user-select: none;
}

details summary:hover { color: var(--app-text); }

details pre {
  white-space: pre-wrap;
  background: var(--app-code-bg);
  border: 1px solid var(--app-border);
  padding: 12px;
  border-radius: var(--app-radius-sm);
  max-height: 320px;
  overflow: auto;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.78);
}

.statusSelect { width: 160px; }

.manual-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.manual-grid label {
  font-size: 12px;
  margin-bottom: 0;
}

.manual-grid input {
  margin-top: 6px;
  width: 100%;
}

.tracker-workspace {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.tracker-card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 16px 18px;
  margin-bottom: 0;
}

.tracker-toolbar {
  flex-shrink: 0;
  margin-bottom: 16px;
}

.tracker-toolbar h2 {
  margin: 4px 0 6px;
  font-size: 20px;
}

.tracker-lead {
  margin: 0;
}

.tracker-notes-label {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.tracker-notes-label > span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--app-muted);
}

.tracker-notes-label textarea {
  flex: 1;
  min-height: 140px;
  resize: vertical;
}

.tracker-save-row {
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 4px;
}

/* Setup status modal */
.status-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
}

.status-modal-card {
  width: min(440px, 100%);
  background: #0a0a0a;
  border: 1px solid var(--app-border-strong);
  border-radius: var(--app-radius);
  padding: 22px 22px 18px;
  position: relative;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.status-modal-card h3 {
  margin: 0 0 16px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.status-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--app-muted);
  border: 1px solid var(--app-border);
  font-size: 20px;
  line-height: 1;
}

.status-close:hover { color: var(--app-text); }

.status-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.status-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: var(--app-radius-sm);
  border: 1px solid var(--app-border);
  background: rgba(255, 255, 255, 0.03);
  font-size: 13px;
}

.status-row span {
  color: var(--app-muted);
  flex-shrink: 0;
}

.status-row strong {
  font-weight: 600;
  text-align: right;
  line-height: 1.4;
}

.status-row.ok strong { color: var(--app-good); }
.status-row.warn strong { color: var(--app-warn); }
.status-row.bad strong { color: var(--app-bad); }

.status-done {
  width: 100%;
}

.status-modal-wide {
  width: min(640px, 100%);
}

.job-ask-modal {
  width: min(560px, 100%);
  max-height: min(88vh, 720px);
  display: flex;
  flex-direction: column;
  padding-bottom: 16px;
}

.job-ask-modal h3 {
  margin: 0 0 6px;
  font-size: 18px;
  line-height: 1.35;
  padding-right: 36px;
}

.job-ask-lead {
  margin: 0 0 14px;
  font-size: 12px;
  line-height: 1.45;
}

.job-ask-messages {
  flex: 1;
  min-height: 200px;
  max-height: min(42vh, 360px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-sm);
  background: rgba(0, 0, 0, 0.28);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.job-ask-messages::-webkit-scrollbar {
  display: none;
}

.job-ask-msg {
  max-width: 92%;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.job-ask-msg-user {
  align-self: flex-end;
  background: rgba(96, 165, 250, 0.18);
  border: 1px solid rgba(96, 165, 250, 0.32);
  color: rgba(255, 255, 255, 0.92);
  border-bottom-right-radius: 4px;
}

.job-ask-msg-assistant {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--app-border);
  color: rgba(255, 255, 255, 0.88);
  border-bottom-left-radius: 4px;
}

.job-ask-msg-system {
  align-self: center;
  max-width: 100%;
  padding: 0;
  background: transparent;
  border: none;
  color: var(--app-muted);
  font-size: 12px;
  text-align: center;
}

.job-ask-msg-loading {
  align-self: flex-start;
  color: var(--app-muted);
  font-size: 13px;
  padding: 8px 4px;
}

.job-ask-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.job-ask-chip {
  appearance: none;
  border: 1px solid var(--app-border);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 11px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.job-ask-chip:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

.job-ask-chip:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.job-ask-form {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.job-ask-form textarea {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  max-height: 120px;
  resize: vertical;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-sm);
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
  background: rgba(0, 0, 0, 0.25);
  color: var(--app-text);
  font-family: inherit;
}

.job-ask-send {
  flex-shrink: 0;
  min-width: 72px;
}

.btn-ask {
  appearance: none;
  border: 1px solid var(--app-border-strong);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.88);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.btn-ask:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.28);
}

.job-ask-card-btn {
  appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: var(--app-radius-sm);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.02) 55%, rgba(255, 255, 255, 0.04) 100%);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.job-ask-card-btn:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.04) 55%, rgba(255, 255, 255, 0.06) 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.job-ask-card-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.35);
  outline-offset: 2px;
}

.job-ask-card-mark {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.job-ask-card-mark img {
  display: block;
  width: 18px;
  height: 18px;
}

.job-ask-card-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.job-ask-card-label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.job-ask-card-hint {
  font-size: 11px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.48);
}

.job-ask-card-arrow {
  flex-shrink: 0;
  font-size: 15px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.38);
  transition: transform 0.15s ease, color 0.15s ease;
}

.job-ask-card-btn:hover .job-ask-card-arrow {
  transform: translateX(3px);
  color: rgba(255, 255, 255, 0.72);
}

.recommended-list .job-ask-card-btn {
  margin-top: 10px;
  padding: 9px 12px;
}

.recommended-list .job-ask-card-hint {
  display: none;
}

.recommended-list .job-ask-card-mark {
  width: 30px;
  height: 30px;
}

.status-modal-wide textarea {
  width: 100%;
  min-height: 280px;
  margin-top: 10px;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-sm);
  padding: 12px;
  font-size: 12px;
  line-height: 1.5;
  background: var(--app-code-bg);
  color: rgba(255, 255, 255, 0.85);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.resume-insights {
  margin: 16px 0;
  padding: 16px;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  background: rgba(255, 255, 255, 0.02);
}

.resume-step-insights {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateX(16px);
  transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1), transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.resume-step-insights.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.resume-insights-placeholder {
  margin: 0;
  padding: 16px;
  border: 1px dashed var(--app-border);
  border-radius: var(--app-radius);
  background: rgba(255, 255, 255, 0.015);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
}

.insights-eyebrow {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--app-dim);
}

.insights-summary {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--app-muted);
  flex-shrink: 0;
}

.resume-variant-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: none;
}

.resume-variant-card {
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-sm);
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.resume-variant-card.ready {
  border-color: rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.06);
}

.resume-variant-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.resume-variant-head h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.variant-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(248, 113, 113, 0.12);
  color: var(--app-bad);
  border: 1px solid rgba(248, 113, 113, 0.25);
}

.resume-variant-card.ready .variant-badge {
  background: rgba(52, 211, 153, 0.12);
  color: var(--app-good);
  border-color: rgba(52, 211, 153, 0.25);
}

.variant-changes {
  margin: 6px 0 8px;
  padding-left: 16px;
  color: var(--app-muted);
  font-size: 11px;
  line-height: 1.4;
}

.variant-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.variant-actions .secondary {
  padding: 6px 10px;
  font-size: 11px;
}

.variant-intro {
  margin: 0 0 10px;
}

.resume-count-hint {
  margin: 0;
  font-size: 12px;
  color: var(--app-warn);
}

.resume-count-hint.ok {
  color: var(--app-good);
}

.wizard-pane strong {
  color: var(--app-text);
  font-weight: 600;
}

/* Onboarding wizard */
.app-shell.onboarding-active .app-subheader,
.app-shell.onboarding-active #appMain,
.app-shell.onboarding-active #setupBanner {
  display: none !important;
}

.app-shell.onboarding-active {
  height: 100vh;
  overflow: hidden;
}

.onboarding-wizard {
  position: relative;
  z-index: 10;
  height: calc(100vh - 72px);
  min-height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
}

.wizard-shell {
  width: min(520px, 100%);
  max-height: calc(100vh - 104px);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--app-border-strong);
  border-radius: 20px;
  padding: 22px 24px 18px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1), padding 0.35s ease;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.wizard-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-right: 2px;
}

.wizard-body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.wizard-shell-wide {
  width: min(1040px, calc(100vw - 40px));
  padding: 20px 22px 16px;
}

.wizard-progress {
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 18px;
}

.wizard-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.35), #fff);
  border-radius: 999px;
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.wizard-step-eyebrow {
  margin: 0 0 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--app-dim);
}

.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;
}

.model-picker-field {
  display: block;
}

.model-picker-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
}

.model-picker-hint {
  margin: 0 0 10px;
}

.model-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.model-card {
  display: block;
  width: 100%;
  text-align: left;
  appearance: none;
  font: inherit;
  padding: 12px 14px;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-sm);
  background: rgba(255, 255, 255, 0.02);
  color: inherit;
  cursor: default;
  transition: border-color 0.15s, background 0.15s;
}

button.model-card,
.model-picker-multi .model-card {
  cursor: pointer;
}

.model-picker-multi {
  display: grid;
  gap: 10px;
}

.model-card-fixed {
  cursor: default;
}

.model-picker-single .model-card:hover,
.model-picker-multi .model-card:hover {
  border-color: rgba(96, 165, 250, 0.55);
  background: rgba(96, 165, 250, 0.08);
}

.model-card.selected {
  border-color: rgba(96, 165, 250, 0.55);
  background: rgba(96, 165, 250, 0.08);
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.2);
}

.model-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.model-card-title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.model-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.model-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.model-badge-rec {
  background: rgba(96, 165, 250, 0.15);
  color: #93c5fd;
  border-color: rgba(96, 165, 250, 0.35);
}

.model-badge-speed {
  background: rgba(52, 211, 153, 0.12);
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, 0.3);
}

.model-badge-cost {
  background: rgba(251, 191, 36, 0.12);
  color: #fcd34d;
  border-color: rgba(251, 191, 36, 0.3);
}

.model-badge-quality {
  background: rgba(167, 139, 250, 0.14);
  color: #c4b5fd;
  border-color: rgba(167, 139, 250, 0.35);
}

.model-badge-neutral {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.72);
  border-color: var(--app-border);
}

.model-card-desc {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--app-muted);
}

.wizard-pane {
  display: none;
  min-height: 0;
}

.wizard-pane label {
  display: block;
  margin-bottom: 12px;
}

.wizard-pane textarea {
  resize: none;
  min-height: 96px;
  max-height: min(22vh, 200px);
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.wizard-pane textarea::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

#setupTargetRoles {
  min-height: 120px;
  max-height: min(28vh, 220px);
}

#setupStrongFit {
  min-height: 72px;
  max-height: min(16vh, 140px);
}

.wizard-pane.active {
  display: block;
}

.wizard-pane-resume.active {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.resume-step-head {
  flex-shrink: 0;
}

.resume-step-head .wizard-title {
  font-size: 22px;
  margin-bottom: 4px;
}

.wizard-lead-compact {
  margin-bottom: 12px;
  font-size: 13px;
}

.resume-step-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.wizard-shell-wide .resume-step-body {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 16px;
}

.resume-step-side {
  position: relative;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.resume-step-side .resume-step-insights,
.resume-step-side .resume-insights-placeholder {
  flex: 1 1 auto;
  min-height: 0;
}

.resume-step-body.has-insights .resume-insights-placeholder {
  display: none;
}

.resume-step-upload {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.resume-slot-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.resume-slot-tab {
  border: 1px solid var(--app-border);
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--app-muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s, transform 0.15s;
}

.resume-slot-tab:hover {
  border-color: var(--app-border-strong);
  color: var(--app-text);
}

.resume-slot-tab.active {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
  color: var(--app-text);
}

.resume-slot-tab.ready:not(.active) {
  border-color: rgba(52, 211, 153, 0.28);
  color: rgba(52, 211, 153, 0.85);
}

.resume-step-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
  margin-top: 8px;
}

.wizard-pane.wizard-enter {
  animation: wizardStepIn 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes wizardStepIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wizard-title {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.wizard-lead {
  margin: 0 0 20px;
  color: var(--app-muted);
  font-size: 14px;
  line-height: 1.55;
}

.wizard-optional {
  font-weight: 400;
  color: var(--app-dim);
  font-size: 11px;
}

.wizard-done-mark {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 700;
  color: #000;
  background: var(--app-good);
  margin-bottom: 16px;
  animation: wizardPop 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes wizardPop {
  from { transform: scale(0.6); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.wizard-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--app-border);
  flex-shrink: 0;
  background: rgba(3, 3, 3, 0.92);
  position: sticky;
  bottom: 0;
  z-index: 2;
}

.wizard-shell-wide .wizard-nav {
  margin-top: 12px;
  padding-top: 12px;
}

.wizard-nav .btn-primary {
  flex: 1;
  max-width: 220px;
  margin-left: auto;
}

.combo-wrap {
  position: relative;
  margin-top: 6px;
}

.combo-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 40;
  max-height: 200px;
  overflow-y: auto;
  background: #0a0a0a;
  border: 1px solid var(--app-border-strong);
  border-radius: var(--app-radius-sm);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
}

.combo-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--app-text);
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
}

.combo-item:hover,
.combo-item.active {
  background: rgba(255, 255, 255, 0.08);
}

.wizard-pane label select {
  cursor: pointer;
}

.wizard-pane select option {
  background: #0a0a0a;
  color: var(--app-text);
}

#authModal {
  color: #ffffff;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.16);
}

#authModal h2,
#authModal h3,
#authModal p,
#authModal label,
#authModal .auth-field > span,
#authModal .landing-brand,
#authModal .auth-brand-eyebrow {
  color: #ffffff !important;
}

#authModal .auth-brand-eyebrow {
  color: rgba(255, 255, 255, 0.55) !important;
}

#authModal .auth-sub,
#authModal .auth-brand-copy,
#authModal .auth-foot {
  color: rgba(255, 255, 255, 0.85) !important;
}

#authModal .auth-field input,
#authModal .auth-field select {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

#authModal .auth-submit {
  background: #ffffff !important;
  color: #000000 !important;
}

#authModal .auth-link {
  color: #ffffff !important;
}

#authModal .auth-close {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* Responsive */
@media (max-width: 960px) {
  .grid.two { grid-template-columns: 1fr; }
  .manual-grid { grid-template-columns: repeat(2, 1fr); }
  .panel-hero-row { flex-direction: column; }
  .panel-hero-row .setup-checklist { justify-content: flex-start; }
}

@media (max-width: 900px) {
  .app-subheader-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .pipeline-compact {
    max-width: 100%;
  }
}

@media (max-height: 640px) {
  .onboarding-wizard {
    height: calc(100vh - 64px);
    padding: 8px 16px;
    align-items: stretch;
  }

  .wizard-shell {
    max-height: calc(100vh - 80px);
    width: min(560px, 100%);
    padding: 16px 18px 12px;
    border-radius: 16px;
  }

  .wizard-shell-wide {
    width: min(100%, calc(100vw - 24px));
  }

  .wizard-progress {
    margin-bottom: 12px;
  }

  .wizard-step-eyebrow {
    margin-bottom: 10px;
  }

  .wizard-title {
    font-size: 20px;
    margin-bottom: 6px;
  }

  .wizard-lead {
    font-size: 13px;
    margin-bottom: 10px;
  }

  .wizard-pane label {
    margin-bottom: 10px;
  }

  .wizard-pane textarea,
  #setupTargetRoles,
  #setupStrongFit {
    min-height: 72px;
    max-height: min(18vh, 140px);
  }

  .wizard-nav {
    padding-top: 12px;
  }

  .wizard-nav .btn-primary {
    max-width: none;
    min-width: 140px;
  }
}

@media (max-width: 640px) {
  .app-header-inner,
  #appMain,
  .app-subheader-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .badge { max-width: 140px; font-size: 11px; }
  .app-brand-tag { display: none; }

  .wizard-shell-wide {
    width: min(100%, calc(100vw - 24px));
  }

  .wizard-shell-wide .resume-step-body {
    grid-template-columns: 1fr;
  }

  .resume-block-grid {
    grid-template-columns: 1fr;
  }

  .jobs-filters-panel {
    right: 0;
    left: auto;
    min-width: min(100%, calc(100vw - 32px));
    flex-direction: column;
    align-items: stretch;
  }

  .jobs-filters-panel select,
  .jobs-filters-panel input[type="search"] {
    width: 100%;
    flex: none;
  }

  .responses-inline-row,
  .responses-field-row {
    grid-template-columns: 1fr;
  }
}
