/* ===== AUTH PAGE ===== */
@import url(./font.css);

:root {
    --primary: #ec4899;
    --primary-dark: #db2777;
    --dark: #1f2937;
    --gray-light: #f3f4f6;
}

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

html, body {
    height: 100%;
    font-family: 'YekanBakh', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    direction: rtl;
}

/* Main Layout */
.auth-main {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Brand Section */
.auth-brand {
    display: none;
    width: 40%;
    background: linear-gradient(135deg, #ec4899 0%, #f472b6 50%, #ec4899 100%);
    color: white;
    padding: 4rem 2rem;
    overflow-y: auto;
}

@media (min-width: 1024px) {
    .auth-brand {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

.auth-brand-content {
    text-align: center;
    max-width: 400px;
}

.auth-logo {
    width: 120px;
    height: auto;
    margin: 0 auto 1rem;
    filter: brightness(0) invert(1);
}

.auth-features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 3rem;
    text-align: right;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
}

.auth-feature i {
    font-size: 1.25rem;
}

/* Form Container */
.auth-form-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    overflow-y: auto;
}

@media (min-width: 640px) {
    .auth-form-container {
        padding: 3rem 2rem;
    }
}

/* Tabs */
.auth-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--gray-light);
}

.auth-tab {
    flex: 1;
    padding: 1rem;
    border: none;
    background: none;
    cursor: pointer;
    color: #9ca3af;
    font-weight: 600;
    font-size: 1rem;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.auth-tab:hover {
    color: var(--primary);
}

.auth-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Forms */
.auth-form {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

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

/* Form Group */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="password"],
.form-group input[type="email"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--gray-light);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.input-wrapper input[type="password"] {
    padding-left: 2.8rem;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 23, 68, 0.1);
}

.form-hint {
    display: block;
    color: #9ca3af;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* Input Group (Phone) */
.input-group {
    display: flex;
    gap: 0.75rem;
}

.input-group input {
    flex: 1;
}

.country-code {
    flex: 0 0 auto;
    width: 100px;
    padding: 0.75rem 0.5rem;
    border: 1.5px solid var(--gray-light);
    border-radius: 10px;
    background: white;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
}

.country-code:focus {
    outline: none;
    border-color: var(--primary);
}

.input-group input {
    flex: 1;
}

/* Input Wrapper (Password) */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
}

.toggle-password {
    position: absolute;
    left: 1rem;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 1.1rem;
    transition: color 0.2s ease;
}

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

/* Checkbox */
.checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
    color: var(--dark);
    font-weight: 500;
}

.checkbox input {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary);
}

/* User Type Selection */
.user-type-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.user-type-section {
    display: grid;
    gap: 0.75rem;
}

.section-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.user-type-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.user-type-card {
    position: relative;
    cursor: pointer;
}

.user-type-card input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.card-content {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-light);
    border-radius: 10px;
    text-align: right;
    transition: all 0.3s ease;
    background: white;
}

.card-content i {
    font-size: 1.25rem;
    color: #9ca3af;
    transition: color 0.3s ease;
    flex-shrink: 0;
}

.card-content span {
    font-weight: 600;
    color: var(--dark);
    font-size: 0.85rem;
}

.user-type-card input:checked + .card-content {
    border-color: var(--primary);
    background: rgba(255, 23, 68, 0.05);
    box-shadow: 0 0 0 3px rgba(255, 23, 68, 0.1);
}

.user-type-card input:checked + .card-content i {
    color: var(--primary);
}

.user-type-card input:checked + .card-content span {
    color: var(--primary);
}

/* Gender Options */
.gender-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.gender-option {
    position: relative;
    cursor: pointer;
}

.gender-option input {
    position: absolute;
    opacity: 0;
}

.gender-option span {
    display: block;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-light);
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    color: var(--dark);
    transition: all 0.3s ease;
    background: white;
}

.gender-option input:checked + span {
    border-color: var(--primary);
    background: rgba(255, 23, 68, 0.05);
    color: var(--primary);
}

/* Buttons */
.btn-primary {
    padding: 0.9rem 1.5rem;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #ec4899, #f472b6);
    color: white;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    box-shadow: 0 10px 32px rgba(255, 23, 68, 0.3);
    transform: translateY(-2px);
}

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

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

