:root {
  color-scheme: dark;
  --bg: #2e2e2e;
  --panel: #2e2e2e;
  --panel2: #2e2e2e;
  --border: #2e2e2e;
  --text: #fafafa;
  --muted: #fafafa;
  --accent: #fafafa;
  --accentstrong: #fafafa;
  --shadow:none;
}
* {
  box-sizing: border-box;
}
html {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 14px;
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
[hidden] {
  display: none !important;
}
a {
  color: var(--accentstrong);
}
:focus-visible {
  outline: 3px solid #fafafa;
  outline-offset: 3px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2,
h3 {
  letter-spacing: -0.03em;
}
h1 {
  font-size: 2.15rem;
}
h2 {
  font-size: 1.6rem;
}
h3 {
  font-size: 1.12rem;
}
p {
  line-height: 1.6;
}
.muted {
  color: var(--muted);
}
small {
  font-size: 0.79rem;
  color: var(--muted);
}
.full {
  width: 100%;
}
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.eyebrow,
.sidebar-label {
  font-weight: 750;
  letter-spacing: 0.14em;
  font-size: 0.69rem;
  color: var(--muted);
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 1.62rem;
  font-weight: 800;
  letter-spacing: -0.055em;
}
.brand small {
  display: block;
  font-size: 0.63rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 650;
}
.brand-mark {
  height: 37px;
  width: 37px;
  display: grid;
  place-items: center;
  background: #fafafa;
  color: #2e2e2e;
  font-size: 2rem;
  line-height: 1;
  border-radius:0;
  box-shadow:none;
}
.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:#2e2e2e;
}
.login-panel {
  width: min(100%, 430px);
  padding: 28px 30px 36px;
  background:#2e2e2e;
  border: 1px solid #2e2e2e;
  border-radius:0;
  box-shadow:none;
}
.brand-login {
  margin-bottom: 12px;
}
.login-orbit {
  margin: 23px auto 22px;
  display: grid;
  place-items: center;
  width: 128px;
  height: 128px;
  border-radius:0;
  border: 1px dashed #fafafa;
  background:#2e2e2e;
  position: relative;
}
.login-orbit:before,
.login-orbit:after {
  content: "";
  border-radius:0;
  position: absolute;
  border: 1px solid #2e2e2e;
  inset: 13px;
}
.login-orbit:after {
  inset: 30px;
  border: 1px solid #2e2e2e;
}
.orbit-core {
  display: grid;
  place-items: center;
  background: #fafafa;
  border: 4px solid #2e2e2e;
  width: 55px;
  height: 55px;
  border-radius:0;
  color: #2e2e2e;
  font-size: 2.6rem;
  transform: rotate(-12deg);
}
.login-panel h1 {
  margin: 0 0 7px;
}
.login-panel p {
  color: var(--muted);
}
.login-foot {
  text-align: center;
  margin: 25px 0 0;
  font-size: 0.75rem;
}
.form-error {
  color: #fafafa !important;
  margin-top: 16px;
}
.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 246px minmax(0, 1fr);
}
.sidebar {
  background: #2e2e2e;
  border-right: 1px solid var(--border);
  padding: 28px 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 38px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar .brand {
  padding-left: 12px;
}
.sidebar-label {
  padding-left: 12px;
  margin-bottom: 12px;
}
.desktop-nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.nav-btn {
  height: 45px;
  text-align: left;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 15px;
  color: #fafafa;
  background: transparent;
  border: 1px solid transparent;
  padding: 0 13px;
  border-radius:0;
  font-weight: 650;
}
.nav-btn:hover,
.nav-btn.active {
  color: #fafafa;
  background: #2e2e2e;
}
.nav-btn.active {
  border-color: #2e2e2e;
}
.nav-icon {
  width: 24px;
  text-align: center;
  font-size: 1.26rem;
  color: #fafafa;
}
.sidebar-bottom {
  margin-top: auto;
  display: grid;
  gap: 19px;
}
.security-panel {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #2e2e2e;
  border: 1px solid #2e2e2e;
  border-radius:0;
  padding: 14px 10px;
}
.security-panel strong {
  display: block;
  font-size: 0.83rem;
}
.security-panel small {
  display: block;
  margin-top: 3px;
  font-size: 0.74rem;
}
.status-spark {
  display: inline-block;
  flex: none;
  height: 8px;
  width: 8px;
  border-radius:0;
  background: #76d767;
  box-shadow:none;
}
.main {
  padding: 32px clamp(18px, 3.6vw, 58px) 80px;
  min-width: 0;
  max-width: 1700px;
  width: 100%;
  margin: auto;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}
.topbar h1 {
  margin: 5px 0 0;
  font-size: 2.2rem;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.server-pill {
  border: 1px solid var(--border);
  background: #2e2e2e;
  padding: 11px 14px;
  border-radius:0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fafafa;
  white-space: nowrap;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.82rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-height: 44px;
  padding: 10px 16px;
  border-radius:0;
  border: 1px solid transparent;
  font-weight: 750;
  line-height: 1.25;
  text-decoration: none;
  transition:
    background 0.18s,
    border-color 0.18s,
    transform 0.18s;
  white-space: nowrap;
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  color: #2e2e2e;
  background: var(--accent);
}
.btn-primary:hover {
  background: #fafafa;
}
.btn-secondary {
  background: #2e2e2e;
  border-color: #2e2e2e;
  color: #fafafa;
}
.btn-secondary:hover {
  background: #2e2e2e;
}
.btn-ghost {
  color: #fafafa;
  background: transparent;
  border-color: #2e2e2e;
}
.btn-ghost:hover {
  background: #2e2e2e;
}
.btn-danger {
  background: #2e2e2e;
  color: #fafafa;
  border-color: #2e2e2e;
}
.btn-light {
  background: #fafafa;
  color: #2e2e2e;
}
.btn-light:hover {
  background: #fafafa;
}
.view {
  display: none;
}
.view.active-view {
  display: block;
}
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 32px clamp(23px, 3vw, 43px);
  border-radius:0;
  background:#2e2e2e;
  min-height: 266px;
  overflow: hidden;
  position: relative;
}
.hero-copy {
  position: relative;
  z-index: 1;
}
.hero h2 {
  font-size: clamp(1.85rem, 3.2vw, 3.1rem);
  line-height: 1.08;
  margin: 12px 0 13px;
}
.hero p {
  max-width: 380px;
  line-height: 1.65;
  color: #fafafa;
}
.hero-label {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  font-weight: 850;
  color: #fafafa;
}
.hero-diagram {
  width: 225px;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: rotate(8deg);
}
.node {
  background: #2e2e2e;
  color: white;
  border: 1px solid #fafafa;
  border-radius:0;
  padding: 12px 17px;
  box-shadow:none;
  font-size: 0.88rem;
  white-space: nowrap;
}
.gateway-node {
  width: 125px;
  font-size: 1.15rem;
  text-align: center;
}
.gateway-node strong {
  margin-left: 6px;
}
.diagram-line {
  height: 21px;
  width: 2px;
  background: #fafafa;
}
.node-box {
  display: flex;
  gap: 6px;
}
.node-box .node {
  padding: 8px 11px;
}
.node-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius:0;
  margin-right: 4px;
}
.good {
  background: #76d767;
}
.purple {
  background: #fafafa;
}
.soft {
  background: #fafafa;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0 26px;
}
.metric,
.panel,
.service-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius:0;
}
.metric {
  padding: 21px 22px;
  display: flex;
  flex-direction: column;
  min-height: 139px;
}
.metric span {
  color: #fafafa;
  font-size: 0.85rem;
  font-weight: 600;
}
.metric strong {
  font-size: 2.6rem;
  letter-spacing: -0.07em;
  margin: 13px 0 2px;
}
.metric small {
  margin-top: auto;
}
.panel {
  overflow: hidden;
}
.panel-heading,
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
.panel-heading {
  padding: 22px 22px 14px;
}
.panel-heading h2,
.section-head h2 {
  margin-bottom: 4px;
}
.panel-heading p,
.section-head p {
  color: var(--muted);
  margin: 0;
}
.section-head {
  margin: 4px 0 23px;
}
.padded {
  padding: 24px;
}
.table-scroll {
  overflow-x: auto;
  max-width: 100%;
}
.data-table {
  border-collapse: collapse;
  min-width: 590px;
  width: 100%;
  text-align: left;
}
.data-table th {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: #fafafa;
  padding: 15px 23px;
  background: #2e2e2e;
  font-weight: 800;
}
.data-table td {
  padding: 16px 23px;
  border-top: 1px solid #2e2e2e;
  color: #fafafa;
  max-width: 400px;
  vertical-align: middle;
}
.data-table .row-click {
  cursor: pointer;
}
.data-table .row-click:hover {
  background: #2e2e2e;
}
.mono,
.data-table td.code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  overflow-wrap: anywhere;
  font-size: 0.85rem;
}
.status {
  font-size: 0.8rem;
  font-weight: 750;
  padding: 5px 9px;
  border-radius:0;
  display: inline-block;
}
.status-ok {
  color: #76d767;
  background: #2e2e2e;
}
.status-bad {
  color: #fafafa;
  background: #2e2e2e;
}
.status-other {
  color: #fafafa;
  background: #2e2e2e;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.service-card {
  padding: 22px;
}
.service-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.service-top h3 {
  margin: 3px 0 4px;
  font-size: 1.22rem;
  overflow-wrap: anywhere;
}
.service-card .service-target {
  margin-top: 20px;
  background: #2e2e2e;
  padding: 13px;
  border: 1px solid #2e2e2e;
  border-radius:0;
  color: #fafafa;
  font-family: ui-monospace, monospace;
  overflow-wrap: anywhere;
}
.service-label {
  font-size: 0.72rem;
  color: #fafafa;
  text-transform: uppercase;
  font-weight: 850;
  letter-spacing: 0.09em;
}
.service-meta {
  margin: 15px 0 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  font-size: 0.79rem;
  padding: 5px 10px;
  background: #2e2e2e;
  border: 1px solid #2e2e2e;
  border-radius:0;
  color: #fafafa;
}
.chip.ok {
  background: #2e2e2e;
  border-color: #2e2e2e;
  color: #76d767;
}
.chip.off {
  color: #fafafa;
  background: #2e2e2e;
  border-color: #2e2e2e;
}
.service-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.empty {
  grid-column: 1/-1;
  padding: 45px 26px;
  text-align: center;
  border: 1px dashed #2e2e2e;
  border-radius:0;
  background: #2e2e2e;
}
.empty h3 {
  font-size: 1.25rem;
}
.empty p {
  color: var(--muted);
}
.sensitive-pill {
  background: #2e2e2e;
  color: #fafafa;
  padding: 8px 12px;
  font-size: 0.78rem;
  font-weight: 750;
  border-radius:0;
}
.notice {
  line-height: 1.55;
  padding: 13px 17px;
  margin: 12px 0 16px;
  border-radius:0;
  font-size: 0.85rem;
}
.warn {
  background: #2e2e2e;
  border: 1px solid #2e2e2e;
  color: #fafafa;
}
.subtle-warn {
  margin-bottom: 0;
}
.filter-row {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  padding: 17px;
}
.filter-row #log-search {
  flex: 2 1 220px;
}
.filter-row select {
  flex: 1 1 126px;
}
.filter-row .btn {
  flex: none;
}
.pager {
  padding: 15px 19px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.detail-box {
  background: #2e2e2e;
  border: 1px solid #2e2e2e;
  padding: 13px 16px;
  border-radius:0;
  margin: 12px 0 17px;
  word-break: break-all;
  font-family: ui-monospace, monospace;
}
.settings-signout {
  margin-top: 17px;
}
.form-stack {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.form-stack .btn {
  margin-top: 11px;
}
.form-stack label,
.field label {
  font-weight: 650;
  color: #fafafa;
  font-size: 0.88rem;
}
input:not([type="checkbox"]),
select,
textarea {
  background: #2e2e2e;
  border: 1px solid #2e2e2e;
  border-radius:0;
  color: #fafafa;
  min-height: 45px;
  padding: 11px 13px;
  width: 100%;
  min-width: 0;
  outline: none;
}
input:not([type="checkbox"]):focus,
select:focus,
textarea:focus {
  border-color: #fafafa;
  box-shadow:none;
}
textarea {
  min-height: 110px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #fafafa;
}
input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
  flex: none;
  cursor: pointer;
}
.mobile-nav {
  display: none;
}
dialog {
  color: var(--text);
  background: #2e2e2e;
  border: 1px solid #2e2e2e;
  border-radius:0;
  box-shadow:none;
  padding: 0;
  max-height: min(92vh, 1024px);
}
dialog::backdrop {
  background: #141414;
  backdrop-filter: blur(6px);
}
.editor-dialog {
  width: min(760px, calc(100% - 24px));
}
.log-dialog {
  width: min(880px, calc(100% - 24px));
}
.dialog-head {
  padding: 22px 27px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
}
.dialog-head h2 {
  margin: 7px 0 0;
}
.dialog-body {
  max-height: calc(92vh - 175px);
  overflow: auto;
  padding: 22px 27px 26px;
}
.dialog-footer {
  border-top: 1px solid var(--border);
  display: flex;
  gap: 11px;
  justify-content: flex-end;
  padding: 15px 27px;
  background: #2e2e2e;
}
.icon-btn {
  width: 44px;
  height: 44px;
  background: #2e2e2e;
  border: 1px solid #2e2e2e;
  color: #fafafa;
  border-radius:0;
  font-size: 1.8rem;
}
.form-section {
  font-size: 0.86rem;
  color: #fafafa;
  letter-spacing: 0.11em;
  margin: 14px 0 19px;
}
.form-section span {
  color: #fafafa;
  font-size: 1.1rem;
  letter-spacing: 0;
  margin-left: 10px;
}
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 14px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 16px;
}
.field small {
  line-height: 1.45;
}
.field small strong {
  color: #fafafa;
  overflow-wrap: anywhere;
}
.switch-row {
  display: flex;
  align-items: center;
  gap: 13px;
  background: #2e2e2e;
  border: 1px solid #2e2e2e;
  border-radius:0;
  padding: 14px;
  margin: 12px 0 24px;
  cursor: pointer;
}
.switch-row span {
  font-weight: 700;
}
.switch-row small {
  display: block;
  font-weight: 450;
  margin-top: 5px;
  line-height: 1.5;
}
.token-cards {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin: 20px 0;
}
.token-card {
  background: #2e2e2e;
  border: 1px solid #2e2e2e;
  border-radius:0;
  padding: 17px;
}
.token-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}
.token-card-title h4 {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 1rem;
}
.token-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 15px;
}
.token-secret {
  grid-column: 1/-1;
}
.inline-generate {
  display: flex;
  gap: 8px;
}
.inline-generate input {
  flex: 1;
}
.token-secret .inline-generate {
  flex-wrap: wrap;
}
.token-secret .inline-generate input {
  flex: 1 1 230px;
}
.token-secret .btn {
  min-height: 44px;
}
.saved-token-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  border: 1px solid #2e2e2e;
  border-radius:0;
  padding: 9px;
}
.saved-token-row span {
  color: #fafafa;
  font-size: 0.84rem;
}
.saved-token-value {
  flex: 1 1 130px;
  min-width: 0;
  overflow-wrap: anywhere;
  color: #fafafa;
}
.mini-label {
  display: flex;
  align-items: center;
  min-height: 44px;
  gap: 8px;
  margin-bottom: 6px;
  color: #fafafa;
  font-weight: 650;
  font-size: 0.82rem;
}
.token-card .field {
  margin: 0;
}
.token-card .field input {
  min-height: 44px;
}
.token-card .muted {
  font-size: 0.78rem;
}
.token-option {
  background: #2e2e2e;
  border: 1px solid #2e2e2e;
  border-radius:0;
  padding: 10px;
}
.token-option label {
  cursor: pointer;
}
.token-option .option-value {
  margin-top: 8px;
}
.token-option .option-value[hidden] {
  display: none !important;
}
.token-actions {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-wrap: wrap;
}
.danger-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  color: #fafafa;
  border: none;
  background: transparent;
  border-radius:0;
  padding: 10px 12px;
}
.log-json {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.83rem;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  background: #2e2e2e;
  border: 1px solid #2e2e2e;
  padding: 18px;
  border-radius:0;
  max-width: 100%;
  overflow: auto;
}
.toast {
  position: fixed;
  right: 22px;
  bottom: 25px;
  z-index: 100;
  border: 1px solid #fafafa;
  background: #2e2e2e;
  color: #fafafa;
  border-radius:0;
  box-shadow:none;
  padding: 14px 20px;
  max-width: min(430px, calc(100vw - 40px));
  overflow-wrap: anywhere;
}
@media (max-width: 1100px) {
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero-diagram {
    width: 190px;
  }
  .shell {
    grid-template-columns: 225px minmax(0, 1fr);
  }
  .sidebar {
    padding: 26px 12px;
  }
}
@media (max-width: 850px) {
  .shell {
    display: block;
  }
  .sidebar {
    display: none;
  }
  .main {
    padding: 24px 18px 104px;
  }
  .mobile-nav {
    position: fixed;
    display: flex;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 20;
    min-height: 68px;
    background: #2e2e2e;
    border-top: 1px solid #2e2e2e;
    justify-content: space-around;
    align-items: center;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    backdrop-filter: blur(12px);
  }
  .mobile-nav button {
    min-width: 68px;
    min-height: 51px;
    background: transparent;
    border: 0;
    color: #fafafa;
    font-size: 0.71rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    border-radius:0;
  }
  .mobile-nav button span {
    font-size: 1.45rem;
  }
  .mobile-nav button.active {
    color: #fafafa;
    background: #2e2e2e;
  }
  .topbar {
    align-items: flex-start;
  }
  .server-pill {
    display: none;
  }
  .services-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 640px) {
  html {
    font-size: 14px;
  }
  .main {
    padding: 23px 14px 106px;
  }
  .topbar {
    margin-bottom: 21px;
  }
  .topbar h1 {
    font-size: 1.9rem;
  }
  .top-actions .btn {
    padding: 10px 12px;
    min-height: 43px;
    font-size: 0.82rem;
  }
  .hero {
    padding: 26px 23px;
    min-height: 235px;
  }
  .hero p {
    max-width: 290px;
  }
  .hero-diagram {
    display: none;
  }
  .metric-grid {
    gap: 10px;
  }
  .metric {
    padding: 18px 14px;
    min-height: 123px;
  }
  .metric strong {
    font-size: 2.13rem;
  }
  .services-grid {
    grid-template-columns: 1fr;
  }
  .section-head {
    align-items: flex-start;
  }
  .section-head .btn {
    padding: 10px 11px;
  }
  .data-table th,
  .data-table td {
    padding: 13px 15px;
  }
  .filter-row {
    gap: 9px;
  }
  .filter-row select {
    flex: 1 1 43%;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .dialog-head,
  .dialog-body,
  .dialog-footer {
    padding-left: 17px;
    padding-right: 17px;
  }
  .field-grid,
  .token-fields {
    grid-template-columns: 1fr;
  }
  .token-secret {
    grid-column: 1;
  }
  .dialog-body {
    max-height: calc(94dvh - 154px);
  }
  dialog {
    max-height: 94dvh;
  }
  .dialog-footer .btn {
    flex: 1;
  }
  .token-actions {
    gap: 8px;
  }
  .token-card-title {
    flex-wrap: wrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

/* Dense, square management UI. */
:root{color-scheme:dark;--bg:#141414;--panel:#2e2e2e;--panel2:#2e2e2e;--border:#2e2e2e;--text:#fafafa;--muted:#fafafa;--accent:#76d767;--accentstrong:#76d767;--shadow:none}
body,.auth-screen,.login-panel,.shell,.sidebar,.main,dialog{background:#141414;color:#fafafa}
.panel,.metric,.service-card,.login-panel,.token-card,.token-option,.detail-box,.notice,.dialog-head,.dialog-footer,.dialog-body{background:#2e2e2e;color:#fafafa}
button,input,select,textarea,.btn,.nav-btn,.icon-btn,.chip,.status,.toast{border-radius:0!important;box-shadow:none!important;accent-color:#76d767}
.btn-primary,.nav-btn.active,.mobile-nav button.active{background:#76d767!important;color:#141414!important;border-color:#76d767!important}
.btn-secondary,.btn-ghost,.btn-danger,.nav-btn:hover,.icon-btn{background:#2e2e2e;color:#fafafa;border-color:#2e2e2e}
.btn:hover,.nav-btn:hover{outline:1px solid #76d767}
a,.nav-icon,.eyebrow,.form-section,.field small strong{color:#76d767}
small,.muted,.service-label,.data-table th,.data-table td,.nav-btn,.metric span{color:#fafafa}
.status-spark,.server-pill,.sensitive-pill,.hero,.login-orbit,.sidebar-label{display:none!important}
.shell{grid-template-columns:210px minmax(0,1fr)}
.sidebar{padding:12px 8px;gap:12px;background:#141414;border-right:1px solid #2e2e2e}
.sidebar .brand{padding:4px 10px}
#sidebar-toggle{width:100%;height:32px;text-align:left;padding:0 13px;background:#2e2e2e;color:#fafafa;border:0}
.nav-btn{height:38px;padding:0 10px;gap:10px}
.sidebar-bottom{gap:4px}
.logout-icon{display:inline-block;margin-right:8px}
.sidebar-collapsed{grid-template-columns:54px minmax(0,1fr)}
.sidebar-collapsed .sidebar{padding:10px 4px}
.sidebar-collapsed .sidebar .brand,.sidebar-collapsed .nav-text{display:none}
.sidebar-collapsed .nav-btn{justify-content:center;padding:0}
.sidebar-collapsed .nav-icon{width:auto}
.sidebar-collapsed #sidebar-toggle{text-align:center;padding:0}
.sidebar-collapsed .sidebar-bottom .btn{padding:8px 0}
.sidebar-collapsed .logout-icon{margin:0}
.main{max-width:none;margin:0;padding:16px 20px 28px}
.topbar{margin-bottom:16px}
.topbar h1{font-size:1.65rem;margin:0}
.section-head{margin:0 0 12px}
.section-head h2,.panel-heading h2{font-size:1.12rem}
.metric-grid{gap:8px;margin-bottom:12px}
.metric{min-height:0;padding:12px}
.metric strong{font-size:1.7rem}
.panel-heading{padding:12px}
.services-grid{gap:8px}
.service-card{padding:12px}
.service-card .service-target{margin-top:8px;padding:8px;background:#141414;border-color:#141414}
.service-meta{margin:8px 0;gap:4px}
.chip{padding:3px 6px}
.table-scroll{display:block;width:100%;max-width:100%;overflow-x:auto}
.data-table{table-layout:auto;width:100%;min-width:760px;border-collapse:collapse}
.data-table th,.data-table td{padding:9px 12px;text-align:left;vertical-align:top}
.data-table th{background:#2e2e2e;white-space:nowrap}
.data-table td{max-width:none;overflow-wrap:normal;word-break:normal}
.data-table th:first-child,.data-table td:first-child{min-width:145px}
.data-table th:nth-child(2),.data-table td:nth-child(2){min-width:170px}
.data-table th:nth-child(3),.data-table td:nth-child(3){min-width:270px}
.data-table th:nth-child(4),.data-table td:nth-child(4){min-width:76px}
.data-table td.code{overflow-wrap:anywhere}
.data-table .row-click:hover{background:#2e2e2e;outline:1px solid #76d767}
.filter-row{gap:6px;padding:10px}
.settings-grid{gap:8px}
.padded{padding:12px}
.field,.field-grid,.token-fields{gap:6px}
.dialog-head,.dialog-body,.dialog-footer{padding:12px 16px}
.toast{background:#2e2e2e;color:#fafafa;border-color:#76d767}
@media(max-width:850px){.shell,.sidebar-collapsed{display:block}.sidebar{display:none}.main{padding:12px 10px 82px}.mobile-nav{background:#141414;border-top:1px solid #2e2e2e;backdrop-filter:none}.mobile-nav button{color:#fafafa;background:#141414}}
@media(max-width:640px){.main{padding:10px 8px 82px}.metric-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.metric{padding:9px}.data-table{min-width:760px}.topbar{gap:8px}}

.overview-table { table-layout: fixed; min-width: 720px; }
.overview-table th:nth-child(1) { width: 190px; }
.overview-table th:nth-child(2) { width: 22%; }
.overview-table th:nth-child(4) { width: 90px; }
.overview-table td { overflow-wrap: anywhere; min-width: 0; }
.service-statistics { border-top: 1px solid #2e2e2e; padding: 10px 0; margin-top: 8px; font-size: .85rem; }
.field-error { color: #fafafa; border-left: 3px solid #76d767; padding-left: 8px; }
input[aria-invalid="true"] { border-color: #76d767; }
.editor-dialog { overflow: hidden; max-height: 92dvh; }
.editor-dialog form { display: flex; flex-direction: column; max-height: 92dvh; min-height: 0; overflow: hidden; }
.editor-dialog .dialog-head, .editor-dialog .dialog-footer { flex: none; }
.editor-dialog .dialog-body { flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; overflow-x: hidden; }
.editor-dialog .form-section { border-left: 2px solid #76d767; padding-left: 12px; }
.editor-dialog .field-grid { border-left: 1px solid #2e2e2e; padding-left: 12px; }
input:not([type="checkbox"]), textarea, select { background: #141414; }

:root{--color-bg:#141414;--color-panel:#2e2e2e;--color-text:#fafafa;--color-accent:#76d767;--color-error:#d76767ff;--color-divider:#141414;--spacing-xs:4px;--spacing-sm:8px;--spacing-md:12px;--spacing-lg:16px;--spacing-xl:24px;--radius:0px;--control-height:42px;--bg:var(--color-bg);--panel:var(--color-panel);--panel2:var(--color-panel);--border:var(--color-divider);--text:var(--color-text);--muted:var(--color-text);--accent:var(--color-accent);--accentstrong:var(--color-accent)}
.overview-table{table-layout:auto!important;width:100%;min-width:850px}
.overview-table th,.overview-table td{width:auto!important;min-width:0!important}
.overview-table th:first-child,.overview-table td:first-child{min-width:190px!important}
.overview-table th:nth-child(2),.overview-table td:nth-child(2){min-width:180px!important}
.overview-table th:nth-child(3),.overview-table td:nth-child(3){min-width:330px!important}
.overview-table th:nth-child(4),.overview-table td:nth-child(4){min-width:90px!important}
.overview-table td.code{white-space:nowrap;word-break:normal;overflow-wrap:normal}
.overview-table td:nth-child(3){max-width:55vw;overflow:hidden;text-overflow:ellipsis}
#view-logs .data-table tbody tr{border-bottom:1px solid var(--color-divider)}
.field-error,.form-error{color:var(--color-error)!important;border-color:var(--color-error)!important}
input[aria-invalid="true"]{border-color:var(--color-error)!important}
.editor-dialog .form-section{background:var(--color-bg);padding:var(--spacing-md) var(--spacing-lg);border-left:2px solid var(--color-accent)}
.editor-dialog .form-section span{color:var(--color-text)}
.chart-panel{margin-bottom:var(--spacing-lg)}
.chart-controls{display:flex;gap:var(--spacing-sm);flex-wrap:wrap}
.chart-controls button[aria-pressed=true]{background:var(--color-accent);color:var(--color-bg)}
.chart-area{padding:var(--spacing-md);min-height:220px}
.chart-area svg{width:100%;height:220px;display:block}
.chart-legend{display:flex;flex-wrap:wrap;gap:var(--spacing-lg);padding:0 var(--spacing-md) var(--spacing-md)}
.chart-legend span{display:inline-flex;align-items:center;gap:7px;font-weight:600}
.chart-legend .legend-requests{color:#76d767}
.chart-legend .legend-forbidden{color:#d76767}
.chart-legend .legend-errors{color:#fafafa}
.chart-legend span:before{content:"";display:inline-block;flex:0 0 11px;width:11px;height:11px;background:currentColor}

/* Activity rows use grid rather than browser table auto-sizing; never wrap hosts/URLs by character. */
.recent-activity{width:100%;overflow-x:auto;min-width:0}
.recent-row{display:grid;grid-template-columns:minmax(165px,1.1fr) minmax(155px,1fr) minmax(240px,2.5fr) minmax(80px,.6fr);min-width:690px;align-items:center;column-gap:12px;padding:10px 12px;border-bottom:1px solid var(--color-divider)}
.recent-row>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.recent-head{font-size:.72rem;font-weight:800;letter-spacing:.08em}
.recent-empty{padding:18px 12px}
#view-logs .data-table tbody td{border-bottom:1px solid var(--color-divider);border-top:0}
.sidebar-collapsed .nav-btn{font-size:0;overflow:hidden;gap:0;white-space:nowrap}
.sidebar-collapsed .nav-icon{font-size:20px;display:block;flex:0 0 24px;text-align:center}
.sidebar-collapsed .sidebar-bottom .btn{font-size:0}
.sidebar-collapsed .logout-icon{font-size:20px}
.sidebar-collapsed .sidebar{width:54px}
.sidebar-collapsed .desktop-nav{width:100%}
.sidebar-collapsed .main{min-width:0}

/* Active icon follows the selected navigation item's dark foreground. */
.desktop-nav .nav-btn.active .nav-icon,.mobile-nav button.active .nav-icon{color:var(--color-bg)!important}
#view-logs .data-table{table-layout:fixed;width:100%;min-width:900px}
#view-logs .data-table th,#view-logs .data-table td{min-width:0!important;width:auto;max-width:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#view-logs .data-table th:nth-child(1){width:24%}
#view-logs .data-table th:nth-child(2){width:21%}
#view-logs .data-table th:nth-child(3){width:35%}
#view-logs .data-table th:nth-child(4){width:8%}
#view-logs .data-table th:nth-child(5){width:12%}
#view-logs .data-table td.code{overflow-wrap:normal;word-break:normal}
#view-logs .data-table .status-cell{white-space:nowrap}
.recent-row{grid-template-columns:minmax(165px,1.1fr) minmax(155px,1fr) minmax(240px,2.5fr) minmax(80px,.6fr)}
.recent-row .status-cell{overflow:visible}
.status-code{font-variant-numeric:tabular-nums;font-weight:750}

/* Shared async feedback for every API call; scoped to its originating view/dialog. */
@keyframes popy-spin { to { transform:rotate(360deg) } }
.busy-spinner{display:inline-block;width:18px;height:18px;flex:none;border:2px solid var(--color-accent);border-right-color:transparent;border-radius:50%!important;animation:popy-spin .7s linear infinite}
.network-indicator{position:fixed;top:12px;right:12px;z-index:120;display:none;align-items:center;gap:10px;background:var(--color-panel);color:var(--color-text);border:1px solid var(--color-accent);padding:10px 14px;pointer-events:none}
body.is-loading .network-indicator{display:flex}
.view.is-loading::after,dialog.is-loading::after{content:"";position:absolute;top:12px;right:12px;width:20px;height:20px;border:2px solid var(--color-accent);border-right-color:transparent;border-radius:50%;animation:popy-spin .7s linear infinite;pointer-events:none;z-index:4}
.view.is-loading{position:relative}
button.is-loading{position:relative;padding-right:38px!important}
button.is-loading::after{content:"";position:absolute;right:10px;top:calc(50% - 8px);width:16px;height:16px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:popy-spin .7s linear infinite;pointer-events:none}
@media(prefers-reduced-motion:reduce){.busy-spinner,.view.is-loading::after,dialog.is-loading::after,button.is-loading::after{animation-duration:2s}}

/* Request details: the dialog body is the only scroll container. */
.log-dialog{display:flex;flex-direction:column;max-height:92dvh;overflow:hidden}
.log-dialog .dialog-head,.log-dialog .dialog-footer{flex:0 0 auto}
.log-dialog .dialog-body{flex:1 1 auto;min-height:0;max-height:none;overflow-y:auto;overflow-x:hidden}
.log-dialog .log-json{max-height:none;overflow:visible;white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:700px){.log-dialog{max-height:94dvh}}
