/* ============================================================
   GovPaid — Opportunities / Intel Feed Page
   ============================================================ */

/* ── Hero ──────────────────────────────────────────────────── */
.opp-hero {
  padding: calc(var(--ticker-height) + var(--nav-height) + 3.5rem) 0 2.5rem;
  background: var(--navy);
  color: var(--white);
}

.opp-hero-eyebrow {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .75rem;
}

.live-dot {
  width: 8px;
  height: 8px;
  background: #22C55E;
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .5; transform: scale(.8); }
}

.opp-hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: .75rem;
  color: var(--white);
}

.opp-hero-sub {
  color: rgba(255,255,255,.7);
  font-size: 1rem;
  max-width: 540px;
  margin-bottom: 1.25rem;
}

.opp-hero-meta {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .8rem;
  color: rgba(255,255,255,.5);
}

.opp-hero-meta-sep { color: rgba(255,255,255,.25); }

/* ── Filter Bar ────────────────────────────────────────────── */
.opp-filter-bar {
  position: sticky;
  top: calc(var(--ticker-height) + var(--nav-height));
  z-index: 90;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.opp-filter-bar .container {
  padding-top: 0;
  padding-bottom: 0;
}

/* Tabs */
.opp-tabs {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--border-light);
  justify-content: center;
}

.opp-tabs::-webkit-scrollbar { display: none; }

.opp-tab {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  padding: .875rem 1.25rem;
  font-family: var(--font-sans);
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: var(--transition);
  white-space: nowrap;
}

.opp-tab:hover { color: var(--navy); }

.opp-tab.active {
  color: var(--navy);
  border-bottom-color: var(--gold);
}

/* Date range bar */
.opp-date-bar {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem 0 .5rem;
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
}

.opp-date-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
  white-space: nowrap;
}

.opp-date-pills {
  display: flex;
  gap: .3rem;
  flex-wrap: wrap;
}

.opp-date-pill {
  padding: .25rem .7rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--white);
  font-family: var(--font-sans);
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.opp-date-pill:hover {
  border-color: var(--navy);
  color: var(--navy);
}

.opp-date-pill.active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

.opp-date-note {
  font-size: .72rem;
  color: var(--text-muted);
  margin-left: auto;
}

.opp-date-note--warn {
  color: #B45309;
}

/* Search row */
.opp-search-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 0;
  flex-wrap: wrap;
}

.opp-search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.opp-search-icon {
  position: absolute;
  left: .75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.opp-search-input {
  width: 100%;
  padding: .55rem .75rem .55rem 2.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: .85rem;
  color: var(--text-primary);
  background: var(--surface);
  outline: none;
  transition: var(--transition);
}

.opp-search-input:focus {
  border-color: var(--navy);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

.opp-select {
  padding: .55rem .75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: .8rem;
  color: var(--text-secondary);
  background: var(--surface);
  cursor: pointer;
  outline: none;
  min-width: 140px;
}

.opp-select:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

.opp-clear-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: .8rem;
  font-weight: 600;
  color: var(--gold-dark);
  padding: .4rem .6rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.opp-clear-btn:hover {
  background: var(--gold-muted);
}

/* ── Live Recent Strip ─────────────────────────────────────── */
.live-recent {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-left: 3px solid var(--green);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}

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

.live-recent-title {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--navy);
}

.live-recent-source {
  font-size: .7rem;
  color: var(--green);
  font-weight: 600;
}

.live-recent-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .75rem;
}

@media (max-width: 768px) {
  .live-recent-grid { grid-template-columns: 1fr; }
}

.live-recent-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: .875rem 1rem;
  transition: var(--transition);
}

.live-recent-card:hover {
  border-color: var(--navy-light);
  box-shadow: var(--shadow-sm);
}

.lrc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .4rem;
}

.lrc-amount {
  font-size: .85rem;
  font-weight: 800;
  color: var(--green);
}

.lrc-recipient {
  font-size: .875rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: .2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lrc-agency {
  font-size: .72rem;
  color: var(--text-secondary);
  margin-bottom: .4rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lrc-meta {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  margin-bottom: .5rem;
}

.lrc-meta span {
  font-size: .68rem;
  color: var(--text-muted);
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: .15rem .5rem;
}

.lrc-link {
  font-size: .7rem;
  font-weight: 600;
  color: var(--cat-solicitation);
  text-decoration: none;
}

.lrc-link:hover { text-decoration: underline; }

/* ── Main content area ─────────────────────────────────────── */
.opp-main {
  min-height: 60vh;
  padding: 2rem 0 5rem;
}

/* ── Stats / toolbar bar ───────────────────────────────────── */
.opp-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--border-light);
}

