/* ================================================================
   Job Search Hub — Design System v2
   Dark-first · Indigo accent · Modern minimalist
   ================================================================ */

/* ── 1. Design Tokens ─────────────────────────────────────────── */
:root {
  /* Background layers */
  --bg-base:     #0F172A;
  --bg-surface:  #1E293B;
  --bg-elevated: #2D3F55;

  /* Accent – Indigo */
  --primary:       #6366F1;
  --primary-dark:  #4F46E5;
  --primary-light: rgba(99,102,241,0.14);
  --primary-glow:  rgba(99,102,241,0.28);

  /* Semantic */
  --success:    #10B981;
  --success-bg: rgba(16,185,129,0.14);
  --warning:    #F59E0B;
  --warning-bg: rgba(245,158,11,0.14);
  --danger:     #EF4444;
  --danger-bg:  rgba(239,68,68,0.14);
  --info:       #3B82F6;
  --info-bg:    rgba(59,130,246,0.14);

  /* Gray scale – dark-mapped (kept for backward compat with inline styles) */
  --gray-50:  #1E293B;
  --gray-100: #2D3F55;
  --gray-200: #3D5068;
  --gray-400: #64748B;
  --gray-500: #94A3B8;
  --gray-600: #CBD5E1;
  --gray-700: #E2E8F0;
  --gray-800: #F1F5F9;

  /* Borders */
  --border:        rgba(148,163,184,0.12);
  --border-strong: rgba(148,163,184,0.22);

  /* Legacy alias used in inline styles */
  --border-color:  rgba(148,163,184,0.12);

  /* Typography */
  --font: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;

  /* Shadows */
  --shadow-sm:   0 1px 3px rgba(0,0,0,.45);
  --shadow-md:   0 4px 16px rgba(0,0,0,.5);
  --shadow-xl:   0 20px 40px rgba(0,0,0,.65);
  --shadow-glow: 0 0 0 3px var(--primary-glow);

  /* Radius */
  --radius-sm:   5px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-full: 9999px;

  /* Motion */
  --ease:            cubic-bezier(0.4,0,0.2,1);
  --transition:      all 0.2s cubic-bezier(0.4,0,0.2,1);
  --transition-fast: all 0.15s cubic-bezier(0.4,0,0.2,1);
  --transition-slow: all 0.35s cubic-bezier(0.4,0,0.2,1);
}

/* ── Golden theme — tokens ────────────────────────────────────── */
[data-theme="golden"] {
  /* Palette */
  --ink:        #0A0C10;
  --deep:       #0D1520;
  --surface:    #112036;
  --surface-2:  #162840;

  --text:       #E8E2D6;
  --text-soft:  #A8B2BE;
  --muted:      #6A7A8A;
  --muted-2:    #4A5A6A;

  --accent:        #C8A96E;
  --accent-hover:  #E8C87A;
  --accent-soft:   rgba(200,169,110,0.10);
  --accent-line:   rgba(200,169,110,0.25);

  --green:  #5FCFA3;
  --red:    #CF6679;
  --blue:   #7FCFEC;

  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans:  'Space Grotesk', -apple-system, sans-serif;

  /* Re-point existing app variables */
  --bg-base:     var(--ink);
  --bg-surface:  var(--deep);
  --bg-elevated: var(--surface);

  --primary:        var(--accent);
  --primary-dark:   var(--accent-hover);
  --primary-light:  var(--accent-soft);
  --primary-glow:   rgba(200,169,110,0.28);

  --gray-50:  var(--surface);
  --gray-100: var(--surface-2);
  --gray-200: #1E3050;
  --gray-400: var(--muted-2);
  --gray-500: var(--muted);
  --gray-600: var(--text-soft);
  --gray-700: var(--text);
  --gray-800: var(--text);

  --border:        rgba(200,169,110,0.14);
  --border-strong: rgba(200,169,110,0.22);
  --border-color:  rgba(200,169,110,0.14);

  --shadow-sm:   0 1px 3px rgba(0,0,0,.60);
  --shadow-md:   0 4px 16px rgba(0,0,0,.65);
  --shadow-xl:   0 20px 40px rgba(0,0,0,.80);
  --shadow-glow: 0 0 0 3px rgba(200,169,110,0.28);

  --radius-sm: 0px;
  --radius-md: 2px;
  --radius-lg: 4px;
  --radius-xl: 4px;

  --font: var(--font-sans);

  --success:    var(--green);
  --success-bg: rgba(95,207,163,0.12);
  --danger:     var(--red);
  --danger-bg:  rgba(207,102,121,0.12);
  --info:       var(--blue);
  --info-bg:    rgba(127,207,236,0.12);
  --warning-bg: rgba(245,158,11,0.12);
}

/* ── Golden theme — page chrome ───────────────────────────────── */
[data-theme="golden"] body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 300;
  background-image:
    radial-gradient(ellipse at 20% 10%, rgba(200,169,110,0.07) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 85%, rgba(74,158,191,0.05) 0%, transparent 55%);
}
[data-theme="golden"] h1,
[data-theme="golden"] h2,
[data-theme="golden"] h3,
[data-theme="golden"] h4,
[data-theme="golden"] .form-title { font-family: var(--font-serif); letter-spacing: -0.01em; color: var(--text); }
[data-theme="golden"] .list-header h3,
[data-theme="golden"] .job-header h4,
[data-theme="golden"] .form-title { font-style: italic; font-weight: 700; }
[data-theme="golden"] a:hover { color: var(--accent-hover); }
[data-theme="golden"] ::selection { background: rgba(200,169,110,0.25); color: var(--text); }
[data-theme="golden"] details summary { color: var(--accent); }
[data-theme="golden"] tr:hover td { background: var(--accent-soft); }
[data-theme="golden"] .job-content a { color: var(--accent-hover); }

/* ── Golden theme — header ────────────────────────────────────── */
[data-theme="golden"] header {
  background: rgba(10,12,16,0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
[data-theme="golden"] .header-logo { font-size: 0; }
[data-theme="golden"] .header-logo > svg { display: none; }
[data-theme="golden"] .header-logo::before {
  content: "";
  width: 22px; height: 22px;
  display: inline-block;
  flex-shrink: 0;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'><circle cx='12' cy='7' r='3' stroke='%23C8A96E' stroke-width='1.5' fill='none'/><line x1='12' y1='10' x2='12' y2='20' stroke='%23C8A96E' stroke-width='1.5' stroke-linecap='round'/><path d='M6 16 Q9 20 12 20 Q15 20 18 16' stroke='%23C8A96E' stroke-width='1.5' fill='none' stroke-linecap='round'/><line x1='8.5' y1='6' x2='15.5' y2='6' stroke='%23C8A96E' stroke-width='1.5' stroke-linecap='round'/></svg>") center/contain no-repeat;
}
[data-theme="golden"] .header-logo::after {
  content: "DRIFT";
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text);
}

/* ── Golden theme — navigation ────────────────────────────────── */
[data-theme="golden"] .tabs-wrapper {
  background: transparent;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 0;
}
[data-theme="golden"] .tab-btn {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 16px 20px;
  border-radius: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
[data-theme="golden"] .tab-btn:hover:not(.active) { background: transparent; color: var(--text-soft); }
[data-theme="golden"] .tab-btn.active {
  background: transparent;
  color: var(--accent);
  border-bottom-color: var(--accent);
  box-shadow: none;
  font-weight: 600;
}

/* ── Golden theme — cards ─────────────────────────────────────── */
[data-theme="golden"] .list-card,
[data-theme="golden"] .form-card { background: rgba(255,255,255,0.02); border: 1px solid var(--border); }
[data-theme="golden"] .list-header { background: transparent; border-bottom: 1px solid var(--border); padding: 20px 28px; }
[data-theme="golden"] .list-body { padding: 24px 28px; }

[data-theme="golden"] .watchlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
[data-theme="golden"] .job-card {
  background: rgba(255,255,255,0.02);
  border: none;
  padding: 28px 28px 20px;
  transition: background 0.25s ease;
}
[data-theme="golden"] .job-card:hover { background: var(--accent-soft); border-color: transparent; box-shadow: none; transform: none; }
[data-theme="golden"] .job-card:hover .job-header h4 { color: var(--accent); transition: color 0.25s ease; }
[data-theme="golden"] .job-header h4 { font-size: 20px; line-height: 1.2; }
[data-theme="golden"] .job-company { font-size: 11px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); opacity: 0.75; }
[data-theme="golden"] .job-details { font-size: 13px; font-weight: 300; color: var(--muted); gap: 18px; }
[data-theme="golden"] .job-content { font-size: 13px; line-height: 1.7; color: var(--text-soft); border-top: 1px solid var(--border); margin-top: 12px; padding: 16px 0 4px; }
[data-theme="golden"] .job-actions { padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.06); }

[data-theme="golden"] .stat-card::after { background: linear-gradient(90deg, var(--accent), var(--accent-hover)); }

/* ── Golden theme — buttons ───────────────────────────────────── */
[data-theme="golden"] .btn {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 11px 24px;
}
[data-theme="golden"] .btn-sm { padding: 8px 16px; font-size: 11px; letter-spacing: 0.12em; }
[data-theme="golden"] .btn-primary { color: var(--ink); }
[data-theme="golden"] .btn-primary:hover { color: var(--ink); box-shadow: 0 4px 14px rgba(200,169,110,0.35); transform: translateY(-1px); }
[data-theme="golden"] .btn-secondary { background: transparent; color: var(--accent); border-color: var(--accent-line); }
[data-theme="golden"] .btn-secondary:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
[data-theme="golden"] .btn-danger { background: transparent; color: var(--red); border-color: rgba(207,102,121,0.3); }
[data-theme="golden"] .btn-danger:hover { background: rgba(207,102,121,0.08); color: var(--red); border-color: var(--red); box-shadow: none; transform: none; }

