/* ═══ Chuan Tian Job Search Dashboard ═══ */
/* Dark theme, clean typography, responsive */

:root {
  /* Base palette (GitHub Dark) */
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #21262d;
  --border: #30363d;
  --border-light: #3d444d;

  /* Text */
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #656d76;

  /* Accent */
  --accent-blue: #58a6ff;
  --accent-purple: #a371f7;

  /* Tier colors */
  --tier1: #f85149;
  --tier2: #d29922;
  --signal: #3fb950;
  --verify: #58a6ff;

  /* Status */
  --status-success: #3fb950;
  --status-warning: #d29922;
  --status-danger: #f85149;
  --status-info: #58a6ff;

  /* Score colors */
  --score-high: #3fb950;
  --score-mid: #d29922;
  --score-low: #8b949e;

  /* Sizing */
  --max-width: 1200px;
  --radius: 8px;
  --radius-sm: 6px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
}

/* ═══ Header ═══ */
.header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-content {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.header-left { display: flex; align-items: center; gap: 12px; }
.logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}
.logo-sub { font-weight: 400; color: var(--text-secondary); font-size: 16px; }
.version-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 12px;
  background: var(--accent-blue);
  color: #fff;
  font-weight: 600;
}

.deadline-badge {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  background: rgba(248, 81, 73, 0.1);
  border: 1px solid rgba(248, 81, 73, 0.3);
}
.deadline-label { font-size: 12px; color: var(--text-secondary); }
.deadline-days {
  font-size: 28px;
  font-weight: 700;
  color: var(--tier1);
  line-height: 1;
}
.deadline-unit { font-size: 12px; color: var(--text-secondary); }

/* ═══ Stats Row ═══ */
.stats-row {
  max-width: var(--max-width);
  margin: 20px auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
.stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  transition: border-color 0.2s;
}
.stat-card:hover { border-color: var(--border-light); }
.stat-number {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
}
.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}
.stat-applied .stat-number { color: var(--accent-blue); }
.stat-waiting .stat-number { color: var(--text-secondary); }
.stat-interview .stat-number { color: var(--status-success); }
.stat-rejected .stat-number { color: var(--status-danger); }
.stat-offer .stat-number { color: var(--status-warning); }
.stat-hunter .stat-number { color: var(--accent-purple); }

/* ═══ Recruiter Funnel ═══ */
.recruiter-funnel {
  max-width: var(--max-width);
  margin: 16px auto;
  padding: 0 24px;
}
.recruiter-funnel .section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.funnel-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.funnel-step {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 16px;
  text-align: center;
  min-width: 80px;
}
.funnel-step.funnel-highlight {
  border-color: var(--accent-purple);
  background: rgba(163, 113, 247, 0.1);
}
.funnel-number {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}
.funnel-highlight .funnel-number {
  color: var(--accent-purple);
}
.funnel-label {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}
.funnel-arrow {
  color: var(--text-secondary);
  font-size: 16px;
  opacity: 0.5;
}

/* ═══ Telegram Network ═══ */
.telegram-network {
  max-width: var(--max-width);
  margin: 24px auto;
  padding: 20px 24px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.tg-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.tg-header .section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}
