:root {
    /* Marca Flow ERP (tomada del logo) */
    --brand: #0052FF;
    --brand-strong: #003ECB;
    --brand-soft: rgba(0, 82, 255, 0.10);
    --brand-ring: rgba(0, 82, 255, 0.22);
    --accent: #578BFA;
    --accent-soft: rgba(0, 82, 255, 0.12);
    --sun: #C9D9FF;

    /* Tinta / neutros */
    --ink: #0A0B0D;
    --ink-2: #003ECB;
    --text: #0A0B0D;
    --text-2: #5B616E;
    --text-3: #8A919E;
    --line: #DEDFE2;
    --surface: #FFFFFF;
    --canvas: #F7F8F9;

    --radius: 14px;
    --shadow-card: 0 1px 2px rgba(10, 11, 13, .04), 0 12px 40px -12px rgba(10, 11, 13, .14);
    --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--canvas);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { cursor: pointer; }

/* ---------- Preloader ---------- */
#nm-preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
}
.custom-spinner {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 3px solid var(--brand-soft);
    border-top-color: var(--brand);
    border-right-color: var(--accent);
    animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Layout 50 / 50 ---------- */
.auth {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    min-height: 100dvh;
}

/* ---------- Panel izquierdo ---------- */
.auth-left {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 24px;
    background:
        var(--canvas);
    overflow: hidden;
}

.auth-left-inner {
    width: 100%;
    max-width: 440px;
    margin: auto 0;           /* centra verticalmente */
    padding: 24px 0;
    animation: rise .55s var(--ease) both;
}

@keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.brand-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 28px;
}
.brand-logo img {
    width: 230px;
    max-width: 70%;
    height: auto;
    display: block;
}

.login-card-inner {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow-card);
    padding: 36px 34px 30px;
}

.card-inner-header {
    text-align: center;
    margin-bottom: 26px;
}
.card-inner-title {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--text);
    margin: 0 0 6px;
}
.card-inner-subtitle {
    font-size: 14px;
    color: var(--text-2);
    margin: 0;
    line-height: 1.5;
}

/* ---------- Campos ---------- */
.form-group-custom { margin-bottom: 18px; }

.field-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}
.field-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}
.field-label-link {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--brand-strong) !important;
    text-decoration: none !important;
    transition: color .2s;
}
.field-label-link:hover { color: var(--accent) !important; }

.input-wrapper { position: relative; }

.input-wrapper .input-icon-left {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: var(--text-3);
    pointer-events: none;
    transition: color .2s;
}

.input-wrapper .form-control {
    height: 50px;
    width: 100%;
    padding: 0 46px 0 44px;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 500;
    color: var(--text);
    background: #FAFBFC;
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    box-shadow: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.input-wrapper .form-control::placeholder { color: var(--text-3); font-weight: 400; }
.input-wrapper .form-control:hover { border-color: #CED2DB; }
.input-wrapper .form-control:focus {
    outline: none;
    background: var(--surface);
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-ring);
}
.input-wrapper:focus-within .input-icon-left { color: var(--brand); }

.password-toggle-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--text-3);
    cursor: pointer;
    transition: color .2s, background .2s;
}
.password-toggle-btn:hover { color: var(--text); background: var(--canvas); }

/* ---------- Botones ---------- */
.btn-actions-row {
    display: flex;
    gap: 12px;
    margin-top: 26px;
}
.btn-actions-row > div { flex: 1; }

.btn-submit-main,
.btn-submit-main.btn-primary {
    position: relative;
    width: 100%;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .01em;
    color: #fff !important;
    background: var(--brand) !important;
    border: 0 !important;
    border-radius: var(--radius);
    box-shadow: 0 10px 24px -10px rgba(10, 11, 13, .16);
    overflow: hidden;
    transition: transform .2s var(--ease), box-shadow .2s var(--ease), filter .2s;
}
.btn-submit-main i { transition: transform .2s var(--ease); }
.btn-submit-main:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px -10px rgba(10, 11, 13, .16);
    filter: saturate(1.1);
}
.btn-submit-main:hover i.fa-arrow-right { transform: translateX(3px); }
.btn-submit-main:active { transform: translateY(0); }
.btn-submit-main:focus { outline: none; box-shadow: 0 0 0 4px var(--brand-ring); }
.btn-submit-main:disabled { opacity: .75; cursor: wait; }

.divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 22px 0 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-3);
}
.divider::before, .divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

.btn-biometric,
.btn-secondary-modern {
    width: 100%;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text);
    background: var(--surface);
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color .2s, background .2s, color .2s, box-shadow .2s;
}
.btn-biometric i { font-size: 18px; color: var(--accent); transition: transform .25s var(--ease); }
.btn-biometric:hover {
    border-color: rgba(0, 82, 255, .45);
    background: #EEF3FF;
    box-shadow: 0 8px 20px -12px rgba(10, 11, 13, .15);
}
.btn-biometric:hover i { transform: scale(1.12); }
.btn-secondary-modern:hover { border-color: #CED2DB; background: var(--canvas); }
.btn-biometric:focus, .btn-secondary-modern:focus { outline: none; box-shadow: 0 0 0 4px var(--brand-ring); }
.btn-biometric:disabled { opacity: .7; cursor: wait; }

.fingerprint-enroll-wrapper {
    text-align: center;
    margin-top: 18px;
}
.fingerprint-enroll-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2) !important;
    text-decoration: none !important;
    transition: color .2s;
}
.fingerprint-enroll-link span { color: var(--brand-strong); }
.fingerprint-enroll-link:hover span { color: var(--accent); }

/* ---------- Alertas ---------- */
#alerta-container:empty { display: none; }
#alerta-container { margin-bottom: 18px; }

#alerta-container .alert {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    padding: 13px 44px 13px 16px;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.45;
    border-radius: 12px;
    border: 1px solid transparent;
    animation: rise .3s var(--ease) both;
}
#alerta-container .alert span { text-align: left !important; flex: 1; }
#alerta-container .alert-danger  { background: #FEF2F2; border-color: #FECACA; color: #B91C1C; }
#alerta-container .alert-success { background: #F0FDF4; border-color: #BBF7D0; color: #15803D; }
#alerta-container .alert .close {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    padding: 0;
    float: none;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    font-size: 18px;
    line-height: 1;
    opacity: .6;
    text-shadow: none;
}
#alerta-container .alert .close:hover { opacity: 1; background: rgba(0,0,0,.05); }
#alerta-container .alert .close:empty::before { content: "\00d7"; }

/* ---------- Footer izquierdo ---------- */
.auth-left-footer {
    width: 100%;
    max-width: 440px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--text-3);
    text-align: center;
}
.auth-left-footer i { color: var(--brand); }

/* ---------- Panel derecho ---------- */
.auth-right {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background: var(--ink) url("../images/login_banner.jpg") center center / cover no-repeat;
    color: #fff;
}
.auth-right::before {
    content: "";
    position: absolute;
    inset: 0;
    /* velo de tinta para que el texto se lea sobre la foto */
    background: rgba(10, 11, 13, .64);
}

