/* ═══════════════════════════════════════════════════════════════════
   BoostFit Design System v2 — Dark Theme, Indigo Accent
   ═══════════════════════════════════════════════════════════════════ */

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

/* ─── CSS Custom Properties ─── */
:root {
  /* Backgrounds */
  --bg: #0b0b1a;
  --bg-elevated: #111128;
  --surface: rgba(26, 26, 46, 0.85);
  --surface-hover: rgba(36, 36, 56, 0.9);
  --surface-glass: rgba(26, 26, 46, 0.6);
  --border: rgba(129, 140, 248, 0.12);
  --border-hover: rgba(129, 140, 248, 0.25);

  /* Text */
  --text: #f0f0ff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-dim: #475569;

  /* Brand — Indigo */
  --primary: #818cf8;
  --primary-hover: #6366f1;
  --primary-soft: rgba(129, 140, 248, 0.12);
  --primary-glow: rgba(129, 140, 248, 0.25);
  --primary-gradient: linear-gradient(135deg, #818cf8, #6366f1);

  /* Semantic */
  --green: #22c55e;
  --green-soft: rgba(34, 197, 94, 0.12);
  --yellow: #f59e0b;
  --yellow-soft: rgba(245, 158, 11, 0.12);
  --red: #ef4444;
  --red-soft: rgba(239, 68, 68, 0.1);
  --purple: #a855f7;
  --purple-soft: rgba(168, 85, 247, 0.12);
  --cyan: #06b6d4;
  --cyan-soft: rgba(6, 182, 212, 0.12);
  --orange: #f97316;
  --orange-soft: rgba(249, 115, 22, 0.12);

  /* Layout */
  --sidebar-w: 240px;
  --topbar-h: 60px;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 30px rgba(129, 140, 248, 0.08);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Light Mode ─── */
body.light {
  --bg: #f1f5f9;
  --bg-elevated: #e2e8f0;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-hover: rgba(255, 255, 255, 1);
  --surface-glass: rgba(255, 255, 255, 0.7);
  --border: rgba(100, 116, 139, 0.15);
  --border-hover: rgba(99, 102, 241, 0.3);
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-dim: #cbd5e1;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* ─── Reset & Base ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }
img { max-width: 100%; display: block; }

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ═══════════════════════════════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════════════════════════════ */

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

/* ─── Sidebar ─── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform var(--transition);
  overflow: hidden;
}
.sidebar-brand {
  padding: 18px 20px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}
.sidebar-brand .brand-icon {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: var(--primary-gradient);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: #fff; font-weight: 800;
  box-shadow: 0 0 20px var(--primary-glow);
}
.sidebar-brand .brand-text {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--text), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px 10px;
}
.sidebar-nav section { margin-bottom: 16px; }
.sidebar-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  padding: 6px 10px 4px;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
  margin-bottom: 1px;
  position: relative;
}
.sidebar-link:hover { color: var(--text); background: var(--primary-soft); }
.sidebar-link.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}
.sidebar-link.active::before {
  content: '';
  position: absolute; left: -10px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px; border-radius: 0 3px 3px 0;
  background: var(--primary-gradient);
}
.sidebar-link i { width: 18px; text-align: center; font-size: 13px; }
.sidebar-badge {
  font-size: 9px; font-weight: 700;
  padding: 1px 7px; border-radius: 10px;
  margin-left: auto;
}
.sidebar-badge.primary { background: var(--primary-soft); color: var(--primary); }
.sidebar-badge.green { background: var(--green-soft); color: var(--green); }
.sidebar-badge.yellow { background: var(--yellow-soft); color: var(--yellow); }
.sidebar-bottom {
  padding: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 6px;
}
.sidebar-bottom button {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px;
  border-radius: var(--radius-xs);
  font-size: 11px; font-weight: 600;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  transition: all var(--transition);
}
.sidebar-bottom button:hover { color: var(--text); border-color: var(--border-hover); background: var(--primary-soft); }
.sidebar-bottom button.logout { color: var(--red); }
.sidebar-bottom button.logout:hover { background: var(--red-soft); border-color: rgba(239,68,68,.2); }

/* ─── Main Area ─── */
.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; }

/* ─── Topbar ─── */
.topbar {
  background: var(--surface);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky; top: 0;
  z-index: 50;
}
.topbar-menu {
  display: none;
  background: none; border: none;
  color: var(--text-secondary);
  font-size: 20px;
  padding: 6px;
  border-radius: var(--radius-xs);
  transition: all var(--transition);
}
.topbar-menu:hover { color: var(--text); background: var(--primary-soft); }
.topbar-search { flex: 1; max-width: 360px; position: relative; }
.topbar-search i {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: 13px;
  pointer-events: none;
}
.topbar-search input {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 8px 16px 8px 38px;
  font-size: 13px;
  color: var(--text);
  outline: none;
  transition: all var(--transition);
}
.topbar-search input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.topbar-search input::placeholder { color: var(--text-muted); }
.topbar-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.topbar-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 16px;
  border-radius: 24px;
  font-size: 12px; font-weight: 600;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  transition: all var(--transition);
  white-space: nowrap;
}
.topbar-btn:hover { color: var(--text); border-color: var(--border-hover); background: var(--primary-soft); }
.topbar-btn.accent {
  background: var(--primary-gradient);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 0 20px var(--primary-glow);
}
.topbar-btn.accent:hover { opacity: .9; box-shadow: 0 0 30px var(--primary-glow); }

/* ─── Content ─── */
.content { padding: 24px; }

/* ═══════════════════════════════════════════════════════════════════
   COMPONENTS
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Stats Row ─── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--primary-gradient);
  opacity: 0;
  transition: opacity var(--transition);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-glow); border-color: var(--border-hover); }
.stat-card:hover::before { opacity: 1; }
.stat-card .stat-icon { font-size: 18px; margin-bottom: 8px; opacity: 0.7; }
.stat-card .stat-value {
  font-size: 28px; font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 2px;
  background: linear-gradient(135deg, var(--text), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-card .stat-label {
  font-size: 10px; font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.stat-card .stat-sub { font-size: 10px; color: var(--text-dim); margin-top: 4px; }

/* ─── Section Title ─── */
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.section-title h2 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title h2 i { color: var(--primary); }
.view-tabs {
  display: flex;
  gap: 2px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 3px;
}
.view-tab {
  padding: 5px 14px;
  border-radius: 24px;
  font-size: 11px; font-weight: 600;
  border: none;
  background: transparent;
  color: var(--text-muted);
  transition: all var(--transition);
  cursor: pointer;
}
.view-tab:hover { color: var(--text); }
.view-tab.active {
  background: var(--primary-gradient);
  color: #fff;
  box-shadow: 0 0 12px var(--primary-glow);
}

/* ─── Job Cards ─── */
.job-grid { display: grid; gap: 10px; }
.job-card {
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all var(--transition);
}
.job-card:hover { border-color: var(--border-hover); box-shadow: var(--shadow-glow); transform: translateY(-1px); }
.job-score {
  width: 46px; height: 46px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800;
  flex-shrink: 0;
  border: 2px solid var(--border);
  font-family: monospace;
}
.job-score.high { border-color: var(--green); color: var(--green); background: var(--green-soft); }
.job-score.mid { border-color: var(--yellow); color: var(--yellow); background: var(--yellow-soft); }
.job-score.low { border-color: var(--text-dim); color: var(--text-muted); }
.job-score.ai { border-color: var(--purple); color: var(--purple); background: var(--purple-soft); }
.job-info { flex: 1; min-width: 0; }
.job-company {
  font-size: 15px; font-weight: 700;
  letter-spacing: -0.01em; line-height: 1.3;
}
.job-role {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 420px;
}
.job-meta { display: flex; align-items: center; gap: 12px; margin-top: 6px; flex-wrap: wrap; }
.job-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 600;
  color: var(--text-muted);
}
.job-tag i { font-size: 9px; }
.job-tag.source { color: var(--primary); }
.job-tag.salary { color: var(--green); }
.job-tag.stale { color: var(--red); }
.job-status {
  display: inline-flex;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.status-Discovered { background: rgba(100, 116, 139, 0.1); color: var(--text-muted); border: 1px solid rgba(100, 116, 139, 0.15); }
.status-Applied { background: var(--primary-soft); color: var(--primary); border: 1px solid rgba(129, 140, 248, 0.2); }
.status-Interview { background: var(--yellow-soft); color: var(--yellow); border: 1px solid rgba(245, 158, 11, 0.2); }
.status-Offer { background: var(--green-soft); color: var(--green); border: 1px solid rgba(34, 197, 94, 0.2); }
.status-Rejected { background: var(--red-soft); color: var(--red); border: 1px solid rgba(239, 68, 68, 0.15); }
.status-Saved { background: var(--purple-soft); color: var(--purple); border: 1px solid rgba(168, 85, 247, 0.2); }
.job-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.btn-sm {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11px; font-weight: 600;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  transition: all var(--transition);
  white-space: nowrap;
  cursor: pointer;
}
.btn-sm:hover { color: var(--text); border-color: var(--border-hover); background: var(--primary-soft); }
.btn-sm.accent { background: var(--primary-soft); color: var(--primary); border-color: rgba(129, 140, 248, 0.25); }
.btn-sm.green { background: var(--green-soft); color: var(--green); border-color: rgba(34, 197, 94, 0.25); }
.btn-sm.ghost { border: none; padding: 5px 8px; background: transparent; }
.btn-sm.ghost:hover { background: var(--primary-soft); }

/* ─── Kanban ─── */
.kanban-wrap {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  min-height: 400px;
}
.kanban-col {
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all var(--transition);
}
.kanban-col:hover { border-color: var(--border-hover); box-shadow: var(--shadow-glow); }
.kanban-col-head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.kanban-col-title {
  font-size: 10px; font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.kanban-col-count {
  font-size: 10px; font-weight: 700;
  padding: 1px 8px;
  border-radius: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.kanban-col-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 120px;
}
.kanban-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  cursor: grab;
  border-left: 3px solid var(--primary);
  transition: all var(--transition);
}
.kanban-item:hover { border-color: var(--border-hover); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.kanban-item .ki-source {
  font-size: 8px; font-weight: 800;
  text-transform: uppercase;
  color: var(--primary);
  letter-spacing: 0.06em;
}
.kanban-item .ki-company { font-size: 13px; font-weight: 700; margin: 4px 0 2px; }
.kanban-item .ki-role { font-size: 11px; color: var(--text-secondary); }
.kanban-item .ki-actions { margin-top: 6px; display: flex; gap: 4px; }
.kanban-item .ki-btn {
  flex: 1; font-size: 10px; font-weight: 700;
  padding: 4px; border-radius: var(--radius-xs);
  text-align: center; border: none;
  transition: all var(--transition);
  text-decoration: none;
  display: flex; align-items: center; justify-content: center;
}

/* ─── Inbox ─── */
.inbox-list { display: flex; flex-direction: column; gap: 8px; }
.inbox-item {
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  transition: all var(--transition);
}
.inbox-item:hover { border-color: var(--border-hover); box-shadow: var(--shadow-glow); }
.inbox-header-row { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.inbox-sender { font-size: 13px; font-weight: 700; }
.inbox-time { font-size: 10px; color: var(--text-muted); font-family: monospace; }
.inbox-context { font-size: 10px; color: var(--primary); font-weight: 600; }
.inbox-subject { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.inbox-preview { font-size: 12px; color: var(--text-secondary); line-height: 1.5; max-height: 60px; overflow: hidden; }

/* ─── Empty State ─── */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state i { font-size: 48px; color: var(--text-dim); opacity: 0.3; display: block; margin-bottom: 16px; }
.empty-state h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; color: var(--text-secondary); }
.empty-state p { color: var(--text-muted); font-size: 13px; font-weight: 500; }

/* ─── Flash Message ─── */
.flash-bar {
  background: var(--primary-soft);
  border: 1px solid rgba(129, 140, 248, 0.2);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  backdrop-filter: blur(12px);
}
.flash-bar button { background: none; border: none; color: var(--text-muted); cursor: pointer; }

/* ─── Country Pills ─── */
.country-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.country-pill {
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 11px; font-weight: 600;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all var(--transition);
  cursor: pointer;
}
.country-pill:hover { color: var(--text); border-color: var(--border-hover); background: var(--primary-soft); }
.country-pill.active {
  background: var(--primary-soft);
  border-color: rgba(129, 140, 248, 0.3);
  color: var(--primary);
}

/* ─── Action Bar ─── */
.action-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.action-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  border-radius: 24px;
  font-size: 11px; font-weight: 600;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  transition: all var(--transition);
  white-space: nowrap;
  cursor: pointer;
}
.action-btn:hover { color: var(--text); border-color: var(--border-hover); background: var(--primary-soft); }
.action-btn i { font-size: 13px; }
.action-input {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 6px 14px;
  font-size: 12px;
  color: var(--text);
  width: 90px;
  outline: none;
  transition: all var(--transition);
}
.action-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }

/* ─── Activity Heatmap ─── */
.heatmap-wrap {
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 20px;
}
.heatmap-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; flex-wrap: wrap; gap: 10px; }
.heatmap-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.heatmap-legend { display: flex; align-items: center; gap: 3px; font-size: 9px; color: var(--text-muted); }
.heatmap-legend div { width: 10px; height: 10px; border-radius: 2px; }
.heatmap-grid { display: flex; gap: 2px; overflow-x: auto; padding-bottom: 4px; }

