/* ==========================================================================
   Kit de estilo Registium - hoja de ajustes sobre Bootstrap 5.3

   Se carga DESPUES de bootstrap.min.css. Cada bloque es independiente.
   Basado en el kit de patrones (patrones.html) + colores de marca Registium.
   ========================================================================== */


/* --- 0. Marca Registium ------------------------------------------------- */
/* Recolorea el "primary" de Bootstrap al azul de la marca (#0030b0) sin
   recompilar Bootstrap: se sobrescriben las variables de cada componente. */

:root {
  --bs-primary: #0030b0;
  --bs-primary-rgb: 0, 48, 176;
  --bs-link-color: #0030b0;
  --bs-link-color-rgb: 0, 48, 176;
  --bs-link-hover-color: #00248a;
}

.btn-primary {
  --bs-btn-bg: #0030b0;            --bs-btn-border-color: #0030b0;
  --bs-btn-hover-bg: #00248a;      --bs-btn-hover-border-color: #00248a;
  --bs-btn-active-bg: #00206f;     --bs-btn-active-border-color: #00206f;
  --bs-btn-disabled-bg: #0030b0;   --bs-btn-disabled-border-color: #0030b0;
}

.btn-outline-primary {
  --bs-btn-color: #0030b0;         --bs-btn-border-color: #0030b0;
  --bs-btn-hover-bg: #0030b0;      --bs-btn-hover-border-color: #0030b0;
  --bs-btn-active-bg: #0030b0;     --bs-btn-active-border-color: #0030b0;
}

.bg-primary   { background-color: #0030b0 !important; }
.text-primary { color: #0030b0 !important; }
.border-primary { border-color: #0030b0 !important; }

.form-control:focus,
.form-select:focus {
  border-color: #5b7bde;
  box-shadow: 0 0 0 .25rem rgba(0, 48, 176, .2);
}

.form-check-input:checked {
  background-color: #0030b0;
  border-color: #0030b0;
}


/* --- 1. Base ------------------------------------------------------------ */
/* Se baja un poco el tamano base para que entren mas filas por pantalla. */

body {
  font-size: 0.94rem;
}


/* --- 2. Tablas densas --------------------------------------------------- */
/* <table class="table table-hover tabla-densa"> */

.tabla-densa td,
.tabla-densa th {
  padding: 0.4rem 0.5rem;
  vertical-align: middle;
}

.numerico {
  font-variant-numeric: tabular-nums;
  text-align: right;
}


/* --- 3. Tarjeta de metrica ---------------------------------------------- */

.tarjeta-metrica {
  border-left: 4px solid var(--bs-primary);
}

.tarjeta-metrica .valor {
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.1;
}

.tarjeta-metrica .etiqueta {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--bs-secondary-color);
}


/* --- 4. Insignias de categoria ------------------------------------------ */

.badge-categoria-a { background: #0d6efd; }
.badge-categoria-b { background: #6f42c1; }
.badge-categoria-c { background: #20c997; }


/* --- 5. Calendario mensual ---------------------------------------------- */

.calendario { table-layout: fixed; }
.calendario td { height: 108px; vertical-align: top; padding: 4px; }
.calendario td.fuera { background: var(--bs-tertiary-bg); }
.calendario td.hoy { background: #fff8e1; }
.calendario .numero-dia { font-size: .8rem; font-weight: 600; color: var(--bs-secondary-color); }
.calendario .evento {
  display: block; font-size: .68rem; line-height: 1.25; padding: 1px 4px;
  border-radius: 3px; margin-bottom: 2px; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; text-decoration: none;
}
.calendario .evento.confirmado { background: #d1e7dd; color: #0a3622; }
.calendario .evento.tentativo  { background: #fff3cd; color: #664d03; }
.calendario .evento.bloqueado  { background: #e2e3e5; color: #41464b; }


/* --- 6. Estado vacio ---------------------------------------------------- */

.estado-vacio { text-align: center; padding: 2.5rem 1rem; color: var(--bs-secondary-color); }
.estado-vacio .icono { font-size: 2.2rem; opacity: .35; display: block; margin-bottom: .5rem; }


/* --- 7. Detalles varios -------------------------------------------------- */

.truncado { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fila-inactiva { opacity: .5; }


/* --- 8. Impresion -------------------------------------------------------- */

@media print {
  .no-imprimir, nav, footer { display: none !important; }
  body { background: #fff !important; font-size: 11px; }
  .card { border: 1px solid #dee2e6 !important; break-inside: avoid; }
}
