﻿* {
  box-sizing: border-box;
}

:root {
  --navy: #171717;
  --navy-2: #222222;
  --blue: #c65a32;
  --blue-light: #fff1eb;
  --gold: #b94c2a;
  --brick: #c65a32;
  --brick-dark: #a94727;
  --brick-light: #fff1eb;
  --bg: #f7f5f2;
  --card: #ffffff;
  --text: #181818;
  --muted: #706b67;
  --border: #e5ded8;
}

body {
  margin: 0;
  font-family: Arial, "Tahoma", sans-serif;
  background: var(--bg);
  color: var(--text);
}

.app {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  width: 250px;
  height: 100vh;
  background: linear-gradient(180deg, #071c36, #061629);
  color: white;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 23px;
  font-weight: 800;
  color: #082445;
  background: linear-gradient(135deg, #e5bc55, #ffe49b);
}

.brand strong {
  display: block;
  font-size: 22px;
}

.brand small,
.profile small,
.sidebar-bottom small {
  display: block;
  color: #8fa3bb;
  margin-top: 4px;
}

.sidebar-intro {
  margin: 26px 4px;
  color: #c4d1df;
  line-height: 1.6;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.sidebar nav a {
  padding: 13px 14px;
  border-radius: 9px;
  color: #c2cede;
  cursor: pointer;
  display: flex;
  gap: 12px;
  align-items: center;
}

.sidebar nav a.active {
  color: white;
  background: #123d70;
  border-left: 4px solid #e4b74c;
}

.sidebar nav a:hover {
  background: rgba(255,255,255,.06);
}

.sidebar-bottom {
  margin-top: auto;
  padding: 14px 4px;
  font-size: 13px;
  color: #a8bad0;
}

.online-dot {
  width: 8px;
  height: 8px;
  background: #4be0b4;
  display: inline-block;
  border-radius: 50%;
}

.main {
  margin-left: 250px;
  min-height: 100vh;
}

.topbar {
  height: 70px;
  background: #0b2341;
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
}

.global-search {
  background: white;
  max-width: 720px;
  flex: 1;
  border-radius: 7px;
  padding: 0 14px;
  display: flex;
  align-items: center;
}

.global-search input {
  width: 100%;
  height: 42px;
  border: 0;
  outline: 0;
  padding: 0 10px;
}

.profile {
  color: white;
  display: flex;
  gap: 10px;
  align-items: center;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: white;
  color: var(--navy);
  font-weight: bold;
}

.welcome {
  min-height: 155px;
  padding: 28px 36px;
  background:
    linear-gradient(90deg, rgba(255,255,255,.98), rgba(244,249,255,.92)),
    linear-gradient(135deg, #eef5fc, #dceaf7);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.welcome h1 {
  margin: 5px 0;
  font-size: 29px;
}

.welcome p {
  max-width: 700px;
  margin: 7px 0;
  color: var(--muted);
}

.welcome-quote {
  padding-right: 25px;
  text-align: right;
  font-weight: 700;
  color: #53677c;
  line-height: 1.6;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 1.5px;
  font-weight: 800;
  color: var(--blue);
}

.kpis {
  padding: 18px 28px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.kpis article {
  background: white;
  padding: 18px;
  border-radius: 10px;
  border: 1px solid var(--border);
  box-shadow: 0 3px 10px rgba(31,60,90,.05);
}

.kpis span,
.kpis small {
  display: block;
  color: var(--muted);
}

.kpis strong {
  display: block;
  font-size: 27px;
  margin: 7px 0;
  color: #0a3868;
}

.workspace {
  padding: 0 28px 30px;
  display: grid;
  grid-template-columns: minmax(0,1fr) 310px;
  gap: 18px;
}

.search-panel,
.insight-card,
.tender-card,
.pro-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.search-panel {
  padding: 20px;
}

.panel-title,
.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel-title h2,
.result-header h2 {
  margin: 4px 0;
  font-size: 19px;
}

.ai-badge {
  color: var(--blue);
  background: var(--blue-light);
  padding: 7px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
}

.search-row {
  margin-top: 15px;
  display: grid;
  grid-template-columns: 1fr 110px;
  gap: 10px;
}

.search-row input,
.filters input,
.filters select {
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0 12px;
  outline: none;
  background: white;
}

.search-row button {
  border: 0;
  border-radius: 7px;
  background: #0a3563;
  color: white;
  font-weight: bold;
  cursor: pointer;
}

.filters {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr auto;
  gap: 8px;
}

.secondary {
  border: 1px solid var(--border);
  background: white;
  border-radius: 7px;
  padding: 0 14px;
  cursor: pointer;
}

.result-header {
  margin: 25px 3px 10px;
}

.result-header strong {
  color: var(--muted);
  font-size: 13px;
}

.tender-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tender-card {
  padding: 15px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
}

.tender-card h3 {
  margin: 4px 0 8px;
  font-size: 16px;
  color: #0d3158;
}

.tender-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.tag {
  display: inline-block;
  padding: 4px 8px;
  background: #edf5ff;
  color: #1763a5;
  border-radius: 15px;
  font-size: 11px;
  font-weight: bold;
}

.amount {
  text-align: right;
  font-size: 16px;
  font-weight: 800;
  color: #0a3868;
  min-width: 130px;
}

.insights {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.insight-card {
  padding: 18px;
}

.insight-title {
  display: flex;
  gap: 10px;
  align-items: center;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--border);
}

.insight-title strong {
  display: block;
}

.insight-title small {
  color: var(--muted);
}

.market-row {
  margin-top: 13px;
}

.market-row-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 5px;
}

.bar {
  height: 6px;
  background: #edf1f5;
  border-radius: 4px;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  background: #1470b8;
  border-radius: 4px;
}

.pro-card {
  padding: 22px;
  text-align: center;
  background: linear-gradient(145deg,#fff9e8,#fff);
}

.pro-card > span {
  font-size: 28px;
  color: var(--gold);
}

.pro-card strong {
  display: block;
  margin-top: 8px;
  font-size: 18px;
}

.pro-card p {
  color: var(--muted);
  font-size: 13px;
}

.pro-card button {
  border: 0;
  border-radius: 7px;
  padding: 10px 16px;
  background: #c79529;
  color: white;
  font-weight: bold;
}

@media(max-width:1150px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .insights {
    display: grid;
    grid-template-columns: repeat(2,1fr);
  }

  .pro-card {
    display: none;
  }
}

@media(max-width:850px) {
  .sidebar {
    display: none;
  }

  .main {
    margin-left: 0;
  }

  .kpis {
    grid-template-columns: repeat(2,1fr);
  }

  .filters {
    grid-template-columns: 1fr 1fr;
  }
}
/* GOVBID V2.1 VISUAL POLISH */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 1px 0 rgba(255,255,255,.04);
}

.global-search {
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
}

.welcome {
  position: relative;
  overflow: hidden;
  padding: 34px 36px;
}

.welcome::after {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  right: -90px;
  top: -120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16,92,168,.12), transparent 70%);
  pointer-events: none;
}

.welcome > * {
  position: relative;
  z-index: 1;
}

.welcome h1 {
  font-size: 31px;
  letter-spacing: -.5px;
}

.welcome-quote {
  max-width: 280px;
  font-size: 16px;
  color: #3e5873;
}

.kpis article {
  min-width: 0;
}

.kpis strong {
  font-size: 25px;
  line-height: 1.15;
  white-space: nowrap;
}

#kpiValue {
  font-size: 22px;
}

.sidebar nav a {
  min-height: 46px;
  font-size: 14px;
  font-weight: 500;
}

.sidebar nav a span {
  line-height: 1.2;
}

.sidebar nav a.active {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.03);
}