.auth-right-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 56px;
    max-width: 680px;
    animation: rise .7s .1s var(--ease) both;
}

.banner-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    margin-bottom: 20px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 999px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.banner-kicker .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(0, 82, 255, .25);
}

.banner-headline {
    font-size: clamp(28px, 2.6vw, 42px);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -.025em;
    margin: 0 0 14px;
    color: #fff;
}
.banner-headline span {
    background: #A8C4FF;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.banner-description {
    font-size: 15.5px;
    line-height: 1.6;
    color: rgba(255, 255, 255, .78);
    margin: 0 0 28px;
    max-width: 520px;
}

.feature-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.feature-list li {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: rgba(255, 255, 255, .10);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 12px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.feature-list li i { color: #A8C4FF; font-size: 14px; }

/* ---------- Cambio de formularios ---------- */
.login-form, .forget-form, .finger-form { animation: rise .3s var(--ease) both; }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
    .auth-right-content { padding: 44px; }
}

@media (max-width: 991.98px) {
    .auth { grid-template-columns: 1fr; }
    .auth-right { display: none; }
    .auth-left {
        min-height: 100vh;
        min-height: 100dvh;
        background:
            var(--canvas);
    }
}

@media (max-width: 480px) {
    .auth-left { padding: 20px 16px; }
    .brand-logo { margin-bottom: 22px; }
    .brand-logo img { width: 190px; }
    .login-card-inner { padding: 28px 20px 24px; border-radius: 18px; }
    .card-inner-title { font-size: 21px; }
    .btn-actions-row { flex-direction: column-reverse; gap: 10px; }
}

@media (max-height: 700px) and (min-width: 992px) {
    .auth-right-content { padding: 36px 44px; }
    .banner-kicker { margin-bottom: 14px; }
    .banner-headline { font-size: clamp(24px, 2.2vw, 34px); }
    .banner-description { font-size: 14.5px; margin-bottom: 18px; }
    .brand-logo { margin-bottom: 18px; }
    .login-card-inner { padding: 26px 30px 22px; }
    .card-inner-header { margin-bottom: 18px; }
    .form-group-custom { margin-bottom: 14px; }
    .divider { margin: 16px 0 12px; }
}

/* =========================================================
   Fondo "aurora" animado (panel izquierdo)
   ========================================================= */
.auth-left-inner,
.auth-left-footer { position: relative; z-index: 1; }

/* El fondo del formulario es liso: sin manchas de color animadas. */
.aurora { display: none; }

/* Tarjeta con efecto vidrio sobre la aurora */
.login-card-inner {
    background: rgba(255, 255, 255, .86);
    backdrop-filter: blur(18px) saturate(1.4);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    border-color: rgba(228, 233, 240, .9);
}

/* Chip flotante del panel derecho */
.floating-chip {
    position: absolute;
    top: 28px;
    right: 28px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    font-size: 12.5px;
    font-weight: 600;
    color: #fff;
    background: rgba(10, 11, 13, .45);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: rise .7s .3s var(--ease) both;
}

.pulse {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22C55E;
    flex: 0 0 auto;
}
.pulse::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: inherit;
    animation: pulse 1.8s ease-out infinite;
}
@keyframes pulse {
    0%   { transform: scale(1);   opacity: .7; }
    100% { transform: scale(2.8); opacity: 0; }
}

/* =========================================================
   Paso 2: selección de empresa
   ========================================================= */
.company-step { max-width: 480px; }
.company-card { padding: 28px 28px 22px; }

/* Stepper */
.stepper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 22px;
    padding: 0;
    list-style: none;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-3);
}
.stepper li { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.stepper-dot {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 800;
}
.stepper .is-done { color: var(--text-2); }
.stepper .is-done .stepper-dot { background: #DCFCE7; color: #16A34A; }
.stepper .is-current { color: var(--text); }
.stepper .is-current .stepper-dot {
    background: var(--brand);
    color: #fff;
    box-shadow: 0 0 0 4px var(--brand-ring);
}
.stepper-line {
    flex: 1;
    height: 2px;
    border-radius: 2px;
    background: #86EFAC;
}

/* Saludo del usuario */
.user-hello {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    margin-bottom: 22px;
    background: rgba(0, 82, 255, .08);
    border: 1px solid rgba(0, 82, 255, .18);
    border-radius: 14px;
}
.user-hello-avatar {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    background: var(--ink-2);
}
.user-hello-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.user-hello-label { font-size: 11.5px; color: var(--text-2); font-weight: 500; }
.user-hello-name {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-hello-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 10px;
    font-size: 11.5px;
    font-weight: 700;
    color: #15803D;
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    border-radius: 999px;
    white-space: nowrap;
}

.company-header { text-align: left; margin-bottom: 18px; }
.company-header .card-inner-title { font-size: 22px; }
.company-header strong { color: var(--text); font-weight: 700; }

/* Buscador */
.company-search {
    position: relative;
    display: none;
    margin-bottom: 12px;
}
.company-search.is-visible { display: block; }
.company-search > i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    color: var(--text-3);
    pointer-events: none;
}
.company-search input {
    width: 100%;
    height: 44px;
    padding: 0 42px 0 40px;
    font-family: inherit;
    font-size: 14px;
    color: var(--text);
    background: #FAFBFC;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.company-search input::placeholder { color: var(--text-3); }
.company-search input:focus {
    outline: none;
    background: #fff;
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-ring);
}
.company-search:focus-within > i { color: var(--brand); }

kbd,
.company-search-kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-2);
    background: #fff;
    border: 1px solid var(--line);
    border-bottom-width: 2px;
    border-radius: 6px;
    box-shadow: none;
}
.company-search-kbd {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
}

/* Lista */
.company-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 316px;
    overflow-y: auto;
    margin: 0 -6px;
    padding: 4px 6px;
    scrollbar-width: thin;
    scrollbar-color: #CED2DB transparent;
}
.company-list::-webkit-scrollbar { width: 6px; }
.company-list::-webkit-scrollbar-thumb { background: #CED2DB; border-radius: 6px; }

.company-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0;
    padding: 12px 14px;
    background: #fff;
    border: 1.5px solid var(--line);
    border-radius: 14px;
    cursor: pointer;
    user-select: none;
    transition: border-color .2s, background .2s, box-shadow .2s, transform .2s var(--ease);
    animation: rise .4s var(--ease) both;
}
.company-option:nth-child(2) { animation-delay: .04s; }
.company-option:nth-child(3) { animation-delay: .08s; }
.company-option:nth-child(4) { animation-delay: .12s; }
.company-option:nth-child(5) { animation-delay: .16s; }
.company-option:nth-child(n+6) { animation-delay: .2s; }

