:root {
  color-scheme: dark;
  --page: #1b2027;
  --sidebar: #252a33;
  --topbar: #171b22;
  --panel: #303641;
  --panel-head: #3a414d;
  --field: #252b35;
  --line: #4a5260;
  --text: #f3f6fa;
  --muted: #aeb7c4;
  --accent: #6c72ff;
  --accent-soft: #8c91ff;
  --accent-text: #fff;
  --green: #5ad575;
  --red: #ff7482;
  --yellow: #ffbd59;
  --shadow: 0 18px 45px rgb(0 0 0 / .17);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--page); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--text);
  font: 15px/1.5 "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: var(--accent-soft); text-decoration: none; }
p { color: var(--muted); }
header.appbar {
  min-height: 58px;
  background: var(--topbar);
  border-bottom: 1px solid #292f39;
  display: flex;
  align-items: center;
  padding: 0 28px;
}
header.appbar a.brand {
  color: var(--green);
  font-weight: 800;
  letter-spacing: .08em;
}
main.app-main { width: 100%; min-height: calc(100vh - 58px); }
footer { padding: 16px 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }

.login {
  width: min(560px, calc(100% - 32px));
  margin: 10vh auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: clamp(24px, 5vw, 46px);
}
.login h1 { font-size: clamp(32px, 5vw, 48px); margin: .2em 0 .6em; }
.eyebrow, .breadcrumb {
  color: var(--accent-soft);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
}
.breadcrumb span { color: #6d7683; margin: 0 7px; }
pre {
  overflow-x: auto;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #171b22;
  color: #cdd1ff;
  font-size: 18px;
}

.dashboard-shell {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  min-height: calc(100vh - 58px);
  max-width: 1540px;
  margin: 0 auto;
}
.sidebar {
  background: var(--sidebar);
  border-right: 1px solid #343a44;
  padding: 18px 0 26px;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.server-card {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  margin: 0 14px 20px;
  padding: 13px;
  border-bottom: 1px solid var(--line);
}
.server-mark {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  border-radius: 11px;
  background: linear-gradient(145deg, #ff85bc, #7e72ff);
  color: #171822;
  font-weight: 900;
  font-size: 20px;
}
.server-card small, .sidebar-status small { display: block; color: var(--muted); font-size: 10px; letter-spacing: .08em; }
.server-card strong { display: block; font-size: 14px; }
.nav-label {
  margin: 17px 24px 7px;
  color: #8f98a5;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  margin: 1px 9px;
  padding: 0 13px;
  border-radius: 5px;
  color: #d1d6de;
  font-size: 13px;
}
.nav-link:hover { background: #2f3540; color: var(--text); }
.nav-link.active { background: #3a414d; color: var(--text); box-shadow: inset 3px 0 var(--accent); }
.nav-icon { display: inline-grid; place-items: center; width: 22px; color: #8992a0; font-size: 14px; font-weight: 800; }
.nav-link.active .nav-icon { color: var(--accent-soft); }
.sidebar-status {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: auto 20px 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--text);
  font-size: 12px;
}
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px rgb(90 213 117 / .7); }

.workspace { padding: 26px clamp(20px, 3vw, 38px) 46px; min-width: 0; }
.workspace-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
}
.workspace-head h1 { margin: 3px 0 0; font-size: 30px; line-height: 1.2; }

.notice {
  padding: 12px 15px;
  border-radius: 4px;
  margin-bottom: 18px;
}
.notice.success { color: #102616; background: #77d996; border: 1px solid #a0e6b5; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.metric {
  min-height: 115px;
  padding: 18px;
  border: 1px solid #444c59;
  border-radius: 5px;
  background: var(--panel);
}
.metric.accent { border-color: #5960bb; background: linear-gradient(145deg, #343b64, #303641); }
.metric span, .metric small { display: block; color: var(--muted); }
.metric strong { display: block; margin: 8px 0 3px; font-size: 27px; line-height: 1; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(250px, 1fr); gap: 16px; align-items: start; }
.span-2 { min-width: 0; }

.panel {
  margin-bottom: 16px;
  border: 1px solid #464e5b;
  border-radius: 5px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.panel-head {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 59px;
  padding: 11px 20px;
  background: var(--panel-head);
  border-bottom: 1px solid #4a5260;
}
.panel-head h2 { margin: 0; font-size: 19px; line-height: 1.3; }
.panel-head p { margin: 2px 0 0; font-size: 12px; }
.panel-icon {
  display: grid;
  place-items: center;
  flex: 0 0 25px;
  height: 25px;
  color: #d5d9e2;
  border-radius: 4px;
  background: #2c323c;
  font-size: 12px;
  font-weight: 800;
}
.panel-body { padding: 22px 20px; }
.panel-actions { padding: 0 20px 20px; text-align: right; }
.panel.subtle { background: #2b313a; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
  align-items: end;
}
label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; }
input, select {
  width: 100%;
  min-height: 43px;
  border: 1px solid #697383;
  border-radius: 4px;
  padding: 9px 11px;
  background: var(--field);
  color: var(--text);
  font: inherit;
}
input:focus, select:focus { outline: 2px solid rgb(108 114 255 / .35); border-color: #858bff; }
input[type=checkbox] { width: auto; min-height: 0; accent-color: var(--accent); }
label.check {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  min-height: 43px;
  padding: 8px 11px;
  color: var(--text);
  background: var(--field);
  border: 1px solid #697383;
  border-radius: 4px;
}
button {
  appearance: none;
  border: 1px solid #858bff;
  border-radius: 4px;
  padding: 10px 18px;
  background: var(--accent);
  color: var(--accent-text);
  font: 700 14px "Poppins", system-ui, sans-serif;
  cursor: pointer;
}
button:hover { background: #7d82ff; }
button.secondary { background: transparent; color: var(--text); border-color: #697383; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid #4b5360; vertical-align: top; }
th { color: #dce1e9; font-size: 12px; }
tbody tr:last-child td { border-bottom: 0; }

.quick-links { display: grid; gap: 8px; }
.quick-links a {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  background: var(--field);
  border: 1px solid #4d5664;
  border-radius: 4px;
}
.quick-links a:hover { border-color: var(--accent); }
.quick-links span { color: var(--muted); font-size: 12px; }
.command-list { display: flex; flex-wrap: wrap; gap: 8px; }
.command-list code {
  padding: 7px 10px;
  border-radius: 4px;
  color: #dfe3ff;
  background: #222832;
  border: 1px solid #4d5664;
}
.detail-list { display: grid; gap: 1px; padding: 0; background: #4b5360; }
.detail-list div { display: grid; grid-template-columns: 180px 1fr; gap: 20px; padding: 14px 20px; background: var(--panel); }
.detail-list span { color: var(--muted); }
.detail-list strong { overflow-wrap: anywhere; }

@media (max-width: 880px) {
  .dashboard-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; min-height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .server-card { margin-bottom: 8px; }
  nav { display: flex; gap: 3px; overflow-x: auto; padding: 0 9px; }
  .nav-label, .sidebar-status { display: none; }
  .nav-link { flex: 0 0 auto; }
  .workspace { padding-top: 20px; }
  .dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  header.appbar { padding: 0 18px; }
  .workspace-head { display: block; }
  .workspace-head form { margin-top: 14px; }
  .workspace { padding-left: 14px; padding-right: 14px; }
  .detail-list div { grid-template-columns: 1fr; gap: 4px; }
  table { display: block; overflow-x: auto; }
}
