/*
 * Bahía Cloud Auth Experience v1.2.0
 * Login, registro y recuperación de contraseña.
 */

html.bc-auth-page {
    --bc-auth-navy: #123f73;
    --bc-auth-navy-deep: #0b2d57;
    --bc-auth-navy-ink: #071d39;
    --bc-auth-cyan: #1fb4c3;
    --bc-auth-cyan-light: #40cbd2;
    --bc-auth-bg: #f4f8fc;
    --bc-auth-text: #0e2440;
    --bc-auth-muted: #5c708a;
    --bc-auth-border: #d7e3ef;
    --bc-auth-danger: #d94c4c;
    --bc-auth-success: #1d9e62;
    --bc-auth-card-radius: 20px;
    --bc-auth-control-radius: 11px;
    --bc-auth-shadow: 0 28px 74px rgba(7, 29, 57, .13);
    background: var(--bc-auth-bg) !important;
}

html.bc-auth-page,
html.bc-auth-page body {
    min-height: 100% !important;
    margin: 0 !important;
    background: var(--bc-auth-bg) !important;
    color: var(--bc-auth-text) !important;
    font-family: Inter, Arial, sans-serif !important;
}

html.bc-auth-loading body {
    opacity: 0 !important;
}

html.bc-auth-ready body,
html.bc-auth-fallback body {
    opacity: 1 !important;
    transition: opacity .16s ease !important;
}

html.bc-auth-page * {
    box-sizing: border-box !important;
}

html.bc-auth-page body > header,
html.bc-auth-page body > footer,
html.bc-auth-page .bc-client-header,
html.bc-auth-page .app-nav,
html.bc-auth-page .app-nav-menu,
html.bc-auth-page .app-header,
html.bc-auth-page .main-header,
html.bc-auth-page .master-breadcrumb,
html.bc-auth-page .app-footer,
html.bc-auth-page .footer,
html.bc-auth-page #footer,
html.bc-auth-page .lagom-footer,
html.bc-auth-page .modal-backdrop:not(.show) {
    display: none !important;
}

html.bc-auth-page body {
    overflow-x: hidden !important;
}

.bc-auth-app {
    position: relative !important;
    z-index: 20 !important;
    display: grid !important;
    grid-template-columns: minmax(420px, 47%) minmax(0, 53%) !important;
    width: 100% !important;
    min-height: 100vh !important;
    background: #ffffff !important;
}

.bc-auth-story {
    position: relative !important;
    display: flex !important;
    min-width: 0 !important;
    min-height: 100vh !important;
    overflow: hidden !important;
    color: #ffffff !important;
    background:
        radial-gradient(circle at 92% 8%, rgba(64, 203, 210, .42), transparent 25%),
        radial-gradient(circle at 14% 88%, rgba(31, 180, 195, .30), transparent 30%),
        linear-gradient(145deg, #071d39 0%, #0b2d57 42%, #123f73 72%, #126f8c 100%) !important;
}

.bc-auth-story::before {
    position: absolute !important;
    inset: 0 !important;
    content: "" !important;
    pointer-events: none !important;
    background-image:
        linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px) !important;
    background-size: 44px 44px !important;
    mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 84%, transparent) !important;
}

.bc-auth-story__orb {
    position: absolute !important;
    display: block !important;
    width: 260px !important;
    height: 260px !important;
    border: 32px solid rgba(64, 203, 210, .19) !important;
    border-radius: 50% !important;
    pointer-events: none !important;
}

.bc-auth-story__orb--one {
    top: -126px !important;
    right: -82px !important;
}

.bc-auth-story__orb--two {
    bottom: -142px !important;
    left: -112px !important;
    width: 340px !important;
    height: 340px !important;
    border-width: 42px !important;
}

.bc-auth-story__inner {
    position: relative !important;
    z-index: 2 !important;
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 760px !important;
    min-height: 100vh !important;
    margin: 0 auto !important;
    padding: clamp(28px, 4.4vw, 64px) clamp(28px, 5vw, 76px) !important;
}

.bc-auth-story__brand,
.bc-auth-workspace__brand {
    display: inline-flex !important;
    align-items: center !important;
    width: max-content !important;
    text-decoration: none !important;
}

.bc-auth-story__brand img {
    display: block !important;
    width: 212px !important;
    height: auto !important;
    filter: brightness(0) invert(1) !important;
}

.bc-auth-story__visual {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    margin: clamp(30px, 6vh, 72px) 0 clamp(24px, 4vh, 46px) !important;
}

.bc-auth-story__visual img {
    display: block !important;
    width: min(100%, 590px) !important;
    height: auto !important;
}

.bc-auth-story__content {
    width: 100% !important;
    max-width: 640px !important;
    margin-top: auto !important;
}