.company-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.company-option:hover {
    border-color: #CED2DB;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px -14px rgba(10, 11, 13, .35);
}
.company-option.is-selected {
    border-color: var(--brand);
    background: #EEF3FF;
    box-shadow: 0 0 0 4px var(--brand-ring), 0 10px 24px -16px rgba(10, 11, 13, .16);
}
.company-option input:focus-visible ~ .company-check { box-shadow: 0 0 0 3px var(--brand-ring); }

.company-avatar {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .02em;
    color: #fff;
    background: var(--brand);
    box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .12);
}

.company-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.company-name {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.company-meta {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-3);
}
.company-meta i { font-size: 10px; }

.company-check {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid var(--line);
    color: transparent;
    font-size: 11px;
    transition: all .2s var(--ease);
}
.company-option.is-selected .company-check {
    border-color: transparent;
    background: var(--brand);
    color: #fff;
    transform: scale(1.05);
}

.company-empty {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 28px 10px;
    font-size: 13.5px;
    color: var(--text-2);
    text-align: center;
    border: 1.5px dashed var(--line);
    border-radius: 14px;
}
.company-empty i { font-size: 24px; color: var(--text-3); }
.company-empty.is-visible { display: flex; }

.company-step .btn-actions-row { margin-top: 20px; }
.company-step .btn-submit-main span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 85%;
}

.company-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin: 14px 0 0;
    font-size: 12px;
    color: var(--text-3);
}

@media (max-width: 480px) {
    .company-card { padding: 22px 16px 18px; }
    .company-header .card-inner-title { font-size: 19px; }
    .user-hello-status { display: none; }
    .company-hint { display: none; }
    .company-list { max-height: none; }
    .stepper { font-size: 12px; }
}

@media (hover: none) {
    .company-hint, .company-search-kbd { display: none; }
    .company-search input { padding-right: 16px; }
}