/* ── Golden theme — forms ─────────────────────────────────────── */
[data-theme="golden"] .form-card { padding: 28px; }
[data-theme="golden"] .form-title { font-size: 26px; margin-bottom: 24px; }
[data-theme="golden"] .form-group label,
[data-theme="golden"] .filters-row label { font-family: var(--font-sans); font-size: 11px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
[data-theme="golden"] .form-group input,
[data-theme="golden"] .form-group select,
[data-theme="golden"] .form-group textarea,
[data-theme="golden"] .filters-row input,
[data-theme="golden"] .filters-row select { background: rgba(255,255,255,0.03); border-color: var(--border); color: var(--text); font-family: var(--font-sans); font-weight: 300; }
[data-theme="golden"] #addJobDetails > summary {
  background: rgba(255,255,255,0.03) !important;
  border: 1px solid var(--border) !important;
  color: var(--accent) !important;
  font-family: var(--font-sans) !important;
  font-size: 11px !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase !important;
}

/* ── Golden theme — badges & status ──────────────────────────── */
[data-theme="golden"] .status-badge {
  font-size: 10px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase;
  padding: 4px 10px; background: transparent; border: 1px solid currentColor; border-radius: var(--radius-md);
}
[data-theme="golden"] .status-applied,
[data-theme="golden"] .status-phone_screen,
[data-theme="golden"] .status-take_home,
[data-theme="golden"] .status-interview,
[data-theme="golden"] .status-interested { background: transparent; color: var(--accent); }
[data-theme="golden"] .status-offer       { background: transparent; color: var(--green); }
[data-theme="golden"] .status-rejected    { background: transparent; color: var(--red); opacity: 0.7; }
[data-theme="golden"] .status-withdrawn   { background: transparent; color: var(--muted); opacity: 0.7; }
[data-theme="golden"] .status-wishlist    { background: transparent; color: var(--warning, #F59E0B); }
[data-theme="golden"] .status-discovered  { background: transparent; color: var(--muted); }
[data-theme="golden"] .badge-primary      { background: transparent; color: var(--accent); border: 1px solid var(--accent-line); }
[data-theme="golden"] .match-badge        { background: transparent; color: var(--accent); border: 1px solid var(--accent-line); padding: 4px 10px; }
[data-theme="golden"] .job-header span[title] {
  background: transparent !important; color: var(--accent) !important;
  border: 1px solid var(--accent-line); border-radius: var(--radius-md) !important;
  padding: 3px 9px !important; font-size: 11px !important; font-weight: 500 !important; letter-spacing: 0.06em;
}

/* ── Golden theme — user menu ─────────────────────────────────── */
[data-theme="golden"] .user-pill { background: transparent; border: 1px solid var(--accent-line); color: var(--text-soft); border-radius: var(--radius-md); }
[data-theme="golden"] .user-pill:hover { border-color: var(--accent); color: var(--accent); background: transparent; }
[data-theme="golden"] .user-dropdown { background: var(--deep); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: 0 12px 40px rgba(0,0,0,0.5); }
[data-theme="golden"] .user-dropdown-item { font-family: var(--font-sans); font-size: 13px; color: var(--text-soft); }
[data-theme="golden"] .user-dropdown-item:hover { background: var(--accent-soft); color: var(--accent); }
[data-theme="golden"] .user-dropdown-divider { border-color: rgba(255,255,255,0.06); }
[data-theme="golden"] .user-dropdown-logout { color: var(--red); }
[data-theme="golden"] .user-dropdown-logout:hover { background: rgba(207,102,121,0.08); color: var(--red); }

/* ── Golden theme — schedule ──────────────────────────────────── */
[data-theme="golden"] .sched-day-hdr.today { background: var(--accent-soft); color: var(--accent); }
[data-theme="golden"] .sched-cat-job-search { background: rgba(200,169,110,0.20); color: #D4C590; border-left-color: var(--accent); }

/* ── Golden theme — wizard ────────────────────────────────────── */
[data-theme="golden"] .wizard-step-node.active  .wizard-step-circle { background: var(--accent); color: var(--ink); box-shadow: 0 0 0 4px var(--accent-soft); }
[data-theme="golden"] .wizard-step-node.active  .wizard-step-label  { color: var(--accent); }
[data-theme="golden"] .wizard-connector.done { background: var(--accent); }

/* ── Golden theme — selectable cards ─────────────────────────── */
[data-theme="golden"] .radio-card input:checked + label,
[data-theme="golden"] .check-card input:checked + label,
[data-theme="golden"] .activity-card input:checked + label,
[data-theme="golden"] .feeling-card input:checked + label { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
[data-theme="golden"] .radio-card label:hover,
[data-theme="golden"] .check-card label:hover,
[data-theme="golden"] .activity-card label:hover,
[data-theme="golden"] .feeling-card label:hover { border-color: var(--accent); color: var(--text-soft); }

/* ── Golden theme — list items ────────────────────────────────── */
[data-theme="golden"] .list-item:hover { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent-soft), var(--shadow-sm); }

/* ── Golden theme — alerts ────────────────────────────────────── */
[data-theme="golden"] .alert-success { background: rgba(95,207,163,0.08);  color: var(--green); border-color: rgba(95,207,163,0.2);  border-left-color: var(--green); }
[data-theme="golden"] .alert-error   { background: rgba(207,102,121,0.08); color: var(--red);   border-color: rgba(207,102,121,0.2); border-left-color: var(--red); }
[data-theme="golden"] .alert-info    { background: rgba(127,207,236,0.08); color: var(--blue);  border-color: rgba(127,207,236,0.2); border-left-color: var(--blue); }

/* ── Golden theme — toasts ────────────────────────────────────── */
[data-theme="golden"] .toast-success { background: rgba(13,21,32,0.96); color: var(--green); border-color: rgba(95,207,163,0.3); }
[data-theme="golden"] .toast-error   { background: rgba(13,21,32,0.96); color: var(--red);   border-color: rgba(207,102,121,0.3); }

/* ── 2. Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { color-scheme: dark; scroll-behavior: smooth; }
html[data-theme="light"] { color-scheme: light; }
html[data-theme="golden"]         { color-scheme: dark;  }
html[data-theme="editorial"]      { color-scheme: light; }
html[data-theme="editorial-dark"] { color-scheme: dark;  }

/* ── Light theme overrides ────────────────────────────────────── */
[data-theme="light"] {
  --bg-base:     #F8FAFC;
  --bg-surface:  #FFFFFF;
  --bg-elevated: #F1F5F9;
  --gray-50:  #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #0F172A;
  --border:        rgba(0,0,0,0.08);
  --border-strong: rgba(0,0,0,0.15);
  --border-color:  rgba(0,0,0,0.08);
  --shadow-sm:   0 1px 3px rgba(0,0,0,.07);
  --shadow-md:   0 4px 16px rgba(0,0,0,.10);
  --shadow-xl:   0 20px 40px rgba(0,0,0,.15);
  --primary-glow: rgba(99,102,241,0.18);
}
[data-theme="light"] body {
  background-image:
    radial-gradient(ellipse at 15% 10%, rgba(99,102,241,0.04) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 85%, rgba(16,185,129,0.02) 0%, transparent 55%);
}

body {
  font-family: var(--font);
  background: var(--bg-base);
  color: var(--gray-700);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-image:
    radial-gradient(ellipse at 15% 10%, rgba(99,102,241,0.06) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 85%, rgba(16,185,129,0.04) 0%, transparent 55%);
  min-height: 100vh;
}

h1,h2,h3,h4 { font-weight: 700; line-height: 1.3; color: var(--gray-800); }
a { color: var(--primary); text-decoration: none; transition: var(--transition-fast); }
a:hover { color: #818CF8; }

::selection { background: var(--primary-light); color: var(--gray-800); }

/* ── 3. Scrollbars ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-elevated); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* ── 4. Dark-mode overrides for hardcoded white in inline styles ─ */
[style*="background:white"],
[style*="background: white"],
[style*="background:#fff"],
[style*="background: #fff"],
[style*="background:#ffffff"],
[style*="background: #ffffff"] {
  background-color: var(--bg-surface) !important;
}

/* ── 5. Header ────────────────────────────────────────────────── */
header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.header-content {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-800);
  letter-spacing: -0.2px;
  text-decoration: none;
}
.header-logo:hover { color: var(--gray-800); }
.header-logo svg { flex-shrink: 0; }

/* ── 6. Layout ────────────────────────────────────────────────── */
.main-container { max-width: 1400px; margin: 0 auto; padding: 24px 20px; }

/* ── 7. Navigation tabs ───────────────────────────────────────── */

/* Admin two-level nav — group row sits above the page tabs row */
.admin-group-wrapper {
  margin-bottom: 0;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom: none;
  padding: 6px 8px 6px;
  background: var(--bg-surface);
}
.admin-group-wrapper + .tabs-wrapper {
  margin-top: 0;
  border-top: none;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}
.admin-group-btn {
  flex-shrink: 0;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  color: var(--gray-500);
  text-decoration: none;
  white-space: nowrap;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  border: 1px solid transparent;
}
.admin-group-btn:hover { background: var(--bg-elevated); color: var(--gray-700); }
.admin-group-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 1px 6px rgba(99,102,241,0.35);
}

.tabs-wrapper {
  position: relative;
  margin-bottom: 24px;
  background: var(--bg-surface);
  padding: 5px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: visible;
}
.tabs-scroll {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs-scroll::-webkit-scrollbar { display: none; }

.tab-btn {
  flex-shrink: 0;
  padding: 7px 13px;
  background: transparent;
  border: none;
  color: var(--gray-500);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  font-family: var(--font);
}
.tab-btn:hover:not(.active) {
  background: var(--bg-elevated);
  color: var(--gray-700);
}
.tab-btn.active {
  background: var(--primary);
  color: white;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(99,102,241,0.4);
}
.tab-dropdown {
  position: relative;
  flex-shrink: 0;
}
.tab-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  min-width: 150px;
  z-index: 200;
  display: none;
  flex-direction: column;
  padding: 4px;
}
.tab-dropdown.open .tab-dropdown-menu { display: flex; }
.tab-dropdown-item {
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-500);
  text-decoration: none;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: var(--transition);
}
.tab-dropdown-item:hover { background: var(--bg-elevated); color: var(--gray-700); }
.tab-dropdown-item.active { color: var(--primary); font-weight: 600; }

/* ── 8. Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
  font-family: var(--font);
  letter-spacing: 0.01em;
  position: relative;
  overflow: hidden;
}
.btn:active:not(:disabled) { transform: scale(0.97); }

.btn-primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-dark);
  color: white;
  border-color: var(--primary-dark);
  box-shadow: 0 4px 14px rgba(99,102,241,0.45);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--gray-600);
  border-color: var(--border-strong);
}
.btn-secondary:hover {
  background: var(--gray-200);
  color: var(--gray-800);
  border-color: var(--gray-400);
}

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: rgba(239,68,68,0.3);
}
.btn-danger:hover {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
  box-shadow: 0 4px 14px rgba(239,68,68,0.4);
  transform: translateY(-1px);
}

.btn-sm { padding: 6px 11px; font-size: 12px; }

.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn:disabled:hover { transform: none; box-shadow: none; }

/* ── 9. Forms ─────────────────────────────────────────────────── */
.form-card {
  background: var(--bg-surface);
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  margin-bottom: 20px;
}
.form-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 20px;
}
.form-group { margin-bottom: 16px; }
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-500);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

