/* ===== Auth Pages CSS ===== */

.auth-body {
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg-primary);
    background-image: 
        radial-gradient(ellipse at 20% 50%, rgba(99,102,241,0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(139,92,246,0.06) 0%, transparent 50%);
}

.auth-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.auth-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 32px 28px;
    box-shadow: var(--shadow-lg);
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
    justify-content: center;
}

.auth-logo-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--accent-primary), #8b5cf6);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: white;
    box-shadow: 0 8px 24px rgba(99,102,241,0.3);
    flex-shrink: 0;
}

.auth-logo-text h1 {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 2px;
}

.auth-logo-text p {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

.auth-tabs {
    display: flex;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 4px;
    margin-bottom: 24px;
}

.auth-tab {
    flex: 1;
    padding: 8px;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    font-weight: 500;
    font-family: var(--font-family);
    cursor: pointer;
    transition: var(--transition);
}

.auth-tab.active {
    background: var(--bg-secondary);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.auth-form { }

.auth-step { }
.auth-step.hidden { display: none; }

.phone-input-wrapper {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
}

.phone-input-wrapper:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.phone-prefix {
    padding: 10px 12px;
    background: var(--bg-tertiary);
    border-left: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    font-family: monospace;
    flex-shrink: 0;
}

.phone-input {
    flex: 1;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 10px 12px;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    color: var(--text-muted);
    font-size: var(--font-size-xs);
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.otp-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
}

.back-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
    font-size: 14px;
}

.back-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.otp-title {
    font-size: var(--font-size-md);
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 4px;
}

.otp-subtitle {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

.otp-inputs {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
    direction: ltr;
}

.otp-input {
    width: 46px;
    height: 52px;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-white);
    transition: var(--transition);
    font-family: monospace;
}

.otp-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.otp-input.filled {
    border-color: var(--accent-primary);
    background: var(--accent-light);
}

.otp-resend {
    text-align: center;
    margin-top: 14px;
}

.otp-timer {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

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

.password-input-wrapper .form-input {
    padding-left: 40px;
}

.toggle-password {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
}

.toggle-password:hover {
    color: var(--text-primary);
}

.welcome-bonus {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(16,185,129,0.1);
    border: 1px solid rgba(16,185,129,0.3);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    margin-bottom: 16px;
    font-size: var(--font-size-sm);
    color: var(--accent-green);
}

.welcome-bonus i { font-size: 16px; }

.auth-terms {
    text-align: center;
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    margin-top: 14px;
}

.auth-terms a {
    color: var(--accent-primary);
    text-decoration: underline;
}

@media (max-width: 480px) {
    .auth-card {
        padding: 24px 18px;
    }
    
    .otp-input {
        width: 40px;
        height: 46px;
        font-size: 18px;
    }
    
    .otp-inputs { gap: 6px; }
}