/* ─── Velocity ─── */
.velocity-row { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.velocity-card {
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 280px;
}
.velocity-card:hover { box-shadow: var(--shadow-glow); border-color: var(--border-hover); }
.vel-main { text-align: center; min-width: 70px; }
.vel-main .big { font-size: 26px; font-weight: 800; color: var(--primary); }
.vel-main .sub { font-size: 10px; color: var(--text-muted); }
.vel-divider { width: 1px; height: 40px; background: var(--border); }
.vel-metrics { display: flex; gap: 20px; flex: 1; flex-wrap: wrap; }
.vel-metric { text-align: center; }
.vel-metric .val { font-size: 18px; font-weight: 700; }
.vel-metric .lbl { font-size: 10px; color: var(--text-muted); }

/* ─── Notes ─── */
.notes-card {
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  flex: 2;
  min-width: 300px;
}
.notes-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.notes-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.notes-grid { display: flex; gap: 8px; flex-wrap: wrap; min-height: 32px; }
.note-chip {
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 11px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  position: relative;
  max-width: 200px;
}
.note-chip .txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-chip .act { display: flex; gap: 4px; margin-top: 4px; }
.note-chip .act button {
  font-size: 9px;
  background: rgba(0,0,0,0.2);
  border: none;
  border-radius: 4px;
  padding: 1px 5px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--transition);
}
.note-chip .act button:hover { color: var(--text); }