/* Redirect */
.auth-redirect {
    text-align: center;
    color: #9ca3af;
    margin-top: 1.5rem;
}

.auth-redirect a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    margin-right: 0.5rem;
}

.auth-redirect a:hover {
    text-decoration: underline;
}

/* ===== VERIFY OTP PAGE ===== */
.verify-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.1) 0%, rgba(219, 39, 119, 0.05) 100%);
}

.verify-card {
    background: white;
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 20px 64px rgba(0, 0, 0, 0.1);
}

.verify-header {
    background: linear-gradient(135deg, #ec4899, #f472b6);
    color: white;
    padding: 2rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    direction: rtl;
}

.back-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.verify-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.verify-content {
    padding: 2rem 1.5rem;
    text-align: center;
    direction: rtl;
}

.verify-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 23, 68, 0.1);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--primary);
    margin: 0 auto 1.5rem;
}

.verify-description {
    color: #6b7280;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    direction: rtl;
}

/* OTP Input */
.otp-input-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
    justify-content: center;
    direction: ltr;
}

.otp-input-group .otp-input {
    flex: 0 0 auto;
}

.otp-input-group button[type="submit"] {
    flex: 0 0 100%;
    margin-top: 1rem;
}

.otp-input {
    width: 50px;
    height: 60px;
    border: 2px solid var(--gray-light);
    border-radius: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    color: var(--dark);
    transition: all 0.3s ease;
    background: #f9fafb;
    direction: ltr;
}

.otp-input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 23, 68, 0.1);
    transform: scale(1.05);
}

@media (max-width: 500px) {
    .otp-input {
        width: 40px;
        height: 50px;
        font-size: 1.25rem;
    }

    .otp-input-group {
        gap: 0.5rem;
    }
}

/* Timer */
.verify-timer {
    background: #f9fafb;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    text-align: center;
    direction: rtl;
}

.verify-timer span {
    color: #6b7280;
    font-size: 0.95rem;
    display: block;
    margin-bottom: 0.75rem;
}

.verify-timer span strong {
    color: var(--primary);
    font-weight: 700;
}

.resend-btn {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.resend-btn:hover:not(:disabled) {
    background: rgba(255, 23, 68, 0.1);
}

.resend-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    color: #9ca3af;
}

/* Error Message */
.error-message {
    background: #fee2e2;
    color: #991b1b;
    padding: 1rem;
    border-radius: 10px;
    margin-top: 1rem;
    font-weight: 600;
    border-left: 4px solid #dc2626;
}

/* Verify Footer */
.verify-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--gray-light);
    text-align: center;
    color: #6b7280;
    font-size: 0.95rem;
    direction: rtl;
}

.verify-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .user-type-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 0.7rem;
    }

    .user-type-options {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .card-content {
        flex-direction: column;
        padding: 0.6rem 0.7rem;
        gap: 0.4rem;
    }

    .card-content i {
        font-size: 1rem;
        margin-bottom: 0;
    }

    .card-content span {
        font-size: 0.75rem;
    }
}

@media (max-width: 640px) {
    .auth-form-container {
        padding: 1.5rem 1rem;
    }

    .auth-tabs {
        margin-bottom: 1.5rem;
    }

    .auth-tab {
        font-size: 0.9rem;
        padding: 0.75rem;
    }

    .form-group {
        margin-bottom: 1.25rem;
    }

    .user-type-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .section-title {
        display: none;
    }

    .user-type-options {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.4rem;
    }

    .card-content {
        flex-direction: column;
        padding: 0.5rem 0.6rem;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .card-content i {
        font-size: 0.9rem;
    }

    .card-content span {
        font-size: 0.65rem;
    }

    .verify-card {
        margin: 0 1rem;
    }

    .verify-content {
        padding: 1.5rem 1rem;
    }
}

/* Seller Auth Link */
.seller-auth-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #ec4899, #be185d);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
    text-align: center;
    justify-content: center;
}

.seller-auth-link:hover {
    box-shadow: 0 10px 32px rgba(236, 72, 153, 0.3);
    transform: translateY(-2px);
}

/* Loading Animation */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-right-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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