/* Clinic board follows data-theme only (html.light can stay stale after toggle). */

html[data-theme="light"] .clinic-appt-root {
  --bg: #f0f4f8 !important;
  --bg-elevated: #f8fafc !important;
  --card: #ffffff !important;
  --card-hover: #e8edf3 !important;
  --border: #cbd5e1 !important;
  --primary: #0f5f9a !important;
  --primary-hover: #0a4570 !important;
  --text: #0f172a !important;
  --muted: #334155 !important;
  --muted-2: #475569 !important;
  --success: #16a34a !important;
  --warning: #ea8c00 !important;
  --danger: #dc2626 !important;
  color: #0f172a !important;
}

html[data-theme="dark"] .clinic-appt-root {
  --bg: #0f172a !important;
  --bg-elevated: #111827 !important;
  --card: #1e293b !important;
  --card-hover: #243044 !important;
  --border: #334155 !important;
  --primary: #2563eb !important;
  --primary-hover: #1d4ed8 !important;
  --text: #ffffff !important;
  --muted: #94a3b8 !important;
  --muted-2: #64748b !important;
  --success: #22c55e !important;
  --warning: #f59e0b !important;
  --danger: #ef4444 !important;
  color: #ffffff !important;
}

html[data-theme="light"] .clinic-appt-root input,
html[data-theme="light"] .clinic-appt-root select,
html[data-theme="light"] .clinic-appt-root textarea,
html[data-theme="light"] #dashboard-patient-search {
  background: #f0f4f8 !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

html[data-theme="dark"] .clinic-appt-root input,
html[data-theme="dark"] .clinic-appt-root select,
html[data-theme="dark"] .clinic-appt-root textarea,
html[data-theme="dark"] #dashboard-patient-search {
  background: #0f172a !important;
  color: #ffffff !important;
  border-color: #334155 !important;
}

html[data-theme="light"] .clinic-ops-root .today-finance-summary,
html[data-theme="light"] .clinic-ops-root .today-panel,
html[data-theme="light"] .clinic-ops-root .kpi-card,
html[data-theme="light"] .clinic-appt-root .panel {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

html[data-theme="dark"] .clinic-ops-root .today-finance-summary,
html[data-theme="dark"] .clinic-ops-root .today-panel,
html[data-theme="dark"] .clinic-ops-root .kpi-card,
html[data-theme="dark"] .clinic-appt-root .panel {
  background: #1e293b !important;
  color: #ffffff !important;
  border-color: #334155 !important;
}

html[data-theme="light"] .clinic-ops-root .today-finance-card,
html[data-theme="light"] .clinic-ops-root .summary-chip,
html[data-theme="light"] .clinic-ops-root .mini-card,
html[data-theme="light"] .clinic-ops-root .next-remaining {
  background: #f0f4f8 !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

html[data-theme="dark"] .clinic-ops-root .today-finance-card,
html[data-theme="dark"] .clinic-ops-root .summary-chip,
html[data-theme="dark"] .clinic-ops-root .mini-card,
html[data-theme="dark"] .clinic-ops-root .next-remaining {
  background: #0f172a !important;
  color: #ffffff !important;
  border-color: #334155 !important;
}

html[data-theme="light"] .clinic-ops-root .next-card {
  background: linear-gradient(160deg, #e6f1fa, #f0f4f8) !important;
  color: #0f172a !important;
  border-color: #9ec0d8 !important;
}

html[data-theme="dark"] .clinic-ops-root .next-card {
  background: linear-gradient(160deg, rgba(37, 99, 235, 0.18), rgba(30, 41, 59, 0.4)) !important;
  color: #ffffff !important;
  border-color: rgba(37, 99, 235, 0.35) !important;
}

html[data-theme="light"] .clinic-ops-root .patient-profile-link,
html[data-theme="light"] .clinic-ops-root a.patient-profile-link.next-name,
html[data-theme="light"] .clinic-ops-root .link-btn {
  color: #0f5f9a !important;
}

html[data-theme="dark"] .clinic-ops-root .patient-profile-link,
html[data-theme="dark"] .clinic-ops-root a.patient-profile-link.next-name,
html[data-theme="dark"] .clinic-ops-root .link-btn {
  color: #93c5fd !important;
}

html[data-theme="light"] .clinic-ops-root .summary-chip.remaining strong { color: #0f5f9a !important; }
html[data-theme="light"] .clinic-ops-root .summary-chip.done strong { color: #16a34a !important; }
html[data-theme="light"] .clinic-ops-root .summary-chip.cancel strong { color: #dc2626 !important; }
html[data-theme="light"] .clinic-ops-root .summary-chip.noshow strong { color: #9a6700 !important; }

html[data-theme="dark"] .clinic-ops-root .summary-chip.remaining strong { color: #93c5fd !important; }
html[data-theme="dark"] .clinic-ops-root .summary-chip.done strong { color: #22c55e !important; }
html[data-theme="dark"] .clinic-ops-root .summary-chip.cancel strong { color: #fca5a5 !important; }
html[data-theme="dark"] .clinic-ops-root .summary-chip.noshow strong { color: #f59e0b !important; }

html[data-theme="light"] .clinic-appt-root .data-table,
html[data-theme="light"] .clinic-appt-root .data-table th,
html[data-theme="light"] .clinic-appt-root .data-table td {
  color: #0f172a;
  border-color: #cbd5e1;
}

html[data-theme="dark"] .clinic-appt-root .data-table,
html[data-theme="dark"] .clinic-appt-root .data-table th,
html[data-theme="dark"] .clinic-appt-root .data-table td {
  color: #ffffff;
  border-color: #334155;
}
