:root {
  color-scheme: light;
  --paper: #f2f4f0;
  --surface: #fbfcf9;
  --ink: #203239;
  --muted: #788780;
  --line: #dce3dd;
  --forest: #355d54;
  --forest-dark: #213b39;
  --signal: #c76b48;
  --signal-pale: #f7e9e1;
  --green-pale: #e7f0e9;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--paper); }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 3px solid #d88a65;
  outline-offset: 3px;
}

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  width: 224px;
  flex-direction: column;
  padding: 27px 18px 18px;
  color: #eaf0e9;
  background: var(--forest-dark);
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 700; letter-spacing: -.5px; }
.brand-mark {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 9px 9px 9px 3px;
  color: var(--forest-dark);
  background: #d4a681;
  font-size: 15px;
}
.side-label { margin: 48px 10px 11px; color: #91a49d; font-size: 11px; }
.nav-link { display: flex; align-items: center; gap: 11px; margin: 2px 0; padding: 10px; border-radius: 6px; color: #c4d0c9; font-size: 13px; }
.nav-link:hover, .nav-link.active { color: #fff; background: #304b47; }
.nav-symbol { width: 17px; color: #c89572; text-align: center; font-size: 16px; }
.sidebar-footer { display: flex; align-items: center; gap: 8px; margin-top: auto; padding: 13px 10px 2px; color: #b7c8bd; font-size: 11px; border-top: 1px solid #405753; }
.status-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #8eb69b; }
.version { margin-left: auto; color: #819890; font-family: var(--mono); font-size: 10px; }
.main-content { max-width: 1540px; margin-left: 224px; padding: 0 42px 25px; }
.topbar { display: flex; height: 62px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); font-size: 12px; }
.crumb { color: #89958e; }
.text-button { padding: 5px 0; border: 0; color: var(--forest); background: transparent; cursor: pointer; font-size: 12px; }
.text-button:hover { text-decoration: underline; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 34px 0 24px; }
.eyebrow { margin: 0 0 7px; color: var(--signal); font-size: 11px; font-weight: 700; }
h1, h2, h3, p { margin-top: 0; }
.page-heading h1 { margin-bottom: 8px; font-size: clamp(26px, 3vw, 35px); font-weight: 600; letter-spacing: -1.3px; }
.muted { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.live-indicator { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; color: var(--forest); font-size: 12px; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--surface); }
.metric { min-height: 115px; padding: 19px 21px 16px; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric-label, .metric-note { display: block; color: var(--muted); font-size: 11px; }
.metric strong { display: block; margin: 7px 0 5px; font-size: 28px; font-weight: 600; letter-spacing: -1px; }
.metric strong small { font-size: 13px; font-weight: 500; letter-spacing: 0; }
.text-alert { color: var(--signal); }
.route-strip { display: flex; align-items: center; gap: 13px; margin-top: 16px; padding: 14px 19px; border: 1px solid var(--line); background: #e9eeea; }
.route-node { display: flex; min-width: 124px; align-items: center; gap: 10px; }
.route-icon { display: grid; width: 26px; height: 26px; flex: 0 0 26px; place-items: center; border: 1px solid #bdcbc1; border-radius: 50%; color: var(--forest); font: 10px var(--mono); }
.route-active { border-color: var(--signal); color: var(--signal); background: #fff7f2; }
.route-node strong, .route-node small { display: block; }
.route-node strong { font-size: 11px; font-weight: 600; }
.route-node small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.route-line { height: 1px; flex: 1; background: #b9c9bf; }
.route-caption { color: var(--muted); font-size: 10px; white-space: nowrap; }
.secret-notice { display: grid; grid-template-columns: minmax(190px, 1fr) minmax(0, 2fr); align-items: center; gap: 15px; margin-top: 20px; padding: 15px 18px; border: 1px solid #ddb59f; background: var(--signal-pale); }
.secret-notice strong { font-size: 13px; }
.secret-notice p { margin: 4px 0 0; color: #775f53; font-size: 11px; }
code { font-family: var(--mono); font-size: 11px; overflow-wrap: anywhere; }
.secret-notice code { padding: 9px 11px; border: 1px solid #e2c7b9; background: #fffaf7; }
.section-block { margin-top: 34px; scroll-margin-top: 20px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 13px; }
.section-heading h2 { margin: 0 0 4px; font-size: 17px; font-weight: 600; letter-spacing: -.3px; }
.section-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.count-label { color: #8b9690; font: 10px var(--mono); }
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 276px; align-items: start; gap: 15px; }
.table-wrap { min-width: 0; overflow-x: auto; border: 1px solid var(--line); background: var(--surface); }
table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; }
th { padding: 10px 13px; border-bottom: 1px solid var(--line); color: #7d8982; background: #f6f8f4; font-size: 10px; font-weight: 600; }
td { padding: 11px 13px; border-bottom: 1px solid #e9ede8; color: #596960; font-size: 11px; }
tbody tr:last-child td { border-bottom: 0; }
.strong-cell { color: var(--ink); font-weight: 600; }
.endpoint-cell { max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
.pill { display: inline-flex; min-width: 38px; justify-content: center; padding: 4px 7px; border-radius: 3px; font: 10px var(--mono); }
.pill-ready { color: #416d54; background: var(--green-pale); }
.pill-error { color: #9c5037; background: var(--signal-pale); }
.icon-button { width: 24px; height: 24px; border: 0; border-radius: 4px; color: #8b958f; background: transparent; cursor: pointer; font-size: 18px; }
.icon-button:hover { background: var(--signal-pale); }
.danger-action { color: #a3533b; }
.empty-cell { padding: 23px 15px; color: var(--muted); text-align: center; white-space: normal; }
.form-panel { display: grid; gap: 10px; padding: 16px; border: 1px solid var(--line); background: #e9eeea; }
.form-panel h3 { margin: 0 0 2px; font-size: 13px; font-weight: 600; }
.form-panel label, .login-form label { display: grid; gap: 5px; color: #617169; font-size: 10px; }
.form-panel input, .inline-form input, .login-form input[type="password"] { width: 100%; min-width: 0; padding: 8px 9px; border: 1px solid #d3ddd5; border-radius: 3px; color: var(--ink); background: #fff; font-size: 11px; }
.form-panel input::placeholder, .inline-form input::placeholder { color: #a8b2ac; }
.button { display: inline-flex; min-height: 34px; align-items: center; justify-content: center; padding: 0 13px; border: 0; border-radius: 3px; cursor: pointer; font-size: 11px; font-weight: 600; }
.button-primary { color: #fff; background: var(--forest); }
.button-primary:hover { background: #294b44; }
.button-dark { color: #fff; background: var(--forest-dark); }
.button-dark:hover { background: #38524e; }
.key-layout { display: grid; grid-template-columns: minmax(0, 1fr) 276px; align-items: start; gap: 15px; }
.inline-form { display: grid; gap: 9px; padding: 15px; border: 1px solid var(--line); background: #e9eeea; }
.inline-form label { color: #617169; font-size: 10px; }
.page-footer { margin-top: 38px; padding-top: 13px; border-top: 1px solid var(--line); color: #8b9690; font-size: 10px; }

.login-page { display: grid; min-height: 100vh; place-items: center; padding: 24px; background: var(--forest-dark); }
.login-shell { width: min(100%, 410px); padding: 39px; border: 1px solid #dce3dd; background: var(--surface); }
.login-shell .brand { margin-bottom: 44px; color: var(--ink); }
.login-shell h1 { margin-bottom: 12px; font-size: 30px; font-weight: 600; letter-spacing: -1px; line-height: 1.15; }
.login-form { display: grid; gap: 11px; margin-top: 28px; }
.login-form label { font-size: 11px; }
.login-form input[type="password"] { padding: 11px; font-size: 13px; }
.login-form .button { min-height: 41px; margin-top: 4px; }
.form-error { margin: 15px 0 0; color: #a3533b; font-size: 12px; }

@media (max-width: 1100px) {
  .main-content { padding-right: 25px; padding-left: 25px; }
  .content-grid, .key-layout { grid-template-columns: minmax(0, 1fr) 245px; }
  .route-caption { display: none; }
}
@media (max-width: 780px) {
  .sidebar { position: static; width: auto; height: auto; flex-direction: row; align-items: center; padding: 12px 16px; }
  .side-label, .sidebar-footer { display: none; }
  .sidebar .brand { margin-right: auto; }
  .nav-link { gap: 6px; padding: 8px; font-size: 11px; }
  .nav-symbol { display: none; }
  .main-content { margin: 0; padding: 0 18px 22px; }
  .topbar { height: 48px; }
  .page-heading { align-items: flex-start; flex-direction: column; padding: 26px 0 18px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .route-strip { gap: 8px; padding: 12px; }
  .route-node { min-width: 0; gap: 6px; }
  .route-node small { display: none; }
  .route-line { min-width: 12px; }
  .content-grid, .key-layout { grid-template-columns: 1fr; }
  .form-panel, .inline-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-panel h3 { grid-column: 1 / -1; }
  .form-panel button { grid-column: 1 / -1; }
}
@media (max-width: 460px) {
  .sidebar { flex-wrap: wrap; }
  .sidebar .brand { width: 100%; margin: 0 0 3px; }
  .nav-link { flex: 1; justify-content: center; padding: 7px 2px; }
  .main-content { padding-right: 12px; padding-left: 12px; }
  .page-heading h1 { font-size: 28px; }
  .metric { padding: 14px 13px; }
  .metric strong { font-size: 24px; }
  .route-strip { justify-content: space-between; }
  .route-node { flex-direction: column; align-items: flex-start; }
  .route-icon { width: 22px; height: 22px; flex-basis: 22px; }
  .secret-notice { grid-template-columns: 1fr; }
  .form-panel, .inline-form { grid-template-columns: 1fr; }
  .form-panel h3, .form-panel button { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