.workspace {
  align-items: start;
}

.search-panel {
  overflow: hidden;
}

.filters {
  grid-template-columns: minmax(150px,1.25fr) minmax(120px,1fr) minmax(120px,1fr) auto;
  align-items: center;
}

.filters > * {
  min-width: 0;
  width: 100%;
}

.secondary {
  height: 42px;
  white-space: nowrap;
}

.insight-card {
  box-shadow: 0 4px 14px rgba(32,60,90,.04);
}

.tender-card {
  transition: transform .18s ease, box-shadow .18s ease;
}

.tender-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 18px rgba(32,60,90,.07);
}

@media(max-width:1280px) {
  .kpis strong {
    font-size: 23px;
  }

  #kpiValue {
    font-size: 20px;
  }

  .workspace {
    grid-template-columns: minmax(0,1fr) 295px;
  }

  .filters {
    grid-template-columns: 1fr 1fr;
  }

  .secondary {
    grid-column: span 2;
  }
}

@media(max-width:950px) {
  .welcome-quote {
    display: none;
  }

  .kpis {
    grid-template-columns: repeat(2,1fr);
  }
}
/* GOVBID AGENCY INTELLIGENCE V1 */

.agency-section {
  margin-top: 26px;
}

.agency-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.agency-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 3px 10px rgba(31,60,90,.04);
}

.agency-card h3 {
  margin: 0 0 10px;
  font-size: 16px;
  color: #0d3158;
}

.agency-value {
  font-size: 20px;
  font-weight: 800;
  color: #0a3868;
  margin-bottom: 10px;
}

.agency-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 12px;
}

@media(max-width:900px) {
  .agency-grid {
    grid-template-columns: 1fr;
  }
}
/* GOVBID WINNER INTELLIGENCE V1 */

.winner-section {
  margin-top: 26px;
}

.winner-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.winner-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 3px 10px rgba(31,60,90,.04);
}

.winner-card h3 {
  margin: 0 0 10px;
  font-size: 16px;
  color: #0d3158;
}

.winner-value {
  font-size: 20px;
  font-weight: 800;
  color: #0a3868;
  margin-bottom: 10px;
}

.winner-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 12px;
}

.winner-tin {
  margin-top: 8px;
  font-size: 11px;
  color: #8a98aa;
}

@media(max-width:900px) {
  .winner-grid {
    grid-template-columns: 1fr;
  }
}
/* GOVBID RISK INTELLIGENCE V1 */

.risk-section {
  margin-top: 26px;
}

.risk-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.risk-summary-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 15px;
  box-shadow: 0 3px 10px rgba(31,60,90,.04);
}

.risk-summary-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.risk-summary-card strong {
  display: block;
  margin-top: 7px;
  font-size: 22px;
  color: #0a3868;
}

.risk-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.risk-panel {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
}

.risk-panel h3 {
  margin: 0;
  font-size: 16px;
  color: #0d3158;
}

.risk-panel > p {
  margin: 5px 0 14px;
  color: var(--muted);
  font-size: 12px;
}

.risk-row {
  padding: 10px 0;
  border-top: 1px solid var(--border);
}

.risk-row:first-child {
  border-top: 0;
}

.risk-row strong {
  display: block;
  font-size: 13px;
  color: #183550;
}

.risk-row span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.risk-disclaimer {
  margin-top: 12px;
  padding: 11px 13px;
  border-radius: 8px;
  background: #fff8e8;
  border: 1px solid #f1dfaf;
  color: #755d1d;
  font-size: 11px;
  line-height: 1.5;
}

@media(max-width:1100px) {
  .risk-summary {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media(max-width:850px) {
  .risk-grid {
    grid-template-columns: 1fr;
  }
}

@media(max-width:600px) {
  .risk-summary {
    grid-template-columns: 1fr;
  }
}

/* GOVBID AI INTELLIGENCE V1 */

.ai-intelligence-section {
  margin-top: 24px;
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  background:
    linear-gradient(
      145deg,
      rgba(15, 23, 42, 0.96),
      rgba(17, 24, 39, 0.92)
    );
  scroll-margin-top: 90px;
}

.ai-intelligence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.ai-intelligence-card {
  min-height: 150px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.ai-intelligence-card:hover {
  transform: translateY(-2px);
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.055);
}

.ai-intelligence-card strong {
  display: block;
  margin-top: 10px;
  font-size: 18px;
  line-height: 1.35;
}

.ai-intelligence-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.ai-intelligence-note {
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .ai-intelligence-grid {
    grid-template-columns: 1fr;
  }
}


/* GOVBID AI INTELLIGENCE VISUAL POLISH V1 */

.ai-intelligence-section {
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.14), transparent 38%),
    linear-gradient(145deg, #10233d, #14263f);
  border-color: rgba(96, 165, 250, 0.22);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
}

.ai-intelligence-section .result-header h2 {
  color: #f8fafc;
}

.ai-intelligence-section .eyebrow {
  color: #60a5fa;
}

.ai-intelligence-card {
  background: rgba(255, 255, 255, 0.075);
  border-color: rgba(148, 163, 184, 0.22);
}

.ai-intelligence-card:hover {
  background: rgba(255, 255, 255, 0.105);
  border-color: rgba(96, 165, 250, 0.42);
}

.ai-intelligence-card strong {
  color: #f8fafc;
  font-weight: 700;
}

.ai-intelligence-card p {
  color: #cbd5e1;
}

.ai-intelligence-note {
  color: #94a3b8;
  border-top-color: rgba(148, 163, 184, 0.18);
}

.ai-intelligence-section .ai-badge {
  background: #eef6ff;
  color: #0756a6;
}


/* GOVBID PROJECT DETAIL INTELLIGENCE V1 */

.project-detail-overlay[hidden] {
  display: none;
}

.project-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.project-detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(6px);
}

.project-detail-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(720px, 92vw);
  height: 100%;
  overflow-y: auto;
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 34%),
    linear-gradient(180deg, #0f172a 0%, #111827 100%);
  border-left: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: -24px 0 60px rgba(0, 0, 0, 0.35);
}

.project-detail-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 30px 22px;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.project-detail-eyebrow {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #93c5fd;
}

.project-detail-header h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.45;
  color: #f8fafc;
}

.project-detail-header p {
  margin: 8px 0 0;
  color: #94a3b8;
}

.project-detail-close {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: #f8fafc;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.project-detail-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.project-detail-body {
  padding: 28px 30px 40px;
}

.project-detail-loading {
  padding: 36px 0;
  text-align: center;
  color: #94a3b8;
}

