/**
 * GovBidPulse Master Stylesheet (Baseline-UI Anti-AI Slop Standard)
 * High-tech tactical procurement: Dark steel (#090d16), electric cyan (#0284c7 / #38bdf8), Space Grotesk display.
 */

:root {
  --bg-app: #f8fafc;
  --bg-surface: #ffffff;
  --bg-sidebar: #090d16;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-sidebar: #94a3b8;
  --border-color: #e2e8f0;
  --border-sidebar: #1e293b;
  --accent-cyan: #0284c7;
  --accent-cyan-bright: #38bdf8;
  --accent-emerald: #059669;
  --accent-rose: #e11d48;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Fira Code', 'JetBrains Mono', monospace;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-main);
  height: 100vh;
  overflow: hidden;
}

.app-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  height: 100vh;
  width: 100vw;
}

/* Sidebar */
.app-sidebar {
  background-color: var(--bg-sidebar);
  color: var(--text-sidebar);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-sidebar);
  height: 100vh;
  padding: 20px 16px;
  overflow-y: auto;
}

.brand-section {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-sidebar);
  margin-bottom: 16px;
}

.brand-header-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.brand-logo-wrap {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.brand-logo-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.brand-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-cyan-bright);
  background: rgba(56, 189, 248, 0.12);
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.brand-subtitle {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text-sidebar);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.nav-tab:hover {
  background: #131b2e;
  color: #ffffff;
}

.nav-tab.active {
  background: #131b2e;
  border-left: 3px solid var(--accent-cyan-bright);
  color: #ffffff;
  font-weight: 600;
}

.nav-text {
  flex: 1;
}

.nav-count, .nav-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-cyan-bright);
  padding: 2px 6px;
  border-radius: 4px;
}

.sidebar-actions {
  padding-top: 16px;
  border-top: 1px solid var(--border-sidebar);
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #64748b;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-cyan-bright);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
}

/* Main Workspace */
.app-main {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* Top Telemetry Bar */
.top-telemetry-bar {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  height: 60px;
}

.telemetry-item {
  display: flex;
  flex-direction: column;
}

.telemetry-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.telemetry-value {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.telemetry-divider {
  width: 1px;
  height: 28px;
  background: var(--border-color);
}

.telemetry-right {
  margin-left: auto;
  display: flex;
  gap: 10px;
}

.text-cyan { color: var(--accent-cyan) !important; }
.text-rose { color: var(--accent-rose) !important; }
.font-mono { font-family: var(--font-mono); }

.btn-secondary {
  background: #ffffff;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.btn-secondary:hover {
  background: #f1f5f9;
}

.btn-cyan {
  background: #090d16;
  color: #38bdf8;
  border: 1px solid #0284c7;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.btn-cyan:hover {
  background: #0284c7;
  color: #ffffff;
}

/* Content Area */
.content-scrollable {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.controls-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.search-box {
  position: relative;
  flex: 1;
  max-width: 460px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-box input {
  width: 100%;
  padding: 10px 14px 10px 36px;
  font-size: 13px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: #ffffff;
  outline: none;
}

.filters-group {
  display: flex;
  gap: 10px;
}

.filter-select {
  padding: 8px 12px;
  font-size: 13px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: #ffffff;
  outline: none;
}

/* Master Table */
.table-container {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.leads-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.leads-table th {
  background: #f8fafc;
  padding: 12px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  text-align: left;
}

.leads-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.leads-table tr:hover {
  background: #f1f5f9;
}

.bid-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--text-main);
}

.agency-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.val-figure {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent-cyan);
}

.deadline-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-block;
}

.tag-urgent {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

.tag-open {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.btn-inspect {
  background: #ffffff;
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.btn-inspect:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 13, 22, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal-overlay.hidden {
  display: none;
}

.modal-card {
  background: #ffffff;
  border-radius: 8px;
  width: 90%;
  max-width: 660px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.modal-header {
  background: #090d16;
  color: #ffffff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-badge {
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  padding: 2px 6px;
  border-radius: 4px;
}

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  flex: 1;
}

.btn-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 20px;
  cursor: pointer;
}

.modal-body {
  padding: 20px;
}

/* =========================================================================
 * DOCUMENTATION & INTERACTIVE FAQ ACCORDION STYLES
 * ========================================================================= */
.view-switcher-bar {
  display: flex;
  gap: 8px;
  padding: 10px 24px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
}
.view-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.view-btn.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0369a1;
}
.doc-section { display: flex; flex-direction: column; gap: 20px; padding: 20px 0; }
.doc-search-bar { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 8px; padding: 14px 18px; display: flex; gap: 12px; align-items: center; }
.doc-search-input { flex: 1; background: #081120; border: 1px solid var(--border-color); border-radius: 6px; padding: 10px 14px; color: #ffffff; font-size: 13px; outline: none; }
.doc-search-input:focus { border-color: #38bdf8; }
.doc-card { background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 10px; overflow: hidden; }
.doc-card-header { background: #0c1c38; padding: 14px 18px; border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; }
.doc-card-header h3 { font-size: 14px; font-weight: 800; color: #ffffff; display: flex; align-items: center; gap: 8px; }
.doc-card-body { padding: 18px; display: flex; flex-direction: column; gap: 14px; line-height: 1.6; font-size: 13px; color: #e5e5e5; }
.widget-guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-top: 8px; }
.widget-guide-card { background: #081120; border: 1px solid var(--border-color); border-radius: 8px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.widget-guide-title { font-size: 13px; font-weight: 700; color: #38bdf8; display: flex; align-items: center; gap: 6px; }
.widget-guide-desc { font-size: 12px; color: var(--text-muted); line-height: 1.45; }
.widget-guide-action { font-family: var(--font-mono); font-size: 11px; background: rgba(255, 255, 255, 0.04); padding: 6px 10px; border-radius: 4px; border-left: 3px solid #0284c7; color: #bae6fd; }

/* FAQ Accordion Styles */
.faq-accordion-group { display: flex; flex-direction: column; gap: 10px; }
.faq-item { background: #081120; border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; transition: border-color 0.15s ease; }
.faq-item:hover { border-color: #0284c7; }
.faq-summary { padding: 14px 18px; font-size: 13.5px; font-weight: 700; color: #ffffff; cursor: pointer; display: flex; justify-content: space-between; align-items: center; user-select: none; list-style: none; }
.faq-summary::-webkit-details-marker { display: none; }
.faq-summary::after { content: "＋"; font-size: 16px; color: #38bdf8; font-weight: bold; }
details[open] .faq-summary::after { content: "－"; color: #f59e0b; }
details[open] .faq-summary { background: #0c2044; border-bottom: 1px solid var(--border-color); }
.faq-content { padding: 16px 18px; font-size: 12.5px; line-height: 1.6; color: #cbd5e1; background: #050b16; }
.faq-content strong { color: #ffffff; }
.faq-content code { font-family: var(--font-mono); font-size: 11.5px; background: rgba(2, 132, 199, 0.2); color: #38bdf8; padding: 2px 6px; border-radius: 4px; }

