html {
    min-height: 100%;
}

body.auth-page {
    min-height: 100vh;
    min-height: 100svh;
    height: auto;
    margin: 0;
    overflow-x: hidden;
    background: #760107;
}

.auth-shell {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    padding: 24px 16px 14px;
}

.auth-main {
    display: flex;
    flex: 1 0 auto;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 0 18px;
}

.auth-content {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    transform: translateY(-20px);
}

.auth-card {
    display: grid;
    grid-template-columns: minmax(300px, 0.9fr) minmax(390px, 1.1fr);
    overflow: hidden;
    border: 1px solid rgba(248, 231, 92, 0.72);
    border-radius: 18px;
    background: #650006;
    box-shadow: 0 22px 60px rgba(32, 0, 2, 0.42), 0 0 28px rgba(248, 231, 92, 0.16);
}

.auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    margin: 0;
    padding: 46px 34px;
    border-right: 1px solid rgba(248, 231, 92, 0.42);
    background: radial-gradient(circle at 50% 42%, #34373e 0, #1d2025 58%, #111317 100%);
    text-align: center;
}

.auth-logo {
    display: block;
    width: 100%;
    max-width: 360px;
    height: auto;
    margin: 0 auto;
}

.auth-login {
    min-width: 0;
    padding: 42px 40px 40px;
    background: linear-gradient(145deg, #760107 0%, #5d0005 100%);
}

.auth-copy {
    margin: 0 0 26px;
}

.auth-eyebrow {
    margin: 0 0 7px;
    color: #f8e75c;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.auth-title {
    margin: 0 0 8px;
    color: #fff;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.2;
}

.auth-subtitle {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
    line-height: 1.55;
}

.auth-panel {
    margin: 0;
}

.auth-panel .panel-body {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.auth-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
    margin: 0;
}

.auth-error {
    flex: 0 0 100%;
    width: 100%;
    margin: 0;
    padding: 9px 12px;
    border-radius: 5px;
    background: #fff1f1;
    color: #9b111e;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
}

.auth-error:empty {
    display: none;
}

.auth-field {
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
}

.auth-submit {
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
}

.auth-form--compact .auth-field {
    flex: 1 1 210px;
}

.auth-form--compact .auth-submit {
    flex: 0 0 122px;
}

.auth-login .auth-field,
.auth-login .auth-submit,
.auth-login .auth-form--compact .auth-field,
.auth-login .auth-form--compact .auth-submit {
    flex: 1 1 100%;
    width: 100%;
}

.auth-form .input-group,
.auth-form .btn {
    width: 100%;
}

.auth-form .form-control,
.auth-form .input-group-addon,
.auth-form .btn {
    height: 46px;
}

.auth-form .input-group {
    overflow: hidden;
    border: 1px solid #eadf93;
    border-radius: 6px;
    border-collapse: separate;
    background: #fff;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.auth-form .input-group:focus-within {
    border-color: #f8e75c;
    box-shadow: 0 0 0 2px rgba(248, 231, 92, 0.28);
}

.auth-form .form-control {
    min-width: 0;
    border: 0 !important;
    border-radius: 0;
    font-size: 14px;
}

.auth-form .input-group-addon {
    width: 44px;
    padding: 0 12px;
    border: 0 !important;
    background: #f8e75c;
    color: #760107;
    text-align: center;
}

.auth-form .btn {
    border: 0;
    background: #f8e75c;
    color: #760107;
    font-size: 14px;
    font-weight: 700;
}

.auth-form .btn:hover,
.auth-form .btn:focus,
.auth-form .btn:active {
    background: #ffe96c;
    color: #650006;
}

.auth-form .form-control:focus {
    outline: 0;
    box-shadow: none;
}

.auth-form .btn:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.auth-passkey-option {
    flex: 1 1 100%;
    width: 100%;
}

.auth-passkey-choice {
    display: grid;
    flex: 1 1 100%;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 6px;
    width: 100%;
    margin: 2px 0 0;
    padding: 4px;
    border: 1px solid rgba(248, 231, 92, 0.55);
    border-radius: 7px;
    background: rgba(65, 0, 4, 0.34);
}

.auth-passkey-tab {
    min-width: 0;
    min-height: 40px;
    padding: 8px 10px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
}

.auth-passkey-tab.is-active {
    background: #f8e75c;
    color: #760107;
    box-shadow: 0 4px 14px rgba(32, 0, 2, 0.18);
}

.auth-passkey-tab:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.auth-passkey-option[hidden] {
    display: none !important;
}

.auth-form .auth-passkey-button {
    display: block;
    width: 100%;
    min-height: 46px;
    height: 46px;
}

.auth-form .auth-passkey-button[disabled] {
    opacity: 0.62;
    cursor: not-allowed;
}

.auth-passkey-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 18px 0 12px;
    color: #888;
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
}

