﻿/* ============================================================
   Auth Pages Styles - Mobile First
   ============================================================ */

.auth-body {
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    position: relative;
}

/* ====== Animated Background ====== */
.auth-background {
    position: fixed;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.5;
    animation: float 20s infinite ease-in-out;
}

.bg-shape-1 {
    width: 300px;
    height: 300px;
    background: #10b981;
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.bg-shape-2 {
    width: 400px;
    height: 400px;
    background: #f59e0b;
    bottom: -150px;
    left: -150px;
    animation-delay: 5s;
}

.bg-shape-3 {
    width: 250px;
    height: 250px;
    background: #ec4899;
    top: 50%;
    left: 50%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-30px, 30px) scale(0.9);
    }
}

/* ====== Main Container ====== */
.auth-main {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-container {
    width: 100%;
    max-width: 420px;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ====== Auth Card ====== */
.auth-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 32px 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: scaleIn 0.4s ease-out;
}

.auth-card-wide {
    max-width: 520px;
}

@keyframes scaleIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ====== Auth Header ====== */
.auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.auth-logo {
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
    animation: pulse 2s infinite;
}

    .auth-logo.success {
        background: linear-gradient(135deg, #10b981 0%, #047857 100%);
    }

.auth-header h1 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 8px;
}

.auth-header p {
    color: #6b7280;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.6;
}

    .auth-header p strong {
        color: #1f2937;
        direction: ltr;
        display: inline-block;
    }

/* ====== Form ====== */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-label {
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
    margin-bottom: 6px;
}

/* ====== Phone Input ====== */
.phone-input-wrapper {
    display: flex;
    align-items: center;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
}

    .phone-input-wrapper:focus-within {
        border-color: #10b981;
        box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
    }

.phone-prefix {
    padding: 14px 16px;
    background: #f9fafb;
    color: #6b7280;
    font-weight: 600;
    border-right: 2px solid #e5e7eb;
    font-size: 0.95rem;
    user-select: none;
}

.phone-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 14px 16px;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    direction: ltr;
    text-align: left;
    background: transparent;
    font-family: inherit;
}

    .phone-input::placeholder {
        font-weight: 400;
        color: #9ca3af;
        letter-spacing: 0;
    }

/* ====== OTP Inputs ====== */
.otp-inputs {
    display: flex;
    gap: 8px;
    justify-content: center;
    direction: ltr;
    margin: 12px 0;
}

.otp-input {
    width: 48px;
    height: 56px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    background: white;
    transition: all 0.2s ease;
    outline: none;
    font-family: inherit;
}

    .otp-input:focus {
        border-color: #10b981;
        box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
        transform: scale(1.05);
    }

    .otp-input.filled {
        background: #f0fdf4;
        border-color: #10b981;
    }

/* ====== Timer ====== */
.timer-display {
    text-align: center;
    color: #6b7280;
    font-size: 0.9rem;
    padding: 10px;
    background: #f9fafb;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
}

    .timer-display i {
        color: #f59e0b;
    }

#timer {
    color: #1f2937;
    font-weight: 800;
    min-width: 30px;
}

/* ====== Buttons ====== */
.btn-primary-shop {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 14px;
    padding: 16px 24px;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
    min-height: 54px;
}

    .btn-primary-shop:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
    }

    .btn-primary-shop:active:not(:disabled) {
        transform: translateY(0);
    }

    .btn-primary-shop:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        background: #9ca3af;
        box-shadow: none;
    }

.btn-link-shop {
    background: none;
    border: none;
    color: #10b981;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    padding: 10px;
    font-family: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

    .btn-link-shop:hover:not(:disabled) {
        color: #059669;
        text-decoration: underline;
    }

    .btn-link-shop:disabled {
        color: #9ca3af;
        cursor: not-allowed;
        text-decoration: none;
    }

/* ====== Form Controls ====== */
.form-control {
    border-radius: 14px;
    border: 2px solid #e5e7eb;
    padding: 14px 16px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
    min-height: 54px;
}

    .form-control:focus {
        border-color: #10b981;
        box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
        outline: none;
    }

/* ====== Auth Footer ====== */
.auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f3f4f6;
}

    .auth-footer a {
        text-decoration: none;
        font-weight: 600;
    }

        .auth-footer a:hover {
            color: #10b981 !important;
        }

/* ====== Alerts ====== */
.alert {
    border-radius: 12px;
    border: none;
    padding: 14px 16px;
    font-size: 0.9rem;
    font-weight: 500;
}

.alert-danger {
    background: #fef2f2;
    color: #991b1b;
}

/* ====== Responsive ====== */
@media (max-width: 480px) {
    .auth-main {
        padding: 16px;
    }

    .auth-card {
        padding: 24px 20px;
        border-radius: 20px;
    }

    .auth-logo {
        width: 64px;
        height: 64px;
        font-size: 1.5rem;
    }

    .auth-header h1 {
        font-size: 1.3rem;
    }

    .otp-input {
        width: 42px;
        height: 52px;
        font-size: 1.3rem;
    }

    .otp-inputs {
        gap: 6px;
    }

    .phone-input,
    .form-control {
        font-size: 16px; /* جلوگیری از Zoom در iOS */
    }
}

/* ====== Landscape ====== */
@media (max-height: 600px) and (orientation: landscape) {
    .auth-main {
        align-items: flex-start;
        padding-top: 20px;
    }
}
