/* =========================================================================
   AUTH PAGES — Login / Join Styles
   ========================================================================= */

.auth-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 24px 40px;
    overflow: hidden;
}

.auth-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.auth-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    max-width: 960px;
    width: 100%;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--glass-border);
}

/* ─── Auth Card (form side) ─────────────────────────────────── */
.auth-card {
    padding: 48px 40px;
    border-radius: 0;
    border: none;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.3rem;
}

.auth-icon-gold {
    background: rgba(212, 175, 55, 0.08);
    border-color: rgba(212, 175, 55, 0.2);
    color: var(--gold);
}

.auth-title {
    font-size: 1.6rem;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.auth-desc {
    color: var(--text-secondary);
    font-size: 0.92rem;
}

/* ─── Alert boxes ───────────────────────────────────────────── */
.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #FCA5A5;
    font-size: 0.88rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.auth-alert i {
    color: #EF4444;
    margin-top: 2px;
    flex-shrink: 0;
}

.auth-success {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #6EE7B7;
    font-size: 0.88rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.auth-success i {
    color: #10B981;
    margin-top: 2px;
    flex-shrink: 0;
}

/* ─── Form Styles ───────────────────────────────────────────── */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.optional {
    font-weight: 400;
    color: var(--text-tertiary);
    font-size: 0.78rem;
}

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    color: var(--text-tertiary);
    font-size: 0.88rem;
    pointer-events: none;
    transition: color var(--duration-fast);
}

.input-wrap input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 13px 14px 13px 42px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.92rem;
    transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
    outline: none;
}

.input-wrap input::placeholder {
    color: var(--text-tertiary);
}

.input-wrap input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.input-wrap input:focus ~ .input-icon,
.input-wrap input:focus + .input-icon {
    color: var(--gold);
}

/* Override for icon being before input */
.input-wrap:has(input:focus) .input-icon {
    color: var(--gold);
}

/* Toggle password button */
.toggle-pw {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    font-size: 0.88rem;
    padding: 4px;
    cursor: pointer;
    transition: color var(--duration-fast);
}

.toggle-pw:hover {
    color: var(--text-secondary);
}

/* Password strength bar */
.pw-strength {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}

.pw-bar {
    flex-grow: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    overflow: hidden;
}

.pw-bar-fill {
    height: 100%;
    width: 0;
    border-radius: 4px;
    transition: width 0.3s, background 0.3s;
}

.pw-label {
    font-size: 0.72rem;
    font-weight: 600;
    min-width: 60px;
    text-align: right;
}

/* Terms checkbox */
.form-terms {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.checkbox-wrap {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    line-height: 1.5;
}

.checkbox-wrap input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    border: 2px solid rgba(212, 175, 55, 0.5);
    border-radius: 4px;
    margin-top: 2px;
    transition: all var(--duration-fast);
    position: relative;
    background: rgba(0, 0, 0, 0.3);
}

.checkbox-wrap:hover .checkmark {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.checkbox-wrap input:checked + .checkmark {
    background: var(--gold);
    border-color: var(--gold);
}

.checkbox-wrap input:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-inverse);
    font-size: 0.7rem;
    font-weight: 700;
}

/* Submit button */
.btn-submit {
    padding: 15px;
    font-size: 1rem;
    margin-top: 4px;
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: wait;
}

.btn-loader {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Auth footer */
.auth-footer {
    text-align: center;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.auth-link {
    color: var(--gold);
    font-weight: 600;
    transition: opacity var(--duration-fast);
}

.auth-link:hover {
    opacity: 0.8;
}

/* ─── Side Panel ────────────────────────────────────────────── */
.auth-side {
    background: linear-gradient(180deg, rgba(212, 175, 55, 0.04) 0%, var(--bg-surface) 50%);
    padding: 48px 40px;
    display: flex;
    align-items: center;
    border-left: 1px solid var(--glass-border);
}

.auth-side-inner h2 {
    font-size: 1.5rem;
    margin-bottom: 32px;
}

.auth-benefits {
    display: flex;
    flex-direction: column;
    gap: 22px;
    margin-bottom: 36px;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.benefit-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    font-size: 0.9rem;
}

.benefit-check {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--emerald);
    font-size: 0.7rem;
    margin-top: 2px;
}

.benefit-item strong {
    display: block;
    font-size: 0.92rem;
    margin-bottom: 2px;
}

.benefit-item p {
    font-size: 0.82rem;
    color: var(--text-tertiary);
    margin: 0;
    line-height: 1.4;
}

/* Stat callout */
.auth-side-stat {
    background: rgba(0, 0, 0, 0.25);
    padding: 24px;
    border-radius: var(--radius-md);
    text-align: center;
    border: 1px solid var(--glass-border);
}

.stat-big {
    display: block;
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 6px;
}

.stat-caption {
    font-size: 0.82rem;
    color: var(--text-tertiary);
}

/* Testimonial mini */
.auth-side-testimonial {
    background: rgba(0, 0, 0, 0.25);
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
}

.auth-side-testimonial p {
    font-style: italic;
    font-size: 0.92rem;
    color: #CBD5E1;
    margin-bottom: 14px;
    line-height: 1.6;
}

.testimonial-mini-author {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.82rem;
    color: var(--text-tertiary);
}

.author-avatar-sm {
    width: 32px;
    height: 32px;
    background: var(--bg-void);
    border: 1.5px solid rgba(212, 175, 55, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.72rem;
    color: var(--gold);
}

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
    .auth-container {
        grid-template-columns: 1fr;
        max-width: 480px;
    }

    .auth-side {
        display: none;
    }

    .auth-card {
        padding: 36px 24px;
        border-radius: var(--radius-xl);
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .auth-page {
        padding: 80px 16px 24px;
    }

    .auth-card {
        padding: 28px 20px;
    }

    .auth-title {
        font-size: 1.3rem;
    }
}