@media (max-height: 760px) and (min-width: 992px) {
    .company-step .brand-logo { margin-bottom: 16px; }
    .company-step .stepper { margin-bottom: 16px; }
    .company-step .user-hello { margin-bottom: 16px; padding: 10px 12px; }
    .company-list { max-height: 236px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* =========================================================
   Cambio de contraseña obligatorio (index_cambioclave.tpl)
   ========================================================= */
.password-step { max-width: 480px; }
.password-card { padding: 28px 28px 24px; }

.stepper-line.is-pending { background: var(--line); }

.user-hello-status.is-warning {
    color: #B45309;
    background: #FFFBEB;
    border-color: #FDE68A;
}
.user-hello-status.is-warning i { font-size: 10.5px; }

/* Medidor de fortaleza */
.strength-label, .match-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-3);
}
.strength-label[data-level="1"] { color: #DC2626; }
.strength-label[data-level="2"] { color: #EA580C; }
.strength-label[data-level="3"] { color: #CA8A04; }
.strength-label[data-level="4"] { color: #16A34A; }
.match-label.is-ok { color: #16A34A; }
.match-label.is-error { color: #DC2626; }

.strength-meter {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-top: 10px;
}
.strength-meter span {
    height: 5px;
    border-radius: 5px;
    background: var(--line);
    transition: background .25s var(--ease);
}
.strength-meter[data-level="1"] span:nth-child(-n+1) { background: #EF4444; }
.strength-meter[data-level="2"] span:nth-child(-n+2) { background: #F97316; }
.strength-meter[data-level="3"] span:nth-child(-n+3) { background: #EAB308; }
.strength-meter[data-level="4"] span { background: #22C55E; }

/* Requisitos */
.password-rules {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px 14px;
    margin: -4px 0 20px;
    padding: 14px 16px;
    list-style: none;
    background: #FAFBFC;
    border: 1px solid var(--line);
    border-radius: 12px;
}
.password-rules li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-2);
    transition: color .2s;
}
.password-rules li i { font-size: 6px; width: 13px; text-align: center; color: var(--text-3); }
.password-rules li.is-ok { color: #15803D; }
.password-rules li.is-ok i { font-size: 13px; color: #22C55E; }

.password-step .btn-actions-row { margin-top: 22px; }
.password-step a.btn-secondary-modern { text-decoration: none; }
.password-step .btn-submit-main:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

@media (min-width: 481px) {
    .password-step .btn-actions-row > div:first-child { flex: 0 0 120px; }
}

@media (max-width: 480px) {
    .password-card { padding: 22px 16px 18px; }
    .password-rules { grid-template-columns: 1fr; }
}

@media (max-height: 760px) and (min-width: 992px) {
    .password-step .brand-logo { margin-bottom: 16px; }
    .password-step .stepper { margin-bottom: 16px; }
    .password-step .user-hello { margin-bottom: 16px; padding: 10px 12px; }
    .password-step .card-inner-header { margin-bottom: 16px; }
    .password-step .form-group-custom { margin-bottom: 14px; }
}
.stepper li:not(.is-done):not(.is-current) .stepper-dot { background: var(--canvas); color: var(--text-3); border: 1px solid var(--line); }
.match-label i { margin-right: 3px; }

/* ==========================================================================
   ESTILO 2026-11 (inspirado en Coinbase)
   Formulario: tarjeta de 24px sin sombra, campos de 8px, botón en pastilla.
   Panel derecho: bloque casi-negro con una venta animada (ver el script al
   final de sesion/templates/index.php). Sin fotos, sin degradados, sin sombras.
   ========================================================================== */
:root { --brand: #0052FF; --brand-strong: #0046DB; --ink: #0A0B0D; --text: #0A0B0D; --text-2: #5B616E; --canvas: #FFFFFF; --radius: 8px; }
html, body, button, input, select { font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif !important; }
.auth-left { background: #FFFFFF !important; }
.login-card-inner, .auth-card, .login-card {
    border: 1px solid #DEDFE2 !important;
    border-radius: 24px !important;
    box-shadow: none !important;
    background: #FFFFFF !important;
    -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
}
.auth-left .form-control, .auth-left input[type="text"], .auth-left input[type="password"], .auth-left input[type="email"] {
    border-radius: 8px !important;
    border-color: #CED2DB !important;
    box-shadow: none !important;
    min-height: 52px;
}
.auth-left .form-control:focus, .auth-left input:focus { border-color: #0052FF !important; box-shadow: 0 0 0 3px rgba(0, 82, 255, .22) !important; }
.btn-submit-main {
    min-height: 56px;
    border-radius: 56px !important;
    background: #0052FF !important;
    box-shadow: none !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    transform: none !important;
    filter: none !important;
    transition: background .15s !important;
}
.btn-submit-main:hover { background: #0046DB !important; box-shadow: none !important; }
.btn-submit-main:active { background: #003ECB !important; }

/* entrada escalonada del formulario */
@keyframes flSube { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.auth-left-inner > * { animation: flSube .5s cubic-bezier(.22, .61, .36, 1) both; }
.auth-left-inner > *:nth-child(1) { animation-delay: .05s; }
.auth-left-inner > *:nth-child(2) { animation-delay: .14s; }
.auth-left-inner > *:nth-child(3) { animation-delay: .22s; }
.auth-left-footer { animation: flSube .5s .35s cubic-bezier(.22, .61, .36, 1) both; }

/* ==========================================================================
   ACCESO "FLOW" (2026-11-11, ronda 6) — mismo lenguaje que el POS
   Base azul: blanco + azul de marca #0052FF, tintes azules suaves (#EEF3FF,
   #D8E3FF), azul noche #0B1B4D para profundidad. Verde solo para "pagado /
   autorizado". Colores planos; el patrón de puntos y las máscaras sí se
   desvanecen. Panel derecho compartido: sesion/templates/_escena.php
   ========================================================================== */
:root {
    --a-azul: #0052FF;
    --a-azul-2: #003ECB;
    --a-azul-3: #3B76FF;
    --a-noche: #0B1B4D;
    --a-noche-2: #1B2D66;
    --a-suave: #EEF3FF;
    --a-suave-2: #D8E3FF;
    --a-lienzo: #F4F7FF;
    --a-tinta: #0A0B0D;
    --a-texto-2: #5B616E;
    --a-ok: #27AD75;
    --a-ok-s: #E3F6EE;
    --a-sombra: 0 1px 2px rgba(10, 11, 13, .05), 0 10px 26px -14px rgba(0, 62, 203, .22);
    --a-ease: cubic-bezier(.22, .61, .36, 1);
    --a-rebote: cubic-bezier(.34, 1.56, .64, 1);
}

/* ---------------------------------------------------------------- panel derecho */
.auth-right.fl-escena {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    gap: 26px;
    padding: 44px 52px 34px;
    background: var(--a-lienzo) !important;
    color: var(--a-tinta);
    overflow: hidden;
    isolation: isolate;
    border-left: 1px solid var(--a-suave-2);
}
.auth-right.fl-escena::before, .auth-right.fl-escena::after { content: none !important; }
.fl-escena > * { position: relative; z-index: 1; }

.fl-escena > .fl-escena__puntos {
    position: absolute;
    inset: -40px;
    z-index: 0;
    background-image: radial-gradient(rgba(0, 82, 255, .20) 1.2px, transparent 1.5px);
    background-size: 22px 22px;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 70% 45%, #000 20%, transparent 75%);
    mask-image: radial-gradient(ellipse 70% 60% at 70% 45%, #000 20%, transparent 75%);
    animation: eDeriva 28s linear infinite;
    pointer-events: none;
}
@keyframes eDeriva { to { transform: translate(22px, 22px); } }

.fl-escena > .fl-escena__forma { position: absolute; z-index: 0; pointer-events: none; }
.fl-escena__forma--a { width: 380px; height: 380px; right: -130px; top: -140px; border-radius: 50%; background: var(--a-suave-2); animation: eRespira 12s ease-in-out infinite; }
.fl-escena__forma--b { width: 230px; height: 230px; left: -90px; bottom: 80px; border-radius: 64px; background: var(--a-suave); animation: eGira 40s linear infinite; }
.fl-escena__forma--aro { width: 130px; height: 130px; right: 34%; bottom: 36px; border-radius: 50%; border: 14px solid var(--a-suave-2); animation: eRespira 9s 1s ease-in-out infinite; }
@keyframes eRespira { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@keyframes eGira { from { transform: rotate(18deg); } to { transform: rotate(378deg); } }

.fl-escena__barra { display: flex; align-items: center; gap: 10px; animation: flSube .6s .05s var(--a-ease) both; }
.fl-escena__vivo {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 8px 15px 8px 13px;
    border-radius: 56px;
    background: var(--a-noche);
    color: #fff;
    font-size: 13px; font-weight: 600;
}
.fl-escena__vivo i { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #4ADE80; }
.fl-escena__vivo i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: pulse 1.8s ease-out infinite; }
.fl-escena__reloj {
    margin-left: auto;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 15px;
    border-radius: 56px;
    background: #fff;
    border: 1px solid var(--a-suave-2);
    font-size: 13px; font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--a-texto-2);
}
.fl-escena__reloj i { color: var(--a-azul); font-size: 12px; }

.fl-escena__texto { max-width: 620px; animation: flSube .7s .12s var(--a-ease) both; }
.fl-escena__titulo {
    margin: 0 0 14px;
    color: var(--a-tinta);
    font-size: clamp(34px, 3.4vw, 54px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -.035em;
}
.fl-rota {
    position: relative;
    display: inline-block;
    vertical-align: bottom;
    overflow: hidden;
    height: 1.12em;
    padding: 0 .18em;
    border-radius: .22em;
    background: var(--a-azul);
    color: #fff;
    transition: background-color .5s var(--a-ease), width .55s var(--a-rebote);
}
.fl-rota.is-alt { background: var(--a-noche); }
.fl-rota > span {
    position: absolute;
    left: .18em; top: 0;
    line-height: 1.12em;
    white-space: nowrap;
    transform: translateY(105%);
    opacity: 0;
    transition: transform .6s var(--a-rebote), opacity .35s;
}
.fl-rota > span.is-activa { transform: none; opacity: 1; }
.fl-rota > span.is-sale { transform: translateY(-105%); opacity: 0; transition: transform .45s var(--a-ease), opacity .3s; }
.fl-escena__desc { margin: 0; color: var(--a-texto-2); font-size: 16.5px; line-height: 1.55; max-width: 470px; }

.fl-escena__tablero {
    position: relative;
    flex: 1 1 auto;
    min-height: 390px;
    max-height: 470px;
    animation: flSube .8s .25s var(--a-ease) both;
}
.fl-capa { position: absolute; transition: translate .6s var(--a-ease); }

/* ticket: tarjeta blanca con cabecera azul y total azul, igual que el POS */
.fl-ticket { left: 0; top: 20px; width: min(360px, 58%); }
.fl-ticket__papel {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #fff;
    color: var(--a-tinta);
    border: 1px solid var(--a-suave-2);
    box-shadow: var(--a-sombra);
    transform: rotate(-2deg);
}
.fl-ticket__cab {
    display: flex; align-items: center; gap: 8px;
    padding: 14px 18px;
    background: var(--a-azul); color: #fff;
    font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.fl-ticket__cab em { margin-left: auto; padding: 3px 10px; border-radius: 56px; background: var(--a-azul-2); color: #fff; font-style: normal; font-size: 11.5px; letter-spacing: 0; }
.fl-ticket__punto { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: flLate 1.4s ease-in-out infinite; }
@keyframes flLate { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
.fl-ticket.is-pagado .fl-ticket__punto { background: #4ADE80; animation: none; }
.fl-ticket__lineas { margin: 0; padding: 4px 18px 0; list-style: none; min-height: 172px; }
.fl-ticket__lineas li {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid var(--a-suave);
    font-size: 13.5px;
    opacity: 0; transform: translateX(-16px);
    transition: opacity .35s, transform .5s var(--a-rebote);
}
.fl-ticket__lineas li.is-dentro { opacity: 1; transform: none; }
.fl-ticket__lineas li i {
    flex: 0 0 28px; width: 28px; height: 28px; border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    background: var(--a-suave); color: var(--a-azul); font-size: 12px;
}
.fl-ticket__lineas li span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.fl-ticket__lineas li em { color: #8A919E; font-style: normal; font-variant-numeric: tabular-nums; font-size: 12.5px; }
.fl-ticket__lineas li b { min-width: 58px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.fl-ticket__total {
    display: flex; align-items: baseline; justify-content: space-between;
    margin: 12px 0 0; padding: 14px 18px;
    background: var(--a-azul); color: #fff;
}
.fl-ticket__total span { color: #D6E2FF; font-size: 13px; font-weight: 600; }
.fl-ticket__total strong { display: inline-block; font-size: 26px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.fl-ticket__total strong.is-tic { animation: eTic .35s var(--a-rebote); }
@keyframes eTic { 40% { transform: scale(1.1); } }
.fl-ticket__pagado {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    height: 0; margin: 0 14px; overflow: hidden;
    border-radius: 56px;
    background: var(--a-ok); color: #fff;
    font-size: 15px; font-weight: 700;
    opacity: 0;
    transition: height .45s var(--a-rebote), margin .45s, opacity .3s;
}
.fl-ticket__pagado svg { width: 18px; height: 18px; }
.fl-ticket.is-pagado .fl-ticket__pagado { height: 44px; margin: 12px 14px 14px; opacity: 1; }

.fl-sello {
    position: absolute; right: 16px; top: 70px;
    padding: 5px 12px;
    border: 3px solid var(--a-ok);
    border-radius: 10px;
    background: rgba(255, 255, 255, .9);
    color: var(--a-ok);
    font-size: 17px; font-weight: 800; letter-spacing: .1em;
    transform: rotate(-12deg) scale(2.4);
    opacity: 0;
    pointer-events: none;
}
.fl-ticket.is-pagado .fl-sello { animation: eSello .5s .2s var(--a-rebote) forwards; }
@keyframes eSello { to { transform: rotate(-12deg) scale(1); opacity: 1; } }

.fl-ficha { border-radius: 20px; box-shadow: var(--a-sombra); }
.fl-ficha--ventas {
    right: 0; top: 76px;
    width: 236px;
    padding: 18px 18px 16px;
    background: var(--a-noche); color: #fff;
}
.fl-ficha__eti { display: flex; align-items: center; justify-content: space-between; color: #A9B8E0; font-size: 12px; font-weight: 600; }
.fl-ficha__eti em { padding: 3px 8px; border-radius: 56px; background: var(--a-noche-2); color: #7FE0B0; font-style: normal; font-size: 11.5px; font-weight: 700; }
.fl-ficha--ventas > b { display: block; margin: 6px 0 12px; font-size: 28px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.fl-barras { display: flex; align-items: flex-end; gap: 6px; height: 56px; }
.fl-barras span {
    flex: 1; height: var(--h, 40%);
    border-radius: 6px 6px 3px 3px;
    background: var(--a-noche-2);
    transform-origin: bottom;
    animation: eCrece .9s var(--a-rebote) both;
    transition: height .7s var(--a-rebote), background-color .4s;
}
.fl-barras span:nth-child(1) { animation-delay: .5s; }
.fl-barras span:nth-child(2) { animation-delay: .58s; }
.fl-barras span:nth-child(3) { animation-delay: .66s; }
.fl-barras span:nth-child(4) { animation-delay: .74s; }
.fl-barras span:nth-child(5) { animation-delay: .82s; }
.fl-barras span:nth-child(6) { animation-delay: .9s; }
.fl-barras span:last-child { background: var(--a-azul-3); animation-delay: .98s; }
.fl-barras span.is-sube { background: #fff; }
@keyframes eCrece { from { transform: scaleY(0); } }

.fl-ficha--factura {
    right: 22px; bottom: 8px;
    padding: 14px 20px 14px 14px;
    background: #fff;
    border: 1px solid var(--a-suave-2);
    color: var(--a-tinta);
}
.fl-ficha__cuerpo { display: flex; align-items: center; gap: 12px; }
.fl-ficha--factura svg { flex: 0 0 42px; width: 42px; height: 42px; }
.fl-ficha--factura circle { fill: var(--a-ok); }
.fl-ficha--factura path { stroke: #fff; stroke-dasharray: 24; stroke-dashoffset: 0; }
.fl-ficha--factura.is-ok path { animation: eTraza .55s .1s var(--a-ease) both; }
@keyframes eTraza { from { stroke-dashoffset: 24; } to { stroke-dashoffset: 0; } }
.fl-ficha--factura span { font-size: 12px; font-weight: 600; color: var(--a-texto-2); }
.fl-ficha--factura span b { display: block; color: var(--a-tinta); font-size: 15px; font-weight: 700; }
.fl-ficha--factura.is-ok .fl-ficha__cuerpo { animation: eSalta .55s var(--a-rebote); }
@keyframes eSalta { 40% { transform: translateY(-8px) rotate(-2deg); } }

.fl-ficha--stock {
    right: 30px; top: 0;
    display: flex; align-items: center; gap: 10px;
    padding: 10px 16px 10px 10px;
    background: var(--a-azul); color: #fff;
}
.fl-ficha--stock i { width: 34px; height: 34px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--a-azul-2); font-size: 14px; }
.fl-ficha--stock span { font-size: 11.5px; font-weight: 600; color: #D6E2FF; }
.fl-ficha--stock span b { display: block; font-size: 14px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.fl-ficha--stock b.is-tic { animation: eTic .35s var(--a-rebote); }

.fl-aviso {
    right: 8px; top: 272px;
    display: flex; align-items: center; gap: 10px;
    padding: 10px 16px 10px 10px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--a-suave-2);
    box-shadow: var(--a-sombra);
    color: var(--a-tinta);
    opacity: 0;
    transform: translateX(40px) scale(.92);
    transition: opacity .35s, transform .6s var(--a-rebote), translate .6s var(--a-ease);
}
.fl-aviso.is-visible { opacity: 1; transform: none; }
.fl-aviso i { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--a-suave); color: var(--a-azul); font-size: 13px; }
.fl-aviso.is-visible i { animation: eCampana .8s .2s ease-in-out; }
@keyframes eCampana { 20%, 60% { transform: rotate(-16deg); } 40%, 80% { transform: rotate(16deg); } }
.fl-aviso span { font-size: 11.5px; font-weight: 600; color: var(--a-texto-2); }
.fl-aviso span b { display: block; font-size: 13.5px; font-weight: 700; color: var(--a-tinta); }

.fl-flota { animation: flFlota 7s ease-in-out infinite; }
.fl-flota--b { animation-duration: 8.5s; animation-delay: -2s; }
.fl-flota--c { animation-duration: 6.5s; animation-delay: -4s; }
@keyframes flFlota { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* carrusel: pastillas blancas con ícono en mosaico azul (como la barra de acciones del POS) */
.fl-carrusel {
    overflow: hidden;
    margin: auto -52px 0;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
    animation: flSube .7s .45s var(--a-ease) both;
}
.fl-carrusel ul { display: flex; gap: 10px; width: max-content; margin: 0; padding: 0; list-style: none; animation: eDesliza 40s linear infinite; }
.fl-carrusel:hover ul { animation-play-state: paused; }
.fl-carrusel li {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 6px 18px 6px 6px;
    border-radius: 56px;
    font-size: 14px; font-weight: 600;
    white-space: nowrap;
    background: #fff; color: var(--a-tinta);
    border: 1px solid var(--a-suave-2);
}
.fl-carrusel li i { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--a-suave); color: var(--a-azul); font-size: 12px; }
.fl-carrusel li:nth-child(3n+2) { background: var(--a-azul); color: #fff; border-color: var(--a-azul); }
.fl-carrusel li:nth-child(3n+2) i { background: #fff; }
@keyframes eDesliza { to { transform: translateX(calc(-50% - 5px)); } }

.fl-escena.is-pausa, .fl-escena.is-pausa * { animation-play-state: paused !important; }

@media (max-width: 1399px) { .fl-ficha--ventas { width: 218px; } }
@media (max-width: 1199px) {
    .auth-right.fl-escena { padding: 36px 36px 28px; }
    .fl-carrusel { margin: auto -36px 0; }
    .fl-ficha--stock, .fl-aviso { display: none; }
    .fl-ticket { width: min(330px, 62%); }
    .fl-ficha--ventas { width: 190px; }
}
@media (max-height: 820px) and (min-width: 992px) {
    .auth-right.fl-escena { padding-top: 30px; padding-bottom: 24px; gap: 20px; }
    .fl-escena__desc { display: none; }
    .fl-escena__titulo { font-size: clamp(30px, 3vw, 46px); margin-bottom: 0; }
    .fl-escena__tablero { min-height: 370px; }
}
@media (max-height: 700px) and (min-width: 992px) {
    .fl-ficha--factura, .fl-aviso { display: none; }
}

/* ---------------------------------------------------------------- panel izquierdo */
.auth-left { background: #fff !important; isolation: isolate; }
/* fondo: rejilla de puntos azul que se desvanece + dos formas suaves que derivan */
.auth-left::before, .auth-left::after { content: ""; position: absolute; pointer-events: none; z-index: 0; }
.auth-left::before {
    inset: -30px;
    background-image: radial-gradient(rgba(0, 82, 255, .16) 1.2px, transparent 1.5px);
    background-size: 24px 24px;
    -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 45%, transparent 35%, #000 70%, transparent 100%);
    mask-image: radial-gradient(ellipse 60% 50% at 50% 45%, transparent 35%, #000 70%, transparent 100%);
    animation: eDeriva 30s linear infinite reverse;
}
.auth-left::after {
    width: 300px; height: 300px; left: -120px; top: -110px;
    border-radius: 50%;
    background: var(--a-suave);
    animation: eRespira 11s ease-in-out infinite;
}
.auth-left > .aurora { display: block !important; position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.auth-left > .aurora span { position: absolute; display: block; }
.auth-left > .aurora span:nth-child(1) { width: 180px; height: 180px; right: -60px; bottom: 60px; border-radius: 48px; background: var(--a-suave); animation: eGira 36s linear infinite; }
.auth-left > .aurora span:nth-child(2) { width: 90px; height: 90px; right: -34px; top: 42%; border-radius: 50%; border: 12px solid var(--a-suave-2); animation: flFlota 8s ease-in-out infinite; }
.auth-left > .aurora span:nth-child(3) { width: 14px; height: 14px; left: 7%; bottom: 7%; border-radius: 50%; background: var(--a-azul); animation: flFlota 5s ease-in-out infinite; }

.brand-logo img { transition: transform .4s var(--a-rebote); }
.brand-logo:hover img { transform: scale(1.04) rotate(-1deg); }

.login-card-inner, .auth-card, .login-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--a-suave-2) !important;
    border-radius: 28px !important;
    box-shadow: var(--a-sombra) !important;
}

/* encabezado azul sólido de la tarjeta (como el encabezado de módulo del sistema) */
.login-card-inner .login-form > .card-inner-header,
.login-card-inner .forget-form > .card-inner-header,
.login-card-inner .finger-form > .card-inner-header {
    position: relative;
    overflow: hidden;
    margin: -36px -34px 26px;
    padding: 28px 34px 26px;
    background: var(--a-azul);
    color: #fff;
    text-align: left;
}
.login-card-inner .login-form > .card-inner-header .card-inner-title,
.login-card-inner .forget-form > .card-inner-header .card-inner-title,
.login-card-inner .finger-form > .card-inner-header .card-inner-title { color: #fff; font-size: 26px; font-weight: 800; letter-spacing: -.025em; }
.company-header .card-inner-title { color: var(--a-tinta); font-weight: 800; letter-spacing: -.02em; }
.login-card-inner .login-form .card-inner-subtitle,
.login-card-inner .forget-form .card-inner-subtitle,
.login-card-inner .finger-form .card-inner-subtitle { color: #D6E2FF; }
/* rayas diagonales que se deslizan dentro del encabezado */
.login-card-inner .login-form > .card-inner-header::before,
.login-card-inner .forget-form > .card-inner-header::before,
.login-card-inner .finger-form > .card-inner-header::before {
    content: "";
    position: absolute;
    inset: 0 -60px 0 auto;
    width: 260px;
    background: repeating-linear-gradient(-45deg, rgba(255, 255, 255, .09) 0 10px, transparent 10px 22px);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%);
    mask-image: linear-gradient(90deg, transparent, #000 60%);
    animation: eRayas 6s linear infinite;
}
@keyframes eRayas { to { transform: translateX(-31px); } }
/* círculo decorativo que respira en la esquina del encabezado */
.login-card-inner .login-form > .card-inner-header::after {
    content: "";
    position: absolute;
    right: -34px; top: -34px;
    width: 120px; height: 120px;
    border-radius: 50%;
    border: 16px solid var(--a-azul-3);
    animation: eRespira 7s ease-in-out infinite;
}
.login-card-inner .card-inner-header > * { position: relative; z-index: 1; }

.fl-saludo {
    display: inline-flex; align-items: center; gap: 8px;
    margin-bottom: 14px;
    padding: 5px 14px 5px 5px;
    border-radius: 56px;
    background: var(--a-azul-2);
    color: #fff;
    font-size: 13px; font-weight: 600;
}
.fl-saludo i {
    width: 24px; height: 24px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: #fff; color: var(--a-azul); font-size: 11px;
    animation: eSol 14s linear infinite;
}
@keyframes eSol { to { transform: rotate(360deg); } }
.fl-saludo.is-noche i { animation: eMece 4s ease-in-out infinite; }
@keyframes eMece { 0%, 100% { transform: rotate(-14deg); } 50% { transform: rotate(14deg); } }

/* campos estilo POS: ícono en un mosaico azul suave que se llena al enfocar */
.auth-left .input-wrapper .input-icon-left {
    left: 7px;
    width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 11px;
    background: var(--a-suave);
    color: var(--a-azul);
    font-size: 14px;
    transition: background-color .25s, color .25s, transform .35s var(--a-rebote);
}
.auth-left .input-wrapper:focus-within .input-icon-left { background: var(--a-azul); color: #fff; animation: none; transform: translateY(-50%) rotate(-8deg); }
.auth-left .input-wrapper .form-control,
.auth-left .input-wrapper input[type="text"],
.auth-left .input-wrapper input[type="password"],
.auth-left .input-wrapper input[type="email"] {
    padding-left: 56px !important;
    border-radius: 14px !important;
    border: 1.5px solid var(--a-suave-2) !important;
    background: #fff !important;
    font-weight: 500;
}
.auth-left .input-wrapper .form-control:hover { border-color: #B9CCFF !important; }
.auth-left .input-wrapper .form-control:focus { border-color: var(--a-azul) !important; box-shadow: 0 0 0 4px rgba(0, 82, 255, .14) !important; }
.field-label { color: var(--a-tinta); }
.field-label-link { color: var(--a-azul) !important; }
.field-label-link:hover { color: var(--a-azul-2) !important; text-decoration: underline !important; }

/* aviso de Bloq Mayús */
.fl-mayus {
    display: none;
    align-items: center; gap: 6px;
    margin-top: 8px;
    font-size: 12px; font-weight: 600;
    color: #B45309;
}
.fl-mayus.is-visible { display: flex; animation: flSube .25s var(--a-ease) both; }

/* botón principal: pastilla azul con onda y flecha viajera */
.btn-submit-main { position: relative; overflow: hidden; }
.btn-submit-main::after {
    content: "";
    position: absolute;
    top: 0; bottom: 0; left: -40%;
    width: 30%;
    background: rgba(255, 255, 255, .18);
    transform: skewX(-20deg);
    transition: left .6s var(--a-ease);
}
.btn-submit-main:hover::after { left: 120%; }
.btn-submit-main .fl-onda {
    position: absolute; border-radius: 50%;
    background: rgba(255, 255, 255, .35);
    transform: scale(0);
    animation: eOnda .6s ease-out forwards;
    pointer-events: none;
}
@keyframes eOnda { to { transform: scale(4); opacity: 0; } }
.btn-submit-main:hover i.fa-arrow-right { animation: eFlecha .9s ease-in-out infinite; }
@keyframes eFlecha { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(5px); } }

.btn-secondary-modern { border-radius: 56px !important; min-height: 56px; border-color: var(--a-suave-2) !important; color: var(--a-azul-2) !important; }
.btn-secondary-modern:hover { background: var(--a-suave) !important; }

/* pie: pastilla de conexión segura */
.auth-left-footer {
    width: auto;
    padding: 8px 16px 8px 8px;
    border-radius: 56px;
    background: #fff;
    border: 1px solid var(--a-suave-2);
    color: var(--a-texto-2);
    font-weight: 600;
}
.auth-left-footer i {
    width: 24px; height: 24px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--a-suave); color: var(--a-azul); font-size: 11px;
}

#alerta-container .alert-danger { animation: rise .3s var(--ease) both, eSacude .45s .3s; }
@keyframes eSacude { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* ---------------------------------------------------------------- selector de empresa y cambio de clave */
.company-card, .password-card { padding-top: 0 !important; }
/* encabezado azul con el usuario (pasos + saludo) */
.company-card .fl-cabeza, .password-card .fl-cabeza {
    position: relative;
    overflow: hidden;
    margin: 0 -28px 22px;
    padding: 22px 28px 20px;
    background: var(--a-azul);
    color: #fff;
}
.fl-cabeza::before {
    content: "";
    position: absolute;
    inset: 0 -60px 0 auto;
    width: 240px;
    background: repeating-linear-gradient(-45deg, rgba(255, 255, 255, .09) 0 10px, transparent 10px 22px);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%);
    mask-image: linear-gradient(90deg, transparent, #000 60%);
    animation: eRayas 6s linear infinite;
}
.fl-cabeza > * { position: relative; z-index: 1; }
.fl-cabeza .stepper { color: #A9C1FF; margin-bottom: 18px; }
.fl-cabeza .stepper .is-done, .fl-cabeza .stepper .is-current { color: #fff; }
.fl-cabeza .stepper .is-done .stepper-dot { background: #fff; color: var(--a-azul); }
.fl-cabeza .stepper .is-current .stepper-dot { background: var(--a-noche); color: #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, .25); animation: ePaso 2s ease-in-out infinite; }
@keyframes ePaso { 50% { box-shadow: 0 0 0 7px rgba(255, 255, 255, .12); } }
.fl-cabeza .stepper li:not(.is-done):not(.is-current) .stepper-dot { background: var(--a-azul-2); color: #A9C1FF; border: 0; }
.fl-cabeza .stepper-line { background: rgba(255, 255, 255, .55); position: relative; overflow: hidden; }
.fl-cabeza .stepper-line.is-pending { background: var(--a-azul-2); }
.fl-cabeza .stepper-line::after { content: ""; position: absolute; top: 0; bottom: 0; width: 30%; background: #fff; animation: eLinea 1.8s var(--a-ease) infinite; }
.fl-cabeza .stepper-line.is-pending::after { content: none; }
@keyframes eLinea { from { left: -30%; } to { left: 100%; } }
.fl-cabeza .user-hello { margin: 0; background: var(--a-azul-2); border: 0; }
.fl-cabeza .user-hello-avatar { background: #fff; color: var(--a-azul); }
.fl-cabeza .user-hello-label { color: #A9C1FF; }
.fl-cabeza .user-hello-name { color: #fff; }
.fl-cabeza .user-hello-status { background: #fff; border: 0; color: var(--a-ok); }
.fl-cabeza .user-hello-status.is-warning { color: #B45309; }

.company-option { border-color: var(--a-suave-2); border-radius: 16px; }
.company-option:hover { border-color: #B9CCFF; background: #FAFCFF; }
.company-option.is-selected { border-color: var(--a-azul); background: var(--a-suave); box-shadow: 0 0 0 4px rgba(0, 82, 255, .12); }
.company-avatar { border-radius: 13px; box-shadow: none; transition: transform .35s var(--a-rebote); }
.company-option.is-selected .company-avatar { transform: rotate(-6deg) scale(1.06); }
.company-option.is-selected .company-check { animation: eCheck .4s var(--a-rebote); }
@keyframes eCheck { from { transform: scale(.4); } }
.company-search input { border-radius: 14px; border-color: var(--a-suave-2); }
.fl-cambiar-usuario {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    margin-top: 14px;
    font-size: 13px; font-weight: 600;
    color: var(--a-texto-2) !important;
    text-decoration: none !important;
}
.fl-cambiar-usuario:hover { color: var(--a-azul) !important; }
.fl-cambiar-usuario i { transition: transform .25s var(--a-ease); }
.fl-cambiar-usuario:hover i { transform: translateX(-3px); }

@media (max-width: 480px) {
    .login-card-inner .login-form > .card-inner-header,
    .login-card-inner .forget-form > .card-inner-header,
    .login-card-inner .finger-form > .card-inner-header { margin: -28px -20px 22px; padding: 24px 20px 22px; }
    .company-card .fl-cabeza, .password-card .fl-cabeza { margin: 0 -16px 18px; padding: 18px 16px; }
}
@media (max-height: 700px) and (min-width: 992px) {
    .login-card-inner .login-form > .card-inner-header { margin-top: -26px; padding: 20px 30px 18px; margin-bottom: 18px; }
}
@media (prefers-reduced-motion: reduce) {
    .fl-escena *, .auth-left *, .auth-left::before, .auth-left::after { animation: none !important; transition: none !important; }
    .fl-rota > span.is-activa, .fl-ticket__lineas li { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------------- mascota: las tres personitas del logo
   Colores planos del logo. Las medidas de los transform van en unidades del viewBox (600 de ancho). */
.fl-escena > .fl-escena__cabecera { position: static; }
.fl-escena__reloj { margin-left: 0; }
.fl-mascota {
    position: absolute;
    top: 14px; right: 44px;
    z-index: 2;
    width: clamp(108px, 10vw, 160px);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    animation: eMascotaEntra .9s .35s var(--a-rebote) both;
}
@keyframes eMascotaEntra { from { opacity: 0; transform: translateY(30px) scale(.6); } }
.fl-mascota svg { display: block; width: 100%; height: auto; overflow: visible; transform-origin: 50% 85%; }
.fl-m__c { fill: none; stroke-width: 68; }
.fl-m__c--a { stroke: #3B22CF; }
.fl-m__c--b { stroke: #1F86FF; }
.fl-m__c--c { stroke: #B07CF5; }
.fl-m__cab--a circle { fill: #3B22CF; }
.fl-m__cab--b circle { fill: #1F86FF; }
.fl-m__cab--c circle { fill: #B07CF5; }
.fl-m__todo, .fl-m__cab { transform-box: fill-box; transform-origin: 50% 100%; }
.fl-m__todo { transition: transform .4s var(--a-rebote); }

/* reposo normal: cada cabeza se mece a su ritmo */
.fl-m__cab { animation: eBob 3.2s ease-in-out infinite; }
.fl-m__cab--b { animation-delay: -1.1s; }
.fl-m__cab--c { animation-delay: -2.2s; }
@keyframes eBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* cerca del puntero: curiosas, un poco más grandes */
.fl-mascota.is-cerca .fl-m__todo { transform: scale(1.07); }

/* rápido: se emocionan y saltan en cadena */
.fl-mascota.is-emocion .fl-m__cab { animation: eBrinco .5s cubic-bezier(.3, 1.6, .5, 1) 2; }
.fl-mascota.is-emocion .fl-m__cab--b { animation-delay: .08s; }
.fl-mascota.is-emocion .fl-m__cab--c { animation-delay: .16s; }
@keyframes eBrinco { 0%, 100% { transform: translateY(0) scale(1); } 45% { transform: translateY(-70px) scale(1.06, .94); } }

/* zarandeo: se marean */
.fl-mascota.is-mareo .fl-m__todo { animation: eMareo .42s ease-in-out 4; }
.fl-mascota.is-mareo .fl-m__cab { animation: eGiroCab .6s linear 3; }
@keyframes eMareo { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-9deg); } 75% { transform: rotate(9deg); } }
@keyframes eGiroCab { 0% { transform: rotate(0) translateX(14px) rotate(0); } 100% { transform: rotate(360deg) translateX(14px) rotate(-360deg); } }

/* encima: saludan en ola */
.fl-mascota.is-saludo .fl-m__cab { animation: eOla .55s cubic-bezier(.3, 1.6, .5, 1) 1 both; }
.fl-mascota.is-saludo .fl-m__cab--b { animation-delay: .14s; }
.fl-mascota.is-saludo .fl-m__cab--c { animation-delay: .28s; }
@keyframes eOla { 50% { transform: translateY(-55px) rotate(-10deg); } }

/* clic: salto grande, juntas */
.fl-mascota.is-salto .fl-m__todo { animation: eSaltoGrande .85s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes eSaltoGrande {
    0% { transform: scale(1, 1); }
    15% { transform: scale(1.08, .86); }
    50% { transform: translateY(-90px) scale(.95, 1.06); }
    80% { transform: translateY(0) scale(1.06, .92); }
    100% { transform: scale(1, 1); }
}

/* escribiendo el usuario: asienten */
.fl-mascota.is-asiente .fl-m__cab { animation: eAsiente .35s ease-out; }
@keyframes eAsiente { 50% { transform: translateY(14px); } }

/* sin mover el mouse: respiración lenta; luego se duermen */
.fl-mascota.is-reposo .fl-m__cab { animation-duration: 5.5s; }
.fl-mascota.is-dormido .fl-m__cab { animation: eRonca 4s ease-in-out infinite; }
@keyframes eRonca { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05, .96); } }
.fl-m__zz text { font: 800 90px Inter, sans-serif; fill: var(--a-azul); opacity: 0; }
.fl-mascota.is-dormido .fl-m__zz text { animation: eZz 3s ease-in-out infinite; }
.fl-mascota.is-dormido .fl-m__zz text:nth-child(2) { animation-delay: 1s; font-size: 110px; }
.fl-mascota.is-dormido .fl-m__zz text:nth-child(3) { animation-delay: 2s; font-size: 130px; }
@keyframes eZz { 0% { opacity: 0; transform: translate(0, 20px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(30px, -40px); } }

/* contraseña: miran hacia otro lado y se encogen un poco */
.fl-mascota.is-tapado .fl-m__todo { transform: scale(.94); }
.fl-mascota.is-tapado .fl-m__cab { animation: none; }

/* globo de diálogo */
.fl-mascota__globo {
    position: absolute;
    right: 92%; top: 26%;
    padding: 6px 12px;
    border-radius: 14px 14px 4px 14px;
    background: var(--a-noche);
    color: #fff;
    font-size: 12.5px; font-weight: 700;
    white-space: nowrap;
    opacity: 0;
    transform: translate(8px, 4px) scale(.7);
    transform-origin: 100% 100%;
    transition: opacity .2s, transform .35s var(--a-rebote);
    pointer-events: none;
}
.fl-mascota.is-habla .fl-mascota__globo { opacity: 1; transform: none; }

@media (max-width: 1099px) { .fl-mascota { display: none; } }
@media (max-height: 820px) and (min-width: 992px) { .fl-mascota { width: clamp(100px, 8.5vw, 140px); top: 8px; } }
@media (prefers-reduced-motion: reduce) { .fl-mascota * { animation: none !important; } }
