/* Auth main shell — transparent passthrough wrapper, no height/padding */
.auth-main-shell {
    display: contents;
}

body.auth-page,
.auth-page .btn,
.auth-page .form-control,
.auth-page .form-select,
.auth-page .form-label,
.auth-page .alert,
.auth-page .small,
.auth-page p,
.auth-page h1,
.auth-page h2 {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.auth-page {
    --auth-accent: #0d6efd;
    --auth-accent-dark: #0a4eb8;
    --auth-card-border: rgba(15, 23, 42, .12);
    --auth-ink: #152033;
    --auth-muted: #667085;
    background-color: #f8f9fa;
    margin-bottom: 0;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
}

body.auth-polished-page {
    background:
        radial-gradient(circle at 18% 18%, rgba(13, 110, 253, .18), transparent 28rem),
        radial-gradient(circle at 82% 78%, rgba(20, 184, 166, .16), transparent 24rem),
        linear-gradient(135deg, #f8fbff 0%, #eef5ff 45%, #f6f9fb 100%);
}

body.auth-login-page,
body.auth-password-page {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

body.auth-register-page {
    min-height: 100vh;
    min-height: 100dvh;
    overflow-y: auto;
}

body.auth-polished-page::before,
body.auth-polished-page::after {
    border-radius: 999px;
    content: "";
    filter: blur(8px);
    pointer-events: none;
    position: fixed;
    z-index: 0;
}

body.auth-polished-page::before {
    background: rgba(13, 110, 253, .11);
    height: 18rem;
    left: -5rem;
    top: -6rem;
    width: 18rem;
}

body.auth-polished-page::after {
    background: rgba(20, 184, 166, .13);
    bottom: -7rem;
    height: 20rem;
    right: -6rem;
    width: 20rem;
}

.auth-page .page-shell {
    align-items: center;
    display: flex;
    justify-content: center;
    margin-top: 0 !important;
    max-width: 100% !important;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 1.5rem;
}

.auth-polished-page .page-shell {
    box-sizing: border-box;
    padding: clamp(.75rem, 2vw, 1.5rem);
    position: relative;
    z-index: 1;
}

.auth-login-page .page-shell,
.auth-password-page .page-shell {
    box-sizing: border-box;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    padding: 0 !important;
}

.auth-register-page .page-shell {
    align-items: flex-start;
    overflow: visible;
    padding-block: clamp(.85rem, 2.2vh, 1.5rem);
}

.auth-shell {
    --bs-gutter-x: 0;
    align-items: center;
    justify-content: center;
    min-height: auto;
    width: 100%;
}

.auth-login-shell,
.auth-polished-shell {
    animation: auth-login-rise .55s ease-out both;
}

.auth-panel.auth-login-panel,
.auth-panel.auth-polished-panel {
    max-width: 450px;
}

.auth-panel.auth-register-panel {
    max-width: 1040px;
}

.auth-login-hero,
.auth-polished-hero {
    margin-bottom: clamp(.75rem, 2vh, 1.25rem);
}

.auth-product-lockup {
    align-items: center;
    background: rgba(255, 255, 255, .78);
    border: 1px solid rgba(255, 255, 255, .88);
    border-radius: 999px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .08);
    color: var(--auth-ink);
    display: inline-flex;
    gap: .7rem;
    justify-content: center;
    margin-bottom: .7rem;
    padding: .4rem .85rem .4rem .45rem;
}

.auth-brand-mark {
    align-items: center;
    background: linear-gradient(135deg, #0d6efd, #14b8a6);
    border-radius: 999px;
    box-shadow: 0 10px 22px rgba(13, 110, 253, .28);
    color: #fff;
    display: inline-flex;
    font-size: 1.1rem;
    height: 2.2rem;
    justify-content: center;
    width: 2.2rem;
}

.auth-product-name {
    font-size: .9rem;
    font-weight: 700;
    letter-spacing: .01em;
}

.auth-brand-icon {
    color: #212529;
    font-size: 3rem;
}

.auth-title {
    color: #212529;
    font-size: 2rem;
    font-weight: 500;
    margin: .5rem 0 0;
}

.auth-polished-page .auth-title {
    color: var(--auth-ink);
    font-size: clamp(1.55rem, 4vw, 2.15rem);
    font-weight: 750;
    letter-spacing: -.03em;
    line-height: 1.05;
    margin: 0 0 .35rem;
}

.auth-subtitle {
    color: #6c757d;
    font-size: .98rem;
    margin-bottom: 0;
}

.auth-polished-page .auth-subtitle {
    color: var(--auth-muted);
    font-size: .96rem;
    margin: 0;
}

.auth-card {
    border: 0;
    border-radius: .75rem;
    box-shadow: 0 .125rem .5rem rgba(0, 0, 0, .075) !important;
}

.auth-login-card,
.auth-polished-card {
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    background: rgba(255, 255, 255, .86);
    border: 1px solid var(--auth-card-border);
    border-radius: 1.35rem;
    box-shadow: 0 26px 70px rgba(15, 23, 42, .16) !important;
    overflow: hidden;
}

.auth-card .card-body {
    padding: 1.5rem !important;
}

.auth-login-card .card-body,
.auth-polished-card .card-body {
    padding: clamp(1.1rem, 3vw, 1.55rem) !important;
}

.auth-register-card .card-body {
    padding: clamp(.9rem, 1.8vw, 1.2rem) !important;
}

.auth-form,
.auth-form .d-grid,
.auth-form .btn,
.auth-form .form-control,
.auth-form .form-select {
    width: 100%;
}

.auth-form {
    margin: 0 auto;
    max-width: 100%;
}

.auth-login-card .mb-3,
.auth-polished-card .mb-3 {
    margin-bottom: .8rem !important;
}

.auth-register-card .mb-3 {
    margin-bottom: .55rem !important;
}

.auth-register-card .auth-register-grid {
    --bs-gutter-x: .85rem;
}

.auth-card .form-label {
    color: #343a40;
    font-size: 1rem;
    font-weight: 400;
}

.auth-login-card .form-label,
.auth-polished-card .form-label {
    color: var(--auth-ink);
    font-size: .86rem;
    font-weight: 700;
    margin-bottom: .35rem;
}

.auth-card .form-control {
    border-color: #dee2e6;
    border-radius: .75rem;
    box-shadow: none;
    padding: .75rem;
}

.auth-card .form-select {
    border-color: #dee2e6;
    border-radius: .75rem;
    box-shadow: none;
    padding: .75rem;
}

.auth-login-card .form-control,
.auth-login-card .form-select,
.auth-polished-card .form-control,
.auth-polished-card .form-select {
    background: rgba(255, 255, 255, .92);
    border: 1px solid rgba(15, 23, 42, .14);
    border-radius: .9rem;
    min-height: 46px;
    padding: .68rem .9rem;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.auth-card .form-control::placeholder {
    color: #adb5bd;
}

.auth-card .form-control:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 .2rem rgba(13, 110, 253, .15);
}

.auth-card .form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 .2rem rgba(13, 110, 253, .15);
}

.auth-login-card .form-control:focus,
.auth-login-card .form-select:focus,
.auth-polished-card .form-control:focus,
.auth-polished-card .form-select:focus {
    border-color: rgba(13, 110, 253, .62);
    box-shadow: 0 0 0 .22rem rgba(13, 110, 253, .13);
    transform: translateY(-1px);
}

.auth-card .btn {
    border-radius: .375rem;
    font-weight: 500;
    padding-bottom: .75rem;
    padding-top: .75rem;
}

.auth-login-card .btn,
.auth-polished-card .btn {
    border-radius: .9rem;
    font-weight: 700;
    min-height: 46px;
    padding: .65rem .9rem;
}

.auth-card .btn-primary {
    box-shadow: none;
}

.auth-login-card .btn-primary,
.auth-polished-card .btn-primary {
    background: linear-gradient(135deg, var(--auth-accent), var(--auth-accent-dark));
    border: 0;
    box-shadow: 0 16px 30px rgba(13, 110, 253, .28);
}

.auth-login-card .btn-primary:hover,
.auth-polished-card .btn-primary:hover {
    box-shadow: 0 18px 36px rgba(13, 110, 253, .34);
    transform: translateY(-1px);
}

.auth-card .btn-outline-secondary {
    background: #fff;
    border-color: #ced4da;
    color: #495057;
}

.auth-card .btn-outline-secondary:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
    color: #212529;
}

.auth-login-card .btn-outline-secondary,
.auth-polished-card .btn-outline-secondary {
    background: rgba(255, 255, 255, .86);
    border-color: rgba(15, 23, 42, .16);
}

.auth-login-card .auth-divider,
.auth-polished-card .auth-divider {
    margin-bottom: .8rem !important;
}

.auth-divider hr {
    margin: 0;
    opacity: .8;
}

.auth-divider span {
    color: #6c757d;
    font-size: .875rem;
    letter-spacing: .08em;
}

.auth-login-card .auth-divider span,
.auth-polished-card .auth-divider span {
    color: var(--auth-muted);
    font-size: .76rem;
    font-weight: 700;
}

#google-signin-button {
    min-height: 40px;
    width: 100%;
}

