/* ---- SCOUT DASHBOARD ---- */

.scout-page {
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: calc(100vh - 65px);
}

/* ---- SIDEBAR ---- */
.scout-sidebar {
  border-right: 1px solid var(--border);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: sticky;
  top: 65px;
  height: calc(100vh - 65px);
  overflow-y: auto;
}

.sidebar-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sidebar-header h2 {
  font-family: 'Fraunces', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--fg);
}

.btn-accent {
  background: rgba(212,168,83,0.12);
  border: 1px solid rgba(212,168,83,0.25);
  color: var(--accent);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  font-family: 'DM Sans', sans-serif;
}

.btn-accent:hover {
  background: rgba(212,168,83,0.2);
}

/* ---- CREATE FORM ---- */
.create-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.create-form h3 {
  font-family: 'Fraunces', serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 0.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.form-group label {
  font-size: 0.72rem;
  color: var(--fg-2);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.form-group input,
.form-group select {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0.55rem 0.75rem;
  color: var(--fg);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--accent-dim);
}

.form-group select[multiple] {
  height: 80px;
}

.form-hint {
  font-size: 0.68rem;
  color: var(--fg-3);
}

.form-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.btn-primary {
  background: var(--accent);
  border: none;
  color: #111;
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: background 0.2s;
}

.btn-primary:hover { background: var(--accent-dim); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg-2);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-size: 0.82rem;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: border-color 0.2s;
}

.btn-ghost:hover { border-color: var(--fg-3); }

.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.78rem; }

/* ---- PROFILE LIST ---- */
.profile-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.profile-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}

.profile-item:hover { border-color: var(--accent-dim); background: var(--surface2); }
.profile-item.active { border-color: var(--accent); background: rgba(212,168,83,0.06); }

.profile-info { display: flex; flex-direction: column; gap: 0.2rem; }
.profile-name { font-size: 0.88rem; font-weight: 500; color: var(--fg); }
.profile-meta { font-size: 0.72rem; color: var(--fg-3); }
.profile-type { font-size: 0.72rem; color: var(--accent); margin-top: 0.2rem; }

.empty-state {
  padding: 1.5rem;
  text-align: center;
  color: var(--fg-3);
  font-size: 0.85rem;
  line-height: 1.6;
}

/* ---- MAIN CONTENT ---- */
.scout-main {
  padding: 2rem 2.5rem;
  overflow-y: auto;
}

.main-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 60vh;
}

.empty-hero {
  text-align: center;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.empty-hero h1 {
  font-family: 'Fraunces', serif;
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--fg);
}

.empty-hero p { font-size: 0.95rem; color: var(--fg-2); line-height: 1.6; }

/* ---- PROFILE HEADER ---- */
.profile-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.profile-header-left h1 {
  font-family: 'Fraunces', serif;
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--fg);
  margin-bottom: 0.75rem;
}

.profile-meta-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.meta-tag {
  font-size: 0.78rem;
  color: var(--fg-2);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
}

.meta-sep { color: var(--border); font-size: 0.8rem; }

/* ---- STATS BAR ---- */
.stats-bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 2rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.stat-item .stat-num {
  font-family: 'Fraunces', serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--fg);
  line-height: 1;
}

.stat-top { color: var(--accent) !important; }

.stat-item .stat-label {
  font-size: 0.72rem;
  color: var(--fg-3);
}

.stat-divider {
  width: 1px;
  height: 32px;
  background: var(--border);
  flex-shrink: 0;
}

/* ---- OPPORTUNITIES FEED ---- */
.opportunities-feed { display: flex; flex-direction: column; gap: 0; }

.feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.feed-header h2 {
  font-family: 'Fraunces', serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--fg);
}

.feed-count {
  font-size: 0.78rem;
  color: var(--fg-3);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
}

.feed-empty {
  padding: 3rem;
  text-align: center;
  color: var(--fg-3);
  font-size: 0.9rem;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 12px;
}

/* ---- OPP CARD ---- */
.opp-card {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 0.75rem;
  transition: border-color 0.2s;
}

.opp-card:hover { border-color: rgba(212,168,83,0.3); }

.opp-hot {
  border-color: rgba(91,191,138,0.15);
  background: rgba(91,191,138,0.03);
}

