/* Searchlight — matching engine UI */

:root {
  --bg: #0d0d10;
  --surface: #17171c;
  --surface2: #1e1e25;
  --border: #2a2a36;
  --text: #f0f0f5;
  --text-muted: #8888a0;
  --accent: #e8c547;
  --accent-dim: rgba(232, 197, 71, 0.12);
  --green: #4ade80;
  --red: #f87171;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* Nav */
nav {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
nav .container { display: flex; align-items: center; justify-content: space-between; }
.logo { font-size: 1.25rem; font-weight: 700; color: var(--text); letter-spacing: -0.02em; }
.logo span { color: var(--accent); }
.nav-tag { font-size: 0.75rem; color: var(--text-muted); background: var(--surface); border: 1px solid var(--border); padding: 2px 10px; border-radius: 20px; }

/* Hero */
.hero { padding: 80px 0 60px; text-align: center; }
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 20px;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { font-size: 1.1rem; color: var(--text-muted); max-width: 580px; margin: 0 auto 40px; }

/* Pills / stats */
.stats { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }
.stat-pill { background: var(--surface); border: 1px solid var(--border); padding: 10px 20px; border-radius: 8px; font-size: 0.85rem; }
.stat-pill strong { color: var(--accent); }

/* Two-column layout */
.work-area { display: grid; grid-template-columns: 420px 1fr; gap: 32px; align-items: start; padding: 40px 0 80px; }
@media (max-width: 860px) { .work-area { grid-template-columns: 1fr; } }

/* Card base */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 28px; }

/* Form */
.form-card h2 { font-size: 1.1rem; font-weight: 600; margin-bottom: 20px; color: var(--text); }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.9rem;
  font-family: var(--font);
  padding: 10px 12px;
  transition: border-color 0.15s;
  outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.field textarea { resize: vertical; min-height: 70px; }
.field select { cursor: pointer; }
.field select option { background: var(--surface2); }

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

.btn-primary {
  width: 100%;
  background: var(--accent);
  color: #000;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  border-radius: 8px;
  padding: 13px 24px;
  cursor: pointer;
  transition: opacity 0.15s;
  font-family: var(--font);
}
.btn-primary:hover { opacity: 0.88; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

/* Results panel */
.results-panel .panel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.results-panel h2 { font-size: 1.1rem; font-weight: 600; }
.results-panel h2 span { color: var(--accent); }

.panel-tag { font-size: 0.75rem; color: var(--text-muted); background: var(--surface2); border: 1px solid var(--border); padding: 3px 10px; border-radius: 20px; }

.results-list { display: flex; flex-direction: column; gap: 12px; }

/* Candidate card */
.candidate-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  transition: border-color 0.15s;
  position: relative;
  overflow: hidden;
}
.candidate-card:hover { border-color: rgba(232, 197, 71, 0.3); }

.candidate-card.top-match { border-color: var(--accent); background: linear-gradient(135deg, var(--surface) 0%, rgba(232,197,71,0.05) 100%); }

.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.candidate-name { font-weight: 700; font-size: 1rem; }
.candidate-meta { font-size: 0.82rem; color: var(--text-muted); margin-top: 2px; }

.score-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}
.score-num { font-size: 1.6rem; font-weight: 800; color: var(--accent); line-height: 1; }
.score-label { font-size: 0.68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

.highlights { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; }
.highlight-item { font-size: 0.82rem; color: var(--text-muted); padding-left: 14px; position: relative; }
.highlight-item::before { content: '→'; position: absolute; left: 0; color: var(--accent); font-size: 0.75rem; }

.reasoning { font-size: 0.8rem; color: var(--text-muted); margin-top: 10px; font-style: italic; border-left: 2px solid var(--border); padding-left: 10px; }

/* Loading state */
.loading-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 20px; display: flex; align-items: center; gap: 12px; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 0.85rem; color: var(--text-muted); }

/* Empty / error states */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state h3 { font-size: 1rem; margin-bottom: 8px; }
.error-msg { background: rgba(248, 113, 113, 0.1); border: 1px solid rgba(248, 113, 113, 0.3); border-radius: 8px; padding: 12px 16px; font-size: 0.85rem; color: var(--red); margin-top: 12px; }

/* Footer */
footer { border-top: 1px solid var(--border); padding: 24px 0; color: var(--text-muted); font-size: 0.8rem; }
footer .container { display: flex; justify-content: space-between; align-items: center; }

/* Section labels */
.section-label { font-size: 0.7rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 4px; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }