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

body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  background: #eff3f8;
  color: #333;
  line-height: 1.5;
  min-height: 100vh;
  font-size: 14px;
}

.container {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 16px 40px;
}

/* ── Header ── */
header {
  background: #0d2137;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-logo {
  width: 180px;
  height: 50px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.header-logo img {
  height: 50px;
  width: auto;
}

.header-logo-text {
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  color: #0d2137;
  line-height: 1;
}

.header-logo-sub {
  font-size: 5.5px;
  font-weight: 600;
  color: #0d2137;
  letter-spacing: 0.4px;
  text-align: center;
  line-height: 1.2;
  text-transform: uppercase;
}

.header-titles {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.header-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.header-subtitle {
  font-size: 11px;
  color: #8fa9c4;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ── Progress bar ── */
.progress-bar {
  display: flex;
  background: #0d2137;
  padding: 0;
  margin: 0;
  gap: 0;
  overflow-x: auto;
}

.step {
  font-size: 10.5px;
  padding: 10px 14px;
  color: #8fa9c4;
  white-space: nowrap;
  flex-shrink: 0;
  border-right: 1px solid #1a3352;
  display: flex;
  align-items: center;
  gap: 6px;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #1a3352;
  font-size: 10px;
  font-weight: 600;
  flex-shrink: 0;
}

.step.active {
  background: #122842;
  color: #fff;
}

.step.active .step-num {
  background: #c89b3c;
  color: #fff;
}

.step.completed .step-num {
  background: #c89b3c;
  color: #fff;
}

.step.completed {
  color: #8fa9c4;
}

/* ── Form container ── */
#applicationForm {
  background: #fff;
  padding: 32px 36px;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 2px 12px rgba(13, 33, 55, 0.12);
}

.form-step {
  display: none;
}

.form-step.active {
  display: block;
  animation: fadeIn 0.25s ease;
}

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

h2 {
  font-size: 16px;
  font-weight: 700;
  color: #0d2137;
  margin-bottom: 4px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.step-desc {
  font-size: 12.5px;
  color: #7a8ea8;
  margin-bottom: 22px;
  line-height: 1.5;
}

.field-group {
  margin-bottom: 20px;
}

.field-group h3 {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #4d7aad;
  margin: 20px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e4ecf6;
  font-weight: 600;
}

.row {
  display: flex;
  gap: 16px;
}

.row > .field {
  flex: 1;
}

.field {
  margin-bottom: 12px;
}

label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #3d5a7a;
  margin-bottom: 5px;
}

label .required {
  color: #c0392b;
  margin-left: 2px;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="tel"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 8px 11px;
  border: 1px solid #cdd8e6;
  border-radius: 4px;
  font-size: 13.5px;
  font-family: inherit;
  background: #fff;
  color: #333;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #4d7aad;
  box-shadow: 0 0 0 2px rgba(77, 122, 173, 0.15);
}

input.field-error,
select.field-error,
textarea.field-error {
  border-color: #c0392b !important;
  box-shadow: 0 0 0 2px rgba(192, 57, 43, 0.12) !important;
  background: #fff8f8;
}

.field-error-msg {
  color: #c0392b;
  font-size: 11.5px;
  margin-top: 4px;
  font-weight: 400;
}

.review-missing .review-value {
  color: #c0392b;
}

.review-empty {
  color: #aaa;
  font-style: italic;
}

/* LTV Indicator */
.ltv-indicator {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 6px;
}

.ltv-low { background: #e8f6ed; color: #27ae60; }
.ltv-med { background: #fef9e7; color: #f39c12; }
.ltv-high { background: #fde8e8; color: #e74c3c; }

/* Submission loading */
button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.field-hint {
  display: block;
  font-size: 11px;
  color: #8fa9c4;
  margin-top: 4px;
  font-weight: 400;
  line-height: 1.4;
}

/* ── Checkboxes ── */
.checkbox-group {
  margin-bottom: 8px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 400;
  color: #333;
  cursor: pointer;
  padding: 5px 0;
  line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
  width: 15px;
  height: 15px;
  margin-top: 1px;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: #0d2137;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
}

/* ── Documents checklist ── */
.documents-checklist {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.documents-checklist .checkbox-label {
  background: #f8fafd;
  padding: 10px 12px;
  border-radius: 4px;
  border: 1px solid #e4ecf6;
}

.documents-checklist .checkbox-label .doc-hint {
  display: block;
  font-size: 11px;
  color: #8fa9c4;
  margin-top: 1px;
  font-weight: 400;
}

.notice {
  background: #fff9ec;
  border: 1px solid #f5d88a;
  border-radius: 4px;
  padding: 11px 14px;
  font-size: 12.5px;
  color: #7a5e1a;
  margin-top: 14px;
  line-height: 1.5;
}

/* ── Review ── */
.review-panel {
  background: #f8fafd;
  border: 1px solid #e4ecf6;
  border-radius: 4px;
  padding: 18px 20px;
  margin-top: 22px;
}

.review-panel h3 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #4d7aad;
  margin-bottom: 12px;
  font-weight: 700;
}

.review-row {
  display: flex;
  gap: 10px;
  padding: 5px 0;
  border-bottom: 1px solid #eef3f8;
  font-size: 13px;
}

.review-row:last-child {
  border-bottom: none;
}

.review-label {
  font-weight: 600;
  color: #4d7aad;
  min-width: 150px;
  flex-shrink: 0;
}

.review-value {
  color: #333;
}

/* ── Buttons ── */
.btn-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 26px;
  gap: 12px;
}

.btn {
  padding: 10px 26px;
  border: none;
  border-radius: 4px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.btn.primary {
  background: #c89b3c;
  color: #fff;
  box-shadow: 0 2px 6px rgba(200, 155, 60, 0.35);
}

.btn.primary:hover {
  background: #b88a2e;
}

.btn.secondary {
  background: #e4ecf6;
  color: #4d7aad;
}

.btn.secondary:hover {
  background: #cfd9ec;
}

/* ── Success ── */
.success-message {
  text-align: center;
  padding: 50px 24px;
}

.success-message h2 {
  font-size: 22px;
  color: #0d2137;
  margin-bottom: 10px;
  text-transform: none;
  letter-spacing: 0;
}

.success-message p {
  color: #7a8ea8;
  margin-bottom: 8px;
}

.success-message .ref {
  font-size: 13px;
  color: #8fa9c4;
  margin-top: 14px;
}

.success-message .btn {
  margin-top: 16px;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .row { flex-direction: column; gap: 0; }
  .checkbox-grid { grid-template-columns: 1fr; }
  #applicationForm { padding: 20px 16px; }
  .step { padding: 9px 10px; font-size: 9.5px; }
  .step-num { width: 15px; height: 15px; font-size: 9px; }
  .header-title { font-size: 15px; }
  .header-logo { width: 36px; height: 36px; }

  .ltv-indicator {
    display: block;
    text-align: center;
    margin-top: 8px;
  }
}
