
body {
    background-color: #1a233a !important;
    font-family: 'Inter', -apple-system, sans-serif;
    overflow-x: hidden;
}

.page-single, .container-tight, .page-content {
    max-width: 100% !important;
    width: 100% !important;
}

.minimal-auth-viewport {
    width: 100% !important;
    min-height: 100vh;
    padding: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
}

.minimal-container {
    width: 100% !important;
    max-width: 75% !important;
    height: 50rem !important;
    background-color: #ffffff !important;
    border-radius: 28px !important;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.45) !important;
    display: flex !important;
    flex-direction: row !important;
    overflow: hidden !important;
    margin: auto !important;
}

.minimal-form-side {
    width: 40% !important;
    background-color: #ffffff !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    padding: 3rem !important;
    margin-right: 5% !important;
    z-index: 1;
}

.auth-logo-img { max-height: 90%; width: auto; object-fit: contain; }
.auth-core-title { color: #0f172a; font-weight: 800; font-size: 1.6rem; letter-spacing: -0.5px; }

.minimal-input {
    width: 100% !important; height: 48px !important;
    padding: 10px 20px 10px 52px !important;
    background-color: #ffffff !important;
    border: 1.5px solid #1e293b !important;
    border-radius: 24px !important;
    color: #1e293b !important; font-size: 0.85rem !important;
    font-weight: 700 !important; transition: all 0.2s ease-in-out !important;
}
.minimal-input:focus { border-color: #009e9d !important; box-shadow: 0 0 0 4px rgba(0, 158, 157, 0.1) !important; }

.btn-social-provider {
    height: 48px; background-color: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 24px !important;
    color: #334155 !important; font-size: 0.85rem !important;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    transition: all 0.2s ease !important;
    margin-block: 4%;
}
.btn-social-provider:hover { background-color: #f8fafc !important; border-color: #cbd5e1 !important; transform: translateY(-1px); }

.btn-minimal-login {
    height: 48px; background-color: #1e293b !important;
    border: none !important; border-radius: 24px !important;
    color: #ffffff !important; font-weight: 700 !important;
    font-size: 0.9rem !important; transition: all 0.2s ease-in-out !important;
    cursor: pointer;
}
.btn-minimal-login:hover { background-color: #009e9d !important; box-shadow: 0 6px 16px rgba(0, 158, 157, 0.25); }

.minimal-visual-side {
    width: 65% !important;
    background-color: #0b1329 !important;
    position: relative;
    border-top-left-radius: 120px;
    border-bottom-left-radius: 120px;
    margin-left: -80px;
    z-index: 2;
    overflow: hidden;
}

.liquid-mesh-gradient {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, #091a32 0%, #0c2b4e 40%, #009e9d 80%, #00c4c2 100%);
    background-size: 200% 200%;
    animation: liquidMovement 10s ease infinite;
    z-index: 1;
}

.feature-marquee-wrapper {
    width: 75%; height: 65%;
    overflow: hidden; position: relative; z-index: 2;
    margin-bottom: 2rem; margin-left: 12%;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
}

.marquee-inner { display: flex; flex-direction: column; animation: slideUpInfinite 15s linear infinite; }
.marquee-inner:hover { animation-play-state: paused; }

.feature-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px; padding: 20px 24px; margin-bottom: 20px;
    display: flex; align-items: center; gap: 20px;
    transition: all 0.4s ease; cursor: pointer;
}
.feature-card:hover { background: rgba(255, 255, 255, 0.08); border-color: #009e9d; box-shadow: 0 0 20px rgba(0, 158, 157, 0.3); }
.feature-card .ti { stroke-width: 1.5; }
.feature-card .content h4 { margin: 0; font-size: 0.95rem; color: #ffffff; }
.feature-card .content p { margin: 0; font-size: 0.75rem; color: #94a3b8; }

.icon-box {
    width: 40px; height: 40px;
    font-size: 1.4rem; display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, 0.05); border-radius: 10px;
    color: #ffffff; margin-right: 18px; opacity: 0.7; transition: all 0.3s ease;
}
.feature-card:hover .icon-box { opacity: 1; background: rgba(0, 158, 157, 0.2); color: #009e9d; transform: scale(1.1); }

.visual-text-overlay { z-index: 3; padding: 2rem 3rem; width: 100%; background: transparent; margin-left: 6%; }
.visual-text-overlay h2 { font-size: 3rem; line-height: 1.1; margin-bottom: 1rem; color: #ffffff; }
.visual-text-overlay p { font-size: 1.1rem; max-width: 80%; opacity: 0.8; color: #ffffff; }

@keyframes liquidMovement { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes slideUpInfinite { from { transform: translateY(0); } to { transform: translateY(-50%); } }

.input-minimal-capsule { position: relative; display: flex; align-items: center; }
.capsule-icon { position: absolute; left: 20px; color: #94a3b8; pointer-events: none; }
.capsule-eye-btn { position: absolute; right: 20px; background: none; border: none; color: #94a3b8; cursor: pointer; }
.minimal-forgot-link { font-size: 0.75rem; color: #64748b; text-decoration: none; font-weight: 600; }
.minimal-error-alert { color: #ef4444; font-size: 0.75rem; font-weight: 600; margin-top: 6px; padding-left: 12px; }
.auth-divider { display: flex; align-items: center; margin: 1.5rem 0 !important; }
.divider-line { height: 1px; background-color: #e2e8f0; }
.divider-text { font-size: 0.68rem; font-weight: 700; letter-spacing: 1px; color: #94a3b8; }
.footer-dot { display: inline-block; width: 6px; height: 6px; background-color: #e2e8f0; border-radius: 50%; margin: 0 4px; }
.footer-dot.active { background-color: #1e293b; width: 14px; border-radius: 3px; }
.minimal-form-footer { border-top: 1px solid #f1f5f9; }

.border-multiempresa { border-left: 4px solid #009e9d; }
.border-reportes      { border-left: 4px solid #f59e0b; }
.border-sat           { border-left: 4px solid #8b5cf6; }
.border-seguridad     { border-left: 4px solid #ec4899; }
.border-facturacion   { border-left: 4px solid #10b981; }
.border-soporte       { border-left: 4px solid #3b82f6; }
.border-movilidad     { border-left: 4px solid #64748b; }


@media (max-width: 991px) {
    .minimal-container { flex-direction: column !important; height: auto !important; max-width: 420px !important; margin: 20px auto !important; }
    .minimal-form-side { width: 100% !important; margin-right: 0 !important; padding: 2rem !important; }
    .minimal-visual-side { display: none !important; }
}


@media (max-width: 991px) {

    .minimal-container {
        flex-direction: column !important;
        height: 100vh !important;
        max-width: 100% !important;
        margin: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        background-color: #ffffff !important;
    }


    .minimal-form-side {
        width: 100% !important;
        min-width: 100% !important;
        margin-right: 0 !important;
        padding: 2rem !important;
        justify-content: center !important;
    }


    .minimal-visual-side {
        display: none !important;
    }

    body {
        background-color: #ffffff !important;
    }
}

.minimal-alert-danger {
    background-color: #fff1f2;
    border: 1px solid #fecdd3;
    color: #be123c;
    border-radius: 12px;
    font-size: 0.85rem;
    padding: 16px;
}

.minimal-alert-icon {
    flex-shrink: 0;
}

/* Inputs de Códigos (App y Respaldo) */
.minimal-input-code {
    letter-spacing: 0.3em;
    font-size: 1.1rem;
}

/* Botón de Recuperación (Tono oscuro para diferenciar) */
.btn-minimal-recovery {
    background-color: #0f766e;
    border-color: #0f766e;
}

.btn-minimal-recovery:hover {
    background-color: #0d655e;
    border-color: #0d655e;
}

/* Sin scroll de la página en laptop/escritorio (>= 992px): la ficha tiene alto fijo. Con alto automático el carrusel
   del panel visual crecía hasta todo su contenido, estiraba la ficha más allá de la pantalla y la página se movía.
   Si un formulario no cabe (registro o restablecer en pantallas bajas), se desplaza solo su columna. */
@media (min-width: 992px) {
    body {
        overflow: hidden !important;
    }

    .page.page-center {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    /* Igual que en móvil: sin el relleno del contenedor ni la marca de arriba (la ficha trae la suya). Sumados a la
       ficha la empujaban fuera de la pantalla. */
    body.auth-background-surface .page.page-center > .container-tight {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    body.auth-background-surface .page.page-center > .container-tight > .text-center {
        display: none;
    }

    .minimal-auth-viewport {
        min-height: 100vh !important;
        height: 100vh !important;
        padding: 1rem !important;
        overflow: hidden !important;
    }

    .minimal-container {
        height: min(50rem, calc(100vh - 2rem)) !important;
        max-height: min(50rem, calc(100vh - 2rem)) !important;
    }
}

/* El logo de la ficha crecía con el ancho de la columna (su max-height en % no aplica): en pantallas anchas medía
   ~145 px y el login ya no cabía. Se fija al tamaño que tiene en 1366 px. */
@media (min-width: 992px) {
    .auth-logo-img {
        max-height: 104px;
        max-width: 100%;
    }
}

/* Laptops de poca altura: menos margen vertical y logo más chico para que el login quepa sin desplazar su columna. */
@media (min-width: 992px) and (max-height: 900px) {
    .minimal-form-side {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }

    .auth-logo-img {
        max-height: 64px;
    }

    .minimal-form-side .minimal-brand-top {
        margin-bottom: 1rem !important;
    }
}

/* Muy bajas (una laptop de 768 px con el navegador abierto deja ~650 px): espacios más cortos y sin los puntos
   decorativos del pie, para que login y registro sigan cabiendo sin desplazar su columna. */
@media (min-width: 992px) and (max-height: 740px) {
    .minimal-form-side {
        padding-top: 0.85rem !important;
        padding-bottom: 0.85rem !important;
    }

    .auth-logo-img {
        max-height: 48px;
    }

    .minimal-form-side .minimal-brand-top {
        margin-bottom: 0.5rem !important;
    }

    .minimal-form-side .minimal-form-core .mb-4 {
        margin-bottom: 0.75rem !important;
    }

    .minimal-form-side .minimal-form-core .mt-4 {
        margin-top: 0.75rem !important;
    }

    .minimal-form-side .auth-divider {
        margin: 0.75rem 0 !important;
    }

    .minimal-form-side .minimal-form-footer {
        display: none !important;
    }
}

/* En cualquier tamaño, lo que no quepa en la ficha se desplaza dentro de la columna del formulario. Antes, en celulares
   bajos, la ficha (alto de la pantalla y desborde oculto) cortaba el final del registro sin forma de llegar a él. */
.minimal-form-side {
    overflow-y: auto !important;
    scrollbar-width: thin;
}

/* Indicador de requisitos de contraseña en registro */
.password-strength {
    height: 4px;
    width: 100%;
    background: #eef2f7;
    border-radius: 999px;
    overflow: hidden;
    margin: 0.65rem 0 0.55rem;
}

.password-strength-bar {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 999px;
    transition: width 0.25s ease, background-color 0.25s ease;
    background-color: #ef4444;
}

.password-strength-bar[data-level=weak] {
    background-color: #ef4444;
}

.password-strength-bar[data-level=medium] {
    background-color: #f59e0b;
}

.password-strength-bar[data-level=strong] {
    background-color: #22c55e;
}

.password-requirements {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 14px;
    font-size: 0.72rem;
    letter-spacing: 0.1px;
}

.password-requirements li {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #94a3b8;
    transition: color 0.15s ease;
}

.password-requirements .req-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ef4444;
    font-size: 0.8rem;
    line-height: 1;
    flex: none;
    transition: color 0.2s ease;
}

.password-requirements .req-icon::before {
    content: "\2717";
}

.password-requirements li.valid {
    color: #16a34a;
}

.password-requirements li.valid .req-icon {
    color: #22c55e;
}

.password-requirements li.valid .req-icon::before {
    content: "\2713";
}

@media (max-width: 420px) {
    .password-requirements {
        grid-template-columns: 1fr;
    }
}

/* Oculta solo el texto de la marca mientras una alerta de auth está activa */
body.auth-alert-active .navbar-brand-autodark span {
    visibility: hidden;
}

/* Ajuste de viewport móvil para autenticación */
@media (max-width: 991px) {
    body.auth-background-surface .page.page-center {
        min-height: 100dvh;
    }

    body.auth-background-surface .page.page-center > .container-tight {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    body.auth-background-surface .page.page-center > .container-tight > .text-center {
        display: none;
    }

    .minimal-auth-viewport {
        min-height: 100dvh !important;
        padding: 0 !important;
    }

    .minimal-container {
        min-height: 100dvh !important;
        height: auto !important;
    }
}

/* Aceptación del aviso de privacidad y los términos en el registro */
.auth-consent-label { display: flex; gap: 10px; align-items: flex-start; font-size: 0.78rem; line-height: 1.45; color: #64748b; cursor: pointer; padding-left: 4px; }
.auth-consent-check { flex: 0 0 auto; width: 16px; height: 16px; margin: 2px 0 0; cursor: pointer; background-color: #fff; border: 1.5px solid #cbd5e1; border-radius: 4px; }
.auth-consent-check:focus { border-color: #009e9d; box-shadow: 0 0 0 3px rgba(0, 158, 157, 0.15); }
.auth-consent-check:checked { background-color: #009e9d; border-color: #009e9d; }
.auth-consent-label a, .auth-consent-note a { color: #0f766e; font-weight: 600; text-decoration: underline; }
.auth-consent-note { font-size: 0.72rem; line-height: 1.45; color: #94a3b8; text-align: center; margin: 8px 0 0; }

/* Escritorio (12-nov-2026). La columna del formulario medía 40 % y el panel visual 65 % (con 80 px de traslape): entre
   992 y 1280 px el navegador encogía la columna hasta cortar los campos (182 px a 1024 px). Ahora la columna tiene un
   ancho mínimo y el panel visual ocupa lo que sobra. */
@media (min-width: 992px) {
    .minimal-form-side {
        flex: 0 0 auto !important;
        width: clamp(400px, 40%, 560px) !important;
    }

    .minimal-visual-side {
        flex: 1 1 auto !important;
        width: auto !important;
        min-width: 0 !important;
    }
}

/* Laptops angostas: la ficha usa más del ancho y el panel visual se compacta para dejarle espacio a la columna. */
@media (min-width: 992px) and (max-width: 1279.98px) {
    .minimal-container {
        max-width: 94% !important;
    }

    .feature-marquee-wrapper {
        width: 84%;
        margin-left: 8%;
    }

    .visual-text-overlay {
        padding: 1.5rem 2rem;
        margin-left: 4%;
    }

    .visual-text-overlay h2 {
        font-size: 2.25rem;
    }
}

/* Los campos con el botón del ojo traían pe-5, pero el padding de .minimal-input lo anulaba y el texto quedaba debajo
   del ícono («CONFIRMAR CONTRASEÑA»). 46 px deja libre el ojo (a 20 px del borde, 18 px de ancho). */
.minimal-input.pe-5 {
    padding-right: 46px !important;
}

.minimal-input {
    text-overflow: ellipsis;
}

/* Registro: los requisitos de la contraseña empiezan neutros (punto gris) y se marcan en verde o rojo al escribir. */
.minimal-form-side--registro .password-requirements:not(.con-texto) .req-icon {
    color: #cbd5e1;
}

.minimal-form-side--registro .password-requirements:not(.con-texto) .req-icon::before {
    content: "\2022";
}

/* Registro en escritorio: el formulario medía más que la ficha y el botón «Registrarme» quedaba oculto dentro de la
   columna (que se desplaza por dentro). Ahora el formulario es más compacto, los requisitos de la contraseña aparecen al
   escribirla y la aceptación del aviso junto con el botón se quedan visibles al pie de la columna aunque ésta tenga
   que desplazarse. */
@media (min-width: 992px) {
    .minimal-form-side--registro .minimal-brand-top {
        margin-bottom: 0.75rem !important;
    }

    .minimal-form-side--registro .minimal-form-core > .mb-4 {
        margin-bottom: 1rem !important;
    }

    .minimal-form-side--registro .btn-social-provider {
        margin-block: 0.75rem 0.5rem;
    }

    .minimal-form-side--registro .auth-divider {
        margin: 1rem 0 !important;
    }

    .minimal-form-side--registro .minimal-form-footer {
        display: none !important;
    }

    .minimal-form-side--registro .password-requirements {
        display: none;
    }

    .minimal-form-side--registro .campo-contrasena:focus-within .password-requirements,
    .minimal-form-side--registro .password-requirements.con-texto {
        display: grid;
    }

    /* La franja llega hasta el borde de la ficha (sin el relleno inferior de la columna, que dejaba asomar el campo
       de abajo) y, al saltar a un campo vacío, el navegador lo deja arriba de la franja y no debajo. */
    .minimal-form-side--registro {
        padding-bottom: 0 !important;
        scroll-padding-bottom: 150px;
    }

    .minimal-form-side--registro .auth-submit-fijo {
        position: sticky;
        bottom: 0;
        z-index: 3;
        background-color: #ffffff;
        padding-top: 0.5rem;
        padding-bottom: 1rem;
        box-shadow: 0 -14px 14px -4px #ffffff;
    }
}