.auth-google-note {
    background: rgba(13, 110, 253, .08);
    border: 1px solid rgba(13, 110, 253, .12);
    border-radius: .85rem;
    color: #546179 !important;
    margin: .75rem 0 0;
    padding: .6rem .75rem;
}

.auth-links a {
    color: #0d6efd;
    text-decoration: none;
}

.auth-login-links,
.auth-polished-links {
    gap: .75rem;
    margin-top: .85rem;
}

.auth-login-links a,
.auth-polished-links a {
    background: rgba(255, 255, 255, .72);
    border: 1px solid rgba(255, 255, 255, .82);
    border-radius: .8rem;
    color: #0a4eb8;
    padding: .5rem .7rem;
}

.auth-login-links a:hover,
.auth-polished-links a:hover {
    background: rgba(255, 255, 255, .94);
    color: #073b8e;
}

.auth-signup-footnote {
    margin-top: .65rem;
}

.auth-signup-footnote a {
    color: #0a4eb8;
    font-weight: 700;
    text-decoration: none;
}

.auth-register-suggestion-note {
    color: var(--auth-muted);
    font-size: .8rem;
    margin: -.25rem 0 .55rem;
}

.auth-footnote {
    color: #6c757d;
}

.auth-page .alert {
    border-radius: .75rem;
}

