/* ═══════════════════════════════════════════════════════════
   JobSearchPrep v2 — Design System
   Shared by dashboard.html, admin.html, login/signup/reset
═══════════════════════════════════════════════════════════ */

:root {
  --navy-900: #0A1628;
  --navy-800: #111F3A;
  --navy-700: #1B2D4F;
  --navy-600: #2A3E63;
  --navy-500: #3B4E75;
  --navy-100: #E8EDF5;
  --ink: #0F172A;
  --ink-2: #334155;
  --ink-3: #64748B;
  --ink-4: #94A3B8;
  --line: #E2E8F0;
  --line-soft: #F1F5F9;
  --paper: #FAF8F3;
  --paper-2: #F5F2EA;
  --surface: #FFFFFF;
  --gold: #C8971F;
  --gold-soft: #E8D9A8;
  --gold-bright: #E0AA20;
  --gold-bg: rgba(200, 151, 31, 0.08);
  --accent: #0F766E;
  --accent-bg: rgba(15, 118, 110, 0.08);
  --red: #B91C1C;
  --red-bg: rgba(185, 28, 28, 0.08);
  --amber: #D97706;
  --amber-bg: rgba(217, 119, 6, 0.08);
  --green: #047857;
  --green-bg: rgba(4, 120, 87, 0.08);
  --radius: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 20px 60px rgba(15, 23, 42, 0.12);
  --sidebar-w: 240px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Typography ─── */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.display em { font-style: italic; color: var(--gold); font-weight: 500; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.eyebrow--gold { color: var(--gold); }
h1.page-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--navy-900);
  margin-bottom: 6px;
}
.page-sub { color: var(--ink-3); font-size: 14px; margin-bottom: 32px; }

/* ─── Layout: Auth (login/signup) ─── */
.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.auth-aside {
  background: var(--navy-900);
  color: white;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.auth-aside::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 20% 80%, rgba(200, 151, 31, 0.15), transparent 50%);
  pointer-events: none;
}
.auth-aside > * { position: relative; }
.auth-aside-quote {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.auth-aside-quote em { color: var(--gold); font-style: italic; }
.auth-aside-foot { font-size: 13px; color: rgba(255,255,255,0.5); }
.auth-main {
  display: flex; align-items: center; justify-content: center;
  padding: 48px;
}
.auth-card { width: 100%; max-width: 420px; }
.auth-logo {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  color: var(--navy-900);
  text-decoration: none;
  margin-bottom: 48px;
  display: inline-block;
}
.auth-logo em { color: var(--gold); font-style: italic; font-weight: 400; }
.auth-card h1 {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--navy-900);
  margin-bottom: 12px;
}
.auth-card > p { color: var(--ink-3); margin-bottom: 32px; font-size: 15px; }
.auth-switch { margin-top: 32px; font-size: 14px; color: var(--ink-3); text-align: center; }
.auth-switch a { color: var(--gold); font-weight: 500; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }
@media (max-width: 900px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-main { padding: 32px 20px; }
}

/* ─── Layout: App (dashboard/admin) ─── */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}
.sidebar {
  background: var(--navy-900);
  color: white;
  padding: 28px 20px;
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
}
.sidebar-logo {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  color: white;
  text-decoration: none;
  margin-bottom: 8px;
  padding: 0 8px;
}
.sidebar-logo em { color: var(--gold); font-style: italic; font-weight: 400; }
.sidebar-tier {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 0 8px;
  margin-bottom: 32px;
}
.sidebar-nav { flex: 1; }
.sidebar-section {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  padding: 16px 8px 8px;
}
.sidebar a.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 2px;
}
.sidebar a.nav-item:hover { background: rgba(255,255,255,0.06); color: white; }
.sidebar a.nav-item.is-active {
  background: rgba(200, 151, 31, 0.15);
  color: var(--gold-soft);
  border-left: 2px solid var(--gold);
  padding-left: 10px;
}
.sidebar a.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.sidebar-foot {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 16px;
  margin-top: 16px;
}
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 8px;
}
.sidebar-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--gold);
  color: var(--navy-900);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
}
.sidebar-user-name { font-size: 13px; color: white; font-weight: 500; line-height: 1.2; }
.sidebar-user-email { font-size: 11px; color: rgba(255,255,255,0.5); line-height: 1.2; }
.sidebar-foot a {
  display: block;
  padding: 8px 12px;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 13px;
  border-radius: var(--radius);
}
.sidebar-foot a:hover { background: rgba(255,255,255,0.05); color: white; }