input, textarea, select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: var(--font);
  background: var(--bg-base);
  color: var(--gray-800);
  transition: var(--transition);
}
input::placeholder, textarea::placeholder { color: var(--gray-400); }
select option { background: var(--bg-base); color: var(--gray-800); }

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
  background: var(--bg-base);
}
textarea { resize: vertical; min-height: 100px; }

/* ── 10. Stats ────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-surface);
  padding: 22px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), #818CF8);
  opacity: 0;
  transition: var(--transition);
}
.stat-card:hover::after { opacity: 1; }
.stat-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.stat-label { font-size: 11px; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.6px; font-weight: 700; }
.stat-value { font-size: 36px; font-weight: 800; color: var(--primary); margin-bottom: 6px; line-height: 1; letter-spacing: -1.5px; }
.stat-desc  { font-size: 12px; color: var(--gray-500); }

/* ── 11. List card ────────────────────────────────────────────── */
.list-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 20px;
}
.list-header {
  padding: 13px 20px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}
.list-header h3 { font-size: 13px; font-weight: 700; color: var(--gray-600); margin: 0; text-transform: uppercase; letter-spacing: 0.5px; }
.list-body { padding: 16px 20px; }

.list-item {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  background: var(--bg-elevated);
  transition: var(--transition);
}
.list-item:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary-light), var(--shadow-sm);
  transform: translateY(-1px);
}
.list-item:last-child { margin-bottom: 0; }

.item-title { font-size: 14px; font-weight: 600; color: var(--gray-800); }
.item-meta  { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.item-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* ── 12. Job card ─────────────────────────────────────────────── */
.job-card {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  transition: var(--transition);
}
.job-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.job-card.urgent { border-left: 3px solid var(--danger); }

.job-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.job-header h4 { font-size: 14px; font-weight: 600; color: var(--gray-800); margin: 0; }
.job-company { font-size: 12px; color: var(--gray-500); margin: 2px 0 0; }
.job-details { font-size: 12px; color: var(--gray-500); display: flex; gap: 12px; flex-wrap: wrap; margin: 8px 0; }

.deadline-info { font-size: 12px; color: var(--gray-500); margin: 6px 0; }
.deadline-info.urgent { color: var(--danger); font-weight: 600; }
.job-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

.watchlist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }

/* ── 13. Badges ───────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.badge-primary { background: var(--primary-light);  color: #A5B4FC; }
.badge-gray    { background: var(--bg-elevated);     color: var(--gray-600); }
.badge-warning { background: var(--warning-bg);      color: var(--warning); }
.badge-danger  { background: var(--danger-bg);       color: var(--danger); }
.badge-success { background: var(--success-bg);      color: var(--success); }

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 2px 4px 2px 0;
}
.status-discovered   { background: var(--bg-elevated);   color: var(--gray-500); }
.status-wishlist     { background: var(--warning-bg);    color: var(--warning); }
.status-applied,
.status-phone_screen,
.status-take_home,
.status-interview    { background: var(--info-bg);       color: #93C5FD; }
.status-offer        { background: var(--success-bg);    color: var(--success); }
.status-rejected     { background: var(--danger-bg);     color: var(--danger); }
.status-withdrawn    { background: var(--bg-elevated);   color: var(--gray-500); opacity: .75; }
.status-interested   { background: var(--primary-light); color: #A5B4FC; }

.match-badge { background: var(--primary-light); color: #A5B4FC; padding: 4px 10px; border-radius: var(--radius-md); font-size: 12px; font-weight: 600; }

/* ── 14. Alerts ───────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  margin-bottom: 14px;
  border: 1px solid;
  border-left-width: 3px;
  line-height: 1.5;
}
.alert-error   { background: var(--danger-bg);  color: #FCA5A5; border-color: rgba(239,68,68,0.25);  border-left-color: var(--danger);  }
.alert-success { background: var(--success-bg); color: #6EE7B7; border-color: rgba(16,185,129,0.25); border-left-color: var(--success); }
.alert-info    { background: var(--info-bg);    color: #93C5FD; border-color: rgba(59,130,246,0.25);  border-left-color: var(--info);    }

/* ── 15. Empty state ──────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--gray-500);
  font-size: 14px;
  line-height: 1.7;
}

/* ── 16. Charts ───────────────────────────────────────────────── */
.chart-container {
  background: var(--bg-surface);
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  margin-bottom: 20px;
  position: relative;
  height: 320px;
}
.chart-container h3 { margin: 0 0 14px; font-size: 13px; font-weight: 700; color: var(--gray-600); text-transform: uppercase; letter-spacing: 0.5px; }

/* ── 17. Tables ───────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  background: var(--bg-elevated);
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border-bottom: 1px solid var(--border);
}
td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--gray-700); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(99,102,241,0.04); }

/* ── 18. Filters ──────────────────────────────────────────────── */
.filters-row { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.filters-row input, .filters-row select { width: auto; flex: 1; min-width: 150px; }

/* ── 19. Details & accordion ──────────────────────────────────── */
details summary {
  cursor: pointer;
  font-size: 12px;
  color: #818CF8;
  margin-top: 6px;
  list-style: none;
  transition: var(--transition-fast);
}
details summary::-webkit-details-marker { display: none; }
details summary:hover { color: var(--primary); }
details .description-content { margin-top: 8px; font-size: 12px; color: var(--gray-600); white-space: pre-wrap; }

.manual-section > summary {
  color: var(--gray-700) !important;
  font-size: 13px !important;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}
.manual-section > summary:hover { color: var(--gray-800) !important; }
.manual-section summary::before { content: '▶'; display: inline-block; margin-right: 8px; font-size: 10px; transition: transform .2s; color: var(--gray-400); }
.manual-section[open] summary::before { transform: rotate(90deg); }

/* ── 20. Job content (sanitized HTML) ─────────────────────────── */
.job-content { margin-top: 10px; font-size: 13px; color: var(--gray-600); line-height: 1.7; }
.job-content h1,.job-content h2,.job-content h3 { font-size: 14px; font-weight: 700; margin: 12px 0 4px; color: var(--gray-800); }
.job-content h4,.job-content h5,.job-content h6 { font-size: 13px; font-weight: 600; margin: 10px 0 4px; color: var(--gray-700); }
.job-content p { margin: 4px 0; }
.job-content ul,.job-content ol { margin: 6px 0 6px 20px; }
.job-content li { margin: 2px 0; }
.job-content strong,.job-content b { font-weight: 700; }
.job-content em,.job-content i { font-style: italic; }
.job-content a { color: #818CF8; text-decoration: underline; }

/* ── 21. Content editor ───────────────────────────────────────── */
#fFullContentEditor {
  padding: 12px;
  overflow-y: auto;
  max-height: 400px;
  background: var(--bg-base);
  color: var(--gray-700);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
}
#fFullContentEditor:focus { outline: 2px solid var(--primary); outline-offset: -1px; }
#fFullContentEditor h1,#fFullContentEditor h2,#fFullContentEditor h3 { font-size: 15px; font-weight: 700; margin: 10px 0 4px; }
#fFullContentEditor h4,#fFullContentEditor h5,#fFullContentEditor h6 { font-size: 14px; font-weight: 600; margin: 8px 0 4px; }
#fFullContentEditor p { margin: 4px 0; }
#fFullContentEditor ul,#fFullContentEditor ol { margin: 6px 0 6px 20px; }
#fFullContentEditor li { margin: 2px 0; }

/* ── 22. Toasts ───────────────────────────────────────────────── */
#toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 260px;
  max-width: 380px;
  animation: toast-in .2s var(--ease);
  pointer-events: auto;
  border: 1px solid;
  backdrop-filter: blur(8px);
}
.toast-success { background: rgba(30,41,59,0.95); color: var(--success); border-color: rgba(16,185,129,0.35); }
.toast-error   { background: rgba(30,41,59,0.95); color: var(--danger);  border-color: rgba(239,68,68,0.35); }
.toast-fade    { animation: toast-out .3s var(--ease) forwards; }

