:root {
  --bg: #0a0c0f;
  --panel: #12161b;
  --panel-2: #171c22;
  --line: #232a31;
  --text: #e7ebef;
  --muted: #7d8794;
  --accent: #9ef01a;
  --accent-dim: #6fb70f;
  --danger: #ff4d4d;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(900px 500px at 100% -10%, rgba(158, 240, 26, 0.06), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: 'Instrument Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

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

/* ── Sidebar ───────────────────────────────────────────── */
.sidebar {
  border-right: 1px solid var(--line);
  background: var(--panel);
  padding: 26px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.brand {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--accent);
  letter-spacing: -0.5px;
  margin-bottom: 22px;
}
.brand span { color: var(--text); }
.nav-section {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--muted); margin: 18px 8px 6px;
}
.nav-link {
  display: block; padding: 9px 12px; border-radius: 9px;
  color: var(--muted); font-weight: 500; transition: all .15s;
}
.nav-link:hover { background: var(--panel-2); color: var(--text); }
.user-box {
  margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 4px; font-size: 14px;
}
.logout { color: var(--muted); font-size: 13px; }
.logout:hover { color: var(--danger); }

/* ── Content ───────────────────────────────────────────── */
.content { padding: 40px 48px; max-width: 1000px; }
h1 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700; font-size: 30px; letter-spacing: -1px; margin: 0 0 6px;
}
.subtitle { color: var(--muted); margin: 0 0 32px; }

/* ── Cards / grid ──────────────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; transition: border-color .15s, transform .15s;
}
.card:hover { border-color: var(--accent-dim); transform: translateY(-2px); }
.card h3 { margin: 0 0 4px; font-size: 16px; }
.card .meta { color: var(--muted); font-size: 13px; }
.badge {
  display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 99px;
  background: rgba(158,240,26,.12); color: var(--accent); border: 1px solid rgba(158,240,26,.25);
}

/* ── Toggles (modules) ─────────────────────────────────── */
.module-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); margin-bottom: 10px;
}
.module-row .name { font-weight: 600; }
.module-row .desc { color: var(--muted); font-size: 13px; }
.switch { position: relative; width: 46px; height: 26px; }
.switch input { display: none; }
.slider {
  position: absolute; inset: 0; background: #2a3138; border-radius: 99px; cursor: pointer; transition: .2s;
}
.slider::before {
  content: ''; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: .2s;
}
.switch input:checked + .slider { background: var(--accent); }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* ── Table ─────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
th { color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
tr:hover td { background: var(--panel); }
.status-open { color: var(--accent); }
.status-closed { color: var(--muted); }

/* ── Buttons / forms ───────────────────────────────────── */
.btn {
  display: inline-block; background: var(--accent); color: #0a0c0f; font-weight: 600;
  padding: 11px 18px; border-radius: 10px; border: 0; cursor: pointer; font-size: 14px;
}
.btn:hover { background: #b6ff3a; }
input[type=text], input[type=password] {
  width: 100%; padding: 12px 14px; background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 10px; color: var(--text); font-size: 15px; margin-bottom: 14px;
}
input:focus { outline: none; border-color: var(--accent-dim); }

/* ── Login ─────────────────────────────────────────────── */
.login-wrap { display: grid; place-items: center; min-height: 100vh; }
.login-card { width: 360px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 34px; }
.error { color: var(--danger); font-size: 14px; margin-bottom: 12px; }
.empty { color: var(--muted); padding: 40px 0; }
