/* ===============================
   WRAPPERS
================================ */
.ib-login-wrapper,
.ib-registro-wrapper {
    width: 100%;
    padding: 18px 0;
}

/* Solo en modo app */
body.ib-app-mode .ib-login-wrapper,
body.ib-app-mode .ib-registro-wrapper {
    min-height: 80svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 20px 20px;
}

.ib-login-wrapper > .ib-form,
.ib-login-wrapper > .ib-login-privacy,
.ib-registro-wrapper > .ib-form,
.ib-registro-wrapper > .ib-login-privacy {
    width: 100%;
    max-width: 420px;
}

.ib-login-privacy {
    max-width: 420px;
    width: 100%;
    margin: 18px auto 0;
    text-align: center;
    font-size: 0.85rem;
    color: #777;
    line-height: 1.6;
    padding: 0 10px;
}

/* ===============================
   HEADER LOGIN (solo app)
================================ */
.ib-login-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 0 10px;
    position: relative;
}

.ib-login-back {
    display: none;
}

body.ib-app-mode .ib-login-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    text-decoration: none !important;
    color: #2f3a4d !important;
    font-size: 24px;
    line-height: 1;
    border-radius: 8px;
    transition: background 0.2s ease;
}

body.ib-app-mode .ib-login-back:hover {
    background: rgba(0,0,0,0.05);
}

.ib-login-title {
    margin: 0;
    text-align: center;
    font-size: 2rem;
    line-height: 1.15;
    white-space: nowrap;
}

/* ===============================
   CARD FORM
================================ */
.ib-form {
    max-width: 420px;
    width: 100%;
    margin: 0 auto;
    background-color: #fff;
    padding: 28px 24px;
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ===============================
   TITULOS
================================ */
.ib-login-title {
    text-align: center;
    font-size: 2rem;
    margin: 0 0 10px;
}

.ib-login-subtitle {
    text-align: center;
    color: #666;
    margin: 0 0 24px;
    font-size: 0.95rem;
}

/* ===============================
   FORM GROUP
================================ */
.ib-form-group {
    margin-bottom: 1rem;
}

.ib-form-label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.6rem !important;
}

/* ===============================
   INPUTS
================================ */
.ib-form-input {
    width: 100%;
    height: 50px;
    padding: 0 14px;
    box-sizing: border-box;
    border: 1px solid #bfc5ce;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #fff;
}

.ib-form-input:focus {
    border-color: #3B5998;
    box-shadow: 0 0 0 2px rgba(59, 89, 152, 0.12);
    outline: none;
}

/* ===============================
   PASSWORD
================================ */
.ib-input-wrapper {
    position: relative;
}

.ib-password-input {
    padding-right: 96px;
}

.ib-toggle-password-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    background: none !important;
    border: none !important;
    color: #3B5998 !important;
    font-weight: 600 !important;
    font-size: 0.95rem;
    padding: 0;
    line-height: 1;
}

.ib-toggle-password-btn:hover {
    color: #4A90E2 !important;
}

/* ===============================
   PASSWORD HELP
================================ */
.ib-password-help {
    margin-top: 4px !important;
    margin-bottom: 0.25rem !important;
    color: #555 !important;
    font-size: 0.85rem !important;
}

/* ===============================
   REMEMBER
================================ */
.ib-remember-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ib-checkbox {
    margin-right: 0.3rem;
}

/* ===============================
   BOTON PRINCIPAL
================================ */
.ib-submit-btn {
    width: 100% !important;
    height: 54px;
    padding: 0 18px !important;
    background: #3B5998 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 14px !important;
    cursor: pointer !important;
    font-size: 1rem !important;
    font-weight: 600;
    transition: all 0.2s ease !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ib-submit-btn:hover {
    background: #4A90E2 !important;
    transform: translateY(-1px);
}

/* ===============================
   LINKS
================================ */
.ib-form-links {
    text-align: center;
    margin-top: 18px;
    font-size: 0.95rem;
    line-height: 1.8;
}

.ib-link {
    color: #3B5998;
    text-decoration: none;
}

.ib-link:hover {
    text-decoration: underline;
}

/* ===============================
   MENSAJES
================================ */
.ib-messages {
    margin-top: 1rem;
    text-align: center;
    font-size: 1em;
}

.ib-logged-message {
    font-weight: bold;
    text-align: center;
}

/* ===============================
   RTL
================================ */
:root[dir="rtl"] .ib-password-input {
    padding-right: 8px;
    padding-left: 96px;
}

:root[dir="rtl"] .ib-toggle-password-btn {
    right: auto;
    left: 12px;
}

:root[dir="rtl"] .ib-checkbox {
    margin-right: 0;
    margin-left: 0.5rem;
}

html[dir="rtl"] .ib-form {
    font-family: 'Noto Sans Arabic', sans-serif !important;
    font-size: 20px !important;
}

html[dir="rtl"] .ib-form input,
html[dir="rtl"] .ib-form label,
html[dir="rtl"] .ib-form button,
html[dir="rtl"] .ib-form a {
    font-family: 'Noto Sans Arabic', sans-serif !important;
}

/* ===============================
   RESPONSIVE
================================ */
@media (max-width: 480px) {
    .ib-login-wrapper,
    .ib-registro-wrapper {
        padding: 12px 0;
    }

    body.ib-app-mode .ib-login-wrapper,
    body.ib-app-mode .ib-registro-wrapper {
        padding: 22px 14px 18px;
    }

    .ib-form {
        padding: 22px 18px;
        border-radius: 14px;
    }

    .ib-login-title {
        font-size: 1.25rem;
        margin-bottom: 6px;
    }

    .ib-login-subtitle {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }

    .ib-submit-btn {
        height: 52px;
        border-radius: 12px !important;
    }

    .ib-form-links {
        font-size: 0.92rem;
    }
}

body.ib-app-mode header,
body.ib-app-mode footer,
body.ib-app-mode .elementor-location-header,
body.ib-app-mode .elementor-location-footer {
    display: none !important;
}

body.ib-app-mode .site,
body.ib-app-mode .site-content,
body.ib-app-mode main,
body.ib-app-mode .elementor-location-single,
body.ib-app-mode .elementor {
    margin: 0 !important;
    padding: 0 !important;
}

/* ===============================
   PRIVACY BLOQUE
================================ */
.ib-login-privacy {
    max-width: 420px;
    margin: 18px auto 0;
    text-align: center;
    font-size: 0.85rem;
    color: #777;
    line-height: 1.6;
    padding: 0 10px;
}

.ib-login-privacy a {
    color: #3B5998;
    text-decoration: none;
    font-weight: 500;
}

.ib-login-privacy a:hover {
    text-decoration: underline;
}

.ib-submit-btn.is-loading {
    opacity: 0.75;
    pointer-events: none;
}

