/* Componentes reutilizables (CSS normal: el CDN de Tailwind no procesa @apply en archivos externos) */

.lbl {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.25rem;
}

.inp {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    background: #fff;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.inp:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, .2); }
.inp:disabled { background: #f1f5f9; color: #64748b; }

.btn-primario, .btn-secundario, .btn-peligro {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    font-weight: 700;
    font-size: 0.875rem;
    padding: 0.5rem 1.25rem;
    border-radius: 0.5rem;
    transition: background-color .15s, color .15s;
    white-space: nowrap;
}
.btn-primario { background: #2563eb; color: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.btn-primario:hover { background: #1d4ed8; }
.btn-primario:disabled { background: #93c5fd; cursor: wait; }
.btn-secundario { background: #fff; color: #334155; border: 1px solid #cbd5e1; }
.btn-secundario:hover { background: #f1f5f9; }
.btn-peligro { background: #fff1f2; color: #e11d48; }
.btn-peligro:hover { background: #ffe4e6; color: #be123c; }

.tarjeta {
    background: #fff;
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid #f1f5f9;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

.titulo-vista { font-size: 1.5rem; font-weight: 700; color: #0f172a; }
.subtitulo-vista { font-size: 0.875rem; color: #64748b; margin-top: 0.25rem; }
.titulo-bloque { font-size: 1.05rem; font-weight: 700; color: #0f172a; display: flex; align-items: center; gap: 0.5rem; }
.kpi-label { font-size: 0.7rem; font-weight: 600; color: #94a3b8; text-transform: uppercase; letter-spacing: .03em; }

.tabla { width: 100%; text-align: left; font-size: 0.875rem; }
.tabla thead { background: #f8fafc; color: #334155; text-transform: uppercase; font-size: 10px; }
.tabla th, .tabla td { padding: 0.7rem 0.75rem; }
.tabla tbody tr { border-top: 1px solid #f1f5f9; }
.tabla tbody tr.fila-click { cursor: pointer; }
.tabla tbody tr.fila-click:hover { background: #f8fafc; }

.pestana { white-space: nowrap; padding: 0.6rem 1rem; font-size: 0.875rem; font-weight: 600; color: #64748b; border-bottom: 2px solid transparent; }
.pestana:hover { color: #0f172a; }
.pestana.activa { color: #2563eb; border-bottom-color: #2563eb; }

.filtro { padding: 0.35rem 0.8rem; font-size: 0.8rem; font-weight: 600; border-radius: 9999px; color: #475569; background: #fff; border: 1px solid #e2e8f0; }
.filtro.activo { background: #0f172a; color: #fff; border-color: #0f172a; }

.barra-progreso { height: 6px; background: #f1f5f9; border-radius: 9999px; overflow: hidden; }
.barra-progreso > div { height: 100%; border-radius: 9999px; transition: width .4s; }

details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }

/* Barra inferior del móvil */
.nav-movil-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0.5rem 0.25rem 0.45rem; font-size: 10px; font-weight: 600; color: #64748b; position: relative; min-height: 56px; }
.nav-movil-btn i { font-size: 1.15rem; }
.nav-movil-btn.activo { color: #2563eb; }
.nav-movil-btn .punto { position: absolute; top: 6px; right: calc(50% - 16px); width: 8px; height: 8px; border-radius: 9999px; background: #f43f5e; border: 2px solid #fff; }

/* Ajustes para pantallas de teléfono */
@media (max-width: 767px) {
    /* 16px evita que el iPhone haga zoom al tocar un campo */
    .inp, #asis-pregunta, select, textarea, input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="search"], input[type="date"] { font-size: 16px; }
    .tarjeta { padding: 1rem; border-radius: 0.875rem; }
    .titulo-vista { font-size: 1.25rem; }
    .btn-primario, .btn-secundario, .btn-peligro { min-height: 42px; }
    #modal-contenido .p-6 { padding: 1rem; }
    #modal-contenido .px-6 { padding-left: 1rem; padding-right: 1rem; }
    .tabla th, .tabla td { padding: 0.6rem 0.5rem; white-space: nowrap; }
}
#toasts > div { pointer-events: auto; }
