:root {
  color-scheme: light;
  --bg: #f4f7fa;
  --surface: #ffffff;
  --surface2: #edf3f7;
  --line: #dce5ec;
  --text: #183044;
  --muted: #617487;
  --green: #087f68;
  --purple: #7555bd;
  --red: #c94450;
  --amber: #9a620c;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font:
    14px/1.6 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    sans-serif;
  color: var(--text);
  background: var(--bg);
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  outline-offset: 4px;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
a {
  color: var(--green);
  text-decoration: none;
}
[hidden] {
  display: none !important;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 2.4px;
}
.primary,
.secondary,
.file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: 10px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  font-weight: 600;
}
.primary {
  background: var(--green);
  border-color: var(--green);
  color: #ffffff;
}
.primary:hover {
  background: #096c59;
}
.secondary,
.file-button {
  background: transparent;
  color: var(--text);
}
.secondary:hover,
.file-button:hover {
  background: var(--surface2);
}
.wide {
  width: 100%;
  justify-content: space-between;
}
.login-shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}
.login-visual {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 9vw 7vw;
  background:
    radial-gradient(ellipse at 20% 30%, #cde8df 0, transparent 60%), #e9f4f0;
  border-right: 1px solid var(--line);
}
.login-visual h1 {
  font-size: clamp(30px, 3.5vw, 52px);
  line-height: 1.45;
  letter-spacing: -1.6px;
  margin: 28px 0 18px;
}
.login-visual h1 span {
  color: var(--green);
}
.login-visual p {
  color: #607d78;
  font-size: 16px;
}
.orbit {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 54px 0;
}
.orbit-node {
  width: 88px;
  height: 88px;
  border: 1px solid #087f6850;
  border-radius: 22px;
  background: #087f6809;
  display: grid;
  place-items: center;
  color: var(--green);
  font:
    12px ui-monospace,
    monospace;
}
.orbit-node.cloud {
  color: var(--purple);
  border-color: #7555bd50;
}
.orbit-line {
  height: 1px;
  width: 85px;
  background: linear-gradient(90deg, var(--green), var(--purple));
}
.visual-foot {
  font-size: 11px;
  letter-spacing: 2px;
  color: #50766c;
}
.visual-foot span {
  display: block;
  font-size: 9px;
  color: #67847b;
  margin-top: 6px;
}
.login-card {
  width: min(420px, 100%);
  margin: auto;
  padding: 36px;
}
.login-card img {
  border-radius: 16px;
  margin-bottom: 30px;
}
.login-card h2 {
  font-size: 27px;
  margin: 10px 0;
}
.login-card p {
  font-size: 13px;
}
.login-card form {
  margin-top: 30px;
}
.login-card input {
  margin: 9px 0 20px;
}
.login-card .file-button {
  width: 100%;
  cursor: pointer;
}
.or {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
  margin: 22px 0;
}
.or:before,
.or:after {
  content: "";
  height: 1px;
  background: var(--line);
  flex: 1;
}
.login-note {
  color: #617487;
  font-size: 11px;
  margin-top: 32px;
}
.message {
  min-height: 22px;
  color: var(--amber);
  white-space: pre-line;
}
.app-shell {
  display: grid;
  grid-template-columns: 232px 1fr;
  min-height: 100dvh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: #ffffff;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0 9px;
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.5px;
  line-height: 1.3;
}
.brand img {
  border-radius: 10px;
}
.brand-thin {
  font-weight: 450;
}
.brand small {
  display: block;
  color: #617487;
  font-size: 8px;
  letter-spacing: 1.8px;
  margin-top: 7px;
}
.nav-caption {
  margin: 47px 14px 12px;
  font-size: 11px;
  color: #617487;
}
.sidebar nav {
  display: grid;
  gap: 7px;
}
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--muted);
  padding: 12px 15px;
  border-radius: 10px;
  font-size: 13px;
}
.sidebar nav a > span {
  font-size: 19px;
  line-height: 1;
}
.sidebar nav a:hover {
  background: #edf4f7;
}
.sidebar nav a.active {
  color: var(--green);
  background: #087f6810;
}
.sidebar nav b {
  margin-left: auto;
  font-size: 10px;
  min-width: 20px;
  text-align: center;
  color: var(--amber);
  background: #9a620c12;
  border-radius: 5px;
}
.sidebar-bottom {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: auto;
  color: #617487;
  font-size: 10px;
  padding: 16px 7px 0;
}
.sidebar-bottom button {
  margin-left: auto;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 21px;
}
.mini-dot {
  height: 6px;
  width: 6px;
  border-radius: 50%;
  background: var(--green);
}
main {
  min-width: 0;
}
.topbar {
  height: 96px;
  padding: 0 44px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.breadcrumb {
  font-size: 12px;
  margin-top: 7px;
  color: #506578;
}
.breadcrumb > span:first-child {
  margin: 0 10px;
  color: #93a6b6;
}
.top-actions {
  display: flex;
  gap: 20px;
  align-items: center;
  font-size: 11px;
}
.top-actions .secondary {
  font-size: 11px;
  padding: 7px 13px;
}
.page {
  max-width: 1440px;
  margin: auto;
  padding: 35px 44px 50px;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 27px;
}
.page-heading h1 {
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.8px;
  margin: 0 0 5px;
}
.page-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 99px;
  padding: 4px 10px;
  font-size: 10px;
  white-space: nowrap;
  background: #087f6812;
  color: var(--green);
}
.pill:before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.pill.warn {
  color: var(--amber);
  background: #9a620c12;
}
.pill.bad {
  color: var(--red);
  background: #c9445012;
}
.pill.neutral {
  color: var(--muted);
  background: #61748712;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 17px;
  margin-bottom: 26px;
}
.stat {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 19px 22px;
  background: linear-gradient(130deg, #ffffff, #ffffff);
}
.stat-label {
  color: var(--muted);
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.stat-number {
  font-size: 29px;
  line-height: 1.3;
  letter-spacing: -1px;
  margin: 13px 0 7px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}
.stat-number small {
  font-size: 13px;
  letter-spacing: 0;
  color: var(--muted);
}
.stat-note {
  font-size: 10px;
  color: var(--muted);
}
.green {
  color: var(--green);
}
.purple {
  color: var(--purple);
}
.amber {
  color: var(--amber);
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 28px 0 14px;
}
.section-heading h2 {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
}
.section-heading span,
.section-heading a {
  font-size: 11px;
}
.grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  min-width: 0;
}
.card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.server-icon {
  height: 42px;
  width: 42px;
  border-radius: 12px;
  background: #087f680b;
  color: var(--green);
  display: grid;
  place-items: center;
  font-size: 23px;
  flex-shrink: 0;
}
.server-icon.cloud {
  background: #7555bd0c;
  color: var(--purple);
}
.card-top h3 {
  font-size: 15px;
  margin: 0 0 3px;
}
.caption {
  font-size: 10px;
  color: var(--muted);
}
.card-top > .pill {
  margin-left: auto;
}
.meter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
}
.meter-title {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
}
.meter-title strong {
  color: var(--text);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 500;
}
.meter {
  width: 100%;
  height: 5px;
  border: none;
  border-radius: 4px;
  margin-top: 10px;
  appearance: none;
}
.meter::-webkit-progress-bar {
  background: #e3ebf1;
  border-radius: 4px;
}
.meter::-webkit-progress-value {
  background: var(--green);
  border-radius: 4px;
}
.meter.purple::-webkit-progress-value {
  background: var(--purple);
}
.meter::-moz-progress-bar {
  background: var(--green);
  border-radius: 4px;
}
.spark {
  width: 100%;
  height: 84px;
  margin: 24px 0 10px;
}
.chart-label {
  display: flex;
  justify-content: space-between;
  color: #617487;
  font-size: 9px;
}
.card-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 15px;
  font-size: 10px;
  color: var(--muted);
}
.list {
  display: grid;
  gap: 0;
}
.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 13px 0;
  border-bottom: 1px solid #dce5ec80;
  font-size: 12px;
}
.list-row:last-child {
  border: 0;
}
.row-title {
  font-size: 12px;
}
.row-sub {
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
  overflow-wrap: anywhere;
}
.list-row time {
  font-size: 10px;
  color: var(--muted);
}
.link-state {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}
.dot {
  height: 6px;
  width: 6px;
  border-radius: 50%;
  background: var(--green);
}
.dot.bad {
  background: var(--red);
}
.empty {
  padding: 30px 15px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}
