/* ===== CREDIT APPLICATION PAGE ===== */

.credit-hero { padding: 16px 0 32px; text-align: center; }
.credit-hero h1 { font-size: 42px; font-weight: 600; line-height: 52px; color: var(--main); margin-bottom: 8px; }
.credit-hero p { font-size: 16px; line-height: 24px; color: var(--grey-9); max-width: 400px; margin: 0 auto; }

/* Step Indicator */
.credit-steps-indicator { display: flex; align-items: center; justify-content: center; gap: 0; margin-top: 24px; }
.step-dot { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--grey-2); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; color: var(--grey-5); background: var(--white); transition: all 0.3s; }
.step-dot.active { background: var(--main); border-color: var(--main); color: var(--white); }
.step-dot.completed { background: var(--main); border-color: var(--main); color: var(--white); }
.step-line { width: 40px; height: 2px; background: var(--grey-2); }
.step-line.active { background: var(--main); }

.credit-form-section { padding: 24px 0 60px; }
.credit-form-card { border: 1px solid var(--grey-2); border-radius: 24px; padding: 24px 20px; }
.credit-form { display: flex; flex-direction: column; gap: 16px; position: relative; }
.credit-step { display: flex; flex-direction: column; gap: 16px; }
.credit-step-title { font-size: 22px; font-weight: 600; color: var(--main); margin-bottom: 8px; }
.credit-row { display: flex; flex-direction: column; gap: 16px; }
.credit-field { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.credit-field label, .credit-upload-group > label, .credit-radio-group > label { font-size: 16px; font-weight: 400; line-height: 24px; color: #40454d; }
.credit-input { display: flex; align-items: center; gap: 8px; height: 50px; padding: 0 16px; border: 1px solid var(--grey-2); border-radius: 24px; background: var(--white); box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05); }
.credit-input svg { flex-shrink: 0; }
.credit-input input, .credit-input select { flex: 1; border: none; outline: none; font-family: 'Poppins', sans-serif; font-size: 16px; line-height: 24px; color: var(--main); background: transparent; -webkit-appearance: none; -moz-appearance: none; appearance: none; }
.credit-input input::placeholder { color: var(--grey-5); }
.credit-input select { color: var(--grey-5); cursor: pointer; }
.credit-input select option:not([disabled]) { color: var(--main); }
.credit-select-wrap { position: relative; }
.credit-select-chevron { flex-shrink: 0; pointer-events: none; }
.credit-input-error { border-color: #c0392b !important; }
.credit-field-error { font-size: 13px; color: #c0392b; margin-top: 2px; }

/* Conditional Fields */
.credit-conditional { display: flex; flex-direction: column; gap: 16px; }

/* File Upload */
.credit-upload-group { display: flex; flex-direction: column; gap: 8px; }
.credit-upload-area { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; border: 1px dashed var(--grey-3); border-radius: 16px; background: var(--white); cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.credit-upload-area.drag-over { border-color: var(--main); background: #f6f7f9; }
.credit-upload-area .credit-file-input { display: none; }
.upload-text { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.upload-text-row { display: flex; align-items: center; gap: 8px; font-size: 16px; line-height: 24px; color: var(--grey-9); }
.upload-browse { font-size: 16px; color: var(--main); text-decoration: underline; cursor: pointer; border: none; background: none; font-family: 'Poppins', sans-serif; padding: 0; }
.upload-hint { font-size: 16px; line-height: 24px; color: var(--grey-4); text-align: center; }
.upload-file-list { display: flex; flex-direction: column; gap: 4px; width: 100%; }
.upload-file-item { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--main); padding: 4px 8px; background: #f6f7f9; border-radius: 8px; }

/* Radio Groups */
.credit-radio-group { display: flex; flex-direction: column; gap: 8px; }
.credit-radio-options { display: flex; flex-direction: column; gap: 12px; }
.credit-radio-label { display: flex; align-items: center; gap: 8px; font-size: 16px; line-height: 24px; color: var(--grey-9); cursor: pointer; }
.credit-radio-label input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.radio-dot { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--grey-2); flex-shrink: 0; position: relative; }
.credit-radio-label input[type="radio"]:checked + .radio-dot { border-color: var(--main); }
.credit-radio-label input[type="radio"]:checked + .radio-dot::after { content: ''; position: absolute; top: 4px; left: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--main); }

/* Legal & Signature */
.credit-legal-block { border: 1px solid var(--grey-2); border-radius: 16px; padding: 24px; }
.credit-legal-block h3 { font-size: 18px; font-weight: 700; line-height: 28px; color: var(--main); margin-bottom: 12px; text-transform: uppercase; }
.credit-legal-block p { font-size: 14px; line-height: 22px; color: var(--grey-9); }
.credit-signature-block { display: flex; flex-direction: column; gap: 8px; }
.credit-signature-block > label { font-size: 16px; font-weight: 400; line-height: 24px; color: #40454d; }
.credit-signature-pad-wrap { display: inline-block; max-width: max-content;}
.credit-signature-canvas { border: 1px solid var(--grey-2); border-radius: 12px; background: #fafbfc; cursor: crosshair; max-width: 100%; touch-action: none; display: block; }
.credit-signature-clear { display: inline-flex; align-items: center; margin-top: 8px; background: var(--white); border: 1px solid var(--grey-2); border-radius: 8px; padding: 6px 20px; font-family: 'Poppins', sans-serif; font-size: 14px; color: var(--grey-9); cursor: pointer; max-width: max-content;}
.credit-signature-clear:hover { border-color: var(--main); color: var(--main); }

/* Checkbox */
.credit-terms-check { padding-top: 8px; }
.credit-checkbox-label { display: flex; align-items: flex-start; gap: 12px; font-size: 16px; line-height: 24px; color: var(--grey-9); cursor: pointer; position: relative; }
.credit-checkbox-label input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }
.credit-checkmark { width: 22px; height: 22px; border: 1px solid var(--grey-2); border-radius: 4px; flex-shrink: 0; position: relative; margin-top: 1px; }
.credit-checkbox-label input:checked + .credit-checkmark { background: var(--main); border-color: var(--main); }
.credit-checkbox-label input:checked + .credit-checkmark::after { content: ''; position: absolute; left: 7px; top: 3px; width: 6px; height: 11px; border: solid white; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.credit-checkbox-label a { color: var(--main); text-decoration: underline; }
.required { color: #c0392b; font-weight: 600; }

/* Status Messages */
.credit-form-section .form-status { padding: 12px 16px; border-radius: 12px; font-size: 14px; line-height: 22px; }
.credit-form-section .form-status-success { background: #edf7ee; color: #1a7c2b; border: 1px solid #b8e6be; }
.credit-form-section .form-status-error { background: #fef2f2; color: #c0392b; border: 1px solid #f5c6cb; }

/* Navigation */
.credit-submit-wrap { display: flex; justify-content: space-between; align-items: center; padding-top: 16px; gap: 16px; }
.credit-next-btn, .credit-submit-btn { display: flex; align-items: center; justify-content: space-between; height: 50px; padding: 0 16px; background: var(--main); color: var(--white); border: none; border-radius: 32px; font-family: 'Poppins', sans-serif; font-size: 16px; cursor: pointer; min-width: 140px; margin-left: auto; }
.credit-next-btn .btn-icon-right { background: var(--white); border-radius: 36px; padding: 8px; display: flex; align-items: center; }
.credit-submit-btn { background: #00a32a; justify-content: center; min-width: 190px; }
.credit-submit-btn:disabled { opacity: 0.6; cursor: default; }
.credit-back-btn { display: flex; align-items: center; justify-content: center; height: 50px; padding: 0 24px; background: var(--grey-1); color: var(--main); border: none; border-radius: 32px; font-family: 'Poppins', sans-serif; font-size: 16px; cursor: pointer; min-width: 140px; }

/* ===== DESKTOP ===== */
@media (min-width: 1024px) {
  .credit-hero { padding: 24px 0 40px; }
  .credit-hero h1 { font-size: 64px; line-height: 76px; }
  .credit-hero p { font-size: 18px; line-height: 28px; max-width: 600px; }
  .credit-steps-indicator { margin-top: 32px; }
  .step-dot { width: 44px; height: 44px; font-size: 16px; }
  .step-line { width: 60px; }
  .credit-form-section { padding: 28px 0 84px; }
  .credit-form-card { padding: 32px; }
  .credit-form { gap: 24px; }
  .credit-step { gap: 24px; }
  .credit-step-title { font-size: 26px; }
  .credit-row { flex-direction: row; gap: 24px; }
  .credit-input { height: 58px; }
  .credit-conditional { gap: 24px; }
  .credit-submit-wrap { padding-top: 8px; }
  .credit-next-btn, .credit-submit-btn { width: 190px; height: 58px; padding: 0 20px; }
  .credit-back-btn { height: 58px; min-width: 190px; }
}