/* ─── AI Pulse ─── */
.pulse-card {
  background: linear-gradient(135deg, var(--primary-soft), var(--purple-soft));
  border: 1px solid rgba(129, 140, 248, 0.15);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  transition: all var(--transition);
}
.pulse-card:hover { border-color: rgba(129, 140, 248, 0.3); box-shadow: var(--shadow-glow); }
.pulse-left { display: flex; align-items: center; gap: 10px; }
.pulse-icon { font-size: 16px; color: var(--purple); }
.pulse-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--purple); }
.pulse-text { font-size: 12px; color: var(--text-secondary); flex: 1; min-width: 200px; }

/* ─── Forms ─── */
.form-row { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.form-row label {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-muted);
}
.form-row input, .form-row textarea, .form-row select {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text);
  outline: none;
  transition: all var(--transition);
}
.form-row textarea { resize: vertical; min-height: 80px; }
.form-row input:focus, .form-row textarea:focus, .form-row select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.form-row select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.form-submit {
  width: 100%;
  background: var(--primary-gradient);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 13px; font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  transition: all var(--transition);
  box-shadow: 0 0 20px var(--primary-glow);
}
.form-submit:hover { opacity: .9; box-shadow: 0 0 30px var(--primary-glow); transform: translateY(-1px); }

