/* === Theme Variables === */
:root {
  --bg: #121212;
  --text: #ffffff;
  --card-bg: #1f1f1f;
  --card-hover: #2a2a2a;
  --shadow: rgba(0, 0, 0, 0.4);
}

[data-theme="light"] {
  --bg: #f5f5f5;
  --text: #1a1a1a;
  --card-bg: #ffffff;
  --card-hover: #eaeaea;
  --shadow: rgba(0, 0, 0, 0.2);
}

/* === Base Styles === */
body {
  font-family: system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  padding-left: 2rem;
  padding-bottom:  2rem;
  padding-right: 2rem;
  transition: background 0.3s, color 0.3s;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header {
  background: var(--card-bg);
  padding: 1rem;
  box-shadow: 0 2px 4px var(--card-shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

/* === Grid Layout === */
.grid {
  display: grid;
  padding-top:1rem;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* === Dashboard Cards === */
.card {
  background: var(--card-bg);
  padding: .25rem;
  border-radius: 12px;
  box-shadow: 0 4px 10px var(--shadow);
  text-decoration: none;
  color: var(--text);
  transition: background 0.3s, transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.card:hover {
  background: var(--card-hover);
  transform: translateY(-2px);
}

/* === Theme Toggle Button (Bottom Left) === */
.theme-toggle {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
}

/* === Slider Switch Style === */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  background-color: #888;
  border-radius: 24px;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  transition: 0.4s;
}

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

input:checked + .slider {
  background-color: #4caf50;
}

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

.slider.round {
  border-radius: 24px;
}
