/* ===== Auth Pages - Premium Light Theme ===== */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --white: #ffffff;
    --bg-page: #f8f9fc;
    --bg-card: #ffffff;
    --border: #e8ecf0;
    --border-light: #f0f3f6;
    --border-focus: rgba(108,92,231,0.4);
    --text-dark: #0f172a;
    --text-body: #334155;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-dim: #b0bec5;
    --primary: #6c5ce7;
    --primary-hover: #5a4bd1;
    --primary-light: rgba(108,92,231,0.06);
    --accent: #e84393;
    --gradient: linear-gradient(135deg, #6c5ce7 0%, #e84393 100%);
    --gradient-soft: linear-gradient(135deg, #f0edff 0%, #ffeef8 100%);
    --success: #00b894;
    --error: #e74c3c;
    --warning: #f39c12;
    --radius: 16px;
    --radius-sm: 12px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.08);
    --font: 'Vazirmatn', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body.auth-page {
    font-family: var(--font);
    background: var(--bg-page);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    direction: rtl;
    color: var(--text-body);
    position: relative;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Background Effects */
body.auth-page::before {
    content: '';
    position: fixed;
    top: -200px;
    right: -200px;
    width: 500px;
    height: 500px;
    background: rgba(108,92,231,0.04);
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}

body.auth-page::after {
    content: '';
    position: fixed;
    bottom: -200px;
    left: -100px;
    width: 400px;
    height: 400px;
    background: rgba(232,67,147,0.03);
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}

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

.auth-card {
    background: var(--white);
    border-radius: 20px;
    padding: 40px 32px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    position: relative;
}

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

.auth-logo h1 {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

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

.auth-step {
    display: none;
    animation: fadeIn 0.3s ease;
}

.auth-step.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-step h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.auth-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* Form Elements */
.form-group {
    position: relative;
    margin-bottom: 16px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    padding-left: 44px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.95rem;
    color: var(--text-dark);
    background: var(--bg-page);
    transition: var(--transition);
    outline: none;
}

.form-input:focus {
    border-color: var(--border-focus);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(108,92,231,0.08);
}

.form-input::placeholder {
    color: var(--text-dim);
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    transition: var(--transition);
}

.form-input:focus ~ .input-icon {
    color: var(--primary);
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 14px;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 8px;
    box-shadow: 0 4px 12px rgba(108,92,231,0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108,92,231,0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    width: 100%;
    padding: 14px;
    background: var(--bg-page);
    color: var(--text-body);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary);
    font-family: var(--font);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 8px;
    transition: var(--transition);
    font-weight: 600;
}

.btn-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
}

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

.auth-divider span {
    padding: 0 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* OTP Inputs */
.otp-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
    direction: ltr;
}

.otp-input {
    width: 52px;
    height: 56px;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    color: var(--text-dark);
    background: var(--bg-page);
    transition: var(--transition);
    outline: none;
}

.otp-input:focus {
    border-color: var(--border-focus);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(108,92,231,0.08);
}

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

/* Timer */
.otp-timer {
    text-align: center;
    margin-top: 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Auth Links */
.auth-links {
    text-align: center;
    margin-top: 20px;
}

.auth-links a {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
}

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

/* Messages */
.auth-message {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

.auth-message.success {
    background: rgba(0,184,148,0.06);
    color: #00a67d;
    border: 1px solid rgba(0,184,148,0.15);
}

.auth-message.error {
    background: rgba(231,76,60,0.06);
    color: #c0392b;
    border: 1px solid rgba(231,76,60,0.15);
}

/* Loading */
.auth-loading {
    text-align: center;
    padding: 40px 0;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 12px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.auth-loading p {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 480px) {
    .auth-card {
        padding: 28px 20px;
        border-radius: 16px;
    }
    .otp-input {
        width: 44px;
        height: 48px;
        font-size: 1.2rem;
    }
}