@keyframes toast-in  { from { opacity:0; transform:translateX(16px) scale(.96); } to { opacity:1; transform:translateX(0) scale(1); } }
@keyframes toast-out { from { opacity:1; transform:translateX(0); } to { opacity:0; transform:translateX(16px); } }

/* ── 23. Spinner ──────────────────────────────────────────────── */
.spinner { display:inline-block; width:14px; height:14px; border:2px solid rgba(255,255,255,.25); border-top-color:white; border-radius:50%; animation:spin .65s linear infinite; flex-shrink:0; }
@keyframes spin { to { transform:rotate(360deg); } }

/* ── 24. Misc ─────────────────────────────────────────────────── */
.btn-confirming { background: var(--danger) !important; color:white !important; border-color: var(--danger) !important; }
.star-tip { font-size:11px; color:var(--gray-400); font-weight:400; margin-left:4px; }
.detail-sticky { position:sticky; top:57px; z-index:50; background:var(--bg-surface); border-radius:var(--radius-lg); }

/* ── 25. Selectable cards ─────────────────────────────────────── */
.radio-card { position: relative; }
.radio-card input[type=radio] { position: absolute; opacity: 0; width: 0; height: 0; }
.radio-card > label {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  cursor: pointer; font-size: 13px; font-weight: 500;
  transition: var(--transition);
  background: var(--bg-elevated); color: var(--gray-600);
  width: 100%;
}
.radio-card input:checked + label { border-color: var(--primary); background: var(--primary-light); color: var(--gray-800); }
.radio-card label:hover { border-color: var(--primary); color: var(--gray-700); }

.check-card { position: relative; }
.check-card input[type=checkbox] { position: absolute; opacity: 0; width: 0; height: 0; }
.check-card > label {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  cursor: pointer; font-size: 13px; font-weight: 500;
  transition: var(--transition);
  background: var(--bg-elevated); color: var(--gray-600);
}
.check-card input:checked + label { border-color: var(--primary); background: var(--primary-light); color: var(--gray-800); }
.check-card label:hover { border-color: var(--primary); color: var(--gray-700); }

.activity-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.activity-card { position: relative; }
.activity-card input[type=checkbox] { position: absolute; opacity: 0; width: 0; height: 0; }
.activity-card > label {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  cursor: pointer; font-size: 13px; font-weight: 500;
  transition: var(--transition);
  background: var(--bg-elevated); color: var(--gray-600);
  width: 100%;
}
.activity-card input:checked + label { border-color: var(--primary); background: var(--primary-light); color: var(--gray-800); }
.activity-card label:hover { border-color: var(--primary); color: var(--gray-700); }

.feeling-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.feeling-card { position: relative; }
.feeling-card input[type=radio] { position: absolute; opacity: 0; width: 0; height: 0; }
.feeling-card > label {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 18px 10px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-lg);
  cursor: pointer; font-size: 13px; font-weight: 500; text-align: center;
  transition: var(--transition);
  background: var(--bg-elevated); color: var(--gray-600);
  width: 100%;
}
.feeling-card input:checked + label { border-color: var(--primary); background: var(--primary-light); color: var(--gray-800); }
.feeling-card label:hover { border-color: var(--primary); color: var(--gray-700); }
.feeling-emoji { font-size: 28px; }

/* ── 26. Wizard ───────────────────────────────────────────────── */
.wizard-steps-bar { display: flex; align-items: center; margin-bottom: 32px; }
.wizard-step-node { display: flex; flex-direction: column; align-items: center; flex: 1; }
.wizard-step-circle {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; margin-bottom: 6px;
  transition: var(--transition-slow);
}
.wizard-step-node.done    .wizard-step-circle { background: var(--success); color: white; box-shadow: 0 0 0 4px var(--success-bg); }
.wizard-step-node.active  .wizard-step-circle { background: var(--primary); color: white; box-shadow: 0 0 0 4px var(--primary-light); }
.wizard-step-node.pending .wizard-step-circle { background: var(--bg-elevated); color: var(--gray-500); }
.wizard-step-label { font-size: 11px; color: var(--gray-500); font-weight: 500; text-align: center; }
.wizard-step-node.active  .wizard-step-label { color: var(--primary); font-weight: 700; }
.wizard-step-node.done    .wizard-step-label { color: var(--success); }
.wizard-connector { flex: 1; height: 2px; background: var(--border-strong); margin-top: -22px; transition: background .4s; }
.wizard-connector.done { background: var(--success); }
.wizard-panel { display: none; }
.wizard-panel.active { display: block; animation: panelIn .25s var(--ease); }

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