@media (max-width: 720px) {
  .project-detail-panel {
    width: 100%;
  }

  .project-detail-header,
  .project-detail-body {
    padding-left: 20px;
    padding-right: 20px;
  }
}



/* GOVBID PROJECT DETAIL CONTENT V1 */
.tender-card-clickable{cursor:pointer;transition:transform .18s ease,border-color .18s ease,background .18s ease}.tender-card-clickable:hover{transform:translateY(-2px);border-color:rgba(96,165,250,.38)}.project-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.project-detail-stat,.project-detail-section{border:1px solid rgba(148,163,184,.14);background:rgba(255,255,255,.045);border-radius:16px}.project-detail-stat{padding:18px}.project-detail-stat span,.project-detail-info span{display:block;margin-bottom:6px;font-size:12px;color:#94a3b8}.project-detail-stat strong{color:#f8fafc;font-size:19px}.project-detail-section{margin-top:18px;padding:20px}.project-detail-section h3{margin:0 0 16px;color:#f8fafc}.project-detail-info{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.project-detail-info strong{color:#e2e8f0;font-size:14px}.project-contract-list{display:grid;gap:10px}.project-contract-row{display:flex;justify-content:space-between;gap:18px;padding:14px;border-radius:12px;background:rgba(255,255,255,.045)}.project-contract-row strong,.project-contract-row span{color:#f8fafc}.project-contract-row small{display:block;margin-top:5px;color:#94a3b8}.project-risk-box{border-color:rgba(251,191,36,.22)}.project-risk-label{display:block;margin-bottom:7px;color:#fbbf24;font-size:11px;font-weight:700;letter-spacing:.1em}.project-risk-box strong{color:#f8fafc}.project-risk-box p{margin:10px 0 0;color:#94a3b8;line-height:1.65}.project-detail-empty{padding:18px;color:#94a3b8;text-align:center}@media(max-width:560px){.project-detail-grid,.project-detail-info{grid-template-columns:1fr}}

/* GOVBID OPPORTUNITY SEARCH V3 */

.opportunity-search-v3 {
  background: #ffffff;
  border: 1px solid #e8edf5;
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 14px 40px rgba(27, 46, 94, 0.07);
  margin-bottom: 24px;
}

.opportunity-search-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.opportunity-eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef4ff;
  color: #3569d4;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  margin-bottom: 10px;
}

.opportunity-search-head h1 {
  margin: 0;
  color: #17233c;
  font-size: clamp(24px, 2.3vw, 34px);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.opportunity-search-head p {
  margin: 10px 0 0;
  max-width: 720px;
  color: #73809a;
  font-size: 14px;
  line-height: 1.8;
}

.opportunity-live-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: #f3fbf7;
  border: 1px solid #dff1e7;
  color: #34805c;
  font-size: 12px;
  font-weight: 700;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #43b778;
  box-shadow: 0 0 0 5px rgba(67,183,120,.12);
}

.opportunity-main-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 8px;
  background: #f7f9fc;
  border: 1px solid #e6ebf3;
  border-radius: 18px;
}

.opportunity-search-input {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
}

.opportunity-search-icon {
  color: #8190aa;
  font-size: 24px;
  line-height: 1;
}

.opportunity-search-input input {
  width: 100%;
  height: 50px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #1e2a44;
  font: inherit;
  font-size: 15px;
}

.opportunity-search-input input::placeholder {
  color: #9ca8ba;
}

.opportunity-search-button {
  min-width: 140px;
  height: 50px;
  padding: 0 22px;
  border: 0;
  border-radius: 13px;
  background: #3166d5;
  color: #ffffff;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(49,102,213,.18);
  transition: transform .18s ease, box-shadow .18s ease;
}

.opportunity-search-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(49,102,213,.24);
}

.opportunity-filter-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 24px 0 12px;
  color: #53617a;
  font-size: 13px;
  font-weight: 800;
}

.opportunity-clear-button {
  border: 0;
  background: transparent;
  color: #6f7d94;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 7px 10px;
  border-radius: 9px;
}

.opportunity-clear-button:hover {
  background: #f3f6fa;
  color: #3166d5;
}

.opportunity-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.opportunity-field {
  min-width: 0;
}

.opportunity-field-wide {
  grid-column: span 2;
}

.opportunity-field label {
  display: block;
  margin: 0 0 7px 2px;
  color: #7b879d;
  font-size: 11px;
  font-weight: 700;
}

.opportunity-field select,
.opportunity-field input {
  width: 100%;
  height: 44px;
  box-sizing: border-box;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  color: #26334d;
  padding: 0 12px;
  outline: 0;
  font: inherit;
  font-size: 13px;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.opportunity-field select:focus,
.opportunity-field input:focus {
  border-color: #7fa1e8;
  box-shadow: 0 0 0 3px rgba(49,102,213,.08);
}

.budget-input-wrap {
  position: relative;
}

.budget-input-wrap input {
  padding-right: 48px;
}

.budget-input-wrap span {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  color: #9ba6b6;
  font-size: 11px;
  pointer-events: none;
}

.opportunity-search-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #edf1f6;
}

.opportunity-result-summary {
  display: flex;
  align-items: center;
  gap: 11px;
}

.result-summary-icon {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: #eef4ff;
  color: #3166d5;
  font-size: 14px;
  font-weight: 900;
}

.opportunity-result-summary > div:last-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.opportunity-result-summary span {
  color: #8995a9;
  font-size: 11px;
}

.opportunity-result-summary strong {
  color: #1d2b45;
  font-size: 14px;
}

.opportunity-hint {
  color: #9aa5b7;
  font-size: 11px;
  text-align: right;
}

@media (max-width: 1050px) {
  .opportunity-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .opportunity-field-wide {
    grid-column: span 1;
  }
}

@media (max-width: 720px) {
  .opportunity-search-v3 {
    padding: 20px;
    border-radius: 20px;
  }

  .opportunity-search-head {
    flex-direction: column;
  }

  .opportunity-main-search {
    grid-template-columns: 1fr;
  }

  .opportunity-search-button {
    width: 100%;
  }

  .opportunity-filter-grid {
    grid-template-columns: 1fr;
  }

  .opportunity-search-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .opportunity-hint {
    text-align: left;
  }
}

/* GOVBID OPPORTUNITY CARD V1 START */

.opportunity-card {
  background: #ffffff;
  border: 1px solid #dde5ef;
  border-radius: 18px;
  padding: 22px;
  margin-bottom: 16px;
  box-shadow: 0 6px 22px rgba(16, 45, 78, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.opportunity-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(16, 45, 78, 0.10);
}

.opportunity-card-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 24px;
  align-items: start;
}

.opportunity-card-main {
  min-width: 0;
}