.tg-subtitle {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 8px;
  text-transform: none;
  letter-spacing: normal;
}
.tg-export-link {
  font-size: 12px;
  color: var(--accent-blue);
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  transition: all 0.2s;
}
.tg-export-link:hover {
  border-color: var(--accent-blue);
  background: rgba(88, 166, 255, 0.1);
}
.tg-stats-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}
.tg-stat {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
  transition: border-color 0.2s;
}
.tg-stat:hover { border-color: var(--border-light); }
.tg-stat-number {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-primary);
}
.tg-stat-label {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-top: 4px;
}
.tg-stat-sub {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 3px;
}
.tg-stat-star3 .tg-stat-number { color: #ff9f43; }
.tg-stat-vc .tg-stat-number { color: var(--accent-purple); }
.tg-stat-bd .tg-stat-number { color: var(--accent-blue); }
.tg-stat-alpha .tg-stat-number { color: var(--status-success); }
.tg-alerts {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.tg-alert {
  font-size: 12px;
  padding: 8px 12px;
  margin-bottom: 6px;
  border-radius: var(--radius-sm);
  background: rgba(248, 81, 73, 0.08);
  border-left: 3px solid var(--tier1);
  color: var(--text-primary);
  line-height: 1.4;
}
.tg-alert:last-child { margin-bottom: 0; }
.tg-alert-intel {
  background: rgba(88, 166, 255, 0.08);
  border-left-color: var(--accent-blue);
}
@media (max-width: 900px) {
  .tg-stats-row { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  .tg-stats-row { grid-template-columns: repeat(2, 1fr); }
}

/* ═══ Date Navigation ═══ */
.date-nav {
  max-width: var(--max-width);
  margin: 20px auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}
.nav-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-btn:hover { background: var(--bg-tertiary); border-color: var(--accent-blue); }
.nav-btn:disabled { opacity: 0.3; cursor: default; }
.nav-btn:disabled:hover { background: var(--bg-secondary); border-color: var(--border); }
.date-display { text-align: center; }
.date-main { font-size: 20px; font-weight: 600; display: block; }
.date-sub { font-size: 13px; color: var(--text-secondary); }

/* ═══ Summary Bar ═══ */
.summary-bar {
  max-width: var(--max-width);
  margin: 0 auto 24px;
  padding: 0 24px;
  display: flex;
  gap: 12px;
  justify-content: center;
}
.summary-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  font-size: 13px;
}
.summary-count { font-weight: 700; font-size: 15px; }
.summary-label { color: var(--text-secondary); }
.tier1-accent .summary-count { color: var(--tier1); }
.tier2-accent .summary-count { color: var(--tier2); }
.verify-accent .summary-count { color: var(--verify); }
.signal-accent .summary-count { color: var(--signal); }
.total-accent .summary-count { color: var(--text-primary); }

/* ═══ Report Content ═══ */
.report {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 60px;
}

.tier-section { margin-bottom: 32px; }

.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
  cursor: default;
}
.section-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.tier1-dot { background: var(--tier1); }
.tier2-dot { background: var(--tier2); }
.verify-dot { background: var(--verify); }
.signal-dot { background: var(--signal); }

.section-count {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-weight: 500;
}

.toggle-icon {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-muted);
  transition: transform 0.2s;
}
.tier2-header { cursor: pointer; }
.tier2-header:hover { color: var(--tier2); }

/* ═══ Job Grid ═══ */
.job-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(480px, 1fr));
  gap: 16px;
}
.job-grid.collapsed { display: none; }

/* ═══ Job Card ═══ */
.job-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  border-left: 3px solid var(--border);
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.job-card:hover { border-color: var(--border-light); transform: translateY(-1px); }
.job-card.tier-1 { border-left-color: var(--tier1); }
.job-card.tier-2 { border-left-color: var(--tier2); }

/* Card header */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.card-rank {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  min-width: 28px;
}
.card-title-block { flex: 1; }
.card-company {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-job-title {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 2px;
}
.card-badges { display: flex; gap: 6px; flex-shrink: 0; }
.badge-new {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--signal);
  color: #000;
  font-weight: 700;
  text-transform: uppercase;
}
.badge-mandarin {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--status-warning);
  color: #000;
  font-weight: 700;
}

/* Card meta row */
.card-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
}
.meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
}
.meta-icon { font-size: 14px; }

/* Score badge */
.score-badge {
  font-weight: 700;
  font-size: 13px;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}
.score-high { background: rgba(63, 185, 80, 0.15); color: var(--score-high); }
.score-mid { background: rgba(210, 153, 34, 0.15); color: var(--score-mid); }
.score-low { background: rgba(139, 148, 158, 0.15); color: var(--score-low); }

/* Card reason */
.card-reason {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  padding: 8px 12px;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--border-light);
}