/* ── 27. Weekly schedule grid ─────────────────────────────────── */
.sched-outer { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--bg-surface); }
.sched-grid  { display: grid; grid-template-columns: 52px repeat(7, minmax(110px, 1fr)); min-width: 840px; }
.sched-corner  { background: var(--bg-elevated); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.sched-day-hdr {
  text-align: center; padding: 10px 4px 12px;
  font-size: 11px; font-weight: 700; color: var(--gray-500);
  border-bottom: 1px solid var(--border); background: var(--bg-elevated);
  text-transform: uppercase; letter-spacing: 0.6px;
  border-right: 1px solid var(--border);
  transition: var(--transition);
}
.sched-day-hdr.today { background: var(--primary-light); color: #A5B4FC; }
.sched-time-col { border-right: 1px solid var(--border); }
.sched-hour-label { height: 64px; display: flex; align-items: flex-start; padding-top: 4px; justify-content: center; font-size: 10px; color: var(--gray-400); border-bottom: 1px solid rgba(148,163,184,0.06); }
.sched-day-col { position: relative; border-right: 1px solid rgba(148,163,184,0.06); }
.sched-day-col:last-child { border-right: none; }
.sched-bg-row { position: absolute; left: 0; right: 0; height: 64px; border-bottom: 1px solid rgba(148,163,184,0.06); }
.sched-block { position: absolute; left: 3px; right: 3px; border-radius: 5px; padding: 4px 6px; font-size: 11px; overflow: hidden; cursor: default; transition: box-shadow .15s; min-height: 22px; }
.sched-block:hover { box-shadow: var(--shadow-md); z-index: 10; overflow: visible; min-width: calc(100% - 6px); }
.sched-block-title { font-weight: 700; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.3; }
.sched-block-time  { font-size: 10px; opacity: 0.7; line-height: 1.2; margin-top: 1px; }
.sched-block-note  { font-size: 10px; opacity: 0.65; line-height: 1.3; margin-top: 2px; display: none; white-space: normal; }
.sched-block:hover .sched-block-note { display: block; }

.sched-cat-job-search { background: rgba(124,58,237,0.28); color: #C4B5FD; border-left: 3px solid #7C3AED; }
.sched-cat-exercise   { background: rgba(16,185,129,0.22); color: #6EE7B7; border-left: 3px solid #10B981; }
.sched-cat-outdoor    { background: rgba(20,184,166,0.22); color: #5EEAD4; border-left: 3px solid #14B8A6; }
.sched-cat-social     { background: rgba(245,158,11,0.22); color: #FDE68A; border-left: 3px solid #F59E0B; }
.sched-cat-learning   { background: rgba(139,92,246,0.22); color: #DDD6FE; border-left: 3px solid #8B5CF6; }
.sched-cat-household  { background: rgba(148,163,184,0.18); color: #CBD5E1; border-left: 3px solid #94A3B8; }
.sched-cat-creative   { background: rgba(236,72,153,0.22); color: #FBCFE8; border-left: 3px solid #EC4899; }
.sched-cat-personal   { background: rgba(249,115,22,0.22); color: #FED7AA; border-left: 3px solid #F97316; }
.sched-cat-rest       { background: rgba(14,165,233,0.22); color: #BAE6FD; border-left: 3px solid #0EA5E9; }
.sched-cat-meal       { background: rgba(250,204,21,0.22); color: #FEF08A; border-left: 3px solid #FACC15; }

.sched-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.sched-legend-item { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--gray-500); }
.sched-legend-dot { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }

/* ── 28. User pill & dropdown ─────────────────────────────────── */
.user-menu { position: relative; }

.user-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px 5px 10px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-strong);
    background: var(--bg-elevated);
    color: var(--gray-600);
    font-size: 13px;
    font-family: var(--font);
    cursor: pointer;
    transition: var(--transition-fast);
    line-height: 1;
    white-space: nowrap;
}
.user-pill:hover {
    background: var(--bg-surface);
    border-color: var(--primary);
    color: var(--gray-700);
}
.user-pill-email {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.user-pill-chevron {
    opacity: .55;
    flex-shrink: 0;
    transition: transform 0.15s var(--ease);
}
.user-pill[aria-expanded="true"] .user-pill-chevron { transform: rotate(180deg); }

.user-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 210px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    overflow: hidden;
    animation: dropIn 0.14s var(--ease);
    padding: 4px 0;
}
@keyframes dropIn {
    from { opacity: 0; transform: translateY(-6px) scale(.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 13px;
    color: var(--gray-600);
    text-decoration: none;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    font-family: var(--font);
    transition: background 0.1s, color 0.1s;
}
.user-dropdown-item:hover { background: var(--bg-surface); color: var(--gray-800); }
.user-dropdown-item svg   { opacity: .7; flex-shrink: 0; }

.user-dropdown-divider {
    height: 1px;
    background: var(--border-strong);
    margin: 4px 0;
}
.user-dropdown-logout { color: var(--danger); }
.user-dropdown-logout:hover { background: var(--danger-bg); color: var(--danger); }
.user-dropdown-logout svg { opacity: .8; }

/* ── 29. Reduced-motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── 30. Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .stats-grid      { grid-template-columns: 1fr 1fr; }
  .form-row        { grid-template-columns: 1fr; }
  .watchlist-grid  { grid-template-columns: 1fr; }
  .two-col         { grid-template-columns: 1fr !important; }
  .analytics-col-2,
  .responsive-grid-2 { grid-template-columns: 1fr !important; }
  .feeling-grid    { grid-template-columns: 1fr 1fr; }
  .tabs-wrapper    { gap: 1px; padding: 4px; }
  .tab-btn         { padding: 7px 10px; font-size: 12px; }
  .main-container  { padding: 12px; }
  header           { height: 48px; }
  .header-content  { padding: 0 12px; }
  .stat-value      { font-size: 28px; }
  /* Detail sticky sits below 48px mobile header */
  .detail-sticky   { top: 49px; }
  /* Truncate long emails in the user pill */
  .user-pill-email { max-width: 140px; }
  /* Kanban pipeline: allow horizontal scroll instead of squishing 8 columns */
  .kb-board { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 12px; }
  .kb-col   { flex: 0 0 190px; }
  /* Reduce modal inner padding so content area is usable on phones */
  #applyModal > div { padding: 20px 16px !important; }
}

@media (max-width: 480px) {
  .stats-grid      { grid-template-columns: 1fr; }
  .feeling-grid    { grid-template-columns: 1fr; }
  /* Very small phones: shrink email further so logo + pill fit in one row */
  .user-pill-email { max-width: 90px; }

  /* Reduce form-card padding so content breathes on 375–480px phones */
  .form-card { padding: 16px; }
  [data-theme="editorial"] .form-card,
  [data-theme="editorial-dark"] .form-card { padding: 16px; }

  /* Billing page: top margin is too generous on mobile */
  .billing-wrap { margin: 8px auto !important; }

  /* Watchlist grid was set to 1fr at 768px; keep tight but usable */
  .main-container { padding: 8px; }
}

@media (max-width: 400px) {
  /* Tightest phones (SE, older Android) */
  .form-card { padding: 12px; }
  [data-theme="editorial"] .form-card,
  [data-theme="editorial-dark"] .form-card { padding: 12px; }
  .tab-btn { padding: 6px 8px; font-size: 11px; }
  h1 { font-size: 22px; }
}

/* ════════════════════════════════════════════════════════════════
   Editorial theme — cream paper · ink type · electric-blue + gold
   ════════════════════════════════════════════════════════════════ */

/* ── Editorial — tokens ──────────────────────────────────────── */
[data-theme="editorial"] {
  --paper:      #F6F2EA;
  --paper-2:    #EFEAE0;
  --card:       #FFFFFF;
  --ink:        #14110F;
  --ink-2:      #3A3531;
  --ink-3:      #6B6359;
  --accent:        #2950E8;
  --accent-hover:  #1E3FC4;
  --accent-soft:   rgba(41,80,232,0.08);
  --accent-line:   rgba(41,80,232,0.22);
  --violet:     #5B3FE4;
  --gold:       #F4B400;
  --good:       #1F8A5B;
  --warn:       #C77A12;
  --bad:        #C2362B;
  --font-sans:  "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --font-mono:  "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --bg-base:     var(--paper);
  --bg-surface:  var(--card);
  --bg-elevated: var(--paper-2);
  --primary:        var(--accent);
  --primary-dark:   var(--accent-hover);
  --primary-light:  var(--accent-soft);
  --primary-glow:   rgba(41,80,232,0.18);
  --gray-50:  var(--paper);
  --gray-100: var(--paper-2);
  --gray-200: #E4DED3;
  --gray-400: var(--ink-3);
  --gray-500: var(--ink-3);
  --gray-600: var(--ink-2);
  --gray-700: var(--ink-2);
  --gray-800: var(--ink);
  --border:        rgba(20,17,15,0.10);
  --border-strong: rgba(20,17,15,0.20);
  --border-color:  rgba(20,17,15,0.10);
  --shadow-sm:   0 1px 2px rgba(20,17,15,0.06);
  --shadow-md:   0 8px 24px -12px rgba(20,17,15,0.18);
  --shadow-xl:   0 30px 80px -40px rgba(20,17,15,0.30);
  --shadow-glow: 0 0 0 3px rgba(41,80,232,0.18);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 22px;
  --font: var(--font-sans);
  --success:    var(--good);
  --success-bg: rgba(31,138,91,0.10);
  --warning:    var(--warn);
  --warning-bg: rgba(199,122,18,0.10);
  --danger:     var(--bad);
  --danger-bg:  rgba(194,54,43,0.10);
  --info:       var(--accent);
  --info-bg:    rgba(41,80,232,0.10);
}

/* ── Editorial — page chrome ─────────────────────────────────── */
[data-theme="editorial"] body {
  background: var(--paper);
  color: var(--ink-2);
  font-family: var(--font-sans);
  font-weight: 400;
  font-feature-settings: "ss01", "ss02", "cv11";
  background-image:
    radial-gradient(ellipse at 12% 0%, rgba(41,80,232,0.05) 0%, transparent 55%),
    radial-gradient(ellipse at 90% 90%, rgba(244,180,0,0.04) 0%, transparent 55%);
}
[data-theme="editorial"] h1,
[data-theme="editorial"] h2,
[data-theme="editorial"] h3,
[data-theme="editorial"] h4,
[data-theme="editorial"] .form-title {
  color: var(--ink);
  letter-spacing: -0.02em;
  font-weight: 600;
}
[data-theme="editorial"] h1 { letter-spacing: -0.035em; }
[data-theme="editorial"] h1 em,
[data-theme="editorial"] h2 em,
[data-theme="editorial"] h3 em,
[data-theme="editorial"] .serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}
[data-theme="editorial"] a       { color: var(--accent); }
[data-theme="editorial"] a:hover { color: var(--accent-hover); }
[data-theme="editorial"] ::selection { background: var(--ink); color: var(--paper); }
[data-theme="editorial"] details summary { color: var(--accent); }
[data-theme="editorial"] details summary:hover { color: var(--accent-hover); }
[data-theme="editorial"] tr:hover td { background: var(--accent-soft); }
[data-theme="editorial"] .job-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* ── Editorial — header ──────────────────────────────────────── */
[data-theme="editorial"] header {
  background: color-mix(in oklab, var(--paper) 80%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
[data-theme="editorial"] .header-logo { color: var(--ink); font-weight: 700; letter-spacing: -0.02em; }
[data-theme="editorial"] .header-logo:hover { color: var(--ink); }

/* ── Editorial — navigation tabs ─────────────────────────────── */
[data-theme="editorial"] .tabs-wrapper {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
}
[data-theme="editorial"] .tab-btn {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--ink-3);
  border-radius: 999px;
  padding: 8px 14px;
}
[data-theme="editorial"] .tab-btn:hover:not(.active) { background: var(--paper-2); color: var(--ink); }
[data-theme="editorial"] .tab-btn.active {
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(20,17,15,0.20);
}
[data-theme="editorial"] .tab-dropdown-menu {
  background: var(--card);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}
[data-theme="editorial"] .tab-dropdown-item.active { color: var(--accent); }

/* ── Editorial — cards ───────────────────────────────────────── */
[data-theme="editorial"] .list-card,
[data-theme="editorial"] .form-card,
[data-theme="editorial"] .stat-card,
[data-theme="editorial"] .job-card,
[data-theme="editorial"] .chart-container {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
}
[data-theme="editorial"] .list-header {
  background: transparent;
  border-bottom: 1px solid var(--border);
  padding: 18px 24px;
}
[data-theme="editorial"] .list-header h3 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--ink-3);
  font-weight: 500;
  text-transform: uppercase;
}
[data-theme="editorial"] .list-body { padding: 22px 24px; }
[data-theme="editorial"] .list-item {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
[data-theme="editorial"] .list-item:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft), var(--shadow-sm);
}
[data-theme="editorial"] .item-title { color: var(--ink); font-weight: 600; }
[data-theme="editorial"] .item-meta  { color: var(--ink-3); }
[data-theme="editorial"] .stat-card { padding: 26px 24px; }
[data-theme="editorial"] .stat-card::after {
  background: linear-gradient(90deg, var(--accent), var(--gold));
}
[data-theme="editorial"] .stat-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
[data-theme="editorial"] .stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--ink-3);
  font-weight: 500;
}
[data-theme="editorial"] .stat-value {
  font-size: 44px;
  font-weight: 600;
  letter-spacing: -0.035em;
  color: var(--ink);
}
[data-theme="editorial"] .stat-desc { color: var(--ink-3); }
[data-theme="editorial"] .job-card { padding: 22px; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
[data-theme="editorial"] .job-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 20px 50px -28px rgba(20,17,15,0.25);
  transform: translateY(-2px);
}
[data-theme="editorial"] .job-card.urgent { border-left: 3px solid var(--bad); }
[data-theme="editorial"] .job-header h4 { color: var(--ink); font-size: 17px; font-weight: 600; letter-spacing: -0.015em; }
[data-theme="editorial"] .job-company    { color: var(--ink-3); font-size: 13px; }
[data-theme="editorial"] .job-details    { color: var(--ink-3); font-size: 13px; }
[data-theme="editorial"] .job-content    { color: var(--ink-2); font-size: 14px; line-height: 1.65; }

/* ── Editorial — buttons ─────────────────────────────────────── */
[data-theme="editorial"] .btn {
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  padding: 10px 18px;
  border-radius: 999px;
  text-transform: none;
}
[data-theme="editorial"] .btn-sm { padding: 7px 14px; font-size: 12.5px; }
[data-theme="editorial"] .btn-primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
[data-theme="editorial"] .btn-primary:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 8px 24px -8px var(--accent);
  transform: translateY(-1px);
}
[data-theme="editorial"] .btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--border-strong);
}
[data-theme="editorial"] .btn-secondary:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
[data-theme="editorial"] .btn-danger {
  background: transparent;
  color: var(--bad);
  border-color: rgba(194,54,43,0.30);
}
[data-theme="editorial"] .btn-danger:hover {
  background: var(--bad);
  color: #fff;
  border-color: var(--bad);
  box-shadow: 0 6px 20px -8px var(--bad);
}

/* ── Editorial — forms ───────────────────────────────────────── */
[data-theme="editorial"] .form-card { padding: 28px; }
[data-theme="editorial"] .form-title { font-size: 22px; letter-spacing: -0.02em; }
[data-theme="editorial"] label,
[data-theme="editorial"] .form-group label,
[data-theme="editorial"] .filters-row label {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-2);
}
[data-theme="editorial"] input,
[data-theme="editorial"] textarea,
[data-theme="editorial"] select {
  background: var(--paper);
  border: 1px solid var(--border-strong);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 400;
  border-radius: var(--radius-md);
}
[data-theme="editorial"] input::placeholder,
[data-theme="editorial"] textarea::placeholder { color: var(--ink-3); }
[data-theme="editorial"] input:focus,
[data-theme="editorial"] textarea:focus,
[data-theme="editorial"] select:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(20,17,15,0.12);
  background: var(--card);
}

