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

:root {
  --bg:          #F1F5F9;
  --surface:     #FFFFFF;
  --surface-2:   #F8FAFC;
  --border:      #E2E8F0;
  --border-focus:#6366F1;
  --primary:     #6366F1;
  --primary-2:   #8B5CF6;
  --success:     #10B981;
  --danger:      #EF4444;
  --warn:        #F59E0B;
  --text:        #0F172A;
  --text-2:      #475569;
  --muted:       #94A3B8;
  --shadow-sm:   0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:   0 4px 16px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.05);
  --radius:      12px;
  --radius-sm:   8px;
  --radius-xs:   6px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
}

/* ── Header ────────────────────────────────────────────────── */
header {
  background: var(--surface);
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.logo {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.4px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

#api-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 20px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
#api-status::before { content: "●"; font-size: 8px; }
#api-status.connected    { color: var(--success); border-color: #D1FAE5; background: #F0FDF4; }
#api-status.connected::before { color: var(--success); }
#api-status.disconnected { color: var(--danger);  border-color: #FEE2E2; background: #FFF5F5; }
#api-status.disconnected::before { color: var(--danger); }

/* ── Banner ─────────────────────────────────────────────────── */
#banner {
  font-size: 13px;
  font-weight: 500;
  padding: 10px 28px;
  display: none;
}
#banner.warn  { background: #FFFBEB; color: #92400E; border-bottom: 1px solid #FDE68A; display: block; }
#banner.error { background: #FFF5F5; color: #9B1C1C; border-bottom: 1px solid #FCA5A5; display: block; }
#banner.ok    { background: #F0FDF4; color: #065F46; border-bottom: 1px solid #A7F3D0; display: block; }

/* ── Navigation ─────────────────────────────────────────────── */
nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
nav::-webkit-scrollbar { display: none; }

.tab-btn {
  padding: 14px 18px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  position: relative;
}
.tab-btn:hover { color: var(--text-2); }
.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

/* ── Usage bar ───────────────────────────────────────────────── */
#usage-bar {
  display: flex;
  gap: 10px;
  padding: 10px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.usage-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  min-width: 160px;
}
.usage-icon { font-size: 13px; }
.usage-label { color: var(--muted); font-weight: 400; }
.usage-val { font-weight: 700; color: var(--text); margin-right: 4px; }
.usage-track {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  min-width: 40px;
}
.usage-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--primary);
  transition: width 0.4s ease;
}
.usage-pill.warn .usage-fill  { background: var(--warn); }
.usage-pill.danger .usage-fill { background: var(--danger); }
.usage-pill.warn .usage-val  { color: var(--warn); }
.usage-pill.danger .usage-val { color: var(--danger); }

/* ── Page layout ─────────────────────────────────────────────── */
.tab-panel {
  display: none;
  padding: 32px 28px 48px;
  max-width: 860px;
  margin: 0 auto;
}
.tab-panel.active { display: block; }

/* ── Section headings ────────────────────────────────────────── */
.page-header { margin-bottom: 24px; }
.section-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--text);
  margin-bottom: 4px;
}
.section-sub {
  font-size: 13px;
  color: var(--muted);
}

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.card-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  margin-bottom: 16px;
}

/* ── Labels ──────────────────────────────────────────────────── */
label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 6px;
}
.label-opt {
  font-weight: 400;
  color: var(--muted);
  font-size: 11px;
  margin-left: 4px;
}

/* ── Inputs ──────────────────────────────────────────────────── */
input[type="text"],
input[type="password"],
input[type="date"],
textarea,
select {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  padding: 10px 13px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  resize: vertical;
}
input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(99,102,241,.12);
  background: var(--surface);
}
input::placeholder, textarea::placeholder { color: var(--muted); }
textarea { min-height: 110px; }
textarea.tall  { min-height: 170px; }
textarea.short { min-height: 80px; }
textarea[readonly] {
  background: var(--surface-2);
  color: var(--text-2);
  cursor: default;
  font-family: 'SFMono-Regular', Consolas, 'Courier New', monospace;
  font-size: 12px;
}
select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394A3B8' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }

/* ── Row layout ──────────────────────────────────────────────── */
.row { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.field { flex: 1; min-width: 140px; }
.field-sm { width: 160px; flex: none; }

/* ── Buttons ─────────────────────────────────────────────────── */
button {
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 10px 20px;
  transition: opacity 0.15s, transform 0.1s, box-shadow 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
button:hover:not(:disabled) { opacity: 0.9; transform: translateY(-1px); }
button:active:not(:disabled) { transform: translateY(0); }
button:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(99,102,241,.35);
}
.btn-primary:hover:not(:disabled) {
  box-shadow: 0 4px 16px rgba(99,102,241,.45);
}

.btn-ghost {
  background: var(--surface-2);
  color: var(--text-2);
  border: 1px solid var(--border);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--surface);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-success { background: linear-gradient(135deg, #10B981, #059669); color: #fff; }

/* ── Button row ──────────────────────────────────────────────── */
.btn-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
  flex-wrap: wrap;
}
.status { font-size: 12px; font-weight: 500; color: var(--muted); }
.status.ok  { color: var(--success); }
.status.err { color: var(--danger); }

/* ── Output header ───────────────────────────────────────────── */
.output-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.output-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
}

/* ── Char count ──────────────────────────────────────────────── */
.char-count { font-size: 12px; font-weight: 500; }
.char-count.ok  { color: var(--success); }
.char-count.err { color: var(--danger); }

/* ── Info list ───────────────────────────────────────────────── */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.info-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.info-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}
.info-text { font-size: 12px; color: var(--text-2); line-height: 1.4; }
.info-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
  cursor: pointer;
  text-decoration: none;
}
.info-link:hover { text-decoration: underline; }

/* ── Divider ─────────────────────────────────────────────────── */
hr { border: none; border-top: 1px solid var(--border); margin: 18px 0; }

/* ── Resume upload header ── */
.resume-input-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.resume-input-header label { margin-bottom: 0; }
.upload-area { display: flex; align-items: center; gap: 8px; }
.btn-sm { padding: 5px 12px; font-size: 12px; }

/* ── Format selector ── */
.format-selector { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 6px; }
.radio-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
}
.radio-label input[type="radio"] {
  width: 15px; height: 15px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

/* ── Scrape jobs ── */
.sources-preview {
  font-size: 11px;
  color: var(--muted);
  padding: 6px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  min-height: 30px;
  display: flex;
  align-items: center;
}
.source-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-pill {
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  transition: all 0.15s;
}
.filter-pill.active, .filter-pill:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.job-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 8px;
  background: var(--surface-2);
  transition: border-color 0.15s, background 0.15s;
}
.job-row:hover { border-color: var(--primary); background: #EEF2FF; }
.job-info { flex: 1; min-width: 0; margin-right: 12px; }
.job-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.job-actions a.btn-ghost { text-decoration: none; }
.job-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.job-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.source-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  background: #EEF2FF;
  border: 1px solid #C7D2FE;
  color: var(--primary);
  margin-left: 6px;
}

