/* Portal de Farmacias - Colegio de Farmacéuticos de Catamarca */

:root {
    --marca: #0f766e;
    --marca-oscura: #115e59;
    --marca-suave: #ccfbf1;
    --sidebar-bg: #0b3b3a;
    --sidebar-texto: #b6d7d4;
    --sidebar-activo: #14b8a6;
    --fondo: #f4f6f8;
    --tarjeta: #ffffff;
    --borde: #e5e7eb;
    --ok: #15803d;
    --pendiente: #b45309;
    --peligro: #b91c1c;
    --sidebar-ancho: 260px;
    --bs-font-sans-serif: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --bs-primary: var(--marca);
    --bs-primary-rgb: 15, 118, 110;
    --bs-link-color: var(--marca);
    --bs-link-color-rgb: 15, 118, 110;
    --bs-link-hover-color: var(--marca-oscura);
}

[data-bs-theme="dark"] {
    --marca: #2dd4bf;
    --marca-oscura: #5eead4;
    --marca-suave: rgba(45, 212, 191, .15);
    --sidebar-bg: #0a1514;
    --fondo: #0f1417;
    --tarjeta: #161d21;
    --borde: #263238;
    --ok: #4ade80;
    --pendiente: #fbbf24;
    --peligro: #f87171;
    --bs-primary-rgb: 45, 212, 191;
    --bs-link-color-rgb: 45, 212, 191;
    --bs-body-bg: var(--fondo);
}

body {
    background: var(--fondo);
    font-size: .925rem;
}

/* ---------- Estructura ---------- */

.app { display: flex; min-height: 100vh; }