/* ── Editorial — badges & status ─────────────────────────────── */
[data-theme="editorial"] .status-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 9px;
  background: transparent;
  border: 1px solid currentColor;
  border-radius: 999px;
}
[data-theme="editorial"] .status-applied,
[data-theme="editorial"] .status-phone_screen,
[data-theme="editorial"] .status-take_home,
[data-theme="editorial"] .status-interview,
[data-theme="editorial"] .status-interested { color: var(--accent); }
[data-theme="editorial"] .status-offer       { color: var(--good); }
[data-theme="editorial"] .status-rejected    { color: var(--bad); opacity: 0.85; }
[data-theme="editorial"] .status-withdrawn   { color: var(--ink-3); opacity: 0.85; }
[data-theme="editorial"] .status-wishlist    { color: var(--warn); }
[data-theme="editorial"] .status-discovered  { color: var(--ink-3); }
[data-theme="editorial"] .badge {
  border-radius: 999px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  font-size: 11.5px;
}
[data-theme="editorial"] .badge-primary { background: var(--accent-soft); color: var(--accent); }
[data-theme="editorial"] .badge-gray    { background: var(--paper-2);    color: var(--ink-2); }
[data-theme="editorial"] .badge-warning { background: rgba(199,122,18,0.10); color: var(--warn); }
[data-theme="editorial"] .badge-danger  { background: rgba(194,54,43,0.10);  color: var(--bad); }
[data-theme="editorial"] .badge-success { background: rgba(31,138,91,0.10);  color: var(--good); }
[data-theme="editorial"] .match-badge   { background: var(--ink); color: var(--gold); border: 0; padding: 4px 10px; border-radius: 999px; }

/* ── Editorial — alerts ──────────────────────────────────────── */
[data-theme="editorial"] .alert {
  border-radius: var(--radius-md);
  border-left-width: 3px;
}
[data-theme="editorial"] .alert-success { background: rgba(31,138,91,0.06);  color: var(--good); border-color: rgba(31,138,91,0.20); border-left-color: var(--good); }
[data-theme="editorial"] .alert-error   { background: rgba(194,54,43,0.06);  color: var(--bad);  border-color: rgba(194,54,43,0.20);  border-left-color: var(--bad); }
[data-theme="editorial"] .alert-info    { background: var(--accent-soft);    color: var(--accent); border-color: var(--accent-line); border-left-color: var(--accent); }

/* ── Editorial — toasts ──────────────────────────────────────── */
[data-theme="editorial"] .toast {
  background: var(--ink);
  color: var(--paper);
  border-color: rgba(255,255,255,0.10);
  font-weight: 500;
}
[data-theme="editorial"] .toast-success { color: #6EE7B7; border-color: rgba(31,138,91,0.30); }
[data-theme="editorial"] .toast-error   { color: #FCA5A5; border-color: rgba(194,54,43,0.35); }

/* ── Editorial — tables ──────────────────────────────────────── */
[data-theme="editorial"] th {
  background: var(--paper-2);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  font-weight: 500;
  text-transform: uppercase;
  border-bottom-color: var(--border);
}
[data-theme="editorial"] td { color: var(--ink-2); border-bottom-color: var(--border); }

/* ── Editorial — user pill & dropdown ────────────────────────── */
[data-theme="editorial"] .user-pill {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--ink-2);
  border-radius: 999px;
}
[data-theme="editorial"] .user-pill:hover {
  background: var(--paper-2);
  border-color: var(--ink);
  color: var(--ink);
}
[data-theme="editorial"] .user-dropdown {
  background: var(--card);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-xl);
  border-radius: var(--radius-lg);
}
[data-theme="editorial"] .user-dropdown-item { color: var(--ink-2); }
[data-theme="editorial"] .user-dropdown-item:hover { background: var(--paper-2); color: var(--ink); }
[data-theme="editorial"] .user-dropdown-divider { background: var(--border); }
[data-theme="editorial"] .user-dropdown-logout { color: var(--bad); }
[data-theme="editorial"] .user-dropdown-logout:hover { background: rgba(194,54,43,0.08); color: var(--bad); }