.opportunity-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.opportunity-status,
.opportunity-days {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.opportunity-status.opportunity-open {
  background: #edf8f2;
  color: #16724b;
}

.opportunity-status.opportunity-soon {
  background: #fff5df;
  color: #996711;
}

.opportunity-status.opportunity-urgent {
  background: #fff0ef;
  color: #b13b34;
}

.opportunity-days {
  background: #f2f6fb;
  color: #47627e;
}

.opportunity-days.opportunity-soon {
  background: #fff5df;
  color: #996711;
}

.opportunity-days.opportunity-urgent {
  background: #fff0ef;
  color: #b13b34;
}

.opportunity-title {
  margin: 0 0 12px;
  color: #102d4e;
  font-size: 18px;
  line-height: 1.45;
  font-weight: 750;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.opportunity-agency {
  display: flex;
  gap: 7px;
  align-items: flex-start;
  margin-bottom: 9px;
  color: #60758d;
  font-size: 13px;
  line-height: 1.5;
}

.opportunity-meta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  color: #71839a;
  font-size: 12px;
}

.opportunity-method {
  background: #f4f7fb;
  border-radius: 8px;
  padding: 5px 8px;
}

.opportunity-project-id {
  padding: 5px 0;
}

.opportunity-value {
  text-align: right;
  padding-top: 4px;
}

.opportunity-value span {
  display: block;
  color: #8291a5;
  font-size: 11px;
  margin-bottom: 4px;
}

.opportunity-value strong {
  display: block;
  color: #0f3a68;
  font-size: 22px;
  line-height: 1.25;
  white-space: nowrap;
}

.opportunity-decision-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid #edf1f5;
  border-bottom: 1px solid #edf1f5;
  margin-top: 18px;
}

.opportunity-decision-item {
  padding: 14px 12px;
  min-width: 0;
}

.opportunity-decision-item + .opportunity-decision-item {
  border-left: 1px solid #edf1f5;
}

.opportunity-decision-item span {
  display: block;
  color: #8796a8;
  font-size: 11px;
  margin-bottom: 4px;
}

.opportunity-decision-item strong {
  display: block;
  color: #253d59;
  font-size: 13px;
  line-height: 1.4;
}

.opportunity-decision-item strong.opportunity-pending {
  color: #9aa6b5;
  font-weight: 600;
}

.opportunity-card-footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding-top: 16px;
}

.opportunity-source-note {
  color: #95a1b0;
  font-size: 11px;
}

.opportunity-analyze-button {
  border: 0;
  border-radius: 10px;
  padding: 10px 16px;
  background: #e8eef6;
  color: #7a899b;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: not-allowed;
  display: inline-flex;
  gap: 9px;
  align-items: center;
}