/* Card warnings */
.card-warning {
  font-size: 12px;
  color: var(--status-warning);
  padding: 6px 10px;
  background: rgba(210, 153, 34, 0.08);
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--status-warning);
}

/* Apply button */
.card-footer { display: flex; justify-content: flex-end; margin-top: auto; }
.apply-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  background: var(--accent-blue);
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
}
.apply-btn:hover { background: #79c0ff; transform: translateY(-1px); }
.apply-btn .arrow { font-size: 16px; }

/* Stars */
.stars { color: #e3b341; font-size: 14px; letter-spacing: 2px; }

/* ═══ Verify & Signal Tables ═══ */
.verify-table-wrap, .signal-table-wrap { overflow-x: auto; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 2px solid var(--border);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  vertical-align: top;
}
.data-table tr:hover td { background: var(--bg-tertiary); }
.data-table a {
  color: var(--accent-blue);
  text-decoration: none;
}
.data-table a:hover { text-decoration: underline; }

.tag-new {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--signal);
  color: #000;
  font-weight: 700;
  margin-left: 4px;
}

/* ═══ Action Plan ═══ */
.action-list { display: flex; flex-direction: column; gap: 8px; }
.action-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 13px;
}
.action-priority {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
  text-transform: uppercase;
  flex-shrink: 0;
}
.action-priority.urgent { background: rgba(248, 81, 73, 0.15); color: var(--tier1); }
.action-priority.this_week { background: rgba(210, 153, 34, 0.15); color: var(--tier2); }
.action-priority.after_verify { background: rgba(88, 166, 255, 0.15); color: var(--verify); }
.action-priority.next_round { background: rgba(63, 185, 80, 0.15); color: var(--signal); }
.action-rank { font-weight: 700; color: var(--text-muted); min-width: 24px; }
.action-label { font-weight: 600; color: var(--text-primary); }
.action-text { color: var(--text-secondary); margin-left: auto; }

/* ═══ Footer ═══ */
.footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}
.footer-sep { margin: 0 8px; }

/* ═══ Empty State ═══ */
.empty-state {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ═══ Workflow Control Panel ═══ */
.workflow-panel, .data-reports {
  max-width: var(--max-width);
  margin: 24px auto;
  padding: 0 24px;
}
.panel-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 0; border-bottom: 1px solid var(--border); margin-bottom: 16px;
}
.panel-header h2 { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.panel-icon { font-size: 20px; }
.last-run { font-size: 12px; color: var(--text-muted); }

/* 4-Phase Pipeline */
.workflow-phases {
  display: flex; gap: 4px; padding: 16px 0; justify-content: center;
}
.phase-card {
  flex: 1; max-width: 220px;
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 14px;
  text-align: center; position: relative; transition: all 0.2s;
}
.phase-card:hover { border-color: var(--border-light); }
.phase-card.completed { border-color: var(--status-success); }
.phase-card.completed::after {
  content: '\2713'; position: absolute; top: 8px; right: 10px;
  font-size: 11px; color: var(--status-success); font-weight: 700;
}
.phase-card.pending { opacity: 0.6; }
.phase-icon { font-size: 26px; display: block; margin-bottom: 8px; }
.phase-name { font-size: 12px; color: var(--text-primary); font-weight: 600; }
.phase-metric { font-size: 18px; font-weight: 800; color: var(--accent-blue); margin-top: 6px; }
.phase-detail { font-size: 10px; color: var(--text-muted); margin-top: 3px; }
.phase-connector {
  width: 24px; display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 16px; flex-shrink: 0;
}

/* Coverage Section (KEY visual) */
.coverage-section {
  display: flex; gap: 24px; padding: 20px 0; align-items: center;
}
.coverage-hero {
  display: flex; gap: 24px; align-items: center; flex: 1;
}
.hero-ring { flex-shrink: 0; }
.hero-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px;
}
.hero-stat { display: flex; flex-direction: column; }
.hero-num { font-size: 22px; font-weight: 800; }
.hero-label { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

.coverage-bars { flex: 1; max-width: 400px; }
.cov-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.cov-bar-name { font-size: 13px; min-width: 90px; color: var(--text-secondary); }
.cov-bar-track { flex: 1; height: 20px; background: var(--bg-tertiary); border-radius: 4px; overflow: hidden; }
.cov-bar-fill { height: 100%; border-radius: 4px; transition: width 0.8s ease; }
.cov-bar-count { font-size: 12px; font-weight: 600; min-width: 40px; text-align: right; }

/* Reports Grid */
.reports-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
}
.report-card {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
}
.report-card h3 {
  font-size: 14px; font-weight: 600; margin-bottom: 16px;
  color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px;
}