.empty h3 {
  color: var(--text);
}
.notice {
  font-size: 11px;
  color: var(--muted);
  padding: 14px 16px;
  background: #edf4f8;
  border: 1px solid #d4e2eb;
  border-radius: 10px;
  line-height: 1.8;
}
.notice.warn {
  color: var(--amber);
  background: #9a620c08;
  border-color: #9a620c30;
}
.warning {
  margin: 20px 44px 0;
  border: 1px solid #9a620c40;
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--amber);
  background: #9a620c08;
  font-size: 12px;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}
.detail {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.detail strong {
  display: block;
  font-size: 15px;
  font-weight: 500;
  margin-top: 6px;
  overflow-wrap: anywhere;
}
.detail span {
  font-size: 10px;
  color: var(--muted);
}
.alert-item {
  border-left: 3px solid var(--amber);
  margin-bottom: 12px;
}
.alert-item.critical {
  border-left-color: var(--red);
}
.alert-item h3 {
  font-size: 14px;
  margin: 0 0 8px;
}
.alert-item p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr);
  gap: 22px;
}
.settings-grid h2 {
  font-size: 16px;
  margin: 0 0 20px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.field.full {
  grid-column: 1/-1;
}
label {
  font-size: 12px;
  color: #405b70;
}
input,
select {
  background: #ffffff;
  border: 1px solid #ccdbe5;
  border-radius: 8px;
  color: var(--text);
  padding: 11px 12px;
  width: 100%;
  min-width: 0;
}
input:focus,
select:focus {
  border-color: var(--green);
}
input[type="checkbox"] {
  width: auto;
  accent-color: var(--green);
}
.switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0;
}
.form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.help {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.9;
  overflow-wrap: anywhere;
}
.help ol {
  padding-left: 20px;
}
.help li {
  margin-bottom: 12px;
}
.oauth-code {
  font-size: 26px;
  color: var(--green);
  letter-spacing: 4px;
  font-family: ui-monospace, monospace;
}
.email-state {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
}
.code {
  font-family: ui-monospace, monospace;
  color: var(--green);
  font-size: 11px;
  overflow-wrap: anywhere;
}
.table-scroll {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
  font-size: 11px;
}
th {
  text-align: left;
  color: var(--muted);
  font-weight: 450;
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
}
td {
  padding: 15px 16px;
  border-bottom: 1px solid #dce5ec70;
}
tbody tr:last-child td {
  border: 0;
}
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: #e1f3ea;
  border: 1px solid #087f6860;
  color: #165f48;
  border-radius: 12px;
  max-width: min(520px, 90vw);
  padding: 12px 20px;
  box-shadow: 0 10px 40px #20374b1a;
  font-size: 12px;
  white-space: pre-line;
}
.toast.error {
  background: #fff0f1;
  border-color: #c9445060;
  color: #a6313e;
}
footer {
  border-top: 1px solid var(--line);
  padding: 19px 44px;
  color: #617487;
  font-size: 9px;
  letter-spacing: 1px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
footer span {
  letter-spacing: 0;
}
.text-button {
  background: none;
  border: 0;
  padding: 0;
  color: var(--green);
  font-size: 11px;
}
.spacer {
  margin-top: 20px;
}
.stale-note {
  color: var(--amber);
  font-size: 10px;
  margin-top: 12px;
}
.success-mark {
  font-size: 36px;
  color: var(--green);
}
@media (min-width: 1600px) {
  .page {
    padding-top: 42px;
  }
  .login-card {
    width: 450px;
  }
}
@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 190px 1fr;
  }
  .sidebar {
    padding: 25px 12px;
  }
  .brand {
    font-size: 11px;
    gap: 8px;
  }
  .brand img {
    height: 33px;
    width: 33px;
  }
  .topbar {
    padding: 0 26px;
  }
  .page {
    padding: 28px 26px;
  }
  .stats {
    gap: 12px;
  }
  .stat {
    padding: 17px;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .warning {
    margin-left: 26px;
    margin-right: 26px;
  }
  footer {
    padding: 18px 26px;
  }
  .grid-two {
    gap: 14px;
  }
  .card {
    padding: 19px;
  }
}
@media (max-width: 760px) {
  .login-shell {
    grid-template-columns: 1fr;
  }
  .login-visual {
    display: none;
  }
  .login-card {
    padding: 35px 25px;
  }
  .app-shell {
    display: block;
    padding-bottom: 76px;
  }
  .sidebar {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    height: auto;
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
    border: 0;
    border-top: 1px solid var(--line);
    z-index: 100;
    background: #fffffff5;
    backdrop-filter: blur(20px);
  }
  .brand,
  .nav-caption,
  .sidebar-bottom {
    display: none;
  }
  .sidebar nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
  }
  .sidebar nav a {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 7px 2px;
    font-size: 9px;
    position: relative;
  }
  .sidebar nav a > span {
    font-size: 20px;
  }
  .sidebar nav b {
    position: absolute;
    right: 12px;
    top: 1px;
    min-width: 15px;
    font-size: 8px;
  }
  .topbar {
    height: 80px;
    padding: 0 20px;
  }
  .top-actions {
    gap: 10px;
  }
  .top-actions #last-update {
    display: none;
  }
  .page {
    padding: 27px 18px 35px;
  }
  .page-heading h1 {
    font-size: 25px;
  }
  .page-heading p {
    font-size: 11px;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .stat {
    padding: 17px;
  }
  .stat-number {
    font-size: 27px;
  }
  .grid-two {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .card {
    padding: 20px;
  }
  .section-heading {
    margin-top: 24px;
  }
  .warning {
    margin: 16px 18px 0;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .field.full {
    grid-column: auto;
  }
  .form-actions > * {
    flex: 1;
  }
  .detail-grid {
    gap: 10px;
  }
  .detail strong {
    font-size: 12px;
  }
  footer {
    padding: 15px 18px;
    display: block;
    font-size: 8px;
  }
  footer span {
    display: block;
    margin-top: 5px;
  }
  .toast {
    bottom: 95px;
  }
  .settings-grid {
    gap: 18px;
  }
  .spark {
    height: 90px;
  }
}

#logout-top {
  display: none;
}
@media (max-width: 760px) {
  #logout-top {
    display: inline-flex;
  }
}

