/* Career Dashboard – Pedro's Design System
   Pure white backgrounds, soft drop shadows, rounded cards, Nunito font
   ========================================================================== */

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

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --text: #1a1a2e;
  --muted: #5a5a6e;
  --faint: #8e8e9a;
  --line: transparent;
  --hover: rgba(79, 140, 255, 0.06);
  --accent: #4f8cff;
  --accent-gradient: linear-gradient(135deg, #4f8cff 0%, #6366f1 100%);
  --shadow-sm: 2px 3px 8px rgba(0, 0, 0, 0.06);
  --shadow: 4px 6px 16px rgba(0, 0, 0, 0.08);
  --shadow-hover: 6px 8px 20px rgba(0, 0, 0, 0.12);
  --shadow-lg: 8px 12px 32px rgba(0, 0, 0, 0.1);
  --serif: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
  --sans: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
  --sidebar: 260px;
  --column: 920px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --radius-pill: 100px;
  color-scheme: light;
  
  /* Status colors */
  --status-accepted: #22c55e;
  --status-submitted: #4f8cff;
  --status-progress: #f59e0b;
  --status-oa: #8b5cf6;
  --status-interview: #06b6d4;
  --status-rejected: #ef4444;
  --status-stopped: #6b7280;
  --status-notapplied: #9ca3af;
}

html[data-theme="dark"] {
  --bg: #0f0f1a;
  --surface: #1a1a2e;
  --text: #f4f1ea;
  --muted: #b4b0a8;
  --faint: #7a7670;
  --hover: rgba(79, 140, 255, 0.12);
  --shadow-sm: 2px 3px 10px rgba(0, 0, 0, 0.25);
  --shadow: 4px 6px 20px rgba(0, 0, 0, 0.35);
  --shadow-hover: 6px 8px 28px rgba(0, 0, 0, 0.45);
  --shadow-lg: 8px 12px 40px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 500;
}

::selection { background: rgba(79, 140, 255, 0.2); }

:focus { outline: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

[hidden] { display: none !important; }

button, input, select, textarea { font: inherit; color: inherit; }

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 80;
  background: var(--surface);
  color: var(--text);
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow);
  font-weight: 600;
}

.skip:focus { top: 16px; }

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app { display: flex; align-items: stretch; min-height: 100vh; }

/* Sidebar */
.sidebar {
  width: var(--sidebar);
  flex: none;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  padding: 24px 16px 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
  border-radius: 0 var(--radius-xl) var(--radius-xl) 0;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 12px 0;
}

.brand-mark {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--accent-gradient);
  flex: none;
}

.brand-title {
  font-family: var(--serif);
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--text);
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 28px;
}

