:root {
    --auth-grid-gap: clamp(2rem, 4vw, 4rem);
}

body.auth-body {
    font-family: var(--plans-font, "Space Grotesk", "Inter", system-ui, sans-serif);
    background:
        radial-gradient(circle at 12% 20%, rgba(255, 201, 85, 0.16), transparent 50%),
        radial-gradient(circle at 85% 10%, rgba(90, 116, 255, 0.25), transparent 52%),
        linear-gradient(135deg, #050712, #05060f 60%);
    color: var(--plans-text, #f6f7ff);
    min-height: 100vh;
}

body.auth-body .app-main {
    padding: clamp(1.75rem, 4vw, 4.25rem) 0 clamp(1.75rem, 4vw, 3.25rem);
}

body.auth-body .app-header,
body.auth-body .app-footer {
    background: transparent;
    border-bottom: none;
}

body.auth-body .app-header .container,
body.auth-body .app-footer .container {
    border-color: transparent;
}

.auth-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 4vw, 2.5rem);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--auth-grid-gap);
    position: relative;
    isolation: isolate;
}

.auth-page-single {
    max-width: 640px;
    padding-top: clamp(1.25rem, 5vw, 3.25rem);
    padding-bottom: clamp(1.25rem, 5vw, 3rem);
    display: flex;
    justify-content: center;
    min-height: calc(100vh - clamp(2.5rem, 6vw, 5.5rem));
}

.auth-page::after {
    content: "";
    position: absolute;
    inset: 12% auto auto 45%;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(255, 201, 85, 0.18), transparent 65%);
    filter: blur(8px);
    z-index: -1;
}

.auth-page-single::after {
    left: 50%;
    inset: 8% auto auto 50%;
    transform: translateX(-50%);
}

.auth-info-card {
    border-radius: var(--plans-radius-lg, 28px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: clamp(2rem, 4vw, 3rem);
    background: radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.05), transparent 45%),
        linear-gradient(160deg, rgba(13, 17, 34, 0.95), rgba(6, 8, 18, 0.92));
    box-shadow: 0 35px 60px rgba(0, 0, 0, 0.55);
}

.auth-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 1.4rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: var(--plans-muted, rgba(246, 247, 255, 0.64));
    letter-spacing: 0.22em;
    font-size: 0.72rem;
    text-transform: uppercase;
    background: linear-gradient(125deg, rgba(20, 24, 50, 0.9), rgba(8, 10, 22, 0.9));
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.45);
}

.auth-pill-toned {
    background: linear-gradient(125deg, rgba(20, 24, 50, 0.85), rgba(8, 10, 22, 0.85));
    border-color: rgba(255, 255, 255, 0.22);
}

.auth-pill-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--plans-accent, #ffc955);
    box-shadow: 0 0 12px var(--plans-accent, #ffc955);
}

.auth-info-card h1 {
    margin-top: 1.5rem;
    font-size: clamp(2rem, 4vw, 2.75rem);
    line-height: 1.15;
    color: var(--plans-text, #fff);
}

.auth-info-card p {
    margin-top: 1rem;
    color: var(--plans-muted, rgba(255, 255, 255, 0.72));
    font-size: 1.05rem;
}

.auth-feature-list {
    list-style: none;
    margin: 2.5rem 0 0;
    padding: 0;
    display: grid;
    gap: 1.25rem;
}

.auth-feature-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.auth-feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: rgba(255, 201, 85, 0.12);
    border: 1px solid rgba(255, 201, 85, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--plans-accent, #ffc955);
    font-size: 1.2rem;
    box-shadow: 0 12px 18px rgba(0, 0, 0, 0.35);
}

.auth-feature-item h3 {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
    color: var(--plans-text, #fff);
}

.auth-feature-item p {
    margin: 0;
    color: var(--plans-muted, rgba(246, 247, 255, 0.62));
    font-size: 0.95rem;
}

.auth-card {
    border-radius: var(--plans-radius-lg, 26px);
    padding: clamp(2rem, 4vw, 3rem);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(17, 21, 39, 0.92));
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(18px);
    box-shadow: 0 30px 55px rgba(2, 4, 15, 0.55);
    position: relative;
    overflow: hidden;
}

.auth-single-shell {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: clamp(1.1rem, 2.5vw, 2.25rem);
    align-items: center;
}

.auth-single-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.auth-single-header h1 {
    margin: 0;
    font-size: clamp(1.85rem, 4.6vw, 2.4rem);
    color: #ffffff;
}

.auth-single-subtitle {
    margin: 0;
    font-size: 1rem;
    color: var(--plans-muted, rgba(246, 247, 255, 0.85));
}

.auth-single-body {
    margin: 0;
    color: var(--plans-muted, rgba(246, 247, 255, 0.72));
    font-size: 0.92rem;
}

.auth-card-single {
    width: 100%;
    max-width: 520px;
}

.auth-card-single.auth-card {
    padding: clamp(1.6rem, 3.5vw, 2.6rem);
    display: flex;
    flex-direction: column;
}

.auth-card-single.auth-card::-webkit-scrollbar {
    width: 6px;
}

.auth-card-single.auth-card::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 999px;
}

.auth-card::before {
    content: "";
    position: absolute;
    inset: -40% auto auto 60%;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(255, 201, 85, 0.18), transparent 60%);
    pointer-events: none;
    z-index: -1;
}

