:root {
  --bg: #f1f5f9;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #475569;
  --border: #cbd5e1;
  --navy: #07142b;
  --blue: #1d6fe8;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  background: var(--navy);
  color: #fff;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.logo-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 10px #38bdf8;
}
.brand strong { display: block; font-size: 1rem; }
.brand span { font-size: 0.76rem; color: #94a3b8; }

.topbar-meta { display: flex; align-items: center; gap: 10px; }
.count-pill {
  background: rgba(56, 189, 248, 0.16);
  color: #bae6fd;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
}
.btn-reset {
  background: transparent;
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 7px;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-reset:hover { border-color: #38bdf8; color: #38bdf8; }

.ai-bar {
  background: #0d1f42;
  padding: 10px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.ai-form { display: flex; gap: 8px; }
.ai-form input {
  flex: 1;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.4);
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.9rem;
}
.btn-ai {
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 9px 16px;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
}
.btn-ai:hover { background: #175cc4; }
.ai-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ai-chip {
  font-size: 0.74rem;
  font-weight: 600;
  background: rgba(56, 189, 248, 0.18);
  color: #e0f2fe;
  padding: 3px 9px;
  border-radius: 999px;
}

.filters-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
  display: grid;
  grid-template-columns: 1.3fr repeat(5, minmax(135px, 1fr));
  gap: 10px;
}
.filter-group { display: flex; flex-direction: column; gap: 4px; }
.filter-group label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.filter-group input,
.filter-group select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-family: inherit;
  font-size: 0.85rem;
  background: #fff;
  color: var(--ink);
}

.workspace {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 440px 1fr;
}
.list-pane {
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-right: 1px solid var(--border);
  background: var(--bg);
}
.rfp-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.rfp-card:hover,
.rfp-card.active {
  border-color: var(--blue);
  box-shadow: 0 4px 14px rgba(29, 111, 232, 0.14);
}
.rfp-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e0edff;
  color: #1e40af;
}
.badge-cat2 { background: #dcfce7; color: #166534; }
.badge-fy { background: #f1f5f9; color: #334155; }
.rfp-card h3 { margin: 0 0 6px; font-size: 0.95rem; line-height: 1.3; }
.rfp-meta { font-size: 0.8rem; color: var(--muted); margin-bottom: 6px; }
.rfp-funcs { font-size: 0.79rem; color: #1e293b; font-weight: 500; margin-bottom: 8px; }
.rfp-desc { font-size: 0.81rem; color: #475569; margin: 0 0 10px; }
.rfp-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--muted);
}
.doc-links { display: flex; gap: 10px; }
.doc-links a { color: var(--blue); font-weight: 600; text-decoration: none; }
.doc-links a:hover { text-decoration: underline; }

.map-pane { position: relative; min-height: 360px; }
#map { width: 100%; height: 100%; }

.empty-state {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 1024px) {
  .filters-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .workspace { grid-template-columns: 370px 1fr; }
}
@media (max-width: 760px) {
  body { height: auto; }
  .filters-bar { grid-template-columns: 1fr 1fr; }
  .workspace { grid-template-columns: 1fr; }
  .map-pane { height: 380px; order: -1; }
}
