:root {
  color-scheme: dark;
  --bg: #0e0f12;
  --panel: #17191e;
  --line: #2b2d34;
  --soft: #969ba8;
  --text: #f0f1f4;
  --accent: #ff6454;
  --mint: #9cdcc1;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font:
    14px/1.6 system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: var(--bg);
  color: var(--text);
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a {
  transition: 0.18s;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #23262d;
  color: var(--text);
  padding: 9px 14px;
}
button:hover {
  background: #30343d;
  border-color: #5b606e;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.primary {
  background: var(--accent);
  color: #180c09;
  border: 0;
  font-weight: 700;
}
.primary:hover {
  background: #ff8579;
}
.danger {
  color: #ffa095;
  border-color: #794339;
}
.muted {
  color: var(--soft);
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 32px;
  letter-spacing: -1px;
  line-height: 1.3;
}
h2 {
  font-size: 19px;
  letter-spacing: -0.3px;
}
h3 {
  font-size: 15px;
}
small {
  color: var(--soft);
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
}
.layout {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}
aside {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 28px 17px;
  background: #111216;
  overflow: auto;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0 9px 26px;
}
.mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--accent);
  color: #190b09;
  font-weight: 900;
  letter-spacing: -1px;
}
.brand b {
  display: block;
  font-size: 16px;
}
.brand small {
  font-size: 10px;
  letter-spacing: 1.3px;
}
.server-select {
  width: 100%;
  margin-bottom: 22px;
}
.nav-label {
  font-size: 10px;
  letter-spacing: 1.7px;
  color: #777e8b;
  padding: 14px 12px 8px;
}
.nav {
  display: grid;
  gap: 3px;
}
.nav button {
  border: 0;
  background: none;
  text-align: left;
  color: #a5aab6;
  padding: 8px 12px;
  font-size: 13px;
}
.nav button:hover {
  background: #1b1d23;
}
.nav button.active {
  background: #2c201f;
  color: #ff978b;
  border-left: 2px solid var(--accent);
  border-radius: 0 7px 7px 0;
}
.aside-foot {
  margin-top: auto;
  padding: 25px 12px 4px;
  font-size: 11px;
  color: #737987;
}
.main {
  min-width: 0;
}
.topbar {
  height: 77px;
  border-bottom: 1px solid var(--line);
  padding: 0 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.breadcrumb {
  color: var(--soft);
  font-size: 12px;
}
.identity {
  display: flex;
  align-items: center;
  gap: 14px;
}
.badge {
  display: inline-block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 1px solid #34483e;
  color: var(--mint);
  border-radius: 20px;
  padding: 3px 9px;
}
.badge.warn {
  color: #ffc87c;
  border-color: #5a4730;
}
.content {
  padding: 40px 42px 70px;
  max-width: 1500px;
  margin: auto;
}
.pagehead {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 29px;
}
.pagehead p {
  color: var(--soft);
  max-width: 620px;
  margin-top: 10px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 24px;
  margin-bottom: 20px;
}
.hero {
  background: linear-gradient(115deg, #30201f 0%, #1a191e 58%, #17191e);
  border-color: #4b302c;
  position: relative;
  overflow: hidden;
  padding: 33px;
}
.hero h2 {
  font-size: 27px;
  max-width: 550px;
  line-height: 1.3;
  margin-bottom: 12px;
}
.hero p {
  color: #b8a6a3;
  max-width: 600px;
}
.hero .badge {
  margin-bottom: 22px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
}
.stat strong {
  display: block;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -1px;
}
.stat small {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.grid > .card {
  margin: 0;
}
.health-row {
  display: flex;
  justify-content: space-between;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.health-row:last-child {
  border: 0;
}
.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  margin-right: 8px;
}
.dot.off {
  background: #e98f7c;
}
.intro {
  margin: 10px 0 25px;
  color: var(--soft);
}
fieldset {
  border: 1px solid var(--line);
  padding: 18px;
  border-radius: 10px;
  margin: 15px 0;
}
legend {
  padding: 0 8px;
  font-weight: 600;
  color: #c6cbd6;
}
label.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 14px 0;
  color: #c3c8d3;
  font-size: 12px;
}
input,
select,
textarea {
  width: 100%;
  background: #101216;
  color: var(--text);
  border: 1px solid #363a44;
  border-radius: 7px;
  padding: 10px 12px;
  outline: none;
  min-width: 0;
}
textarea {
  min-height: 100px;
  resize: vertical;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px #ff645414;
}
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}
.field.toggle {
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}
.array-entry {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  margin: 10px 0;
  background: #111317;
  border-radius: 8px;
}
.array-entry > .entry-content {
  flex: 1;
  min-width: 0;
}
.array-entry fieldset {
  margin: 0;
}
.array-entry .remove {
  padding: 4px 10px;
  margin-top: 10px;
  color: #e58e84;
}
.form-actions {
  position: sticky;
  bottom: 15px;
  display: flex;
  gap: 12px;
  background: #20232bee;
  border: 1px solid #3a3e49;
  border-radius: 12px;
  padding: 15px;
  margin-top: 20px;
  backdrop-filter: blur(10px);
  align-items: center;
}
.form-actions small {
  margin-left: auto;
}
.table-wrap {
  overflow: auto;
  margin-top: 14px;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  text-align: left;
  white-space: nowrap;
}
th {
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--soft);
  font-weight: 500;
}
td,
th {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  max-width: 350px;
  overflow: hidden;
  text-overflow: ellipsis;
}
details {
  border-bottom: 1px solid var(--line);
  padding: 13px 0;
}
summary {
  cursor: pointer;
  font-weight: 600;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #101216;
  padding: 16px;
  font-size: 12px;
  border-radius: 8px;
  max-height: 500px;
  overflow: auto;
}
#toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: #2d3430;
  border: 1px solid #5c7565;
  border-radius: 10px;
  padding: 13px 20px;
  max-width: 450px;
  display: none;
  z-index: 20;
}
#toast.error {
  background: #3c2525;
  border-color: #976456;
}
.empty {
  text-align: center;
  padding: 30px;
  color: var(--soft);
}
.loading {
  padding: 70px;
  color: var(--soft);
}
.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
}
.login-brand {
  padding: 9vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    radial-gradient(ellipse at 10% 70%, #55251e, transparent 65%), #121316;
}
.login-brand h1 {
  font-size: clamp(40px, 5vw, 76px);
  max-width: 650px;
  line-height: 1.04;
  letter-spacing: -3px;
  margin: 30px 0;
}
.login-brand p {
  color: #b4a3a1;
  max-width: 450px;
  font-size: 17px;
}
.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 50px;
}
.login-panel > div {
  max-width: 370px;
}
.login-panel h2 {
  font-size: 29px;
  margin-bottom: 15px;
}
.login-panel p {
  color: var(--soft);
  margin-bottom: 30px;
}
.login-button {
  display: block;
  text-align: center;
  padding: 14px;
  border-radius: 8px;
  background: var(--accent);
  font-weight: 700;
  color: #1a0d0a;
}
.login-panel small {
  display: block;
  margin-top: 25px;
}
.notice {
  padding: 15px 18px;
  border-left: 3px solid #d5a461;
  background: #28231b;
  margin: 18px 0;
  color: #d7c09f;
  font-size: 12px;
}
.flex {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.spaced {
  justify-content: space-between;
}
.pill {
  font-size: 11px;
  padding: 4px 9px;
  background: #272a32;
  border-radius: 7px;
  color: #c5cbd6;
}
.row-title {
  margin-bottom: 16px;
}
.help {
  margin-top: 10px;
  color: var(--soft);
  font-size: 12px;
}
dialog {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  width: min(900px, 90vw);
  max-height: 80vh;
}
dialog::backdrop {
  background: #0009;
}
.scroll {
  max-height: 600px;
  overflow: auto;
}
@media (max-width: 1100px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .layout {
    grid-template-columns: 210px minmax(0, 1fr);
  }
  .content {
    padding: 28px 25px;
  }
  .topbar {
    padding: 0 25px;
  }
}
@media (max-width: 760px) {
  .layout {
    display: block;
  }
  aside {
    position: relative;
    height: auto;
    padding: 18px;
  }
  .brand {
    padding-bottom: 15px;
  }
  .nav {
    display: flex;
    overflow: auto;
  }
  .nav button {
    white-space: nowrap;
  }
  .nav-label,
  .aside-foot {
    display: none;
  }
  .server-select {
    margin-bottom: 8px;
  }
  .topbar {
    height: 65px;
    padding: 0 20px;
  }
  .content {
    padding: 24px 18px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .login {
    grid-template-columns: 1fr;
  }
  .login-brand {
    padding: 45px 30px;
  }
  .login-brand h1 {
    font-size: 42px;
  }
  .login-panel {
    padding: 40px 25px;
  }
  .pagehead {
    display: block;
  }
  h1 {
    font-size: 28px;
  }
  .form-actions small {
    display: none;
  }
  .card {
    padding: 18px;
  }
  .identity .badge {
    display: none;
  }
}