/* ─── FAB ─── */
.fab-btn {
  position: fixed; bottom: 28px; right: 28px;
  width: 54px; height: 54px;
  border: none;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 4px 24px var(--primary-glow);
  z-index: 60;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.fab-btn:hover { transform: scale(1.1) rotate(90deg); box-shadow: 0 6px 32px var(--primary-glow); }

/* ─── Modal ─── */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 200;
  align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 460px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.2s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-head h3 { font-size: 15px; font-weight: 700; }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 16px; cursor: pointer; transition: all var(--transition); }
.modal-close:hover { color: var(--text); }

/* ─── Logs Modal ─── */
.logs-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 300;
  align-items: center; justify-content: center;
  padding: 20px;
}
.logs-overlay.open { display: flex; }
.logs-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%; max-width: 800px; max-height: 75vh;
  display: flex; flex-direction: column;
}
.logs-head { padding: 12px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.logs-head span { font-size: 13px; font-weight: 700; color: var(--green); font-family: monospace; }
.logs-content { padding: 16px; overflow-y: auto; font-family: monospace; font-size: 12px; color: var(--green); white-space: pre-wrap; flex: 1; }
.logs-content:empty::after { content: 'Connecting…'; color: var(--text-muted); }

/* ─── AI Modal ─── */
.ai-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 300;
  align-items: center; justify-content: center;
  padding: 20px;
}
.ai-overlay.open { display: flex; }
.ai-box {
  background: var(--surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%; max-width: 600px; max-height: 75vh;
  display: flex; flex-direction: column;
}
.ai-content { padding: 20px; overflow-y: auto; color: var(--text); font-size: 14px; line-height: 1.6; white-space: pre-line; }
.ai-foot { padding: 12px 20px; border-top: 1px solid var(--border); text-align: right; }

/* ─── Backdrop ─── */
.sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); z-index: 99; }
.sidebar-backdrop.open { display: block; }