.main {
  padding: 40px 48px;
  max-width: 1400px;
  width: 100%;
}

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; padding: 16px; }
  .sidebar-logo, .sidebar-tier { margin-bottom: 0; }
  .sidebar-nav { display: flex; flex-wrap: wrap; gap: 4px; width: 100%; margin-top: 12px; }
  .sidebar-section { display: none; }
  .sidebar a.nav-item { padding: 8px 12px; font-size: 13px; }
  .sidebar-foot { display: none; }
  .main { padding: 24px 20px; }
}

/* ─── Cards & surfaces ─── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.card--flat { background: transparent; border-color: var(--line); }

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  background: transparent;
  color: inherit;
}
.btn--primary { background: var(--navy-900); color: white; }
.btn--primary:hover { background: var(--navy-800); }
.btn--gold { background: var(--gold); color: white; }
.btn--gold:hover { background: var(--gold-bright); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--navy-900); background: var(--surface); }
.btn--danger { background: transparent; color: var(--red); border-color: var(--line); }
.btn--danger:hover { background: var(--red-bg); border-color: var(--red); }
.btn--sm { padding: 6px 12px; font-size: 13px; }
.btn--lg { padding: 13px 24px; font-size: 15px; }
.btn--block { display: flex; width: 100%; justify-content: center; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }

/* ─── Forms ─── */
label.field {
  display: block;
  margin-bottom: 20px;
}
label.field > span:first-child {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}
.input, .textarea, .select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 14px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-bg);
}
.textarea { resize: vertical; min-height: 100px; font-family: var(--font-body); line-height: 1.5; }
.select { cursor: pointer; }
.field-hint { font-size: 12px; color: var(--ink-3); margin-top: 4px; }

/* ─── Badges ─── */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 100px;
  border: 1px solid transparent;
}
.badge--gold   { background: var(--gold-bg);   color: var(--gold);   border-color: rgba(200,151,31,0.2); }
.badge--accent { background: var(--accent-bg); color: var(--accent); border-color: rgba(15,118,110,0.2); }
.badge--red    { background: var(--red-bg);    color: var(--red);    border-color: rgba(185,28,28,0.2); }
.badge--amber  { background: var(--amber-bg);  color: var(--amber);  border-color: rgba(217,119,6,0.2); }
.badge--green  { background: var(--green-bg);  color: var(--green);  border-color: rgba(4,120,87,0.2); }
.badge--muted  { background: var(--line-soft); color: var(--ink-3);  border-color: var(--line); }

/* ─── Tables ─── */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
table.data th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 14px 20px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.data td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
table.data tr:last-child td { border-bottom: none; }
table.data tr:hover td { background: var(--paper); }
table.data td.cell-title { font-weight: 500; color: var(--navy-900); }
table.data td.cell-mono { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); }

/* ─── Empty state ─── */
.empty {
  text-align: center;
  padding: 80px 24px;
  color: var(--ink-3);
}
.empty-icon {
  width: 56px; height: 56px;
  background: var(--paper-2);
  border-radius: 50%;
  margin: 0 auto 20px;
  display: flex; align-items: center; justify-content: center;
}
.empty-icon svg { width: 24px; height: 24px; color: var(--gold); }
.empty h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  color: var(--navy-900);
  margin-bottom: 8px;
}
.empty p { max-width: 380px; margin: 0 auto 24px; font-size: 14px; }

/* ─── Stats grid ─── */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  position: relative;
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 10px;
}
.stat-value {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 500;
  color: var(--navy-900);
  line-height: 1;
  letter-spacing: -0.02em;
}
.stat-change {
  font-size: 12px;
  color: var(--green);
  margin-top: 8px;
}
.stat-change.is-neg { color: var(--red); }

