:root {
  color-scheme: light;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --page-bg: #0c0c0e;
  --card-bg: #17171a;
  --accent: #818cf8;
  --accent-hover: #a5b4fc;
  --text: #f4f4f5;
  --text-muted: #a1a1aa;
  --border: #27272a;
  --danger: #f87171;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.5), 0 1px 2px rgba(0, 0, 0, 0.45);
  --shadow-hover: 0 6px 16px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.55);
}

body,
.nav,
.card,
.table-wrap,
.confirm-modal,
.toast {
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

html.theme-anim,
html.theme-anim *,
html.theme-anim *::before,
html.theme-anim *::after {
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, fill 0.3s ease, stroke 0.3s ease !important;
}

html[data-theme="dark"] img {
  filter: brightness(0.92);
}

html[data-theme="dark"] .nav-search:focus,
html[data-theme="dark"] .login-input:focus,
html[data-theme="dark"] .form-input:focus,
html[data-theme="dark"] .form-select:focus,
html[data-theme="dark"] .form-file:focus {
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.22);
}

html[data-theme="dark"] .nav-link:hover,
html[data-theme="dark"] .nav-link.active,
html[data-theme="dark"] .foot-social a:hover,
html[data-theme="dark"] .form-file::file-selector-button {
  background-color: rgba(129, 140, 248, 0.14);
}

html[data-theme="dark"] .form-file::file-selector-button:hover {
  background-color: rgba(129, 140, 248, 0.22);
}

html[data-theme="dark"] .confirm-overlay {
  background-color: rgba(0, 0, 0, 0.65);
}

.theme-icon-moon {
  display: none;
}

html[data-theme="dark"] .theme-icon-sun {
  display: none;
}

html[data-theme="dark"] .theme-icon-moon {
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  body,
  .nav,
  .card,
  .table-wrap,
  .confirm-modal,
  .toast,
  html.theme-anim,
  html.theme-anim *,
  html.theme-anim *::before,
  html.theme-anim *::after {
    transition: none !important;
  }
}