.bc-auth-story__eyebrow {
    display: inline-flex !important;
    align-items: center !important;
    min-height: 30px !important;
    padding: 6px 11px !important;
    border: 1px solid rgba(255,255,255,.18) !important;
    border-radius: 999px !important;
    color: #c7f8fa !important;
    background: rgba(255,255,255,.08) !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    letter-spacing: .08em !important;
    line-height: 1 !important;
    text-transform: uppercase !important;
}

.bc-auth-story__content h1 {
    max-width: 620px !important;
    margin: 18px 0 13px !important;
    color: #ffffff !important;
    font-size: clamp(32px, 3.5vw, 52px) !important;
    font-weight: 800 !important;
    letter-spacing: -.035em !important;
    line-height: 1.08 !important;
}

.bc-auth-story__content > p {
    max-width: 590px !important;
    margin: 0 !important;
    color: rgba(255,255,255,.76) !important;
    font-size: 16px !important;
    line-height: 1.65 !important;
}

.bc-auth-features {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 14px !important;
    width: 100% !important;
    margin: 28px 0 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.bc-auth-feature {
    display: flex !important;
    align-items: flex-start !important;
    gap: 11px !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 14px !important;
    border: 1px solid rgba(255,255,255,.12) !important;
    border-radius: 15px !important;
    background: rgba(255,255,255,.07) !important;
    backdrop-filter: blur(8px) !important;
}

.bc-auth-feature__icon {
    display: inline-flex !important;
    flex: 0 0 36px !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 10px !important;
    color: #0e5278 !important;
    background: #dff9fa !important;
}

.bc-auth-feature__icon svg {
    width: 19px !important;
    height: 19px !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.9 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}

.bc-auth-feature__copy {
    display: block !important;
    min-width: 0 !important;
}

.bc-auth-feature__copy strong,
.bc-auth-feature__copy small {
    display: block !important;
}

.bc-auth-feature__copy strong {
    margin-bottom: 4px !important;
    color: #ffffff !important;
    font-size: 13px !important;
    font-weight: 750 !important;
    line-height: 1.3 !important;
}

.bc-auth-feature__copy small {
    color: rgba(255,255,255,.63) !important;
    font-size: 11px !important;
    line-height: 1.45 !important;
}

.bc-auth-workspace {
    position: relative !important;
    display: flex !important;
    min-width: 0 !important;
    min-height: 100vh !important;
    overflow: auto !important;
    color: var(--bc-auth-text) !important;
    background: #ffffff !important;
}

.bc-auth-workspace::before {
    position: fixed !important;
    top: -180px !important;
    right: -180px !important;
    width: 420px !important;
    height: 420px !important;
    border-radius: 50% !important;
    content: "" !important;
    pointer-events: none !important;
    background: radial-gradient(circle, rgba(31,180,195,.09), transparent 66%) !important;
}

.bc-auth-workspace__inner {
    position: relative !important;
    z-index: 1 !important;
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 1040px !important;
    min-height: 100vh !important;
    margin: 0 auto !important;
    padding: 32px clamp(24px, 5vw, 76px) 24px !important;
}

.bc-auth-workspace__brand {
    margin: 0 0 26px !important;
}

.bc-auth-workspace__brand img {
    display: block !important;
    width: 210px !important;
    height: auto !important;
}

.bc-auth-card {
    width: min(100%, 530px) !important;
    margin: 0 !important;
    padding: clamp(28px, 3.4vw, 44px) !important;
    border: 1px solid var(--bc-auth-border) !important;
    border-radius: var(--bc-auth-card-radius) !important;
    background: #ffffff !important;
    box-shadow: var(--bc-auth-shadow) !important;
}

html.bc-auth-page--register .bc-auth-workspace__inner {
    justify-content: flex-start !important;
    padding-top: 26px !important;
}

html.bc-auth-page--register .bc-auth-workspace__brand {
    margin-bottom: 18px !important;
}

html.bc-auth-page--register .bc-auth-card {
    width: min(100%, 760px) !important;
    padding: 34px clamp(28px, 3vw, 44px) 40px !important;
}

.bc-auth-card__header {
    margin: 0 0 25px !important;
    text-align: center !important;
}

.bc-auth-card__icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 54px !important;
    height: 54px !important;
    margin: 0 auto 15px !important;
    border-radius: 15px !important;
    color: var(--bc-auth-cyan) !important;
    background: #e9f8fa !important;
}

.bc-auth-card__icon svg {
    width: 25px !important;
    height: 25px !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.9 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}

.bc-auth-card__header h2 {
    margin: 0 !important;
    color: var(--bc-auth-navy-deep) !important;
    font-size: clamp(27px, 2.4vw, 36px) !important;
    font-weight: 800 !important;
    letter-spacing: -.03em !important;
    line-height: 1.15 !important;
}

.bc-auth-card__header p {
    max-width: 430px !important;
    margin: 10px auto 0 !important;
    color: var(--bc-auth-muted) !important;
    font-size: 15px !important;
    line-height: 1.55 !important;
}

