/**
 * Tema chiaro/scuro condiviso — Medical AI
 */
:root {
  color-scheme: light;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg-white: #0f172a;
  --bg-light: #1e293b;
  --text-dark: #f1f5f9;
  --text-color: #e2e8f0;
  --text-light: #94a3b8;
  --border-color: #334155;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.45);
  --primary-light: #1e3a5f;
  --primary-lighter: #0f2744;
}

html[data-theme="dark"] body,
html[data-theme="dark"] .login-box,
html[data-theme="dark"] .profile-card,
html[data-theme="dark"] .settings-card,
html[data-theme="dark"] .patients-card,
html[data-theme="dark"] .history-card,
html[data-theme="dark"] .page-content .section,
html[data-theme="dark"] .dashboard-main,
html[data-theme="dark"] .app-sidebar,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .input-field,
html[data-theme="dark"] .data-table th,
html[data-theme="dark"] .data-table td {
  background-color: var(--bg-white);
  color: var(--text-color);
  border-color: var(--border-color);
}

html[data-theme="dark"] .input-field,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
  background: #1e293b;
  color: #f1f5f9;
}

html[data-theme="dark"] .sidebar-link,
html[data-theme="dark"] .nav-link {
  color: #cbd5e1;
}

html[data-theme="dark"] .sidebar-link.active,
html[data-theme="dark"] .nav-link.active {
  background: rgba(0, 97, 177, 0.25);
}

@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] {
    color-scheme: dark;
  }
  html[data-theme="auto"] body,
  html[data-theme="auto"] .login-box,
  html[data-theme="auto"] .profile-card,
  html[data-theme="auto"] .settings-card,
  html[data-theme="auto"] .dashboard-main,
  html[data-theme="auto"] .app-sidebar {
    background-color: #0f172a;
    color: #e2e8f0;
  }
}

.platform-prefs-note {
  font-size: 0.9rem;
  color: var(--text-light, #64748b);
  margin: 0 0 12px;
}
