/* =========================================================
   Compras Abiertas – Sitio institucional (estilo FPAD)
   Sobrio, legible, alto contraste, compatible con gov/ONG
   ========================================================= */

:root{
  --bg:#F3F5F8;
  --card:#FFFFFF;
  --text:#0F172A;
  --muted:#475569;
  --border:#D9E1EC;
  --brand:#002B5C;     /* azul institucional */
  --brand2:#005A9E;    /* azul acento */
  --soft:#E8F0FA;      /* fondo suave */
  --danger:#C62828;
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
  --radius: 12px;
}

*{ box-sizing:border-box; }
body{
  margin:0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a{ color: var(--brand2); text-decoration:none; }
a:hover{ text-decoration:underline; }

.page-wrapper{
  max-width: 1120px;
  margin: 0 auto;
  padding: 26px 16px 44px;
}

/* =========================================================
   Header (Topbar) – institucional
   ========================================================= */
.topbar{
  background: var(--brand);
  color:#fff;
}

.topbar-inner{
  max-width:1120px;
  margin:0 auto;
  padding: 14px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 14px;
}

.brand{
  display:flex;
  align-items:center;
  gap: 12px;
}

.brand img{
  height: 40px;
  width:auto;
}

.brand-title{
  display:flex;
  flex-direction:column;
  line-height:1.1;
}

.brand-title strong{
  font-size: 16px;
  font-weight: 650;
}

.brand-title span{
  font-size: 12px;
  opacity: 0.9;
}

.nav{
  display:flex;
  align-items:center;
  gap: 14px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.nav a{
  color:#fff;
  font-size: 13px;
  opacity: 0.95;
  text-decoration: underline;
}

.nav a:hover{ opacity:1; }

/* =========================================================
   Botones – institucional
   ========================================================= */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 9px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration:none !important;
}

.btn-primary{
  background: var(--brand2);
  color:#fff;
}

.btn-secondary{
  background:#fff;
  color: var(--brand2);
  border-color: rgba(0,90,158,0.45);
}

.btn-ghost{
  background: transparent;
  color:#fff;
  border-color: rgba(255,255,255,0.35);
}

/* =========================================================
   Hero institucional
   ========================================================= */
.hero{
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 22px;
}

.hero h1{
  margin:0 0 8px 0;
  font-size: 28px;
  color: var(--brand);
}

.hero p{
  margin: 0 0 14px 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  max-width: 900px;
}

.hero-actions{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.kpi-row{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.kpi{
  background: var(--soft);
  border: 1px solid rgba(0,43,92,0.08);
  border-radius: 10px;
  padding: 12px 14px;
}

.kpi strong{
  display:block;
  font-size: 13px;
  color: var(--brand);
  margin-bottom: 4px;
}

.kpi span{
  display:block;
  font-size: 12px;
  color: var(--muted);
}

/* =========================================================
   Secciones / cards
   ========================================================= */
.section{
  margin-top: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  border-top: 3px solid var(--brand2);
}

.section h2{
  margin:0 0 8px 0;
  font-size: 18px;
  color: var(--brand);
}

.section p{
  margin:0;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.55;
}

.grid-3{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.mini{
  background:#fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 14px;
}

.mini .tag{
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.mini p{
  margin:0;
  font-size: 13px;
  color: var(--muted);
}

/* =========================================================
   Tabla
   ========================================================= */
.table-responsive{
  overflow:auto;
  margin-top: 10px;
}

table{
  width:100%;
  border-collapse: collapse;
  background:#fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow:hidden;
  min-width: 640px;
}

th, td{
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  vertical-align: top;
}

th{
  background: #E3EAF3;
  color: #334155;
  text-align:left;
  font-weight: 700;
}

tr:last-child td{ border-bottom: none; }

/* =========================================================
   Notice
   ========================================================= */
.notice{
  margin-top: 12px;
  border-left: 4px solid var(--brand2);
  background: #E3F2FD;
  color: #1E3A8A;
  padding: 10px 12px;
  font-size: 13px;
}

/* =========================================================
   Footer
   ========================================================= */
.footer{
  margin-top: 26px;
  font-size: 12px;
  color: #64748B;
  text-align: right;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 900px){
  .kpi-row{ grid-template-columns: 1fr; }
  .grid-3{ grid-template-columns: 1fr; }
  .nav{ gap: 10px; }
}

@media (max-width: 560px){
  .topbar-inner{ align-items:flex-start; flex-direction:column; }
}

.skip-link{
  position:absolute; left:-999px; top:auto; width:1px; height:1px; overflow:hidden;
}
.skip-link:focus{
  left:12px; top:12px; width:auto; height:auto; padding:10px 12px; z-index:9999;
}

.nav-toggle{ display:none; }

@media (max-width: 860px){
  .nav-toggle{ display:inline-flex; }
  .nav{ display:none; }
  .nav.is-open{ display:flex; flex-direction:column; gap:10px; align-items:flex-start; }
}
.steps{ margin:10px 0 0 18px; color:#475569; font-size:13.5px; line-height:1.6; }
