/* Shared dark/light theme for all application pages (landing page excluded). */
html { color-scheme: dark; }
body.dark { background: #101116 !important; color: #f5f5f7; }
body.dark .app, body.dark .main, body.dark .side { background: #101116; }
body.dark .top { background: #101116; border-color: #2b2d36; }
body.dark .side { border-color: #2b2d36; }
body.dark .content, body.dark .panel, body.dark .card, body.dark .list,
body.dark .record-row, body.dark .record-head { border-color: #30323d; }
body.dark .record-head { background: #1b1d24; color: #c9cad3; }
body.dark .list { background: #15171d; }
body.dark input, body.dark textarea, body.dark select { background: #1b1d24; color: #f4f4f6; border-color: #424550; }
body.dark a { color: inherit; }

.theme-toggle {
  position: fixed;
  top: 10px;
  right: 18px;
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid #d9d9df;
  border-radius: 9px;
  background: #ffffff;
  color: #17171b;
  font: 600 16px/1 Montserrat, Inter, Arial, sans-serif;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0,0,0,.08);
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.theme-toggle:hover { transform: translateY(-1px); border-color: #8b5cf6; }
body.dark .theme-toggle { background: #242631; border-color: #4a4d5a; color: #ffffff; box-shadow: 0 3px 12px rgba(0,0,0,.3); }
body.dark .theme-toggle:hover { background: #302852; border-color: #a78bfa; }
@media (max-width: 760px) { .theme-toggle { right: 10px; top: 8px; } }