.feed-toolbar-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .6rem;
}

.feed-toolbar-right {
  display: flex;
  align-items: center;
  gap: .45rem;
  flex-shrink: 0;
}

.toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-family: var(--font-sans);
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.toolbar-btn:hover {
  border-color: var(--navy);
  color: var(--navy);
  background: var(--surface);
}

#oppStatsText {
  font-size: .82rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.opp-stats-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.stat-badge {
  padding: .25rem .65rem;
  border-radius: var(--radius-full);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .03em;
}

.stat-badge--sol {
  background: #EFF6FF;
  color: var(--cat-solicitation);
}

.stat-badge--award {
  background: var(--green-light);
  color: var(--green);
}

/* ── Table wrap ────────────────────────────────────────────── */
.opp-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
}

/* ── Table ─────────────────────────────────────────────────── */
.opp-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-sans);
}

.opp-table thead tr {
  background: var(--surface);
  border-bottom: 2px solid var(--border);
}

.opp-table th {
  padding: .65rem 1rem;
  text-align: left;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
  white-space: nowrap;
  user-select: none;
}

.opp-table .col-title    { min-width: 300px; }
.opp-table .col-type     { width: 130px; }
.opp-table .col-agency   { width: 190px; }
.opp-table .col-setaside { width: 120px; }
.opp-table .col-posted   { width: 100px; }
.opp-table .col-deadline { width: 140px; }

/* ── Table rows ─────────────────────────────────────────────── */
.opp-row {
  border-bottom: 1px solid var(--border-light);
  transition: background .1s;
}

.opp-row:hover { background: var(--surface); }
.opp-row:last-child { border-bottom: none; }

.opp-table td {
  padding: .85rem 1rem;
  vertical-align: top;
  font-size: .81rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.opp-row-title {
  display: block;
  font-size: .88rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: .2rem;
  text-decoration: none;
}

.opp-row-title:hover { color: var(--navy); text-decoration: underline; }

.opp-row-summary {
  font-size: .77rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: .3rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.opp-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  margin-top: .3rem;
}

.opp-row-amount {
  font-size: .88rem;
  font-weight: 800;
  color: var(--green);
  margin-top: .3rem;
}

/* Deadline cell states */
.deadline-active {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: var(--green);
  font-weight: 600;
  font-size: .78rem;
}

.deadline-dot {
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse-dot 2s ease-in-out infinite;
}

.deadline-urgent {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: #B91C1C;
  font-weight: 600;
  font-size: .78rem;
}

.deadline-urgent .deadline-dot { background: #B91C1C; }

.deadline-closed {
  color: var(--text-muted);
  font-size: .78rem;
}

.row-date {
  color: var(--text-muted);
  font-size: .78rem;
}

/* ── Shared badges ─────────────────────────────────────────── */
.opp-badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .2rem .6rem;
  border-radius: var(--radius-full);
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.opp-badge--solicitation {
  background: #EFF6FF;
  color: var(--cat-solicitation);
}

.opp-badge--award {
  background: var(--green-light);
  color: var(--green);
}

.opp-badge--recompete {
  background: #F5F3FF;
  color: var(--cat-recompete);
}

.opp-badge--presol {
  background: #FFF7ED;
  color: #C2410C;
}

.opp-badge--set-aside {
  background: rgba(37,99,235,.1);
  color: var(--gold-dark);
}

/* ── Meta pills ────────────────────────────────────────────── */
.opp-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .15rem .5rem;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  font-size: .68rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ── Loading ────────────────────────────────────────────────── */
.opp-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 5rem 0;
  color: var(--text-muted);
}

.opp-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Error state ────────────────────────────────────────────── */
.opp-error {
  max-width: 520px;
  margin: 4rem auto;
  text-align: center;
  padding: 2.5rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
}

.opp-error-icon { font-size: 2.5rem; margin-bottom: .75rem; }

.opp-error h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: .5rem;
  color: var(--text-primary);
}

