/* static/css/style.css
   PROYECTO: App Control Días Trabajados (Flask + MariaDB/MySQL)
   ARCHIVO:  style.css
   PROPÓSITO:
   - Estilos globales: tipografía, layout, tarjetas, tablas, navbar/footer y calendario.
   - Responsive (web / mobile) y UI consistente.
   - Mantiene tus clases existentes (metric-grid, hover-card, cal-*, etc.)

   NOTAS:
   - Usa Inter (cargada en layout.html).
   - Limpieza aplicada:
     1) Se consolidan estilos de Navbar (había duplicados).
     2) Se añade shell del layout: .app-shell / .app-container / .app-content.
*/

/* =========================
   Variables (paleta + UI)
   ========================= */
:root {
  --font-sans: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;

  /* Fondo y superficies */
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-2: #f2f5f9;

  /* Texto */
  --text: #0f172a;
  --muted: #667085;

  /* Bordes y sombras */
  --border: rgba(15, 23, 42, 0.10);
  --shadow-sm: 0 2px 10px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 16px 32px rgba(15, 23, 42, 0.16);

  /* Accentos */
  --primary: #2563eb;   /* azul moderno */
  --success: #16a34a;   /* verde */
  --info: #06b6d4;      /* cian */
  --warning: #f59e0b;   /* ámbar */
  --danger: #ef4444;    /* rojo */

  /* Navbar */
  --nav-bg: rgba(13, 27, 42, 0.92);

  /* Radios */
  --radius-lg: 16px;
  --radius-md: 12px;

  /* Espaciado */
  --gap: 1rem;
}

/* =========================
   Base
   ========================= */
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  padding-top: 90px; /* Compensa navbar fixed-top */
}

/* En móvil la navbar puede ocupar 2 líneas */
@media (max-width: 576px) {
  body { padding-top: 110px; }
}

.contenedor-principal {
  margin-top: 0;
  padding-top: 0;
}

/* =========================
   App Shell (layout.html)
   - centra contenido en desktop y mantiene buen padding en móvil
   ========================= */
.app-shell {
  width: 100%;
}

/* ancho “moderno” (no tan amplio) */
.app-container {
  max-width: 1100px;
}

/* el bloque content ya trae py, esto es seguridad extra */
.app-content {
  width: 100%;
}

/* =========================
   Utilidad: título de sección
   ========================= */
.section-title {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 1rem 0 .75rem;
  color: var(--muted);
  font-weight: 600;
}
.section-title strong {
  color: var(--text);
  font-weight: 800;
}

/* =========================
   Tarjetas (cards)
   ========================= */
.hover-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  will-change: transform, box-shadow;
}

.hover-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-8px);
}

.card-title {
  color: var(--text);
  font-weight: 700;
}

/* Valores coloreados */
.valor-trabajo { color: var(--primary) !important; font-weight: 800 !important; }
.valor-horas { color: var(--success) !important; font-weight: 800 !important; }
.valor-vacaciones { color: var(--info) !important; font-weight: 800 !important; }
.valor-salario { color: var(--danger) !important; font-weight: 800 !important; }

/* Links envolviendo cards */
.metric-link { display: block; }

/* =========================
   Grids de métricas
   ========================= */
.metric-grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: 1fr;
}