@media (max-width: 760px) {

  .opportunity-card-top {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .opportunity-value {
    text-align: left;
  }

  .opportunity-decision-bar {
    grid-template-columns: repeat(2, 1fr);
  }

  .opportunity-decision-item:nth-child(3) {
    border-left: 0;
    border-top: 1px solid #edf1f5;
  }

  .opportunity-decision-item:nth-child(4) {
    border-top: 1px solid #edf1f5;
  }

  .opportunity-card-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* GOVBID OPPORTUNITY CARD V1 END */


/* GOVBID OPPORTUNITY CARD LAYOUT FIX */
.tender-card.opportunity-card {
  display: block;
  grid-template-columns: none;
  gap: 0;
  width: 100%;
  min-width: 0;
  padding: 22px;
}

.tender-card.opportunity-card > * {
  min-width: 0;
}

.tender-card.opportunity-card h3 {
  margin: 0 0 12px;
  font-size: 18px;
  line-height: 1.45;
}


/* GOVBID OPPORTUNITY DETAIL V1 */

.opportunity-detail-v1 {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.opportunity-detail-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.opportunity-detail-stat {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  padding: 16px;
}

.opportunity-detail-stat span {
  display: block;
  font-size: 12px;
  color: #64748b;
  margin-bottom: 6px;
}

.opportunity-detail-stat strong {
  font-size: 18px;
  color: #0f2744;
}

.opportunity-detail-section {
  background: #ffffff;
  border-radius: 18px;
  padding: 20px;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.opportunity-detail-section h3 {
  margin: 0 0 16px;
  font-size: 18px;
  color: #0f2744;
}

.opportunity-readiness-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.opportunity-readiness-item {
  background: #f8fafc;
  border-radius: 14px;
  padding: 16px;
  border: 1px solid #e2e8f0;
}

.opportunity-readiness-item span {
  display: block;
  font-size: 12px;
  color: #64748b;
  margin-bottom: 6px;
}

.opportunity-readiness-item strong {
  display: block;
  color: #0f2744;
  margin-bottom: 6px;
}

.opportunity-readiness-item small {
  color: #64748b;
  line-height: 1.5;
}

.opportunity-evidence-item {
  border-top: 1px solid #e2e8f0;
  padding: 12px 0;
}

.opportunity-evidence-item:first-of-type {
  border-top: 0;
}

.opportunity-evidence-item summary {
  cursor: pointer;
  font-weight: 600;
  color: #0f2744;
}

.opportunity-evidence-item p {
  margin: 10px 0 0;
  color: #475569;
  line-height: 1.7;
  font-size: 13px;
}

.opportunity-detail-next {
  background: #0f2744;
  color: #ffffff;
  border-radius: 18px;
  padding: 20px;
}

.opportunity-detail-next span {
  display: block;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 6px;
}

.opportunity-detail-next strong {
  display: block;
  font-size: 18px;
  margin-bottom: 6px;
}

.opportunity-detail-next p {
  margin: 0;
  opacity: 0.8;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .opportunity-detail-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .opportunity-readiness-grid {
    grid-template-columns: 1fr;
  }
}


/* GOVBID OPPORTUNITY ANALYZE BUTTON ACTIVE STATE */

.opportunity-analyze-button {
  background: #0f2744;
  color: #ffffff;
  border: 1px solid #0f2744;
  font-weight: 700;
  cursor: pointer;
  opacity: 1;
  box-shadow: 0 8px 18px rgba(15, 39, 68, 0.14);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.opportunity-analyze-button:hover {
  background: #16395f;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(15, 39, 68, 0.18);
}

.opportunity-analyze-button:active {
  transform: translateY(0);
}

.opportunity-analyze-button:disabled {
  background: #cbd5e1;
  color: #64748b;
  border-color: #cbd5e1;
  cursor: wait;
  box-shadow: none;
  opacity: 0.8;
}




/* GOVBID BRICK SEARCH THEME V1 */

.opportunity-search-v3 {
  background: #ffffff;
  border: 1px solid #eadfd9;
  border-radius: 24px;
  padding: 30px;
  box-shadow: 0 14px 40px rgba(35, 25, 20, 0.06);
}

.opportunity-eyebrow,
.panel-title .eyebrow {
  color: var(--brick);
  font-weight: 700;
  letter-spacing: .08em;
}

.opportunity-search-head h1,
.search-panel h2 {
  color: #171717;
}

.opportunity-live-badge {
  background: var(--brick-light);
  color: var(--brick-dark);
  border: 1px solid #efcabb;
}

.live-dot {
  background: var(--brick);
}

.opportunity-main-search {
  background: #faf8f6;
  border: 1px solid #e7ddd7;
  border-radius: 18px;
}

.opportunity-search-input input {
  color: #171717;
}

.opportunity-search-input input::placeholder {
  color: #918984;
}

.opportunity-search-button {
  background: var(--brick);
  color: #ffffff;
}

.opportunity-search-button:hover {
  background: var(--brick-dark);
  box-shadow: 0 10px 24px rgba(198, 90, 50, .22);
}

.opportunity-filter-title {
  color: #171717;
}

.opportunity-field label {
  color: #3a3532;
  font-weight: 600;
}

.opportunity-field select,
.opportunity-field input {
  background: #ffffff;
  color: #171717;
  border: 1px solid #ded5cf;
}

.opportunity-field select:focus,
.opportunity-field input:focus {
  outline: none;
  border-color: var(--brick);
  box-shadow: 0 0 0 3px rgba(198, 90, 50, .10);
}

.opportunity-clear-button {
  color: var(--brick-dark);
}

.opportunity-search-footer {
  border-top: 1px solid #eee6e1;
}

.result-summary-icon {
  background: var(--brick-light);
  color: var(--brick);
}

#smartSearchCount {
  color: var(--brick-dark);
}


/* GOVBID BRIGHT BRICK SHELL V1 */

.sidebar {
  background: linear-gradient(180deg, #fffdfb 0%, #f8f1eb 100%);
  color: #1a1715;
  border-right: 1px solid #e8d9cf;
  box-shadow: 8px 0 28px rgba(50, 30, 20, .04);
}

.brand {
  color: #1a1715;
}

.brand small,
.profile small,
.sidebar-bottom small {
  color: #8a7164;
}

.sidebar-intro {
  color: #684f43;
}

.sidebar nav a {
  color: #3d332e;
}

.sidebar nav a:hover {
  background: #fff1e9;
  color: #a94727;
}

.sidebar nav a.active {
  color: #ffffff;
  background: linear-gradient(135deg, #d85d30, #b94725);
  border-left: 4px solid #ffb07c;
  box-shadow: 0 7px 18px rgba(198, 90, 50, .18);
}

.sidebar-bottom {
  color: #695950;
}

.online-dot {
  background: #d85d30;
}

/* TOP BAR */

.topbar {
  background: rgba(255, 253, 251, .97);
  border-bottom: 1px solid #eaded7;
  box-shadow: 0 5px 18px rgba(55, 32, 20, .05);
}

.global-search {
  background: #ffffff;
  border: 1px solid #e4d8d1;
  box-shadow: none;
}

.global-search input {
  color: #1a1715;
}

.global-search input::placeholder {
  color: #96877f;
}

.profile {
  color: #1a1715;
}

.avatar {
  background: #c65a32;
  color: #ffffff;
}

/* WELCOME */

.welcome {
  background:
    linear-gradient(105deg, rgba(255,255,255,.98), rgba(255,244,236,.95)),
    linear-gradient(135deg, #ffffff, #f4dfd2);
  border-bottom: 1px solid #eaded7;
}

.welcome::after {
  background: radial-gradient(
    circle,
    rgba(198, 90, 50, .15),
    transparent 70%
  );
}

.welcome h1 {
  color: #1a1715;
}

.welcome p {
  color: #735f54;
}

.welcome-quote {
  color: #9f482a;
}

/* GENERAL BRIGHT SURFACE */

body {
  background: #f8f4f0;
}

.main {
  background: #f8f4f0;
}


/* GOVBID SEARCH FIRST LAYOUT V1 */

.workspace {
  grid-template-columns: minmax(0, 1fr) !important;
  max-width: 1500px;
  margin: 0 auto;
}

.content {
  width: 100%;
  min-width: 0;
}

.insights {
  width: 100%;
  margin-top: 24px;
}

/* Search is the primary workspace */
#smartSearch {
  width: 100%;
}

#smartSearch .search-panel {
  width: 100%;
}

#smartSearch .opportunity-search-v3 {
  width: 100%;
  max-width: none;
}


/* BUSINESS PROFILE V1 */

.business-profile-section {
  margin-top: 28px;
}

.business-profile-section .section-heading {
  margin-bottom: 18px;
}

.business-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.business-profile-grid label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.business-profile-grid label span {
  font-size: 13px;
  font-weight: 600;
  color: #5f5149;
}

.business-profile-grid input,
.business-profile-grid textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(116, 92, 78, .18);
  border-radius: 14px;
  background: #fff;
  padding: 13px 14px;
  font: inherit;
  color: #1f1a17;
  outline: none;
}

.business-profile-grid input:focus,
.business-profile-grid textarea:focus {
  border-color: rgba(159, 72, 42, .55);
  box-shadow: 0 0 0 3px rgba(159, 72, 42, .08);
}

.business-profile-grid textarea {
  resize: vertical;
}

.business-profile-wide {
  grid-column: 1 / -1;
}

.business-profile-actions {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
}

#saveBusinessProfile {
  border: 0;
  border-radius: 14px;
  padding: 12px 18px;
  font-weight: 700;
  cursor: pointer;
  background: #1f1a17;
  color: #fff;
}

@media (max-width: 820px) {
  .business-profile-grid {
    grid-template-columns: 1fr;
  }

  .business-profile-wide {
    grid-column: auto;
  }
}


/* MATCH SIGNAL UI V1 */

.opportunity-business-match,
.opportunity-budget-match {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
  font-size: 13px;
}

.opportunity-business-match span {
  font-weight: 700;
}

.opportunity-business-match strong,
.opportunity-budget-match strong {
  font-weight: 700;
}

.opportunity-business-match strong {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
}

.opportunity-budget-match {
  padding: 7px 10px;
  border-radius: 10px;
  width: fit-content;
}

.opportunity-budget-match.within {
  background: rgba(22, 163, 74, 0.08);
}

.opportunity-budget-match.below,
.opportunity-budget-match.above {
  background: rgba(234, 88, 12, 0.08);
}

.opportunity-budget-match span {
  font-weight: 800;
}


/* =========================================================
   GOVBID V3 — CLEAN PROFESSIONAL LAYOUT
   ========================================================= */

:root {
  --v3-navy: #0b2341;
  --v3-navy-2: #12375f;
  --v3-bg: #f4f7fb;
  --v3-card: #ffffff;
  --v3-line: #e3e9f1;
  --v3-text: #172033;
  --v3-muted: #687386;
  --v3-accent: #c99132;
}

/* PAGE */
body {
  background: var(--v3-bg);
  color: var(--v3-text);
}

/* SIDEBAR */
.sidebar {
  width: 210px !important;
  padding: 18px 14px !important;
  background: linear-gradient(
    180deg,
    #081d37 0%,
    #0b2b50 100%
  ) !important;
  color: #ffffff !important;
  border-right: 0 !important;
  box-shadow: none !important;
}

.sidebar .brand,
.sidebar .brand strong,
.sidebar a {
  color: #ffffff !important;
}

.sidebar .brand small,
.sidebar-intro,
.sidebar-bottom {
  color: rgba(255,255,255,.68) !important;
}

.main {
  margin-left: 210px !important;
  background: var(--v3-bg) !important;
}

/* TOP BAR */
.topbar {
  height: 58px !important;
  padding: 8px 24px !important;
  background: rgba(255,255,255,.98) !important;
  border-bottom: 1px solid var(--v3-line) !important;
  box-shadow: 0 2px 10px rgba(20,40,70,.04) !important;
}

.global-search {
  max-width: 680px !important;
  min-height: 40px;
  border: 1px solid #dce3ec !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}

/* HERO / WELCOME — COMPACT */
.welcome {
  padding: 22px 28px 18px !important;
  min-height: 0 !important;
}

.welcome h1 {
  margin: 5px 0 5px !important;
  font-size: clamp(24px, 2vw, 32px) !important;
  line-height: 1.25 !important;
}

.welcome p {
  margin: 0 !important;
  line-height: 1.55 !important;
}

/* KPI */
.kpis {
  padding: 0 28px 16px !important;
  grid-template-columns: repeat(4, minmax(0,1fr)) !important;
  gap: 12px !important;
}

.kpis article {
  padding: 14px 16px !important;
  min-height: 92px;
  border-radius: 12px !important;
  border: 1px solid var(--v3-line) !important;
  box-shadow: 0 3px 12px rgba(25,50,80,.04) !important;
}

.kpis strong {
  font-size: 22px !important;
  line-height: 1.15 !important;
}

/* MAIN WORKSPACE */
.workspace {
  display: block !important;
  width: 100% !important;
  max-width: 1480px !important;
  margin: 0 auto !important;
  padding: 0 28px 32px !important;
}

.content {
  width: 100% !important;
  min-width: 0 !important;
}

/* SEARCH */
.search-panel {
  padding: 18px !important;
  border-radius: 14px !important;
  border: 1px solid var(--v3-line) !important;
  box-shadow: 0 4px 18px rgba(25,50,80,.04) !important;
}

.opportunity-search-v3 {
  padding: 20px !important;
  margin-bottom: 16px !important;
  border: 1px solid var(--v3-line) !important;
  border-radius: 14px !important;
  box-shadow: none !important;
}

.opportunity-search-head {
  margin-bottom: 16px !important;
}

.opportunity-search-head h2,
.opportunity-search-v3 h2 {
  font-size: 22px !important;
  line-height: 1.35 !important;
}

/* RESULT HEADER */
.result-header {
  margin: 18px 0 12px !important;
}

.result-header h2 {
  font-size: 20px !important;
}

/* OPPORTUNITY CARDS */
.tender-card,
.tender-card.opportunity-card {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  padding: 18px !important;
  margin-bottom: 10px !important;
  background: #ffffff !important;
  border: 1px solid var(--v3-line) !important;
  border-radius: 12px !important;
  box-shadow: 0 2px 8px rgba(25,50,80,.035) !important;
}

.tender-card h3,
.tender-card.opportunity-card h3 {
  margin: 5px 0 9px !important;
  font-size: 16px !important;
  line-height: 1.5 !important;
  color: var(--v3-text) !important;
}

.tender-card p {
  line-height: 1.55 !important;
}

/* AI DECISION */
.ai-decision {
  margin: 10px 0 !important;
  padding: 11px 13px !important;
  background: #f7f9fc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 9px !important;
}

.ai-decision p {
  margin: 5px 0 0 !important;
  font-size: 13px !important;
}

/* RESPONSIVE */
@media (max-width: 1100px) {
  .sidebar {
    width: 190px !important;
  }

  .main {
    margin-left: 190px !important;
  }

  .kpis {
    grid-template-columns: repeat(2, minmax(0,1fr)) !important;
  }
}

@media (max-width: 760px) {
  .sidebar {
    display: none !important;
  }

  .main {
    margin-left: 0 !important;
  }

  .welcome,
  .kpis,
  .workspace {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .kpis {
    grid-template-columns: 1fr !important;
  }

  .topbar {
    padding: 8px 14px !important;
  }
}


/* =========================================================
   GOVBID V3 — BUSINESS PROFILE POLISH
   ========================================================= */

.business-profile-section {
  max-width: 1120px !important;
  margin: 0 auto !important;
  padding: 28px 32px 40px !important;
}

/* ลดพื้นที่ว่างด้านบน */
.business-profile-section > :first-child {
  margin-top: 0 !important;
}

/* Heading */
.business-profile-section h1,
.business-profile-section h2 {
  max-width: 760px;
  margin-top: 8px !important;
  margin-bottom: 10px !important;
  line-height: 1.3 !important;
}

.business-profile-section p {
  max-width: 780px;
  line-height: 1.65 !important;
}

/* Form */
.business-profile-section form {
  width: 100%;
  max-width: 100%;
}

/* Labels */
.business-profile-section label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: #344054;
}

/* Inputs */
.business-profile-section input,
.business-profile-section select,
.business-profile-section textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid #d9e0e8;
  border-radius: 10px;
  background: #ffffff;
  font: inherit;
  color: #172033;
  outline: none;
}

.business-profile-section input,
.business-profile-section select {
  min-height: 44px;
  padding: 9px 13px;
}

.business-profile-section textarea {
  min-height: 92px;
  padding: 12px 14px;
  resize: vertical;
  line-height: 1.55;
}

.business-profile-section input:focus,
.business-profile-section select:focus,
.business-profile-section textarea:focus {
  border-color: #8da5bf;
  box-shadow: 0 0 0 3px rgba(36,82,125,.08);
}

/* ทำช่องต่าง ๆ อ่านง่ายขึ้น */
.business-profile-section input::placeholder,
.business-profile-section textarea::placeholder {
  color: #98a2b3;
}

/* Budget number fields */
#businessBudgetMin,
#businessBudgetMax {
  min-height: 44px !important;
}

/* Advanced options */
.business-profile-section details {
  margin-top: 20px;
}

.business-profile-section summary {
  cursor: pointer;
  font-weight: 600;
  color: #344054;
}

/* Desktop */
@media (min-width: 900px) {
  .business-profile-section {
    padding-left: 38px !important;
    padding-right: 38px !important;
  }
}

/* Mobile */
@media (max-width: 760px) {
  .business-profile-section {
    padding: 22px 16px 32px !important;
  }
}


/* =========================================================
   GOVBID V3 — BUSINESS PROFILE FINAL
   ========================================================= */

.business-profile-section {
  max-width: 1040px !important;
}

/* Main form grid */
.business-profile-grid {
  display: grid !important;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr) !important;
  gap: 18px 16px !important;
  align-items: start !important;
}