/* Funnel */
.funnel-stage {
  display: flex; align-items: center; gap: 12px; margin-bottom: 8px;
}
.funnel-bar-wrap {
  flex: 1; height: 24px; background: var(--bg-tertiary);
  border-radius: 4px; overflow: hidden; position: relative;
}
.funnel-bar {
  height: 100%; border-radius: 4px; transition: width 0.8s ease;
}
.funnel-label { font-size: 12px; color: var(--text-secondary); min-width: 100px; }
.funnel-count { font-size: 13px; font-weight: 600; min-width: 50px; text-align: right; }

/* Coverage Detail */
.cov-stack {
  display: flex; height: 20px; border-radius: 10px; overflow: hidden;
  margin-bottom: 12px;
}
.cov-segment { transition: flex 0.6s ease; min-width: 2px; }
.cov-legend { display: flex; gap: 16px; font-size: 12px; color: var(--text-secondary); }
.cov-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }

.signal-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 13px; padding-left: 8px; }
.signal-name { flex: 1; color: var(--text-secondary); }
.signal-val { font-weight: 700; color: var(--text-primary); }
.signal-group-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 10px;
  margin-bottom: 4px;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--border-color);
  opacity: 0.7;
}
.signal-highlight {
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(63, 185, 80, 0.1);
  border-left: 3px solid #3fb950;
  border-radius: 4px;
  font-size: 12px;
  color: #3fb950;
  font-weight: 600;
}