/* ── Editorial — wizard ──────────────────────────────────────── */
[data-theme="editorial"] .wizard-step-node.active .wizard-step-circle {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 0 0 4px rgba(20,17,15,0.10);
}
[data-theme="editorial"] .wizard-step-node.active .wizard-step-label  { color: var(--ink); font-weight: 700; }
[data-theme="editorial"] .wizard-step-node.done   .wizard-step-circle { background: var(--good); color: #fff; box-shadow: 0 0 0 4px rgba(31,138,91,0.12); }
[data-theme="editorial"] .wizard-step-node.done   .wizard-step-label  { color: var(--good); }
[data-theme="editorial"] .wizard-connector.done { background: var(--good); }

/* ── Editorial — selectable cards ────────────────────────────── */
[data-theme="editorial"] .radio-card > label,
[data-theme="editorial"] .check-card > label,
[data-theme="editorial"] .activity-card > label,
[data-theme="editorial"] .feeling-card > label {
  background: var(--paper);
  border-color: var(--border-strong);
  color: var(--ink-2);
  border-radius: var(--radius-md);
}
[data-theme="editorial"] .radio-card input:checked + label,
[data-theme="editorial"] .check-card input:checked + label,
[data-theme="editorial"] .activity-card input:checked + label,
[data-theme="editorial"] .feeling-card input:checked + label {
  border-color: var(--ink);
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
}
[data-theme="editorial"] .radio-card label:hover,
[data-theme="editorial"] .check-card label:hover,
[data-theme="editorial"] .activity-card label:hover,
[data-theme="editorial"] .feeling-card label:hover { border-color: var(--ink); color: var(--ink); }

/* ── Editorial — schedule ────────────────────────────────────── */
[data-theme="editorial"] .sched-outer { border-color: var(--border); background: var(--card); border-radius: var(--radius-xl); }
[data-theme="editorial"] .sched-corner,
[data-theme="editorial"] .sched-day-hdr { background: var(--paper-2); color: var(--ink-3); border-color: var(--border); }
[data-theme="editorial"] .sched-day-hdr.today { background: var(--ink); color: var(--gold); }
[data-theme="editorial"] .sched-cat-job-search { background: rgba(41,80,232,0.12);  color: #1a3abf;  border-left-color: var(--accent); }
[data-theme="editorial"] .sched-cat-exercise   { background: rgba(16,185,129,0.13); color: #0d6e4a;  border-left-color: #10B981; }
[data-theme="editorial"] .sched-cat-outdoor    { background: rgba(13,124,115,0.12); color: #0a5e58;  border-left-color: #14B8A6; }
[data-theme="editorial"] .sched-cat-social     { background: rgba(245,158,11,0.14); color: #92400e;  border-left-color: #F59E0B; }
[data-theme="editorial"] .sched-cat-learning   { background: rgba(91,63,228,0.12);  color: #4730b8;  border-left-color: var(--violet); }
[data-theme="editorial"] .sched-cat-household  { background: rgba(100,116,139,0.12);color: #334155;  border-left-color: #94A3B8; }
[data-theme="editorial"] .sched-cat-creative   { background: rgba(236,72,153,0.12); color: #9d174d;  border-left-color: #EC4899; }
[data-theme="editorial"] .sched-cat-personal   { background: rgba(249,115,22,0.12); color: #9a3412;  border-left-color: #F97316; }
[data-theme="editorial"] .sched-cat-rest       { background: rgba(14,165,233,0.12); color: #0c5a82;  border-left-color: #0EA5E9; }
[data-theme="editorial"] .sched-cat-meal       { background: rgba(234,179,8,0.16);  color: #713f12;  border-left-color: #FACC15; }

/* ── Editorial — chart text ──────────────────────────────────── */
[data-theme="editorial"] .chart-container h3 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--ink-3);
  font-weight: 500;
}

/* ── Editorial — content editor ──────────────────────────────── */
[data-theme="editorial"] #fFullContentEditor {
  background: var(--paper);
  border-color: var(--border-strong);
  color: var(--ink-2);
  border-radius: var(--radius-md);
}
[data-theme="editorial"] #fFullContentEditor:focus { outline-color: var(--ink); }

/* ── Editorial — review button ───────────────────────────────── */
[data-theme="editorial"] .review-btn {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-line);
  padding: 5px 11px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 999px;
}
[data-theme="editorial"] .review-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ── Editorial — small tabs ──────────────────────────────────── */
[data-theme="editorial"] .tabs-wrapper--sm { padding: 3px; }
[data-theme="editorial"] .tabs-wrapper--sm .tab-btn { padding: 7px 14px; font-size: 12.5px; }

/* ════════════════════════════════════════════════════════════════
   Editorial DARK — warm ink · cream type · electric blue + gold
   ════════════════════════════════════════════════════════════════ */

[data-theme="editorial-dark"] {
  --ink:        #0C0A08;
  --ink-2:      #15120E;
  --ink-3:      #1F1B16;
  --ink-4:      #2A251D;
  --ink-5:      #3A332A;
  --paper:      #F4EFE3;
  --paper-2:    #D9D2C3;
  --paper-3:    #948B7A;
  --paper-4:    #5E574B;
  --accent:        #5B82FF;
  --accent-hover:  #7C9CFF;
  --accent-soft:   rgba(91,130,255,0.14);
  --accent-line:   rgba(91,130,255,0.32);
  --accent-glow:   rgba(91,130,255,0.40);
  --gold:       #F4B400;
  --gold-soft:  rgba(244,180,0,0.14);
  --violet:     #8A6FF0;
  --good:       #6EE7A7;
  --warn:       #E8B860;
  --bad:        #F47A6F;
  --font-sans:  "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --font-mono:  "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font: var(--font-sans);
  --bg-base:     var(--ink);
  --bg-surface:  var(--ink-3);
  --bg-elevated: var(--ink-2);
  --primary:        var(--accent);
  --primary-dark:   var(--accent-hover);
  --primary-light:  var(--accent-soft);
  --primary-glow:   var(--accent-glow);
  --gray-50:  var(--ink-2);
  --gray-100: var(--ink-3);
  --gray-200: var(--ink-4);
  --gray-400: var(--paper-4);
  --gray-500: var(--paper-3);
  --gray-600: var(--paper-2);
  --gray-700: var(--paper);
  --gray-800: var(--paper);
  --border:        rgba(244,239,227,0.08);
  --border-strong: rgba(244,239,227,0.16);
  --border-color:  rgba(244,239,227,0.08);
  --shadow-sm:   0 1px 2px rgba(0,0,0,0.40);
  --shadow-md:   0 12px 28px -16px rgba(0,0,0,0.65);
  --shadow-xl:   0 36px 90px -50px rgba(0,0,0,0.80);
  --shadow-glow: 0 0 0 3px var(--accent-soft);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 22px;
  --success:    var(--good);  --success-bg: rgba(110,231,167,0.10);
  --warning:    var(--warn);  --warning-bg: rgba(232,184,96,0.10);
  --danger:     var(--bad);   --danger-bg:  rgba(244,122,111,0.12);
  --info:       var(--accent); --info-bg:   var(--accent-soft);
}

/* ── Page chrome ─────────────────────────────────────────────── */
[data-theme="editorial-dark"] body {
  background: var(--ink);
  color: var(--paper-2);
  font-family: var(--font-sans);
  font-weight: 400;
  font-feature-settings: "ss01", "ss02", "cv11";
  background-image:
    radial-gradient(ellipse at 8% -10%, rgba(91,130,255,0.10) 0%, transparent 55%),
    radial-gradient(ellipse at 95% 100%, rgba(244,180,0,0.06) 0%, transparent 60%);
  background-attachment: fixed;
}
[data-theme="editorial-dark"] h1,
[data-theme="editorial-dark"] h2,
[data-theme="editorial-dark"] h3,
[data-theme="editorial-dark"] h4,
[data-theme="editorial-dark"] .form-title {
  color: var(--paper);
  letter-spacing: -0.02em;
  font-weight: 600;
}
[data-theme="editorial-dark"] h1 { letter-spacing: -0.035em; }
[data-theme="editorial-dark"] h1 em,
[data-theme="editorial-dark"] h2 em,
[data-theme="editorial-dark"] h3 em,
[data-theme="editorial-dark"] .serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--gold);
}
[data-theme="editorial-dark"] a       { color: var(--accent); }
[data-theme="editorial-dark"] a:hover { color: var(--accent-hover); }
[data-theme="editorial-dark"] ::selection { background: var(--paper); color: var(--ink); }

/* ── Header ──────────────────────────────────────────────────── */
[data-theme="editorial-dark"] header,
[data-theme="editorial-dark"] .app-header {
  background: color-mix(in oklab, var(--ink) 75%, transparent);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
[data-theme="editorial-dark"] .header-logo { color: var(--paper); font-weight: 700; letter-spacing: -0.02em; }

/* ── Tabs ────────────────────────────────────────────────────── */
[data-theme="editorial-dark"] .tabs-wrapper {
  background: var(--ink-3);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
}
[data-theme="editorial-dark"] .tab-btn {
  font: 500 13px/1 var(--font-sans);
  color: var(--paper-3);
  border-radius: 999px;
  padding: 9px 16px;
}
[data-theme="editorial-dark"] .tab-btn:hover:not(.active) { background: var(--ink-4); color: var(--paper); }
[data-theme="editorial-dark"] .tab-btn.active {
  background: var(--paper);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 4px 14px -4px rgba(0,0,0,0.45);
}

/* ── Cards ───────────────────────────────────────────────────── */
[data-theme="editorial-dark"] .list-card,
[data-theme="editorial-dark"] .form-card,
[data-theme="editorial-dark"] .stat-card,
[data-theme="editorial-dark"] .job-card,
[data-theme="editorial-dark"] .chart-container {
  background: var(--ink-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
}
[data-theme="editorial-dark"] .list-header {
  background: transparent;
  border-bottom: 1px solid var(--border);
  padding: 18px 24px;
}
[data-theme="editorial-dark"] .list-header h3 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--paper-3);
  font-weight: 500;
  text-transform: uppercase;
}
[data-theme="editorial-dark"] .list-body { padding: 14px 18px; }
[data-theme="editorial-dark"] .list-item {
  background: var(--ink-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
[data-theme="editorial-dark"] .list-item:hover {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 1px var(--accent-soft);
  transform: translateY(-1px);
}
[data-theme="editorial-dark"] .item-title { color: var(--paper); font-weight: 600; }
[data-theme="editorial-dark"] .item-meta  { color: var(--paper-3); }

/* ── Stat cards ──────────────────────────────────────────────── */
[data-theme="editorial-dark"] .stat-card { padding: 22px 22px 20px; overflow: hidden; position: relative; }
[data-theme="editorial-dark"] .stat-card::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 1px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--gold) 80%, transparent);
  opacity: .55;
}
[data-theme="editorial-dark"] .stat-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
[data-theme="editorial-dark"] .stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--paper-3);
  font-weight: 500;
}
[data-theme="editorial-dark"] .stat-value {
  font-size: 48px;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--paper);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
[data-theme="editorial-dark"] .stat-desc { color: var(--paper-3); }

/* ── Buttons ─────────────────────────────────────────────────── */
[data-theme="editorial-dark"] .btn {
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  padding: 10px 18px;
  border-radius: 999px;
  text-transform: none;
}
[data-theme="editorial-dark"] .btn-sm { padding: 7px 14px; font-size: 12.5px; }
[data-theme="editorial-dark"] .btn-primary {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}
[data-theme="editorial-dark"] .btn-primary:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 8px 24px -8px var(--accent);
  transform: translateY(-1px);
}
[data-theme="editorial-dark"] .btn-secondary {
  background: transparent;
  color: var(--paper);
  border-color: var(--border-strong);
}
[data-theme="editorial-dark"] .btn-secondary:hover { background: var(--ink-4); border-color: var(--paper-3); }
[data-theme="editorial-dark"] .btn-danger {
  background: transparent;
  color: var(--bad);
  border-color: rgba(244,122,111,0.30);
}
[data-theme="editorial-dark"] .btn-danger:hover {
  background: rgba(244,122,111,0.12);
  border-color: var(--bad);
}

/* ── Forms ───────────────────────────────────────────────────── */
[data-theme="editorial-dark"] .form-card { padding: 28px; }
[data-theme="editorial-dark"] .form-title { font-size: 22px; letter-spacing: -0.02em; color: var(--paper); }
[data-theme="editorial-dark"] label,
[data-theme="editorial-dark"] .form-group label,
[data-theme="editorial-dark"] .filters-row label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--paper-3);
}
[data-theme="editorial-dark"] input,
[data-theme="editorial-dark"] textarea,
[data-theme="editorial-dark"] select {
  background: var(--ink-2);
  border: 1px solid var(--border-strong);
  color: var(--paper);
  font-family: var(--font-sans);
  border-radius: var(--radius-md);
}
[data-theme="editorial-dark"] input::placeholder,
[data-theme="editorial-dark"] textarea::placeholder { color: var(--paper-4); }
[data-theme="editorial-dark"] input:focus,
[data-theme="editorial-dark"] textarea:focus,
[data-theme="editorial-dark"] select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  background: var(--ink-3);
  outline: none;
}