.app-sidebar {
    width: var(--sidebar-ancho);
    /* !important: Bootstrap pone .offcanvas-lg transparente en pantallas grandes */
    background: var(--sidebar-bg) !important;
    color: var(--sidebar-texto);
    display: flex;
    flex-direction: column;
}
@media (min-width: 992px) {
    .app-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        visibility: visible !important;
        transform: none !important;
    }
    .app-main { margin-left: var(--sidebar-ancho); }
}
@media (max-width: 991.98px) {
    .app-sidebar.offcanvas-lg { --bs-offcanvas-width: var(--sidebar-ancho); background: var(--sidebar-bg); }
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1.25rem 1.25rem 1rem;
    color: #fff;
}
.brand-icon {
    width: 40px; height: 40px;
    border-radius: 12px;
    display: grid; place-items: center;
    background: linear-gradient(135deg, #14b8a6, #0f766e);
    font-size: 1.25rem;
    flex-shrink: 0;
}
.brand-logo { background: #fff; }
.brand-logo img { width: 28px; height: 28px; object-fit: contain; }
.brand-title { font-weight: 700; line-height: 1.1; }
.brand-sub { font-size: .75rem; opacity: .7; }

.sidebar-nav { padding: .5rem .75rem; flex: 1; overflow-y: auto; }
.nav-section {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    opacity: .55;
    margin: 1rem .75rem .4rem;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .55rem .75rem;
    border-radius: 10px;
    color: var(--sidebar-texto);
    text-decoration: none;
    font-weight: 500;
    transition: background .15s, color .15s;
}
.nav-item i { font-size: 1.05rem; width: 1.2rem; text-align: center; }
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item.active { background: rgba(20, 184, 166, .18); color: #fff; box-shadow: inset 3px 0 0 var(--sidebar-activo); }
.sidebar-foot { font-size: .7rem; opacity: .5; padding: 1rem 1.25rem; }

.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.app-topbar {
    position: sticky; top: 0; z-index: 1020;
    display: flex; align-items: center; gap: .75rem;
    padding: .75rem 1.5rem;
    background: color-mix(in srgb, var(--tarjeta) 88%, transparent);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--borde);
}
.topbar-title strong { font-weight: 600; }
.btn-icon {
    width: 38px; height: 38px;
    border-radius: 10px;
    display: inline-grid; place-items: center;
    border: 1px solid var(--borde);
    background: var(--tarjeta);
    color: var(--bs-body-color);
    padding: 0;
}
.btn-icon:hover { border-color: var(--marca); color: var(--marca); }
.btn-user {
    display: inline-flex; align-items: center; gap: .5rem;
    border: 1px solid var(--borde);
    background: var(--tarjeta);
    border-radius: 999px;
    padding: .2rem .75rem .2rem .25rem;
}
.avatar {
    width: 30px; height: 30px; border-radius: 50%;
    display: inline-grid; place-items: center;
    background: var(--marca); color: #fff; font-weight: 600; font-size: .85rem;
}
[data-bs-theme="dark"] .avatar { color: #062523; }

.viendo-como {
    display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
    background: #fef3c7; color: #78350f;
    padding: .5rem 1.5rem;
    border-bottom: 1px solid #fcd34d;
    font-size: .875rem;
}
[data-bs-theme="dark"] .viendo-como { background: #422006; color: #fde68a; border-color: #78350f; }

.app-content { padding: 1.5rem; max-width: 1400px; width: 100%; }
@media (max-width: 575.98px) { .app-content { padding: 1rem; } .app-topbar { padding: .75rem 1rem; } }

/* ---------- Componentes ---------- */

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-head h1 { font-size: 1.5rem; font-weight: 700; margin: 0; }
.page-head p { margin: .25rem 0 0; color: var(--bs-secondary-color); }

.card {
    --bs-card-bg: var(--tarjeta);
    --bs-card-border-color: var(--borde);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.card-header { background: transparent; border-bottom-color: var(--borde); padding: 1rem 1.25rem; font-weight: 600; }
.card-header .sub { font-weight: 400; color: var(--bs-secondary-color); font-size: .85rem; }

.kpi { padding: 1.1rem 1.25rem; height: 100%; }
.kpi-label { font-size: .8rem; color: var(--bs-secondary-color); font-weight: 500; display: flex; align-items: center; gap: .4rem; }
.kpi-valor { font-size: 1.5rem; font-weight: 700; margin-top: .35rem; letter-spacing: -.01em; }
.kpi-pie { font-size: .8rem; color: var(--bs-secondary-color); margin-top: .25rem; }
.kpi-icono {
    width: 34px; height: 34px; border-radius: 10px;
    display: inline-grid; place-items: center;
    font-size: 1rem;
}
.ic-marca { background: var(--marca-suave); color: var(--marca); }
.ic-ok { background: rgba(21, 128, 61, .12); color: var(--ok); }
.ic-pend { background: rgba(180, 83, 9, .12); color: var(--pendiente); }
.ic-peligro { background: rgba(185, 28, 28, .12); color: var(--peligro); }

.table { --bs-table-bg: transparent; margin-bottom: 0; }
.table > thead th {
    font-size: .75rem; text-transform: uppercase; letter-spacing: .04em;
    color: var(--bs-secondary-color); font-weight: 600;
    border-bottom-width: 1px; white-space: nowrap;
    background: var(--tarjeta);
}
.table td, .table th { padding: .65rem .9rem; vertical-align: middle; }
.table tfoot td { font-weight: 700; border-top: 2px solid var(--borde); }
.table-hover > tbody > tr:hover > * { --bs-table-bg-state: var(--marca-suave); }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
th[data-orden] { cursor: pointer; user-select: none; }
th[data-orden]::after { content: '\F282'; font-family: 'bootstrap-icons'; opacity: .3; margin-left: .3rem; font-size: .7rem; }
th[data-orden].asc::after { content: '\F286'; opacity: .9; }
th[data-orden].desc::after { content: '\F282'; opacity: .9; }

.estado {
    display: inline-flex; align-items: center; gap: .3rem;
    font-size: .75rem; font-weight: 600;
    padding: .2rem .55rem; border-radius: 999px; white-space: nowrap;
}
.estado-ok { background: rgba(21, 128, 61, .12); color: var(--ok); }
.estado-pend { background: rgba(180, 83, 9, .12); color: var(--pendiente); }
.estado-neutro { background: var(--bs-secondary-bg); color: var(--bs-secondary-color); }

.chip-liq {
    display: inline-block; font-size: .75rem; padding: .1rem .45rem; border-radius: 6px;
    background: var(--marca-suave); color: var(--marca); text-decoration: none; margin: .1rem .15rem .1rem 0; white-space: nowrap;
}
.chip-liq:hover { background: var(--marca); color: #fff; }

.filtros { display: flex; gap: .5rem; flex-wrap: wrap; align-items: end; }
.filtros .form-select, .filtros .form-control { min-width: 120px; }

.vacio { text-align: center; padding: 3rem 1rem; color: var(--bs-secondary-color); }
.vacio i { font-size: 2.25rem; display: block; margin-bottom: .5rem; opacity: .5; }

.aviso { border-left: 4px solid; border-radius: 10px; }

.progress-liq { height: 6px; border-radius: 99px; background: rgba(180, 83, 9, .2); }
.progress-liq .progress-bar { background: var(--ok); }

.btn-primary {
    --bs-btn-bg: var(--marca); --bs-btn-border-color: var(--marca);
    --bs-btn-hover-bg: var(--marca-oscura); --bs-btn-hover-border-color: var(--marca-oscura);
    --bs-btn-active-bg: var(--marca-oscura); --bs-btn-active-border-color: var(--marca-oscura);
}
[data-bs-theme="dark"] .btn-primary { --bs-btn-color: #062523; --bs-btn-hover-color: #062523; --bs-btn-active-color: #062523; }
.btn-outline-primary {
    --bs-btn-color: var(--marca); --bs-btn-border-color: var(--marca);
    --bs-btn-hover-bg: var(--marca); --bs-btn-hover-border-color: var(--marca);
    --bs-btn-active-bg: var(--marca); --bs-btn-active-border-color: var(--marca);
}
.form-control:focus, .form-select:focus { border-color: var(--marca); box-shadow: 0 0 0 .2rem var(--marca-suave); }

.chart-box { position: relative; height: 280px; }

/* ---------- Explicación del recibo ---------- */

.barras { display: flex; flex-direction: column; gap: 1.1rem; }
.barra-etiqueta { display: flex; justify-content: space-between; gap: .5rem; font-size: .85rem; margin-bottom: .3rem; }
.barra-etiqueta span { color: var(--bs-secondary-color); }
.barra-pista { display: flex; height: 22px; border-radius: 6px; background: var(--bs-secondary-bg); overflow: hidden; }
.barra { height: 100%; min-width: 2px; }
.barra-leyenda { display: flex; flex-wrap: wrap; gap: .25rem 1rem; font-size: .75rem; color: var(--bs-secondary-color); margin-top: .35rem; }
.punto { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: .3rem; vertical-align: middle; }
.seg-cobrado { background: #16a34a; }
.seg-aplicado { background: #f59e0b; }
.seg-rojo { background: repeating-linear-gradient(45deg, #dc2626 0 6px, #ef4444 6px 12px); }
.seg-neto { background: var(--marca); }
.barra, .punto { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

.pasos { list-style: none; counter-reset: paso; padding: 0; margin: 0 0 .75rem; }
.pasos li { counter-increment: paso; position: relative; padding: 0 0 .8rem 2.3rem; line-height: 1.5; }
.pasos li::before {
    content: counter(paso);
    position: absolute; left: 0; top: 0;
    width: 1.6rem; height: 1.6rem; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--marca-suave); color: var(--marca); font-weight: 700; font-size: .8rem;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.pasos li.paso-rojo::before { background: rgba(220, 38, 38, .12); color: var(--peligro); }
.pasos li.paso-rojo { color: var(--bs-body-color); }

/* ---------- Informes ---------- */

.ic-cobrado { background: rgba(22, 163, 74, .12); color: #16a34a; }
.ic-nc { background: rgba(217, 119, 6, .12); color: #d97706; }
.ic-consultas { background: rgba(219, 39, 119, .12); color: #db2777; }
.var-sube { color: var(--ok); font-weight: 600; white-space: nowrap; }
.var-baja { color: var(--peligro); font-weight: 600; white-space: nowrap; }
@media print { .chart-box { height: 240px !important; } .border-start { border: 0 !important; } }

/* ---------- Semáforo OSEP ---------- */

.semaforo { overflow: hidden; border-width: 2px; }
.semaforo-ok { --sem: #15803d; --sem-suave: rgba(21, 128, 61, .1); border-color: #15803d; }
.semaforo-atencion { --sem: #d97706; --sem-suave: rgba(217, 119, 6, .1); border-color: #d97706; }
.semaforo-riesgo { --sem: #dc2626; --sem-suave: rgba(220, 38, 38, .08); border-color: #dc2626; }
.semaforo-estado {
    background: var(--sem); color: #fff; padding: 1.5rem;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.semaforo-icono { font-size: 2.6rem; line-height: 1; }
.semaforo-riesgo .semaforo-icono { animation: latido 1.6s ease-in-out infinite; }
@keyframes latido { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .semaforo-icono { animation: none !important; } }
.semaforo-sub { font-size: .8rem; opacity: .85; text-transform: uppercase; letter-spacing: .04em; }
.semaforo-titular { font-size: 1.35rem; font-weight: 700; line-height: 1.25; }

.medidor-pista { position: relative; display: flex; height: 14px; border-radius: 99px; background: rgba(255,255,255,.25); margin: .9rem 0 .2rem; }
.medidor-ticks { position: relative; height: 1.1rem; font-size: .72rem; opacity: .85; margin-bottom: .5rem; }
.medidor-ticks span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.medidor-ticks span:first-child { transform: none; }
.medidor-ticks span:last-child { transform: translateX(-100%); }
.medidor-leyenda { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; font-size: .85rem; }
.medidor-leyenda i { display: inline-block; width: 4px; height: 14px; border-radius: 2px; margin-right: .4rem; vertical-align: -2px; }
.ley-act { background: #fff; box-shadow: 0 0 0 2px rgba(0,0,0,.35); }
.ley-ant { background: rgba(255,255,255,.6); }
.medidor-pista .zona { height: 100%; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.zona-ok { background: #4ade80; border-radius: 99px 0 0 99px; }
.zona-atencion { background: #fbbf24; }
.zona-riesgo { background: #f87171; border-radius: 0 99px 99px 0; }
.marca { position: absolute; top: -6px; width: 4px; height: 26px; margin-left: -2px; border-radius: 2px; }
.marca-act { background: #fff; box-shadow: 0 0 0 2px rgba(0,0,0,.35); }
.marca-ant { background: rgba(255,255,255,.6); height: 20px; top: -3px; }

.alertas-osep { list-style: none; padding: 0; margin: 0; }
.alertas-osep li { display: flex; gap: .7rem; align-items: flex-start; padding: .55rem 0; border-bottom: 1px solid var(--borde); }
.alertas-osep li:last-child { border-bottom: 0; }
.alertas-osep li > i { font-size: 1.1rem; margin-top: .1rem; }
.alerta-ok > i { color: #16a34a; }
.alerta-atencion > i { color: #d97706; }
.alerta-riesgo > i { color: #dc2626; }
.badge-nivel { font-size: .68rem; font-weight: 600; padding: .1rem .45rem; border-radius: 99px; margin-left: .3rem; vertical-align: middle; }
.alerta-ok .badge-nivel { background: rgba(22, 163, 74, .12); color: #16a34a; }
.alerta-atencion .badge-nivel { background: rgba(217, 119, 6, .12); color: #b45309; }
.alerta-riesgo .badge-nivel { background: rgba(220, 38, 38, .1); color: #dc2626; }
.semaforo-recomendaciones { background: var(--sem-suave); border-top: 1px solid var(--borde); padding: 1rem 1.5rem; font-size: .9rem; }
.semaforo-recomendaciones li { margin-bottom: .35rem; }

/* ---------- Estado al día ---------- */

.estado-num-label { font-size: .8rem; color: var(--bs-secondary-color); font-weight: 500; }
.estado-num { font-size: 1.55rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; white-space: nowrap; }
@media (max-width: 1399.98px) { .estado-num { font-size: 1.3rem; } }
.estado-numeros > div + div { border-left: 1px solid var(--borde); }
@media (max-width: 575.98px) { .estado-numeros > div + div { border-left: 0; border-top: 1px solid var(--borde); padding-top: .75rem; } }
.estado-resumen { padding-left: 1.1rem; font-size: .9rem; }
.estado-resumen li { margin-bottom: .3rem; }

/* ---------- Redes ---------- */

.estado-red { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; font-weight: 600; padding: .2rem .6rem; border-radius: 99px; white-space: nowrap; }
.estado-red.ok { background: rgba(22, 163, 74, .12); color: #16a34a; }
.estado-red.atencion { background: rgba(217, 119, 6, .12); color: #b45309; }
.estado-red.riesgo { background: rgba(220, 38, 38, .1); color: #dc2626; }
.estado-red.sin { background: var(--bs-secondary-bg); color: var(--bs-secondary-color); }
.selector-red { min-width: 220px; max-width: 320px; }
.chip-farmacia { display: inline-flex; align-items: center; gap: .25rem; margin: 0; padding: .25rem .6rem; border: 1px solid var(--borde); border-radius: 99px; font-size: .85rem; background: var(--tarjeta); }
@media (max-width: 575.98px) { .selector-red { min-width: 0; max-width: 170px; } }

/* ---------- Simulador ---------- */

.sim-fila {
    display: grid; grid-template-columns: 1fr 220px; gap: .5rem 1rem; align-items: start;
    padding: .85rem 0; border-bottom: 1px solid var(--borde);
}
.sim-fila:first-child { padding-top: 0; }
.sim-destacada { background: rgba(245, 158, 11, .08); margin: 0 -1rem; padding-left: 1rem; padding-right: 1rem; border-radius: 8px; }
@media (max-width: 575.98px) { .sim-fila { grid-template-columns: 1fr; } }
@media (min-width: 1200px) { .sim-resultado { position: sticky; top: 80px; } }
.sim-mensaje { border-radius: 12px; padding: 1rem 1.1rem; }
.sim-ok { background: rgba(21, 128, 61, .1); color: var(--ok); }
.sim-rojo { background: rgba(220, 38, 38, .08); color: var(--peligro); }
.sim-importe { font-size: 2rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.sim-mensaje .small { color: var(--bs-body-color); opacity: .85; }
.sim-barra-movil {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
    display: flex; align-items: center; gap: .75rem;
    padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom));
    background: var(--marca); color: #fff; text-decoration: none;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, .15);
}
.sim-barra-movil strong { margin-left: auto; font-size: 1.1rem; }
.sim-barra-movil.en-rojo { background: #b91c1c; }
.sim-barra-movil:hover { color: #fff; }
@media (max-width: 1199.98px) { .app-content:has(.sim-barra-movil) { padding-bottom: 5rem; } }
@media print { .sim-barra-movil { display: none !important; } }

/* ---------- Login ---------- */

.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    background: var(--fondo);
}
.login-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: #0b3b3a;
    display: flex; flex-direction: column; justify-content: space-between;
    padding: 2.5rem 3rem;
}
/* Fotos de fondo: 4 imágenes que se alternan con fundido, 6 s cada una (ciclo de 24 s).
   --x indica qué parte horizontal de la foto mostrar (donde está la persona). */
.hero-fotos { position: absolute; inset: 0; }
.hero-foto {
    position: absolute; inset: 0;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: var(--x, 50%) 50%;
    opacity: 0;
    animation: heroFundido 24s infinite;
}
/* Retrasos negativos: la 1ª foto ya está visible al cargar y las demás entran con fundido */
.hero-foto:nth-child(1) { animation-delay: -1s; }
.hero-foto:nth-child(2) { animation-delay: 5s; }
.hero-foto:nth-child(3) { animation-delay: 11s; }
.hero-foto:nth-child(4) { animation-delay: 17s; }
@keyframes heroFundido {
    0% { opacity: 0; } 4% { opacity: 1; } 25% { opacity: 1; } 29% { opacity: 0; } 100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .hero-foto { animation: none; }
    .hero-foto:first-child { opacity: 1; }
    .hero-foto:not(:first-child) { display: none; }
}
.login-hero::after {
    content: ''; position: absolute; inset: 0;
    background:
        linear-gradient(0deg, rgba(6, 40, 39, .94) 0%, rgba(6, 40, 39, .78) 35%, rgba(6, 40, 39, .25) 65%, rgba(6, 40, 39, .05) 100%),
        linear-gradient(90deg, rgba(15, 118, 110, .25), rgba(15, 118, 110, 0) 70%);
}
.login-hero { justify-content: flex-start; }
.hero-texto { margin-top: auto; }
.hero-contenido { position: relative; z-index: 1; }
.login-hero h2 { font-size: 2.25rem; font-weight: 700; line-height: 1.15; max-width: 28rem; text-shadow: 0 2px 12px rgba(0,0,0,.35); }
.login-hero ul { list-style: none; padding: 0; margin: 2rem 0 0; }
.login-hero li { display: flex; gap: .75rem; align-items: center; margin-bottom: .9rem; text-shadow: 0 1px 6px rgba(0,0,0,.4); }
.login-hero li i { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.16); backdrop-filter: blur(4px); flex-shrink: 0; }
.hero-pie { opacity: .7; }

/* Logo del Colegio sobre placa blanca (el logo tiene texto negro y fondo transparente) */
.logo-placa {
    display: inline-block;
    background: #fff;
    border-radius: 14px;
    padding: .6rem 1rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
}
a.logo-placa { transition: transform .15s, box-shadow .15s; }
a.logo-placa:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 0, 0, .22); }
.volver-sitio {
    display: inline-flex; align-items: center; gap: .4rem;
    font-size: .875rem; font-weight: 500;
    color: var(--bs-secondary-color); text-decoration: none;
    margin-bottom: 1.75rem;
}
.volver-sitio:hover { color: var(--marca); }
.logo-placa img { display: block; height: 52px; width: auto; max-width: 100%; }

/* Celular / tablet: las fotos quedan como una franja arriba del formulario */
@media (max-width: 991.98px) {
    .login-page { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
    .login-hero { min-height: 190px; padding: 0; }
    .login-hero .hero-contenido { display: none; }
    .login-hero::after { background: linear-gradient(0deg, var(--fondo) 0%, rgba(6, 40, 39, .15) 45%, rgba(6, 40, 39, .1) 100%); }
    .login-panel { padding-top: 0 !important; margin-top: -2.5rem; position: relative; z-index: 1; }
    .logo-placa img { height: 44px; }
}
.login-panel { display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.login-card { width: 100%; max-width: 400px; }
.login-card .form-control { padding: .7rem .9rem; }
.login-card .btn { padding: .7rem; font-weight: 600; }

/* ---------- Impresión ---------- */

.solo-impresion { display: none; }
@media print {
    @page { size: A4; margin: 10mm; }
    html, body { background: #fff !important; font-size: 9pt; }
    .app-sidebar, .app-topbar, .viendo-como, .no-imprimir, .alert, .btn, input[type="search"] { display: none !important; }
    .app, .app-main { display: block !important; margin: 0 !important; }
    .app-content { padding: 0 !important; max-width: none; }
    .solo-impresion { display: block !important; }

    /* Que nada quede recortado: sin scroll, sin alturas fijas, columnas apiladas */
    .table-responsive { overflow: visible !important; }
    .h-100 { height: auto !important; }
    .row { display: block !important; margin: 0 !important; }
    .row > [class*="col"] { width: 100% !important; max-width: 100% !important; padding: 0 !important; margin-bottom: 3mm; }

    .card { box-shadow: none !important; border: 1px solid #bbb !important; border-radius: 6px; margin-bottom: 3mm; }
    .card-header { padding: 2mm 3mm; break-after: avoid; }
    .card-body { padding: 3mm !important; }
    .table { width: 100% !important; table-layout: auto; }
    .table td, .table th { padding: 1mm 1.5mm; }
    .table > thead th { font-size: 7pt; white-space: normal; }
    .table td.num { white-space: nowrap; }
    thead { display: table-header-group; }
    tfoot { display: table-row-group; }
    tr { break-inside: avoid; }
    .page-head { margin-bottom: 3mm; }
    .page-head h1 { font-size: 14pt; }
    .estado { padding: 0; background: none !important; }
    .vacio { padding: 2mm 3mm; text-align: left; }
    .vacio i { display: none; }
    .card:has(.vacio), .card:not(:has(table)) { break-inside: avoid; }
    a { text-decoration: none !important; color: inherit !important; }
}