.bc-auth-native-slot,
.bc-auth-native-slot > *,
.bc-auth-native-slot #main-body,
.bc-auth-native-slot .main-body,
.bc-auth-native-slot .container,
.bc-auth-native-slot .container-fluid,
.bc-auth-native-slot .row,
.bc-auth-native-slot [class*="col-"] {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    transform: none !important;
}

.bc-auth-native-slot #main-body,
.bc-auth-native-slot .main-body,
.bc-auth-native-slot main {
    min-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    background: transparent !important;
}

.bc-auth-native-slot .panel,
.bc-auth-native-slot .card,
.bc-auth-native-slot .card-body,
.bc-auth-native-slot .panel-body,
.bc-auth-native-slot .login-form,
.bc-auth-native-slot .section,
.bc-auth-native-slot .form-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.bc-auth-native-slot h1,
.bc-auth-native-slot h2,
.bc-auth-native-slot h3.page-title,
.bc-auth-native-slot .login-title,
.bc-auth-native-slot .section-title:first-child,
.bc-auth-native-slot .page-header:first-child,
.bc-auth-native-slot .header-lined,
.bc-auth-native-slot .card-title:first-child {
    display: none !important;
}

.bc-auth-native-slot form {
    width: 100% !important;
    margin: 0 !important;
}

.bc-auth-native-slot .form-group,
.bc-auth-native-slot .form-field,
.bc-auth-native-slot .form-group-row,
.bc-auth-native-slot .input-group,
.bc-auth-native-slot .field-container {
    min-width: 0 !important;
}

.bc-auth-native-slot label,
.bc-auth-native-slot .control-label,
.bc-auth-native-slot .form-label {
    display: block !important;
    margin: 0 0 7px !important;
    color: var(--bc-auth-text) !important;
    font-family: Inter, Arial, sans-serif !important;
    font-size: 14px !important;
    font-weight: 650 !important;
    line-height: 1.4 !important;
}

.bc-auth-native-slot input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.bc-auth-native-slot select,
.bc-auth-native-slot textarea,
.bc-auth-native-slot .form-control,
.bc-auth-native-slot .input-group .form-control {
    width: 100% !important;
    min-height: 50px !important;
    padding: 12px 14px !important;
    border: 1px solid #c8d6e5 !important;
    border-radius: var(--bc-auth-control-radius) !important;
    outline: 0 !important;
    color: var(--bc-auth-text) !important;
    background: #ffffff !important;
    box-shadow: none !important;
    font-family: Inter, Arial, sans-serif !important;
    font-size: 16px !important;
    line-height: 1.35 !important;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease !important;
}

.bc-auth-native-slot input::placeholder,
.bc-auth-native-slot textarea::placeholder {
    color: #8ba0b6 !important;
    opacity: 1 !important;
}

.bc-auth-native-slot input:focus,
.bc-auth-native-slot select:focus,
.bc-auth-native-slot textarea:focus,
.bc-auth-native-slot .form-control:focus {
    border-color: var(--bc-auth-cyan) !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 4px rgba(31,180,195,.14) !important;
}

.bc-auth-native-slot input[disabled],
.bc-auth-native-slot input[readonly],
.bc-auth-native-slot select[disabled],
.bc-auth-native-slot textarea[disabled] {
    color: #687d93 !important;
    background: #edf2f7 !important;
    cursor: not-allowed !important;
}

.bc-auth-native-slot .input-group-addon,
.bc-auth-native-slot .input-group-text {
    min-height: 50px !important;
    border-color: #c8d6e5 !important;
    color: var(--bc-auth-muted) !important;
    background: #eef6f8 !important;
}

.bc-auth-native-slot input[type="checkbox"],
.bc-auth-native-slot input[type="radio"] {
    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
    accent-color: var(--bc-auth-cyan) !important;
}

.bc-auth-native-slot .checkbox,
.bc-auth-native-slot .checkbox-inline,
.bc-auth-native-slot .custom-control,
.bc-auth-native-slot .form-check,
.bc-auth-native-slot .remember-me {
    display: flex !important;
    align-items: center !important;
    gap: 9px !important;
    min-height: 24px !important;
    margin: 12px 0 !important;
}

.bc-auth-native-slot .checkbox label,
.bc-auth-native-slot .custom-control label,
.bc-auth-native-slot .form-check label {
    margin: 0 !important;
    color: var(--bc-auth-muted) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
}

.bc-auth-native-slot a {
    color: var(--bc-auth-navy) !important;
    font-family: Inter, Arial, sans-serif !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}

.bc-auth-native-slot a:hover,
.bc-auth-native-slot a:focus {
    color: var(--bc-auth-cyan) !important;
    text-decoration: underline !important;
}

