/* ─── Reset & Base ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg:        #0f172a;
  --surface:   #1e293b;
  --surface2:  #263449;
  --border:    #334155;
  --text:      #e2e8f0;
  --text-muted:#94a3b8;
  --blue:      #3b82f6;
  --green:     #22c55e;
  --orange:    #f97316;
  --red:       #ef4444;
  --yellow:    #f59e0b;
  --purple:    #8b5cf6;
  --cyan:      #06b6d4;
  --radius:    10px;
  --shadow:    0 4px 16px rgba(0,0,0,0.4);
}
body { background: var(--bg); color: var(--text); font-family: 'Segoe UI', system-ui, sans-serif; font-size: 14px; min-height: 100vh; }
a { color: inherit; text-decoration: none; }

/* ─── Header ───────────────────────────────────────────── */
header { background: var(--surface); border-bottom: 1px solid var(--border); padding: 0 24px; height: 56px; display: flex; align-items: center; position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.logo { font-size: 16px; font-weight: 700; letter-spacing: 0.5px; }
.header-meta { color: var(--text-muted); font-size: 13px; }
.back-link { color: var(--blue); font-size: 13px; }
.back-link:hover { text-decoration: underline; }

/* ─── Stats Bar ────────────────────────────────────────── */
.stats-bar { display: flex; gap: 12px; padding: 16px 24px; overflow-x: auto; flex-wrap: wrap; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 20px; min-width: 100px; text-align: center; }
.stat-value { display: block; font-size: 26px; font-weight: 700; line-height: 1.1; }
.stat-label { display: block; font-size: 11px; color: var(--text-muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.accent-blue  .stat-value { color: var(--blue); }
.accent-green .stat-value { color: var(--green); }
.accent-orange .stat-value { color: var(--orange); }
.accent-red   .stat-value { color: var(--red); }
.accent-yellow .stat-value { color: var(--yellow); }

/* ─── Alerts ───────────────────────────────────────────── */
.alerts { margin: 0 24px 8px; background: rgba(245,158,11,0.1); border: 1px solid var(--yellow); border-radius: var(--radius); padding: 14px 18px; }
.alerts h3 { color: var(--yellow); font-size: 13px; margin-bottom: 8px; }
.alert-item { font-size: 13px; padding: 6px 0; border-bottom: 1px solid rgba(245,158,11,0.2); }
.alert-item:last-child { border-bottom: none; }
.alert-date { float: right; color: var(--text-muted); font-size: 12px; }
.alert-item p { color: var(--text-muted); margin-top: 2px; font-size: 12px; }

/* ─── Filter Bar ───────────────────────────────────────── */
.filter-bar { padding: 8px 24px; display: flex; gap: 12px; align-items: center; }
.filter-bar select { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 6px 10px; font-size: 13px; }
.filter-bar label { color: var(--text-muted); font-size: 13px; display: flex; gap: 8px; align-items: center; }

/* ─── Kanban Board ─────────────────────────────────────── */
.kanban-board { display: flex; gap: 14px; padding: 8px 24px 32px; overflow-x: auto; align-items: flex-start; }
.kanban-col { min-width: 240px; max-width: 260px; flex-shrink: 0; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); }
.col-header { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px 8px; }
.col-label { font-weight: 600; font-size: 13px; }
.col-count { font-size: 11px; font-weight: 700; border-radius: 99px; padding: 2px 8px; color: #fff; }
.col-cards { padding: 0 8px 8px; display: flex; flex-direction: column; gap: 8px; max-height: 75vh; overflow-y: auto; }

/* ─── Job Card ─────────────────────────────────────────── */
.job-card { display: block; background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; padding: 12px; transition: border-color 0.15s, transform 0.1s; cursor: pointer; }
.job-card:hover { border-color: var(--blue); transform: translateY(-1px); }
.job-title { font-weight: 600; font-size: 13px; line-height: 1.3; margin-bottom: 4px; }
.job-company { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.job-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.job-location { font-size: 11px; color: var(--text-muted); }
.job-salary { font-size: 11px; color: var(--green); margin-top: 2px; }
.job-date { font-size: 10px; color: var(--border); margin-top: 4px; }
.empty-col { color: var(--text-muted); font-size: 12px; text-align: center; padding: 20px 0; }

/* ─── Badges ───────────────────────────────────────────── */
.badge { font-size: 10px; font-weight: 600; border-radius: 4px; padding: 2px 6px; text-transform: uppercase; letter-spacing: 0.4px; }
.badge-source { background: rgba(59,130,246,0.15); color: var(--blue); }
.badge-score { }
.score-high { background: rgba(34,197,94,0.15); color: var(--green); }
.score-mid  { background: rgba(249,115,22,0.15); color: var(--orange); }
.score-low  { background: rgba(239,68,68,0.15);  color: var(--red); }

/* ─── Detail Page ──────────────────────────────────────── */
.detail-container { display: flex; gap: 24px; padding: 24px; align-items: flex-start; max-width: 1400px; margin: 0 auto; }
.detail-main { flex: 1; min-width: 0; }
.detail-sidebar { width: 300px; flex-shrink: 0; display: flex; flex-direction: column; gap: 16px; }
.detail-title { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.detail-company { font-size: 16px; color: var(--text-muted); font-weight: 500; margin-bottom: 12px; }
.detail-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.detail-meta-row { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }
.score-reason { background: rgba(59,130,246,0.08); border: 1px solid rgba(59,130,246,0.2); border-radius: 8px; padding: 10px 14px; font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }
.section-block { margin-bottom: 24px; }
.section-block h3 { font-size: 14px; font-weight: 700; margin-bottom: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.description-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; font-size: 13px; line-height: 1.7; white-space: pre-wrap; max-height: 400px; overflow-y: auto; }
.sidebar-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.sidebar-card h4 { font-size: 13px; font-weight: 700; margin-bottom: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.sidebar-card p { font-size: 12px; margin-bottom: 6px; color: var(--text-muted); }
.sidebar-card p b { color: var(--text); }
.meta-card { font-size: 12px; }
.status-badge { font-size: 11px; padding: 3px 10px; border-radius: 99px; }
.status-applied   { background: rgba(139,92,246,0.2); color: var(--purple); }
.status-review    { background: rgba(245,158,11,0.2); color: var(--yellow); }
.status-queued    { background: rgba(59,130,246,0.2); color: var(--blue); }
.status-interview { background: rgba(249,115,22,0.2); color: var(--orange); }
.status-offer     { background: rgba(34,197,94,0.2);  color: var(--green); }
.status-rejected  { background: rgba(239,68,68,0.2);  color: var(--red); }

/* ─── Forms ────────────────────────────────────────────── */
.form-select, .form-input, .form-textarea {
  width: 100%; background: var(--surface2); color: var(--text);
  border: 1px solid var(--border); border-radius: 6px;
  padding: 8px 10px; font-size: 13px; margin-bottom: 8px;
}
.form-textarea { resize: vertical; min-height: 70px; }
.btn { display: block; width: 100%; padding: 9px 14px; border-radius: 6px; font-size: 13px; font-weight: 600; cursor: pointer; border: none; margin-bottom: 8px; text-align: center; }
.btn-primary   { background: var(--blue);   color: #fff; }
.btn-secondary { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }
.btn:hover { opacity: 0.88; }

/* ─── Scrollbars ───────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
