/* Diseño vigente del acceso de web_store. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* Login de tiendas: composición dividida inspirada en la identidad Chequea. */
    body {
        font-family: 'Inter', 'Segoe UI', sans-serif;
        background: #ffffff !important;
    }

    .store-login-page {
        position: relative;
        z-index: 3;
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        min-height: 100dvh;
        width: 100%;
        overflow: hidden;
        background: #ffffff;
    }

    .store-login-form-side {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 0;
        min-height: 100dvh;
        padding: clamp(1.1rem, 3vh, 2.25rem) clamp(2rem, 6vw, 6rem) 5rem;
        background: #ffffff;
    }

    .store-login-form-side .client-auth-shell {
        width: 100% !important;
        max-width: 560px;
        min-height: 0;
        height: auto !important;
        padding: 0 !important;
        align-items: stretch;
        justify-content: center;
    }

    .store-login-form-side .client-brand-header {
        width: 100%;
        max-width: none;
        margin: 0 0 1.25rem !important;
        text-align: left !important;
    }

    .store-login-form-side .client-logo-wrap {
        justify-content: center;
    }

    .store-login-form-side .client-brand-header .logo-svg {
        width: 100%;
        max-width: 330px;
        margin-bottom: 0.65rem;
        filter: none;
    }

    .store-login-form-side .client-brand-header .logo-svg path[fill="#FFFFFF"] {
        fill: #111827 !important;
    }

    .store-login-form-side .client-brand-header .logo-svg path[fill="#DF640A"] {
        fill: #ff651d !important;
    }

    .store-login-form-side .client-brand-badge {
        position: relative;
        display: block;
        width: max-content;
        max-width: 100%;
        margin: 0 !important;
        padding: 0 0 0 3.7rem;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        color: #64748b;
        font-size: 0.95rem;
        font-weight: 500;
        letter-spacing: 0;
    }

    .store-login-form-side .client-brand-badge::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 0;
        width: 2.25rem;
        height: 0.38rem;
        border-radius: 999px;
        background: #ff651d;
        transform: translateY(-50%);
    }

    .store-login-form-side .form-card-wrap {
        justify-content: flex-start;
    }

    .store-login-form-card {
        width: 100%;
        max-width: 560px !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    .store-login-form-card::before {
        display: none !important;
    }

    .store-login-heading {
        margin: 0 0 0.75rem !important;
        color: #111827 !important;
        font-size: clamp(1.9rem, 2.65vw, 2.85rem) !important;
        font-weight: 800 !important;
        line-height: 1.05 !important;
        letter-spacing: -0.055em !important;
        text-align: left !important;
    }

    .store-login-lead {
        max-width: 35rem;
        margin: 0 0 1.35rem;
        color: #94a3b8;
        font-size: 1rem;
        line-height: 1.35;
    }

    .store-login-form-card #loginPanel .form-label {
        position: absolute !important;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .store-login-form-card #loginPanel form .mb-3 {
        margin-bottom: 0.85rem !important;
    }

    .store-login-form-card #loginPanel .input-group {
        position: relative;
        margin-bottom: 0;
        border: 1px solid #dbe2ea;
        border-radius: 0.75rem;
        background: #ffffff;
        transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }

    .store-login-form-card #loginPanel .input-group:focus-within {
        border-color: #94a3b8;
        box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.16);
    }

    .store-login-form-card #loginPanel .input-group input.form-control {
        height: 54px !important;
        border: 0 !important;
        border-radius: 0.75rem !important;
        background: transparent !important;
        box-shadow: none !important;
        color: #1e293b !important;
        font-size: 1rem !important;
        padding: 0 3.6rem !important;
    }

    .store-login-form-card #loginPanel .input-group .input-icon {
        z-index: 2;
        left: 1.35rem;
        color: #334155 !important;
    }

    .store-login-form-card #loginPanel .password-toggle {
        right: 1.35rem;
        color: #334155 !important;
    }

    .store-login-form-card #showForgotPasswordLink {
        display: block;
        margin-top: -0.25rem;
        color: #ff651d !important;
        font-size: 0.95rem !important;
        text-align: right;
    }

    .store-login-form-card #loginButton {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 54px !important;
        border: 0 !important;
        border-radius: 0.75rem !important;
        background: linear-gradient(90deg, #ff651d, #ff6b1e) !important;
        box-shadow: 0 12px 24px rgba(255, 101, 29, 0.22) !important;
        font-size: 1.05rem;
    }

    .store-login-form-card #loginButton::after {
        content: '\f061';
        position: absolute;
        right: 1.5rem;
        color: #ffffff;
        font-family: 'Font Awesome 6 Free';
        font-size: 1.1rem;
        font-weight: 900;
    }

    .store-login-form-card .divider {
        margin: 1rem 0 0.9rem;
    }

    .store-login-form-card #showRegisterLink {
        display: flex;
        align-items: center;
        gap: 1rem;
        width: 100%;
        padding: 0.85rem 1.1rem;
        border: 1px solid #dbe2ea;
        border-radius: 0.75rem;
        background: #ffffff;
        color: #111827 !important;
        font-size: 1rem !important;
        text-align: left;
        text-decoration: none;
    }

    .store-login-form-card #showRegisterLink:hover {
        border-color: #ffb28f;
        background: #fffaf7;
    }

    .store-login-form-card .register-cta-icon {
        display: block !important;
        flex: 0 0 auto;
        color: #111827;
        font-size: 1.6rem;
    }

    .store-login-form-card .register-cta-copy {
        display: flex;
        flex: 1;
        flex-direction: column;
        gap: 0.15rem;
        min-width: 0;
    }

    .store-login-form-card .register-cta-copy strong {
        font-size: 1rem;
        font-weight: 800;
    }

    .store-login-form-card .register-cta-copy small {
        color: #94a3b8;
        font-size: 0.85rem;
    }

    .store-login-form-card .register-cta-arrow {
        display: block !important;
        flex: 0 0 auto;
        color: #ff651d;
        font-size: 1.4rem;
    }

    .store-login-footer {
        position: absolute;
        right: clamp(2rem, 6vw, 6rem);
        bottom: 2rem;
        left: clamp(2rem, 6vw, 6rem);
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        max-width: 560px;
        margin: 0 auto;
        color: #94a3b8;
        font-size: 0.78rem;
    }

    .store-login-footer nav {
        display: flex;
        gap: 1rem;
    }

    .store-login-footer a {
        color: #64748b !important;
        font-size: 0.78rem !important;
        text-decoration: none;
    }

    .store-login-footer a:hover {
        color: #ff651d !important;
    }

    .store-login-form-card #statusMessage {
        margin-top: 0.5rem !important;
        margin-bottom: 0.5rem !important;
    }

    .store-login-form-card #statusMessage:empty {
        min-height: 0 !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    .store-login-form-card .legal-inline {
        margin-top: 0.6rem;
    }

    .store-login-form-card .legal-inline p {
        font-size: 0.72rem;
    }

    .store-login-hero {
        position: relative;
        min-height: 100dvh;
        overflow: hidden;
        background: #eaded2;
    }

    .store-login-hero img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center center;
    }

    .store-login-hero::after {
        position: absolute;
        inset: 0;
        background: linear-gradient(180deg, rgba(15, 23, 42, 0.16), transparent 40%, rgba(15, 23, 42, 0.2));
        content: '';
        pointer-events: none;
    }

    .store-login-hero-badge {
        position: absolute;
        z-index: 1;
        top: 2.4rem;
        right: 2.4rem;
        display: flex;
        align-items: center;
        gap: 0.9rem;
        padding: 1.15rem 1.4rem;
        border-radius: 1.1rem;
        background: rgba(31, 41, 55, 0.7);
        color: #ffffff;
        font-weight: 700;
        line-height: 1.2;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    .store-login-hero-badge i {
        font-size: 1.55rem;
    }

    .store-login-hero-badge span {
        font-size: 0.95rem;
    }

    @media (max-width: 991.98px) {
        .store-login-page {
            display: block;
            overflow: visible;
        }

        .store-login-hero {
            display: none;
        }

        .store-login-form-side {
            align-items: flex-start;
            min-height: 100dvh;
            padding: 2rem 1rem 5.5rem;
        }

        .store-login-form-side .client-auth-shell {
            max-width: 560px;
        }

        .store-login-footer {
            position: absolute;
            right: 1rem;
            bottom: 1.5rem;
            left: 1rem;
            max-width: 560px;
        }
    }

    @media (max-width: 576px) {
        .store-login-form-side {
            padding: 1.5rem 0.9rem 5.5rem;
        }

        .store-login-form-side .client-brand-header {
            margin-bottom: 1.75rem !important;
        }

        .store-login-form-side .client-brand-header .logo-svg {
            max-width: 280px;
        }

        .store-login-heading {
            font-size: 2.15rem !important;
        }

        .store-login-lead {
            margin-bottom: 1.6rem;
            font-size: 0.98rem;
        }

        .store-login-form-card #loginPanel .input-group input.form-control,
        .store-login-form-card #loginButton {
            height: 56px !important;
        }

        .store-login-form-card #showRegisterLink {
            padding: 1rem;
        }

        .store-login-footer {
            flex-direction: column;
            align-items: flex-start;
            gap: 0.65rem;
            padding-top: 1.25rem;
        }
    }

    @media (min-width: 992px) and (min-height: 760px) {
        html,
        body {
            overflow: hidden;
        }

        .store-login-page,
        .store-login-form-side,
        .store-login-hero {
            height: 100dvh;
            min-height: 100dvh;
        }
    }

    /* Viewport de escritorio bajo: mantiene el formulario completo visible. */
    @media (min-width: 992px) and (min-height: 600px) and (max-height: 759.98px) {
        html,
        body {
            overflow: hidden;
        }

        .store-login-page,
        .store-login-form-side,
        .store-login-hero {
            height: 100dvh;
            min-height: 100dvh;
        }

        .store-login-form-side {
            padding-top: 0.7rem;
            padding-bottom: 3.75rem;
        }

        .store-login-form-side .client-brand-header {
            margin-bottom: 0.65rem !important;
        }

        .store-login-form-side .client-brand-header .logo-svg {
            max-width: 290px;
            margin-bottom: 0.4rem;
        }

        .store-login-form-side .client-brand-badge {
            font-size: 0.85rem;
        }

        .store-login-heading {
            margin-bottom: 0.45rem !important;
            font-size: clamp(1.65rem, 2.45vw, 2.4rem) !important;
        }

        .store-login-lead {
            margin-bottom: 0.8rem;
            font-size: 0.82rem;
            line-height: 1.25;
        }

        .store-login-form-card #loginPanel form .mb-3 {
            margin-bottom: 0.6rem !important;
        }

        .store-login-form-card #loginPanel .input-group input.form-control,
        .store-login-form-card #loginButton {
            height: 50px !important;
        }

        .store-login-form-card #showForgotPasswordLink {
            font-size: 0.8rem !important;
        }

        .store-login-form-card #loginButton {
            font-size: 0.95rem;
        }

        .store-login-form-card .divider {
            margin: 0.65rem 0 0.6rem;
        }

        .store-login-form-card #showRegisterLink {
            gap: 0.75rem;
            padding: 0.65rem 0.9rem;
        }

        .store-login-form-card .register-cta-icon {
            font-size: 1.3rem;
        }

        .store-login-form-card .register-cta-copy strong {
            font-size: 0.85rem;
        }

        .store-login-form-card .register-cta-copy small {
            font-size: 0.72rem;
        }

        .store-login-form-card .register-cta-arrow {
            font-size: 1.15rem;
        }

        .store-login-form-card .legal-inline {
            margin-top: 0.4rem;
        }

        .store-login-form-card .legal-inline p {
            font-size: 0.65rem;
        }

        .store-login-footer {
            display: none;
        }
    }

    /* Teléfono con selector de país unificado */
    .phone-input-group {
        display: flex !important;
        align-items: stretch !important;
        width: 100%;
    }
    .phone-input-group .phone-country-select {
        flex: 0 0 115px !important;
        max-width: 115px !important;
        min-width: 110px !important;
        border-top-right-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
        border-right: 0 !important;
        font-weight: 700 !important;
        font-size: 0.88rem !important;
        cursor: pointer !important;
        padding-left: 8px !important;
        padding-right: 20px !important;
        background-position: right 6px center !important;
        background-size: 12px 10px !important;
        background-color: rgba(248, 251, 248, 0.98);
        border: 1px solid rgba(23, 61, 42, 0.14);
        color: #173d2a;
    }
    .phone-input-group .phone-country-select:focus {
        border-color: rgba(25, 135, 84, 0.45);
        outline: none;
        box-shadow: none;
    }
    .phone-input-group .phone-national-input {
        flex: 1 1 auto !important;
        border-top-left-radius: 0 !important;
        border-bottom-left-radius: 0 !important;
        padding-left: 14px !important;
        padding-right: 14px !important;
        font-size: 0.92rem !important;
        font-weight: 600 !important;
        letter-spacing: 0.03em !important;
        background-color: rgba(248, 251, 248, 0.98);
        border: 1px solid rgba(23, 61, 42, 0.14);
        color: #173d2a;
    }
    .phone-input-group .phone-national-input:focus {
        background-color: #ffffff;
        border-color: rgba(25, 135, 84, 0.45);
        box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.12);
    }