.opp-error p {
  font-size: .875rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.opp-error-help {
  text-align: left;
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-top: 1.25rem;
  font-size: .82rem;
  color: var(--text-secondary);
}

.opp-error-help code {
  display: block;
  background: var(--navy);
  color: var(--gold-light);
  padding: .6rem .85rem;
  border-radius: var(--radius-sm);
  font-family: monospace;
  font-size: .8rem;
  margin: .5rem 0;
  line-height: 1.6;
}

/* ── Empty state ────────────────────────────────────────────── */
.opp-empty {
  text-align: center;
  padding: 4rem 0;
  color: var(--text-muted);
}

.opp-empty-icon { font-size: 2.5rem; margin-bottom: .75rem; }
.opp-empty h3 { font-size: 1rem; font-weight: 700; color: var(--text-secondary); margin-bottom: .4rem; }
.opp-empty p { font-size: .85rem; }

/* ── Load more ──────────────────────────────────────────────── */
.opp-load-more-wrap {
  text-align: center;
  margin-top: 2.5rem;
}

/* ══════════════════════════════════════════════════════════
   COMPANY INTEL
══════════════════════════════════════════════════════════ */

/* Company search row */
.opp-company-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 0;
}

.opp-company-search-wrap {
  position: relative;
  flex: 1;
  max-width: 560px;
}

/* Autocomplete dropdown */
.company-autocomplete {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  overflow: hidden;
  max-height: 340px;
  overflow-y: auto;
}

.ac-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: .65rem 1rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  gap: 1rem;
  transition: background .12s;
}

.ac-item:hover { background: var(--surface); }

.ac-name {
  font-size: .875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.ac-meta {
  font-size: .75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.ac-empty {
  padding: 1rem;
  font-size: .82rem;
  color: var(--text-muted);
  text-align: center;
}

/* Company intel panel */
.company-intel-panel {
  padding: 0;
}

/* Prompt */
.company-prompt {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-muted);
}

.company-prompt-icon {
  font-size: 2.8rem;
  margin-bottom: .75rem;
}

.company-prompt h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: .5rem;
}

.company-prompt p {
  font-size: .875rem;
  max-width: 420px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Profile card */
.company-profile-card {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius-xl);
  padding: 1.75rem 2rem;
  margin-bottom: 2rem;
}

.cp-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.cp-icon {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
}

.cp-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: .3rem;
  color: var(--white);
}

.cp-tagline {
  font-size: .82rem;
  color: rgba(255,255,255,.6);
  margin-bottom: .4rem;
}

.cp-live-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .2rem .6rem;
  border-radius: var(--radius-full);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
  background: rgba(34,197,94,.15);
  color: #4ADE80;
  border: 1px solid rgba(34,197,94,.25);
}

.cp-live-badge--local {
  background: rgba(37,99,235,.2);
  color: var(--gold-light);
  border-color: rgba(37,99,235,.35);
}

.cp-loading {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  color: rgba(255,255,255,.6);
  font-size: .875rem;
}

.cp-error {
  padding: 1rem 1.5rem;
  color: #FCA5A5;
  font-size: .875rem;
  background: rgba(239,68,68,.1);
  border-radius: var(--radius-md);
}

/* Live search option in autocomplete */
.ac-live {
  border-top: 1px solid var(--border-light);
  background: #F0F9FF;
}

.ac-live:hover { background: #E0F2FE; }

.ac-live .ac-name { color: var(--cat-solicitation); }

.ac-meta--live {
  color: var(--cat-solicitation) !important;
  font-weight: 600;
}

.cp-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.cp-stat {
  display: flex;
  flex-direction: column;
  gap: .15rem;
}

.cp-stat-val {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
}

.cp-stat-lbl {
  font-size: .72rem;
  color: rgba(255,255,255,.5);
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* Two-column layout */
.company-intel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 768px) {
  .company-intel-grid { grid-template-columns: 1fr; }
}

/* Section headers */
.company-section-header {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  margin-bottom: 1rem;
  padding-bottom: .75rem;
  border-bottom: 2px solid var(--navy);
}

.company-section-header h3 {
  font-size: .9rem;
  font-weight: 800;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.company-section-note {
  font-size: .72rem;
  color: var(--text-muted);
}

/* Contract cards */
.contract-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  margin-bottom: .65rem;
  transition: var(--transition);
}

.contract-card:hover {
  border-color: var(--navy-light);
  box-shadow: var(--shadow-sm);
}

.cc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .3rem;
}

.cc-amount {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--navy);
}

.cc-link {
  font-size: .72rem;
  font-weight: 600;
  color: var(--cat-solicitation);
  text-decoration: none;
}

.cc-link:hover { text-decoration: underline; }

.cc-title {
  font-size: .82rem;
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: .5rem;
  line-height: 1.4;
}

.cc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.cc-meta span {
  font-size: .68rem;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: .15rem .5rem;
}

