/* -------------------------------------------------------------------------- */
/* Acceso al panel — horizonte + campo de partículas (campaña por dominio)     */
/* -------------------------------------------------------------------------- */

.bc-auth-body,
.bc-auth-body.fi-body,
html.fi:has(.bc-auth-body) {
    margin: 0;
    min-height: 100dvh;
    background: var(--bc-ink);
    color: #f4f1eb;
    font-family: var(--font-family);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

.bc-auth-body ::selection {
    background: rgba(var(--bc-primary-rgb), 0.42);
    color: #fff;
}

.bc-auth-body,
.bc-auth-body .fi-simple-layout,
.bc-auth-body .fi-simple-main-ctn,
.bc-auth-body .fi-layout,
.bc-auth-body .fi-main {
    background: transparent !important;
    min-height: 0 !important;
}

.bc-auth {
    position: relative;
    isolation: isolate;
    display: block;
    min-height: 100dvh;
    overflow: visible;
}

/* Atmósfera --------------------------------------------------------------- */

.bc-auth__atmosphere {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 80% 50% at 72% 88%, rgba(var(--bc-primary-rgb), 0.22), transparent 68%),
        radial-gradient(ellipse 50% 40% at 18% 12%, rgba(var(--bc-primary-rgb), 0.12), transparent 60%),
        var(--bc-ink);
}

.bc-auth__atmosphere canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

#bc-horizon {
    opacity: 0;
    transition: opacity 900ms ease;
}

#bc-horizon.is-ready {
    opacity: 1;
}

.bc-auth--live .bc-auth__atmosphere {
    background: var(--bc-ink);
}

/* Escena ------------------------------------------------------------------ */

.bc-auth__frame {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(22rem, 0.85fr);
    align-items: center;
    gap: clamp(2rem, 5vw, 5.5rem);
    min-height: 100dvh;
    padding: clamp(1.75rem, 4.5vw, 4.5rem);
    padding-inline: clamp(1.5rem, 6vw, 7rem);
}

.bc-auth__brand {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: clamp(1.75rem, 3vw, 2.75rem);
    max-width: 38rem;
    animation: bc-rise 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.bc-auth__brand-top {
    display: flex;
    align-items: center;
}

.bc-auth__logo,
.bc-auth__logo-fallback {
    width: 5.25rem;
    height: 5.25rem;
    border-radius: 1.25rem;
    object-fit: contain;
    background: #fff;
    box-shadow:
        0 18px 48px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.28);
}

.bc-auth__logo-fallback {
    display: grid;
    place-items: center;
    font-family: var(--bc-display);
    font-size: 2rem;
    font-weight: 800;
    color: var(--bc-ink);
}

.bc-auth__title {
    margin: 0;
    max-width: 16ch;
    font-family: var(--bc-display);
    font-size: clamp(2.35rem, 4.4vw, 3.85rem);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -0.036em;
    color: #fffaf3;
    text-wrap: balance;
    text-shadow:
        0 2px 40px rgba(7, 17, 31, 0.9),
        0 0 28px rgba(7, 17, 31, 0.55);
}

.bc-auth__tagline {
    margin: 1.15rem 0 0;
    max-width: 36ch;
    font-size: clamp(1.02rem, 1.5vw, 1.2rem);
    line-height: 1.55;
    color: rgba(244, 241, 235, 0.78);
    text-shadow: 0 1px 24px rgba(7, 17, 31, 0.8);
}

.bc-auth__meta {
    margin: 0;
    font-size: 0.875rem;
    letter-spacing: 0.01em;
    color: rgba(244, 241, 235, 0.52);
}

/* Tarjeta ----------------------------------------------------------------- */

.bc-auth__stage {
    display: flex;
    justify-content: center;
    justify-self: end;
    width: 100%;
}

.bc-auth__card {
    width: min(100%, 26.5rem);
    animation: bc-rise 980ms 70ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.bc-auth__panel.fi-simple-main,
.bc-auth .fi-simple-main {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: clamp(1.6rem, 3vw, 2.35rem) !important;
    border-radius: 1.4rem;
    background:
        linear-gradient(165deg, rgba(255, 255, 255, 0.94), rgba(255, 252, 248, 0.86));
    border: 1px solid rgba(255, 255, 255, 0.42);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.82),
        0 1px 0 rgba(var(--bc-primary-rgb), 0.22),
        0 28px 80px rgba(0, 0, 0, 0.38),
        0 0 90px rgba(var(--bc-primary-rgb), 0.14);
    backdrop-filter: blur(22px) saturate(140%);
    -webkit-backdrop-filter: blur(22px) saturate(140%);
}