/* ─── Toolbar ─── */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}
.toolbar h1 { flex: 1; }
.toolbar-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ─── Modal ─── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(10, 22, 40, 0.6);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.modal-backdrop.is-open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: transform 0.25s;
}
.modal-backdrop.is-open .modal { transform: translateY(0); }
.modal--wide { max-width: 900px; }
.modal-head {
  padding: 24px 28px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-head h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  color: var(--navy-900);
}
.modal-close {
  background: none;
  border: none;
  color: var(--ink-3);
  cursor: pointer;
  padding: 4px;
  line-height: 0;
}
.modal-close:hover { color: var(--ink); }
.modal-body { padding: 28px; }
.modal-foot {
  padding: 20px 28px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: flex-end; gap: 10px;
  background: var(--paper);
}

/* ─── Toasts ─── */
.jsp-toasts {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 200;
  display: flex; flex-direction: column; gap: 10px;
}
.jsp-toast {
  background: var(--navy-900);
  color: white;
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  max-width: 360px;
  transform: translateX(20px);
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
}
.jsp-toast.is-in { opacity: 1; transform: translateX(0); }
.jsp-toast--success { border-left: 3px solid var(--green); }
.jsp-toast--error { border-left: 3px solid var(--red); background: var(--red); }
.jsp-toast--info { border-left: 3px solid var(--gold); }

/* ─── Kanban (campaign view) ─── */
.kanban {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  align-items: start;
}
.kanban-col {
  background: var(--paper-2);
  border-radius: var(--radius-lg);
  padding: 12px;
  min-height: 300px;
}
.kanban-col-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.kanban-col-count {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 11px;
  color: var(--ink-2);
}
.kanban-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.15s;
}
.kanban-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.kanban-card-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  color: var(--navy-900);
  margin-bottom: 4px;
  line-height: 1.25;
}
.kanban-card-company {
  font-size: 12px;
  color: var(--ink-3);
  margin-bottom: 10px;
}
.kanban-card-meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px;
  color: var(--ink-3);
  flex-wrap: wrap;
}
.kanban-card.is-stale { border-left: 2px solid var(--amber); }
@media (max-width: 1200px) {
  .kanban { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .kanban { grid-template-columns: 1fr; }
}

/* ─── Plan / upgrade callout ─── */
.plan-card {
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  color: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.plan-card::before {
  content: '';
  position: absolute; top: -20px; right: -20px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, var(--gold), transparent 70%);
  opacity: 0.3;
}
.plan-card-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}
.plan-card-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 10px;
  position: relative;
}
.plan-card-name em { color: var(--gold); font-style: italic; }
.plan-card-cta {
  font-size: 12px;
  color: var(--gold-soft);
  text-decoration: none;
  font-weight: 500;
  position: relative;
}
.plan-card-cta:hover { color: var(--gold); }