.bc-auth-native-slot button[type="submit"],
.bc-auth-native-slot input[type="submit"],
.bc-auth-native-slot .btn-primary,
.bc-auth-native-slot .btn.btn-primary,
.bc-auth-native-slot .form-actions .btn,
.bc-auth-native-slot .login-form .btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 52px !important;
    margin-top: 10px !important;
    padding: 12px 18px !important;
    border: 1px solid var(--bc-auth-navy) !important;
    border-radius: var(--bc-auth-control-radius) !important;
    color: #ffffff !important;
    background: linear-gradient(135deg, #123f73, #0b2d57) !important;
    box-shadow: 0 12px 24px rgba(11,45,87,.16) !important;
    font-family: Inter, Arial, sans-serif !important;
    font-size: 15px !important;
    font-weight: 750 !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease !important;
}

@media (hover: hover) and (pointer: fine) {
    .bc-auth-native-slot button[type="submit"]:hover,
    .bc-auth-native-slot input[type="submit"]:hover,
    .bc-auth-native-slot .btn-primary:hover,
    .bc-auth-native-slot .form-actions .btn:hover,
    .bc-auth-native-slot .login-form .btn:hover {
        color: #ffffff !important;
        background: linear-gradient(135deg, #0b2d57, #061e3d) !important;
        box-shadow: 0 16px 30px rgba(11,45,87,.24) !important;
        transform: translateY(-1px) !important;
        text-decoration: none !important;
    }
}

.bc-auth-native-slot .btn-default,
.bc-auth-native-slot .btn-secondary,
.bc-auth-native-slot button:not([type="submit"]):not(.btn-primary) {
    min-height: 42px !important;
    border: 1px solid #c8d6e5 !important;
    border-radius: 9px !important;
    color: var(--bc-auth-navy) !important;
    background: #ffffff !important;
    font-family: Inter, Arial, sans-serif !important;
    font-size: 14px !important;
    font-weight: 650 !important;
}

.bc-auth-native-slot .alert,
.bc-auth-native-slot .errorbox,
.bc-auth-native-slot .alert-danger,
.bc-auth-native-slot .alert-warning,
.bc-auth-native-slot .alert-success,
.bc-auth-native-slot .alert-info {
    margin: 0 0 18px !important;
    padding: 13px 15px !important;
    border-width: 1px !important;
    border-style: solid !important;
    border-radius: 11px !important;
    font-family: Inter, Arial, sans-serif !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
}

.bc-auth-native-slot .alert-danger,
.bc-auth-native-slot .errorbox {
    border-color: #f2b7b7 !important;
    color: #8b2525 !important;
    background: #fff1f1 !important;
}

.bc-auth-native-slot .alert-success {
    border-color: #b9e5d0 !important;
    color: #176c46 !important;
    background: #edfaf4 !important;
}

.bc-auth-native-slot .alert-info,
.bc-auth-native-slot .alert-warning {
    border-color: #f1d9a6 !important;
    color: #76520c !important;
    background: #fff8e8 !important;
}

.bc-auth-native-slot .password-strength-meter,
.bc-auth-native-slot .progress {
    height: 7px !important;
    margin: 8px 0 !important;
    border-radius: 999px !important;
    overflow: hidden !important;
    background: #e6edf5 !important;
}

.bc-auth-native-slot .password-strength-meter .progress-bar,
.bc-auth-native-slot .progress-bar {
    border-radius: inherit !important;
}

.bc-auth-native-slot .password-strength-text,
.bc-auth-native-slot .help-block,
.bc-auth-native-slot .form-text,
.bc-auth-native-slot small,
.bc-auth-native-slot .text-muted {
    color: var(--bc-auth-muted) !important;
    font-family: Inter, Arial, sans-serif !important;
    font-size: 12px !important;
    line-height: 1.45 !important;
}

.bc-auth-native-slot .social-signin-btns,
.bc-auth-native-slot .social-login,
.bc-auth-native-slot [data-provider="google"],
.bc-auth-native-slot [data-provider="microsoft"] {
    /* Se preservan si WHMCS los activa posteriormente. */
    width: 100% !important;
}

.bc-auth-native-slot .captchaimage,
.bc-auth-native-slot .recaptcha-container,
.bc-auth-native-slot .g-recaptcha,
.bc-auth-native-slot iframe[src*="recaptcha"] {
    max-width: 100% !important;
}

.bc-auth-card__account-link {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 5px !important;
    margin-top: 22px !important;
    padding-top: 19px !important;
    border-top: 1px solid #e5edf5 !important;
    color: var(--bc-auth-muted) !important;
    font-size: 14px !important;
    line-height: 1.45 !important;
    text-align: center !important;
}

.bc-auth-card__account-link a {
    color: var(--bc-auth-cyan) !important;
    font-weight: 750 !important;
    text-decoration: none !important;
}

.bc-auth-card__account-link a:hover,
.bc-auth-card__account-link a:focus {
    color: var(--bc-auth-navy) !important;
    text-decoration: underline !important;
}

.bc-auth-footer {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 18px !important;
    width: min(100%, 530px) !important;
    margin-top: 21px !important;
    color: #72869b !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
}

html.bc-auth-page--register .bc-auth-footer {
    width: min(100%, 760px) !important;
}

.bc-auth-native-slot .bc-auth-password-wrap {
    position: relative !important;
    width: 100% !important;
}

.bc-auth-native-slot .bc-auth-password-wrap > input {
    padding-right: 50px !important;
}

.bc-auth-password-toggle {
    position: absolute !important;
    top: 50% !important;
    right: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 9px !important;
    color: var(--bc-auth-muted) !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: translateY(-50%) !important;
    cursor: pointer !important;
}

.bc-auth-password-toggle:hover,
.bc-auth-password-toggle:focus {
    color: var(--bc-auth-navy) !important;
    background: #edf7f9 !important;
}

.bc-auth-password-toggle svg {
    width: 19px !important;
    height: 19px !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.8 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}

.bc-auth-native-slot .bc-auth-hidden-native-link,
.bc-auth-native-slot .bc-auth-hidden-native-title {
    display: none !important;
}

.bc-auth-native-slot :focus-visible,
.bc-auth-card__account-link a:focus-visible,
.bc-auth-story__brand:focus-visible,
.bc-auth-workspace__brand:focus-visible {
    outline: 3px solid rgba(31,180,195,.34) !important;
    outline-offset: 3px !important;
}

html.bc-auth-fallback .bc-auth-app {
    display: none !important;
}

html.bc-auth-fallback body > header,
html.bc-auth-fallback body > footer,
html.bc-auth-fallback .bc-client-header,
html.bc-auth-fallback .app-nav,
html.bc-auth-fallback .app-footer,
html.bc-auth-fallback .footer,
html.bc-auth-fallback #footer {
    display: block !important;
}

