/* ============================================================================
    Referrals V3 — Modern Intake Base Styles (REFACTOR v2.1)
    Logic: 1px Crisp Borders + 4px Required Accent Bar
   ============================================================================ */

:root {
    --primary: #2563eb;
    --primary-hover: #1e4fc7;
    --primary-light: #eff6ff;
    --success: #22c55e;
    --border: #e2e8f0;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --bg-card: #ffffff;
    --radius: 10px;
}

#intakeApp {
  font-family: system-ui, -apple-system, sans-serif;
  max-width: 850px;
  margin: 0 auto;
  padding: 30px 20px;
  color: var(--text-main);
  background-color: #ffffff;
  line-height: 1.5;
}

.intake-row { display: grid; gap: 20px; margin-bottom: 10px; }

@media (min-width: 768px) {
  .row-2 { grid-template-columns: 1fr 1fr; }
  .row-3 { grid-template-columns: 1fr 1fr 1fr; }
}

.intake-form-inner h3 {
  margin: 35px 0 12px 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  border-bottom: 2px solid var(--primary-light);
  padding-bottom: 8px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

/* Base Input Styling */
.intake-section input, .intake-section select, .intake-section textarea,
.intake-form-inner input, .intake-form-inner select, .intake-form-inner textarea {
  display: block;
  width: 100%;
  height: 44px;
  padding: 10px 14px;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  box-sizing: border-box;
  transition: all 0.2s ease;
  color: var(--text-main);
}

.intake-section textarea, .intake-form-inner textarea { height: auto; min-height: 120px; }

/* --- REQUIRED FIELD INDICATOR --- */
.field-required {
  background-color: #f8faff !important; 
  border-left: 4px solid var(--primary) !important; /* Thick Blue Bar */
}

/* --- COMPLETED STATE --- */
.field-done {
  border: 1px solid var(--success) !important;
  border-left: 4px solid var(--success) !important; /* Thick Green Bar */
  background-color: #f0fdf4 !important;
}

/* Focus State */
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Optional Cards & Submit Spacing */
.optional-cards-row { display: flex; gap: 20px; margin-top: 15px; flex-wrap: wrap; }
.optional-card { flex: 1; min-width: 250px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.optional-card.completed { border: 1px solid var(--success) !important; background: #f0fdf4 !important; }

.form-controls { margin-top: 40px; padding-top: 30px; border-top: 1px solid var(--border); }
.intake-btn-primary { width: 100%; padding: 18px; background: var(--primary); color: #fff; border: none; font-weight: 700; font-size: 1.1rem; border-radius: var(--radius); cursor: pointer; }
.btn-disabled { background: #cbd5e1 !important; cursor: not-allowed; }

.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.status-pending { background: #94a3b8; }
.status-complete { background: var(--success); }