/* ═══ Modal overlay (shared) ═══ */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.75);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal {
  background: var(--bg-secondary, #161b22);
  border: 1px solid var(--border-color, #30363d);
  border-radius: 10px;
  width: 100%;
  max-width: 480px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.modal-large { max-width: 820px; max-height: 85vh; display: flex; flex-direction: column; }
.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color, #30363d);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.modal-header h3 { margin: 0; font-size: 16px; color: var(--text-primary, #c9d1d9); }
.modal-close {
  background: transparent;
  border: none;
  color: var(--text-secondary, #8b949e);
  font-size: 22px;
  cursor: pointer;
  padding: 0 8px;
  line-height: 1;
}
.modal-close:hover { color: var(--text-primary, #c9d1d9); }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-color, #30363d);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

/* ═══ Drill-down modal + clickable stats ═══ */

.drill-clickable {
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}
.drill-clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(88, 166, 255, 0.25);
  border-color: rgba(88, 166, 255, 0.5);
}
.drill-clickable::after {
  content: '🔍';
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 10px;
  opacity: 0;
  transition: opacity 0.15s;
}
.drill-clickable:hover::after { opacity: 0.7; }

.drill-modal {
  max-width: 1100px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}
.drill-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.drill-search {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 6px 10px;
  color: var(--text-primary);
  font-size: 13px;
  width: 240px;
  font-family: inherit;
}
.drill-search:focus {
  outline: none;
  border-color: #58a6ff;
}
.drill-body { padding: 16px 24px 20px; overflow-y: auto; }
.drill-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--text-secondary);
}
.drill-meta strong { color: var(--text-primary); }
.drill-table-wrap {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: auto;
  max-height: 60vh;
}
.drill-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.drill-table th {
  position: sticky;
  top: 0;
  background: var(--card-bg);
  color: var(--text-secondary);
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 2px solid var(--border-color);
  z-index: 1;
}
.drill-table td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text-primary);
  vertical-align: top;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.drill-table tr:hover td {
  background: rgba(88, 166, 255, 0.04);
}
.drill-empty {
  text-align: center;
  color: var(--text-secondary);
  padding: 30px !important;
  font-style: italic;
}
.btn-sm {
  padding: 4px 10px;
  font-size: 11px;
}

/* Header nav tabs */
.header-nav {
  display: flex;
  gap: 4px;
  margin: 0 20px;
  flex: 1;
}
.header-nav .nav-tab {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s;
}
.header-nav .nav-tab:hover {
  background: rgba(255,255,255,0.04);
  color: var(--text-primary);
}
.header-nav .nav-tab.active {
  background: rgba(88, 166, 255, 0.12);
  color: #58a6ff;
}
#nav-recs-count {
  margin-left: 4px;
  font-size: 11px;
  opacity: 0.8;
}

/* Signal Highlights Grid */
.signal-highlights {
  max-width: var(--max-width);
  margin: 16px auto;
  padding: 0 24px;
}
.signal-highlights .section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.highlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.highlight-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 14px;
}
.highlight-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}
.highlight-icon { font-size: 16px; }
.highlight-title {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.highlight-badge {
  background: rgba(63, 185, 80, 0.15);
  color: #3fb950;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}
.highlight-body {
  font-size: 12px;
  color: var(--text-secondary);
  max-height: 180px;
  overflow-y: auto;
}
.highlight-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px dashed rgba(255,255,255,0.05);
}
.highlight-row:last-child { border-bottom: none; }
.highlight-row-name {
  flex: 1;
  color: var(--text-primary);
  font-weight: 500;
}
.highlight-row-value {
  font-weight: 700;
  font-size: 12px;
}
.highlight-row-value.positive { color: #3fb950; }
.highlight-row-value.negative { color: #f85149; }
.highlight-row-meta {
  font-size: 11px;
  color: var(--text-secondary);
  opacity: 0.7;
}

/* Tier Breakdown */
.tier-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; padding: 6px 12px; background: var(--bg-primary); border-radius: var(--radius-sm); }
.tier-badge { font-size: 14px; font-weight: 700; min-width: 24px; text-align: center; }
.tier-badge.tier-s { color: #f0883e; }
.tier-badge.tier-a { color: var(--tier1); }
.tier-badge.tier-b { color: var(--tier2); }
.tier-badge.tier-c { color: var(--text-muted); }
.tier-label { font-size: 12px; color: var(--text-secondary); min-width: 90px; }
.tier-bar-track { flex: 1; height: 14px; background: var(--bg-tertiary); border-radius: 3px; overflow: hidden; }
.tier-bar-fill { height: 100%; border-radius: 3px; transition: width 0.6s ease; }
.tier-bar-fill.tier-s { background: #f0883e; }
.tier-bar-fill.tier-a { background: var(--tier1); }
.tier-bar-fill.tier-b { background: var(--tier2); }
.tier-bar-fill.tier-c { background: var(--text-muted); }
.tier-count { font-size: 14px; font-weight: 700; min-width: 40px; text-align: right; }

/* Key Metrics Grid */
.km-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.km-cell { padding: 10px 12px; background: var(--bg-primary); border-radius: 6px; }
.km-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.km-value { font-size: 20px; font-weight: 700; margin-top: 2px; }

/* ═══ Responsive ═══ */
@media (max-width: 1024px) {
  .job-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(3, 1fr); }
  .reports-grid { grid-template-columns: 1fr; }
  .coverage-section { flex-direction: column; }
}
@media (max-width: 768px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .summary-bar { flex-wrap: wrap; }
  .header-content { flex-direction: column; gap: 12px; }
  .card-meta { flex-direction: column; gap: 8px; }
  .date-nav { gap: 12px; }
  .workflow-phases { flex-wrap: wrap; }
  .phase-connector { display: none; }
  .hero-stats { grid-template-columns: 1fr 1fr; gap: 8px 16px; }
}
