:root {
  font-family:
    Inter,
    Segoe UI,
    Arial,
    sans-serif;
  color: #e8edf4;
  background: #080f16;
  font-synthesis: none;
  --muted: #94a9bb;
  --mint: #77efd0;
  --line: #2a3d4a;
  --panel: #0d1821;
  --amber: #edc881;
}
.login-page { display: grid; place-items: center; padding: 28px; background: radial-gradient(ellipse at 50% 10%, #173b3b 0, #080f16 65%); }
.login-page .login-card { width: min(100%, 440px); margin: 0; padding: 40px; border: 1px solid var(--line); border-radius: 24px; background: #0d1821; box-shadow: 0 24px 100px #0007; }
.login-mark { display: grid; place-items: center; width: 52px; height: 52px; background: #77efd017; color: var(--mint); border: 1px solid #77efd040; border-radius: 16px; font-size: 27px; margin-bottom: 28px; }
.eyebrow { color: var(--mint); font-size: 11px; letter-spacing: .18em; font-weight: 700; }
.login-card h1 { font-size: clamp(28px, 6vw, 36px); letter-spacing: -.04em; margin: 12px 0; }
.login-card form { margin-top: 30px; }
.login-card label { font-size: 14px; }
.password-field { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; margin: 10px 0 18px; background: #080f16; }
.password-field:focus-within { border-color: var(--mint); box-shadow: 0 0 0 3px #77efd012; }
.password-field input { min-width: 0; flex: 1; padding: 15px; background: transparent; color: inherit; border: 0; outline: 0; font: inherit; }
.password-field button { padding: 14px; border: 0; background: transparent; color: var(--muted); font-size: 13px; }
.remember { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.remember input { accent-color: var(--mint); width: 16px; height: 16px; }
.remember .subtle { font-size: 12px; margin-left: 24px; }
.sign-in { display: flex; justify-content: space-between; width: 100%; margin-top: 24px; padding: 14px 18px; background: var(--mint); border: 0; border-radius: 12px; color: #08151d; font-weight: 700; }
.sign-in:disabled { opacity: .6; cursor: wait; }
#login-message { min-height: 20px; font-size: 13px; color: var(--amber); }
.login-foot { color: var(--muted); font-size: 12px; line-height: 1.7; border-top: 1px solid var(--line); padding-top: 20px; }
@media (max-width: 480px) { .login-page { padding: 16px; } .login-page .login-card { padding: 28px 24px; } }
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: radial-gradient(ellipse at 60% 0%, #12233055, transparent 65%);
  min-height: 100vh;
}
a {
  color: inherit;
}
button {
  font: inherit;
  color: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 5px;
}
button {
  cursor: pointer;
}
.skip {
  position: fixed;
  top: -60px;
  left: 20px;
  z-index: 5;
  background: var(--mint);
  color: #08151d;
  padding: 12px;
}
.skip:focus {
  top: 12px;
}
.sidebar {
  width: 205px;
  position: fixed;
  inset: 0 auto 0 0;
  border-right: 1px solid #20323e;
  padding: 30px 20px;
  background: #0a141ddd;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
}
.brand-icon {
  color: var(--mint);
  font-size: 37px;
}
.brand strong {
  font-size: 15px;
}
.brand small {
  display: block;
  color: #b4c4cf;
  font-size: 11px;
  margin-top: 6px;
}
nav {
  display: grid;
  gap: 8px;
  margin-top: 40px;
}
nav a {
  display: flex;
  align-items: center;
  gap: 17px;
  text-decoration: none;
  color: #c0cfdd;
  font-size: 14px;
  padding: 12px 11px;
  border-left: 2px solid transparent;
  border-radius: 7px;
}
nav a span {
  font-size: 24px;
  line-height: 1;
  width: 25px;
  text-align: center;
}
nav a:hover {
  background: #14252e;
}
nav a.selected {
  color: #f3fffc;
  background: #17303988;
  border-left-color: var(--mint);
}
nav a.selected span {
  color: var(--mint);
}
.sidebar-foot {
  margin-top: auto;
  font-size: 12px;
  color: #b7c8d5;
  line-height: 1.6;
}
.sidebar-foot strong {
  font-weight: 500;
  color: #e5edf3;
}
main {
  margin-left: 205px;
  padding: 32px 28px 20px;
  max-width: 1700px;
}
header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 21px;
}
.heading-line {
  display: flex;
  align-items: center;
  gap: 12px;
}
h1 {
  margin: 0;
  font-size: 30px;
  letter-spacing: -1px;
}
h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
}
h2 > span {
  color: var(--mint);
  font-size: 25px;
  line-height: 1;
}
.pill {
  padding: 4px 9px;
  border: 1px solid #476172;
  border-radius: 15px;
  color: #c9dfef;
  font-size: 12px;
}
.subtle {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
header p {
  margin: 8px 0 0;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 24px;
}
.header-right strong {
  display: block;
  font-size: 18px;
}
.header-right p > span {
  display: block;
  color: #a5bbcb;
  font-size: 12px;
  margin-top: 8px;
}
.refresh {
  background: #12222c;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 12px;
  color: var(--mint);
}
.refresh:disabled {
  cursor: wait;
  opacity: 0.6;
}
.notice {
  padding: 11px 15px;
  border: 1px solid #2b4a50;
  background: #13303955;
  color: #b0e6db;
  border-radius: 7px;
  font-size: 12px;
  margin-bottom: 18px;
  line-height: 1.6;
}
.notice.warning {
  border-color: #675335;
  background: #382c1a55;
  color: #f1d7a8;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 17px;
}
.metric {
  border: 1px solid var(--line);
  border-radius: 9px;
  min-height: 153px;
  padding: 18px;
  background: linear-gradient(135deg, #111f29, #0c161e);
  overflow: hidden;
}
.metric-label {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 13px;
  font-weight: 600;
}
.metric-icon {
  color: var(--mint);
  font-size: 25px;
  line-height: 1;
}
.metric-value {
  font-size: 28px;
  font-weight: 600;
  margin: 21px 0 9px;
  letter-spacing: -0.7px;
}
.metric-value.host-name {
  font-size: 17px;
  letter-spacing: 0;
}
.metric small {
  color: #a6bac9;
  font-size: 11px;
  line-height: 1.7;
  display: block;
}
.meter {
  height: 3px;
  background: #243641;
  border-radius: 4px;
  margin: 12px 0 0;
  overflow: hidden;
}
.meter > span {
  display: block;
  height: 100%;
  background: var(--mint);
}
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 0.9fr;
  gap: 17px;
}
.panel {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 18px;
  background: linear-gradient(115deg, #0d1922, #0b151d);
  min-width: 0;
  scroll-margin-top: 20px;
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 17px;
}
.panel-heading > .subtle {
  font-size: 11px;
  text-align: right;
}
.history {
  grid-column: span 2;
}
.services {
  grid-column: span 1;
}
.projects {
  grid-column: span 1;
}
.recovery {
  grid-column: span 2;
}
.map,
.issues {
  grid-column: 1/-1;
}
.chart {
  height: 230px;
  position: relative;
}
.chart svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.chart-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px;
}
.chart-empty strong {
  font-size: 14px;
  margin-bottom: 10px;
}
.chart-empty p {
  font-size: 12px;
  line-height: 1.8;
  margin: 0;
  color: #a9bdcd;
  max-width: 270px;
}
.chart-legend {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 11px;
  color: #b4c5d1;
  margin-top: 7px;
}
.chart-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.chart-legend i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}
.cpu-dot {
  background: var(--mint);
}
.memory-dot {
  background: #87adf4;
}
.chart-legend small {
  margin-left: auto;
  color: #829bac;
  font-size: 10px;
}
.service-row,
.evidence-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid #233540;
  font-size: 12px;
}
.service-row:first-child,
.evidence-row:first-child {
  border-top: 0;
}
.service-row .name {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
}
.service-symbol {
  font-size: 21px;
  color: var(--mint);
  width: 23px;
  text-align: center;
}
.status {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #c0cfda;
  text-align: right;
  font-size: 11px;
}
.status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8295a5;
  flex-shrink: 0;
}
.status.good {
  color: var(--mint);
}
.status.good::before {
  background: var(--mint);
}
.status.bad {
  color: #f1c4a0;
}
.status.bad::before {
  background: #e5a66e;
}
.empty {
  font-size: 12px;
  color: #a5bac9;
  padding: 16px 0;
  line-height: 1.8;
}
.project-card {
  border: 1px solid #2a3f4c;
  border-radius: 8px;
  padding: 15px;
  margin-top: 10px;
  background: #14232e55;
}
.project-card h3 {
  font-size: 15px;
  margin: 0 0 7px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.project-card h3 span {
  font-size: 25px;
  color: #a9bac9;
}
.project-card .status {
  justify-content: flex-start;
  margin: 11px 0;
}
.project-card p {
  margin: 8px 0 0;
  font-size: 11px;
  color: #a9bdcc;
  line-height: 1.6;
}
.project-link {
  display: inline-block;
  color: var(--mint);
  font-size: 11px;
  margin-top: 11px;
  text-underline-offset: 3px;
}
.evidence-row {
  align-items: flex-start;
  line-height: 1.6;
}
.evidence-row > span {
  color: #a7bdcd;
  text-align: right;
  max-width: 65%;
  overflow-wrap: anywhere;
}
.backup-set {
  margin-top: 15px;
  border-top: 1px solid #2a3e4b;
  padding-top: 14px;
}
.backup-set h3 {
  font-size: 12px;
  color: #dce9ef;
  margin: 0 0 10px;
}
.record {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 7px;
  font-size: 11px;
  line-height: 1.6;
  margin: 6px 0;
}
.record dt {
  color: #9cafbd;
}
.record dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.map-nodes {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 17px;
  align-items: center;
}
.map-host {
  align-self: stretch;
  display: flex;
  align-items: center;
}
.map-node {
  background: #142530;
  border: 1px solid #365868;
  border-radius: 8px;
  padding: 14px 15px;
  text-align: left;
  width: 100%;
  min-height: 65px;
  transition: background 0.15s;
}
.map-node:hover,
.map-node[aria-pressed="true"] {
  background: #1c3942;
  border-color: var(--mint);
}
.map-node strong {
  display: block;
  font-size: 12px;
}
.map-node small {
  display: block;
  color: #9fb9cc;
  font-size: 10px;
  margin-top: 6px;
  line-height: 1.6;
}
.map-branches {
  border-left: 1px solid #426677;
  padding-left: 25px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.map-branch {
  position: relative;
  min-width: 0;
}
.map-branch::before {
  content: "→";
  position: absolute;
  left: -21px;
  top: 18px;
  color: #80adbf;
}
.map-children {
  padding: 10px 0 0 12px;
  border-left: 1px solid #365564;
  margin-left: 12px;
  display: grid;
  gap: 8px;
}
.map-children .map-node {
  min-height: 55px;
  padding: 10px;
}
.map-detail {
  font-size: 11px;
  color: #b7cbd6;
  border-top: 1px solid #243a47;
  padding-top: 13px;
  margin: 18px 0 0;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.issues ul {
  font-size: 12px;
  color: var(--amber);
  line-height: 1.9;
  padding-left: 20px;
}
footer {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #7f96a6;
  padding: 20px 0 0;
}
body.focused .dashboard-grid > section,
body.focused .metrics {
  display: none;
}
body.focused .dashboard-grid > section.visible {
  display: block;
  grid-column: 1/-1;
}
body.focused .dashboard-grid {
  grid-template-columns: 1fr;
}
body.focused .projects #project-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 15px;
}
body.focused .services {
  max-width: 800px;
}
body.focused .recovery {
  max-width: 1000px;
}
@media (min-width: 1500px) {
  main {
    padding: 38px;
  }
  .metric {
    min-height: 172px;
  }
  .chart {
    height: 270px;
  }
}
@media (max-width: 1150px) {
  .sidebar {
    width: 175px;
    padding: 28px 15px;
  }
  main {
    margin-left: 175px;
    padding: 26px 20px;
  }
  .header-right p {
    display: none;
  }
  .metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .metric:first-child {
    display: none;
  }
  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
  }
  .history {
    grid-column: 1/-1;
  }
  .services,
  .projects,
  .recovery {
    grid-column: span 1;
  }
  .recovery {
    grid-column: 1/-1;
  }
  .map-nodes {
    grid-template-columns: 140px 1fr;
  }
  .map-branches {
    grid-template-columns: 1fr 1fr;
  }
  .map-branch:last-child {
    grid-column: 1/-1;
  }
}
@media (max-width: 650px) {
  .sidebar {
    inset: auto 0 0;
    width: 100%;
    height: 70px;
    padding: 0;
    background: #0b151ff5;
    z-index: 3;
    border-right: 0;
    border-top: 1px solid #2e424f;
    backdrop-filter: blur(12px);
  }
  .brand,
  .sidebar-foot {
    display: none;
  }
  nav {
    display: flex;
    margin: 0;
    height: 100%;
    gap: 0;
    justify-content: space-around;
  }
  nav a {
    flex-direction: column;
    gap: 5px;
    padding: 10px 2px 8px;
    border: 0;
    border-radius: 0;
    font-size: 10px;
    flex: 1;
  }
  nav a.selected {
    border: 0;
    background: transparent;
    color: var(--mint);
  }
  nav a span {
    font-size: 23px;
  }
  main {
    margin: 0;
    padding: 23px 17px 86px;
  }
  h1 {
    font-size: 25px;
  }
  .pill {
    font-size: 10px;
    padding: 3px 7px;
  }
  .heading-line {
    gap: 9px;
  }
  .header-right {
    gap: 0;
  }
  .refresh {
    font-size: 23px;
    padding: 3px 10px;
  }
  .refresh span {
    display: none;
  }
  header {
    margin-bottom: 18px;
    gap: 8px;
  }
  .subtle {
    font-size: 11px;
  }
  .notice {
    font-size: 11px;
    padding: 10px 12px;
  }
  .metrics {
    grid-template-columns: 1fr 1fr;
    gap: 11px;
  }
  .metric {
    padding: 15px;
    min-height: 143px;
  }
  .metric-value {
    font-size: 27px;
    margin: 18px 0 7px;
  }
  .metric-label {
    font-size: 12px;
    gap: 9px;
  }
  .metric small {
    font-size: 10px;
  }
  .dashboard-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  .panel {
    padding: 15px;
    scroll-margin-top: 15px;
  }
  .panel-heading {
    gap: 8px;
  }
  h2 {
    font-size: 14px;
    gap: 9px;
  }
  .panel-heading > .subtle {
    font-size: 10px;
  }
  .chart {
    height: 195px;
  }
  .chart-legend {
    gap: 13px;
  }
  .chart-legend small {
    font-size: 9px;
    max-width: 125px;
    text-align: right;
  }
  .service-row {
    padding: 12px 0;
  }
  .map-nodes {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }
  .map-host {
    max-width: none;
  }
  .map-branches {
    grid-template-columns: 1fr;
    border-left: 1px solid #426677;
    margin-left: 16px;
    padding-left: 23px;
  }
  .map-branch:last-child {
    grid-column: auto;
  }
  .map-node {
    min-height: 60px;
  }
  .map-children {
    margin-left: 17px;
  }
  .record {
    grid-template-columns: 85px 1fr;
    font-size: 10px;
  }
  .evidence-row {
    font-size: 11px;
  }
  footer {
    display: block;
    line-height: 1.8;
  }
  footer span {
    display: block;
  }
  body.focused .projects #project-list {
    display: block;
  }
}

.services .panel-heading {
  flex-wrap: wrap;
}
.services #services-note {
  width: 100%;
  text-align: left;
  line-height: 1.6;
}
