:root {
  --bg: #0B0C0A;
  --surface: #1B1D15;
  --surface-2: #23261b;
  --line: #2e3224;
  --text: #F5F5F6;
  --muted: #9a9d92;
  --lime: #D1FB19;
  --ok: #7fdc6a;
  --warn: #f2c14e;
  --err: #ff6b5b;
  --info: #6fb6ff;
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 Geist, system-ui, sans-serif; }
a { color: var(--lime); text-decoration: none; }
a:hover { text-decoration: underline; }
.mono, code { font-family: 'Geist Mono', ui-monospace, monospace; font-size: 13px; }
h1, h2, h3 { margin: 0 0 12px; font-weight: 600; letter-spacing: -0.01em; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }

.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side { border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 16px; }
.brand em { font-style: normal; color: var(--muted); font-weight: 500; }
.side nav { display: flex; flex-direction: column; gap: 2px; }
.side nav a { color: var(--text); padding: 9px 12px; border-radius: 8px; opacity: .8; }
.side nav a:hover { background: var(--surface); text-decoration: none; opacity: 1; }
.side nav a.on { background: var(--surface); opacity: 1; box-shadow: inset 3px 0 0 var(--lime); }
.logout { margin-top: auto; display: flex; flex-direction: column; gap: 4px; color: var(--muted); }
.main { padding: 28px 32px 60px; max-width: 1180px; width: 100%; }
.top h1 { font-size: 24px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat b { display: block; font-size: 26px; font-weight: 600; }
.stat span { color: var(--muted); font-size: 13px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.spread { justify-content: space-between; }

label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=datetime-local], textarea, select {
  width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font: inherit;
}
textarea { min-height: 140px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--lime); outline-offset: -1px; }
input[type=file] { color: var(--muted); }
.check { display: flex; gap: 8px; align-items: center; color: var(--text); margin: 8px 0; font-size: 14px; }

button, .btn { display: inline-flex; align-items: center; gap: 6px; background: var(--lime); color: #0B0C0A; border: 0; border-radius: 8px; padding: 10px 16px; font: 600 14px Geist, sans-serif; cursor: pointer; }
.btn:hover, button:hover { filter: brightness(1.05); text-decoration: none; }
button.ghost, .btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
button.danger { background: transparent; color: var(--err); border: 1px solid #4a2420; }
button.link { background: none; color: var(--lime); padding: 0; font-weight: 500; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; font-size: 13px; }
.badge { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 99px; border: 1px solid currentColor; white-space: nowrap; }
.badge.ok { color: var(--ok); } .badge.warn { color: var(--warn); } .badge.err { color: var(--err); } .badge.info { color: var(--info); } .badge.muted { color: var(--muted); }
.flash { padding: 12px 14px; border-radius: 8px; margin-bottom: 16px; border: 1px solid; }
.flash.ok { border-color: #2f5a27; background: #142211; }
.flash.err { border-color: #5a2a24; background: #26110e; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2); object-fit: cover; }
.plat { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 22px; padding: 0 6px; border-radius: 6px; background: var(--surface-2); font: 600 11px 'Geist Mono', monospace; color: var(--lime); text-transform: uppercase; }
.copy { display: flex; gap: 8px; align-items: center; background: var(--bg); border: 1px dashed var(--line); padding: 8px 10px; border-radius: 8px; overflow-x: auto; }
ol.steps { padding-left: 20px; margin: 8px 0; color: var(--muted); }
ol.steps li { margin-bottom: 4px; }
.err-text { color: var(--err); font-size: 13px; white-space: pre-wrap; word-break: break-word; }
.counter { font: 12px 'Geist Mono', monospace; color: var(--muted); text-align: right; margin-top: 4px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin: 16px 0; }
legend { padding: 0 6px; color: var(--muted); font-size: 13px; }

.auth { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.auth .card { width: 100%; max-width: 380px; }

@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .side nav { flex-direction: row; flex-wrap: wrap; }
  .logout { flex-direction: row; justify-content: space-between; }
  .main { padding: 20px 16px 40px; }
  table { display: block; overflow-x: auto; }
}
