/* Enrollment & Waitlist — module styles (design-token driven, no gradients) */
[data-module="enrollment"] {
  --mod-accent: var(--sage-deep, #2D5A43);
}

.icon-inline {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
}

/* ── Stats row ── */
.enroll-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
  margin: 0 0 1.25rem;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 0.8rem 0.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  box-shadow: var(--shadow-xs);
}
.stat-num {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
  color: var(--ink);
}
.stat-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink-soft);
}
.stat-inquiry .stat-num { color: var(--sky-deep); }
.stat-tour .stat-num { color: var(--sun-deep); }
.stat-waitlist .stat-num { color: var(--plum-deep); }
.stat-enrolled .stat-num { color: var(--sage-deep); }

/* ── Toolbar ── */
.enroll-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.25rem;
  flex-wrap: wrap;
}
.enroll-search {
  flex: 1 1 220px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 0 0.75rem;
  color: var(--ink-soft);
}
.enroll-search .input {
  border: 0;
  background: transparent;
  flex: 1;
  padding: 0.6rem 0;
}
.enroll-search .input:focus {
  outline: none;
  box-shadow: none;
}
.enroll-search:focus-within {
  border-color: var(--line-focus);
}

/* ── Pipeline columns ── */
.pipeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
  align-items: start;
}
.stage-col {
  background: var(--surface-tint);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 0.75rem;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.stage-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.15rem 0.25rem 0.5rem;
  border-bottom: 1px solid var(--line);
}
.stage-dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  flex-shrink: 0;
}
.stage-inquiry .stage-dot { background: var(--sky-deep); }
.stage-tour .stage-dot { background: var(--sun-deep); }
.stage-waitlist .stage-dot { background: var(--plum-deep); }
.stage-enrolled .stage-dot { background: var(--sage-deep); }
.stage-head h2 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  color: var(--ink);
  flex: 1;
}
.stage-count {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--ink-soft);
  background: var(--bg-deep);
  border-radius: var(--r-pill);
  padding: 0.1rem 0.55rem;
}
.stage-empty {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  padding: 1rem 0.5rem;
}

/* ── Lead cards ── */
.lead-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 0.75rem;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.lead-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}
.lead-parent {
  font-weight: 800;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.source-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--ink-soft);
  background: var(--bg-deep);
  border-radius: var(--r-pill);
  padding: 0.1rem 0.5rem;
  white-space: nowrap;
}
.lead-child {
  font-size: 0.85rem;
  color: var(--ink-soft);
  font-weight: 600;
}
.lead-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  font-size: 0.78rem;
  color: var(--muted);
}
.lead-meta strong {
  color: var(--ink-soft);
  font-weight: 700;
}
.lead-contact {
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.lead-contact a {
  color: var(--sky-deep);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.lead-contact a:hover { text-decoration: underline; }
.lead-notes {
  font-size: 0.8rem;
  color: var(--ink-soft);
  background: var(--surface-tint);
  border-radius: var(--r-sm);
  padding: 0.45rem 0.6rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.lead-actions {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.2rem;
}
.move-select {
  flex: 1;
  min-width: 0;
}

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
  margin-bottom: 1.25rem;
}
.empty-state p { color: var(--ink-soft); }
.empty-state p strong { color: var(--ink); }
.empty-state .btn { margin-top: 0.75rem; }

/* ── Archived ── */
.archived-section {
  margin-top: 1.5rem;
  background: var(--surface-tint);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 0.75rem 1rem;
}
.archived-section summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--ink-soft);
}
.archived-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.6rem;
  margin-top: 0.75rem;
}
.lead-card.archived {
  opacity: 0.85;
}

/* ── Modal ── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(34, 29, 24, 0.5);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem;
  z-index: 60;
  overflow-y: auto;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  padding: 1.25rem;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.modal-head h2 {
  font-family: var(--font-display);
  margin: 0;
  color: var(--ink);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.field-full { grid-column: 1 / -1; }
.field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 0.25rem;
}
.field .input,
.field .select,
.field textarea.input {
  width: 100%;
}
textarea.input { resize: vertical; }
.form-error {
  color: var(--berry-deep);
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0.75rem 0 0;
}
.form-actions {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-end;
}

/* ── Responsive ── */
@media (max-width: 1080px) {
  .pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .pipeline { grid-template-columns: 1fr; }
  .enroll-stats { grid-template-columns: repeat(2, 1fr); }
  .stat-total { grid-column: 1 / -1; }
  .form-grid { grid-template-columns: 1fr; }
  .enroll-toolbar .btn { flex: 1; }
}
