:root {
  --paper: #f4f1e8;
  --paper-2: #fbf8f1;
  --ink: #171814;
  --muted: #726e62;
  --faint: #938d7e;
  --line: #d5cebd;
  --line-soft: #e4ddce;
  --green: #194e3b;
  --green-soft: #dfe7dd;
  --orange: #c95e35;
  --red: #9e3c2f;
  --serif: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", Georgia, serif;
  --sans: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; }
body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 8%, rgba(255, 255, 255, .34), transparent 32%),
    repeating-linear-gradient(0deg, rgba(23, 24, 20, .018) 0 1px, transparent 1px 5px),
    var(--paper);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
::selection { background: var(--green); color: var(--paper-2); }

.wrap { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(244, 241, 232, .92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.topbar-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}
.brand { display: inline-flex; align-items: center; gap: 13px; min-width: 0; }
.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper-2);
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1;
  flex: 0 0 auto;
}
.brand-copy { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-family: var(--serif); font-size: 19px; line-height: 1.2; font-weight: 600; letter-spacing: .01em; }
.brand-tag { margin-top: 3px; font-family: var(--mono); font-size: 8px; line-height: 1.4; letter-spacing: .12em; color: var(--faint); white-space: nowrap; }
.top-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  background: rgba(251, 248, 241, .6);
}
.user-chip b { font-size: 12px; line-height: 1.2; }
.user-chip span { font-family: var(--mono); font-size: 8px; line-height: 1.3; letter-spacing: .08em; color: var(--faint); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, .88fr);
  gap: 54px;
  align-items: end;
  padding: 62px 0 48px;
  border-bottom: 1px solid var(--ink);
}
.hero-copy { min-width: 0; }
.eyebrow { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; font-family: var(--mono); font-size: 9px; line-height: 1.5; letter-spacing: .12em; color: var(--faint); }
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--orange); flex: 0 0 auto; }
.eyebrow span:first-child { color: var(--orange); }
.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(48px, 4.6vw, 64px);
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -.035em;
}
.hero h1 em { font-style: normal; color: var(--green); white-space: nowrap; }
.hero-lede { max-width: 650px; margin: 26px 0 0; color: #565449; font-size: 14px; line-height: 1.9; }
.hero-points { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 9px; letter-spacing: .08em; color: var(--faint); }
.hero-points b { margin-right: 5px; color: var(--orange); font-weight: 500; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: rgba(251, 248, 241, .36);
}
.stat { min-width: 0; padding: 18px 17px 16px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat span { display: block; font-family: var(--mono); font-size: 9px; line-height: 1.4; letter-spacing: .06em; color: var(--faint); }
.stat b { display: block; margin: 10px 0 4px; font-family: var(--serif); font-size: 42px; line-height: .92; font-weight: 600; letter-spacing: -.03em; }
.stat small { font-family: var(--mono); font-size: 7px; line-height: 1.3; letter-spacing: .12em; color: #a29b8b; }

.flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.flow-item { display: flex; gap: 14px; padding: 18px 18px 18px 0; border-right: 1px solid var(--line); }
.flow-item:not(:first-child) { padding-left: 18px; }
.flow-item:last-child { border-right: 0; padding-right: 0; }
.flow-no { font-family: var(--mono); font-size: 10px; line-height: 1.5; color: var(--orange); flex: 0 0 auto; }
.flow-item b { display: block; font-size: 12px; line-height: 1.4; font-weight: 600; }
.flow-item p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }

.section { margin-top: 48px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 20px; }
.section-head > div { min-width: 0; }
.section-kicker, .panel-kicker { display: block; margin-bottom: 7px; font-family: var(--mono); font-size: 8px; line-height: 1.4; letter-spacing: .12em; color: var(--orange); }
.section-head h2 { margin: 0; font-family: var(--serif); font-size: 32px; line-height: 1.25; font-weight: 600; letter-spacing: -.02em; }
.section-head > p { max-width: 360px; margin: 0 0 2px; color: var(--muted); font-size: 11px; line-height: 1.7; text-align: right; }

.panel { border: 1px solid var(--line); background: var(--paper-2); padding: 26px; }
.login-panel, .admin-entry { display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap; }
.login-panel h3, .admin-entry h3 { margin: 0; font-family: var(--serif); font-size: 24px; line-height: 1.3; font-weight: 600; }
.login-panel p, .admin-entry p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }

.form-panel { padding: 28px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { margin-bottom: 17px; }
.field label { display: block; margin-bottom: 7px; font-family: var(--mono); font-size: 9px; line-height: 1.4; letter-spacing: .06em; color: var(--faint); }
.input, .select, .textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fffdf8;
  color: var(--ink);
  padding: 10px 12px;
  font-size: 13px;
  outline: none;
  transition: border-color .18s ease, background .18s ease;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--green); background: #fff; box-shadow: 0 0 0 2px rgba(25, 78, 59, .1); }
.input::placeholder, .textarea::placeholder { color: #aaa393; }
.textarea { min-height: 86px; resize: vertical; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.form-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 4px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper-2);
  color: var(--ink);
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.btn:hover { background: var(--ink); color: var(--paper-2); }
.btn:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.btn.primary { background: var(--green); border-color: var(--green); color: #f8f5ec; }
.btn.primary:hover { background: var(--ink); border-color: var(--ink); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn.ghost:hover { border-color: var(--ink); background: var(--ink); color: var(--paper-2); }
.btn.danger { border-color: #b35c48; color: var(--red); background: transparent; }
.btn.danger:hover { background: var(--red); border-color: var(--red); color: #fff; }
.btn.small { min-height: 29px; padding: 0 10px; font-size: 10px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:disabled:hover { background: var(--paper-2); color: var(--ink); }

.muted { color: var(--muted); font-size: 11px; line-height: 1.65; }

.request-list, .node-list { display: grid; gap: 12px; }
.request, .node { border: 1px solid var(--line); background: rgba(251, 248, 241, .72); padding: 20px 22px; }
.request:hover, .node:hover { border-color: #bdb5a3; }
.item-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.item-title { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; font-size: 15px; line-height: 1.45; font-weight: 600; }
.item-meta { color: var(--faint); font-family: var(--mono); font-size: 9px; line-height: 1.6; letter-spacing: .04em; }
.item-body { margin-top: 12px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.item-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 15px; }
.rebind-box { margin-top: 14px; padding: 12px; border: 1px solid var(--line); background: var(--paper-2); }
.empty { padding: 24px 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); color: var(--muted); font-size: 11px; line-height: 1.7; }

.tag { display: inline-flex; align-items: center; min-height: 19px; padding: 0 7px; border: 1px solid var(--line); background: #eee8db; color: var(--muted); font-family: var(--mono); font-size: 8px; line-height: 1.2; letter-spacing: .06em; white-space: nowrap; }
.tag.ok { border-color: #aebfae; background: var(--green-soft); color: var(--green); }
.tag.warn { border-color: #dfbaa9; background: #f3e0d6; color: #8c432a; }
.tag.bad { border-color: #d8b4ac; background: #f0dcd7; color: var(--red); }
.tag.info { border-color: #b9c8c0; background: #e4ebe5; color: #365e4e; }

.node-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.app-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; min-height: 55px; padding: 9px 11px; border: 1px solid var(--line-soft); background: #fffdf7; }
.app-name { font-size: 11px; line-height: 1.3; font-weight: 600; }
.app-key { margin-top: 3px; font-family: var(--mono); font-size: 8px; line-height: 1.3; color: var(--faint); }
.app-row input[type="checkbox"] { accent-color: var(--green); width: 14px; height: 14px; }
.app-row input[type="number"], .slots-input { width: 58px; padding: 5px 6px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 11px; }
.slots-input { width: 64px; display: inline-block; margin-left: 3px; }

/* ---------- 节点级应用 env 折叠区 ---------- */
.app-env { flex: 0 0 100%; border-top: 1px dashed var(--line-soft); padding-top: 7px; }
.app-env > summary { cursor: pointer; font-family: var(--mono); font-size: 9px; letter-spacing: .04em; color: var(--muted); list-style: none; }
.app-env > summary::-webkit-details-marker { display: none; }
.app-env > summary::before { content: "▸ "; }
.app-env[open] > summary::before { content: "▾ "; }
.app-env[open] > summary { color: var(--ink); }
.env-list { display: grid; gap: 6px; margin-top: 7px; }
.env-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.env-row .env-key { flex: 0 0 auto; max-width: 45%; overflow: hidden; font-family: var(--mono); font-size: 8px; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }
.env-row .env-val { flex: 1; min-width: 0; overflow-wrap: anywhere; font-family: var(--mono); font-size: 9px; color: var(--muted); }
.env-input { flex: 1; min-width: 0; padding: 4px 6px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-family: var(--mono); font-size: 10px; }
.env-row .btn { flex: 0 0 auto; }
.env-row.stale .env-key, .env-row.stale .env-val { color: var(--faint); text-decoration: line-through; }
.env-add { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.env-select { padding: 3px 6px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-family: var(--mono); font-size: 9px; }

.code-row { display: flex; gap: 8px; align-items: stretch; margin-top: 9px; }
.code-label { display: flex; align-items: center; width: 62px; flex: 0 0 auto; font-family: var(--mono); font-size: 8px; color: var(--faint); }
.code-block { flex: 1; min-width: 0; overflow-x: auto; margin: 0; padding: 10px 11px; background: #17231d; color: #e7eadf; font-family: var(--mono); font-size: 9px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.code-block::selection { background: var(--orange); color: #fff; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); background: var(--paper-2); }
.table { width: 100%; border-collapse: collapse; min-width: 720px; }
.table th { padding: 11px 13px; border-bottom: 1px solid var(--ink); text-align: left; font-family: var(--mono); font-size: 8px; line-height: 1.4; letter-spacing: .07em; color: var(--faint); font-weight: 500; white-space: nowrap; }
.table td { padding: 13px; border-bottom: 1px solid var(--line-soft); font-size: 11px; line-height: 1.6; vertical-align: top; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: rgba(25, 78, 59, .035); }
.table .btn { margin-bottom: 3px; }

/* ---------- 顶栏直属分区导航、视图与概览 ---------- */
.topbar-inner {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
}
.top-nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
  flex-wrap: wrap;
  min-width: 0;
}
.nav-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 0 6px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #4b4a43;
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
}
.nav-item:hover { color: var(--green); }
.nav-item.active { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }
.nav-no { font-family: var(--mono); font-size: 9px; line-height: 1; letter-spacing: .04em; color: #9a9588; }
.nav-item.active .nav-no { color: var(--green); }
.nav-item .badge {
  display: inline-grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--orange);
  color: #fff;
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1;
}
.nav-link { color: var(--faint); font-family: var(--mono); font-size: 9px; letter-spacing: .06em; }
.nav-link:hover { color: var(--ink); }

.console-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding: 34px 0 22px;
  border-bottom: 1px solid var(--ink);
}
.console-head h1 { margin: 0; font-family: var(--serif); font-size: clamp(32px, 3.6vw, 46px); line-height: 1.1; font-weight: 600; letter-spacing: -.03em; }
.console-lede { max-width: 640px; margin: 14px 0 0; color: #565449; font-size: 12px; line-height: 1.85; }
.console-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  background: rgba(251, 248, 241, .4);
}
.stat-strip .stat { padding: 15px 17px 13px; }
.stat-strip .stat b { font-size: 34px; }

.view { margin-top: 30px; }
.view[hidden] { display: none; }
.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.view-head h2 { margin: 0; font-family: var(--serif); font-size: 27px; line-height: 1.25; font-weight: 600; letter-spacing: -.02em; }
.view-head p { max-width: 460px; margin: 8px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 6px 12px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 11px; white-space: nowrap; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.active { background: var(--ink); border-color: var(--ink); color: var(--paper-2); }

.applicant { display: inline-flex; align-items: baseline; gap: 7px; }
.applicant b { font-size: 14px; }
.applicant span { font-family: var(--mono); font-size: 9px; color: var(--faint); }
.req-machine { color: var(--muted); font-size: 12px; font-weight: 400; }

.overview-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 16px; align-items: start; }
.overview-side { display: grid; gap: 16px; }
.ov-panel { border: 1px solid var(--line); background: rgba(251, 248, 241, .72); padding: 18px 20px; }
.ov-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.ov-head h2 { margin: 0; font-family: var(--serif); font-size: 21px; line-height: 1.25; font-weight: 600; }
.pending-list { display: grid; }
.pending-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line-soft); }
.pending-main { display: grid; gap: 2px; min-width: 0; }
.pending-main b { font-size: 13px; }
.pending-actions { display: flex; gap: 6px; flex-shrink: 0; }
.kv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.kv { border: 1px solid var(--line-soft); background: #fffdf7; padding: 10px 12px; }
.kv span { display: block; font-family: var(--mono); font-size: 8px; letter-spacing: .06em; color: var(--faint); }
.kv b { display: block; margin-top: 4px; font-family: var(--serif); font-size: 24px; line-height: 1; }
.event-list { display: grid; }
.event-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line-soft); font-size: 11px; }
.event-row:first-child { border-top: 0; }

/* ---------- 我的负载机：概览卡、槽位与流程行 ---------- */
.node-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 14px; }
.admin-node-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kv.sm b { font-size: 17px; line-height: 1.2; letter-spacing: -.01em; }
.slot-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.slot-line .slots-input { flex: 0 0 auto; margin-left: 0; }
.slot-label { font-family: var(--mono); font-size: 8px; letter-spacing: .06em; color: var(--faint); }
.slot-line .muted { font-size: 10px; }
.flow-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-bottom: 16px;
  padding: 11px 14px;
  border: 1px solid var(--line-soft);
  background: rgba(251, 248, 241, .5);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .04em;
  color: var(--muted);
}
.flow-line b { margin-right: 6px; color: var(--orange); font-weight: 500; }
.empty .btn { margin-left: 6px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 40;
  transform: translate(-50%, 18px);
  max-width: min(520px, calc(100vw - 40px));
  padding: 10px 16px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper-2);
  font-size: 12px;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.site-footer { display: flex; justify-content: space-between; gap: 24px; margin-top: 68px; padding: 20px 0 34px; border-top: 1px solid var(--line); color: var(--faint); font-family: var(--mono); font-size: 8px; line-height: 1.6; letter-spacing: .06em; }
.footer-note { text-align: right; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 36px; align-items: start; padding-top: 48px; }
  .hero-copy { max-width: 720px; }
  .hero-stats { max-width: 640px; }
  .node-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-node-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .wrap { width: calc(100% - 32px); }
  .topbar-inner { min-height: 64px; }
  .brand-mark { width: 33px; height: 33px; font-size: 19px; }
  .brand-name { font-size: 17px; }
  .brand-tag { display: none; }
  .hero { padding: 36px 0 32px; gap: 28px; }
  .eyebrow { margin-bottom: 18px; font-size: 8px; }
  .hero h1 { font-size: clamp(38px, 11vw, 48px); letter-spacing: -.04em; }
  .hero h1 em { white-space: normal; }
  .hero-lede { margin-top: 20px; font-size: 12px; line-height: 1.8; }
  .hero-points { gap: 14px; margin-top: 22px; padding-top: 14px; font-size: 8px; }
  .hero-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat { padding: 13px 10px; }
  .stat b { font-size: 31px; }
  .stat small { display: none; }
  .flow { grid-template-columns: 1fr; }
  .flow-item { border-right: 0; border-bottom: 1px solid var(--line-soft); padding: 13px 0; }
  .flow-item:not(:first-child) { padding-left: 0; }
  .flow-item:last-child { border-bottom: 0; }
  .section { margin-top: 38px; }
  .section-head { align-items: flex-start; flex-direction: column; gap: 8px; margin-bottom: 15px; }
  .section-head h2 { font-size: 25px; }
  .section-head > p { max-width: none; text-align: left; font-size: 10px; }
  .panel, .form-panel { padding: 18px; }
  .login-panel, .admin-entry { align-items: flex-start; flex-direction: column; }
  .grid-2 { grid-template-columns: 1fr; gap: 0; }
  .request, .node { padding: 16px; }
  .item-title { font-size: 14px; }
  .node-grid { grid-template-columns: 1fr; }
  .node-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kv.sm b { font-size: 15px; }
  .code-row { flex-wrap: wrap; }
  .code-label { width: auto; }
  .code-block { width: 100%; flex-basis: 100%; }
  .site-footer { flex-direction: column; gap: 8px; margin-top: 44px; padding-bottom: 26px; }
  .footer-note { text-align: left; }
}

@media (max-width: 980px) {
  .overview-grid { grid-template-columns: 1fr; }
  .view-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .topbar-inner { grid-template-columns: minmax(0, 1fr) auto; row-gap: 2px; }
  .top-nav { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; gap: 20px; overflow-x: auto; padding: 2px 0 8px; }
}

@media (max-width: 720px) {
  .topbar-inner { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; min-height: 64px; padding: 6px 0 4px; }
  .top-nav { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; gap: 16px; overflow-x: auto; padding: 2px 0 6px; }
  .nav-item { font-size: 12px; padding-bottom: 4px; }
  .nav-no { display: none; }
  .nav-link { display: none; }
  .console-head { flex-direction: column; align-items: flex-start; gap: 16px; padding: 26px 0 18px; }
  .console-head h1 { font-size: 32px; }
  .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-strip .stat { padding: 12px 13px; }
  .stat-strip .stat b { font-size: 26px; }
  .ov-panel { padding: 15px 16px; }
  .pending-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .pending-actions .btn { flex: 1; }
  .event-row { grid-template-columns: minmax(0, 1fr) auto; }
  .event-row .muted:last-child { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  .input, .select, .textarea, .btn, .toast { transition: none !important; }
}

