@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.3s ease-out; }

/* ════════════════════════════════════════════════════════════════
   DISCOVERY TAB
   ════════════════════════════════════════════════════════════════ */
.discovery-section { margin-bottom: 28px; }
.section-title { font-size: 14px; font-weight: 700; margin-bottom: 12px; color: var(--text-primary); }

/* Sources cards */
.discovery-sources { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.source-card {
  background: var(--bg-tertiary); border: 1px solid var(--border-subtle); border-radius: 10px;
  padding: 14px 16px; display: flex; flex-direction: column; gap: 8px;
}
.source-card-header { display: flex; justify-content: space-between; align-items: center; }
.source-card-name { font-weight: 600; font-size: 13px; }
.source-card-meta { font-size: 11px; color: var(--text-muted); }
.source-card-query { font-size: 12px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.source-badge { font-size: 10px; padding: 2px 8px; border-radius: 99px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.source-badge.enabled { background: var(--green-dim); color: var(--green); }
.source-badge.disabled { background: var(--red-dim); color: var(--red); }

/* Toggle switch */
.toggle-switch { position: relative; width: 36px; height: 20px; cursor: pointer; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; background: var(--bg-hover); border-radius: 20px; transition: 0.2s;
}
.toggle-slider:before {
  content: ''; position: absolute; height: 14px; width: 14px; left: 3px; bottom: 3px;
  background: var(--text-muted); border-radius: 50%; transition: 0.2s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--green-dim); }
.toggle-switch input:checked + .toggle-slider:before { transform: translateX(16px); background: var(--green); }

/* Scoring weights */
.scoring-weights { display: flex; flex-direction: column; gap: 12px; max-width: 520px; }
.weight-row { display: flex; align-items: center; gap: 12px; }
.weight-label { width: 120px; font-size: 13px; font-weight: 500; }
.weight-bar-wrap { flex: 1; height: 8px; background: var(--bg-hover); border-radius: 4px; position: relative; }
.weight-bar { height: 100%; border-radius: 4px; background: var(--accent); transition: width 0.3s; }
.weight-input {
  width: 56px; text-align: center; font-family: var(--font-mono); font-size: 12px;
  background: var(--bg-tertiary); border: 1px solid var(--border-default); border-radius: 6px;
  color: var(--text-primary); padding: 4px 6px;
}
.weight-pct { font-size: 11px; color: var(--text-muted); width: 20px; }
.scoring-meta { display: flex; gap: 16px; align-items: center; margin-top: 8px; }
.scoring-meta label { font-size: 12px; color: var(--text-secondary); }
.scoring-meta input { width: 60px; }
.btn-save {
  padding: 6px 16px; background: var(--accent); color: var(--text-inverse); border: none;
  border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; transition: 0.15s;
}
.btn-save:hover { background: var(--accent-hover); }
.btn-save:disabled { opacity: 0.5; cursor: default; }
.weight-total { font-family: var(--font-mono); font-size: 12px; }
.weight-total.valid { color: var(--green); }
.weight-total.invalid { color: var(--red); }

/* Keyword lists */
.keyword-lists { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.keyword-card {
  background: var(--bg-tertiary); border: 1px solid var(--border-subtle); border-radius: 10px;
  padding: 14px 16px;
}
.keyword-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.keyword-card-title { font-size: 13px; font-weight: 600; }
.keyword-card-score { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); }
.keyword-textarea {
  width: 100%; min-height: 60px; resize: vertical; font-family: var(--font-mono); font-size: 12px;
  background: var(--bg-secondary); border: 1px solid var(--border-default); border-radius: 6px;
  color: var(--text-primary); padding: 8px; box-sizing: border-box; line-height: 1.5;
}
.keyword-textarea:focus { border-color: var(--accent); outline: none; }
.keyword-actions { display: flex; justify-content: flex-end; margin-top: 8px; }

/* Hard filters */
.hard-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.hard-filter-tag {
  font-size: 12px; padding: 5px 12px; border-radius: 6px;
  background: var(--red-dim); color: var(--red); font-weight: 500;
}

/* Salary config */
.salary-config { display: flex; gap: 16px; align-items: center; margin-top: 12px; }
.salary-config label { font-size: 12px; color: var(--text-secondary); }
.salary-input {
  width: 80px; font-family: var(--font-mono); font-size: 12px;
  background: var(--bg-tertiary); border: 1px solid var(--border-default); border-radius: 6px;
  color: var(--text-primary); padding: 4px 6px; text-align: right;
}