.ui-icon {
  display: block;
  flex-shrink: 0;
}
.server-icon .ui-icon {
  width: 24px;
  height: 24px;
}
.top-actions .ui-icon {
  width: 13px;
  height: 13px;
}

/* Telemetry and audit views */
.card, .stat { box-shadow: 0 3px 16px #18304404; }
.hardware-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin: 20px 0; }
.hardware-stat { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: var(--surface2); }
.hardware-stat small { color: var(--muted); display: block; font-size: 10px; }
.hardware-stat strong { font-size: 17px; font-weight: 600; display: block; }
.hardware-stat em { font-size: 9px; font-style: normal; color: var(--muted); }
.sensor-list { display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0; }
.sensor { padding: 5px 9px; border-radius: 7px; background: var(--surface2); font-size: 10px; color: var(--muted); }
.sensor strong { color: var(--text); margin-left: 5px; }
.telemetry-table td, .telemetry-table th { padding: 12px 9px; }
.telemetry-table .wrap, .logs-table .wrap, .manifest-table .wrap { white-space: normal; overflow-wrap: anywhere; min-width: 140px; }
.log-toolbar { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; margin: 18px 0; }
.log-toolbar label { display: grid; gap: 5px; min-width: 140px; }
.log-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.log-footer span { font-size: 11px; color: var(--muted); }
.logs-table th { font-weight: 600; }
.logs-table .event-detail { color: var(--muted); font-size: 10px; margin-top: 4px; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tabs a { padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.tabs a.selected { border-color: var(--green); background: #087f680a; }
.hardware-section { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.hardware-section h4 { font-size: 12px; margin: 0 0 10px; }
@media(max-width:760px) {
 .sidebar nav { display: flex; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
 .sidebar nav a { min-width: 62px; flex: 1 0 62px; }
 .hardware-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
 .logs-table { font-size: 10px; }
 .log-toolbar label { flex: 1; min-width: 120px; }
}
