:root { color-scheme: dark; }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: Nunito, sans-serif;
  background: #0b1220;
  color: #e2e8f0;
}
button, select, input { font: inherit; font-size: 16px; }
button { min-height: 44px; }
.app { display: grid; min-height: calc(100vh - 42px); }
aside {
  display: grid;
  gap: 12px;
  padding: 12px;
  background: #111827;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand b {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  background: #0f766e; color: white;
}
.brand strong, .brand small { display: block; }
.brand small { color: #94a3b8; font-size: 12px; }
#nav { display: flex; gap: 8px; overflow-x: auto; }
#nav button, .btn, .btn-ghost {
  border: 0; border-radius: 12px; padding: 8px 12px; font-weight: 800; cursor: pointer;
}
#nav button { background: transparent; color: #cbd5e1; white-space: nowrap; }
#nav button.active { background: rgba(45,212,191,.15); color: #99f6e4; }
.role { display: grid; gap: 4px; color: #94a3b8; font-size: 12px; font-weight: 800; }
.role select, input, textarea {
  width: 100%; border-radius: 12px; border: 1px solid rgba(255,255,255,.12);
  background: #0f172a; color: white; padding: 10px 12px;
}
main { padding: 16px; }
.top { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
h1 { margin: 0; font-size: 1.6rem; }
.langs { display: flex; gap: 6px; }
.langs button { border: 1px solid rgba(255,255,255,.15); background: transparent; color: #e2e8f0; border-radius: 999px; padding: 6px 12px; font-weight: 800; }
.langs button.active { background: #0f766e; border-color: #0f766e; }
.grid { display: grid; gap: 12px; }
.stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card {
  background: #111827; border: 1px solid rgba(255,255,255,.08); border-radius: 16px; padding: 14px;
}
.card p { margin: 0; }
.muted { color: #94a3b8; }
.stat { font-size: 1.8rem; font-weight: 800; margin-top: 4px; }
.badge { display: inline-flex; border-radius: 999px; padding: 2px 8px; font-size: 12px; font-weight: 800; }
.run { background: #064e3b; color: #a7f3d0; }
.down { background: #7f1d1d; color: #fecaca; }
.idle { background: #1e293b; color: #cbd5e1; }
.setup { background: #78350f; color: #fde68a; }
.ok { background: #064e3b; color: #a7f3d0; }
.draft { background: #334155; color: #e2e8f0; }
.row { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn { background: #0f766e; color: white; }
.btn-ghost { background: transparent; color: #99f6e4; border: 1px solid rgba(153,246,228,.4); }
.flash { margin: 0 0 12px; color: #99f6e4; font-weight: 800; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 4px; border-bottom: 1px solid rgba(255,255,255,.08); vertical-align: top; }
@media (min-width: 900px) {
  .app { grid-template-columns: 240px 1fr; }
  aside { border-bottom: 0; border-right: 1px solid rgba(255,255,255,.08); align-content: start; }
  #nav { flex-direction: column; overflow: visible; }
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 699px) {
  .actions .btn, .actions .btn-ghost { width: 100%; }
}