.auth-passkey-divider span:first-child,
.auth-passkey-divider span:last-child {
    flex: 1;
    height: 1px;
    background: #ddd;
}

.auth-passkey-hint {
    margin: 7px 0 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 10px;
    line-height: 1.3;
    text-align: center;
}

.visibility-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    min-height: 40px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #760107;
}

.visibility-toggle:hover,
.visibility-toggle:focus {
    outline: 0;
    color: #410004;
}

.auth-footer {
    flex: 0 0 auto;
    padding: 8px 8px 0;
    color: #f8e75c;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
    text-align: center;
}

.auth-auto-passkey {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: #760107;
}

.auth-page--auto-passkey-active .auth-auto-passkey {
    display: flex;
}

.auth-auto-passkey-box {
    width: 100%;
    max-width: 360px;
    padding: 28px 22px;
    border: 1px solid rgba(248, 231, 92, 0.55);
    border-radius: 8px;
    background: #650006;
    box-shadow: 0 18px 48px rgba(32, 0, 2, 0.36);
    color: #fff;
    text-align: center;
}

.auth-auto-passkey-icon {
    color: #f8e75c;
    font-size: 34px;
}

.auth-auto-passkey-title {
    margin: 14px 0 6px;
    font-size: 18px;
    font-weight: 700;
}

.auth-auto-passkey-copy {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
    line-height: 1.45;
}

@media (max-width: 820px) {
    .auth-content {
        max-width: 520px;
    }

    .auth-card {
        grid-template-columns: minmax(0, 1fr);
    }

    .auth-brand {
        padding: 24px 28px;
        border-right: 0;
        border-bottom: 1px solid rgba(248, 231, 92, 0.42);
    }

    .auth-logo {
        width: 300px;
        max-width: 76vw;
    }

    .auth-login {
        padding: 30px 28px 28px;
    }

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

@media (max-width: 700px) {
    .auth-shell {
        padding: 16px 14px 12px;
    }

    .auth-main {
        align-items: center;
        padding: 12px 0 20px;
    }

    .auth-content {
        max-width: 500px;
        transform: translateY(-8px);
    }

    .auth-brand {
        padding: 20px 22px;
    }

    .auth-logo {
        width: 270px;
        max-width: 74vw;
    }

    .auth-login {
        padding: 25px 20px 22px;
    }

    .auth-title {
        font-size: 26px;
    }

    .auth-field,
    .auth-submit,
    .auth-form--compact .auth-field,
    .auth-form--compact .auth-submit {
        flex: 1 1 100%;
        width: 100%;
    }

    .auth-form .form-control,
    .auth-form .input-group-addon,
    .auth-form .btn {
        height: 48px;
    }

    .auth-footer {
        font-size: 12px;
    }
}

@media (max-width: 360px) {
    .auth-shell {
        padding-right: 10px;
        padding-left: 10px;
    }

    .auth-login {
        padding-right: 15px;
        padding-left: 15px;
    }
}

@media (max-height: 650px) and (min-width: 701px) {
    .auth-shell {
        padding-top: 12px;
    }

    .auth-main {
        padding-top: 6px;
        padding-bottom: 10px;
    }

    .auth-logo {
        max-width: 300px;
    }
}