.auth-panel {
    max-width: 430px;
    width: 100%;
}

.auth-toast-container {
    z-index: 1080;
}

@keyframes auth-login-rise {
    from {
        opacity: 0;
        transform: translateY(14px) scale(.99);
    }

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

@media (max-height: 720px) and (min-width: 576px) {
    .auth-login-page .page-shell,
    .auth-password-page .page-shell {
        padding-bottom: .7rem;
        padding-top: .7rem;
    }

    .auth-login-hero,
    .auth-polished-hero {
        margin-bottom: .6rem;
    }

    .auth-product-lockup {
        margin-bottom: .45rem;
        padding-bottom: .32rem;
        padding-top: .32rem;
    }

    .auth-login-card .card-body,
    .auth-polished-card .card-body {
        padding: 1rem !important;
    }

    .auth-login-card .mb-3,
    .auth-login-card .auth-divider,
    .auth-polished-card .mb-3,
    .auth-polished-card .auth-divider {
        margin-bottom: .55rem !important;
    }

    .auth-login-links,
    .auth-polished-links {
        margin-top: .55rem;
    }
}

@media (max-width: 575.98px) {
    .auth-login-page .page-shell,
    .auth-password-page .page-shell,
    .auth-register-page .page-shell {
        padding: .75rem;
    }

    .auth-product-name {
        font-size: .82rem;
    }

    .auth-login-links,
    .auth-polished-links {
        flex-direction: column;
        text-align: center;
    }
}