.business-profile-wide {
  grid-column: 1 / -1 !important;
}

/* Budget */
.business-budget-inputs {
  display: grid !important;
  grid-template-columns: minmax(0,1fr) auto minmax(0,1fr) auto !important;
  gap: 10px !important;
  align-items: end !important;
  width: 100% !important;
}

.business-budget-inputs label {
  margin: 0 !important;
}

.business-budget-inputs label > span {
  display: block !important;
  margin: 0 0 7px !important;
  white-space: nowrap !important;
}

.business-budget-separator {
  display: flex !important;
  align-items: center !important;
  height: 44px !important;
  padding: 0 2px 1px !important;
  color: #667085 !important;
  font-size: 13px !important;
  white-space: nowrap !important;
}

/* Buttons */
.business-profile-section button {
  min-height: 42px !important;
  padding: 9px 16px !important;
  border-radius: 9px !important;
  border: 1px solid #cfd8e3 !important;
  background: #ffffff !important;
  color: #24364b !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: .18s ease !important;
}

.business-profile-section button:hover {
  border-color: #9babbc !important;
  background: #f8fafc !important;
  transform: translateY(-1px);
}

#searchAiOpportunities {
  background: #153a63 !important;
  border-color: #153a63 !important;
  color: #ffffff !important;
}