/* ── Status badges ───────────────────────────────────────────── */
[data-theme="editorial-dark"] .status-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 4px 9px;
  background: transparent;
  border: 1px solid currentColor;
  border-radius: 999px;
}
[data-theme="editorial-dark"] .status-applied,
[data-theme="editorial-dark"] .status-phone_screen,
[data-theme="editorial-dark"] .status-take_home,
[data-theme="editorial-dark"] .status-interview,
[data-theme="editorial-dark"] .status-interested { color: var(--accent); }
[data-theme="editorial-dark"] .status-offer      { color: var(--good); }
[data-theme="editorial-dark"] .status-rejected   { color: var(--bad); opacity: 0.9; }
[data-theme="editorial-dark"] .status-withdrawn  { color: var(--paper-3); }
[data-theme="editorial-dark"] .status-wishlist   { color: var(--gold); }
[data-theme="editorial-dark"] .badge {
  border-radius: 999px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  font-size: 11.5px;
}
[data-theme="editorial-dark"] .badge-primary { background: var(--accent-soft); color: var(--accent); }
[data-theme="editorial-dark"] .badge-gray    { background: var(--ink-4);       color: var(--paper-2); }
[data-theme="editorial-dark"] .badge-warning { background: var(--gold-soft);   color: var(--warn); }
[data-theme="editorial-dark"] .badge-danger  { background: rgba(244,122,111,0.14); color: var(--bad); }
[data-theme="editorial-dark"] .badge-success { background: rgba(110,231,167,0.12); color: var(--good); }
[data-theme="editorial-dark"] .match-badge   { background: var(--paper); color: var(--ink); border: 0; padding: 4px 10px; border-radius: 999px; font-weight: 600; }

/* ── Alerts ──────────────────────────────────────────────────── */
[data-theme="editorial-dark"] .alert {
  border-radius: var(--radius-md);
  border-left-width: 3px;
}
[data-theme="editorial-dark"] .alert-success { background: rgba(110,231,167,0.06);  color: var(--good); border-color: rgba(110,231,167,0.20); border-left-color: var(--good); }
[data-theme="editorial-dark"] .alert-error   { background: rgba(244,122,111,0.08); color: var(--bad);  border-color: rgba(244,122,111,0.24);  border-left-color: var(--bad); }
[data-theme="editorial-dark"] .alert-info    { background: var(--accent-soft);    color: var(--accent); border-color: var(--accent-line); border-left-color: var(--accent); }

/* ── Tables ──────────────────────────────────────────────────── */
[data-theme="editorial-dark"] th {
  background: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--paper-3);
  font-weight: 500;
  text-transform: uppercase;
  border-bottom-color: var(--border);
}
[data-theme="editorial-dark"] td { color: var(--paper-2); border-bottom-color: var(--border); }
[data-theme="editorial-dark"] tr:hover td { background: rgba(91,130,255,0.04); }

/* ── User pill & dropdown ────────────────────────────────────── */
[data-theme="editorial-dark"] .user-pill {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--paper-2);
  border-radius: 999px;
}
[data-theme="editorial-dark"] .user-pill:hover { background: var(--ink-3); border-color: var(--paper-3); color: var(--paper); }
[data-theme="editorial-dark"] .user-dropdown {
  background: var(--ink-3);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-xl);
  border-radius: var(--radius-lg);
}
[data-theme="editorial-dark"] .user-dropdown-item { color: var(--paper-2); }
[data-theme="editorial-dark"] .user-dropdown-item:hover { background: var(--ink-4); color: var(--paper); }
[data-theme="editorial-dark"] .user-dropdown-divider { background: var(--border); }
[data-theme="editorial-dark"] .user-dropdown-logout { color: var(--bad); }

/* ── Wizard steps ────────────────────────────────────────────── */
[data-theme="editorial-dark"] .wizard-step-node .wizard-step-circle { background: var(--ink-3); color: var(--paper-3); border: 1px solid var(--border-strong); }
[data-theme="editorial-dark"] .wizard-step-node.active .wizard-step-circle {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
  box-shadow: 0 0 0 4px rgba(244,239,227,0.10);
}
[data-theme="editorial-dark"] .wizard-step-node.active .wizard-step-label  { color: var(--paper); font-weight: 600; }
[data-theme="editorial-dark"] .wizard-step-node.done   .wizard-step-circle { background: var(--good); color: var(--ink); box-shadow: 0 0 0 4px rgba(110,231,167,0.14); }
[data-theme="editorial-dark"] .wizard-step-node.done   .wizard-step-label  { color: var(--good); }
[data-theme="editorial-dark"] .wizard-connector       { background: var(--border-strong); }
[data-theme="editorial-dark"] .wizard-connector.done  { background: var(--good); }

/* ── Selectable cards ────────────────────────────────────────── */
[data-theme="editorial-dark"] .radio-card > label,
[data-theme="editorial-dark"] .check-card > label,
[data-theme="editorial-dark"] .activity-card > label,
[data-theme="editorial-dark"] .feeling-card > label {
  background: var(--ink-2);
  border: 1px solid var(--border-strong);
  color: var(--paper-2);
  border-radius: var(--radius-md);
}
[data-theme="editorial-dark"] .radio-card input:checked + label,
[data-theme="editorial-dark"] .check-card input:checked + label,
[data-theme="editorial-dark"] .activity-card input:checked + label,
[data-theme="editorial-dark"] .feeling-card input:checked + label {
  border-color: var(--paper);
  background: var(--ink-3);
  color: var(--paper);
  box-shadow: 0 0 0 1px var(--paper);
}
[data-theme="editorial-dark"] .radio-card label:hover,
[data-theme="editorial-dark"] .check-card label:hover,
[data-theme="editorial-dark"] .activity-card label:hover,
[data-theme="editorial-dark"] .feeling-card label:hover { border-color: var(--paper-3); color: var(--paper); }

/* ── Schedule grid ───────────────────────────────────────────── */
[data-theme="editorial-dark"] .sched-outer { border-color: var(--border); background: var(--ink-3); border-radius: var(--radius-xl); }
[data-theme="editorial-dark"] .sched-corner,
[data-theme="editorial-dark"] .sched-day-hdr {
  background: var(--ink-2);
  color: var(--paper-3);
  border-color: var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
[data-theme="editorial-dark"] .sched-day-hdr.today { background: var(--paper); color: var(--ink); }
[data-theme="editorial-dark"] .sched-cell { border-color: var(--border); }
[data-theme="editorial-dark"] .sched-cat-job-search { background: rgba(91,130,255,0.18);  color: var(--accent);     border-left: 3px solid var(--accent); }
[data-theme="editorial-dark"] .sched-cat-exercise,
[data-theme="editorial-dark"] .sched-cat-outdoor    { background: rgba(110,231,167,0.16); color: var(--good);       border-left: 3px solid var(--good); }
[data-theme="editorial-dark"] .sched-cat-learning   { background: rgba(138,111,240,0.16); color: var(--violet);     border-left: 3px solid var(--violet); }
[data-theme="editorial-dark"] .sched-cat-rest,
[data-theme="editorial-dark"] .sched-cat-meal       { background: var(--gold-soft);       color: var(--gold);       border-left: 3px solid var(--gold); }
[data-theme="editorial-dark"] .sched-cat-social     { background: rgba(244,122,111,0.14); color: var(--bad);        border-left: 3px solid var(--bad); }
[data-theme="editorial-dark"] .sched-cat-personal,
[data-theme="editorial-dark"] .sched-cat-household  { background: rgba(244,239,227,0.06); color: var(--paper-2);    border-left: 3px solid var(--paper-3); }
[data-theme="editorial-dark"] .sched-cat-creative   { background: rgba(244,180,0,0.10);   color: var(--gold);       border-left: 3px solid var(--gold); }

/* ── Charts ──────────────────────────────────────────────────── */
[data-theme="editorial-dark"] .chart-container h3 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--paper-3);
  font-weight: 500;
  text-transform: uppercase;
}

/* ── Content editor ──────────────────────────────────────────── */
[data-theme="editorial-dark"] #fFullContentEditor {
  background: var(--ink-2);
  border-color: var(--border-strong);
  color: var(--paper-2);
  border-radius: var(--radius-md);
}
[data-theme="editorial-dark"] #fFullContentEditor:focus { outline: 1px solid var(--accent); }

/* ── Toasts ──────────────────────────────────────────────────── */
[data-theme="editorial-dark"] .toast {
  background: var(--ink-3);
  color: var(--paper);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
}
[data-theme="editorial-dark"] .toast-success { border-left: 3px solid var(--good); }
[data-theme="editorial-dark"] .toast-error   { border-left: 3px solid var(--bad); }

/* ── Review button ───────────────────────────────────────────── */
[data-theme="editorial-dark"] .review-btn {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-line);
  padding: 5px 11px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 999px;
}
[data-theme="editorial-dark"] .review-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ── Small tabs ──────────────────────────────────────────────── */
[data-theme="editorial-dark"] .tabs-wrapper--sm { padding: 3px; }
[data-theme="editorial-dark"] .tabs-wrapper--sm .tab-btn { padding: 7px 14px; font-size: 12.5px; }

/* ── Applications list — per-status accent ───────────────────── */
[data-theme="editorial-dark"] .list-item[data-status="applied"]     { border-left: 2px solid rgba(91,130,255,0.40); }
[data-theme="editorial-dark"] .list-item[data-status="rejected"]    { border-left: 2px solid rgba(244,122,111,0.30); }
[data-theme="editorial-dark"] .list-item[data-status="phone_screen"]{ border-left: 2px solid rgba(138,111,240,0.40); }
[data-theme="editorial-dark"] .list-item[data-status="withdrawn"]   { opacity: 0.7; }