.opp-rank {
  font-family: 'Fraunces', serif;
  font-size: 1rem;
  font-weight: 300;
  color: var(--fg-3);
  min-width: 2rem;
  padding-top: 0.1rem;
}

.opp-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.75rem; }

.opp-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.opp-address { display: flex; flex-direction: column; gap: 0.2rem; }

.opp-street { font-size: 0.95rem; font-weight: 500; color: var(--fg); }

.opp-city { font-size: 0.78rem; color: var(--fg-3); }

.opp-score {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
}

.opp-score-num {
  font-family: 'Fraunces', serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--fg);
  line-height: 1;
}

.opp-hot .opp-score-num { color: var(--green); }

.opp-score-label {
  font-size: 0.6rem;
  color: var(--fg-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.opp-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.opp-tag {
  font-size: 0.72rem;
  color: var(--fg-2);
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 0.2rem 0.55rem;
  border-radius: 5px;
}

.opp-value {
  color: var(--accent);
  border-color: rgba(212,168,83,0.2);
}

.opp-outlook {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.outlook-badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  letter-spacing: 0.04em;
}

.outlook-high-priority { background: rgba(91,191,138,0.15); color: var(--green); border: 1px solid rgba(91,191,138,0.2); }
.outlook-worth-investigating { background: rgba(212,168,83,0.12); color: var(--accent); border: 1px solid rgba(212,168,83,0.2); }
.outlook-monitor { background: var(--surface2); color: var(--fg-2); border: 1px solid var(--border); }
.outlook-speculative { background: var(--surface2); color: var(--fg-3); border: 1px solid var(--border); }

.opp-owner { font-size: 0.75rem; color: var(--fg-3); }

.opp-summary {
  font-size: 0.82rem;
  color: var(--fg-2);
  line-height: 1.55;
  border-left: 2px solid var(--accent-dim);
  padding-left: 0.85rem;
}

.opp-signals {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.signal-chip {
  font-size: 0.68rem;
  color: var(--fg-3);
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  text-transform: capitalize;
}

/* ---- NAV ACTIVE ---- */
.nav-active { color: var(--fg) !important; font-weight: 500; }

/* ---- SOURCE STATUS PANEL ---- */
.source-status-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.source-status-panel h3 {
  font-family: 'Fraunces', serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 1rem;
}

.source-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.source-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.8rem;
}

.source-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.source-dot.healthy { background: var(--green); }
.source-dot.down { background: #e74c3c; }
.source-dot.unknown { background: var(--fg-3); }

.source-name { color: var(--fg); font-weight: 500; flex: 1; }
.source-type { color: var(--fg-3); font-size: 0.7rem; }
.source-count { color: var(--fg-2); font-size: 0.72rem; }

.source-refresh {
  font-size: 0.7rem;
  color: var(--fg-3);
}

/* ---- SCAN HISTORY ---- */
.scan-history {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.scan-history h3 {
  font-family: 'Fraunces', serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 1rem;
}

.scan-log-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.78rem;
}

.scan-log-item:last-child { border-bottom: none; }

.scan-log-status {
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
  font-size: 0.65rem;
}

.scan-log-status.completed { background: rgba(91,191,138,0.12); color: var(--green); }
.scan-log-status.failed { background: rgba(231,76,60,0.12); color: #e74c3c; }
.scan-log-status.running { background: rgba(212,168,83,0.12); color: var(--accent); }

.scan-log-detail { color: var(--fg-2); flex: 1; }
.scan-log-time { color: var(--fg-3); font-size: 0.7rem; }
.scan-log-source { font-size: 0.65rem; color: var(--fg-3); }

/* ---- HEADER ACTIONS ---- */
.profile-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-rescan {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg-2);
  padding: 0.55rem 1rem;
  border-radius: 8px;
  font-size: 0.78rem;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: border-color 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-rescan:hover { border-color: var(--accent); color: var(--accent); }

.btn-rescan svg { opacity: 0.6; }

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .scout-page { grid-template-columns: 1fr; }
  .scout-sidebar { position: static; height: auto; border-right: none; border-bottom: 1px solid var(--border); }
  .scout-main { padding: 1.5rem; }
}