.auth-card h2 {
    margin: 0 0 0.75rem;
    font-size: 2.1rem;
    color: #ffffff;
}

.auth-card p.auth-subtitle {
    margin-bottom: 2rem;
    color: var(--plans-muted, rgba(255, 255, 255, 0.72));
}

.auth-form-group {
    margin-bottom: 1.35rem;
}

.auth-input-label {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    font-size: 0.9rem;
    color: var(--plans-muted, rgba(255, 255, 255, 0.7));
    margin-bottom: 0.35rem;
}

.auth-input-wrapper {
    position: relative;
}

.auth-input-wrapper input {
    width: 100%;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(4, 6, 15, 0.55);
    color: var(--plans-text, #fff);
    font-size: 1rem;
    padding: 0.95rem 1rem 0.95rem 3rem;
    transition: border-color var(--plans-transition, 220ms ease),
        box-shadow var(--plans-transition, 220ms ease);
}

.auth-input-wrapper input:focus {
    outline: none;
    border-color: rgba(255, 201, 85, 0.65);
    box-shadow: 0 0 0 3px rgba(255, 201, 85, 0.15);
}

.auth-input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.55);
    font-size: 1rem;
}

.auth-checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.5rem;
    color: var(--plans-muted, rgba(255, 255, 255, 0.7));
    font-size: 0.95rem;
}

.auth-checkbox-group label {
    margin-bottom: 0;
    cursor: pointer;
}

.auth-checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    accent-color: var(--plans-accent, #ffc955);
}

.auth-submit {
    width: 100%;
    border: none;
    border-radius: 16px;
    padding: 0.95rem 1.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: #05070f;
    background: linear-gradient(120deg, #ffd86b, #ffb347);
    box-shadow: 0 18px 30px rgba(255, 184, 71, 0.35);
    cursor: pointer;
    transition: transform 220ms ease, box-shadow 220ms ease;
}

.auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 25px 45px rgba(255, 184, 71, 0.45);
}

.auth-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.auth-error {
    margin-top: 0.45rem;
    color: #ff7b7b;
    font-size: 0.9rem;
    display: none;
}

.auth-error-global {
    margin-top: 1rem;
    text-align: center;
}

.auth-error.visible {
    display: block;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.auth-switch {
    margin-top: 1.5rem;
    text-align: center;
    color: var(--plans-muted, rgba(255, 255, 255, 0.72));
}

.auth-switch a {
    color: var(--plans-accent, #ffc955);
    text-decoration: none;
    font-weight: 600;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.auth-password-hint {
    margin-top: 0.35rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.55);
}

.auth-badges {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.auth-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
}

.auth-badge svg {
    width: 16px;
    height: 16px;
    color: var(--plans-accent, #ffc955);
}

@media (max-width: 768px) {
    .auth-page {
        padding-top: 1rem;
    }

    .auth-card,
    .auth-info-card {
        padding: clamp(1.5rem, 6vw, 2rem);
    }

    .auth-info-card h1 {
        font-size: clamp(1.8rem, 8vw, 2.25rem);
    }

    .auth-page-single {
        padding-top: clamp(1rem, 7vw, 2.5rem);
    }

    .auth-page-single .auth-card {
        max-height: unset;
        overflow: visible;
    }
}

@media (max-height: 820px) {
    body.auth-body .app-main {
        padding: clamp(1.5rem, 4vw, 3rem) 0 clamp(1.5rem, 4vw, 2.5rem);
    }

    .auth-page-single {
        min-height: calc(100vh - clamp(2rem, 6vw, 4.5rem));
        padding-top: clamp(1rem, 4vw, 2.5rem);
        padding-bottom: clamp(1rem, 4vw, 2.5rem);
    }

    .auth-single-shell {
        gap: clamp(1.2rem, 3vw, 2rem);
    }

    .auth-single-header h1 {
        font-size: clamp(1.7rem, 4.5vw, 2.25rem);
    }

    .auth-single-subtitle {
        font-size: 1rem;
    }

    .auth-single-body {
        font-size: 0.9rem;
    }

    .auth-card-single.auth-card {
        padding: clamp(1.35rem, 3.5vw, 2.2rem);
    }
}

@media (max-width: 520px) {
    .auth-card-single.auth-card {
        padding: clamp(1.25rem, 6vw, 1.9rem);
    }

    .auth-single-header h1 {
        font-size: clamp(1.8rem, 8vw, 2.2rem);
    }

    .auth-single-subtitle {
        font-size: 0.95rem;
    }
}

@media (max-height: 740px) {
    .auth-single-header {
        gap: 0.75rem;
    }

    .auth-single-header h1 {
        font-size: clamp(1.65rem, 4vw, 2.1rem);
    }

    .auth-single-body {
        font-size: 0.85rem;
    }

    .auth-page-single .auth-card {
        max-height: none;
    }
}

@media (max-height: 640px) {
    .auth-single-body {
        display: none;
    }

    .auth-single-subtitle {
        font-size: 0.9rem;
    }

    .auth-page-single {
        padding-top: clamp(0.75rem, 4vw, 1.5rem);
        padding-bottom: clamp(0.75rem, 4vw, 1.5rem);
        min-height: calc(100vh - clamp(1.5rem, 4vw, 3rem));
    }

    .auth-card-single.auth-card {
        padding: clamp(1.2rem, 3vw, 1.8rem);
    }
}
