/* Auth pages (login, register) — matches landing.css theme */

.auth-page {
    --lp-bg: #0a0a0d;
    --lp-surface: #12121a;
    --lp-border: rgba(255, 255, 255, 0.08);
    --lp-border-strong: rgba(255, 255, 255, 0.12);
    --lp-text: #e4e4e7;
    --lp-muted: #a1a1aa;
    --lp-dim: #71717a;
    --lp-primary: #6366f1;
    --lp-primary-light: #818cf8;
    --lp-accent: #8b5cf6;
    --lp-success: #22c55e;
    --lp-danger: #ef4444;
    --lp-radius: 14px;

    min-height: 100vh;
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--lp-text);
    background: var(--lp-bg);
    -webkit-font-smoothing: antialiased;
}

.auth-page *,
.auth-page *::before,
.auth-page *::after {
    box-sizing: border-box;
}

.auth-page a {
    color: inherit;
    text-decoration: none;
}

.auth-page img {
    display: block;
    max-width: 100%;
}

.auth-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.auth-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    background:
        linear-gradient(160deg, rgba(99, 102, 241, 0.14) 0%, transparent 45%),
        linear-gradient(220deg, rgba(139, 92, 246, 0.1) 0%, transparent 40%),
        var(--lp-surface);
    border-right: 1px solid var(--lp-border);
}

.auth-panel__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--lp-muted);
    transition: color 0.2s;
}

.auth-back:hover {
    color: #fff;
}

.auth-lang {
    display: flex;
    gap: 2px;
    padding: 3px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--lp-border);
    border-radius: 999px;
}

.auth-lang button {
    border: 0;
    background: transparent;
    color: var(--lp-dim);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.35rem 0.55rem;
    border-radius: 999px;
    cursor: pointer;
}

.auth-lang button.is-active,
.auth-lang button:hover {
    color: #fff;
    background: rgba(99, 102, 241, 0.35);
}

.auth-panel__main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 28rem;
    padding: 2rem 0;
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.auth-logo img {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.auth-logo__text {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #fff;
}

.auth-logo__text span {
    color: var(--lp-primary-light);
}

.auth-panel__title {
    margin: 0 0 0.75rem;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #fff;
}

.auth-panel__desc {
    margin: 0 0 2rem;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--lp-muted);
}

.auth-perks {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.auth-perks li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.92rem;
    color: var(--lp-muted);
}

.auth-perks i {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--lp-primary-light);
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.auth-panel__foot {
    font-size: 0.82rem;
    color: var(--lp-dim);
}

.auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    padding: clamp(1.5rem, 4vw, 2.5rem);
}

.auth-card {
    width: min(100%, 420px);
    padding: clamp(1.75rem, 4vw, 2.25rem);
    background: rgba(18, 18, 26, 0.85);
    border: 1px solid var(--lp-border-strong);
    border-radius: var(--lp-radius);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(12px);
}

.auth-card__head {
    margin-bottom: 1.5rem;
}

.auth-card__head h1 {
    margin: 0 0 0.35rem;
    font-size: 1.45rem;
    font-weight: 700;
    color: #fff;
}

.auth-card__head p {
    margin: 0;
    font-size: 0.92rem;
    color: var(--lp-muted);
}

.auth-alert {
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.88rem;
    line-height: 1.45;
    border-radius: 10px;
    border: 1px solid transparent;
}

.auth-alert--error {
    color: #fecaca;
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.25);
}

.auth-alert--success {
    color: #bbf7d0;
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.25);
}

.auth-field {
    margin-bottom: 1.1rem;
}

.auth-field label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--lp-muted);
}

.auth-input-wrap {
    position: relative;
}

.auth-input-wrap i.field-icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    color: var(--lp-dim);
    pointer-events: none;
}

.auth-field input {
    width: 100%;
    padding: 0.75rem 0.9rem 0.75rem 2.5rem;
    font-size: 1rem;
    color: #fff;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--lp-border-strong);
    border-radius: 10px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-field input[type="password"],
.auth-field input#password,
.auth-field input#password_confirm {
    padding-right: 2.75rem;
}

.auth-field input:hover {
    border-color: rgba(99, 102, 241, 0.35);
}

.auth-field input:focus {
    outline: none;
    border-color: var(--lp-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.auth-toggle-pw {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--lp-dim);
    cursor: pointer;
}

.auth-toggle-pw:hover {
    color: var(--lp-text);
    background: rgba(255, 255, 255, 0.05);
}

.auth-submit {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.85rem 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    background: linear-gradient(135deg, var(--lp-primary) 0%, var(--lp-accent) 100%);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
    transition: transform 0.2s, box-shadow 0.2s;
}

.auth-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(99, 102, 241, 0.45);
}

.auth-submit:active {
    transform: translateY(0);
}

.auth-card__footer {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--lp-border);
    text-align: center;
    font-size: 0.9rem;
    color: var(--lp-muted);
}

.auth-card__footer a {
    color: var(--lp-primary-light);
    font-weight: 600;
}

.auth-card__footer a:hover {
    color: #c7d2fe;
}

.auth-redirect-msg {
    margin: 0.5rem 0 0;
    font-size: 0.88rem;
    color: var(--lp-muted);
    text-align: center;
}

.auth-card--register {
    width: min(100%, 440px);
}

.auth-field input.auth-input--number {
    max-width: 160px;
}

.auth-check {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin-bottom: 1.1rem;
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--lp-muted);
    cursor: pointer;
}

.auth-check input[type="checkbox"] {
    width: 1.05rem;
    height: 1.05rem;
    margin: 0.12rem 0 0;
    flex-shrink: 0;
    accent-color: var(--lp-primary);
    cursor: pointer;
}

.auth-mobile-logo {
    display: none;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1.5rem;
}

.auth-mobile-top {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.auth-mobile-logo img {
    width: 36px;
    height: 36px;
}

.auth-mobile-logo span {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
}

.auth-mobile-copy {
    display: none;
    margin: 1.25rem 0 0;
    font-size: 0.82rem;
    color: var(--lp-dim);
    text-align: center;
}

@media (max-width: 900px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-panel {
        display: none;
    }

    .auth-main {
        flex-direction: column;
        min-height: 100vh;
        min-height: 100dvh;
        align-items: stretch;
        justify-content: flex-start;
        padding: max(2rem, env(safe-area-inset-top)) clamp(1.25rem, 4vw, 2rem) max(1.25rem, env(safe-area-inset-bottom));
    }

    .auth-card {
        align-self: center;
        width: min(100%, 420px);
    }

    .auth-card--register {
        width: min(100%, 440px);
        align-self: center;
    }

    .auth-mobile-logo {
        display: flex;
    }

    .auth-mobile-top {
        display: flex;
    }

    .auth-mobile-copy {
        display: block;
        margin-top: auto;
        padding-top: 1.5rem;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 1.35rem;
        border-radius: 12px;
    }
}

.auth-shell--terms {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.auth-main--terms {
    width: min(100%, 560px);
    margin: 0 auto;
}

.auth-card--terms {
    width: 100%;
}

.auth-terms-body {
    margin-top: 0.5rem;
}

.auth-terms-body p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.65;
    color: rgba(226, 232, 240, 0.88);
}
.auth-terms-copy {
    margin: 2rem 0 0;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    font-size: 0.8125rem;
    color: rgba(148, 163, 184, 0.65);
    text-align: center;
}

