:root {
  --bg: #f7f5f0;
  --panel: #ffffff;
  --line: #e7e5df;
  --line-strong: #d8d6cf;
  --ink: #23241f;
  --muted: #74756e;
  --muted-2: #9b9c94;
  --accent: #3a6b5f;
  --accent-soft: #edf2f0;
  --green: #2f7d54;
  --green-soft: #eaf4ee;
  --red: #b4443c;
  --red-soft: #fbeeec;
  --amber: #94651c;
  --amber-soft: #faf1e2;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(35, 36, 31, 0.04), 0 10px 28px rgba(35, 36, 31, 0.05);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); text-decoration: none; }
code { font-family: var(--mono); }

svg { width: 18px; height: 18px; display: block; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 15px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.btn:hover { background: #f6f5f1; }
.btn:active { transform: translateY(0.5px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }
.btn.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: none;
}
.btn.primary:hover { background: #325c52; border-color: #325c52; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); height: 34px; padding: 0 10px; }
.btn.ghost:hover { background: #edede7; color: var(--ink); }
.btn.block { width: 100%; height: 44px; }
.btn.sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 8px; }
.btn.icon-btn { width: 34px; height: 34px; padding: 0; border-color: transparent; background: transparent; color: var(--muted); border-radius: 8px; }
.btn.icon-btn:hover { background: #edede7; color: var(--ink); }
.btn.icon-btn.danger:hover { background: var(--red-soft); color: var(--red); }

/* ---------- login ---------- */
.login-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  position: relative;
  overflow: hidden;
  background: var(--bg);
  padding: 24px;
}
.login-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 30px;
  box-shadow: var(--shadow);
  animation: rise .3s ease;
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.login-brand { display: flex; align-items: center; gap: 13px; margin-bottom: 26px; }
.login-brand h1 { margin: 0; font-size: 19px; letter-spacing: -.2px; }
.login-brand p { margin: 1px 0 0; font-size: 12.5px; color: var(--muted); }
.login-form { display: flex; flex-direction: column; gap: 16px; }
.login-hint { margin: 0; font-size: 12px; color: var(--muted); text-align: center; }
.login-hint code { background: #f1f0eb; padding: 1px 5px; border-radius: 5px; color: var(--ink); }
.login-foot { position: relative; color: var(--muted-2); font-size: 12.5px; letter-spacing: .2px; }

/* ---------- brand mark ---------- */
.brand-mark {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  box-shadow: none;
}
.brand-mark svg { width: 20px; height: 20px; }

/* ---------- shell ---------- */
.app { display: flex; height: 100vh; overflow: hidden; }

.sidebar {
  width: 248px;
  flex: 0 0 248px;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 20px 14px 16px;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px 22px; }
.brand-name { font-size: 14.5px; font-weight: 650; letter-spacing: -.1px; }
.brand-sub { font-size: 11.5px; color: var(--muted-2); margin-top: 1px; }

.nav { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 44px;
  padding: 0 14px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: #4a4b45;
  font-size: 13.5px;
  font-weight: 500;
  text-align: left;
  transition: background .15s ease, color .15s ease, padding .15s ease;
}
.nav-item svg { width: 20px; height: 20px; opacity: .75; }
.nav-item:hover { background: #f4f3ef; color: var(--ink); }
.nav-item.active {
  height: 48px;
  padding: 0 18px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 620;
}
.nav-item.active svg { opacity: 1; }
.nav-icon { display: inline-flex; }

.sidebar-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 10px;
  border-radius: 12px;
  background: #f8f7f3;
  border: 1px solid var(--line);
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #2f7d54; box-shadow: 0 0 0 0 rgba(47, 125, 84, .45); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(47, 125, 84, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 125, 84, 0); } }
.foot-title { font-size: 12.5px; font-weight: 600; }
.foot-sub { font-size: 11.5px; color: var(--muted); }

.main { flex: 1; overflow-y: auto; padding: 32px 40px 56px; }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; max-width: 1100px; margin: 0 auto 0; }
.topbar h1 { margin: 0 0 16px; font-size: 28px; letter-spacing: -.4px; font-weight: 650; }
.page-sub { margin: 0 0 32px; color: var(--muted-2); font-size: 13px; }
.topbar-actions { display: flex; align-items: center; gap: 16px; padding-top: 2px; }
.topbar-actions .btn.ghost { height: 40px; padding: 0 16px; }
.topbar-actions svg { width: 16px; height: 16px; }

.view { max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; gap: 32px; }

/* ---------- cards ---------- */
.card {
  background: #fff;
  border: 1px solid transparent;
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 32px 28px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 0 0 8px; border-bottom: none; }
.card-title { font-size: 14.5px; font-weight: 620; margin: 0; }
.card-title small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; margin-top: 8px; }
.card-meta { margin: 4px 0 20px; font-size: 12px; color: var(--muted); }
.card-body { padding: 8px 0 0; }
.card-body.flush { padding: 0; }

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar .spacer { flex: 1; }
.search-input { position: relative; }
.search-input svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted-2); z-index: 1; }
.search-input input { height: 48px; padding: 18px 12px 6px 34px; width: 230px; }
.search-input > .f-label {
  position: absolute;
  left: 34px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  color: var(--muted-2);
  pointer-events: none;
  transition: top .16s ease, font-size .16s ease, color .16s ease, transform .16s ease;
}
.search-input:focus-within > .f-label,
.search-input:has(input:not(:placeholder-shown)) > .f-label,
.search-input.filled > .f-label {
  top: 9px;
  transform: none;
  font-size: 11px;
  color: var(--accent);
}

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 19px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.stat-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12.5px; }
.stat-ico { width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); }
.stat-ico svg { width: 16px; height: 16px; }
.stat-value { font-size: 27px; font-weight: 650; letter-spacing: -.6px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-foot { font-size: 12px; color: var(--muted); }
.stat-foot b { color: var(--ink); font-weight: 600; }

.grid-2 { display: grid; grid-template-columns: 1.55fr 1fr; gap: 14px; align-items: start; }
.grid-main { display: grid; grid-template-columns: 1fr; gap: 14px; }

/* ---------- chart ---------- */
.chart { display: flex; align-items: flex-end; gap: 12px; height: 170px; padding: 4px 2px 0; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.chart-bar-wrap { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.chart-bar {
  width: 100%;
  max-width: 46px;
  border-radius: 7px 7px 4px 4px;
  background: var(--accent);
  min-height: 3px;
  transition: filter .15s ease;
  position: relative;
}
.chart-bar.empty { background: #ebeae5; }
.chart-bar:hover { filter: brightness(1.08); }
.chart-label { font-size: 11.5px; color: var(--muted-2); }
.chart-values { display: flex; gap: 14px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 12px; color: var(--muted); }
.chart-values b { color: var(--ink); font-weight: 600; }

/* ---------- tables ---------- */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left;
  font-size: 11px;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--muted-2);
  font-weight: 700;
  padding: 14px 12px;
  background: #faf9f6;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table td { padding: 20px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #fbfaf7; }
.table .num { font-variant-numeric: tabular-nums; }
.table .right { text-align: right; }
.row-actions { display: flex; align-items: center; gap: 2px; justify-content: flex-end; }

.users-table { min-width: 860px; table-layout: fixed; }
.users-table th:nth-child(1),
.users-table td:nth-child(1) { width: 28%; min-width: 220px; }
.users-table th:nth-child(2),
.users-table td:nth-child(2),
.users-table th:nth-child(3),
.users-table td:nth-child(3),
.users-table th:nth-child(4),
.users-table td:nth-child(4),
.users-table th:nth-child(5),
.users-table td:nth-child(5) { width: 12%; min-width: 88px; }
.users-table th:nth-child(6),
.users-table td:nth-child(6) { width: 14%; min-width: 120px; }
.users-table th:nth-child(7),
.users-table td:nth-child(7),
.users-table th:nth-child(8),
.users-table td:nth-child(8) { width: 72px; min-width: 64px; }
.email-date {
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--muted-2);
  line-height: 1.4;
}

.mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.ellipsis { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 550;
  background: #f1f0eb;
  color: var(--muted);
  white-space: nowrap;
}
.badge.ok { background: var(--green-soft); color: var(--green); }
.badge.err { background: var(--red-soft); color: var(--red); }
.badge.warn { background: var(--amber-soft); color: var(--amber); }
.badge.accent { background: var(--accent-soft); color: var(--accent); }
.badge .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

.chips { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.chip { background: #f3f2ed; border: 1px solid var(--line); color: #4a4b45; font-size: 11.5px; font-family: var(--mono); padding: 2px 7px; border-radius: 6px; white-space: nowrap; }

.upstream-name { display: flex; align-items: center; gap: 10px; }
.avatar { width: 32px; height: 32px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; font-weight: 650; font-size: 13px; flex: 0 0 32px; text-transform: uppercase; }
.upstream-name .sub { font-size: 11.5px; color: var(--muted-2); }

.empty { text-align: center; padding: 54px 20px; color: var(--muted); }
.empty-ico { width: 46px; height: 46px; border-radius: 14px; background: #f3f2ed; color: var(--muted-2); display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; }
.empty-ico svg { width: 22px; height: 22px; }
.empty h3 { margin: 0 0 5px; font-size: 14.5px; color: var(--ink); font-weight: 600; }
.empty p { margin: 0 0 16px; font-size: 13px; }

.list { display: flex; flex-direction: column; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: none; }
.list-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.list-title { font-size: 13px; font-weight: 550; }
.list-sub { font-size: 11.5px; color: var(--muted-2); }

.key-value { display: flex; align-items: center; gap: 8px; }
.key-value code { font-size: 12px; color: #3a3b35; background: #f4f3ef; border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; }
.key-value button { border: none; background: transparent; color: var(--muted-2); padding: 3px; border-radius: 5px; display: inline-flex; }
.key-value button:hover { color: var(--accent); background: var(--accent-soft); }
.key-value svg { width: 15px; height: 15px; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field:has(> input, > textarea, > select) { position: relative; display: block; }
.field > span { font-size: 12.5px; font-weight: 550; color: #3c3d37; }
.field:has(> input, > textarea, > select) > span:first-child {
  position: absolute;
  left: 13px;
  top: 27px;
  transform: translateY(-50%);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted-2);
  pointer-events: none;
  transition: top .16s ease, font-size .16s ease, color .16s ease;
}
.field .hint { display: block; margin-top: 6px; font-size: 11.5px; color: var(--muted-2); }
.field .hint code { background: #f3f2ed; padding: 1px 5px; border-radius: 5px; }
input[type="text"], input[type="password"], input[type="url"], input[type="search"], input[type="email"], input[type="number"], textarea, select {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #fff;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
  font-size: 13.5px;
}
textarea { height: auto; min-height: 104px; padding: 10px 12px; resize: vertical; font-family: var(--mono); font-size: 12.5px; line-height: 1.65; }
input:focus, textarea:focus, select:focus { border-color: #9db8ae; box-shadow: 0 0 0 3px rgba(58, 107, 95, .14); }

/* floating labels */
.field > input,
.field > textarea,
.field > select { padding: 20px 12px 7px; }
.field > input,
.field > select { height: 54px; }
.field > select { padding-right: 32px; }
.field > textarea { min-height: 122px; padding-top: 27px; line-height: 1.6; }
.field:has(> input, > textarea, > select):focus-within > span:first-child,
.field:has(> input:not(:placeholder-shown)) > span:first-child,
.field:has(> textarea:not(:placeholder-shown)) > span:first-child,
.field:has(> select) > span:first-child,
.field:has(> input:-webkit-autofill) > span:first-child,
.field.filled > span:first-child {
  top: 10px;
  font-size: 11px;
  color: var(--accent);
}
.f-float { position: relative; display: block; }
.f-float > .f-label {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  color: var(--muted-2);
  pointer-events: none;
  transition: top .16s ease, font-size .16s ease, color .16s ease, transform .16s ease;
}
.f-float > input,
.f-float > textarea,
.f-float > select { padding: 20px 12px 7px; }
.f-float > input,
.f-float > select { height: 52px; }
.f-float > select { padding-right: 32px; }
.f-float > textarea { min-height: 112px; padding-top: 26px; }
.f-float:focus-within > .f-label,
.f-float:has(input:not(:placeholder-shown)) > .f-label,
.f-float:has(textarea:not(:placeholder-shown)) > .f-label,
.f-float:has(select) > .f-label,
.f-float:has(input:-webkit-autofill) > .f-label,
.f-float.filled > .f-label {
  top: 10px;
  transform: none;
  font-size: 11px;
  color: var(--accent);
}
.field > input::placeholder,
.field > textarea::placeholder,
.f-float > input::placeholder,
.f-float > textarea::placeholder,
.search-input > input::placeholder { color: transparent; }
input::placeholder, textarea::placeholder { color: #b0afa7; }
@keyframes onAutoFillStart { from { opacity: 1; } to { opacity: 1; } }
input:-webkit-autofill { animation-name: onAutoFillStart; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2374756e' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; cursor: pointer; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-grid .full { grid-column: 1 / -1; }
.form-stack { display: flex; flex-direction: column; gap: 15px; }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; }
.input-actions { display: flex; gap: 8px; align-items: center; }

.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; font-size: 13px; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 38px; height: 22px; border-radius: 999px; background: #d8d6cf; position: relative; transition: background .18s ease; flex: 0 0 38px; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(35,36,31,.16); transition: transform .18s ease; }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(16px); }

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(35, 36, 31, .45);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 7vh 20px 30px;
  z-index: 60;
  overflow-y: auto;
  animation: fade .15s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 100%;
  max-width: 540px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(35, 36, 31, .22);
  animation: rise .2s cubic-bezier(.2, .8, .2, 1);
}
.modal.wide { max-width: 640px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 20px 22px 0; }
.modal-head h2 { margin: 0; font-size: 17px; letter-spacing: -.2px; font-weight: 640; }
.modal-head p { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }
.modal-head .close { border: none; background: #f3f2ed; width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.modal-head .close:hover { background: #e9ebf3; color: var(--ink); }
.modal-body { padding: 20px 22px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 9px; padding: 0 22px 22px; }

.alert { border-radius: 10px; padding: 10px 13px; font-size: 12.5px; margin-bottom: 15px; display: none; }
.alert.show { display: block; }
.alert.error { background: var(--red-soft); color: var(--red); }
.alert.ok { background: var(--green-soft); color: var(--green); }

/* ---------- code block ---------- */
.code-card { position: relative; background: #262721; border-radius: 11px; padding: 15px 16px; overflow: hidden; }
.code-card pre { margin: 0; color: #e7e6df; font-family: var(--mono); font-size: 12px; line-height: 1.75; overflow-x: auto; white-space: pre; }
.code-card .code-label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; color: #a5a69c; font-size: 11px; letter-spacing: .4px; text-transform: uppercase; }
.code-card .copy-mini { border: none; background: rgba(255,255,255,.08); color: #d6d5cd; border-radius: 6px; padding: 3px 8px; font-size: 11px; }
.code-card .copy-mini:hover { background: rgba(255,255,255,.16); }

.endpoint-row { display: flex; align-items: center; gap: 10px; background: #f8f7f3; border: 1px solid var(--line); border-radius: 10px; padding: 10px 13px; }
.endpoint-row code { flex: 1; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- toast ---------- */
.toast-root { position: fixed; top: 20px; right: 22px; z-index: 100; display: flex; flex-direction: column; gap: 9px; pointer-events: none; }
.toast {
  min-width: 220px;
  max-width: 380px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid var(--green);
  border-radius: 11px;
  padding: 11px 14px;
  box-shadow: 0 12px 34px rgba(35, 36, 31, .14);
  font-size: 13px;
  animation: toastIn .22s cubic-bezier(.2, .8, .2, 1);
}
.toast.error { border-left-color: var(--red); }
.toast.info { border-left-color: var(--accent); }
.toast.out { animation: toastOut .2s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(14px); } }

/* ---------- misc ---------- */
.loading { padding: 60px 20px; text-align: center; color: var(--muted-2); font-size: 13px; }
.section-label { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted-2); font-weight: 600; margin-bottom: 12px; }
.divider { height: 1px; background: var(--line); margin: 4px 0; }
.inline-note { display: flex; gap: 9px; align-items: flex-start; font-size: 12.5px; color: var(--muted); background: #f8f7f3; border: 1px dashed var(--line-strong); padding: 11px 13px; border-radius: 10px; }
.inline-note svg { width: 15px; height: 15px; flex: 0 0 15px; margin-top: 1px; color: var(--muted-2); }
.route-table td { font-size: 12.5px; }
.method { font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 1px 6px; border-radius: 5px; }

@media (max-width: 1080px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .app { flex-direction: column; height: auto; min-height: 100vh; overflow: visible; }
  .sidebar { width: auto; flex: none; flex-direction: row; align-items: center; gap: 16px; padding: 12px 24px; border-right: none; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; overflow-x: auto; }
  .brand { padding: 0 8px 0 0; flex: 0 0 auto; }
  .brand-text, .sidebar-foot { display: none; }
  .nav { flex-direction: row; flex: 1; gap: 10px; }
  .nav-item { height: 40px; padding: 0 12px; font-size: 13px; }
  .nav-item svg { width: 20px; height: 20px; }
  .nav-item span:last-child { display: none; }
  .nav-item.active { height: 44px; padding: 0 16px; }
  .nav-item.active span:last-child { display: inline; }
  .main { padding: 24px 24px 48px; overflow: visible; }
  .topbar h1 { font-size: 28px; }
  .topbar-actions { gap: 12px; }
  .topbar-actions .btn.ghost { height: 40px; padding: 0 14px; }
  .card { padding: 28px 24px; margin-bottom: 0; }
}

@media (max-width: 620px) {
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 14px; }
  .stat-value { font-size: 22px; }
  .form-grid { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; gap: 12px; }
  .toolbar .search-input input { width: 100%; }
  .login-card { padding: 24px; }
  .sidebar, .main { padding-left: 24px; padding-right: 24px; }
}
}