.bn-auth {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 78vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 20px;
    background-color: var(--bn-stone-dark);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='92' height='46'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.03' stroke-width='1'%3E%3Cpath d='M0 .5H92M0 23.5H92'/%3E%3Cpath d='M23.5 0V23M69.5 0V23'/%3E%3Cpath d='M.5 23V46M46.5 23V46'/%3E%3C/g%3E%3C/svg%3E");
}

.bn-auth::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(ellipse 60% 45% at 50% 108%, color-mix(in srgb, var(--bn-molten) 26%, transparent) 0%, transparent 62%);
    animation: bnAuthBreathe 8s ease-in-out infinite;
}

.bn-auth-embers {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

.bn-auth-embers span {
    position: absolute;
    bottom: 6%;
    width: 3px;
    height: 3px;
    background: var(--bn-molten);
    box-shadow: 0 0 6px color-mix(in srgb, var(--bn-molten) 70%, transparent);
    opacity: 0;
    animation: bnAuthEmber 9s linear infinite;
}

.bn-auth-embers span:nth-child(1) { left: 12%; animation-delay: 0.5s; animation-duration: 8.4s; }
.bn-auth-embers span:nth-child(2) { left: 30%; animation-delay: 3.1s; animation-duration: 10.2s; }
.bn-auth-embers span:nth-child(3) { left: 52%; animation-delay: 1.6s; animation-duration: 9.1s; }
.bn-auth-embers span:nth-child(4) { left: 71%; animation-delay: 4.7s; animation-duration: 7.9s; }
.bn-auth-embers span:nth-child(5) { left: 88%; animation-delay: 2.3s; animation-duration: 10.6s; }

.bn-auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    padding: 34px 32px 30px;
    background-color: var(--bn-stone-2);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='92' height='46'%3E%3Cg fill='none' stroke='%23000000' stroke-opacity='0.25' stroke-width='1'%3E%3Cpath d='M0 .5H92M0 23.5H92'/%3E%3Cpath d='M23.5 0V23M69.5 0V23'/%3E%3Cpath d='M.5 23V46M46.5 23V46'/%3E%3C/g%3E%3C/svg%3E");
    border-top: 4px solid var(--bn-gold-deep);
    border-bottom: 5px solid #000;
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.6), inset 0 0 70px rgba(0, 0, 0, 0.5);
}

.bn-auth-card::after {
    content: "";
    position: absolute;
    inset: 12px;
    z-index: 0;
    pointer-events: none;
    --bn-br: var(--bn-gold);
    --l: 22px;
    --w: 2px;
    background:
        linear-gradient(var(--bn-br), var(--bn-br)) top left / var(--l) var(--w) no-repeat,
        linear-gradient(var(--bn-br), var(--bn-br)) top left / var(--w) var(--l) no-repeat,
        linear-gradient(var(--bn-br), var(--bn-br)) top right / var(--l) var(--w) no-repeat,
        linear-gradient(var(--bn-br), var(--bn-br)) top right / var(--w) var(--l) no-repeat,
        linear-gradient(var(--bn-br), var(--bn-br)) bottom left / var(--l) var(--w) no-repeat,
        linear-gradient(var(--bn-br), var(--bn-br)) bottom left / var(--w) var(--l) no-repeat,
        linear-gradient(var(--bn-br), var(--bn-br)) bottom right / var(--l) var(--w) no-repeat,
        linear-gradient(var(--bn-br), var(--bn-br)) bottom right / var(--w) var(--l) no-repeat;
}

.bn-auth-card > * {
    position: relative;
    z-index: 1;
}

.bn-auth-head {
    text-align: center;
    margin-bottom: 22px;
}

.bn-auth-kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 12px;
    padding: 5px 12px;
    background: var(--bn-stone-dark);
    color: var(--bn-molten);
    font-family: var(--bn-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    clip-path: polygon(0 4px, 4px 0, calc(100% - 4px) 0, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 0 calc(100% - 4px));
}

.bn-auth-title {
    margin: 0;
    font-family: var(--bn-font);
    font-weight: 900;
    font-size: 22px;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    color: var(--bn-text);
    text-shadow: 0 2px 0 #000;
}

.bn-auth-desc {
    margin: 10px 0 0;
    font-family: var(--bn-font);
    font-size: 13px;
    line-height: 1.6;
    color: var(--bn-text-2);
}

.bn-auth-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bn-auth-field {
    position: relative;
    display: flex;
    align-items: center;
}

.bn-auth-field > i {
    position: absolute;
    left: 14px;
    color: var(--bn-dim);
    font-size: 13px;
    pointer-events: none;
    transition: color var(--bn-t);
}

.bn-auth-field:focus-within > i {
    color: var(--bn-molten);
}

.bn-auth-input {
    width: 100%;
    padding: 13px 14px 13px 38px;
    background: var(--bn-stone-dark);
    border: 1px solid var(--bn-stone-lit);
    color: var(--bn-text);
    font-family: var(--bn-font);
    font-size: 14px;
    transition: border-color var(--bn-t), box-shadow var(--bn-t);
}

.bn-auth-input::placeholder {
    color: var(--bn-dim);
}

.bn-auth-input:focus {
    outline: none;
    border-color: var(--bn-molten);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--bn-molten) 18%, transparent);
}

.bn-auth-select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 38px;
    cursor: pointer;
}

.bn-auth-select:invalid {
    color: var(--bn-dim);
}

.bn-auth-select option {
    background: var(--bn-stone-dark);
    color: var(--bn-text);
}

