/* Coordinación con la Empresa · identidad visual. Primario: azul petróleo (no choca con BoleterÍA ni Kiosko). */
:root {
  --brand: #0b6e79;
  --brand-oscuro: #08545c;
  --brand-claro: #e3f2f3;
  --texto: #1f2a37;
  --texto-suave: #5b6675;
  --fondo: #f4f6f8;
  --card: #ffffff;
  --borde: #e2e6ea;
  --verde: #1f8a4c;
  --amarillo: #b98900;
  --naranja: #c7621a;
  --rojo: #c0392b;
  --azul: #2563a8;
  --gris: #7a8591;
}

body {
  background: var(--fondo);
  color: var(--texto);
  font-size: 15px;
}

.marca { color: var(--brand); font-weight: 700; }

/* Barra superior */
.barra-principal { background: var(--card); border-bottom: 1px solid var(--borde); }
.barra-principal .navbar-brand { display: flex; align-items: center; gap: .5rem; font-size: 1.05rem; }
.barra-principal .navbar-brand i { font-size: 1.4rem; }
.barra-principal .nav-link { color: var(--texto-suave); border-radius: 8px; padding: .4rem .75rem; }
.barra-principal .nav-link:hover { color: var(--brand); }
.barra-principal .nav-link.active { color: var(--brand); background: var(--brand-claro); font-weight: 600; }
.btn-usuario { border: 1px solid var(--borde); color: var(--texto); background: var(--card); }
.etiqueta-colegio { font-size: .85rem; color: var(--texto-suave); }

.barra-suplantacion {
  background: #fff3cd; color: #664d03; border-bottom: 1px solid #ffe69c;
  display: flex; justify-content: center; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: .4rem 1rem; font-size: .9rem;
}

.contenido { max-width: 1400px; margin: 0 auto; }

/* Botones */
.btn-marca { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-marca:hover, .btn-marca:focus { background: var(--brand-oscuro); border-color: var(--brand-oscuro); color: #fff; }
.btn-nuevo {
  background: var(--brand); color: #fff; border: none; border-radius: 8px;
  padding: 8px 16px; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.btn-nuevo:hover { background: var(--brand-oscuro); }
.btn-nuevo:disabled { opacity: .5; }

/* Tarjetas y listas */
.tarjeta { background: var(--card); border: 1px solid var(--borde); border-radius: 12px; padding: 1.25rem; }
.tarjeta-dato { display: flex; align-items: center; gap: 1rem; }
.tarjeta-dato > i { font-size: 1.8rem; color: var(--brand); background: var(--brand-claro); border-radius: 10px; padding: .5rem; }
.dato-valor { font-size: 1.6rem; font-weight: 700; line-height: 1; }
.dato-etiqueta { font-size: .8rem; color: var(--texto-suave); }

.fila-lista {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: .7rem 0; border-bottom: 1px solid var(--borde);
}
.fila-lista:last-child { border-bottom: none; }
.fila-contenido { min-width: 0; }
.fila-titulo { font-weight: 600; }
.fila-detalle { font-size: .82rem; color: var(--texto-suave); overflow-wrap: anywhere; }
.fila-acciones { display: flex; gap: .35rem; flex-shrink: 0; }

.badge-estado { display: inline-block; font-size: .72rem; font-weight: 600; padding: .15rem .5rem; border-radius: 999px; vertical-align: middle; }
.badge-estado-verde { background: #e3f4ea; color: var(--verde); }
.badge-estado-amarillo { background: #fff4d6; color: var(--amarillo); }
.badge-estado-naranja { background: #fde9dc; color: var(--naranja); }
.badge-estado-rojo { background: #fbe5e2; color: var(--rojo); }
.badge-estado-azul { background: #e2ecf8; color: var(--azul); }
.badge-estado-gris { background: #eceff2; color: var(--gris); }

.punto { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; margin-right: .5rem; vertical-align: middle; }
.punto-verde { background: var(--verde); }
.punto-amarillo { background: var(--amarillo); }
.punto-naranja { background: var(--naranja); }
.punto-rojo { background: var(--rojo); }
.punto-azul { background: var(--azul); }
.punto-gris { background: var(--gris); }

.tabla th { font-size: .75rem; text-transform: uppercase; color: var(--texto-suave); font-weight: 600; }
.tabla td { font-size: .85rem; vertical-align: middle; }

/* Formularios */
.campo-label { display: block; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--texto-suave); margin-bottom: .25rem; }
.seccion-form { width: 100%; margin: .5rem 0 0; font-weight: 700; font-size: .85rem; color: var(--brand); border-bottom: 1px solid var(--borde); padding-bottom: .25rem; }
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 .2rem rgba(11, 110, 121, .15); }

/* Modal del patrón listado + modal */
.modal-fondo {
  display: none; position: fixed; inset: 0; background: rgba(31, 42, 55, .45);
  z-index: 1050; align-items: center; justify-content: center; padding: 1rem;
}
.modal-fondo.activo { display: flex; }
.modal-caja { background: var(--card); border-radius: 14px; padding: 1.5rem; width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; }
.modal-caja.modal-ancho { max-width: 820px; }
.modal-titulo { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; }
.modal-cerrar { background: none; border: none; color: var(--texto-suave); font-size: 20px; cursor: pointer; }

.clave-temporal {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.4rem; letter-spacing: .1em;
  background: var(--brand-claro); color: var(--brand-oscuro); border-radius: 10px; padding: .75rem; text-align: center; user-select: all;
}

/* Acceso */
.fondo-acceso { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; background: linear-gradient(160deg, var(--brand-claro), var(--fondo)); }
.caja-acceso { width: 100%; max-width: 400px; background: var(--card); border: 1px solid var(--borde); border-radius: 16px; padding: 2rem; }
.logo-acceso { display: inline-flex; font-size: 2.2rem; color: #fff; background: var(--brand); border-radius: 14px; padding: .6rem; margin-bottom: .75rem; }
.caja-acceso .btn-outline-secondary { border-color: var(--borde); color: var(--texto); }
.caja-acceso .btn-outline-secondary:hover { background: var(--brand-claro); border-color: var(--brand); color: var(--brand-oscuro); }
.caja-acceso .btn-outline-secondary:hover .text-muted { color: var(--brand-oscuro) !important; }

/* Datos maestros */
.subnav .nav-link { font-size: .85rem; padding: .3rem .75rem; color: var(--brand); }
.subnav .nav-link.active { background: var(--brand); color: #fff; }
.lista-marcar { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .25rem .75rem; max-height: 220px; overflow-y: auto; border: 1px solid var(--borde); border-radius: .5rem; padding: .5rem .75rem; }
.filtro-semaforo { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .5rem; }
.filtro-semaforo button { border: 1px solid var(--borde); background: #fff; border-radius: 999px; font-size: .78rem; padding: .15rem .65rem; }
.filtro-semaforo button.active { border-color: var(--brand); background: var(--brand); color: #fff; }
.fila-esp { display: grid; grid-template-columns: 1fr 90px 90px 32px; gap: .5rem; align-items: center; }
.historial { max-height: 260px; overflow-y: auto; }
