/* Tamaño de fuente global más pequeño */
html, body {
  font-size: 0.875rem; /* ~14px */
}

/* Jerarquía de títulos */
h1, .h1 { font-size: 1.75rem; }
h2, .h2 { font-size: 1.5rem; }
h3, .h3 { font-size: 1.25rem; }

/* Tablas más compactas */
.table {
  font-size: 0.85rem;
}

/* Formularios y selects */
.form-control,
.form-select {
  font-size: 0.85rem;
}

/* Botones */
.btn {
  font-size: 0.85rem;
}


.nav-link.active {
    color: #4cc2ff !important;
    text-decoration: none !important;
}

.navbar-nav .nav-link:hover {
    color: #4cc2ff !important;
    text-decoration: underline;
}

.page-link { cursor: pointer; }

.htmx-indicator { display: none; }
.htmx-request .htmx-indicator { display: inline-flex; }

.list-group-item.list-group-item-action:hover {
    background-color: #dee2ff !important;
}

.subtotal-col {
    width: 130px; /* ajusta si quieres más o menos ancho */
}

.btn-sm {
    padding: 0.25rem 0.55rem;
    font-size: .78rem;
}

/* ==============================
   DASHBOARD – Cards con color
   (mantiene estilo compacto del base.css)
   ============================== */

.dash-card {
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  overflow: hidden; /* si algún día metes dropdowns/menus dentro, y se cortan: cambiar a visible */
}

/* Métrica muy visible */
.dash-metric {
  font-size: 2.6rem;
  font-weight: 900;
  line-height: 1.05;
  margin-top: 0.25rem;
  letter-spacing: -0.5px;
}

/* Icono discreto, consistente */
.dash-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  background: rgba(0, 0, 0, 0.06);
  color: rgba(0, 0, 0, 0.55);
}

/* ---------- VARIANTES DE CARD ---------- */

/* Abiertas – azul */
.dash-card-open {
  background: linear-gradient(135deg, #e9f6ff, #ffffff);
}

.dash-card-open .dash-metric {
  color: #0b5ed7;
}

.dash-card-open .dash-icon {
  background: rgba(13, 110, 253, 0.15);
  color: #0b5ed7;
}

/* Ganadas – verde */
.dash-card-won {
  background: linear-gradient(135deg, #eaf8f1, #ffffff);
}

.dash-card-won .dash-metric {
  color: #157347;
}

.dash-card-won .dash-icon {
  background: rgba(25, 135, 84, 0.15);
  color: #157347;
}

/* CTA – acento azul claro (tu color del navbar active/hover) */
.dash-card-cta {
  background: linear-gradient(135deg, #f0fbff, #ffffff);
  border: 1px solid rgba(76, 194, 255, 0.45);
}

.dash-card-cta .dash-icon {
  background: rgba(76, 194, 255, 0.20);
  color: #0b5ed7;
}

/* ---------- Tabla ---------- */

.dash-table tbody tr:hover {
  background-color: rgba(76, 194, 255, 0.08);
}

/* IMPORTANTE:
   - Solo deja cursor:pointer si de verdad haces el <tr> clickeable (navega al detalle).
   - Si NO es clickeable, usa cursor: default; para no “mentir” al usuario. */
.dash-row {
  cursor: default;
}

/* Badges de estatus – Dashboard */

.dash-badge {
  font-weight: 700;
  border: 1px solid rgba(0,0,0,0.10);
  padding: 0.32rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
}

/* Borrador */
.dash-badge.dft {
  background: #f3f4f6;
  color: #111827;
}

/* Pendiente de aprobación */
.dash-badge.rvw {
  background: #fff7ed;
  color: #7c2d12;
}

/* Aprobada */
.dash-badge.app {
  background: #eff6ff;
  color: #1e3a8a;
}

/* Enviada */
.dash-badge.snt {
  background: #f5f3ff;
  color: #4c1d95;
}

/* (Opcional – por si aparecen en otros listados) */

/* Ganada */
.dash-badge.won {
  background: #ecfdf5;
  color: #065f46;
}

/* Perdida */
.dash-badge.lst {
  background: #fef2f2;
  color: #7f1d1d;
}

/* Expirada */
.dash-badge.exp {
  background: #f9fafb;
  color: #374151;
}


.dash-subtext {
  font-size: 0.82rem;
  color: rgba(0, 0, 0, 0.60);
}

/* ---------- KPIs compactos dentro del card de abiertas ---------- */

.dash-kpis {
  display: flex;
  flex-wrap: wrap;         /* responsive: permite saltar de línea */
  gap: 1rem;
  margin-top: 0.25rem;
}

.dash-kpi {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.dash-kpi-label {
  font-size: 0.78rem;
  color: rgba(0, 0, 0, 0.60);
}

/* Por default hereda el color; el tema lo define la card */
.dash-kpi-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: inherit;
}

/* Tema por card (escalable) */
.dash-card-open .dash-kpi-value { color: #0b5ed7; }
.dash-card-won  .dash-kpi-value { color: #157347; }
.dash-card-cta  .dash-kpi-value { color: #0b5ed7; }

/* Ajuste fino en pantallas pequeñas */
@media (max-width: 575.98px) {
  .dash-kpis {
    gap: 0.6rem;
  }
}