/* ── Gap Analysis ────────────────────────────────────────────── */
.fit-badge {
  font-size: 13px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  background: var(--surface-2);
  color: var(--text-2);
  border: 1px solid var(--border);
}
.fit-badge.high   { background: #F0FDF4; color: #065F46; border-color: #A7F3D0; }
.fit-badge.medium { background: #FFFBEB; color: #92400E; border-color: #FDE68A; }
.fit-badge.low    { background: #FFF5F5; color: #9B1C1C; border-color: #FCA5A5; }

.gap-dimensions { display: flex; flex-direction: column; gap: 10px; }
.dim-row { display: flex; align-items: center; gap: 12px; }
.dim-label {
  width: 140px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  flex-shrink: 0;
}
.dim-bar-bg {
  flex: 1;
  height: 7px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.dim-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  transition: width 0.6s cubic-bezier(.4,0,.2,1);
}
.dim-score {
  width: 28px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  text-align: right;
  flex-shrink: 0;
}
.dim-note {
  font-size: 11px;
  color: var(--muted);
  flex: 1.2;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gap-section { margin-bottom: 14px; }
.gap-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.gap-section-title::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.gap-section-title.hard     { color: #9B1C1C; }
.gap-section-title.hard::before     { background: var(--danger); }
.gap-section-title.soft     { color: #92400E; }
.gap-section-title.soft::before     { background: var(--warn); }
.gap-section-title.strength { color: #065F46; }
.gap-section-title.strength::before { background: var(--success); }

.gap-items { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.gap-items li {
  font-size: 12px;
  color: var(--text-2);
  padding: 6px 10px;
  border-radius: var(--radius-xs);
  background: var(--surface-2);
  border-left: 3px solid;
}
.gap-items.hard     li { border-color: var(--danger);  }
.gap-items.soft     li { border-color: var(--warn);    }
.gap-items.strength li { border-color: var(--success); }

/* ── Pipeline steps ──────────────────────────────────────────── */
.steps { display: flex; flex-direction: column; gap: 4px; }
.step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
  transition: background 0.2s, border-color 0.2s;
}
.step .dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  background: var(--surface);
  transition: all 0.2s;
}
.step.done {
  background: #F0FDF4;
  border-color: #A7F3D0;
  color: var(--text);
}
.step.done .dot {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}
.step.running {
  background: #EEF2FF;
  border-color: #C7D2FE;
  color: var(--text);
}
.step.running .dot {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.step .step-file {
  margin-left: auto;
  font-size: 11px;
  font-weight: 500;
  color: var(--success);
}

/* ── Overleaf hint ───────────────────────────────────────────── */
.hint {
  margin-top: 10px;
  padding: 10px 14px;
  background: #EEF2FF;
  border-radius: var(--radius-xs);
  font-size: 12px;
  color: #4338CA;
  border: 1px solid #C7D2FE;
}
.hint a { color: var(--primary); font-weight: 600; }

/* ── Step badge ──────────────────────────────────────────────── */
.step-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--primary);
  background: #EEF2FF;
  border: 1px solid #C7D2FE;
  border-radius: 12px;
  padding: 3px 12px;
}

/* ── Filter section ──────────────────────────────────────────── */
.filter-section { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filter-section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  min-width: 36px;
  flex-shrink: 0;
}

/* ── Results toolbar ─────────────────────────────────────────── */
.results-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0 8px;
  border-top: 1px solid var(--border);
  margin-top: 12px;
  flex-wrap: wrap;
  gap: 8px;
}
.results-count { font-size: 13px; color: var(--text-2); font-weight: 500; }
.fit-count-a {
  font-size: 11px; font-weight: 700; color: #065F46;
  background: #F0FDF4; border: 1px solid #A7F3D0;
  border-radius: 10px; padding: 2px 8px; margin-left: 6px;
}
.fit-count-b {
  font-size: 11px; font-weight: 700; color: #92400E;
  background: #FFFBEB; border: 1px solid #FDE68A;
  border-radius: 10px; padding: 2px 8px; margin-left: 4px;
}
.toolbar-actions { display: flex; gap: 6px; }

/* ── Job row with checkbox ───────────────────────────────────── */
.job-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}
.job-row.selected {
  border-color: var(--primary);
  background: #EEF2FF;
}

/* ── Sticky batch action bar ─────────────────────────────────── */
#batch-action-bar {
  position: sticky;
  bottom: 0;
  z-index: 50;
  padding: 0 28px;
  margin: 0 -28px;
}
.batch-bar-inner {
  background: var(--primary);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: 0 -4px 20px rgba(99,102,241,.3);
}
.batch-count { font-size: 14px; font-weight: 600; }
.batch-bar-inner .btn-ghost {
  background: rgba(255,255,255,.15);
  border-color: rgba(255,255,255,.3);
  color: white;
}
.batch-bar-inner .btn-primary {
  background: white;
  color: var(--primary);
  box-shadow: none;
}

/* ── Batch generate panel ────────────────────────────────────── */
.batch-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-top: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.batch-panel-title { font-size: 16px; font-weight: 700; color: var(--text); }
.batch-panel-sub   { font-size: 12px; color: var(--muted); margin-top: 3px; }

.batch-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin-bottom: 12px;
  background: var(--surface-2);
  transition: border-color 0.15s;
}
.batch-card:has(textarea:focus) { border-color: var(--primary); }

.batch-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
  gap: 12px;
}
.batch-card-title { font-size: 14px; font-weight: 600; color: var(--text); }
.batch-card-meta  { font-size: 12px; color: var(--muted); margin-top: 2px; }
.batch-card-meta a { color: var(--primary); text-decoration: none; }
.batch-card-meta a:hover { text-decoration: underline; }
.batch-card-status { flex-shrink: 0; font-size: 12px; font-weight: 600; }