.nav-section {
  margin: 20px 12px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: var(--radius-lg);
  color: var(--muted);
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.nav-btn:hover {
  color: var(--accent);
  background: var(--hover);
}

.nav-btn[aria-current="page"] {
  color: var(--accent);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.nav-text { min-width: 0; }

.count {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--faint);
  background: var(--hover);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
}

.icon path,
.icon circle,
.icon rect,
.icon line {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-foot {
  margin-top: auto;
  padding: 20px 12px 4px;
}

.foot-name { margin: 0; font-size: 14px; font-weight: 700; }

.foot-meta {
  margin: 6px 0 0;
  color: var(--faint);
  font-size: 12px;
  line-height: 1.5;
}

/* Main */
.main { flex: 1; min-width: 0; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  background: var(--bg);
  padding: 8px 0;
}

.topbar-inner {
  width: min(var(--column), 100%);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 40px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  border: 0;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  flex: none;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.icon-btn:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.menu { display: none; }

#search-form { margin-left: auto; }

.search {
  position: relative;
  width: min(340px, 50vw);
}

.search input {
  width: 100%;
  height: 42px;
  box-sizing: border-box;
  padding: 0 40px 0 16px;
  border-radius: var(--radius-pill);
  border: 0;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease;
}

.search input::placeholder { color: var(--faint); }
.search input::-webkit-search-cancel-button { display: none; }

.search input:focus {
  box-shadow: var(--shadow), 0 0 0 2px var(--accent);
}

.clear-q {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--hover);
  color: var(--muted);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  transition: all 0.15s ease;
}

.clear-q:hover { background: var(--accent); color: white; }

.scrim { display: none; }

#view { width: 100%; }

.wrap {
  width: min(var(--column), 100%);
  margin-inline: auto;
  padding: 32px 40px 80px;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 800;
  font-size: 42px;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.deck {
  margin: 14px 0 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.targets {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0 0;
  padding: 0;
}

.targets li {
  background: var(--surface);
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.targets span {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.targets strong {
  font-weight: 700;
  font-size: 15px;
}

/* Filters */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
  margin: 28px 0 12px;
  background: var(--surface);
  padding: 20px 24px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 100px;
  flex: 1 1 100px;
  max-width: 160px;
}

.filter-field span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.select { position: relative; }

.select select {
  appearance: none;
  width: 100%;
  margin: 0;
  padding: 10px 32px 10px 14px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease;
}

.select select:focus {
  box-shadow: var(--shadow-sm), 0 0 0 2px var(--accent);
}

.select::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 50%;
  transform: translateY(50%);
  width: 6px;
  height: 6px;
  border-right: 2px solid var(--faint);
  border-bottom: 2px solid var(--faint);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.reset,
.text-btn {
  background: none;
  border: 0;
  padding: 10px 18px;
  color: var(--accent);
  font-weight: 700;
  cursor: pointer;
  font-size: 13px;
  border-radius: var(--radius-pill);
  transition: background 0.2s ease;
}

.reset:hover, .text-btn:hover { background: var(--hover); }

.constraint {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 16px 0 0;
  font-size: 14px;
  background: var(--surface);
  padding: 14px 20px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.result-line {
  margin: 20px 0 16px;
  color: var(--faint);
  font-size: 13px;
  font-weight: 600;
}

.result-line strong {
  color: var(--text);
}

/* Cards */
.card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  margin: 0 0 18px;
  transition: all 0.25s ease;
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.card-toggle {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  padding: 24px 26px 20px;
  border-radius: var(--radius-xl);
  cursor: pointer;
}

.card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 20px;
  align-items: start;
}

.kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.flag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mark {
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--accent);
  display: inline-block;
  flex: none;
}

.card h2,
.firm-name,
.kw-term,
.cool h2 {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.card h2 {
  margin: 8px 0 0;
  font-size: 24px;
  line-height: 1.2;
}

.where {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.where strong { color: var(--text); font-weight: 700; }

.lede {
  margin: 12px 0 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.stack {
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.6;
}

.sep { color: var(--faint); margin: 0 10px; }

.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
  gap: 6px;
}

.meta > span {
  background: var(--hover);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-weight: 600;
}

.attention {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.read {
  display: inline-block;
  margin-top: 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--hover);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  transition: all 0.2s ease;
}

.card:hover .read,
.card.is-open .read { background: var(--accent); color: white; }

.fit { margin: 0; text-align: right; }

.fit-num {
  display: block;
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.fit.is-high .fit-num { color: var(--accent); }

.fit-label {
  display: block;
  margin-top: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.card-expand {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
}

.card.is-open .card-expand { grid-template-rows: 1fr; }

.card-expand-inner { overflow: hidden; }

.card-body { padding: 0 26px 24px; }

.rule {
  height: 2px;
  margin: 0 0 20px;
  background: var(--hover);
  border-radius: 1px;
}

.seed-note {
  margin: 0 0 14px;
  color: var(--faint);
  font-size: 13px;
  background: var(--hover);
  padding: 10px 14px;
  border-radius: var(--radius-md);
}

.prose {
  max-width: 62ch;
  font-size: 15px;
  line-height: 1.65;
}

.prose p { margin: 0 0 1em; }

.pull {
  margin: 6px 0 20px;
  padding: 16px 18px;
  background: var(--hover);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  max-width: 62ch;
}

.block { margin: 0 0 18px; }

.pull h3,
.block h3 {
  margin: 0 0 8px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

.pull p { margin: 0; font-size: 14px; line-height: 1.55; }

.kw {
  background: none;
  border: 0;
  padding: 2px 10px;
  font: inherit;
  color: var(--accent);
  cursor: pointer;
  font-weight: 600;
  background: var(--hover);
  border-radius: var(--radius-pill);
  transition: all 0.15s ease;
}

.kw:hover { background: var(--accent); color: white; }

.sources,
.quiet-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sources a,
.firm-meta a,
.jumps a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.sources a:hover,
.firm-meta a:hover,
.jumps a:hover { text-decoration: underline; }

.record {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 8px 14px;
  margin: 6px 0 0;
  font-size: 13px;
}

.record dt { margin: 0; color: var(--faint); font-weight: 600; }
.record dd { margin: 0; }

.jumps { margin: 20px 0 0; font-size: 14px; }

.jump {
  margin-right: 10px;
  display: inline-block;
  padding: 6px 14px;
  background: var(--surface);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

.jump:hover { box-shadow: var(--shadow); transform: translateY(-1px); }

.region-title { scroll-margin-top: 80px; }

.region-title {
  margin: 36px 0 0;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 30px;
  letter-spacing: -0.02em;
}

.group-label {
  margin: 24px 0 0;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.firm {
  padding: 18px 0;
}

.firm + .firm {
  border-top: 0;
  padding-top: 0;
}

.firm-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  background: var(--surface);
  padding: 18px 22px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.firm-top:hover {
  box-shadow: var(--shadow);
}

.firm-name-wrap {
  margin: 0;
  font-size: inherit;
  font-weight: 400;
}

.firm-name,
.opening {
  background: none;
  border: 0;
  padding: 0;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  color: var(--text);
  text-align: left;
  transition: color 0.15s ease;
}

.firm-name:hover, .opening:hover { color: var(--accent); }

.opening { text-align: right; }

.opening small,
.count-empty small {
  display: block;
  margin-top: 4px;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

.count-empty {
  font-family: var(--serif);
  font-size: 20px;
  color: var(--faint);
  text-align: right;
}

.firm-meta {
  margin: 10px 22px 0;
  color: var(--muted);
  font-size: 13px;
}

.firm-note {
  margin: 8px 22px 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

/* Keywords grid */
.keyword-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.keyword {
  display: block;
  text-align: left;
  background: var(--surface);
  color: inherit;
  border: 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 20px;
  cursor: pointer;
  font: inherit;
  transition: all 0.25s ease;
}

.keyword:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.keyword.is-active {
  box-shadow: 0 0 0 2px var(--accent), var(--shadow);
}

.kw-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.kw-term { font-size: 20px; line-height: 1.2; }

.kw-count {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 700;
  color: var(--faint);
  background: var(--hover);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.kw-why {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

/* Cooldown */
.cool .card-body { padding-top: 20px; }
.cool .prose { margin-top: 16px; }

.empty {
  padding: 40px 0 16px;
  text-align: center;
}

.empty-title {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.01em;
}

.empty p { margin: 0; color: var(--muted); max-width: 46ch; margin-inline: auto; }

.colophon {
  margin: 32px 0 0;
  max-width: 58ch;
  color: var(--faint);
  font-size: 13px;
  line-height: 1.55;
  background: var(--surface);
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

code {
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--hover);
  padding: 2px 6px;
  border-radius: 4px;
}

.noscript {
  width: min(var(--column), 100%);
  margin-inline: auto;
  padding: 40px;
}

/* ============================================
   Applications Tracker Styles
   ============================================ */

.app-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.25s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon svg {
  width: 22px;
  height: 22px;
  color: white;
  stroke: white;
  fill: none;
  stroke-width: 2;
}

.stat-icon.blue { background: linear-gradient(135deg, #4f8cff 0%, #6366f1 100%); }
.stat-icon.green { background: linear-gradient(135deg, #22c55e 0%, #10b981 100%); }
.stat-icon.purple { background: linear-gradient(135deg, #a855f7 0%, #8b5cf6 100%); }
.stat-icon.orange { background: linear-gradient(135deg, #f97316 0%, #f59e0b 100%); }
.stat-icon.cyan { background: linear-gradient(135deg, #06b6d4 0%, #0ea5e9 100%); }
.stat-icon.gray { background: linear-gradient(135deg, #6b7280 0%, #9ca3af 100%); }

.stat-content {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--faint);
  font-weight: 600;
}

/* Applications Filter Bar */
.app-filters {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 20px 24px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.app-search-container {
  position: relative;
  flex: 1;
  min-width: 180px;
}

.app-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--faint);
  pointer-events: none;
}

.app-search-input {
  width: 100%;
  padding: 10px 16px 10px 42px;
  background: var(--bg);
  border: none;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.app-search-input::placeholder { color: var(--faint); }

.app-search-input:focus {
  box-shadow: var(--shadow-sm), 0 0 0 2px var(--accent);
  outline: none;
}

.app-filter-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.app-filter-select {
  padding: 10px 36px 10px 14px;
  background: var(--bg);
  border: none;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.app-filter-select:focus {
  box-shadow: var(--shadow-sm), 0 0 0 2px var(--accent);
  outline: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-secondary {
  background: var(--bg);
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--surface);
  transform: translateY(-1px);
}

.btn-track {
  background: linear-gradient(135deg, #22c55e 0%, #10b981 100%);
  color: white;
  padding: 8px 14px;
  font-size: 12px;
}

.btn-track:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

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

/* Applications Table */
.table-container {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.table-wrapper {
  overflow-x: auto;
}

.app-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
}

.app-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.app-table td {
  padding: 16px 14px;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}

.app-table tr td:first-child {
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.app-table tr td:last-child {
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.app-table tbody tr {
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.app-table tbody tr:hover {
  box-shadow: var(--shadow);
}

.app-table tbody tr:hover td {
  background: var(--surface);
}

.app-company {
  font-weight: 700;
  color: var(--text);
}

.app-position {
  color: var(--muted);
  max-width: 260px;
}

.app-date {
  color: var(--faint);
  white-space: nowrap;
  font-weight: 600;
}

.app-details {
  color: var(--muted);
  font-size: 13px;
  max-width: 160px;
}

/* Status Pills */
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.status-accepted {
  background: rgba(34, 197, 94, 0.15);
  color: var(--status-accepted);
}

.status-submitted {
  background: rgba(79, 140, 255, 0.15);
  color: var(--status-submitted);
}

.status-progress {
  background: rgba(245, 158, 11, 0.15);
  color: var(--status-progress);
}

.status-oa {
  background: rgba(139, 92, 246, 0.15);
  color: var(--status-oa);
}

.status-interview {
  background: rgba(6, 182, 212, 0.15);
  color: var(--status-interview);
}

.status-rejected {
  background: rgba(239, 68, 68, 0.15);
  color: var(--status-rejected);
}

.status-stopped {
  background: rgba(107, 114, 128, 0.15);
  color: var(--status-stopped);
}

.status-notapplied {
  background: rgba(156, 163, 175, 0.15);
  color: var(--status-notapplied);
}

.portal-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s ease;
}

.portal-link:hover { color: #6366f1; }

.portal-link svg {
  width: 14px;
  height: 14px;
}

.action-btns {
  display: flex;
  gap: 6px;
}

.action-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--muted);
  box-shadow: var(--shadow-sm);
  transition: all 0.15s ease;
}

.action-btn:hover {
  color: var(--accent);
  transform: scale(1.08);
}

.action-btn.delete:hover {
  color: var(--status-rejected);
}

.action-btn svg {
  width: 16px;
  height: 16px;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 500px;
  margin: 20px;
  transform: scale(0.9) translateY(20px);
  transition: all 0.25s ease;
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.modal-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1.4rem;
  color: var(--muted);
  box-shadow: var(--shadow-sm);
  transition: all 0.15s ease;
}

.modal-close:hover {
  color: var(--status-rejected);
  transform: scale(1.08);
}

.modal-form {
  padding: 0 28px 28px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--faint);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg);
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  box-shadow: var(--shadow-sm), 0 0 0 2px var(--accent);
}

.form-group textarea {
  resize: vertical;
  min-height: 70px;
}

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

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* Track button for opportunity cards */
.card-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--hover);
}

/* Responsive */
@media (max-width: 1024px) {
  :root { --sidebar: 220px; }
  .wrap { padding-left: 28px; padding-right: 28px; }
  .topbar-inner { padding-left: 24px; padding-right: 24px; }
}

@media (max-width: 900px) and (min-width: 641px) {
  :root { --sidebar: 72px; }

  .brand { justify-content: center; padding-left: 0; padding-right: 0; }
  .brand-title,
  .nav-text,
  .count,
  .nav-section,
  .sidebar-foot { display: none; }

  .sidebar { padding-left: 10px; padding-right: 10px; }
  .nav-btn { justify-content: center; padding: 12px 0; }
}

@media (max-width: 640px) {
  .menu { display: inline-flex; }

  .sidebar {
    position: fixed;
    z-index: 40;
    width: min(280px, 85vw);
    transform: translateX(-105%);
    transition: transform 0.25s ease;
    background: var(--bg);
    border-radius: 0 var(--radius-xl) var(--radius-xl) 0;
  }

  .sidebar.is-open {
    transform: none;
    box-shadow: var(--shadow-lg);
  }

  .scrim.is-on {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 15, 26, 0.5);
    z-index: 30;
  }

  body.nav-open { overflow: hidden; }

  .topbar-inner { padding: 12px 16px; }
  .wrap { padding: 24px 18px 60px; }
  #search-form { margin-left: 0; flex: 1; min-width: 0; }
  .search { width: 100%; }
  h1 { font-size: 32px; }
  .card h2 { font-size: 22px; }
  .targets,
  .keyword-grid { grid-template-columns: 1fr; }

  .filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 18px 20px;
  }

  .filter-field { max-width: none; }

  .search input,
  .select select { font-size: 16px; }

  .fit-num { font-size: 28px; }

  .app-filters { flex-direction: column; align-items: stretch; }
  .app-filter-group { flex-wrap: wrap; }
  .app-filter-select, .btn { flex: 1; min-width: 130px; }
  .app-table { min-width: 720px; }
  .form-row { grid-template-columns: 1fr; }
  .app-stats { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 800px) {
  .keyword-grid,
  .targets { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* Dark mode status adjustments */
html[data-theme="dark"] .status-accepted { background: rgba(34, 197, 94, 0.2); }
html[data-theme="dark"] .status-submitted { background: rgba(79, 140, 255, 0.2); }
html[data-theme="dark"] .status-progress { background: rgba(245, 158, 11, 0.2); }
html[data-theme="dark"] .status-oa { background: rgba(139, 92, 246, 0.2); }
html[data-theme="dark"] .status-interview { background: rgba(6, 182, 212, 0.2); }
html[data-theme="dark"] .status-rejected { background: rgba(239, 68, 68, 0.2); }
html[data-theme="dark"] .status-stopped { background: rgba(107, 114, 128, 0.2); }
html[data-theme="dark"] .status-notapplied { background: rgba(156, 163, 175, 0.2); }

html[data-theme="dark"] .app-filter-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}