/* Diálogos funcionales del acceso: registro, recuperación y verificación. */
.auth-shell { position: relative; z-index: 2; }

.modal-content {
    color: #173d2a;
    background: #ffffff;
    border: 1px solid rgba(23, 61, 42, 0.10);
    border-radius: 1.2rem;
    box-shadow: 0 24px 56px rgba(15, 23, 42, 0.18);
}

#registerModal .modal-dialog { max-width: 32rem; }
.register-modal-surface { overflow: hidden; border: 0; }
.register-modal-header,
.register-legal-header,
#forgotPasswordModal .modal-header {
    color: #ffffff;
    background: linear-gradient(135deg, #ff651d 0%, #df640a 100%);
    border: 0;
}
.register-modal-header { padding: 1.1rem 1.4rem; }
.register-modal-header .modal-title,
.register-legal-header .modal-title,
#forgotPasswordModal .modal-title { color: #ffffff; }
.register-label { color: #1f2937 !important; font-weight: 700; }
.register-hint,
#passwordHintModal { color: #475569; }
.register-back-link,
.register-legal-link { color: #ff651d; text-decoration: none; }
.register-back-link:hover,
.register-legal-link:hover { color: #df640a; }
.register-legal p { color: #475569; }
.register-legal-body { color: #2a4a38; }
.register-legal-muted { color: #64748b; }

.input-group { position: relative; }
.input-group .input-icon {
    position: absolute;
    z-index: 3;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    color: #ff651d;
    pointer-events: none;
}
.input-group .password-toggle {
    position: absolute;
    z-index: 4;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    padding: 0;
    color: #df640a;
    cursor: pointer;
    background: transparent;
    border: 0;
}
.register-modal-surface .input-group input.form-control,
#forgotPasswordModal .input-group input.form-control {
    padding-right: 44px;
    padding-left: 44px;
}
.register-modal-surface .form-control,
.register-modal-surface .form-select,
#forgotPasswordModal .form-control {
    color: #0f172a;
    background: #ffffff;
    border: 1px solid #dbe2ea;
    border-radius: 0.75rem;
}
.register-modal-surface .form-control:focus,
.register-modal-surface .form-select:focus,
#forgotPasswordModal .form-control:focus {
    border-color: rgba(255, 101, 29, 0.55);
    box-shadow: 0 0 0 0.2rem rgba(255, 101, 29, 0.13);
}
.register-modal-surface .password-strength {
    height: 4px;
    margin-top: 10px;
    overflow: hidden;
    background: rgba(255, 216, 198, 0.65);
    border-radius: 2px;
}
.register-modal-surface .password-strength-bar {
    width: 0;
    height: 100%;
    transition: width 0.25s ease;
}
.register-modal-surface .password-strength-bar.weak { width: 33%; background: #f97316; }
.register-modal-surface .password-strength-bar.medium { width: 66%; background: #ff8a50; }
.register-modal-surface .password-strength-bar.strong { width: 100%; background: #198754; }
.register-modal-surface #registerButtonModal {
    min-height: 48px;
    color: #ffffff;
    background: linear-gradient(135deg, #ff651d 0%, #df640a 100%);
    border: 0;
    border-radius: 0.8rem;
}
#registerStatusModal.alert-danger { color: #7f1d1d; background: #fff1f2; border-color: #fda4af; }
#registerStatusModal.alert-success { color: #14532d; background: #ecfdf5; border-color: #86efac; }

#legalNoticeModal .modal-dialog { max-width: 32rem; }
#legalNoticeModal .modal-content { overflow: hidden; border-radius: 1.35rem; }
#legalNoticeModal .modal-header {
    padding: 1rem 1.25rem;
    color: #ffffff;
    background: linear-gradient(135deg, #ff651d 0%, #df640a 100%);
}
#legalNoticeModal .modal-title { color: #ffffff; font-size: 1rem; font-weight: 700; }
#legalNoticeModal .modal-body {
    padding: 1.15rem 1.25rem 1.3rem;
    color: #2a4a38;
    font-size: 0.93rem;
    line-height: 1.7;
}
#legalNoticeModal .modal-body a { color: #ff651d; font-weight: 600; text-decoration: underline; }
#legalNoticeModal .modal-body .text-muted { color: #4b5563 !important; }

#activationModal .modal-content,
#confirmActivationModal .modal-content { overflow: hidden; border-radius: 1.2rem; }
#activationCodeInput {
    height: 60px;
    color: #173d2a;
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.35em;
    background: #ffffff;
    border: 1px solid #dbe2ea;
    border-radius: 0.75rem;
}
#activationCodeInput:focus {
    border-color: #ff651d;
    box-shadow: 0 0 0 0.2rem rgba(255, 101, 29, 0.13);
}
#activationBackToRegister { color: #df640a !important; }

@media (max-width: 576px) {
    #registerModal .modal-dialog { margin: 0.75rem; }
    .register-modal-header { padding: 1rem; }
}
