/* Althino · ajustes sobre la plantilla (backend.css). Mismo lenguaje visual de FisioPower. */

/* ---------- Layout (correcciones heredadas de FisioPower) ---------- */
.iq-sidebar.sidebar-default { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
.iq-sidebar.sidebar-default .iq-sidebar-logo { flex: none; }
.iq-sidebar.sidebar-default .data-scrollbar { flex: 1 1 auto; min-height: 0; height: auto; overflow-y: auto; }
.iq-sidebar.sidebar-default .iq-sidebar-menu { padding-bottom: 1.5rem; }
@media (min-width: 1300px) {
  body.sidebar-main .iq-sidebar:not(:hover) .iq-menu .iq-menu-title span { display: none; }
  body.sidebar-main .iq-sidebar:not(:hover) .iq-menu .iq-menu-title::before { content: ""; display: block; width: 24px; border-top: 1px solid #dfe3ec; }
}
.al-logo { width: 150px; height: auto; }
.al-menu-icono { font-size: 1.35rem; line-height: 1; flex: none; width: 25px; text-align: center; }
.al-nav-icono { font-size: 1.3rem; }
.al-condo-nombre { font-size: 1rem; }
.al-icono-grande { font-size: 4rem; }
.al-logo-auth { background: #fff; border-radius: 12px; padding: 4px; }

/* Avatar con iniciales */
.al-avatar {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--iq-primary, #5773FF); color: #fff; font-weight: 700; font-size: .9rem; flex: none;
}
.al-avatar.sm { width: 32px; height: 32px; font-size: .75rem; }

/* Notificaciones */
.al-notif-contador { position: absolute; top: 8px; right: 0; font-size: .6rem; }
.al-notif-lista { max-height: 360px; overflow-y: auto; min-width: 320px; }
.al-notif-punto { width: 8px; height: 8px; border-radius: 50%; background: #dee2e6; flex: none; align-self: flex-start; margin-top: 6px; }
.al-notif-punto.activo { background: var(--iq-primary, #5773FF); }

/* ---------- Números y tablas ---------- */
.al-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.table td, .table th { vertical-align: middle; }
.al-tabla thead th { white-space: nowrap; }
.al-badge-suave { background: #eef1ff; color: #3f5bea; font-weight: 600; }
.al-total-fila td { font-weight: 700; border-top: 2px solid #dfe3ec; }
.dataTables_wrapper .dataTables_filter input { margin-left: .5rem; }

/* ---------- KPI del dashboard ---------- */
.al-kpi .card-body { display: flex; align-items: center; gap: 1rem; }
.al-kpi-icono {
  width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; flex: none;
}
.al-kpi-etiqueta { color: #6c757d; font-size: .85rem; }
.al-kpi-valor { font-size: 1.55rem; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.al-kpi-pie { font-size: .8rem; }
.al-bg-primario { background: #eef1ff; color: #3f5bea; }
.al-bg-exito { background: #e7f6ee; color: #1d7a48; }
.al-bg-alerta { background: #fff4e0; color: #a26200; }
.al-bg-peligro { background: #fdecea; color: #b42318; }
.al-bg-info { background: #e6f6fb; color: #0b6e8c; }

/* Medidor simple */
.al-meter { display: block; height: 8px; border-radius: 4px; background: #eef1f6; overflow: hidden; }
.al-meter > span { display: block; height: 100%; background: var(--iq-primary, #5773FF); border-radius: 4px; }
.al-meter.exito > span { background: #3aa76d; }
.al-meter.alerta > span { background: #f0a020; }

.al-vacio { text-align: center; color: #8a94a6; padding: 2rem 1rem; }
.al-vacio i { font-size: 2.5rem; display: block; margin-bottom: .5rem; opacity: .6; }

/* ---------- Formularios ---------- */
.bootstrap-select.is-invalid .dropdown-toggle { border-color: #dc3545 !important; }
.invalid-feedback:not(:empty) { display: block; }
.al-paso { display: flex; align-items: center; gap: .5rem; font-weight: 600; margin-bottom: .75rem; }
.al-paso span { width: 26px; height: 26px; border-radius: 50%; background: var(--iq-primary, #5773FF); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; }
.al-equivalente { background: #f6f8ff; border: 1px dashed #b9c4ff; border-radius: 8px; padding: .75rem 1rem; }
.al-partidas td { padding: .35rem .5rem; }
.al-partidas input, .al-partidas select { min-width: 90px; }

/* ---------- Timeline (tickets) ---------- */
.al-timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.al-timeline::before { content: ""; position: absolute; left: 15px; top: 0; bottom: 0; width: 2px; background: #e6e9f2; }
.al-timeline li { position: relative; padding-left: 44px; margin-bottom: 1.1rem; }
.al-timeline .al-avatar { position: absolute; left: 0; top: 0; }
.al-timeline .al-interno { background: #fff8e6; border-radius: 6px; padding: .4rem .6rem; }

/* ---------- Calendario de reservas ---------- */
.al-cal { display: grid; grid-template-columns: repeat(7, 1fr); border-top: 1px solid #e6e9f2; border-left: 1px solid #e6e9f2; }
.al-cal-cab { background: #f6f8ff; font-weight: 700; text-align: center; padding: .4rem; font-size: .8rem; border-right: 1px solid #e6e9f2; border-bottom: 1px solid #e6e9f2; }
.al-cal-dia { min-height: 96px; padding: .3rem; border-right: 1px solid #e6e9f2; border-bottom: 1px solid #e6e9f2; cursor: pointer; transition: background .12s; }
.al-cal-dia:hover { background: #f6f8ff; }
.al-cal-dia.fuera { background: #fafbfc; color: #b5bdcc; cursor: default; }
.al-cal-dia.hoy .al-cal-num { background: var(--iq-primary, #5773FF); color: #fff; }
.al-cal-dia.pasado { cursor: default; }
.al-cal-num { display: inline-block; min-width: 24px; text-align: center; border-radius: 12px; font-weight: 700; font-size: .8rem; }
.al-cal-evento { display: block; font-size: .7rem; border-radius: 4px; padding: 1px 4px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.al-cal-evento.aprobada { background: #3aa76d; }
.al-cal-evento.solicitada { background: #f0a020; }
@media (max-width: 767px) { .al-cal-dia { min-height: 60px; } .al-cal-evento { font-size: .6rem; } }

/* ---------- Pase QR ---------- */
.al-qr { display: inline-block; padding: 12px; background: #fff; border-radius: 12px; border: 1px solid #e6e9f2; }
.al-codigo-corto { font-size: 2rem; letter-spacing: .4rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.al-resultado-acceso { border-radius: 12px; padding: 1.5rem; text-align: center; }
.al-resultado-acceso.permitido { background: #e7f6ee; color: #1d7a48; }
.al-resultado-acceso.denegado { background: #fdecea; color: #b42318; }
.al-resultado-acceso i { font-size: 3.5rem; }
#al-lector { max-width: 420px; margin: 0 auto; }

/* ---------- Votaciones ---------- */
.al-opcion-voto { border: 2px solid #e6e9f2; border-radius: 10px; padding: .75rem 1rem; margin-bottom: .5rem; cursor: pointer; display: flex; align-items: center; gap: .75rem; }
.al-opcion-voto:hover { border-color: #b9c4ff; }
.al-opcion-voto input:checked + span { font-weight: 700; color: #3f5bea; }

/* ---------- Cartelera ---------- */
.al-anuncio.importante { border-left: 4px solid #e3533c; }
.al-anuncio .al-anuncio-cuerpo { white-space: pre-line; }

/* ---------- Impresión (recibos, estados de cuenta) ---------- */
@media print {
  .iq-sidebar, .iq-top-navbar, .iq-footer, .no-print, #loading { display: none !important; }
  .content-page { margin: 0 !important; padding: 0 !important; }
  .card { box-shadow: none !important; border: 0 !important; }
  body { background: #fff !important; }
}

/* La plantilla capitaliza cada palabra del menú; Althino usa mayúscula inicial normal */
.iq-sidebar-menu .iq-menu li a span, .iq-sidebar-menu .iq-menu .iq-menu-title span { text-transform: none; }
.al-kpi .flex-fill { text-align: left; min-width: 0; }
.al-tabla td:first-child { white-space: nowrap; font-weight: 600; }

/* Filtros de fecha en barras de herramientas (flatpickr crea un input alterno sin el ancho original) */
.al-filtro-fecha { width: 135px; }
.al-filtro-fecha .form-control { height: calc(1.5em + .75rem + 2px); }