@media (min-width: 576px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 5 tarjetas en desktop (fila principal) */
@media (min-width: 992px) {
  .metric-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* Si necesitas 4 tarjetas (Resumen del mes):
   añade class="metric-grid metric-grid-4" al contenedor */
@media (min-width: 992px) {
  .metric-grid.metric-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* =========================
   Forms / inputs
   ========================= */
.form-label {
  color: var(--muted);
  font-weight: 600;
}

.form-select,
.form-control,
.form-check-input,
.btn {
  border-radius: 12px;
}

.form-select:focus,
.form-control:focus {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 0 0 .25rem rgba(37, 99, 235, 0.12);
}

/* =========================
   Tablas
   ========================= */
.table-responsive { border-radius: var(--radius-lg); }

table.table {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* Encabezado */
thead th {
  background-color: var(--surface-2);
  color: var(--text);
  font-weight: 800;
  text-align: center;
  border-bottom: 2px solid rgba(15, 23, 42, 0.10);
}

/* Hover filas */
.table-hover tbody tr:hover {
  background-color: rgba(37, 99, 235, 0.05);
}

/* =========================
   Badges
   ========================= */
.badge {
  border-radius: 999px;
  padding: .35rem .6rem;
  font-weight: 700;
}

/* =========================
   Alerts
   ========================= */
.alert {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

/* =========================
   Navbar / dropdown (CONSOLIDADO)
   - Mantiene tu plantilla actual (barra_navegacion.html)
   - Elimina duplicados previos y reglas no usadas
   ========================= */
.navbar.navbar-dark {
  background-color: var(--nav-bg) !important;
  backdrop-filter: blur(10px);
  padding-top: 10px;
  padding-bottom: 10px;
}

.navbar .navbar-brand {
  gap: .6rem;
}

.navbar .navbar-brand > div > div {
  font-size: 1rem;
  font-weight: 900;
}

.navbar .navbar-brand small {
  font-size: .78rem;
  opacity: .9;
}

/* Links */
.navbar-dark .navbar-nav {
  gap: .25rem;
}

.navbar-dark .navbar-nav .nav-link {
  border-radius: 12px;
  padding: .55rem .65rem;
  font-size: .92rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  line-height: 1;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.navbar-dark .navbar-nav .nav-link i {
  font-size: .95em;
  opacity: .9;
}

.navbar-dark .navbar-nav .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.10);
  color: #ffffff !important;
}

/* Dropdown */
.navbar .dropdown-menu {
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.navbar .dropdown-menu .dropdown-item {
  padding: .6rem .85rem;
  font-size: .92rem;
  font-weight: 600;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.navbar .dropdown-menu .dropdown-item:hover {
  background-color: rgba(37, 99, 235, 0.10);
  color: var(--text) !important;
}

.navbar .dropdown-menu .dropdown-item.text-danger {
  color: var(--danger) !important;
}

.navbar .dropdown-menu .dropdown-item.text-danger:hover {
  background-color: rgba(239, 68, 68, 0.12);
  color: var(--danger) !important;
}

/* Avatar/usuario: que no empuje tanto */
.navbar .nav-link img {
  width: 36px !important;
  height: 36px !important;
  border-radius: 10px !important;
}

/* Ajustes en pantallas medianas */
@media (max-width: 1200px) {
  .navbar-dark .navbar-nav .nav-link {
    padding: .5rem .55rem;
    font-size: .9rem;
  }
}

/* En móvil: mejor separación vertical en el menú colapsado */
@media (max-width: 991.98px) {
  .navbar-collapse { margin-top: .75rem; }

  .navbar-dark .navbar-nav .nav-link {
    padding: .7rem .75rem;
    border-radius: 12px;
  }

  .navbar-nav.me-3 { margin-right: 0 !important; }
  .navbar-nav.ms-lg-3 { margin-left: 0 !important; margin-top: .25rem; }
}

/* =========================
   Footer
   ========================= */
footer { background: rgba(13, 27, 42, 0.98) !important; }

.footer-link { font-weight: 600; }
.footer-link:hover {
  color: #93c5fd !important;
  text-decoration: underline;
}

/* Botón volver arriba más “app-like” */
footer button.btn-outline-light { border-radius: 12px; }

/* =========================
   Paginación
   ========================= */
.pagination .page-link {
  border-radius: 10px;
  margin-left: .2rem;
  margin-right: .2rem;
  border: 1px solid rgba(15, 23, 42, 0.10);
}

.pagination .page-item.active .page-link {
  background: var(--primary);
  border-color: var(--primary);
}

/* =========================
   Calendario (ajuste visual)
   ========================= */
.cal-today {
  outline: 3px solid rgba(37, 99, 235, 0.85);
  outline-offset: -3px;
  background: rgba(37, 99, 235, 0.08);
  font-weight: 900;
}

/* Estados: fondo más suave + borde sutil para “leer” el estado */
.cal-missing {
  background: rgba(245, 158, 11, 0.12) !important;
  color: #111827 !important;
  font-weight: 900;
  box-shadow: inset 0 0 0 2px rgba(245, 158, 11, 0.22);
}

.cal-trabajo {
  background: rgba(37, 99, 235, 0.10) !important;
  color: #0b2e6d !important;
  font-weight: 900;
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.18);
}

.cal-vacaciones {
  background: rgba(22, 163, 74, 0.10) !important;
  color: #0f3d2a !important;
  font-weight: 900;
  box-shadow: inset 0 0 0 2px rgba(22, 163, 74, 0.18);
}

.cal-libre {
  background: rgba(107, 114, 128, 0.10) !important;
  color: #2b3035 !important;
  font-weight: 900;
  box-shadow: inset 0 0 0 2px rgba(107, 114, 128, 0.18);
}

/* Sub-etiqueta (horas o marcador) */
.cal-sub {
  display: block;
  font-size: 0.75rem;
  line-height: 1;
  margin-top: 4px;
  opacity: 0.92;
}


/* Estados */
/* =========================
   Calendario (paleta unificada)
   - Mismo “look” para todos los estados
   - Fondo suave + borde consistente
   ========================= */

/* Hoy: borde azul tipo “cuadro” */
.cal-today{
  background: rgba(37, 99, 235, 0.08) !important;
  color: #0b2e6d !important;
  font-weight: 900;
  box-shadow: inset 0 0 0 3px rgba(37, 99, 235, 0.75);
}

/* Trabajo (azul) */
.cal-trabajo{
  background: rgba(37, 99, 235, 0.10) !important;
  color: #0b2e6d !important;
  font-weight: 900;
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.20);
}

/* Vacaciones (verde, pero mismo estilo) */
.cal-vacaciones{
  background: rgba(37, 99, 235, 0.06) !important; /* mantiene “familia” azul */
  color: #0f3d2a !important;
  font-weight: 900;
  box-shadow: inset 0 0 0 2px rgba(22, 163, 74, 0.22);
}

/* Libre (gris, pero coherente) */
.cal-libre{
  background: rgba(37, 99, 235, 0.04) !important; /* azul muy suave para coherencia */
  color: #2b3035 !important;
  font-weight: 900;
  box-shadow: inset 0 0 0 2px rgba(107, 114, 128, 0.22);
}

/* Faltante (ámbar, pero coherente) */
.cal-missing{
  background: rgba(37, 99, 235, 0.05) !important; /* azul muy suave para familia */
  color: #111827 !important;
  font-weight: 900;
  box-shadow: inset 0 0 0 2px rgba(245, 158, 11, 0.26);
}

/* Sub-etiqueta (horas / marcador) */
.cal-sub{
  display:block;
  font-size: 0.75rem;
  line-height: 1;
  margin-top: 4px;
  opacity: 0.92;
}


/* =========================
   Extras: micro-ajustes
   ========================= */
h4, h5, h6 { letter-spacing: -0.01em; }

.card-body small.text-muted { color: var(--muted) !important; }

/* =========================
   Gráficas (Chart pages)
   ========================= */
.chart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.25rem 0 1rem;
}

.chart-header h3 {
  margin: 0;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.chart-subtitle {
  margin: .25rem 0 0;
  color: var(--muted);
  font-weight: 600;
}

.chart-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: 1rem;
}

@media (min-width: 768px) {
  .chart-card { padding: 1.25rem; }
}

/* Mantiene un “alto” razonable del canvas en móvil */
.chart-canvas-wrap {
  position: relative;
  width: 100%;
  min-height: 320px;
}

@media (min-width: 768px) {
  .chart-canvas-wrap { min-height: 420px; }
}

/* Chip de contexto (mes/año) */
.ctx-chip {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  border: 1px solid var(--border);
  background: rgba(37, 99, 235, 0.06);
  color: var(--text);
  border-radius: 999px;
  padding: .35rem .7rem;
  font-weight: 800;
  font-size: .85rem;
}

/* =========================
   Dashboard (rediseño)
   ========================= */
.dash-header{
  display:flex;
  align-items:flex-start;
  justify-content:flex-start;   /* en vez de space-between */
  gap: 1rem;
  margin: .5rem 0 1rem;
}

.dash-header__left{ flex: 1; }  /* empuja el bloque derecho al final */
.dash-header__right{ margin-left:auto; }


.dash-title{
  margin:0;
  font-weight:900;
  letter-spacing:-0.02em;
}

.dash-sub{
  display:flex;
  align-items:center;
  gap:.5rem;
  flex-wrap:wrap;
  margin-top:.25rem;
}

.dash-chip{
  display:inline-flex;
  align-items:center;
  gap:.45rem;
  padding:.35rem .65rem;
  border-radius:999px;
  border:1px solid var(--border);
  background: rgba(37, 99, 235, 0.08);
  font-weight:800;
  font-size:.85rem;
}

.dash-chip--soft{
  background: rgba(15, 23, 42, 0.06);
}

.dash-header__right{
  display:flex;
  gap:.5rem;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.dash-cta{
  border-radius: 999px;
  padding-left:.85rem;
  padding-right:.85rem;
}

@media (max-width: 768px){
  .dash-header{
    flex-direction:column;
    align-items:stretch;
  }
  .dash-header__right{
    justify-content:flex-start;
  }
}

/* KPI grid compacto */
.kpi-grid{
  display:grid;
  gap: var(--gap);
  grid-template-columns: 1fr;
}

@media (min-width: 576px){
  .kpi-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 992px){
  .kpi-grid{ grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

.kpi-link{ text-decoration:none; color:inherit; display:block; }

.kpi-card{
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: .9rem .9rem;
  display:flex;
  align-items:center;
  gap:.75rem;
  transition: transform .2s ease, box-shadow .2s ease;
}

.kpi-card:hover{
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.kpi-ic{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size: 1.05rem;
  border: 1px solid var(--border);
}

.kpi-ic--primary{ background: rgba(37,99,235,.10); color: var(--primary); }
.kpi-ic--success{ background: rgba(22,163,74,.10); color: var(--success); }
.kpi-ic--info{ background: rgba(6,182,212,.10); color: var(--info); }
.kpi-ic--warning{ background: rgba(245,158,11,.12); color: var(--warning); }
.kpi-ic--danger{ background: rgba(239,68,68,.10); color: var(--danger); }

.kpi-meta{ min-width:0; }
.kpi-label{
  color: var(--muted);
  font-weight: 700;
  font-size: .9rem;
  line-height: 1.1;
}
.kpi-value{
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}
.kpi-hint{
  color: var(--muted);
  font-weight: 600;
  font-size: .8rem;
  margin-top: .1rem;
}

/* Panel “Periodo” */
.dash-panel{
  border:1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.dash-panel__head{
  padding: 1rem 1rem .75rem;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:1rem;
  border-bottom:1px solid rgba(15,23,42,.08);
}

.dash-panel__title{
  font-weight: 900;
  letter-spacing: -0.01em;
}

.dash-panel__sub{
  color: var(--muted);
  font-weight: 600;
  margin-top: .15rem;
}

.dash-panel__body{ padding: 1rem; }

.month-grid{
  display:grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
}

@media (min-width: 768px){
  .month-grid{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.month-card{
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 14px;
  padding: .9rem;
  background: rgba(15,23,42,.02);
}

.month-card__k{
  color: var(--muted);
  font-weight: 800;
  font-size: .9rem;
}
.month-card__v{
  font-weight: 900;
  font-size: 1.35rem;
  margin-top: .2rem;
}
.month-card__hint{
  color: var(--muted);
  font-weight: 600;
  font-size: .85rem;
  margin-top: .25rem;
}

.dash-filters{
  border: 1px dashed rgba(15,23,42,.16);
  border-radius: 14px;
  padding: .9rem;
  background: rgba(37, 99, 235, 0.03);
}

/* =========================
   Dashboard: botón "Ver salarios" (refinado)
   ========================= */
.dash-status-actions{
  display: flex;
  justify-content: flex-end;
  margin-top: .75rem;
}

.dash-btn-slim{
  min-width: 220px;      /* tamaño consistente en desktop */
  border-radius: 999px;  /* coherente con tus CTAs */
  padding-left: 1rem;
  padding-right: 1rem;
}

/* En móvil: el botón sí puede ir a todo ancho */
@media (max-width: 576px){
  .dash-status-actions{
    justify-content: stretch;
  }
  .dash-btn-slim{
    width: 100%;
    min-width: 0;
  }
}

/* =========================
   Dashboard - acciones (evitar redundancia con navbar)
   ========================= */
.dash-actions { display: none; }               /* por defecto: oculto (desktop) */

/* En móvil sí mostramos CTA porque la navbar va colapsada */
@media (max-width: 991.98px){
  .dash-actions { 
    display: flex;
    justify-content: flex-end;
    width: 100%;
  }
}

/* Si quieres que en móvil el botón no “se vaya” a la derecha con aire raro */
@media (max-width: 768px){
  .dash-header__right{
    justify-content: flex-start;               /* en tu CSS ya lo tienes, lo refuerzo */
  }
}


/* =========================
   Status card actions (botones slim)
   ========================= */
.dash-status-actions{
  display: flex;
  justify-content: flex-end;
}

.dash-btn-slim{
  width: auto;
  min-width: 220px;   /* evita que se vea “mini” en desktop */
  border-radius: 999px;
  padding: .55rem 1rem;
}

/* En móvil: que sí ocupen el ancho para tocar fácil */
@media (max-width: 576px){
  .dash-status-actions{ justify-content: stretch; }
  .dash-btn-slim{ width: 100%; min-width: 0; }
}

/* =========================
   Dashboard header CTAs: evitar duplicidad con navbar
   - Desktop: se ocultan (ya existe la navbar)
   - Mobile: se mantienen (útil con menú colapsado)
   ========================= */
@media (min-width: 992px){
  .dash-header__right{
    display: none;
  }
}

/* =========================
   Leyenda del calendario: “Hoy” con cuadro azul
   (robusto: funciona si es btn o badge)
   ========================= */

/* Si el “Hoy” es un botón */
.btn.legend-today,
.btn.cal-legend-today{
  background: rgba(37, 99, 235, 0.06) !important;
  color: #0b2e6d !important;
  font-weight: 900;
  border: 2px solid rgba(37, 99, 235, 0.75) !important;
  border-radius: 999px;
}

/* Si el “Hoy” es un badge/span */
.badge.legend-today,
.cal-legend-today{
  background: rgba(37, 99, 235, 0.06) !important;
  color: #0b2e6d !important;
  font-weight: 900;
  border: 2px solid rgba(37, 99, 235, 0.75) !important;
  border-radius: 999px;
}
/* =========================
   Cuadrante: Leyenda (badges)
   - Diferenciación clara
   - Look consistente con el calendario
   ========================= */

.cal-legend .badge{
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: -0.01em;
  padding: .55rem .95rem !important;
  border: 1px solid rgba(15, 23, 42, 0.10);
}

/* Trabajo */
.cal-legend .badge.bg-primary{
  background: rgba(37, 99, 235, 0.14) !important;
  color: #0b2e6d !important;
  border-color: rgba(37, 99, 235, 0.30) !important;
}

/* Vacaciones */
.cal-legend .badge.bg-success{
  background: rgba(22, 163, 74, 0.14) !important;
  color: #0f3d2a !important;
  border-color: rgba(22, 163, 74, 0.30) !important;
}

/* Libre */
.cal-legend .badge.bg-secondary{
  background: rgba(107, 114, 128, 0.16) !important;
  color: #2b3035 !important;
  border-color: rgba(107, 114, 128, 0.32) !important;
}

/* Faltante */
.cal-legend .badge.bg-warning{
  background: rgba(245, 158, 11, 0.18) !important;
  color: #111827 !important;
  border-color: rgba(245, 158, 11, 0.35) !important;
}

/* Hoy (cuadro azul como el día 12) */
.cal-legend .badge.bg-light{
  background: rgba(37, 99, 235, 0.06) !important;
  color: #0b2e6d !important;
  border: 2px solid rgba(37, 99, 235, 0.70) !important;
}

/* =========================
   Cuadrante: encabezado de tabla
   ========================= */

.tabla-calendario{
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.12);
}

.tabla-calendario thead th{
  background: linear-gradient(180deg, rgba(15,23,42,0.06), rgba(15,23,42,0.02));
  color: #0f172a;
  font-weight: 900;
  letter-spacing: -0.01em;
  border-bottom: 1px solid rgba(15, 23, 42, 0.14);
}

.tabla-calendario td{
  border-color: rgba(15, 23, 42, 0.10) !important;
}

/* =========================
   Cuadrante: acciones “Marcar libre / Quitar”
   ========================= */

.cal-actions{
  display: flex;
  gap: .6rem;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.cal-actions .btn{
  border-radius: 14px;
  padding: .6rem .95rem;
  font-weight: 800;
  line-height: 1;
}

/* “Quitar” menos chillón, pero claro */
.cal-actions .btn-outline-danger{
  border-width: 2px;
  background: rgba(239, 68, 68, 0.05);
}

.cal-actions .btn-outline-danger:hover{
  background: rgba(239, 68, 68, 0.10);
}

/* =========================================================
   CUADRANTE / CALENDARIO — Refinado visual (PUNTO 1)
   Objetivo:
   - Estados más diferenciados (trabajo/vacaciones/libre/faltante)
   - Encabezado de tabla más “separado” del cuerpo
   - “Hoy” con marco azul (tipo selección)
   - Botón Quitar integrado (mismo look/altura y sin “salirse”)
   ========================================================= */

/* ---------- Tabla calendario: marco + separación ---------- */
.tabla-calendario {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(15, 23, 42, 0.10);
  box-shadow: var(--shadow-sm);
}

/* Encabezado (Lun/Mar/Mié...) más diferenciado */
.tabla-calendario thead th {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.06), rgba(15, 23, 42, 0.03));
  border-bottom: 1px solid rgba(15, 23, 42, 0.12);
  color: var(--text);
  font-weight: 900;
  text-transform: none;
  letter-spacing: -0.01em;
}

/* Celdas: líneas más suaves y coherentes */
.tabla-calendario td,
.tabla-calendario th {
  border-color: rgba(15, 23, 42, 0.10) !important;
}

/* Hover más “app” */
.tabla-calendario td:hover {
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.22);
  transform: translateY(-1px);
}

/* ---------- Estados del día (más distinguibles) ---------- */
/* Trabajo: azul claro con texto azul */
.cal-trabajo {
  background: rgba(37, 99, 235, 0.14) !important;
  color: #0b2e6d !important;
  font-weight: 900;
}

/* Vacaciones: verde suave (antes parecía similar a otros) */
.cal-vacaciones {
  background: rgba(22, 163, 74, 0.16) !important;
  color: #0f3d2a !important;
  font-weight: 900;
}

/* Libre: gris más neutro, claramente distinto del azul */
.cal-libre {
  background: rgba(100, 116, 139, 0.14) !important; /* slate */
  color: #1f2937 !important;
  font-weight: 900;
}

/* Faltante: ámbar claro pero con borde interior para destacarlo */
.cal-missing {
  background: rgba(245, 158, 11, 0.18) !important;
  color: #111827 !important;
  font-weight: 900;
  box-shadow: inset 0 0 0 2px rgba(245, 158, 11, 0.25);
}

/* ---------- HOY: marco azul tipo “selección” (como el día 12) ---------- */
.cal-today {
  outline: 3px solid rgba(37, 99, 235, 0.85);
  outline-offset: -3px;
  background: rgba(37, 99, 235, 0.08) !important;
  font-weight: 900;
}

/* ---------- Leyenda: badges más consistentes y “Hoy” con marco azul ---------- */
/* Si tu leyenda es el bloque que mostraste, esto aplica directo */
.mt-4.d-flex.justify-content-center .badge {
  border-radius: 999px;
  padding: .5rem .9rem;
  font-weight: 900;
  border: 1px solid rgba(15, 23, 42, 0.10);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}

/* “Hoy” (bg-light) que no quede “apagado”: marco azul */
.mt-4.d-flex.justify-content-center .badge.bg-light {
  background: rgba(255, 255, 255, 0.85) !important;
  border: 2px solid rgba(37, 99, 235, 0.55) !important;
  color: var(--text) !important;
}

/* ---------- Acciones Marcar/Quitar (alineadas + sin salirse) ---------- */
.cal-actions {
  display: flex;
  gap: .5rem;
  width: 100%;
}

/* Desktop: botones compactos (no gigantes) */
.cal-actions .btn {
  padding: .55rem .85rem;
  border-radius: 12px;
  font-weight: 800;
  white-space: nowrap;
}

/* En móvil: apilar y ocupar ancho completo */
@media (max-width: 768px) {
  .cal-actions {
    flex-direction: column;
  }

  .cal-actions form,
  .cal-actions .btn {
    width: 100%;
  }
}

/* =========================
   Registrar día(s)
   ========================= */
.form-shell{
  display:flex;
  justify-content:center;
  padding: 0;
}

.form-card{
  max-width: 640px;
}

.reg-type-group .btn{
  font-weight: 800;
  border-radius: 12px;
}

.range-preview{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: .75rem;
  padding: .85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(37, 99, 235, 0.05);
}

.range-preview__title{
  font-weight: 900;
  letter-spacing: -0.01em;
}

.range-preview__chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: .35rem .65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: white;
  font-weight: 900;
  min-width: 90px;
}

.range-preview--warn{
  background: rgba(245, 158, 11, 0.10);
  border-color: rgba(245, 158, 11, 0.35);
}

/* =========================
   Registros (móvil cards + tabla desktop)
   ========================= */
.reg-card .reg-date{
  letter-spacing: -0.01em;
}

.reg-meta .fw-semibold{
  letter-spacing: -0.01em;
}

.reg-table-wrap{
  overflow: auto;
  border: 1px solid var(--border);
  background: var(--surface);
}

.reg-table thead th{
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface-2);
}

.reg-table td, .reg-table th{
  vertical-align: middle;
  white-space: nowrap;
}

.reg-action{
  width: 40px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

/* =========================================================
   AUTH (welcome / login / register) — Look & feel producto
   Pegar AL FINAL del style.css
   ========================================================= */

.auth-shell{
  min-height: calc(100vh - 110px); /* respeta padding-top del body por navbar en privadas; en auth no molesta */
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 28px 16px;
}

.auth-card{
  width: 100%;
  max-width: 460px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  padding: 22px;
  position: relative;
  overflow: hidden;
}

/* variantes */
.auth-card--welcome{ max-width: 520px; }
.auth-card--wide{ max-width: 560px; }

.auth-card::before{
  content:"";
  position:absolute;
  inset: 0;
  background:
    radial-gradient(900px 280px at 20% -20%, rgba(37,99,235,.20), transparent 60%),
    radial-gradient(800px 260px at 120% 0%, rgba(6,182,212,.12), transparent 55%);
  pointer-events:none;
}

.auth-card > *{ position: relative; }

.auth-brand{
  display:flex;
  align-items:flex-start;
  gap: 12px;
}

.auth-icon{
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display:flex;
  align-items:center;
  justify-content:center;
  border: 1px solid var(--border);
  background: rgba(37,99,235,.10);
  color: var(--primary);
  font-size: 1.15rem;
  flex: 0 0 auto;
}

.auth-title{
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 0;
}

.auth-subtitle{
  color: var(--muted);
  font-weight: 600;
}

/* Pills de beneficios (welcome) */
.auth-benefits{
  display:flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 14px;
}

.auth-pill{
  display:inline-flex;
  align-items:center;
  gap: .45rem;
  padding: .35rem .65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(15,23,42,.03);
  color: var(--text);
  font-weight: 800;
  font-size: .85rem;
}

.auth-actions{
  display:grid;
  gap: .6rem;
  margin-top: 16px;
}

.auth-divider{
  height: 1px;
  background: rgba(15,23,42,.10);
  margin: 16px 0;
}

.auth-footnote{
  text-align:center;
  color: var(--muted);
  font-weight: 600;
  font-size: .9rem;
}

.auth-mini{
  color: var(--muted);
  font-weight: 600;
  font-size: .9rem;
}

/* Secciones (register) */
.auth-section{
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 16px;
  background: rgba(255,255,255,.65);
  padding: 14px;
}

.auth-section__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom: 10px;
}

.auth-section__title{
  font-weight: 900;
  letter-spacing: -0.01em;
}

.auth-badge{
  border-radius: 999px;
  padding: .25rem .55rem;
  font-size: .8rem;
  font-weight: 900;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(37,99,235,.08);
  color: var(--text);
}

/* Stepper simple (register) */
.auth-stepper{
  display:flex;
  align-items:center;
  gap: .5rem;
  margin-top: 12px;
}

.auth-step{
  font-weight: 900;
  font-size: .85rem;
  color: var(--muted);
  padding: .25rem .55rem;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.6);
}

.auth-step--active{
  color: var(--text);
  background: rgba(37,99,235,.10);
}

.auth-step-sep{
  height: 2px;
  flex: 1;
  background: rgba(15,23,42,.10);
  border-radius: 999px;
}

/* En pantallas pequeñas, menos padding */
@media (max-width: 420px){
  .auth-card{ padding: 18px; }
  .auth-section{ padding: 12px; }
}

/* =========================================================
   layout_auth.html base
   - evita que el body global (privado) afecte a auth
   ========================================================= */
.auth-body{
  padding-top: 0 !important;    /* tu body global tiene padding-top por navbar fixed-top */
  background: var(--bg);
  min-height: 100vh;
}

.auth-layout{
  min-height: 100vh;
  display: block;
}

/* =========================================================
   AUTH (welcome/login/register) - Shell consistente
   ========================================================= */
.auth-body{
  padding-top: 0 !important;            /* evita padding-top global por navbar */
  background: var(--bg);
  min-height: 100vh;
}

.auth-layout{
  min-height: 100vh;
}

.auth-shell{
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

.auth-card{
  width: 100%;
  max-width: 560px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  padding: 22px 22px;
}

.auth-card--narrow{
  max-width: 440px;
}

@media (min-width: 768px){
  .auth-card{ padding: 26px 26px; }
}

.auth-brand{
  text-align: center;
  margin-bottom: 14px;
}

.auth-logo{
  width: 56px;
  height: 56px;
  border-radius: 16px;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(37, 99, 235, 0.10);
  border: 1px solid rgba(37, 99, 235, 0.16);
  color: var(--primary);
  font-size: 22px;
}

.auth-logo--small{
  width: 48px;
  height: 48px;
  border-radius: 14px;
  font-size: 18px;
  margin-bottom: 8px;
}

.auth-title{
  margin: 0;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.auth-title--sm{
  font-size: 1.25rem;
}

.auth-subtitle{
  margin: .35rem 0 0;
  color: var(--muted);
  font-weight: 600;
}

.auth-actions{
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.auth-divider{
  height: 1px;
  background: rgba(15, 23, 42, 0.10);
  margin: 18px 0;
}

.auth-footnote{
  text-align: center;
  color: var(--muted);
  font-weight: 600;
  font-size: .9rem;
}

.auth-section{
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(15, 23, 42, 0.02);
  border-radius: 16px;
  padding: 14px 14px;
  margin-bottom: 12px;
}

.auth-section__head{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.auth-section__title{
  font-weight: 900;
  letter-spacing: -0.01em;
}

.auth-section__hint{
  color: var(--muted);
  font-weight: 700;
  font-size: .85rem;
}

/* Auth pages: evita que el padding-top del layout privado afecte */
.auth-body{
  padding-top: 0 !important;
  background: var(--bg);
  min-height: 100vh;
}

.auth-layout{
  min-height: 100vh;
}

/* =========================
   AUTH (welcome / login / registro)
   - Card moderna, centrada y consistente
   ========================= */
.auth-body{
  padding-top: 0 !important;        /* evita el padding del layout privado */
  background: radial-gradient(1200px 500px at 55% 40%, rgba(37,99,235,.10), transparent 55%),
              radial-gradient(900px 420px at 35% 55%, rgba(6,182,212,.10), transparent 60%),
              var(--bg);
  min-height: 100vh;
}

.auth-layout{
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 14px;
}

.auth-shell{
  width: 100%;
  display: flex;
  justify-content: center;
}

.auth-card{
  width: 100%;
  max-width: 760px;                 /* más ancho en PC para que no se vea “mini” */
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 22px;
  box-shadow: 0 18px 45px rgba(15,23,42,.12);
  padding: 24px;
  backdrop-filter: blur(10px);
}

@media (min-width: 768px){
  .auth-card{ padding: 28px; }
}

.auth-brand{
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

.auth-logo{
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(37,99,235,.10);
  border: 1px solid rgba(37,99,235,.20);
  color: var(--primary);
  font-size: 1.4rem;
}

.auth-title{
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.05;
}

.auth-subtitle{
  color: var(--muted);
  font-weight: 600;
  margin: 0;
  max-width: 52ch;
}

.auth-actions{
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 14px;
}

@media (min-width: 768px){
  .auth-actions{
    grid-template-columns: 1fr 1fr; /* en PC se ve mejor en 2 columnas */
  }
}

.auth-divider{
  height: 1px;
  width: 100%;
  background: rgba(15,23,42,.10);
  margin: 18px 0 12px;
}

.auth-footnote{
  text-align: center;
  color: var(--muted);
  font-weight: 600;
  font-size: .92rem;
}

/* Inputs en auth: un pelín más “premium” */
.auth-card .form-control,
.auth-card .form-select{
  border-radius: 14px;
}

/* Botones más coherentes con el look */
.auth-card .btn{
  border-radius: 14px;
  font-weight: 800;
}

/* =========================
   AUTH - refinamientos (login/registro)
   ========================= */

/* Card más estrecha para login */
.auth-card--narrow{
  max-width: 520px;  /* antes era demasiado mini; aquí queda “pro” en 15" */
}

/* Header del auth en modo “stack” (centrado) */
.auth-brand--stack{
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
}

/* Variante small del logo */
.auth-logo--small{
  width: 48px;
  height: 48px;
  border-radius: 14px;
  font-size: 1.15rem;
}

/* Título pequeño */
.auth-title--sm{
  font-size: 1.35rem;
}

/* Input-group del ojo: que parezca integrado */
.auth-input-group .form-control{
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.auth-input-group .btn{
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  padding-left: .85rem;
  padding-right: .85rem;
}

/* Register header: split limpio (icono izq + copy der) */
.auth-brand--split{
  grid-template-columns: 56px 1fr;
  align-items: start;
}

.auth-brand__copy{
  text-align: center;           /* centra el título/subtítulo */
  padding-top: 2px;
}

@media (min-width: 768px){
  .auth-brand__copy{
    text-align: center;         /* se mantiene centrado en desktop */
  }
}