/* ─── Mobile Bottom Nav ─── */
.mobile-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 200;
  background: var(--surface);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  padding: 6px 8px env(safe-area-inset-bottom);
  justify-content: space-around;
}
.mobile-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 10px; font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: all var(--transition);
  position: relative;
}
.mobile-nav a i { font-size: 18px; }
.mobile-nav a:hover { color: var(--text); background: var(--primary-soft); }
.mobile-nav a.active { color: var(--primary); }
.mobile-nav a .mob-badge {
  font-size: 9px; background: var(--red); color: #fff;
  padding: 0 4px; border-radius: 6px;
  position: absolute; top: -4px; right: -2px;
}

/* ─── Table ─── */
.table-container {
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
}
.table-container table { width: 100%; border-collapse: collapse; }
.table-container th, .table-container td { padding: 10px 14px; text-align: left; font-size: 12px; }
.table-container th { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); background: var(--bg-elevated); border-bottom: 1px solid var(--border); }
.table-container td { border-bottom: 1px solid var(--border); color: var(--text-secondary); }
.table-container tr:last-child td { border-bottom: none; }
.table-container tr:hover td { background: var(--primary-soft); }

/* ─── Avatar ─── */
.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--primary-gradient);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

/* ─── Badges / Toast ─── */
.toast-container {
  position: fixed; top: 80px; right: 20px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  min-width: 260px;
  max-width: 400px;
  box-shadow: var(--shadow);
  animation: toastIn 0.3s ease;
  font-size: 13px;
}
.toast.success { border-left: 3px solid var(--green); }
.toast.error { border-left: 3px solid var(--red); }
.toast.info { border-left: 3px solid var(--primary); }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ─── Login Page ─── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  background-image: radial-gradient(ellipse at 50% 0%, rgba(129, 140, 248, 0.08) 0%, transparent 60%);
  padding: 20px;
}
.login-card {
  background: var(--surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 36px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
}
.login-logo {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--primary-gradient);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: #fff; font-weight: 800;
  margin: 0 auto 20px;
  box-shadow: 0 0 30px var(--primary-glow);
}
.login-title { text-align: center; font-size: 20px; font-weight: 800; margin-bottom: 4px; letter-spacing: -0.02em; }
.login-sub { text-align: center; font-size: 13px; color: var(--text-muted); margin-bottom: 28px; }
.login-error { text-align: center; color: var(--red); font-size: 13px; margin-bottom: 16px; padding: 10px; background: var(--red-soft); border-radius: var(--radius-sm); border: 1px solid rgba(239,68,68,.15); }

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop.open { display: block; }
  .main { margin-left: 0; }
  .topbar-menu { display: block; }
  .kanban-wrap { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .content { padding: 16px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .job-card { flex-wrap: wrap; }
  .job-actions { width: 100%; justify-content: flex-end; }
  .kanban-wrap { grid-template-columns: 1fr; }
  .velocity-row { flex-direction: column; }
  .topbar-search { max-width: 160px; }
  .section-title { flex-direction: column; align-items: flex-start; gap: 8px; }
}
@media (max-width: 480px) {
  .topbar { padding: 0 12px; gap: 8px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stat-card { padding: 12px 14px; }
  .stat-card .stat-value { font-size: 22px; }
  .stat-card .stat-icon { font-size: 15px; }
  .mobile-nav { display: flex; }
  .main { padding-bottom: 72px; }
  .content { padding: 12px; }
  .topbar-search { max-width: 120px; }
  .fab-btn { bottom: 84px; right: 16px; width: 48px; height: 48px; font-size: 18px; }
}

/* ─── Print ─── */
@media print {
  .sidebar, .topbar, .mobile-nav, .fab-btn, .action-bar { display: none !important; }
  .main { margin-left: 0 !important; }
}