.cc-setaside {
  background: rgba(37,99,235,.1) !important;
  border-color: rgba(37,99,235,.3) !important;
  color: var(--gold-dark) !important;
}

.cc-source {
  background: #EFF6FF !important;
  border-color: #BFDBFE !important;
  color: var(--cat-solicitation) !important;
}

/* Show more contracts button */
.cc-show-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  width: 100%;
  padding: .75rem;
  margin-top: .25rem;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: .82rem;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  transition: var(--transition);
}

.cc-show-more:hover {
  background: var(--gold-muted);
  border-color: var(--gold);
  color: var(--gold-dark);
}

.cc-show-more-count {
  font-weight: 400;
  color: var(--text-muted);
  font-size: .75rem;
}

.cc-all-shown {
  text-align: center;
  font-size: .72rem;
  color: var(--text-muted);
  padding: .5rem 0 0;
  margin: 0;
}

/* Incumbent cards */
.incumbent-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: .875rem 1rem;
  margin-bottom: .6rem;
  transition: var(--transition);
}

.incumbent-card:hover {
  border-color: var(--navy-light);
  box-shadow: var(--shadow-sm);
}

.inc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .35rem;
}

.inc-name {
  background: none;
  border: none;
  cursor: pointer;
  font-size: .9rem;
  font-weight: 700;
  color: var(--navy);
  padding: 0;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: var(--transition);
}

.inc-name:hover {
  color: var(--cat-solicitation);
  text-decoration-color: var(--cat-solicitation);
}

.inc-amount {
  font-size: .875rem;
  font-weight: 700;
  color: var(--green);
}

.inc-meta {
  font-size: .72rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem;
}

.inc-tag {
  display: inline-flex;
  padding: .15rem .5rem;
  border-radius: var(--radius-full);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .03em;
}

.inc-tag--naics {
  background: #EFF6FF;
  color: var(--cat-solicitation);
}

.inc-tag--agency {
  background: var(--green-light);
  color: var(--green);
}

.incumbents-empty {
  font-size: .82rem;
  color: var(--text-muted);
  padding: 1rem 0;
}

/* Company no results */
.company-no-results {
  text-align: center;
  padding: 4rem 0;
  color: var(--text-muted);
}

.company-no-results h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: .4rem;
}

.company-no-results p { font-size: .85rem; }
.company-no-results code {
  background: var(--surface);
  padding: .15rem .4rem;
  border-radius: var(--radius-sm);
  font-size: .8rem;
}

/* Clickable company pill on award cards */
.opp-company-link {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: .7rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: .2rem .55rem;
  transition: var(--transition);
}

.opp-company-link:hover {
  background: #EFF6FF;
  border-color: #BFDBFE;
  color: var(--cat-solicitation);
}

/* ── Footer data note ───────────────────────────────────────── */
.footer-data-note {
  font-size: .72rem;
  color: rgba(255,255,255,.3);
  margin-top: .5rem;
  max-width: 280px;
}

/* ── Pro badge on toolbar button ──────────────────────────── */
.toolbar-btn-pro-badge {
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--gold-dark);
  background: var(--gold-muted);
  border-radius: 3px;
  padding: .1rem .3rem;
  margin-left: .15rem;
}

/* ── Export Pro Gate Modal ─────────────────────────────────── */
.pro-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(3px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.pro-modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 2rem 1.75rem 1.75rem;
  max-width: 420px;
  width: 100%;
  position: relative;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0,0,0,.28);
}

