:root {
  color-scheme: dark;
  --bg: #10141a;
  --card: #1b222c;
  --line: #2c3644;
  --text: #e7ecf1;
  --muted: #93a0ae;
  --accent: #3ecf8e;
  --danger: #f07178;
  --warn: #e6b35a;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}
a { color: var(--accent); text-decoration: none; }
.top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; color: var(--text); }
nav { display: flex; flex-wrap: wrap; gap: 12px; }
nav a { color: var(--muted); }
nav a:hover { color: var(--text); }
main { max-width: 980px; margin: 0 auto; padding: 24px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}
label { display: block; margin: 12px 0 6px; color: var(--muted); }
input, textarea, select, button {
  font: inherit;
  color: var(--text);
  background: #121820;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}
textarea { width: 100%; min-height: 120px; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"] { width: 100%; }
button, .btn {
  background: var(--accent);
  color: #062116;
  border: 0;
  font-weight: 700;
  cursor: pointer;
}
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.flash { padding: 10px 12px; border-radius: 8px; }
.flash.ok { background: #143126; }
.flash.bad { background: #3a1c22; color: #ffd5d8; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.muted { color: var(--muted); }
.check { display: flex; gap: 8px; align-items: flex-start; margin: 14px 0; }
.check input { margin-top: 4px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.stat { font-size: 1.4rem; font-weight: 700; }
form.inline { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
form.inline input { width: auto; }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
body.auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 18%, rgba(46, 229, 157, 0.16), transparent 28%),
    #070b10;
}
.auth-card {
  width: min(420px, calc(100vw - 32px));
  background: #12181f;
  border: 1px solid #243140;
  border-radius: 18px;
  padding: 28px 24px 22px;
  box-shadow: 0 0 48px rgba(46, 229, 157, 0.08);
}
.auth-card h1 { margin: 8px 0 0; text-align: center; font-size: 1.6rem; }
.auth-card .muted { text-align: center; margin-top: 4px; }
.auth-card button[type="submit"] { width: 100%; margin-top: 16px; background: #2ee59d; padding: 12px; }
.mark {
  width: 42px;
  height: 42px;
  margin: 0 auto;
  border-radius: 12px;
  background: linear-gradient(160deg, #2ee59d, #0e8f62);
}
.hint { color: var(--muted); font-size: 0.85rem; margin: 6px 0 0; }
.switch { text-align: center; color: var(--muted); }
body.app { background: #070b12; }
.appbar {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 28px;
  height: 68px;
  border-bottom: 1px solid #1b2836;
}
.brand-name { color: #2ee59d; font-weight: 800; letter-spacing: .04em; white-space: nowrap; }
.tabs { display: flex; gap: 4px; flex: 1; align-items: center; }
.tabs a {
  color: #8b98a8;
  padding: 22px 12px 18px;
  border-bottom: 2px solid transparent;
}
.tabs a.on { color: #2ee59d; border-bottom-color: #2ee59d; }
.account { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.pill { background: #101820; border: 1px solid #243044; border-radius: 999px; padding: 8px 12px; }
.who { color: var(--muted); }
.power {
  width: 36px; height: 36px; border-radius: 10px;
  background: #101820; color: #d5dde6; border: 1px solid #243044;
}
.stage { max-width: 1180px; }
.workspace, .split { display: grid; grid-template-columns: 1.15fr .85fr; gap: 16px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.panel {
  background: #101820;
  border: 1px solid #223044;
  border-radius: 16px;
  padding: 16px 18px 18px;
}
.panel h2 { margin: 0 0 12px; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: #9aa8b8; }
.sheet { margin-bottom: 16px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; }
.pair { display: grid; grid-template-columns: 1.4fr .6fr; gap: 10px; }
.status-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.status-grid.six { margin-bottom: 12px; }
.help { background: #0c121a; border-radius: 10px; padding: 10px 12px; color: #9aa8b8; font-size: .86rem; }
.help ul { margin: 8px 0 0; padding-left: 18px; }
.bar { height: 8px; background: #0c121a; border-radius: 99px; overflow: hidden; margin-top: 12px; }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, #148f68, #2ee59d); }
.status-grid article { background: #0c121a; border: 1px solid #223044; border-radius: 12px; padding: 12px; }
.num { font-size: 1.7rem; font-weight: 800; }
.ok { color: #3dd68c; }
.bad { color: #f07178; }
.log {
  background: #070b10;
  min-height: 180px;
  border-radius: 12px;
  padding: 12px;
  color: #8ea0b3;
  white-space: pre-wrap;
}
.actions { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
button.start { background: #22c55e; color: #05210f; padding: 12px 22px; }
.tag { color: #3dd68c; }
.clip { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
form.stack { display: flex; }
@media (max-width: 900px) {
  .workspace, .split, .appbar { display: block; }
  .account { margin: 12px 0; }
}
