/* Auth pages — login & register (responsive) */
.auth-shell {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    background: var(--ss-bg, #fafafa);
}

.auth-shell-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--ss-border, #e8e8e8);
    background: #fff;
}

.auth-shell-top a img { height: 32px; width: auto; }

.auth-shell-body {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr;
    min-height: 0;
}

@media (min-width: 1024px) {
    .auth-shell-body {
        grid-template-columns: 1fr 1fr;
    }
}

.auth-shell-visual {
    display: none;
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, #fff 0%, #ffebee 100%);
    padding: 3rem;
}

@media (min-width: 1024px) {
    .auth-shell-visual {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
}

.auth-shell-visual img.auth-visual-hero {
    width: 100%;
    max-width: 480px;
    margin: auto;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    object-fit: contain;
    filter: drop-shadow(0 20px 40px rgba(244, 67, 54, 0.12));
}

.auth-visual-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .75rem;
    margin-top: 2rem;
}

.auth-visual-stat {
    background: rgba(255,255,255,.85);
    border: 1px solid rgba(244,67,54,.12);
    border-radius: 12px;
    padding: .875rem;
    text-align: center;
}

.auth-visual-stat strong {
    display: block;
    font-size: 1.125rem;
    font-weight: 800;
    color: #1a1a1a;
}

.auth-visual-stat span {
    font-size: .625rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #9e9e9e;
}

.auth-shell-form {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem 1.25rem 3rem;
    overflow-y: auto;
}

@media (min-width: 640px) {
    .auth-shell-form { padding: 2.5rem 2rem 3rem; }
}

@media (min-width: 1024px) {
    .auth-shell-form { padding: 3rem; }
}

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

.auth-form-wrap.wide { max-width: 560px; }

.auth-form-wrap h1 {
    font-size: clamp(1.5rem, 4vw, 1.875rem);
    font-weight: 800;
    color: #1a1a1a;
    margin: 0 0 .375rem;
    letter-spacing: -.02em;
}

.auth-form-wrap .auth-sub {
    font-size: .9375rem;
    color: #616161;
    margin: 0 0 1.75rem;
}

.auth-form-wrap .auth-top-link {
    text-align: right;
    font-size: .8125rem;
    color: #616161;
    margin-bottom: 1.5rem;
}

.auth-form-wrap .auth-top-link a {
    color: #f44336;
    font-weight: 700;
    text-decoration: none;
}

.auth-alert-error {
    background: #ffebee;
    border: 1px solid #ef9a9a;
    border-radius: 10px;
    padding: .75rem 1rem;
    margin-bottom: 1rem;
    font-size: .8125rem;
    color: #c62828;
}

.auth-field { margin-bottom: 1rem; }

.auth-field label {
    display: block;
    font-size: .8125rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: .375rem;
}

.auth-field input,
.auth-field select,
.auth-field textarea {
    width: 100%;
    height: auto;
    min-height: 0;
    padding: .625rem .875rem;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    font-size: .875rem;
    line-height: 1.4;
    background: #fff;
    color: #1a1a1a;
    transition: border-color .2s, box-shadow .2s;
    appearance: none;
}

.auth-field input:focus,
.auth-field select:focus,
.auth-field textarea:focus {
    outline: none;
    border-color: #f44336;
    box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.1);
}

.auth-row-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    .auth-row-2 { grid-template-columns: 1fr 1fr; }
}

.auth-card-block {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 14px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 12px rgba(0,0,0,.04);
}