/* ─── Spinner ─── */
.spin {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
  vertical-align: -2px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Utility ─── */
.row { display: flex; align-items: center; gap: 12px; }
.row--between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack--lg { gap: 24px; }
.mt-0 { margin-top: 0 !important; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.muted { color: var(--ink-3); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.mono { font-family: var(--font-mono); }
[hidden] { display: none !important; }

/* ═══════════════════════════════════════════════════════════
   APPLICATIONS VIEW (v2.2 unified case-file)
   ═══════════════════════════════════════════════════════════ */

/* Filter bar */
.apps-filterbar {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 24px;
  width: fit-content;
}
.apps-filter {
  background: transparent;
  border: none;
  padding: 8px 16px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-3);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}
.apps-filter:hover { color: var(--navy-900); }
.apps-filter.is-active {
  background: white;
  color: var(--navy-900);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

/* Application cards grid */
.apps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 1100px) {
  .apps-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Single application card */
.app-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.app-card:hover {
  border-color: var(--gold);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}

.app-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.app-card-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  color: var(--navy-900);
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-bottom: 4px;
}
.app-card-company {
  font-size: 14px;
  color: var(--ink-2);
}
.app-card-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  text-align: right;
  white-space: nowrap;
}
.app-card-stale {
  display: inline-block;
  background: rgba(217, 119, 6, 0.1);
  color: #b45309;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 100px;
  margin-top: 4px;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
}

/* Fit score comparison */
.app-fits {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 16px;
  background: var(--paper);
  border-radius: 8px;
}
.fit-block {
  text-align: center;
  padding: 8px;
}
.fit-block-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 4px;
}
.fit-block-score {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.01em;
}
.fit-block-score--low    { color: #b45309; }
.fit-block-score--mid    { color: var(--ink-2); }
.fit-block-score--high   { color: #047857; }
.fit-block-score--placeholder { color: var(--ink-3); font-size: 24px; opacity: 0.6; }

/* ─── Three-tier resume cards ────────────────────────────── */
.resume-tier-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
@media (max-width: 900px) {
  .resume-tier-grid { grid-template-columns: 1fr; }
}
.resume-tier {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
}
.resume-tier--dimmed { opacity: 0.6; }
.resume-tier--dimmed:hover { opacity: 1; }
.resume-tier--expert {
  background: linear-gradient(180deg, var(--surface), var(--paper));
}
.resume-tier--featured {
  border: 2px solid var(--gold);
  box-shadow: 0 0 0 3px rgba(200, 151, 31, 0.08);
  background: linear-gradient(180deg, #fdfaf0, #f9f4e4);
}
.tier-star {
  color: var(--gold);
  font-size: 14px;
  margin-left: 4px;
  vertical-align: middle;
}
@media (max-width: 900px) {
  /* Stack tiers vertically on narrow screens */
  .modal .resume-tier { margin-bottom: 12px; }
}
.fit-block-status {
  font-size: 10px;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 4px;
  color: var(--ink-3);
}
.fit-block-status--unverified { color: #b45309; }
.fit-block-status--verified   { color: #047857; }
.fit-block-status--expert     { color: var(--gold); font-weight: 600; }
.fit-block-arrow {
  color: var(--gold);
  font-size: 22px;
  font-weight: 300;
}

/* Progress timeline (click-to-advance) */
.app-progress {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 4px 0;
}
.progress-stage {
  flex: 1;
  display: flex;
  align-items: center;
  position: relative;
}
.progress-stage:last-child { flex: 0 0 auto; }
.progress-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}
.progress-dot:hover { border-color: var(--gold); transform: scale(1.1); }
.progress-dot--complete {
  background: var(--gold);
  border-color: var(--gold);
}
.progress-dot--complete::after {
  content: '';
  width: 8px; height: 4px;
  border-left: 2px solid white;
  border-bottom: 2px solid white;
  transform: rotate(-45deg) translate(1px, -1px);
}
.progress-dot--current {
  background: white;
  border-color: var(--gold);
  border-width: 3px;
  box-shadow: 0 0 0 4px rgba(200, 151, 31, 0.15);
}
.progress-dot--rejected {
  background: var(--red);
  border-color: var(--red);
}
.progress-dot--rejected::after {
  content: '×';
  color: white;
  font-size: 16px;
  line-height: 1;
  font-weight: 500;
}
.progress-line {
  flex: 1;
  height: 2px;
  background: var(--line);
  margin: 0 -2px;
  position: relative;
  z-index: 1;
}
.progress-line--complete { background: var(--gold); }
.progress-label {
  position: absolute;
  top: 28px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.progress-stage--current .progress-label {
  color: var(--gold);
  font-weight: 500;
}

/* Action buttons row */
.app-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 28px; /* clearance for progress labels */
  flex-wrap: wrap;
}
.app-card-actions .btn { font-size: 13px; padding: 8px 14px; }

/* Upload dropzone */
.upload-dropzone {
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  background: var(--paper);
}
.upload-dropzone:hover {
  border-color: var(--gold);
  background: rgba(200, 151, 31, 0.04);
}
.upload-dropzone-inner { pointer-events: none; }
.upload-dropzone-filled { text-align: left; }

/* Empty state */
.apps-empty {
  text-align: center;
  padding: 96px 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.apps-empty-icon {
  width: 80px; height: 80px;
  margin: 0 auto 24px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  border: 1px solid var(--line);
}
.apps-empty h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  color: var(--navy-900);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.apps-empty p {
  color: var(--ink-3);
  font-size: 15px;
  max-width: 480px;
  margin: 0 auto 24px;
  line-height: 1.55;
}

/* Wider modal for application detail */
.modal--xwide { max-width: 920px; }