@media (prefers-reduced-transparency: reduce) {
    .bc-auth__panel.fi-simple-main,
    .bc-auth .fi-simple-main {
        background: #fffaf3;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
}

.bc-auth .fi-simple-layout,
.bc-auth .fi-simple-main-ctn {
    min-height: 0;
    background: transparent;
}

.bc-auth .fi-simple-page {
    width: 100%;
}

.bc-auth .fi-simple-header {
    margin-bottom: 1.45rem;
    align-items: flex-start;
    text-align: left;
}

.bc-auth .fi-simple-header-heading {
    font-family: var(--bc-display);
    font-size: clamp(1.4rem, 2vw, 1.65rem);
    font-weight: 750;
    letter-spacing: -0.03em;
    color: var(--bc-ink);
    line-height: 1.15;
}

.bc-auth .fi-simple-header-subheading {
    margin-top: 0.5rem;
    font-size: 0.96rem;
    line-height: 1.45;
    color: rgba(7, 17, 31, 0.64);
}

.bc-auth .fi-simple-header-subheading,
.bc-auth .fi-simple-header-heading {
    text-align: left;
}

.bc-auth .fi-input-wrp,
.bc-auth .fi-fo-text-input {
    border-radius: 0.85rem !important;
    background: #fff !important;
    box-shadow: 0 0 0 1px rgba(7, 17, 31, 0.12);
    transition: box-shadow 160ms ease;
}

.bc-auth .fi-input-wrp:focus-within {
    box-shadow:
        0 0 0 1px rgba(var(--bc-primary-rgb), 0.9),
        0 0 0 4px rgba(var(--bc-primary-rgb), 0.18);
}

.bc-auth .fi-input,
.bc-auth input.fi-input,
.bc-auth .fi-input-wrp input {
    color: var(--bc-ink);
    caret-color: var(--bc-primary);
}

.bc-auth .fi-input::placeholder,
.bc-auth input::placeholder {
    color: rgba(7, 17, 31, 0.42);
}

.bc-auth .fi-fo-field-wrp {
    gap: 0.45rem;
}

.bc-auth .fi-fo-field-wrp-label,
.bc-auth .fi-fo-field-wrp-label-ctn,
.bc-auth label {
    color: var(--bc-ink);
}

.bc-auth .fi-btn {
    border-radius: 0.9rem;
    font-weight: 650;
    letter-spacing: -0.01em;
}

.bc-auth .fi-btn.fi-color-primary,
.bc-auth .fi-btn-primary,
.bc-auth button.fi-ac-btn-action.fi-color-primary {
    background-color: var(--bc-primary) !important;
    background-image: none !important;
    color: #fff !important;
    box-shadow:
        0 14px 32px rgba(var(--bc-primary-rgb), 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
    transition:
        transform 160ms cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 160ms ease,
        filter 160ms ease;
}

.bc-auth .fi-btn.fi-color-primary:hover,
.bc-auth .fi-btn-primary:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow:
        0 18px 38px rgba(var(--bc-primary-rgb), 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.bc-auth .fi-btn.fi-color-primary:active,
.bc-auth .fi-btn-primary:active {
    transform: translateY(0) scale(0.985);
}

.bc-auth .fi-btn-primary:focus-visible,
.bc-auth .fi-input-wrp:focus-within,
.bc-auth a:focus-visible {
    outline: none;
}

.bc-auth a {
    color: var(--bc-ink);
}

.bc-auth a:hover {
    color: var(--bc-primary);
}

.bc-auth .fi-checkbox-input:checked,
.bc-auth input[type='checkbox']:checked {
    background-color: var(--bc-primary);
    border-color: var(--bc-primary);
}

.bc-auth .fi-link,
.bc-auth .fi-ac-btn-action {
    color: rgba(7, 17, 31, 0.72);
}

/* Motion ------------------------------------------------------------------ */

@keyframes bc-rise {
    from {
        opacity: 0;
        transform: translateY(22px);
        filter: blur(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .bc-auth__brand,
    .bc-auth__card,
    .bc-auth .fi-btn-primary,
    #bc-horizon {
        animation: none !important;
        transition: none !important;
        transform: none !important;
        filter: none !important;
        opacity: 1 !important;
    }
}

@media (min-width: 981px) {
    .bc-auth-body {
        height: 100dvh;
        overflow: hidden;
    }
}

@media (max-width: 980px) {
    .bc-auth__frame {
        grid-template-columns: 1fr;
        align-items: start;
        align-content: start;
        gap: 1.25rem;
        padding: 1.15rem 1.1rem 1.75rem;
        min-height: 100dvh;
    }

    .bc-auth__brand {
        gap: 0.85rem;
        max-width: none;
    }

    .bc-auth__logo,
    .bc-auth__logo-fallback {
        width: 3.5rem;
        height: 3.5rem;
        border-radius: 0.95rem;
    }

    .bc-auth__title {
        max-width: 20ch;
        font-size: clamp(1.55rem, 6.2vw, 2.05rem);
        line-height: 1.08;
    }

    .bc-auth__tagline,
    .bc-auth__meta {
        display: none;
    }

    .bc-auth__stage {
        justify-self: stretch;
    }

    .bc-auth__card {
        width: min(100%, 28rem);
        margin-inline: auto;
    }
}

@media (max-width: 520px) {
    .bc-auth__logo,
    .bc-auth__logo-fallback {
        width: 3.85rem;
        height: 3.85rem;
        border-radius: 1rem;
    }

    .bc-auth__panel.fi-simple-main,
    .bc-auth .fi-simple-main {
        padding: 1.35rem !important;
    }
}