/* Registration groups keep the native WHMCS flow but improve hierarchy. */
html.bc-auth-page--register .bc-auth-native-slot .sub-heading,
html.bc-auth-page--register .bc-auth-native-slot .section-heading,
html.bc-auth-page--register .bc-auth-native-slot legend,
html.bc-auth-page--register .bc-auth-native-slot h3:not(.page-title) {
    display: block !important;
    margin: 26px 0 15px !important;
    padding: 0 0 10px !important;
    border: 0 !important;
    border-bottom: 1px solid #e4ecf4 !important;
    color: var(--bc-auth-navy-deep) !important;
    font-size: 18px !important;
    font-weight: 750 !important;
    line-height: 1.3 !important;
}

html.bc-auth-page--register .bc-auth-native-slot .sub-heading:first-child,
html.bc-auth-page--register .bc-auth-native-slot .section-heading:first-child,
html.bc-auth-page--register .bc-auth-native-slot legend:first-child {
    margin-top: 0 !important;
}

@media (max-width: 1260px) {
    .bc-auth-app {
        grid-template-columns: minmax(380px, 43%) minmax(0, 57%) !important;
    }

    .bc-auth-story__inner {
        padding-left: 38px !important;
        padding-right: 38px !important;
    }

    .bc-auth-features {
        grid-template-columns: 1fr !important;
    }

    .bc-auth-feature {
        padding: 11px 13px !important;
    }

    .bc-auth-story__visual {
        margin-top: 36px !important;
        margin-bottom: 28px !important;
    }
}

@media (max-width: 960px) {
    .bc-auth-app {
        display: block !important;
        min-height: 100vh !important;
    }

    .bc-auth-story {
        min-height: auto !important;
    }

    .bc-auth-story__inner {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto !important;
        align-items: center !important;
        min-height: auto !important;
        padding: 24px 28px !important;
    }

    .bc-auth-story__brand {
        grid-column: 1 !important;
        grid-row: 1 !important;
    }

    .bc-auth-story__brand img {
        width: 180px !important;
    }

    .bc-auth-story__visual,
    .bc-auth-story__content,
    .bc-auth-story__orb--two {
        display: none !important;
    }

    .bc-auth-story__orb--one {
        top: -150px !important;
        right: -70px !important;
    }

    .bc-auth-workspace,
    .bc-auth-workspace__inner {
        min-height: calc(100vh - 88px) !important;
    }

    .bc-auth-workspace__inner {
        justify-content: flex-start !important;
        padding: 34px 22px 24px !important;
    }

    .bc-auth-workspace__brand {
        display: none !important;
    }

    .bc-auth-card {
        width: min(100%, 620px) !important;
    }

    html.bc-auth-page--register .bc-auth-card {
        width: min(100%, 760px) !important;
    }
}