#searchAiOpportunities:hover {
  background: #0f2f52 !important;
}

#saveBusinessProfile {
  background: #172033 !important;
  border-color: #172033 !important;
  color: #ffffff !important;
}

/* Better spacing before actions */
.business-profile-section details {
  margin-bottom: 18px !important;
}

/* Mobile */
@media (max-width: 820px) {

  .business-profile-grid {
    grid-template-columns: 1fr !important;
  }

  .business-profile-wide {
    grid-column: auto !important;
  }

  .business-budget-inputs {
    grid-template-columns: 1fr !important;
  }

  .business-budget-separator {
    height: auto !important;
  }

  .business-profile-section button {
    width: 100% !important;
    margin-bottom: 8px !important;
  }
}


/* =========================================================
   GOVBID V3 — THAI TYPOGRAPHY
   ========================================================= */

html,
body {
  font-family: "Leelawadee UI", Tahoma, Arial, sans-serif !important;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea,
option {
  font-family: "Leelawadee UI", Tahoma, Arial, sans-serif !important;
}

h1,
h2,
h3,
h4,
h5,
h6,
label,
span,
p,
a {
  font-family: inherit;
}


/* =========================================================
   GOVBID V3 — SEARCH WORKSPACE FINAL LAYOUT
   ========================================================= */

/* Remove duplicated outer heading */
.search-panel {
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.search-panel > .panel-title {
  display: none !important;
}

/* Main search card */
.opportunity-search-v3 {
  padding: 18px 20px !important;
  margin-bottom: 18px !important;
  border-radius: 14px !important;
  border: 1px solid #e1e7ef !important;
  background: #ffffff !important;
  box-shadow: 0 4px 16px rgba(20,45,75,.04) !important;
}

/* Header */
.opportunity-search-head {
  align-items: center !important;
  margin-bottom: 14px !important;
  gap: 20px !important;
}

.opportunity-search-head h1 {
  margin: 3px 0 4px !important;
  font-size: 21px !important;
  line-height: 1.35 !important;
}

.opportunity-search-head p {
  margin: 0 !important;
  max-width: 820px !important;
  font-size: 13px !important;
  line-height: 1.55 !important;
  color: #667085 !important;
}

.opportunity-eyebrow {
  font-size: 11px !important;
  letter-spacing: .08em !important;
}

.opportunity-live-badge {
  flex: 0 0 auto !important;
  white-space: nowrap !important;
  font-size: 12px !important;
}

/* Main keyword search */
.opportunity-main-search {
  display: grid !important;
  grid-template-columns: minmax(0,1fr) 140px !important;
  gap: 10px !important;
  margin-top: 14px !important;
}

.opportunity-search-input {
  min-height: 46px !important;
  border-radius: 10px !important;
}

.opportunity-search-input input {
  min-height: 44px !important;
  font-size: 14px !important;
}

.opportunity-search-button {
  min-height: 46px !important;
  padding: 0 18px !important;
  border-radius: 10px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

/* Filter title */
.opportunity-filter-title {
  margin: 16px 0 9px !important;
  align-items: center !important;
}

.opportunity-filter-title > span {
  font-size: 13px !important;
  font-weight: 700 !important;
}

/* Filters */
.opportunity-filter-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0,1fr)) !important;
  gap: 11px 12px !important;
  align-items: end !important;
}

.opportunity-field,
.opportunity-field-wide {
  min-width: 0 !important;
}

.opportunity-field-wide {
  grid-column: span 2 !important;
}

.opportunity-field label {
  display: block !important;
  margin: 0 0 5px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #475467 !important;
  line-height: 1.35 !important;
}

.opportunity-field select,
.opportunity-field > input,
.budget-input-wrap {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 42px !important;
  box-sizing: border-box !important;
  border-radius: 9px !important;
}

.opportunity-field select,
.opportunity-field > input {
  padding: 8px 10px !important;
  font-size: 13px !important;
}

.budget-input-wrap {
  display: flex !important;
  align-items: center !important;
}

.budget-input-wrap input {
  min-width: 0 !important;
  width: 100% !important;
  height: 40px !important;
  padding: 8px 8px !important;
}

.budget-input-wrap span {
  flex: 0 0 auto !important;
  padding: 0 9px !important;
  font-size: 11px !important;
  color: #98a2b3 !important;
}

/* Footer */
.opportunity-search-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;
  margin-top: 14px !important;
  padding-top: 12px !important;
  border-top: 1px solid #edf1f5 !important;
}

.opportunity-result-summary {
  min-width: 0 !important;
}

.opportunity-result-summary strong {
  font-size: 15px !important;
}

.opportunity-hint {
  font-size: 12px !important;
  color: #98a2b3 !important;
  text-align: right !important;
}

/* Results closer to search */
.result-header {
  margin: 14px 0 10px !important;
}

.result-header h2 {
  margin: 3px 0 0 !important;
  font-size: 21px !important;
}

#resultCount {
  font-size: 13px !important;
}

/* Responsive */
@media (max-width: 1180px) {
  .opportunity-filter-grid {
    grid-template-columns: repeat(3, minmax(0,1fr)) !important;
  }

  .opportunity-field-wide {
    grid-column: span 2 !important;
  }
}

@media (max-width: 850px) {
  .opportunity-filter-grid {
    grid-template-columns: repeat(2, minmax(0,1fr)) !important;
  }

  .opportunity-main-search {
    grid-template-columns: 1fr !important;
  }

  .opportunity-field-wide {
    grid-column: span 2 !important;
  }

  .opportunity-search-footer {
    align-items: flex-start !important;
    flex-direction: column !important;
  }

  .opportunity-hint {
    text-align: left !important;
  }
}


/* =========================================================
   GOVBID V3 — VISUAL POLISH
   ========================================================= */

body {
  background:
    radial-gradient(circle at 85% 5%, rgba(225, 109, 56, .08), transparent 28%),
    radial-gradient(circle at 20% 0%, rgba(28, 79, 128, .08), transparent 30%),
    #f4f7fb !important;
}

