:root {
  --bg: #0b1220;
  --card: #121a2b;
  --line: #243049;
  --text: #e8eefc;
  --muted: #93a0b8;
  --accent: #6ea8ff;
  --ok: #3ecf8e;
  --err: #ff6b7a;
  --warn: #f5c542;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: radial-gradient(1200px 600px at 10% -10%, #1a2744, var(--bg));
  color: var(--text);
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); }
code { background: #0a1020; padding: 0.1rem 0.35rem; border-radius: 4px; font-size: 0.92em; }

.auth-body { display: grid; place-items: center; padding: 2rem 1rem; }
.auth-card {
  width: min(420px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.auth-card.wide { width: min(720px, 100%); }
.auth-card h1 { margin: 0 0 .25rem; font-size: 1.4rem; }
.auth-card h2 { margin: 1.25rem 0 .5rem; font-size: 1.05rem; color: var(--accent); }

.layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side {
  background: #0a1324;
  border-right: 1px solid var(--line);
  padding: 1.25rem 1rem;
}
.side .brand { font-weight: 700; margin-bottom: 1.25rem; }
.side nav a {
  display: block;
  padding: .55rem .75rem;
  border-radius: 8px;
  color: var(--text);
  margin-bottom: .25rem;
}
.side nav a:hover, .side nav a.active { background: #18233a; text-decoration: none; }
.main { padding: 1.5rem; }
.top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1.25rem; gap: 1rem; flex-wrap: wrap;
}
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 1rem;
}
.card .n { font-size: 1.6rem; font-weight: 700; }
.card .l { color: var(--muted); font-size: .9rem; }

.form label { display: block; margin-bottom: .85rem; font-size: .92rem; color: var(--muted); }
.form input, .form select, .form textarea {
  display: block; width: 100%; margin-top: .35rem;
  background: #0a1020; color: var(--text);
  border: 1px solid var(--line); border-radius: 8px;
  padding: .65rem .75rem; font: inherit;
}
.form textarea { min-height: 90px; resize: vertical; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
@media (max-width: 800px) {
  .layout { grid-template-columns: 1fr; }
  .side { border-right: 0; border-bottom: 1px solid var(--line); }
  .grid2 { grid-template-columns: 1fr; }
}
.btn {
  display: inline-block; border: 1px solid var(--line); background: #18233a;
  color: var(--text); padding: .6rem 1rem; border-radius: 8px; cursor: pointer; font: inherit;
}
.btn.primary { background: #2a5cff; border-color: #2a5cff; }
.btn.danger { background: #5a1d28; border-color: #8b2f3e; }
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.alert { padding: .75rem 1rem; border-radius: 8px; margin: .75rem 0; }
.alert.ok { background: rgba(62,207,142,.12); border: 1px solid rgba(62,207,142,.35); }
.alert.err { background: rgba(255,107,122,.12); border: 1px solid rgba(255,107,122,.35); }
.alert.warn { background: rgba(245,197,66,.12); border: 1px solid rgba(245,197,66,.35); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .55rem .4rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
.check { display: flex; align-items: center; gap: .5rem; color: var(--text); }
.check input { width: auto; margin: 0; }
.footer-note { margin-top: 2rem; color: var(--muted); font-size: .85rem; }