.auth-card-block h3 {
    font-size: .8125rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 1rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.auth-step-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #f44336;
    color: #fff;
    font-size: .625rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-check-row {
    display: flex;
    align-items: center;
    gap: .625rem;
    font-size: .8125rem;
    color: #616161;
    cursor: pointer;
    user-select: none;
}

.auth-check-row input[type="checkbox"],
.auth-check-row input[type="radio"] {
    width: 16px;
    height: 16px;
    min-width: 16px;
    min-height: 16px;
    max-width: 16px;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
    accent-color: #f44336;
    cursor: pointer;
    appearance: auto;
}

.auth-check-row span { line-height: 1.45; }

.auth-check-row a { color: #f44336; font-weight: 600; }

.auth-btn-primary {
    width: 100%;
    padding: .75rem 1.25rem;
    background: linear-gradient(135deg, #f44336, #ef5350);
    color: #fff;
    font-weight: 700;
    font-size: .875rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform .15s, box-shadow .2s;
    margin-top: .5rem;
    height: auto;
    min-height: 0;
}

.auth-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(244, 67, 54, 0.25);
}

.auth-footer-links {
    text-align: center;
    margin-top: 1.25rem;
    font-size: .8125rem;
    color: #9e9e9e;
}

.auth-footer-links a {
    color: #f44336;
    font-weight: 600;
    text-decoration: none;
}

.auth-account-option {
    display: block;
    cursor: pointer;
}

.auth-account-option input { position: absolute; opacity: 0; pointer-events: none; }

.auth-account-option-inner {
    padding: .875rem;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    background: #fafafa;
    transition: border-color .2s, background .2s;
}

.auth-account-option input:checked + .auth-account-option-inner {
    border-color: #f44336;
    background: #ffebee;
}

.auth-account-option-inner h4 {
    font-size: .875rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 .125rem;
}

.auth-account-option-inner p {
    font-size: .6875rem;
    color: #9e9e9e;
    margin: 0;
}

/* ── Register: single viewport, no scroll ── */
body:has(.auth-shell-register) {
    overflow: hidden;
    height: 100dvh;
}

.auth-shell-register {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
}

.auth-shell-register .auth-shell-top {
    padding: .625rem 1.25rem;
    flex-shrink: 0;
}

.auth-shell-body--register {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.auth-shell-form--register {
    overflow: hidden;
    padding: .75rem 1rem 1rem;
    justify-content: center;
}

@media (min-width: 640px) {
    .auth-shell-form--register { padding: 1rem 1.5rem; }
}

@media (min-width: 1024px) {
    .auth-shell-form--register { padding: 1.25rem 2rem; }
}

.auth-shell-visual--register {
    padding: 1.5rem 2rem;
}

@media (min-width: 1024px) {
    .auth-shell-visual--register {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 1rem;
    }

    .auth-shell-visual--register .auth-visual-hero {
        max-width: 320px;
        max-height: min(28vh, 220px);
        object-fit: contain;
    }
}

.auth-visual-stats--compact {
    margin-top: 0;
    gap: .5rem;
}

.auth-visual-stats--compact .auth-visual-stat {
    padding: .5rem .625rem;
}

.auth-visual-stats--compact .auth-visual-stat strong {
    font-size: .9375rem;
}

.auth-register-panel {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 16px;
    padding: 1rem 1.125rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    gap: .875rem;
}

@media (min-width: 640px) {
    .auth-register-panel { padding: 1.125rem 1.375rem; }
}

.auth-register-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
}

.auth-register-head h1 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    font-weight: 800;
    color: #1a1a1a;
    margin: 0 0 .125rem;
    letter-spacing: -.02em;
}

.auth-register-head .auth-sub {
    font-size: .8125rem;
    color: #616161;
    margin: 0;
}

.auth-register-badge {
    flex-shrink: 0;
    padding: .25rem .625rem;
    background: #ffebee;
    color: #d32f2f;
    border: 1px solid rgba(244, 67, 54, 0.2);
    border-radius: 999px;
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.auth-alert-error--compact {
    margin-bottom: 0;
    padding: .5rem .75rem;
    font-size: .75rem;
}

.auth-register-form {
    display: flex;
    flex-direction: column;
    gap: .875rem;
}

.auth-register-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .5rem .625rem;
}

.auth-register-grid .auth-field {
    margin-bottom: 0;
}

.auth-register-grid .auth-field--full {
    grid-column: 1 / -1;
}

.auth-register-grid .auth-field label {
    font-size: .75rem;
    margin-bottom: .25rem;
}

.auth-register-grid .auth-field input,
.auth-register-grid .auth-field select {
    padding: .5rem .75rem;
    font-size: .8125rem;
    border-radius: 8px;
}

.auth-register-foot {
    display: flex;
    flex-direction: column;
    gap: .625rem;
    padding-top: .125rem;
    border-top: 1px solid #f0f0f0;
}

@media (min-width: 640px) {
    .auth-register-foot {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
    }
}

.auth-check-row--compact {
    font-size: .75rem;
    flex: 1;
    min-width: 0;
}

.auth-btn-primary--inline {
    margin-top: 0;
    width: auto;
    min-width: 140px;
    flex-shrink: 0;
    padding: .625rem 1.25rem;
    white-space: nowrap;
}

@media (max-width: 639px) {
    .auth-btn-primary--inline {
        width: 100%;
    }
}

@media (max-width: 380px) {
    .auth-register-grid {
        grid-template-columns: 1fr;
    }
}
