/* static/css/auth.css */

/* کانتینر اصلی */
.auth-container {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--card-border);
    padding: 2.5rem;
    max-width: 450px;
    width: 100%;
    box-shadow: var(--shadow);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h2 {
    color: var(--primary-light);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

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

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input {
    padding: 0.9rem 1rem;
    border: 2px solid var(--card-border);
    border-radius: 0.75rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: 0.3s;
    font-family: var(--font);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}

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

.auth-btn {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: #fff;
    border: none;
    padding: 0.9rem;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    font-family: var(--font);
}

.auth-btn:hover {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    transform: translateY(-2px);
}

.auth-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.timer-text {
    text-align: center;
    color: var(--accent-light);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--secondary);
    color: var(--secondary);
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    text-align: center;
}

.success-message {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--accent);
    color: var(--accent-light);
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    text-align: center;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--card-border);
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* کد ورودی (OTP) - ۵ کاراکتر جداگانه */
.otp-container {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    direction: ltr;
}

.otp-input {
    width: 55px;
    height: 65px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    background: var(--bg-primary);
    border: 2px solid var(--card-border);
    border-radius: 0.75rem;
    color: var(--text-primary);
    transition: 0.3s;
}

.otp-input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}

/* پروفایل کاربر */
.profile-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 2rem;
    border: 1px solid var(--card-border);
    margin-bottom: 2rem;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
}

.profile-info h3 {
    color: var(--text-primary);
    font-size: 1.3rem;
    margin-bottom: 0.25rem;
}

.profile-info p {
    color: var(--text-secondary);
}

.logout-btn {
    background: rgba(239, 68, 68, 0.2);
    color: var(--secondary);
    border: 1px solid var(--secondary);
    padding: 0.6rem 1.2rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: 0.3s;
    font-weight: 500;
}

.logout-btn:hover {
    background: var(--secondary);
    color: #fff;
}

.profile-orders {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 1rem;
}

.order-table-wrapper {
    overflow-x: auto;
}

.order-table {
    width: 100%;
    border-collapse: collapse;
}

.order-table thead tr {
    border-bottom: 2px solid var(--card-border);
}

.order-table tbody tr:not(:last-child) {
    border-bottom: 1px solid var(--card-border);
}

.qty-btn {
    background: var(--bg-primary);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: 0.2s;
}

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

.order-quantity-display {
    display: inline-block;
    min-width: 24px;
    text-align: center;
    font-weight: 600;
}

.order-table th,
.order-table td {
    text-align: right;
    padding: 0.8rem 0.6rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.order-table th {
    color: var(--text-primary);
    font-weight: 600;
}

@media (max-width: 640px) {
    .profile-container {
        max-width: 100%;
        padding: 1rem;
    }

    .profile-header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        text-align: center;
    }

    .profile-avatar {
        width: 60px;
        height: 60px;
        font-size: 1.6rem;
    }

    .profile-info h3 {
        font-size: 1.1rem;
    }

    .logout-btn {
        padding: 0.5rem 1rem;
        font-size: 0.95rem;
    }

    .profile-orders {
        padding: 0.75rem;
    }

    .profile-orders h3 {
        font-size: 1.05rem;
        margin-bottom: 0.75rem;
    }

    .order-table th,
    .order-table td {
        padding: 0.65rem 0.45rem;
        font-size: 0.88rem;
    }
}