/* ── Layout & Cards ──────────────────────────────────────────── */
.intake-card {
  background: #fff;
  border-radius: 1rem;
  box-shadow:
    0 1px 4px rgba(0, 0, 0, 0.08),
    0 4px 16px rgba(0, 0, 0, 0.04);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.step-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1b5e20;
  padding-bottom: 0.875rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid #e8f5e9;
}

/* ── Form Fields ──────────────────────────────────────────────── */
.field-group {
  margin-bottom: 1.25rem;
}

.field-label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  color: #374151;
  margin-bottom: 0.375rem;
}

.field-label.required::after {
  content: ' *';
  color: #ef4444;
}

.field-input,
.field-select {
  width: 100%;
  padding: 0.6rem 0.875rem;
  border: 1.5px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  font-family: 'Inter', sans-serif;
  color: #111827;
  background: #fff;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
  -webkit-appearance: none;
}

.field-input:focus,
.field-select:focus {
  outline: none;
  border-color: #2e7d32;
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.12);
}

.field-input.invalid,
.field-select.invalid {
  border-color: #ef4444;
}

.field-hint {
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 0.3rem;
}

/* ── Radio & Checkbox Groups ─────────────────────────────────── */
.radio-group,
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin-top: 0.5rem;
}

.radio-option,
.checkbox-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.875rem;
  border: 1.5px solid #d1d5db;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: #374151;
  transition:
    border-color 0.15s,
    background 0.15s,
    color 0.15s;
  user-select: none;
}

.radio-option:has(input:checked),
.checkbox-option:has(input:checked) {
  border-color: #2e7d32;
  background: #e8f5e9;
  color: #1b5e20;
  font-weight: 600;
}

.radio-option input,
.checkbox-option input {
  accent-color: #2e7d32;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* ── File Upload ─────────────────────────────────────────────── */
.file-upload-wrap {
  position: relative;
  border: 2px dashed #d1d5db;
  border-radius: 0.625rem;
  padding: 0.875rem 1rem;
  background: #f9fafb;
  transition:
    border-color 0.15s,
    background 0.15s;
  cursor: pointer;
}

.file-upload-wrap:hover {
  border-color: #2e7d32;
  background: #f0fdf4;
}

.file-upload-wrap input[type='file'] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 10;
  width: 100%;
  height: 100%;
}

.file-upload-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #4b5563;
  pointer-events: none;
}

.file-list {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.file-list-item {
  font-size: 0.8rem;
  color: #2e7d32;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

/* ── Info Boxes ──────────────────────────────────────────────── */
.info-box {
  border-radius: 0.5rem;
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  line-height: 1.55;
}

.info-box--blue {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

.info-box--green {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  font-weight: 500;
}

.info-box--amber {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

/* ── Subsection ──────────────────────────────────────────────── */
.subsection-divider {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 1.5rem 0;
}

.subsection-title {
  font-size: 0.975rem;
  font-weight: 700;
  color: #1b5e20;
  margin-bottom: 1rem;
}

.form-note {
  font-size: 0.8375rem;
  color: #6b7280;
  font-style: italic;
  line-height: 1.5;
}

/* ── Repeating Sections (children, banks, properties) ───────── */
.repeating-block {
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
  background: #fafafa;
}

.repeating-block-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: #374151;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.repeating-block-title::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2e7d32;
  flex-shrink: 0;
}

/* ── Year Tabs ───────────────────────────────────────────────── */
.year-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.year-tab-btn {
  padding: 0.35rem 0.875rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1.5px solid #d1d5db;
  background: #fff;
  color: #4b5563;
  cursor: pointer;
  transition: all 0.15s;
}

.year-tab-btn.active {
  background: #2e7d32;
  border-color: #2e7d32;
  color: #fff;
}

.year-tab-panel {
  display: none;
}

.year-tab-panel.active {
  display: block;
}

/* ── Progress Bar ────────────────────────────────────────────── */
.progress-bar-track {
  width: 100%;
  height: 6px;
  background: #e5e7eb;
  border-radius: 9999px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: #2e7d32;
  border-radius: 9999px;
  transition: width 0.35s ease;
}

/* ── Navigation Buttons ──────────────────────────────────────── */
.nav-btn-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  margin-bottom: 3rem;
  gap: 1rem;
}

.btn-intake-prev {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.65rem 1.5rem;
  border: 1.5px solid #d1d5db;
  border-radius: 0.5rem;
  background: #fff;
  color: #374151;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition:
    border-color 0.15s,
    color 0.15s;
}

.btn-intake-prev:hover {
  border-color: #2e7d32;
  color: #2e7d32;
}

.btn-intake-next,
.btn-intake-submit {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.65rem 1.75rem;
  border: none;
  border-radius: 0.5rem;
  background: #2e7d32;
  color: #fff;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: background 0.15s;
}

.btn-intake-next:hover,
.btn-intake-submit:hover {
  background: #1b5e20;
}

.btn-intake-next:disabled,
.btn-intake-submit:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

.btn-add {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.4rem 1rem;
  border: 1.5px solid #2e7d32;
  border-radius: 0.5rem;
  background: transparent;
  color: #2e7d32;
  font-weight: 500;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: background 0.15s;
  margin-top: 0.5rem;
}

.btn-add:hover {
  background: #e8f5e9;
}

/* ── Loading Overlay ─────────────────────────────────────────── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.overlay-card {
  background: #fff;
  border-radius: 1rem;
  padding: 2.5rem 2rem;
  text-align: center;
  max-width: 320px;
  width: 90%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid #e8f5e9;
  border-top-color: #2e7d32;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  margin: 0 auto 1.25rem;
}

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

/* ── Success State ───────────────────────────────────────────── */
.success-card {
  background: #fff;
  border-radius: 1rem;
  padding: 3.5rem 2rem;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* ── Document "Where to get" help (?) ──────────────────────────── */
.doc-help-wrap {
  position: relative;
  display: inline-flex;
  vertical-align: middle;
  margin-left: 0.25rem;
}

.doc-help-trigger {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  border: 1px solid #9ca3af;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s;
}

.doc-help-trigger:hover {
  background: #e5e7eb;
  color: #374151;
  border-color: #6b7280;
}

.doc-help-tooltip {
  position: absolute;
  left: 0;
  bottom: 100%;
  margin-bottom: 0.35rem;
  padding: 0.5rem 0.75rem;
  background: #1f2937;
  color: #fff;
  font-size: 0.8125rem;
  line-height: 1.4;
  border-radius: 0.5rem;
  white-space: normal;
  display: none;
  z-index: 30;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.15);
  width: 8rem;
}

.doc-help-tooltip.is-visible {
  display: flex;
}

.doc-help-tooltip strong {
  color: #e5e7eb;
}

/* ── Utility ─────────────────────────────────────────────────── */
.hidden {
  display: none !important;
}

.indent-section {
  padding-left: 1rem;
  border-left: 3px solid #e8f5e9;
  margin-top: 0.75rem;
}

/* ── Responsive Tweaks ───────────────────────────────────────── */
@media (max-width: 640px) {
  .intake-card {
    padding: 1.25rem;
  }

  .radio-group,
  .checkbox-group {
    flex-direction: column;
  }

  .radio-option,
  .checkbox-option {
    width: 100%;
  }
}
