/* Auth pages — login, register, payment result */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: linear-gradient(145deg, #eef4ff 0%, #f8faff 40%, #f0fdf9 100%);
    position: relative;
    overflow: hidden;
}
.auth-page::before,
.auth-page::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.45;
}
.auth-page::before {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(79, 110, 247, 0.12), transparent 70%);
    top: -120px;
    right: -80px;
}
.auth-page::after {
    width: 360px;
    height: 360px;
    background: radial-gradient(circle, rgba(45, 212, 191, 0.1), transparent 70%);
    bottom: -100px;
    left: -60px;
}

.auth-wrap {
    width: 100%;
    max-width: 960px;
    position: relative;
    z-index: 1;
}

.auth-layout {
    display: grid;
    gap: 24px;
    grid-template-columns: 1fr;
}
@media (min-width: 900px) {
    .auth-layout {
        grid-template-columns: 1fr 1fr;
        align-items: stretch;
        gap: 0;
    }
}

.auth-brand-panel {
    background: linear-gradient(135deg, var(--primary) 0%, #6d8cff 55%, #2dd4bf 100%);
    border-radius: 24px 24px 0 0;
    padding: 36px 32px;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 200px;
}
@media (min-width: 900px) {
    .auth-brand-panel {
        border-radius: 24px 0 0 24px;
        padding: 48px 40px;
    }
}
.auth-brand-panel .auth-brand-logo {
    margin-bottom: 28px;
}
.auth-brand-panel .logo.auth-site-logo {
    color: white;
    text-decoration: none;
}
.auth-brand-panel .logo.auth-site-logo.has-image {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.96);
    padding: 10px 16px;
    border-radius: 14px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
    color: var(--text);
}
.auth-brand-panel .logo.auth-site-logo.has-image .logo-img {
    height: 36px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    filter: none;
}
.auth-brand-panel .logo.auth-site-logo.has-image .logo-text {
    color: var(--text);
    font-size: 1.2rem;
}
.auth-brand-panel .logo.auth-site-logo:not(.has-image) i {
    color: white;
    font-size: 1.5rem;
}
.auth-brand-panel .logo.auth-site-logo:not(.has-image) .logo-text {
    color: white;
}

@media (min-width: 900px) {
    .auth-brand-panel .auth-brand-logo {
        margin-bottom: 32px;
    }
}

.auth-brand-panel h1 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: var(--font-light);
    line-height: 1.25;
    margin-bottom: 12px;
    letter-spacing: -0.03em;
}
.auth-brand-panel p {
    font-size: 0.92rem;
    opacity: 0.9;
    line-height: 1.55;
    max-width: 340px;
}
.auth-features {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.auth-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    opacity: 0.95;
}
.auth-feature i {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.auth-card {
    background: white;
    border-radius: 0 0 24px 24px;
    padding: 32px 28px;
    box-shadow: 0 20px 60px rgba(79, 110, 247, 0.1);
    border: 1px solid rgba(79, 110, 247, 0.08);
}
@media (min-width: 900px) {
    .auth-card {
        border-radius: 0 24px 24px 0;
        padding: 48px 40px;
    }
}
.auth-card h2 {
    font-size: 1.35rem;
    font-weight: var(--font-light);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.auth-card h2 i { color: var(--primary); }
.auth-card-sub {
    font-size: 0.85rem;
    color: var(--text-soft);
    margin-bottom: 24px;
}

.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    margin-bottom: 18px;
    line-height: 1.4;
}
.auth-alert.error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid rgba(239, 68, 68, 0.2);
}
.auth-alert.success {
    background: #e6f7ee;
    color: #0d7d4a;
    border: 1px solid rgba(45, 212, 191, 0.25);
}

.auth-form .form-group { margin-bottom: 16px; }
.auth-form label {
    display: block;
    font-size: 0.8rem;
    font-weight: var(--font-medium);
    margin-bottom: 6px;
    color: var(--text-soft);
}
.auth-input-wrap {
    position: relative;
}
.auth-input-wrap > i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-soft);
    font-size: 0.9rem;
    pointer-events: none;
}
.auth-input-wrap input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
.auth-input-wrap input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 110, 247, 0.12);
}

.auth-password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-soft);
    cursor: pointer;
    padding: 4px;
}
.auth-remember {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 8px 0 20px;
    font-size: 0.82rem;
}
.auth-remember label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-soft);
    margin: 0;
}
.auth-remember a { color: var(--primary); text-decoration: none; }
.auth-submit { width: 100%; padding: 13px; font-size: 0.95rem; }
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0;
    font-size: 0.78rem;
    color: var(--text-soft);
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}
.auth-footer-text {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-soft);
    margin-top: 20px;
}
.auth-footer-text a {
    color: var(--primary);
    font-weight: var(--font-medium);
    text-decoration: none;
}
.auth-demo-hint {
    margin-top: 16px;
    padding: 10px 14px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--text-soft);
    text-align: center;
    border: 1px dashed var(--border);
}
.auth-back-home {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 20px;
    font-size: 0.82rem;
    color: var(--text-soft);
    text-decoration: none;
}
.auth-back-home:hover { color: var(--primary); }

.auth-card.auth-result {
    max-width: 440px;
    margin: 0 auto;
    border-radius: 24px;
    text-align: center;
    padding: 40px 32px;
}
.auth-result-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
}
.auth-result.success .auth-result-icon { background: #e6f7ee; color: #0d7d4a; }
.auth-result.fail .auth-result-icon { background: #fef2f2; color: #b91c1c; }
.auth-result h1 { font-size: 1.35rem; font-weight: var(--font-medium); margin-bottom: 10px; }
.auth-result-sub { color: var(--text-soft); font-size: 0.9rem; line-height: 1.5; margin-bottom: 8px; }
.auth-balance-display { font-size: 1rem; margin: 16px 0; }
.auth-result-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