/* Sidebar */
.sidebar {
  background:
    linear-gradient(180deg, #071b33 0%, #0b2d52 100%) !important;
  box-shadow: 10px 0 28px rgba(13, 35, 60, .08) !important;
}

.sidebar nav a {
  border-radius: 10px !important;
  transition: .18s ease !important;
}

.sidebar nav a:hover {
  background: rgba(255,255,255,.08) !important;
}

.sidebar nav a.active {
  background: linear-gradient(135deg, #d4572d, #c94825) !important;
  box-shadow: 0 8px 20px rgba(199,72,37,.24) !important;
}

/* Topbar */
.topbar {
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,.95) !important;
}

/* Search / Profile cards */
.opportunity-search-v3,
.business-profile-section,
.tender-card {
  background:
    linear-gradient(180deg, #ffffff 0%, #fcfdff 100%) !important;
}

/* Main card elevation */
.opportunity-search-v3 {
  box-shadow:
    0 12px 36px rgba(25,50,80,.06),
    0 1px 2px rgba(25,50,80,.04) !important;
}

/* Labels */
.eyebrow,
.opportunity-eyebrow {
  color: #cf542c !important;
  font-weight: 800 !important;
}

/* Search button */
.opportunity-search-button {
  background: linear-gradient(135deg, #d75a30, #c84926) !important;
  color: white !important;
  border: none !important;
  box-shadow: 0 8px 20px rgba(200,73,38,.20) !important;
}

.opportunity-search-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(200,73,38,.26) !important;
}

/* Search inputs */
.opportunity-field select,
.opportunity-field input,
.opportunity-search-input {
  background: #fff !important;
  border-color: #dfe6ef !important;
  transition: .15s ease !important;
}

.opportunity-field select:focus,
.opportunity-field input:focus,
.opportunity-search-input:focus-within {
  border-color: #8aa6c4 !important;
  box-shadow: 0 0 0 3px rgba(57,103,151,.08) !important;
}

/* Result summary */
.opportunity-result-summary {
  padding: 8px 12px !important;
  border-radius: 10px !important;
  background: #fff7f2 !important;
}

.result-summary-icon {
  background: #ffe9dc !important;
  color: #d4572d !important;
}

/* Result cards */
.tender-card {
  border: 1px solid #e3e8ef !important;
  box-shadow: 0 4px 14px rgba(20,45,75,.04) !important;
  transition: .18s ease !important;
}

.tender-card:hover {
  transform: translateY(-2px);
  border-color: #ccd8e6 !important;
  box-shadow: 0 12px 28px rgba(20,45,75,.08) !important;
}

/* Headings */
h1,
h2,
h3 {
  color: #13233a !important;
}

/* Small status */
.ai-badge,
.opportunity-live-badge {
  border-radius: 999px !important;
  background: #fff5ee !important;
  color: #c9522c !important;
  border: 1px solid #f1d4c6 !important;
}

/* Section separation */
.result-header {
  padding-top: 4px !important;
}

.result-header h2 {
  font-weight: 800 !important;
}

/* Smooth buttons */
button {
  transition:
    transform .16s ease,
    box-shadow .16s ease,
    background .16s ease !important;
}

/* subtle scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f4f8;
}

::-webkit-scrollbar-thumb {
  background: #c5cfdb;
  border-radius: 999px;
  border: 2px solid #f1f4f8;
}


/* GOVBID V3 — PROJECT DETAIL + SERVICE CTA */

.project-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.project-detail-stat,
.project-detail-section {
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.project-detail-stat {
  padding: 18px;
}

.project-detail-stat span,
.project-detail-info span {
  display: block;
  font-size: 12px;
  color: #64748b;
  margin-bottom: 6px;
}

.project-detail-stat strong {
  display: block;
  font-size: 16px;
  color: #0f172a;
  line-height: 1.45;
}

.project-detail-section {
  padding: 22px;
  margin-top: 16px;
}

.project-detail-section h3 {
  margin: 0 0 16px;
  font-size: 17px;
  color: #0f172a;
}

.project-detail-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 20px;
}

.project-detail-info strong {
  display: block;
  font-size: 14px;
  color: #1e293b;
  line-height: 1.55;
}

.govbid-official-section {
  background:
    linear-gradient(135deg, rgba(248, 250, 252, 0.96), rgba(255, 247, 237, 0.96));
}

.govbid-official-section p {
  margin: 0 0 16px;
  color: #475569;
  line-height: 1.65;
}

.govbid-official-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  background: #0f172a;
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  transition: 0.18s ease;
}

.govbid-official-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
}

.govbid-official-link-unavailable {
  display: inline-flex;
  padding: 11px 14px;
  border-radius: 12px;
  background: #f8fafc;
  color: #64748b;
  font-size: 13px;
  border: 1px dashed #cbd5e1;
}

.govbid-service-box {
  overflow: hidden;
  border: 1px solid rgba(249, 115, 22, 0.18);
  background:
    radial-gradient(circle at top right, rgba(251, 146, 60, 0.16), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #fffaf5 100%);
}

.govbid-service-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.govbid-service-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #fff7ed;
  color: #ea580c;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.govbid-service-heading h3 {
  margin-bottom: 8px;
  font-size: 20px;
}

.govbid-service-heading p {
  margin: 0;
  color: #64748b;
  line-height: 1.6;
}

.govbid-service-price {
  min-width: 130px;
  text-align: right;
}

.govbid-service-price strong {
  display: block;
  font-size: 30px;
  line-height: 1;
  color: #ea580c;
}

.govbid-service-price span {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: #64748b;
}

.govbid-service-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.govbid-service-form-grid label {
  display: block;
}

.govbid-service-form-grid label > span {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
}

.govbid-service-form-grid input,
.govbid-service-form-grid select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #dbe2ea;
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
  outline: none;
  box-sizing: border-box;
}

.govbid-service-form-grid input:focus,
.govbid-service-form-grid select:focus {
  border-color: #fb923c;
  box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.12);
}

.govbid-service-submit {
  width: 100%;
  min-height: 48px;
  margin-top: 16px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(234, 88, 12, 0.20);
}

.govbid-service-submit:hover {
  transform: translateY(-1px);
}

.govbid-service-disclaimer {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: #64748b;
}

@media (max-width: 820px) {
  .project-detail-grid,
  .project-detail-info,
  .govbid-service-form-grid {
    grid-template-columns: 1fr;
  }

  .govbid-service-heading {
    flex-direction: column;
  }

  .govbid-service-price {
    text-align: left;
  }
}


/* GOVBID V3 — FINAL DETAIL HEADER FIX */

.opportunity-detail-header,
.opportunity-detail-modal header {
  color: #ffffff;
}

.opportunity-detail-header h1,
.opportunity-detail-header h2,
.opportunity-detail-header h3,
.opportunity-detail-title,
#opportunityDetailTitle {
  color: #ffffff !important;
  opacity: 1 !important;
}

.opportunity-detail-header p,
.opportunity-detail-header small,
.opportunity-detail-agency,
#opportunityDetailAgency {
  color: rgba(255,255,255,.78) !important;
  opacity: 1 !important;
}


/* GOVBID V3 — DETAIL TITLE CONTRAST VERIFIED */

#projectDetailTitle {
  color: #ffffff !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

#projectDetailAgency {
  color: rgba(255,255,255,.78) !important;
  opacity: 1 !important;
}


/* GOVBID V3 — SEARCH SORT LAYOUT FIX */

#sortFilter {
  width: 100% !important;
  display: block !important;
}

.opportunity-field:has(#sortFilter) {
  grid-column: auto !important;
  min-width: 0 !important;
}

@media (min-width: 1181px) {
  .opportunity-filter-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