@media (max-width: 640px) {
    html.bc-auth-page {
        background: #ffffff !important;
    }

    .bc-auth-story__inner {
        padding: 18px 20px !important;
    }

    .bc-auth-story__brand img {
        width: 164px !important;
    }

    .bc-auth-workspace,
    .bc-auth-workspace__inner {
        min-height: calc(100vh - 72px) !important;
        background: #ffffff !important;
    }

    .bc-auth-workspace__inner {
        padding: 24px 14px 20px !important;
    }

    .bc-auth-card,
    html.bc-auth-page--register .bc-auth-card {
        width: 100% !important;
        padding: 25px 18px 28px !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    .bc-auth-card__header {
        margin-bottom: 22px !important;
    }

    .bc-auth-card__icon {
        width: 48px !important;
        height: 48px !important;
    }

    .bc-auth-card__header h2 {
        font-size: 28px !important;
    }

    .bc-auth-native-slot label,
    .bc-auth-native-slot .control-label,
    .bc-auth-native-slot .form-label,
    .bc-auth-native-slot a,
    .bc-auth-card__account-link {
        font-size: 15px !important;
    }

    .bc-auth-native-slot input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
    .bc-auth-native-slot select,
    .bc-auth-native-slot textarea,
    .bc-auth-native-slot .form-control {
        min-height: 52px !important;
        font-size: 16px !important;
    }

    .bc-auth-native-slot button[type="submit"],
    .bc-auth-native-slot input[type="submit"],
    .bc-auth-native-slot .btn-primary,
    .bc-auth-native-slot .form-actions .btn {
        min-height: 54px !important;
        font-size: 16px !important;
    }

    .bc-auth-footer,
    html.bc-auth-page--register .bc-auth-footer {
        width: 100% !important;
        padding: 0 18px !important;
    }
}

@media (max-width: 390px) {
    .bc-auth-story__inner {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .bc-auth-workspace__inner {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    .bc-auth-card,
    html.bc-auth-page--register .bc-auth-card {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    .bc-auth-footer {
        flex-direction: column !important;
        gap: 5px !important;
        text-align: center !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    html.bc-auth-page *,
    html.bc-auth-page *::before,
    html.bc-auth-page *::after {
        scroll-behavior: auto !important;
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
}

@media (min-width: 961px) {
    .bc-auth-story {
        position: sticky !important;
        top: 0 !important;
        height: 100vh !important;
    }
}

@media (min-width: 1261px) {
    html.bc-auth-page--register .bc-auth-app {
        grid-template-columns: minmax(420px, 40%) minmax(0, 60%) !important;
    }

    html.bc-auth-page--register .bc-auth-workspace__inner {
        padding-left: 32px !important;
        padding-right: 32px !important;
    }
}

.bc-auth-native-slot .bc-auth-hidden-native-description {
    display: none !important;
}

@media (max-width: 640px) {
    html.bc-auth-page--register .bc-auth-native-slot .row {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
    }

    html.bc-auth-page--register .bc-auth-native-slot [class*="col-"] {
        display: block !important;
        flex: 0 0 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    html.bc-auth-page--register .bc-auth-card__header {
        margin-bottom: 28px !important;
    }
}

/* =========================================================
   BAHÍA CLOUD AUTH EXPERIENCE v1.2.0
   Footer, registro, teléfono y mobile
   ========================================================= */

html.bc-auth-page body,
html.bc-auth-page body.bc-client-header-ready,
html.bc-auth-page body[class*="header-ready"] {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

html.bc-auth-ready body > footer,
html.bc-auth-ready body > .footer,
html.bc-auth-ready body > #footer,
html.bc-auth-ready body > .app-footer,
html.bc-auth-ready body > .lagom-footer,
html.bc-auth-ready .bc-auth-native-chrome-hidden {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

.bc-auth-app,
.bc-auth-story,
.bc-auth-story__inner,
.bc-auth-workspace,
.bc-auth-workspace__inner {
    min-height: 100dvh !important;
}

.bc-auth-story__inner {
    padding-bottom: clamp(32px, 4.4vw, 64px) !important;
}

.bc-auth-story__content {
    padding-bottom: 2px !important;
}

.bc-auth-features {
    margin-bottom: 0 !important;
}

.bc-auth-native-slot label {
    position: relative !important;
    display: inline-flex !important;
    align-items: baseline !important;
    justify-content: flex-start !important;
    gap: 4px !important;
    width: auto !important;
    max-width: 100% !important;
}

.bc-auth-required {
    position: static !important;
    display: inline !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
    color: var(--bc-auth-danger) !important;
    font-size: 1em !important;
    font-weight: 800 !important;
    line-height: inherit !important;
}

.bc-auth-native-slot .bc-auth-required-source {
    display: none !important;
}

.bc-auth-native-slot .iti,
.bc-auth-native-slot .intl-tel-input,
.bc-auth-native-slot [class*="phone-input"] {
    position: relative !important;
    display: block !important;
    width: 100% !important;
}

.bc-auth-native-slot .iti__flag-container,
.bc-auth-native-slot .intl-tel-input .flag-container {
    width: 88px !important;
    max-width: 88px !important;
}

.bc-auth-native-slot .iti__selected-flag,
.bc-auth-native-slot .intl-tel-input .selected-flag {
    width: 86px !important;
    padding: 0 10px !important;
}

.bc-auth-native-slot .iti input[type="tel"],
.bc-auth-native-slot .intl-tel-input input[type="tel"],
.bc-auth-native-slot input[name="phonenumber"] {
    width: 100% !important;
    padding-left: 98px !important;
    text-indent: 0 !important;
}

.bc-auth-native-slot .iti input[type="tel"]::placeholder,
.bc-auth-native-slot .intl-tel-input input[type="tel"]::placeholder,
.bc-auth-native-slot input[name="phonenumber"]::placeholder {
    opacity: 1 !important;
    color: #8194aa !important;
}

.bc-auth-native-slot .iti__country-list,
.bc-auth-native-slot .intl-tel-input .country-list {
    z-index: 10030 !important;
    max-width: min(360px, calc(100vw - 32px)) !important;
}

@media (min-width: 961px) and (max-height: 900px) {
    .bc-auth-story__inner {
        padding-top: 28px !important;
        padding-bottom: 28px !important;
    }

    .bc-auth-story__visual {
        margin-top: 28px !important;
        margin-bottom: 20px !important;
    }

    .bc-auth-story__visual img {
        width: min(82%, 500px) !important;
        max-height: 285px !important;
    }

    .bc-auth-story__content h1 {
        font-size: clamp(31px, 3.1vw, 46px) !important;
    }

    .bc-auth-features {
        margin-top: 20px !important;
    }
}

@media (max-width: 960px) {
    html.bc-auth-page body,
    html.bc-auth-page body.bc-client-header-ready {
        padding-top: 0 !important;
    }

    .bc-auth-app,
    .bc-auth-story {
        margin-top: 0 !important;
    }

    .bc-auth-story {
        position: relative !important;
        top: 0 !important;
    }

    .bc-auth-story__inner {
        min-height: 76px !important;
    }

    .bc-auth-workspace,
    .bc-auth-workspace__inner {
        min-height: calc(100dvh - 76px) !important;
    }
}

@media (max-width: 640px) {
    .bc-auth-story__inner {
        min-height: 68px !important;
        padding-top: 14px !important;
        padding-bottom: 14px !important;
    }

    .bc-auth-workspace,
    .bc-auth-workspace__inner {
        min-height: calc(100dvh - 68px) !important;
    }

    .bc-auth-native-slot input[name="phonenumber"],
    .bc-auth-native-slot .iti input[type="tel"],
    .bc-auth-native-slot .intl-tel-input input[type="tel"] {
        padding-left: 96px !important;
    }
}


/* Especificidad superior al padding general de los controles. */
.bc-auth-native-slot input.form-control[name="phonenumber"]:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.bc-auth-native-slot .iti input.form-control[type="tel"]:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.bc-auth-native-slot .intl-tel-input input.form-control[type="tel"]:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) {
    padding-left: 98px !important;
}

@media (max-width: 640px) {
    .bc-auth-native-slot input.form-control[name="phonenumber"]:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
    .bc-auth-native-slot .iti input.form-control[type="tel"]:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
    .bc-auth-native-slot .intl-tel-input input.form-control[type="tel"]:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) {
        padding-left: 96px !important;
    }
}

@media (max-width: 960px) {
    .bc-auth-story {
        min-height: 76px !important;
        height: auto !important;
    }
}

@media (max-width: 640px) {
    .bc-auth-story {
        min-height: 68px !important;
        height: auto !important;
    }
}


/* El espacio ampliado solo se aplica cuando existe selector internacional. */
.bc-auth-native-slot input.form-control[name="phonenumber"]:not(.bc-auth-phone-field--international):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) {
    padding-left: 14px !important;
}

.bc-auth-native-slot input.form-control.bc-auth-phone-field--international[name="phonenumber"]:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.bc-auth-native-slot .iti input.form-control.bc-auth-phone-field--international[type="tel"],
.bc-auth-native-slot .intl-tel-input input.form-control.bc-auth-phone-field--international[type="tel"] {
    padding-left: 98px !important;
}

@media (max-width: 640px) {
    .bc-auth-native-slot input.form-control.bc-auth-phone-field--international[name="phonenumber"]:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
    .bc-auth-native-slot .iti input.form-control.bc-auth-phone-field--international[type="tel"],
    .bc-auth-native-slot .intl-tel-input input.form-control.bc-auth-phone-field--international[type="tel"] {
        padding-left: 96px !important;
    }
}


/* =========================================================
   BAHÍA CLOUD AUTH EXPERIENCE v1.2.0
   Direct Lagom structure: no footer overlap or mobile top gap
   ========================================================= */

html.bc-auth-page,
html.bc-auth-page body,
html.bc-auth-page body.lagom {
    width: 100% !important;
    min-height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
}

html.bc-auth-page body > header,
html.bc-auth-page body.lagom > header,
html.bc-auth-page .app-nav,
html.bc-auth-page .app-nav-menu,
html.bc-auth-page .app-main > .main-header,
html.bc-auth-page .app-main > .main-footer,
html.bc-auth-page .main-footer,
html.bc-auth-page footer.main-footer,
html.bc-auth-ready .app-main > .main-footer,
html.bc-auth-ready .main-footer {
    display: none !important;
    visibility: hidden !important;
    position: static !important;
    width: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

html.bc-auth-page .app-main,
html.bc-auth-page body > main.app-main {
    display: block !important;
    width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
}

html.bc-auth-page .bc-auth-app {
    inset: auto !important;
    width: 100% !important;
    min-height: 100dvh !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
}

html.bc-auth-page .bc-auth-story,
html.bc-auth-page .bc-auth-workspace {
    margin: 0 !important;
    transform: none !important;
}

/* Required marker stays immediately beside the label text. */
html.bc-auth-page .bc-auth-native-slot label {
    position: relative !important;
    display: inline-flex !important;
    align-items: baseline !important;
    justify-content: flex-start !important;
    gap: 4px !important;
    width: auto !important;
    padding-right: 0 !important;
}

html.bc-auth-page .bc-auth-native-slot label .bc-auth-required {
    position: static !important;
    inset: auto !important;
    display: inline !important;
    margin: 0 !important;
    color: var(--bc-auth-danger) !important;
}

/* International phone: reserve the real flag/dial-code width. */
html.bc-auth-page .bc-auth-native-slot .iti,
html.bc-auth-page .bc-auth-native-slot .intl-tel-input {
    position: relative !important;
    display: block !important;
    width: 100% !important;
}

html.bc-auth-page .bc-auth-native-slot .iti__flag-container,
html.bc-auth-page .bc-auth-native-slot
.intl-tel-input .flag-container {
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 104px !important;
    max-width: 104px !important;
}

html.bc-auth-page .bc-auth-native-slot .iti__selected-flag,
html.bc-auth-page .bc-auth-native-slot
.intl-tel-input .selected-flag {
    width: 102px !important;
    padding: 0 10px !important;
}

html.bc-auth-page .bc-auth-native-slot
.iti input.form-control[type="tel"],
html.bc-auth-page .bc-auth-native-slot
.intl-tel-input input.form-control[type="tel"],
html.bc-auth-page .bc-auth-native-slot
input.form-control.bc-auth-phone-field--international[name="phonenumber"] {
    width: 100% !important;
    padding-right: 14px !important;
    padding-left: 116px !important;
    text-indent: 0 !important;
}

html.bc-auth-page .bc-auth-native-slot
.iti input.form-control[type="tel"]::placeholder,
html.bc-auth-page .bc-auth-native-slot
.intl-tel-input input.form-control[type="tel"]::placeholder {
    color: #8194aa !important;
    opacity: 1 !important;
}

@media (max-width: 960px) {
    html.bc-auth-page,
    html.bc-auth-page body,
    html.bc-auth-page body.lagom {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    html.bc-auth-page .bc-auth-app,
    html.bc-auth-page .bc-auth-story {
        top: 0 !important;
        margin-top: 0 !important;
    }

    html.bc-auth-page .bc-auth-story__inner {
        min-height: 68px !important;
        margin: 0 !important;
    }
}

@media (max-width: 640px) {
    html.bc-auth-page .bc-auth-story {
        min-height: 68px !important;
        margin: 0 !important;
    }

    html.bc-auth-page .bc-auth-story__inner {
        min-height: 68px !important;
        padding: 14px 20px !important;
    }

    html.bc-auth-page .bc-auth-workspace,
    html.bc-auth-page .bc-auth-workspace__inner {
        min-height: calc(100dvh - 68px) !important;
        margin: 0 !important;
    }

    html.bc-auth-page .bc-auth-native-slot
    .iti input.form-control[type="tel"],
    html.bc-auth-page .bc-auth-native-slot
    .intl-tel-input input.form-control[type="tel"],
    html.bc-auth-page .bc-auth-native-slot
    input.form-control.bc-auth-phone-field--international[name="phonenumber"] {
        padding-left: 112px !important;
    }
}

/* Final phone specificity gate. */
html.bc-auth-page .bc-auth-native-slot
.iti input.form-control.bc-auth-phone-field--international[type="tel"]:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
html.bc-auth-page .bc-auth-native-slot
.intl-tel-input input.form-control.bc-auth-phone-field--international[type="tel"]:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
html.bc-auth-page .bc-auth-native-slot
input.form-control.bc-auth-phone-field--international[name="phonenumber"]:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) {
    padding-left: 116px !important;
}

@media (max-width: 640px) {
    html.bc-auth-page .bc-auth-native-slot
    .iti input.form-control.bc-auth-phone-field--international[type="tel"]:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
    html.bc-auth-page .bc-auth-native-slot
    .intl-tel-input input.form-control.bc-auth-phone-field--international[type="tel"]:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
    html.bc-auth-page .bc-auth-native-slot
    input.form-control.bc-auth-phone-field--international[name="phonenumber"]:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) {
        padding-left: 116px !important;
    }
}
