:root {
  --bg: #ffffff;
  --sidebar-bg: #f5f5f5;
  --text: #111111;
  --muted: #555555;
  --border: #e0e0e0;
  --accent: #2563eb;

  /* Alerts */
  --info-bg: #e0f2fe;
  --info-text: #075985;

  --warning-bg: #fef3c7;
  --warning-text: #92400e;
}

body.dark {
  --bg: #020617;
  --sidebar-bg: #020617;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --border: #1e293b;
  --accent: #38bdf8;

    /* Alerts (dark mode) */
  --info-bg: #0c4a6e;
  --info-text: #e0f2fe;

  --warning-bg: #78350f;
  --warning-text: #fef3c7;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--sidebar-bg);
  padding: 24px;
  border-right: 1px solid var(--border);
  position: sticky;
  top: 0;
  height: 100vh;
}

.logo {
  margin-bottom: 24px;
}

.sidebar nav a {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}

.sidebar nav a:hover {
  color: var(--accent);
}

/* THEME TOGGLE */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 32px;
  font-size: 14px;
  color: var(--muted);
}

.switch {
  position: relative;
  width: 42px;
  height: 22px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  inset: 0;
  background-color: #ccc;
  border-radius: 22px;
  cursor: pointer;
  transition: 0.3s;
}

.slider:before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
}

input:checked + .slider {
  background: var(--accent);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

.content {
  padding: 40px;
  max-width: 900px;
}

section {
  margin-bottom: 48px;
}

.alert {
  padding: 12px;
  border-radius: 4px;
  margin: 12px 0;
  font-size: 14px;
}

.alert.info {
  background: var(--info-bg);
  color: var(--info-text);
}

.alert.warning {
  background: var(--warning-bg);
  color: var(--warning-text);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  border: 1px solid var(--border);
  padding: 8px;
}

.footer {
  margin-top: 60px;
  font-size: 14px;
  color: var(--muted);
}

@media (max-width: 768px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: relative;
    height: auto;
  }
}

@media print {
  .sidebar,
  .theme-toggle,
  .footer {
    display: none;
  }
}