.pro-modal-close {
  position: absolute;
  top: .75rem;
  right: .875rem;
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: .1rem .35rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.pro-modal-close:hover { background: var(--surface); color: var(--text-primary); }

.pro-modal-icon { font-size: 2.2rem; margin-bottom: .65rem; }

.pro-modal-title {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: .55rem;
}

.pro-modal-body {
  font-size: .875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.pro-modal-actions {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  align-items: center;
}

.pro-modal-cancel {
  background: none;
  border: none;
  cursor: pointer;
  font-size: .82rem;
  color: var(--text-muted);
  font-family: var(--font-sans);
  padding: .2rem .5rem;
  transition: var(--transition);
}
.pro-modal-cancel:hover { color: var(--text-secondary); }

[data-theme="dark"] .pro-modal {
  background: #1a1a2e;
  border: 1px solid #2a2a3a;
}
[data-theme="dark"] .pro-modal-title  { color: #e2e8f0; }
[data-theme="dark"] .pro-modal-body   { color: #94a3b8; }
[data-theme="dark"] .pro-modal-close  { color: #64748b; }
[data-theme="dark"] .pro-modal-close:hover { background: #111119; color: #e2e8f0; }
[data-theme="dark"] .pro-modal-cancel { color: #64748b; }
[data-theme="dark"] .pro-modal-cancel:hover { color: #94a3b8; }
[data-theme="dark"] .toolbar-btn-pro-badge {
  color: var(--gold);
  background: rgba(212,167,72,.15);
}

/* ── Responsive ─────────────────────────────────────────────── */

/* ── 768px: tablet adjustments ─────────────────────────────── */
@media (max-width: 768px) {
  .opp-hero {
    padding-top: calc(var(--ticker-height) + var(--nav-height) + 2rem);
    padding-bottom: 1.75rem;
  }

  /* Date note: don't push to far right, let it wrap cleanly */
  .opp-date-note { margin-left: 0; }

  /* Company search row: stack on tablet */
  .opp-company-row { flex-wrap: wrap; }
}

/* ── 640px: mobile ──────────────────────────────────────────── */
@media (max-width: 640px) {

  /* Filter bar: search/selects stack */
  .opp-search-row {
    flex-direction: column;
    align-items: stretch;
    gap: .5rem;
  }
  .opp-select { min-width: unset; width: 100%; }

  /* Company search row stack */
  .opp-company-row {
    flex-direction: column;
    align-items: stretch;
  }
  .opp-company-search-wrap { max-width: 100%; }

  /* Stats / toolbar: Export on its own line */
  .opp-stats { flex-direction: column; align-items: flex-start; gap: .6rem; }
  .feed-toolbar-right { width: 100%; }
  .toolbar-btn { width: 100%; justify-content: center; }

  /* ── Table → stacked card rows ─────────────────────────────── */
  .opp-table-wrap {
    border: none;
    border-radius: 0;
    overflow-x: visible;
    background: transparent;
  }

  .opp-table { display: block; }
  .opp-table thead { display: none; }
  .opp-table tbody {
    display: flex;
    flex-direction: column;
    gap: .55rem;
  }

  .opp-row {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid var(--border-light) !important;
    border-radius: var(--radius-md);
    overflow: hidden;
  }

  /* Reset default row bottom-border — the card border handles it */
  .opp-row:last-child { border-bottom: 1px solid var(--border-light) !important; }

  .opp-table td {
    display: block;
    padding: .55rem .875rem;
    border: none;
  }

  /* Title cell: larger padding, divider below */
  .opp-row .col-title {
    padding: .75rem .875rem .65rem;
    border-bottom: 1px solid var(--border-light);
  }

  /* Agency: compact line under title */
  .opp-row .col-agency {
    padding: .4rem .875rem .1rem;
    font-size: .74rem;
  }

  /* Type badge row */
  .opp-row .col-type {
    padding: .1rem .875rem;
  }

  /* Deadline: last visible row, extra bottom padding */
  .opp-row .col-deadline {
    padding: .1rem .875rem .65rem;
  }

  /* Hide columns that don't add mobile value */
  .opp-row .col-setaside,
  .opp-row .col-posted { display: none; }

  /* Load more button full-width on mobile */
  #oppLoadMore { width: 100%; }
}

/* ============================================================
   DARK MODE — Opportunities Page
   ============================================================ */
[data-theme="dark"] .opp-hero {
  background: #070710;
}

[data-theme="dark"] .opp-hero-title {
  color: #f1f5f9;
}

[data-theme="dark"] .opp-filter-bar {
  background: #111119;
  border-bottom-color: #2a2a3a;
}

[data-theme="dark"] .opp-tab {
  color: #94a3b8;
}
[data-theme="dark"] .opp-tab:hover,
[data-theme="dark"] .opp-tab.active {
  color: #e2e8f0;
}

[data-theme="dark"] .opp-search-input {
  background: #1a1a2e;
  border-color: #2a2a3a;
  color: #e2e8f0;
}
[data-theme="dark"] .opp-search-input:focus {
  background: #1a1a2e;
  border-color: #2563EB;
}

[data-theme="dark"] .opp-select {
  background: #1a1a2e;
  border-color: #2a2a3a;
  color: #e2e8f0;
}

[data-theme="dark"] .opp-date-pill {
  background: #1a1a2e;
  border-color: #2a2a3a;
  color: #94a3b8;
}
[data-theme="dark"] .opp-date-pill:hover {
  border-color: #e2e8f0;
  color: #e2e8f0;
}
[data-theme="dark"] .opp-date-pill.active {
  background: #2563EB;
  border-color: #2563EB;
  color: #fff;
}

/* Table dark mode */
[data-theme="dark"] .opp-table-wrap {
  border-color: #2a2a3a;
}

[data-theme="dark"] .opp-table thead tr {
  background: #111119;
  border-bottom-color: #2a2a3a;
}

[data-theme="dark"] .opp-table th {
  color: #4a5568;
}

[data-theme="dark"] .opp-row {
  border-bottom-color: #1f1f2e;
}

[data-theme="dark"] .opp-row:hover {
  background: #161622;
}

/* Mobile stacked cards — give rows a surface background in dark mode */
@media (max-width: 640px) {
  [data-theme="dark"] .opp-row {
    background: #161622;
    border-color: #2a2a3a !important;
  }
  [data-theme="dark"] .opp-row .col-title {
    border-bottom-color: #2a2a3a;
  }
}

[data-theme="dark"] .opp-table td {
  color: #94a3b8;
}

[data-theme="dark"] .opp-row-title {
  color: #e2e8f0;
}

[data-theme="dark"] .opp-row-title:hover {
  color: #60a5fa;
}

[data-theme="dark"] .opp-row-summary {
  color: #64748b;
}

[data-theme="dark"] .opp-row-amount {
  color: #4ade80;
}

[data-theme="dark"] .opp-meta-pill {
  background: #1a1a2e;
  border-color: #2a2a3a;
  color: #64748b;
}

[data-theme="dark"] .toolbar-btn {
  background: #161622;
  border-color: #2a2a3a;
  color: #94a3b8;
}

[data-theme="dark"] .toolbar-btn:hover {
  border-color: #60a5fa;
  color: #e2e8f0;
  background: #1a1a2e;
}

[data-theme="dark"] .opp-badge--solicitation {
  background: rgba(37,99,235,.15);
}
[data-theme="dark"] .opp-badge--award {
  background: rgba(21,128,61,.15);
}
[data-theme="dark"] .opp-badge--recompete {
  background: rgba(124,58,237,.15);
}
[data-theme="dark"] .opp-badge--presol {
  background: rgba(194,65,12,.15);
}

[data-theme="dark"] .stat-badge--sol {
  background: rgba(37,99,235,.15);
}
[data-theme="dark"] .stat-badge--award {
  background: rgba(21,128,61,.15);
}

[data-theme="dark"] .live-recent {
  background: #161622;
  border-color: #2a2a3a;
}
[data-theme="dark"] .live-recent-title {
  color: #e2e8f0;
}
[data-theme="dark"] .live-recent-card {
  background: #1a1a2e;
  border-color: #2a2a3a;
}
[data-theme="dark"] .lrc-recipient {
  color: #e2e8f0;
}
[data-theme="dark"] .lrc-meta span {
  background: #111119;
  border-color: #2a2a3a;
  color: #64748b;
}

[data-theme="dark"] .opp-main {
  background: #0d0d14;
}

[data-theme="dark"] #oppStatsText {
  color: #94a3b8;
}

/* Company intel dark mode */
[data-theme="dark"] .company-autocomplete {
  background: #161622;
  border-color: #2a2a3a;
}
[data-theme="dark"] .ac-item:hover {
  background: #1a1a2e;
}
[data-theme="dark"] .ac-name {
  color: #e2e8f0;
}
[data-theme="dark"] .contract-card {
  background: #161622;
  border-color: #2a2a3a;
}
[data-theme="dark"] .cc-amount {
  color: #e2e8f0;
}
[data-theme="dark"] .cc-title {
  color: #cbd5e1;
}
[data-theme="dark"] .cc-meta span {
  background: #1a1a2e;
  border-color: #2a2a3a;
}
[data-theme="dark"] .incumbent-card {
  background: #161622;
  border-color: #2a2a3a;
}
[data-theme="dark"] .inc-name {
  color: #e2e8f0;
}
[data-theme="dark"] .company-section-header {
  border-bottom-color: #2a2a3a;
}
[data-theme="dark"] .company-section-header h3 {
  color: #e2e8f0;
}
[data-theme="dark"] .cc-show-more {
  background: #1a1a2e;
  border-color: #2a2a3a;
  color: #e2e8f0;
}
[data-theme="dark"] .opp-error {
  background: #161622;
  border-color: #2a2a3a;
}
[data-theme="dark"] .ac-live {
  background: rgba(37,99,235,.1);
}
[data-theme="dark"] .ac-live:hover {
  background: rgba(37,99,235,.2);
}