.bn-auth-field > i.bn-auth-select-caret {
    left: auto;
    right: 14px;
    font-size: 11px;
}

.bn-auth-field:has(.bn-auth-eye) .bn-auth-input {
    padding-right: 44px;
}

.bn-auth-eye {
    position: absolute;
    right: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: none;
    border: none;
    color: var(--bn-dim);
    cursor: pointer;
    transition: color var(--bn-t);
}

.bn-auth-eye:hover {
    color: var(--bn-text);
}

.bn-auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin: 2px 0;
}

.bn-auth-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-family: var(--bn-font);
    font-size: 13px;
    color: var(--bn-text-2);
    user-select: none;
}

.bn-auth-check input {
    width: 16px;
    height: 16px;
    accent-color: var(--bn-molten);
    cursor: pointer;
}

.bn-auth-forgot {
    font-family: var(--bn-mono);
    font-size: 12px;
    color: var(--bn-text-2);
    text-decoration: none;
    transition: color var(--bn-t);
}

.bn-auth-forgot:hover {
    color: var(--bn-molten);
    text-decoration: none;
}

.bn-auth-form .bn-btn-molten {
    margin-top: 4px;
    box-shadow: 0 4px 0 var(--bn-molten-deep), inset 0 2px 0 color-mix(in srgb, var(--bn-molten) 55%, white);
    transition: transform 90ms ease-out, box-shadow 90ms ease-out, background var(--bn-t);
}

.bn-auth-form .bn-btn-molten:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 var(--bn-molten-deep), inset 0 2px 0 color-mix(in srgb, var(--bn-molten) 55%, white);
}

.bn-auth-or {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0 14px;
    font-family: var(--bn-mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--bn-dim);
}

.bn-auth-or::before,
.bn-auth-or::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--bn-stone-lit);
}

.bn-auth-social {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bn-auth-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 16px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--bn-line, #332629);
}

.bn-auth-link {
    font-family: var(--bn-font);
    font-size: 13px;
    color: var(--bn-text-2);
    text-decoration: none;
    transition: color var(--bn-t);
}

.bn-auth-link:hover {
    color: var(--bn-molten);
    text-decoration: none;
}

.bn-auth-link strong {
    color: var(--bn-molten);
    font-weight: 700;
}

.bn-auth-msg {
    margin-bottom: 16px;
}

.bn-auth-msg:empty {
    display: none;
}

.bn-auth-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    background: color-mix(in srgb, var(--bn-molten) 14%, var(--bn-stone-dark));
    border: 2px solid color-mix(in srgb, var(--bn-molten) 40%, #000);
    border-radius: 50%;
    color: var(--bn-molten);
    font-size: 26px;
}

.bn-auth-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 22px;
}

.bn-auth-form .g-recaptcha,
.bn-auth-form > div[class*="recaptcha"] {
    display: flex;
    justify-content: center;
}

.bn-auth-card-wide {
    max-width: 480px;
}

.bn-auth-steps {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 18px;
    list-style: none;
    background: var(--bn-stone-dark);
    border-left: 3px solid var(--bn-gold-deep);
}

.bn-auth-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.bn-auth-step-no {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bn-stone-2);
    color: var(--bn-gold);
    font-family: var(--bn-mono);
    font-size: 11px;
    font-weight: 700;
}

.bn-auth-step-text {
    font-family: var(--bn-font);
    font-size: 13px;
    line-height: 1.5;
    color: var(--bn-text-2);
}

.bn-auth-help {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--bn-line);
}

.bn-auth-help-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-family: var(--bn-font);
    font-size: 13px;
    font-weight: 700;
    color: var(--bn-text);
}

.bn-auth-help-head i {
    color: var(--bn-molten);
    font-size: 13px;
}

.bn-auth-help-text {
    margin: 0 0 14px;
    font-family: var(--bn-font);
    font-size: 13px;
    line-height: 1.6;
    color: var(--bn-text-2);
}

.bn-auth-reveal {
    display: grid;
    grid-template-rows: 0fr;
    margin: 0 0 -12px;
    padding: 0;
    border: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: grid-template-rows 200ms ease-out, opacity 200ms ease-out, margin-bottom 200ms ease-out, visibility 0s linear 200ms;
}

.bn-auth-reveal > * {
    min-height: 0;
}

.bn-auth-reveal.is-open {
    grid-template-rows: 1fr;
    margin-bottom: 0;
    opacity: 1;
    visibility: visible;
    transition: grid-template-rows 200ms ease-out, opacity 200ms ease-out, margin-bottom 200ms ease-out, visibility 0s;
}

@media (max-width: 480px) {
    .bn-auth-card {
        padding: 28px 20px 26px;
    }
    .bn-auth-title {
        font-size: 19px;
    }
    .bn-auth-input {
        font-size: 16px;
    }
}

@keyframes bnAuthBreathe {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 0.9; }
}

@keyframes bnAuthEmber {
    0% { opacity: 0; transform: translateY(0) scale(1); }
    12% { opacity: 0.9; }
    85% { opacity: 0.5; }
    100% { opacity: 0; transform: translateY(-70vh) scale(0.4); }
}

@media (prefers-reduced-motion: reduce) {
    .bn-auth::before,
    .bn-auth-embers span {
        animation: none;
    }
    .bn-auth::before { opacity: 0.6; }
    .bn-auth-embers span { opacity: 0.25; }
    .bn-auth-reveal,
    .bn-auth-reveal.is-open {
        transition: none;
    }
}
