/* طراحی مدرن و حرفه‌ای */
:root {
  --primary-color: #4361ee;
  --secondary-color: #3f37c9;
  --success-color: #4cc9f0;
  --error-color: #f72585;
  --text-color: #2b2d42;
  --light-gray: #f8f9fa;
  --border-radius: 12px;
  --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* طراحی ریسپانسیو و مدرن */
.credit-form-container {
  max-width: 800px;
  margin: 3rem auto;
  padding: 2.5rem;
  background: #fff;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  font-family: 'Poppins', sans-serif;
  animation: fadeIn 0.6s ease-out;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.credit-form-header {
  text-align: center;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.credit-form-header h2 {
  color: var(--primary-color);
  font-size: 2rem;
  margin-bottom: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.credit-form-header p {
  color: #6c757d;
  font-size: 1.05rem;
  max-width: 80%;
  margin: 0 auto;
  line-height: 1.6;
}

/* استایل‌های بخش‌های فرم */
.form-section {
  margin-bottom: 2.5rem;
  padding: 1.8rem;
  background: var(--light-gray);
  border-radius: var(--border-radius);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.form-section:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
}

.form-section::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
}

.form-section h3 {
  color: var(--primary-color);
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
}

/* استایل‌های فیلدهای فرم */
.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.form-group {
  flex: 1;
  min-width: 250px;
  margin-bottom: 1.5rem;
  position: relative;
}

.form-group label {
  display: block;
  margin-bottom: 0.75rem;
  color: var(--text-color);
  font-weight: 500;
  font-size: 0.95rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.9rem 1.2rem;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  font-size: 1rem;
  transition: var(--transition);
  background: #fff;
  font-family: 'Poppins', sans-serif;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

/* استایل‌های اعتبارسنجی */
#national_code.valid-national-code {
  border-color: #28a745;
  background-color: rgba(40, 167, 69, 0.05);
  padding-right: 2.5rem;
}

#national_code.valid-national-code + .hint::after {
  content: "✓";
  color: #28a745;
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
}

/* استایل دکمه ارسال */
.form-actions {
  text-align: center;
  margin-top: 2rem;
}

.submit-btn {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border: none;
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
  box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(67, 97, 238, 0.4);
}

.submit-btn:active {
  transform: translateY(1px);
}

/* استایل پیام‌ها */
.form-messages {
  margin-top: 2rem;
  padding: 1.2rem 1.5rem;
  border-radius: var(--border-radius);
  display: none;
  animation: fadeIn 0.5s ease-out;
}

.form-messages.success {
  background-color: rgba(40, 167, 69, 0.1);
  color: #155724;
  border: 1px solid rgba(40, 167, 69, 0.3);
  display: block;
}

.form-messages.error {
  background-color: rgba(220, 53, 69, 0.1);
  color: #721c24;
  border: 1px solid rgba(220, 53, 69, 0.3);
  display: block;
}

/* استایل‌های ریسپانسیو */
@media (max-width: 768px) {
  .credit-form-container {
    padding: 1.5rem;
    margin: 1.5rem auto;
  }
  
  .form-row {
    flex-direction: column;
    gap: 0;
  }
  
  .form-group {
    min-width: 100%;
  }
  
  .submit-btn {
    width: 100%;
    justify-content: center;
  }
}

.terms-section {
  margin: 2.5rem 0;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 12px;
  transition: all 0.3s ease;
}

/* گروه چک‌باکس */
.checkbox-group {
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

/* مخفی کردن چک‌باکس پیش‌فرض */
.checkbox-group input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

/* طراحی چک‌باکس سفارشی */
.checkbox-custom {
  position: relative;
  display: inline-block;
  width: 24px;
  height: 24px;
  margin-left: 15px;
  background: #fff;
  border: 2px solid #ddd;
  border-radius: 6px;
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

/* حالت hover */
.checkbox-group:hover .checkbox-custom {
  border-color: #4CAF50;
  transform: scale(1.05);
}

/* حالت انتخاب شده */
.checkbox-group input:checked ~ .checkbox-label .checkbox-custom {
  background-color: #4CAF50;
  border-color: #4CAF50;
  animation: pulse 0.5s ease;
}

/* طراحی تیک */
.checkbox-custom:after {
  content: "";
  position: absolute;
  display: none;
 left: calc(50% - 4px); 
  top: calc(50% - 7px);  
  width: 6px;
  height: 12px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* نمایش تیک هنگام انتخاب */
.checkbox-group input:checked ~ .checkbox-label .checkbox-custom:after {
  display: block;
  animation: checkmark 0.5s cubic-bezier(0.23, 1, 0.32, 1) both;
}

/* استایل متن */
.checkbox-text {
  display: inline-block;
  color: #333;
  font-size: 0.95rem;
  line-height: 1.6;
  text-align: right;
  transition: color 0.3s ease;
}

.checkbox-group:hover .checkbox-text {
  color: #222;
}

.terms-link {
  color: #4361ee;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.terms-link:hover {
  color: #3a56d4;
  text-decoration: underline;
}

/* انیمیشن‌ها */
@keyframes pulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.4); }
  50% { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(76, 175, 80, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
}

@keyframes checkmark {
  from { opacity: 0; transform: rotate(45deg) scale(0); }
  to { opacity: 1; transform: rotate(45deg) scale(1); }
}

/* حالت فعال هنگام کلیک */
.checkbox-group:active .checkbox-custom {
  transform: scale(0.95);
}
/* استایل پیام وضعیت اعتباری */
.credit-status-message {
    max-width: 500px;
    margin: 2rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
    animation: fadeIn 0.5s ease-out;
}

.status-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(67, 97, 238, 0.1);
    border-radius: 50%;
    color: #4361ee;
}

.status-icon svg {
    width: 30px;
    height: 30px;
}

.status-content h3 {
    color: #2b2d42;
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.status-content p {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.status-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #4361ee;
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.status-action:hover {
    background: #3a56d4;
    transform: translateY(-2px);
}

.status-action svg {
    width: 16px;
    height: 16px;
}

@media (max-width: 768px) {
    .credit-status-message {
        padding: 1.5rem;
        margin: 1.5rem auto;
    }
}