.batch-jd {
  width: 100%;
  min-height: 130px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 12px;
  color: var(--text-2);
  padding: 10px 12px;
  resize: vertical;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
.batch-jd:focus { border-color: var(--primary); }

.batch-fetching { color: var(--muted); }
.batch-fetch-ok   { color: var(--success); }
.batch-fetch-warn { color: var(--warn); }

.batch-card-output { margin-top: 10px; }
.batch-downloads { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Fit score badges (job list) ─────────────────────────────── */
.job-row { gap: 10px; }
.job-fit-badge {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  border: 1px solid;
  cursor: default;
}
.fit-badge-a       { background: #F0FDF4; color: #065F46; border-color: #A7F3D0; }
.fit-badge-b       { background: #FFFBEB; color: #92400E; border-color: #FDE68A; }
.fit-badge-c       { background: #FFF5F5; color: #9B1C1C; border-color: #FCA5A5; }
.fit-badge-unknown { background: var(--surface-2); color: var(--muted); border-color: var(--border); }

.filter-pill.fit-a.active { background: #10B981; border-color: #10B981; }
.filter-pill.fit-a:hover  { background: #10B981; border-color: #10B981; }
.filter-pill.fit-b.active { background: #F59E0B; border-color: #F59E0B; }
.filter-pill.fit-b:hover  { background: #F59E0B; border-color: #F59E0B; }

/* ── Application Tracker ─────────────────────────────────────── */
.tracker-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.stat-pill {
  flex: 1;
  min-width: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.stat-count {
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
}
.stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
}
.stat-applied     .stat-count { color: var(--primary); }
.stat-interviewing .stat-count { color: #F59E0B; }
.stat-offer       .stat-count { color: var(--success); }
.stat-rejected    .stat-count { color: var(--muted); }

.tracker-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.tracker-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.tracker-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text-2);
}
.tracker-table tr:last-child td { border-bottom: none; }
.tracker-table tr:hover td { background: #F8FAFF; }

.tr-title { font-weight: 600; color: var(--text); }
.tr-title a { color: var(--primary); text-decoration: none; }
.tr-title a:hover { text-decoration: underline; }
.tr-company { font-size: 11px; color: var(--muted); margin-top: 2px; }
.tr-notes { max-width: 200px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-actions { display: flex; gap: 6px; white-space: nowrap; }
.tr-delete { color: var(--danger) !important; }
.tr-delete:hover { background: #FFF5F5 !important; border-color: var(--danger) !important; }

.tr-edit-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  padding: 8px 0;
}
.tr-edit-input {
  flex: 1;
  min-width: 100px;
  padding: 6px 10px;
  font-size: 12px;
}

.tr-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid;
}
.status-applied      { background: #EEF2FF; color: #4338CA; border-color: #C7D2FE; }
.status-interviewing { background: #FFFBEB; color: #92400E; border-color: #FDE68A; }
.status-offer        { background: #F0FDF4; color: #065F46; border-color: #A7F3D0; }
.status-rejected     { background: var(--surface-2); color: var(--muted); border-color: var(--border); }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 640px) {
  .tab-panel { padding: 20px 16px 40px; }
  .row { flex-direction: column; }
  .field-sm { width: 100%; }
  .info-grid { grid-template-columns: 1fr; }
  .dim-note { display: none; }
  .tracker-stats { gap: 8px; }
  .stat-pill { min-width: 70px; padding: 12px 8px; }
  .stat-count { font-size: 22px; }
  .tracker-table th:nth-child(4),
  .tracker-table td:nth-child(4),
  .tracker-table th:nth-child(5),
  .tracker-table td:nth-child(5) { display: none; }
}
