:root {
  --bg: #0f1115;
  --card: #1a1d24;
  --border: #2a2e37;
  --text: #e6e8ec;
  --muted: #8b929e;
  --accent: #6366f1;
  --green: #22c55e;
  --red: #ef4444;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}
.hidden { display: none !important; }
.muted { color: var(--muted); font-weight: 400; }
.error { color: var(--red); min-height: 1.2em; font-size: 0.9rem; }
.center { min-height: 100vh; display: flex; align-items: center; justify-content: center; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
}
.login-card { width: 340px; text-align: center; }
.login-card h1 { margin: 0 0 0.25rem; }
form { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 1rem; }
input {
  background: #12141a; border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 0.6rem 0.8rem; font-size: 0.95rem;
}
input:focus { outline: none; border-color: var(--accent); }
button {
  background: var(--accent); color: white; border: none; border-radius: 8px;
  padding: 0.6rem 1rem; font-size: 0.95rem; cursor: pointer; font-weight: 500;
}
button:hover { filter: brightness(1.1); }
button.ghost { background: transparent; border: 1px solid var(--border); color: var(--muted); }
button.danger { background: transparent; border: 1px solid var(--red); color: var(--red); padding: 0.3rem 0.7rem; }

header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 1.5rem; border-bottom: 1px solid var(--border);
}
.brand { font-weight: 600; font-size: 1.1rem; }
.user { display: flex; align-items: center; gap: 0.75rem; }
main { max-width: 860px; margin: 1.5rem auto; padding: 0 1rem; }

h2 { margin: 0 0 0.25rem; font-size: 1.05rem; }
.row { display: flex; align-items: center; }
.row.between { justify-content: space-between; }
.row.gap { gap: 0.6rem; }
.status-label { margin: 0.75rem 0 0; font-weight: 600; }

/* Toggle switch */
.switch { position: relative; display: inline-block; width: 52px; height: 28px; }
.switch input { display: none; }
.slider {
  position: absolute; cursor: pointer; inset: 0; background: #3a3f4b;
  border-radius: 28px; transition: 0.2s;
}
.slider::before {
  content: ''; position: absolute; height: 22px; width: 22px; left: 3px; bottom: 3px;
  background: white; border-radius: 50%; transition: 0.2s;
}
.switch input:checked + .slider { background: var(--green); }
.switch input:checked + .slider::before { transform: translateX(24px); }

/* Stats */
.stats { display: flex; gap: 2rem; margin: 1rem 0; flex-wrap: wrap; }
.stats > div { display: flex; flex-direction: column; }
.stat { font-size: 1.4rem; font-weight: 700; }

/* Chart */
.chart { display: flex; align-items: flex-end; gap: 4px; height: 120px; margin-top: 1rem; }
.chart .bar { flex: 1; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 2px; opacity: 0.85; }
.chart .bar:hover { opacity: 1; }

/* Table */
table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
th, td { text-align: left; padding: 0.6rem 0.5rem; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
th { color: var(--muted); font-weight: 500; }
.pill { padding: 0.15rem 0.6rem; border-radius: 999px; font-size: 0.8rem; }
.pill.yes { background: rgba(34,197,94,0.15); color: var(--green); }
.pill.no { background: rgba(239,68,68,0.15); color: var(--red); }
