/* استایل حرفه‌ای صفحه لاگین باشگاه مشتریان */

:root {
    --edc-primary: #667eea;
    --edc-primary-dark: #5a67d8;
    --edc-secondary: #764ba2;
    --edc-success: #48bb78;
    --edc-danger: #f56565;
    --edc-warning: #ed8936;
    --edc-gray: #edf2f7;
    --edc-dark: #2d3748;
    --edc-border: #e2e8f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.edc-crm-user-container {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--edc-primary) 0%, var(--edc-secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: 'IRANSans', 'Vazir', 'Tahoma', sans-serif;
}

.edc-crm-user-card {
    background: white;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 550px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.edc-crm-user-header {
    background: linear-gradient(135deg, var(--edc-primary) 0%, var(--edc-secondary) 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

.edc-crm-user-header h2 {
    font-size: 28px;
    margin-bottom: 8px;
    font-weight: 600;
}

.edc-crm-user-header p {
    font-size: 14px;
    opacity: 0.9;
}

/* استپ‌ها */
.edc-crm-user-steps {
    display: flex;
    padding: 20px 30px;
    background: var(--edc-gray);
    border-bottom: 1px solid var(--edc-border);
}

.edc-crm-user-steps .step {
    flex: 1;
    text-align: center;
    font-size: 12px;
    color: #a0aec0;
    position: relative;
    font-weight: 500;
}

.edc-crm-user-steps .step.active {
    color: var(--edc-primary);
}

.edc-crm-user-steps .step.active:not(:last-child):after {
    background: var(--edc-primary);
}

.edc-crm-user-steps .step:not(:last-child):after {
    content: '';
    position: absolute;
    top: 50%;
    right: -50%;
    width: 100%;
    height: 2px;
    background: #cbd5e0;
    transform: translateY(-50%);
}

/* محتوای استپ‌ها */
.step-content {
    padding: 30px;
    display: none;
}

.step-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* فرم گروه */
.edc-crm-form-group {
    margin-bottom: 20px;
}

.edc-crm-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--edc-dark);
    font-size: 14px;
}

.edc-crm-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--edc-border);
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: inherit;
    direction: rtl;
}

.edc-crm-input:focus {
    outline: none;
    border-color: var(--edc-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.edc-crm-input[dir="ltr"] {
    direction: ltr;
    text-align: left;
}

.form-hint {
    display: block;
    font-size: 12px;
    color: #a0aec0;
    margin-top: 5px;
}

/* چک باکس‌ها - استایل درست */
.edc-crm-form-group.checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
}

.edc-crm-form-group.checkbox label {
    margin-bottom: 0;
    font-weight: normal;
    cursor: pointer;
}

.edc-crm-form-group.checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--edc-primary);
}

/* دکمه‌ها */
.edc-crm-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.edc-crm-btn-primary {
    background: linear-gradient(135deg, var(--edc-primary) 0%, var(--edc-secondary) 100%);
    color: white;
    width: 100%;
}

.edc-crm-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(102, 126, 234, 0.4);
}

.edc-crm-btn-link {
    background: none;
    color: var(--edc-primary);
    width: auto;
    margin-top: 10px;
}

.edc-crm-btn-link:hover {
    text-decoration: underline;
}

/* فیلدهای داینامیک */
.dynamic-fields-wrapper {
    margin: 20px 0;
    padding: 20px;
    background: #f7fafc;
    border-radius: 16px;
    border: 1px solid var(--edc-border);
}

.dynamic-field {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px dashed var(--edc-border);
}

.dynamic-field:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.dynamic-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--edc-dark);
}

.dynamic-field .required {
    color: var(--edc-danger);
    margin-right: 4px;
}

/* ردیف تنظیمات فیلد (الزامی و نمایش در ثبت نام) */
.dynamic-field-settings {
    display: flex;
    gap: 20px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--edc-border);
}

.dynamic-field-settings .setting-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #718096;
}

.dynamic-field-settings .setting-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--edc-primary);
}

.dynamic-field-settings .setting-item label {
    margin: 0;
    font-weight: normal;
    font-size: 12px;
    cursor: pointer;
}

/* ورودی‌های فیلد داینامیک */
.dynamic-field input,
.dynamic-field select,
.dynamic-field textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--edc-border);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
}

.dynamic-field textarea {
    resize: vertical;
    min-height: 80px;
}

.dynamic-field input:focus,
.dynamic-field select:focus,
.dynamic-field textarea:focus {
    outline: none;
    border-color: var(--edc-primary);
}

/* فیلدهای استان و شهر */
.location-fields {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.location-fields select {
    flex: 1;
    min-width: 120px;
}

/* پیام‌ها */
.edc-crm-message {
    padding: 15px 20px;
    border-radius: 12px;
    margin: 20px 30px;
    display: none;
    animation: fadeIn 0.3s ease;
}

.edc-crm-message.success {
    background: #c6f6d5;
    color: #22543d;
    border-right: 4px solid var(--edc-success);
}

.edc-crm-message.error {
    background: #fed7d7;
    color: #742a2a;
    border-right: 4px solid var(--edc-danger);
}

.edc-crm-message.loading {
    background: #e2e8f0;
    color: var(--edc-dark);
}

/* اسپینر لودینگ */
.edc-crm-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--edc-border);
    border-top-color: var(--edc-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ریسپانسیو */
@media (max-width: 576px) {
    .edc-crm-user-card {
        border-radius: 16px;
    }
    
    .edc-crm-user-header {
        padding: 30px 20px;
    }
    
    .step-content {
        padding: 20px;
    }
    
    .edc-crm-user-steps {
        padding: 15px 20px;
    }
    
    .edc-crm-user-steps .step {
        font-size: 10px;
    }
    
    .dynamic-field-settings {
        flex-direction: column;
        gap: 8px;
    }
    
    .location-fields {
        flex-direction: column;
    }
}