/* ============================================================
   CCSFAC — Sistema de Contratación
   Fuente: Inter | Paleta: azul marino FAC + dorado
   ============================================================ */

:root {
  --fac-azul: #1a3a6e;
  --fac-azul-oscuro: #112550;
  --fac-azul-medio: #1e4a8a;
  --fac-dorado: #c9a227;
  --fac-dorado-claro: #f0d080;
  --fac-gris: #f5f6f8;
  --fac-texto: #212529;
  --fac-borde: #dee2e6;
}

/* ── Base ────────────────────────────────────────── */
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 0.95rem;
  color: var(--fac-texto);
  background: #f8f9fb;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* ── Header ─────────────────────────────────────── */
.fac-header {
  background: linear-gradient(135deg, var(--fac-azul-oscuro) 0%, var(--fac-azul) 100%);
  color: #fff;
  box-shadow: 0 2px 12px rgba(17, 37, 80, 0.25);
}

.fac-header .container {
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
}

.fac-header__title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  letter-spacing: -0.01em;
}

.fac-header__subtitle {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.03em;
  font-weight: 400;
}

.fac-header__stripe {
  height: 3px;
  background: linear-gradient(90deg, var(--fac-dorado) 0%, var(--fac-dorado-claro) 60%, transparent 100%);
}

.fac-header .btn-outline-light {
  border-color: rgba(255,255,255,0.4);
  color: rgba(255,255,255,0.9);
  font-size: 0.82rem;
  font-weight: 500;
  transition: all 0.2s;
}

.fac-header .btn-outline-light:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.8);
  color: #fff;
}

/* ── Footer ─────────────────────────────────────── */
.fac-footer {
  background: var(--fac-azul-oscuro);
  color: #9baac4;
  font-size: 0.83rem;
  border-top: 3px solid var(--fac-dorado);
  margin-top: auto;
}

.fac-footer strong { color: #e8edf5; font-weight: 600; }

/* ── Breadcrumb ──────────────────────────────────── */
.breadcrumb { font-size: 0.82rem; background: transparent; padding: 0; }
.breadcrumb-item + .breadcrumb-item::before { color: #adb5bd; }

/* ── Page header ─────────────────────────────────── */
.page-header {
  border-left: 4px solid var(--fac-dorado);
  padding-left: 1rem;
  margin-bottom: 1.5rem;
}

.page-header h1 { font-size: 1.6rem; color: var(--fac-azul); }

/* ── Cards ───────────────────────────────────────── */
.card {
  border: 1px solid var(--fac-borde);
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  transition: box-shadow 0.2s, transform 0.15s;
}

.card-header {
  font-weight: 600;
  font-size: 0.88rem;
  background: #f8f9fb;
  border-bottom: 1px solid var(--fac-borde);
  border-radius: 10px 10px 0 0 !important;
  padding: 0.75rem 1.1rem;
}

.card-body { padding: 1.2rem; }

/* ── Proceso cards ───────────────────────────────── */
.proceso-card { border-radius: 10px; }

.proceso-card:hover {
  box-shadow: 0 6px 20px rgba(26, 58, 110, 0.13);
  transform: translateY(-2px);
}

.proceso-card--abierto { border-top: 3px solid #198754; }

.proceso-card .card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--fac-azul);
  line-height: 1.4;
}

/* ── Tabla ───────────────────────────────────────── */
.table { font-size: 0.875rem; }

.table thead th {
  font-weight: 600;
  font-size: 0.77rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--fac-azul) !important;
  color: #fff !important;
  border-color: var(--fac-azul-medio);
  padding: 0.7rem 1rem;
}

.table tbody tr:hover { background: #f0f4ff; }

/* ── Badges de estado ────────────────────────────── */
.badge {
  font-weight: 500;
  font-size: 0.73rem;
  letter-spacing: 0.03em;
  padding: 0.35em 0.75em;
  border-radius: 20px;
}

.badge.estado-borrador    { background: #6c757d; color: #fff; }
.badge.estado-abierto     { background: #198754; color: #fff; }
.badge.estado-cerrado     { background: #e67e22; color: #fff; }
.badge.estado-adjudicado  { background: var(--fac-azul); color: #fff; }
.badge.estado-desierto    { background: #dc3545; color: #fff; }
.badge.estado-cancelado   { background: #6c757d; color: #fff; }

/* ── Botones ─────────────────────────────────────── */
.btn {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.875rem;
  border-radius: 7px;
  letter-spacing: 0.01em;
  transition: all 0.18s;
}

.btn-success { background: #198754; border-color: #198754; }
.btn-success:hover {
  background: #157347;
  box-shadow: 0 3px 10px rgba(25,135,84,0.3);
}

.btn-lg { padding: 0.6rem 1.4rem; font-size: 0.95rem; }
.btn-sm { padding: 0.3rem 0.75rem; font-size: 0.78rem; }

/* ── Formularios ─────────────────────────────────── */
.form-control, .form-select {
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  border-radius: 7px;
  border-color: #ced4da;
  padding: 0.5rem 0.85rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control:focus, .form-select:focus {
  border-color: var(--fac-azul-medio);
  box-shadow: 0 0 0 3px rgba(30, 74, 138, 0.15);
}

.form-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #495057;
  margin-bottom: 0.35rem;
}

.form-text { font-size: 0.775rem; color: #6c757d; }

/* ── Iconos PDF de documentos en cards ───────────── */
.doc-pdf-icon {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 0.66rem;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none !important;
  transition: transform 0.15s;
}

.doc-pdf-icon i {
  font-size: 1.6rem;
  line-height: 1;
}

.doc-pdf-icon span { line-height: 1; }

/* Disponible → rojo, clicable */
.doc-pdf--disponible        { color: #c0392b; cursor: pointer; }
.doc-pdf--disponible:hover  { transform: scale(1.15); color: #96281b; }

/* Pendiente → gris, no clicable */
.doc-pdf--pendiente         { color: #ced4da; cursor: default; }
.doc-pdf--pendiente span    { color: #adb5bd; }

/* ── Alerts ──────────────────────────────────────── */
.alert {
  border-radius: 8px;
  font-size: 0.875rem;
  border-left-width: 4px;
}

/* ── Countdown ───────────────────────────────────── */
#countdown {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}

/* ── Lista de grupo ──────────────────────────────── */
.list-group-item { font-size: 0.875rem; padding: 0.7rem 1.1rem; }

/* ── WhatsApp flotante ───────────────────────────── */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 56px;
  height: 56px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
  z-index: 9999;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.55);
}

/* ── Enlace de acceso admin (header) ─── */
.fac-header__admin-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 50%;
  color: rgba(255,255,255,0.70);
  font-size: 0.78rem;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.fac-header__admin-link:hover {
  color: #fff;
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.6);
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 576px) {
  .fac-header__title { font-size: 0.9rem; }
  .page-header h1 { font-size: 1.25rem; }
}
