:root {
  --ink: #080b09;
  --ink-2: #0d1210;
  --ink-3: #131a16;
  --panel: rgba(18, 24, 20, .94);
  --panel-solid: #121814;
  --line: #28332c;
  --line-hot: #4f644f;
  --text: #edf3e9;
  --muted: #8e9b90;
  --quiet: #5f6b62;
  --signal: #c7ff3d;
  --signal-soft: #98bd3d;
  --cyan: #64e6d1;
  --amber: #ffbc45;
  --red: #ff6b5f;
  --paper: #d7dacb;
  --shadow: 0 24px 70px rgba(0, 0, 0, .35);
  --display: "DIN Alternate", "Avenir Next Condensed", "PingFang SC", "Microsoft YaHei", sans-serif;
  --body: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", "Cascadia Code", "Liberation Mono", monospace;
  --sidebar: 238px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--text);
  background: var(--ink);
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

::selection { color: var(--ink); background: var(--signal); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { border: 3px solid var(--ink); background: #344239; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed;
  z-index: 999;
  top: -60px;
  left: 16px;
  padding: 10px 16px;
  color: var(--ink);
  background: var(--signal);
  font-weight: 800;
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; }

.eyebrow, .section-kicker, .ticket-no {
  margin: 0 0 8px;
  color: var(--signal);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.muted { color: var(--muted); }

.brand-mark {
  display: inline-flex;
  gap: 3px;
  align-items: flex-end;
  width: 30px;
  height: 28px;
  padding: 6px;
  border: 1px solid var(--signal);
  transform: skewX(-7deg);
}
.brand-mark i { display: block; width: 4px; background: var(--signal); }
.brand-mark i:nth-child(1) { height: 8px; }
.brand-mark i:nth-child(2) { height: 15px; }
.brand-mark i:nth-child(3) { height: 11px; }

/* Login */
.login-body {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 22% 50%, rgba(117, 157, 40, .16), transparent 34%),
    linear-gradient(135deg, #0b100d 0 58%, #111712 58% 100%);
}
.login-body::before {
  position: fixed;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: .35;
  background-image:
    linear-gradient(rgba(190, 220, 189, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(190, 220, 189, .045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to right, #000, transparent 70%);
}
.login-stage {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(420px, .7fr);
  min-height: 100vh;
}
.login-intro {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: clamp(28px, 4vw, 64px);
  overflow: hidden;
}
.login-wordmark {
  display: flex;
  gap: 14px;
  align-items: center;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .11em;
}
.login-wordmark b { color: var(--signal); }
.login-copy {
  position: relative;
  z-index: 2;
  margin-top: auto;
  max-width: 650px;
  padding-bottom: clamp(60px, 12vh, 120px);
}
.login-copy h1 {
  max-width: 630px;
  margin: 0 0 24px;
  font-family: var(--display);
  font-size: clamp(54px, 6.8vw, 106px);
  line-height: .91;
  letter-spacing: -.055em;
}
.login-copy > p:last-child { max-width: 440px; margin: 0; color: var(--muted); font-size: 16px; }
.login-ticker {
  position: absolute;
  right: 0; bottom: 0; left: 0;
  display: flex;
  gap: 24px;
  align-items: center;
  height: 42px;
  padding: 0 32px;
  overflow: hidden;
  color: var(--ink);
  background: var(--signal);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .2em;
  white-space: nowrap;
}
.login-ticker i { width: 28px; height: 1px; background: var(--ink); opacity: .5; }
.login-signal {
  position: absolute;
  top: 18%; right: -5%;
  width: min(49vw, 680px);
  aspect-ratio: 1;
  opacity: .62;
}
.signal-orbit {
  position: absolute;
  border: 1px solid #3a4a3d;
  border-radius: 50%;
}
.orbit-one { inset: 7%; animation: slow-spin 32s linear infinite; }
.orbit-two { inset: 24%; border-style: dashed; animation: slow-spin 22s linear infinite reverse; }
.signal-orbit::before, .signal-orbit::after {
  position: absolute;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 22px var(--signal);
  content: "";
}
.orbit-one::before { top: 10%; left: 21%; }
.orbit-one::after { right: 9%; bottom: 25%; }
.orbit-two::before { top: 48%; left: -4px; }
.orbit-two::after { top: -4px; right: 48%; }
.signal-core {
  position: absolute;
  top: 50%; left: 50%;
  display: grid;
  place-content: center;
  width: 126px; height: 126px;
  color: var(--ink);
  background: var(--signal);
  box-shadow: 0 0 0 11px rgba(199, 255, 61, .08), 0 0 80px rgba(199, 255, 61, .22);
  transform: translate(-50%, -50%) rotate(45deg);
}
.signal-core span, .signal-core strong { transform: rotate(-45deg); text-align: center; }
.signal-core span { font-family: var(--mono); font-size: 9px; letter-spacing: .2em; }
.signal-core strong { font-family: var(--display); font-size: 34px; line-height: 1; }
.signal-node {
  position: absolute;
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border: 1px solid var(--line-hot);
  color: var(--muted);
  background: var(--ink-2);
  font: 9px var(--mono);
}
.node-a { top: 8%; left: 47%; }
.node-b { right: 5%; bottom: 27%; }
.node-c { bottom: 3%; left: 23%; }

.login-panel {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 42px;
  border-left: 1px solid var(--line);
  background: rgba(10, 14, 11, .82);
  backdrop-filter: blur(18px);
}
.login-panel::before, .login-panel::after {
  position: absolute;
  top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(transparent, #4a5b4d 40%, transparent);
  content: "";
}
.login-panel::before { left: 12px; }
.login-panel::after { right: 12px; }
.login-panel-inner {
  position: relative;
  width: min(100%, 430px);
  padding: 48px 42px 32px;
  border: 1px solid var(--line-hot);
  background: var(--ink-2);
  box-shadow: var(--shadow);
}
.ticket-cuts::before, .ticket-cuts::after {
  position: absolute;
  left: -9px;
  width: 16px; height: 16px;
  border: 1px solid var(--line-hot);
  border-radius: 50%;
  background: var(--ink);
  content: "";
}
.ticket-cuts::before { top: 27%; }
.ticket-cuts::after { bottom: 27%; }
.login-panel-inner h2 { margin: 18px 0 8px; font-family: var(--display); font-size: 34px; letter-spacing: -.03em; }
.login-panel-inner > .muted { margin: 0 0 34px; font-size: 13px; }
.lock-glyph {
  display: grid;
  place-items: center;
  width: 50px; height: 50px;
  border: 1px solid var(--signal);
  transform: rotate(45deg);
}
.lock-glyph::before {
  width: 15px; height: 12px;
  border: 2px solid var(--signal);
  border-bottom: 0;
  border-radius: 9px 9px 0 0;
  content: "";
  transform: rotate(-45deg) translate(4px, -4px);
}
.lock-glyph span {
  position: absolute;
  width: 20px; height: 16px;
  border: 2px solid var(--signal);
  transform: rotate(-45deg) translate(-4px, 4px);
}
.login-form label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 12px; font-weight: 700; }
.password-field { position: relative; }
.password-field input { width: 100%; height: 52px; padding: 0 76px 0 15px; }
.field-action {
  position: absolute;
  top: 50%; right: 10px;
  padding: 5px 8px;
  border: 0;
  color: var(--signal);
  background: transparent;
  font-size: 11px;
  transform: translateY(-50%);
}
.form-error { min-height: 23px; margin: 7px 0 6px; color: var(--red); font-size: 12px; }
.login-foot {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px dashed var(--line);
  color: var(--quiet);
  font: 9px var(--mono);
  letter-spacing: .15em;
}
.login-foot code { margin-left: auto; color: var(--muted); letter-spacing: 0; }

/* Shared controls */
input, select, textarea {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 0;
  outline: 0;
  background: #0a0f0c;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
input, select { height: 42px; padding: 0 12px; }
textarea { width: 100%; padding: 14px; resize: vertical; font-family: var(--mono); font-size: 12px; line-height: 1.65; }
input:focus, select:focus, textarea:focus { border-color: var(--signal-soft); background: #0c120e; box-shadow: 0 0 0 3px rgba(199, 255, 61, .08); }
input::placeholder, textarea::placeholder { color: #4f5b52; }

.btn {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 0;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .025em;
  transition: transform .15s, border-color .15s, color .15s, background .15s;
}
.btn:hover:not(:disabled) { transform: translateY(-2px); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { cursor: wait; opacity: .5; }
.btn-primary { color: #10150e; background: var(--signal); }
.btn-primary:hover:not(:disabled) { background: #d4ff68; box-shadow: 0 7px 24px rgba(199, 255, 61, .16); }
.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover:not(:disabled) { border-color: var(--signal-soft); color: var(--signal); }
.btn-danger { border-color: rgba(255, 107, 95, .5); color: #0d0808; background: var(--red); }
.btn-full { width: 100%; }
.icon-btn { padding: 0 13px; }
.refresh-icon { font-family: var(--mono); font-size: 18px; line-height: 1; }
.is-spinning .refresh-icon { animation: spin .65s linear infinite; }

.copy-button, .text-button {
  padding: 6px 8px;
  border: 0;
  color: var(--signal);
  background: transparent;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
}
.copy-button:hover, .text-button:hover { color: #fff; }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 12px rgba(199, 255, 61, .8); }

/* Console shell */
.console-body { min-height: 100vh; background: var(--ink); }
.ambient-grid {
  position: fixed;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  opacity: .26;
  background-image:
    linear-gradient(rgba(170, 202, 176, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(170, 202, 176, .045) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(circle at 70% 30%, #000 0 22%, transparent 72%);
}
.sidebar {
  position: fixed;
  z-index: 20;
  top: 0; bottom: 0; left: 0;
  display: flex;
  flex-direction: column;
  width: var(--sidebar);
  border-right: 1px solid var(--line);
  background: rgba(8, 12, 9, .96);
  backdrop-filter: blur(15px);
}
.sidebar::after {
  position: absolute;
  top: 0; right: -4px; bottom: 0;
  width: 1px;
  background: rgba(199, 255, 61, .11);
  content: "";
}
.sidebar-brand {
  display: flex;
  gap: 13px;
  align-items: center;
  height: 86px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
}
.brand-type { font-family: var(--display); font-size: 13px; font-weight: 900; letter-spacing: .06em; }
.brand-type b { display: block; margin-top: 2px; color: var(--signal); font: 8px var(--mono); letter-spacing: .15em; }
.side-nav { padding: 24px 12px; }
.nav-item {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: center;
  height: 45px;
  padding: 0 11px;
  border-left: 2px solid transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  transition: color .15s, background .15s, border-color .15s;
}
.nav-item span { color: var(--quiet); font: 9px var(--mono); }
.nav-item:hover { color: var(--text); background: rgba(255, 255, 255, .025); }
.nav-item.is-active { border-color: var(--signal); color: var(--signal); background: linear-gradient(90deg, rgba(199, 255, 61, .09), transparent); }
.nav-item.is-active span { color: var(--signal); }
.sidebar-foot { margin-top: auto; padding: 20px; }
.rail-status { display: flex; gap: 12px; align-items: center; padding: 14px 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); }
.pulse-ring { display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid rgba(199, 255, 61, .25); border-radius: 50%; animation: pulse-border 2s ease-in-out infinite; }
.pulse-ring i { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 9px var(--signal); }
.rail-status small { display: block; color: var(--quiet); font: 8px var(--mono); letter-spacing: .12em; }
.rail-status strong { color: var(--signal); font-size: 11px; }
.logout-button { display: flex; justify-content: space-between; width: 100%; margin: 14px 0 0; padding: 9px 0; border: 0; color: var(--muted); background: transparent; font-size: 11px; text-align: left; }
.logout-button:hover { color: var(--red); }
.sidebar-foot > p { margin: 20px 0 0; color: #424d45; font: 8px var(--mono); letter-spacing: .1em; }
.sidebar-foot > p em { float: right; color: var(--signal-soft); font-style: normal; }

.main-content {
  position: relative;
  z-index: 1;
  width: calc(100% - var(--sidebar));
  max-width: 1760px;
  min-height: 100vh;
  margin-left: var(--sidebar);
  padding: 0 clamp(22px, 3vw, 52px) 40px;
}
.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  min-height: 142px;
  padding: 35px 0 25px;
  border-bottom: 1px solid var(--line);
}
.topbar h1 { margin: 0; font-family: var(--display); font-size: clamp(37px, 4vw, 58px); line-height: .95; letter-spacing: -.045em; }
.topbar-actions, .section-actions { display: flex; gap: 9px; align-items: center; }
.endpoint-strip {
  display: grid;
  grid-template-columns: auto minmax(250px, auto) auto 1fr;
  gap: 18px;
  align-items: center;
  min-height: 54px;
  padding: 0 16px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: rgba(15, 21, 17, .72);
}
.endpoint-state { display: flex; gap: 9px; align-items: center; color: var(--signal); font: 8px var(--mono); letter-spacing: .15em; }
.endpoint-strip code { color: var(--paper); font-size: 11px; }
.endpoint-strip .copy-button { border-left: 1px solid var(--line); }
.endpoint-hint { justify-self: end; color: var(--quiet); font-size: 10px; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 26px 0;
  border: 1px solid var(--line);
}
.stat-card {
  position: relative;
  min-height: 138px;
  padding: 22px;
  border-right: 1px solid var(--line);
  background: rgba(16, 22, 18, .78);
  overflow: hidden;
}
.stat-card:last-child { border-right: 0; }
.stat-card::after { position: absolute; right: -16px; bottom: -27px; width: 76px; height: 76px; border: 1px solid rgba(168, 201, 170, .08); border-radius: 50%; content: ""; }
.stat-card p { margin: 15px 0 2px; color: var(--muted); font-size: 11px; }
.stat-card strong { display: block; font-family: var(--display); font-size: clamp(28px, 2.4vw, 39px); line-height: 1; letter-spacing: -.035em; }
.stat-card small { color: var(--quiet); font: 9px var(--mono); }
.stat-index { color: var(--signal-soft); font: 8px var(--mono); letter-spacing: .1em; }
.stat-primary { color: #0c110b; background: var(--signal); }
.stat-primary p, .stat-primary small, .stat-primary .stat-index { color: rgba(8, 13, 7, .63); }
.stat-primary::after { border-color: rgba(0, 0, 0, .12); }
.mini-meter { height: 3px; margin-top: 13px; background: #283029; }
.mini-meter i { display: block; width: 0; height: 100%; background: var(--signal); transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.meter-p-0 { width: 0% !important; }
.meter-p-5 { width: 5% !important; }
.meter-p-10 { width: 10% !important; }
.meter-p-15 { width: 15% !important; }
.meter-p-20 { width: 20% !important; }
.meter-p-25 { width: 25% !important; }
.meter-p-30 { width: 30% !important; }
.meter-p-35 { width: 35% !important; }
.meter-p-40 { width: 40% !important; }
.meter-p-45 { width: 45% !important; }
.meter-p-50 { width: 50% !important; }
.meter-p-55 { width: 55% !important; }
.meter-p-60 { width: 60% !important; }
.meter-p-65 { width: 65% !important; }
.meter-p-70 { width: 70% !important; }
.meter-p-75 { width: 75% !important; }
.meter-p-80 { width: 80% !important; }
.meter-p-85 { width: 85% !important; }
.meter-p-90 { width: 90% !important; }
.meter-p-95 { width: 95% !important; }
.meter-p-100 { width: 100% !important; }

.section-grid { display: grid; gap: 20px; }
.overview-grid { grid-template-columns: minmax(0, 2fr) minmax(290px, .72fr); }
.panel { border: 1px solid var(--line); background: var(--panel); box-shadow: 0 20px 60px rgba(0, 0, 0, .12); }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 21px 23px; border-bottom: 1px solid var(--line); }
.panel h2, .section-title-row h2 { margin: 0; font-family: var(--display); font-size: 25px; letter-spacing: -.025em; }
.panel-head .section-kicker { margin-bottom: 3px; }
.chip { display: inline-flex; align-items: center; min-height: 24px; padding: 0 9px; border: 1px solid var(--line); font: 8px var(--mono); letter-spacing: .09em; text-transform: uppercase; }
.chip-signal { border-color: rgba(199, 255, 61, .3); color: var(--signal); background: rgba(199, 255, 61, .05); }

.topology-panel { min-height: 320px; }
.topology { display: grid; grid-template-columns: 1fr .55fr 1fr .55fr 1fr .55fr 1.08fr; align-items: center; padding: 46px 26px 32px; }
.topology-node { position: relative; min-height: 104px; padding: 17px 13px; border: 1px solid var(--line); background: #0b100d; }
.topology-node::before { position: absolute; top: -1px; left: -1px; width: 18px; height: 2px; background: var(--signal-soft); content: ""; }
.topology-node > span { display: block; color: var(--quiet); font: 8px var(--mono); }
.topology-node b { display: block; margin: 17px 0 4px; font-family: var(--display); font-size: 14px; }
.topology-node small, .topology-stack small { color: var(--quiet); font: 8px var(--mono); }
.topology-node-core { border-color: var(--signal-soft); box-shadow: inset 0 -3px var(--signal); }
.topology-line { position: relative; height: 1px; background: var(--line-hot); }
.topology-line::after { position: absolute; top: -3px; right: -1px; width: 6px; height: 6px; border-top: 1px solid var(--signal-soft); border-right: 1px solid var(--signal-soft); content: ""; transform: rotate(45deg); }
.topology-line em { position: absolute; top: -2px; width: 5px; height: 5px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 9px var(--signal); animation: flow 2.2s linear infinite; }
.topology-stack { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 104px; padding: 14px 11px; }
.stack-line { position: absolute; right: 5px; left: 5px; height: 58px; border: 1px solid var(--line); background: #0c110e; }
.stack-line:nth-child(1) { top: 2px; }
.stack-line:nth-child(2) { top: 9px; right: 10px; left: 10px; }
.stack-line:nth-child(3) { top: 16px; right: 15px; left: 15px; }
.stack-line.active { border-top-color: var(--signal-soft); }
.topology-stack b, .topology-stack small { position: relative; z-index: 2; }
.topology-stack b { font-family: var(--display); font-size: 14px; }
.topology-legend { display: flex; gap: 21px; align-items: center; min-height: 41px; padding: 0 23px; border-top: 1px dashed var(--line); color: var(--quiet); font: 8px var(--mono); }
.topology-legend span { display: inline-flex; gap: 7px; align-items: center; }
.topology-legend span:last-child { margin-left: auto; }
.topology-legend i { width: 12px; height: 2px; }
.legend-live { background: var(--signal); }
.legend-standby { border-top: 1px dashed var(--quiet); }

.health-panel { position: relative; min-height: 320px; overflow: hidden; }
.health-panel .panel-head strong { color: var(--signal); font: 22px var(--display); }
.health-radar { position: relative; width: 148px; height: 148px; margin: 22px auto 15px; }
.radar-ring { position: absolute; border: 1px solid var(--line); border-radius: 50%; }
.ring-a { inset: 0; border-style: dashed; animation: slow-spin 18s linear infinite; }
.ring-b { inset: 22px; }
.ring-c { inset: 42px; border-color: rgba(199, 255, 61, .2); }
.radar-core { position: absolute; inset: 55px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); background: var(--signal); box-shadow: 0 0 32px rgba(199, 255, 61, .27); font: 13px var(--display); font-weight: 900; }
.health-list { margin: 0; padding: 0 20px 18px; list-style: none; }
.health-list li { display: flex; justify-content: space-between; padding: 7px 0; border-top: 1px solid rgba(40, 51, 44, .68); font-size: 10px; }
.health-list span { display: flex; gap: 8px; align-items: center; color: var(--muted); }
.health-list i { width: 5px; height: 5px; border-radius: 50%; }
.signal-good { background: var(--signal); }
.signal-warn { background: var(--amber); }
.signal-bad { background: var(--red); }

.section-block { padding-top: 74px; }
.section-anchor { scroll-margin-top: 12px; }
.section-title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.section-title-row h2 { font-size: 31px; }
.section-note { max-width: 620px; margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.filter-bar { display: flex; gap: 16px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.search-field { position: relative; width: min(360px, 100%); }
.search-field b { position: absolute; top: 50%; left: 13px; color: var(--quiet); font-size: 21px; font-weight: 400; transform: translateY(-52%); }
.search-field input { width: 100%; padding-left: 39px; }
.segmented { display: flex; border: 1px solid var(--line); }
.segment { min-height: 38px; padding: 0 12px; border: 0; border-right: 1px solid var(--line); color: var(--muted); background: #0d120f; font-size: 10px; }
.segment:last-child { border-right: 0; }
.segment span { margin-left: 5px; color: var(--quiet); font: 8px var(--mono); }
.segment:hover, .segment.is-active { color: var(--signal); background: rgba(199, 255, 61, .06); }
.segment.is-active span { color: var(--signal-soft); }

.account-table-wrap { border: 1px solid var(--line); background: rgba(13, 18, 15, .78); }
.table-head { min-height: 39px; border-bottom: 1px solid var(--line); color: var(--quiet); font: 8px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.account-columns { display: grid; grid-template-columns: minmax(230px, 1.3fr) minmax(260px, 1.55fr) minmax(90px, .5fr) minmax(145px, .75fr) minmax(170px, .8fr); gap: 15px; align-items: center; padding: 0 17px; }
.account-row { position: relative; min-height: 116px; border-bottom: 1px solid var(--line); transition: background .15s; }
.account-row:last-child { border-bottom: 0; }
.account-row:hover { background: rgba(255, 255, 255, .018); }
.account-row.is-disabled { opacity: .57; }
.account-identity { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 11px; align-items: center; }
.account-status-rail { width: 3px; height: 58px; background: var(--line); }
.account-status-rail.healthy { background: var(--signal); box-shadow: 0 0 12px rgba(199, 255, 61, .28); }
.account-status-rail.cooldown { background: var(--amber); }
.account-status-rail.error { background: var(--red); }
.account-status-rail.disabled { background: var(--quiet); }
.account-name { overflow: hidden; }
.account-name b { display: block; overflow: hidden; font-family: var(--display); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.account-name small { display: block; overflow: hidden; margin-top: 3px; color: var(--muted); font: 9px var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.account-name code { display: inline-block; max-width: 100%; margin-top: 7px; padding: 2px 5px; color: var(--quiet); background: #090d0b; font-size: 8px; }
.status-label { display: inline-flex; gap: 5px; align-items: center; margin-left: 6px; color: var(--muted); font: 8px var(--mono); }
.status-label i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-label.healthy { color: var(--signal-soft); }
.status-label.cooldown { color: var(--amber); }
.status-label.error { color: var(--red); }
.account-consumption { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 6px; min-width: 0; }
.consumption-metric { min-width: 0; padding: 9px 10px 8px; border: 1px solid var(--line); background: #0a0f0c; }
.consumption-metric b { display: block; overflow: hidden; color: var(--signal-soft); font: 16px var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.consumption-metric + .consumption-metric b { color: var(--text); }
.consumption-metric small { display: block; margin-top: 4px; color: var(--quiet); font: 8px var(--mono); letter-spacing: .035em; white-space: nowrap; }
.account-consumption p { grid-column: 1 / -1; margin: 0 1px; color: var(--quiet); font: 7px var(--mono); letter-spacing: .04em; }
.account-metric b { display: block; font-family: var(--display); font-size: 18px; }
.account-metric small { color: var(--quiet); font: 8px var(--mono); }
.account-cooldown { display: grid; gap: 3px; min-width: 0; }
.account-cooldown b { overflow: hidden; color: var(--muted); font: 13px var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.account-cooldown small { color: var(--quiet); font: 8px var(--mono); letter-spacing: .05em; }
.account-cooldown time { overflow: hidden; color: var(--quiet); font: 7px var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.account-cooldown.is-active b, .account-cooldown.is-active small { color: var(--amber); }
.account-cooldown.is-protection b, .account-cooldown.is-protection small { color: var(--red); }
.account-cooldown.is-expired b { color: var(--signal-soft); }
.row-actions { display: flex; gap: 5px; align-items: center; justify-content: flex-end; }
.row-action { display: grid; place-items: center; min-width: 31px; height: 31px; padding: 0 8px; border: 1px solid var(--line); color: var(--muted); background: transparent; font-size: 10px; }
.row-action:hover { border-color: var(--signal-soft); color: var(--signal); }
.row-action.danger:hover { border-color: var(--red); color: var(--red); }
.row-action.checking { color: var(--signal); animation: pulse-opacity .7s ease-in-out infinite alternate; }
.account-error { position: absolute; right: 16px; bottom: 5px; left: 39px; overflow: hidden; color: var(--red); font: 8px var(--mono); text-overflow: ellipsis; white-space: nowrap; }

.account-pagination {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto auto;
  gap: 18px;
  align-items: center;
  min-height: 68px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(199, 255, 61, .025), transparent 45%), #0a0f0c;
}
.pagination-summary { display: grid; grid-template-columns: auto 1fr; gap: 1px 12px; align-items: center; outline: 0; }
.pagination-summary > span { grid-row: 1 / 3; padding-right: 12px; border-right: 1px solid var(--line); color: var(--signal); font: 8px var(--mono); letter-spacing: .13em; }
.pagination-summary strong { color: var(--text); font: 10px var(--mono); font-weight: 600; }
.pagination-summary small { color: var(--quiet); font: 8px var(--mono); }
.page-size-control { display: flex; gap: 7px; align-items: center; color: var(--quiet); font: 9px var(--mono); white-space: nowrap; }
.page-size-control select { width: 62px; height: 36px; padding: 0 8px; border: 1px solid var(--line); border-radius: 0; color: var(--text); background: var(--ink-2); outline: 0; }
.page-size-control select:hover, .page-size-control select:focus-visible { border-color: var(--signal-soft); }
.pagination-nav { display: flex; gap: 5px; align-items: center; justify-content: flex-end; }
.page-number-list { display: flex; gap: 5px; align-items: center; }
.page-button { display: grid; place-items: center; min-width: 36px; height: 36px; padding: 0 8px; border: 1px solid var(--line); color: var(--muted); background: transparent; font: 9px var(--mono); }
.page-button:hover, .page-button:focus-visible { z-index: 1; border-color: var(--signal-soft); color: var(--signal); outline: 0; }
.page-button.is-current { border-color: var(--signal); color: var(--ink); background: var(--signal); font-weight: 800; }
.page-button:disabled { border-color: rgba(40, 51, 44, .6); color: #404a42; cursor: not-allowed; }
.page-button:disabled:hover { border-color: rgba(40, 51, 44, .6); color: #404a42; }
.page-ellipsis { display: grid; place-items: center; width: 25px; height: 36px; color: var(--quiet); font: 10px var(--mono); }

.table-shell { width: 100%; overflow-x: auto; }
.key-columns { display: grid; grid-template-columns: minmax(170px, 1.2fr) minmax(170px, 1fr) minmax(90px, .6fr) minmax(100px, .6fr) minmax(90px, .5fr) minmax(100px, .55fr); gap: 16px; align-items: center; min-width: 760px; padding: 0 17px; }
.key-row { min-height: 68px; border-bottom: 1px solid var(--line); }
.key-row:last-child { border-bottom: 0; }
.key-row > span { min-width: 0; color: var(--muted); font-size: 10px; }
.key-row .key-name { color: var(--text); font-family: var(--display); font-size: 13px; }
.key-row code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.key-row .row-actions { justify-content: flex-start; }
.key-status { display: inline-flex; gap: 6px; align-items: center; }
.key-status i { width: 5px; height: 5px; border-radius: 50%; background: var(--signal); }
.key-status.off { color: var(--quiet); }
.key-status.off i { background: var(--quiet); }

.protocol-legend { display: flex; gap: 16px; color: var(--muted); font: 9px var(--mono); }
.protocol-legend span { display: flex; gap: 7px; align-items: center; }
.protocol-legend i { width: 13px; height: 3px; }
.protocol-openai { background: var(--cyan); }
.protocol-anthropic { background: var(--amber); }
.model-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.model-card { position: relative; min-height: 149px; padding: 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(16, 22, 18, .8); overflow: hidden; transition: background .18s, transform .18s; }
.model-card:hover { z-index: 2; background: #161f19; transform: translateY(-3px); box-shadow: 0 16px 40px rgba(0, 0, 0, .32); }
.model-card::after { position: absolute; right: -22px; bottom: -28px; width: 80px; height: 80px; border: 1px solid rgba(255,255,255,.04); border-radius: 50%; content: ""; }
.model-protocol-line { position: absolute; top: 0; right: 0; left: 0; height: 2px; background: var(--cyan); }
.model-card.anthropic .model-protocol-line { background: var(--amber); }
.model-number { color: var(--quiet); font: 8px var(--mono); }
.model-card h3 { margin: 18px 0 5px; font-family: var(--display); font-size: 17px; line-height: 1.1; }
.model-card code { display: block; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.model-card-foot { position: absolute; right: 15px; bottom: 13px; left: 18px; display: flex; align-items: center; justify-content: space-between; }
.protocol-badge { color: var(--cyan); font: 8px var(--mono); text-transform: uppercase; }
.anthropic .protocol-badge { color: var(--amber); }
.model-copy { padding: 3px; border: 0; color: var(--quiet); background: transparent; font-size: 9px; }
.model-copy:hover { color: var(--signal); }

.unsaved-mark { color: var(--amber); font: 9px var(--mono); }
.policy-layout { display: grid; grid-template-columns: minmax(300px, .78fr) minmax(500px, 1.22fr); gap: 20px; }
.policy-selector-panel, .policy-fields-panel { padding: 23px; }
.policy-selector-panel fieldset { margin: 0; padding: 0; border: 0; }
.policy-selector-panel legend { margin-bottom: 15px; color: var(--muted); font-size: 10px; }
.strategy-option { position: relative; display: grid; grid-template-columns: 29px 1fr 19px; gap: 13px; align-items: center; min-height: 76px; padding: 13px; border: 1px solid var(--line); border-bottom: 0; cursor: pointer; transition: border-color .15s, background .15s; }
.strategy-option:last-child { border-bottom: 1px solid var(--line); }
.strategy-option:hover { background: rgba(255,255,255,.02); }
.strategy-option:has(input:checked) { z-index: 1; border-color: var(--signal-soft); background: rgba(199, 255, 61, .055); }
.strategy-option input { position: absolute; opacity: 0; pointer-events: none; }
.strategy-index { color: var(--quiet); font: 9px var(--mono); }
.strategy-option b { display: block; font-family: var(--display); font-size: 13px; }
.strategy-option small { display: block; margin-top: 4px; color: var(--quiet); font-size: 9px; }
.strategy-option > i { display: grid; place-items: center; width: 17px; height: 17px; border: 1px solid var(--line-hot); border-radius: 50%; }
.strategy-option input:checked ~ i::before { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 9px var(--signal); content: ""; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.field-grid > label, .field-label { display: grid; gap: 7px; color: var(--muted); font-size: 10px; }
.field-grid > label small { color: var(--quiet); font-size: 8px; }
.unit-field { display: grid; grid-template-columns: 1fr 45px; }
.unit-field input { width: 100%; }
.unit-field b { display: grid; place-items: center; border: 1px solid var(--line); border-left: 0; color: var(--quiet); background: #101511; font: 9px var(--mono); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 18px; padding: 15px 0; border-top: 1px solid var(--line); }
.switch-row b { display: block; font-family: var(--display); font-size: 12px; }
.switch-row small { display: block; margin-top: 2px; color: var(--quiet); font-size: 9px; }
.toggle { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle > span { position: relative; width: 34px; height: 18px; border: 1px solid var(--line-hot); background: #0b0f0c; }
.toggle > span::after { position: absolute; top: 3px; left: 3px; width: 10px; height: 10px; background: var(--quiet); content: ""; transition: transform .18s, background .18s; }
.toggle input:checked + span { border-color: var(--signal-soft); }
.toggle input:checked + span::after { background: var(--signal); transform: translateX(16px); }
.toggle em { color: var(--muted); font: 8px var(--mono); font-style: normal; }
.policy-submit-row { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--line); }
.policy-submit-row p { margin: 0; color: var(--quiet); font: 8px var(--mono); }

.console-footer { display: flex; justify-content: space-between; margin-top: 78px; padding: 19px 0 3px; border-top: 1px solid var(--line); color: #4e5b51; font: 8px var(--mono); letter-spacing: .12em; }
.empty-state { padding: 70px 24px; text-align: center; }
.empty-state.compact { padding: 34px 20px; }
.empty-state h3 { margin: 8px 0 5px; font-family: var(--display); font-size: 18px; }
.empty-state p { margin: 0 auto 18px; color: var(--muted); font-size: 10px; }
.empty-glyph { display: grid; place-items: center; width: 44px; height: 44px; margin: auto; border: 1px solid var(--line-hot); color: var(--signal); font: 22px var(--mono); transform: rotate(45deg); }
.empty-glyph + h3 { margin-top: 20px; }

/* Dialogs */
.modal { width: 100%; max-width: none; height: 100%; max-height: none; padding: 24px; border: 0; color: var(--text); background: transparent; }
.modal[open] { display: grid; place-items: center; }
.modal::backdrop { background: rgba(2, 5, 3, .82); backdrop-filter: blur(7px); }
.modal-card { position: relative; width: min(680px, 100%); max-height: calc(100vh - 48px); padding: 26px; border: 1px solid var(--line-hot); background: #111713; box-shadow: var(--shadow); overflow-y: auto; animation: modal-in .25s cubic-bezier(.2,.8,.2,1); }
.modal-card::before { position: absolute; top: 0; right: 0; left: 0; height: 2px; background: var(--signal); content: ""; }
.modal-card-small { width: min(470px, 100%); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; }
.modal-head h2, .modal-card > h2 { margin: 0; font-family: var(--display); font-size: 27px; }
.modal-close { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line); color: var(--muted); background: transparent; font-size: 19px; }
.modal-close:hover { border-color: var(--red); color: var(--red); }
.modal-note { margin: 0 0 20px; color: var(--muted); font-size: 11px; }
.field-label { margin-bottom: 14px; }
.field-label input { width: 100%; }
.field-label input:disabled { border-style: dashed; color: var(--quiet); background: #0a0f0c; cursor: not-allowed; opacity: .72; }
.field-label > small { color: var(--quiet); font-size: 8px; }
.import-summary { display: flex; justify-content: space-between; min-height: 31px; padding: 7px 0; color: var(--quiet); font: 9px var(--mono); }
.modal-actions { display: flex; gap: 9px; justify-content: flex-end; margin-top: 17px; padding-top: 18px; border-top: 1px solid var(--line); }
.two-columns { margin: 3px 0 10px; }
.modal-switch { cursor: pointer; }
.secret-reveal { display: grid; grid-template-columns: 1fr auto; align-items: center; min-height: 58px; padding: 9px 10px 9px 14px; border: 1px dashed var(--signal-soft); background: rgba(199, 255, 61, .04); }
.secret-reveal code { overflow-wrap: anywhere; color: var(--signal); font-size: 11px; }
.confirm-symbol { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 20px; border: 1px solid var(--red); color: var(--red); font: 22px var(--display); transform: rotate(45deg); }
.confirm-symbol + h2 { margin-bottom: 8px; }

.toast-region { position: fixed; z-index: 1000; right: 20px; bottom: 20px; display: grid; gap: 8px; width: min(390px, calc(100vw - 40px)); }
.toast { position: relative; display: grid; grid-template-columns: 4px 1fr auto; gap: 13px; align-items: center; min-height: 58px; padding: 12px 13px 12px 0; border: 1px solid var(--line-hot); background: #121814; box-shadow: var(--shadow); animation: toast-in .25s ease both; }
.toast::before { align-self: stretch; background: var(--signal); content: ""; }
.toast.is-error::before { background: var(--red); }
.toast.is-warning::before { background: var(--amber); }
.toast b { display: block; font-size: 11px; }
.toast small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; }
.toast button { border: 0; color: var(--quiet); background: transparent; }
.toast.is-leaving { animation: toast-out .2s ease both; }

.loading-overlay { position: fixed; z-index: 60; inset: 0 0 0 var(--sidebar); display: grid; place-content: center; background: rgba(8, 11, 9, .94); transition: opacity .3s, visibility .3s; }
.loading-overlay p { margin: 14px 0 0; color: var(--muted); font: 9px var(--mono); letter-spacing: .13em; }
.loader { display: flex; gap: 5px; justify-content: center; }
.loader span { width: 7px; height: 27px; background: var(--signal); animation: loader 1s ease-in-out infinite; }
.loader span:nth-child(2) { animation-delay: .12s; }
.loader span:nth-child(3) { animation-delay: .24s; }
.console-body:not(.is-loading) .loading-overlay { visibility: hidden; opacity: 0; pointer-events: none; }

@keyframes slow-spin { to { transform: rotate(360deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes flow { from { left: 0; } to { left: calc(100% - 5px); } }
@keyframes pulse-border { 50% { border-color: rgba(199, 255, 61, .65); box-shadow: 0 0 18px rgba(199, 255, 61, .08); } }
@keyframes pulse-opacity { to { opacity: .35; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(16px) scale(.985); } }
@keyframes toast-in { from { opacity: 0; transform: translateX(18px); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(18px); } }
@keyframes loader { 0%, 100% { transform: scaleY(.42); opacity: .4; } 50% { transform: scaleY(1); opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (max-width: 1260px) {
  :root { --sidebar: 210px; }
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .stat-card:nth-child(3) { border-right: 0; }
  .stat-card:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .stat-card:nth-child(4) { grid-column: span 1; }
  .stat-card:nth-child(5) { grid-column: span 2; }
  .overview-grid { grid-template-columns: 1fr; }
  .health-panel { min-height: 280px; }
  .health-radar { float: left; margin: 25px 8% 20px 12%; }
  .health-list { padding-top: 33px; }
  .account-columns { grid-template-columns: minmax(160px, 1.2fr) minmax(180px, 1.45fr) minmax(60px, .45fr) minmax(100px, .7fr) minmax(140px, .8fr); gap: 10px; padding-right: 13px; padding-left: 13px; }
  .model-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 980px) {
  :root { --sidebar: 76px; }
  .sidebar-brand { justify-content: center; padding: 0; }
  .sidebar-brand .brand-type, .nav-item:not(.is-active)::after, .nav-item { font-size: 0; }
  .nav-item { justify-content: center; padding: 0; }
  .nav-item span { font-size: 9px; }
  .rail-status > div, .logout-button span, .sidebar-foot > p { display: none; }
  .rail-status { justify-content: center; }
  .logout-button { justify-content: center; }
  .loading-overlay { left: var(--sidebar); }
  .policy-layout { grid-template-columns: 1fr; }
  .login-stage { grid-template-columns: 1fr minmax(390px, .72fr); }
  .login-signal { right: -16%; width: 62vw; }
  .login-copy h1 { font-size: clamp(46px, 7vw, 72px); }
}

@media (max-width: 760px) {
  :root { --sidebar: 0px; }
  .sidebar { top: auto; right: 0; bottom: 0; width: 100%; height: 62px; border-top: 1px solid var(--line); border-right: 0; }
  .sidebar-brand, .sidebar-foot { display: none; }
  .side-nav { display: grid; grid-template-columns: repeat(5, 1fr); height: 100%; padding: 0; }
  .nav-item { height: 100%; border-top: 2px solid transparent; border-left: 0; font-size: 0; }
  .nav-item.is-active { border-top-color: var(--signal); border-left: 0; background: linear-gradient(0deg, rgba(199,255,61,.08), transparent); }
  .nav-item span { font-size: 9px; }
  .main-content { width: 100%; margin-left: 0; padding: 0 15px 88px; }
  .loading-overlay { inset: 0; }
  .topbar { min-height: 119px; padding: 27px 0 18px; }
  .topbar h1 { font-size: 37px; }
  .topbar .eyebrow { font-size: 8px; }
  .topbar-actions .icon-btn span:last-child { display: none; }
  .endpoint-strip { grid-template-columns: 1fr auto; gap: 7px 12px; padding: 12px; }
  .endpoint-state, .endpoint-hint { display: none; }
  .endpoint-strip code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-card { min-height: 122px; padding: 17px; }
  .stat-card:nth-child(2), .stat-card:nth-child(4) { border-right: 0; }
  .stat-card:nth-child(3) { border-right: 1px solid var(--line); }
  .stat-card:nth-child(4) { grid-column: auto; border-bottom: 1px solid var(--line); }
  .stat-card:nth-child(5) { grid-column: span 2; }
  .topology { grid-template-columns: 1fr 30px 1fr; gap: 0; padding: 26px 18px; }
  .topology > :nth-child(n+4) { display: none; }
  .topology-stack { display: none; }
  .topology-legend { padding: 0 14px; }
  .topology-legend span:nth-child(2) { display: none; }
  .topology-legend span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .health-radar { float: none; margin: 24px auto 12px; }
  .health-list { padding-top: 0; }
  .section-block { padding-top: 58px; }
  .section-title-row { align-items: flex-start; }
  .section-note { max-width: 360px; }
  .section-actions { flex-shrink: 0; }
  #check-all-button { display: none; }
  .filter-bar { align-items: stretch; flex-direction: column; }
  .search-field { width: 100%; }
  .segmented { width: 100%; overflow-x: auto; }
  .segment { flex: 1; white-space: nowrap; }
  .table-head.account-columns { display: none; }
  .account-row.account-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(130px, auto); gap: 13px; padding: 18px 15px; }
  .account-row .account-identity { grid-column: 1 / -1; grid-row: 1; }
  .account-row .account-consumption { grid-column: 1 / -1; grid-row: 2; }
  .account-row .account-metric { grid-column: 1; grid-row: 3; }
  .account-row .account-cooldown { grid-column: 2; grid-row: 3; text-align: right; }
  .account-row .row-actions { grid-column: 1 / -1; grid-row: 4; justify-content: flex-start; }
  .account-row .row-action { min-width: 44px; height: 44px; }
  .account-error { position: static; grid-column: 1 / -1; grid-row: 5; }
  .account-pagination { grid-template-columns: 1fr auto; gap: 12px 18px; padding: 13px 15px; }
  .pagination-nav { grid-column: 1 / -1; justify-content: space-between; overflow-x: auto; }
  .page-number-list { justify-content: center; }
  .page-button { min-width: 44px; height: 44px; }
  .page-ellipsis { height: 44px; }
  .model-grid { grid-template-columns: repeat(2, 1fr); }
  .policy-layout { grid-template-columns: 1fr; }
  .policy-selector-panel, .policy-fields-panel { padding: 17px; }
  .console-footer { gap: 10px; flex-wrap: wrap; }
  .login-stage { display: block; }
  .login-intro { min-height: 46vh; padding: 25px 22px 0; }
  .login-copy { margin-top: auto; padding-bottom: 55px; }
  .login-copy h1 { margin-bottom: 12px; font-size: clamp(43px, 13vw, 70px); }
  .login-copy > p:last-child { display: none; }
  .login-signal { top: -12%; right: -25%; width: 80vw; opacity: .32; }
  .login-panel { min-height: 54vh; padding: 26px 17px 35px; border-top: 1px solid var(--line); border-left: 0; }
  .login-panel-inner { padding: 34px 25px 25px; }
  .login-panel-inner h2 { font-size: 28px; }
}

@media (max-width: 480px) {
  .topbar-actions .btn-primary { padding: 0 12px; }
  .stat-card strong { font-size: 29px; }
  .section-title-row { display: block; }
  .section-title-row > .btn, .section-title-row > .section-actions, .section-title-row > .protocol-legend { margin-top: 14px; }
  .section-actions { justify-content: flex-start; }
  .account-pagination { grid-template-columns: 1fr; }
  .account-row.account-columns { grid-template-columns: minmax(0, 1fr) minmax(118px, auto); }
  .account-cooldown time { display: none; }
  .consumption-metric { padding-right: 8px; padding-left: 8px; }
  .consumption-metric b { font-size: 14px; }
  .page-size-control { grid-row: 2; }
  .pagination-nav { grid-row: 3; }
  .page-number-list { max-width: calc(100vw - 150px); overflow-x: auto; }
  .page-button { min-width: 42px; }
  .model-grid { grid-template-columns: 1fr; }
  .model-card { min-height: 132px; }
  .field-grid { grid-template-columns: 1fr; }
  .health-panel .panel-head { align-items: center; }
  .topology-panel .chip { display: none; }
  .modal { padding: 10px; }
  .modal-card { max-height: calc(100vh - 20px); padding: 21px 18px; }
  .login-intro { min-height: 42vh; }
  .login-panel { min-height: 58vh; }
  .login-copy h1 { font-size: 45px; }
}
