:root {
  --bg: #e9edf2;
  --ink: #101722;
  --text: #edf4fb;
  --muted: #66758a;
  --muted-dark: #a6b4c6;
  --paper: #fbfcfe;
  --panel: #f4f7fa;
  --line: #cfd8e5;
  --line-soft: #e4e9f0;
  --black: #07090d;
  --graphite: #141a22;
  --graphite-2: #202a36;
  --blue: #2d63e2;
  --cyan: #1495aa;
  --green: #0c8c6a;
  --amber: #c87617;
  --red: #cf3340;
  --shadow: 0 26px 72px rgba(12, 18, 28, .18);
  --soft-shadow: 0 12px 30px rgba(12, 18, 28, .08);
  --r: 8px;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #f9fbfe 0%, #eef3f8 56%, #e2e8f1 100%);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: rgba(255,255,255,.94);
  color: var(--ink);
  padding: 0 14px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}
button:hover {
  transform: translateY(-2px);
  border-color: #b9c6d8;
  box-shadow: 0 14px 32px rgba(13,20,31,.12);
}
button:active { transform: translateY(0); }
button.primary {
  color: #fff;
  background: linear-gradient(180deg, #3b7cff, #1f58df);
  border-color: #1f58df;
  box-shadow: 0 16px 36px rgba(47,109,246,.25);
}
button.dark {
  color: #fff;
  background: var(--graphite);
  border-color: var(--graphite);
}
button.danger {
  color: var(--red);
  border-color: #f3b2b8;
  background: #fff7f8;
}
button.ghost {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}
button:disabled {
  cursor: not-allowed;
  opacity: .48;
  transform: none;
  box-shadow: none;
}
.hidden { display: none !important; }
.full { width: 100%; }

@keyframes softEnter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(180deg, #111720 0%, #0b1018 100%);
  background-size: 34px 34px, 34px 34px, auto;
}
.login-card {
  width: min(430px, 100%);
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255,255,255,.08), transparent 42%),
    linear-gradient(180deg, #151d28 0%, #0d1219 100%);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 34px;
}
.brand-mark, .logo span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: var(--r);
  background:
    linear-gradient(180deg, rgba(255,255,255,.18), transparent),
    linear-gradient(135deg, #0bb7d4, #2f6df6 58%, #635bff);
  color: #fff;
  font-weight: 900;
}
.login-card h1 { margin: 20px 0 6px; font-size: 28px; }
.login-card p { margin: 0 0 24px; color: #a8b9cf; }
.login-card label { margin-bottom: 14px; color: #a8b9cf; }
label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: var(--r);
  padding: 11px 12px;
  outline: none;
}
textarea { min-height: 86px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(47,109,246,.12);
}
.form-error { min-height: 20px; color: #ffb5bc; margin-top: 12px; }

.app {
  display: grid;
  grid-template-columns: 82px 1fr;
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  color: var(--text);
  padding: 20px 13px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  background:
    linear-gradient(180deg, #070a0f 0%, #101722 58%, #090d13 100%);
  border-right: 1px solid rgba(255,255,255,.08);
  z-index: 5;
}
.logo {
  display: grid;
  justify-items: center;
  gap: 10px;
}
.logo strong {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.sidebar nav {
  display: grid;
  gap: 10px;
  align-content: start;
  padding-top: 36px;
}
.sidebar nav button {
  position: relative;
  width: 48px;
  height: 48px;
  min-height: 48px;
  padding: 0;
  display: grid;
  place-items: center;
  color: #8798af;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r);
  font-size: 0;
  box-shadow: none;
}
.sidebar nav button:before {
  content: attr(data-short);
  font-size: 15px;
  font-weight: 900;
}
.sidebar nav button:after {
  content: attr(aria-label);
  position: absolute;
  left: 58px;
  top: 50%;
  transform: translateY(-50%) translateX(-4px);
  opacity: 0;
  pointer-events: none;
  color: #fff;
  background: #111720;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--r);
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: var(--soft-shadow);
  transition: opacity .18s ease, transform .18s ease;
  z-index: 20;
}
.sidebar nav button:hover:after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}
.sidebar nav button:hover,
.sidebar nav button.active {
  color: #fff;
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  transform: none;
}
.sidebar nav button.active:after { display: none; }
.sidebar nav button.active {
  background-image: linear-gradient(180deg, rgba(255,255,255,.13), rgba(255,255,255,.08));
}
.sidebar nav button.active:before {
  text-shadow: 0 0 14px rgba(66,211,232,.46);
}
.sidebar nav button.active::selection { background: transparent; }
.sidebar small {
  writing-mode: vertical-rl;
  color: #6f8098;
  font-size: 11px;
  white-space: nowrap;
}

.main {
  min-width: 0;
  height: 100vh;
  overflow: auto;
  padding: 20px 32px 32px;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 12px;
}
.topbar h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1;
  font-weight: 900;
}
.topbar p {
  margin: 8px 0 0;
  color: #526178;
  font-size: 13px;
}
.topbar > div:first-child {
  min-width: 0;
}
.page-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  margin-left: auto;
}
.page-actions:empty {
  display: none;
}
.view { min-width: 0; }
.grid { display: grid; gap: 16px; }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.panel,
.metric,
.side-panel,
.line-deck,
.user-column,
.group-map,
.sub-panel {
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: rgba(255,255,255,.92);
  box-shadow: var(--soft-shadow);
}
.panel { padding: 16px; overflow: hidden; }

.section-title,
.panel-head,
.stage-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.section-title { margin: 22px 0 12px; }
.section-title.flush { margin: 0 0 14px; }
.section-title h3,
.panel-head h2,
.stage-head h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.1;
  font-weight: 900;
}
.section-title p,
.panel-head p,
.stage-head p {
  margin: 6px 0 0;
  color: #6c7e95;
  font-size: 12px;
}
.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}
.muted { color: var(--muted); }

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
  color: #4b5d73;
  background: #eef3f8;
}
.chip.green { color: #04785d; background: #dff8ef; }
.chip.blue { color: #1d4ed8; background: #e8f0ff; }
.chip.cyan { color: #087e98; background: #dbf7fc; }
.chip.amber { color: #95550d; background: #fff0d7; }
.chip.red { color: #a3232c; background: #ffe4e7; }
.chip.dark { color: #fff; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.1); }
.dot {
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: currentColor;
}

@keyframes skeletonSweep {
  0% { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}

@keyframes waterfallFloat {
  0%, 100% { transform: translateY(0); opacity: .92; }
  50% { transform: translateY(-5px); opacity: 1; }
}

@keyframes loaderDot {
  0%, 80%, 100% { opacity: .36; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}

.waterfall-loader {
  height: calc(100vh - 114px);
  min-height: 760px;
  display: grid;
  grid-template-rows: 34px 112px minmax(0, 1fr);
  gap: 16px;
  overflow: hidden;
}

.loader-status {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  color: #6a7789;
}

.loader-status span {
  width: 146px;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, #e2e9f2 0%, #f8fbfe 45%, #e2e9f2 80%);
  background-size: 220% 100%;
  animation: skeletonSweep 1.25s ease-in-out infinite;
}

.loader-status i {
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: #9fb0c4;
  animation: loaderDot 1.2s ease-in-out infinite;
}

.loader-status i:nth-child(3) { animation-delay: .12s; }
.loader-status i:nth-child(4) { animation-delay: .24s; }

.waterfall-strip {
  display: grid;
  grid-template-columns: 1.15fr repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.waterfall-strip i,
.waterfall-card {
  display: block;
  min-width: 0;
  border-radius: var(--r);
  border: 1px solid #dfe6ef;
  background:
    linear-gradient(90deg, #edf2f7 0%, #f9fbfd 42%, #edf2f7 76%);
  background-size: 220% 100%;
  box-shadow: 0 10px 26px rgba(15,23,42,.055);
  animation: skeletonSweep 1.25s ease-in-out infinite;
}

.waterfall-strip i:first-child {
  background:
    linear-gradient(90deg, #dce6f4 0%, #f8fbff 42%, #dce6f4 76%);
  background-size: 220% 100%;
}

.waterfall-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: 16px;
}

.waterfall-col {
  display: grid;
  gap: 16px;
}

.waterfall-col:nth-child(2) { padding-top: 22px; }
.waterfall-col:nth-child(3) { padding-top: 8px; }
.waterfall-col:nth-child(4) { padding-top: 34px; }

.waterfall-card {
  position: relative;
  overflow: hidden;
  height: 190px;
  padding: 18px;
  animation: skeletonSweep 1.25s ease-in-out infinite, waterfallFloat 2.6s ease-in-out infinite;
}

.waterfall-card:nth-child(2n) { animation-delay: .08s, .18s; }
.waterfall-col:nth-child(2) .waterfall-card { animation-delay: .14s, .28s; }
.waterfall-col:nth-child(3) .waterfall-card { animation-delay: .22s, .1s; }
.waterfall-col:nth-child(4) .waterfall-card { animation-delay: .3s, .22s; }

.waterfall-card.short { height: 162px; }
.waterfall-card.medium { height: 226px; }
.waterfall-card.tall { height: 278px; }
.waterfall-card.tiny { height: 128px; }

.waterfall-card b,
.waterfall-card em,
.waterfall-card strong {
  display: block;
  border-radius: 999px;
  background: rgba(194, 207, 224, .78);
}

.waterfall-card b {
  width: 44%;
  height: 16px;
  margin-bottom: 20px;
}

.waterfall-card em {
  width: 82%;
  height: 10px;
  margin-top: 12px;
}

.waterfall-card em:nth-of-type(2) { width: 62%; }

.waterfall-card strong {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  height: 42px;
  border-radius: var(--r);
  background: rgba(214, 224, 236, .7);
}

.waterfall-loader.compact {
  height: auto;
  min-height: 520px;
}

.load-error-panel {
  min-height: calc(100vh - 150px);
  display: grid;
  grid-template-columns: minmax(260px, 420px) minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  padding: 18px 0 34px;
}

.load-error-copy {
  border: 1px solid #dfe6ef;
  border-radius: var(--r);
  background: rgba(255,255,255,.88);
  box-shadow: 0 16px 42px rgba(15,23,42,.08);
  padding: 24px;
}

.load-error-copy h3 {
  margin: 14px 0 8px;
  font-size: 22px;
}

.load-error-copy p {
  margin: 0 0 18px;
  color: #68758a;
  line-height: 1.7;
  word-break: break-word;
}

.mini-waterfall {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 14px;
}

.mini-waterfall i {
  min-height: 170px;
  border: 1px solid #dfe6ef;
  border-radius: var(--r);
  background: linear-gradient(90deg, #edf2f7 0%, #f9fbfd 42%, #edf2f7 76%);
  background-size: 220% 100%;
  box-shadow: 0 10px 26px rgba(15,23,42,.055);
  animation: skeletonSweep 1.25s ease-in-out infinite, waterfallFloat 2.7s ease-in-out infinite;
}

.mini-waterfall i:nth-child(2),
.mini-waterfall i:nth-child(5) {
  min-height: 230px;
  margin-top: 24px;
  animation-delay: .12s, .2s;
}

.mini-waterfall i:nth-child(3),
.mini-waterfall i:nth-child(4) {
  min-height: 135px;
  margin-top: 8px;
  animation-delay: .24s, .1s;
}

.elite-dashboard {
  height: calc(100vh - 114px);
  min-height: 760px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  grid-template-rows: 112px 1fr 190px;
  gap: 16px;
}
.status-strip {
  display: grid;
  grid-template-columns: 1.15fr repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.instrument {
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: rgba(255,255,255,.9);
  box-shadow: var(--soft-shadow);
  padding: 15px;
  overflow: hidden;
  position: relative;
  animation: softEnter .55s ease both;
}
.status-strip .instrument:nth-child(1) { animation-delay: .02s; }
.status-strip .instrument:nth-child(2) { animation-delay: .08s; }
.status-strip .instrument:nth-child(3) { animation-delay: .14s; }
.status-strip .instrument:nth-child(4) { animation-delay: .2s; }
.instrument.dark {
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255,255,255,.07), transparent 44%),
    linear-gradient(135deg, #111720 0%, #1d2633 100%);
  border-color: #111720;
}
.instrument span,
.metric span {
  color: #68788f;
  font-size: 12px;
  font-weight: 750;
}
.instrument.dark span { color: #a8b9cf; }
.instrument strong,
.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  line-height: 1;
  font-weight: 900;
}
.instrument small,
.metric em {
  display: block;
  margin-top: 8px;
  color: #718198;
  font-size: 12px;
  font-style: normal;
}
.instrument.dark small { color: #b2c1d5; }
.action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.kv-list { display: grid; }
.kv {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  min-height: 46px;
  border-bottom: 1px solid #e5ebf2;
  color: #607089;
  font-size: 13px;
}
.kv:last-child { border-bottom: 0; }
.kv strong { color: var(--ink); font-size: 14px; }
.side-panel .kv,
.sub-panel .kv,
.panel .kv,
.detail-card .kv,
.user-sync-panel .kv {
  border-color: #e5ebf2;
  color: #607089;
}
.side-panel .kv strong,
.sub-panel .kv strong,
.panel .kv strong,
.detail-card .kv strong,
.user-sync-panel .kv strong {
  color: var(--ink);
}
.bottom-grid {
  grid-column: 1 / 2;
  display: grid;
  grid-template-columns: 1.35fr .8fr;
  gap: 16px;
}
.bottom-panel {
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: rgba(255,255,255,.88);
  box-shadow: var(--soft-shadow);
  padding: 15px;
  overflow: hidden;
  animation: softEnter .6s ease .18s both;
}
.event-list { display: grid; gap: 9px; margin-top: 10px; }
.event {
  min-height: 50px;
  border: 1px solid #e1e7f0;
  background: #fff;
  border-radius: var(--r);
  display: grid;
  grid-template-columns: 12px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
}
.event i {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: var(--green);
}
.event.warn i { background: var(--amber); }
.event.err i { background: var(--red); }
.event strong { font-size: 13px; }
.event span,
.event time { color: #65758c; font-size: 12px; }

.servers-grid,
.line-grid {
  height: calc(100vh - 114px);
  min-height: 760px;
  display: grid;
  gap: 16px;
}
.servers-grid { grid-template-columns: minmax(0, 1fr); }
.line-grid { grid-template-columns: minmax(0, 1fr) 350px; }
.rack-room {
  border-radius: var(--r);
  border: 1px solid #151e2a;
  background:
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(180deg, #111720 0%, #0b1017 100%);
  background-size: 34px 34px, 34px 34px, auto;
  box-shadow: var(--shadow);
  padding: 18px;
  overflow: hidden;
  color: var(--text);
  animation: softEnter .6s ease both;
}
.rack-room .stage-head h2 { color: #f3f7fb; }
.rack-room .stage-head p { color: #a1b2c8; }
.rack-list { display: grid; gap: 13px; margin-top: 12px; }
.blade {
  min-height: 148px;
  border-radius: var(--r);
  border: 1px solid rgba(255,255,255,.12);
  background:
    linear-gradient(90deg, rgba(255,255,255,.08), transparent 22%),
    rgba(255,255,255,.055);
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr) 218px;
  gap: 18px;
  align-items: center;
  padding: 15px;
  position: relative;
  transition: transform .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.blade:hover {
  transform: translateX(4px);
  border-color: rgba(255,255,255,.22);
  background: linear-gradient(90deg, rgba(255,255,255,.11), transparent 24%), rgba(255,255,255,.07);
}
.blade:before {
  content: "";
  width: 5px;
  position: absolute;
  top: 16px;
  bottom: 16px;
  left: 0;
  background: var(--green);
  border-radius: 0 99px 99px 0;
}
.blade.warn:before { background: var(--amber); }
.blade.down:before { background: var(--red); }
.blade-title strong { display: block; font-size: 20px; }
.blade-title small {
  display: block;
  color: #a7b8cd;
  margin: 8px 0 12px;
  font-size: 12px;
  line-height: 1.45;
  word-break: break-all;
}
.user-meta { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 11px; }
.blade-meters { display: grid; gap: 11px; }
.meter-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #a7b8cd;
  font-size: 12px;
  margin-bottom: 6px;
}
.meter-label strong { color: #fff; }
.meter {
  height: 8px;
  border-radius: 99px;
  background: rgba(255,255,255,.12);
  overflow: hidden;
}
.meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}
.version-tower { display: grid; gap: 9px; }
.blade-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.server-update-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.server-update-actions button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
}
.blade-actions button {
  min-height: 34px;
  padding: 0 10px;
}
.version-cell,
.version-tile,
.side-version-tile {
  position: relative;
  border-radius: var(--r);
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.07);
  padding: 10px;
  min-height: 59px;
  text-align: left;
  box-shadow: none;
}
.version-tile,
.side-version-tile {
  border-color: var(--line-soft);
  background: var(--panel);
  display: grid;
  align-content: center;
  gap: 4px;
}
.version-cell span,
.version-tile span,
.side-version-tile span {
  color: #a7b8cd;
  font-size: 12px;
}
.version-tile span,
.side-version-tile span { color: var(--muted); }
.version-cell b,
.version-cell strong,
.version-tile b,
.version-tile strong,
.side-version-tile strong {
  display: block;
  margin-top: 5px;
  font-size: 18px;
}
.version-cell small,
.version-tile small,
.side-version-tile small {
  color: var(--blue);
  font-size: 12px;
}
.update-dot {
  display: none;
  position: absolute;
  right: 10px;
  top: 10px;
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: var(--amber);
  box-shadow: 0 0 0 5px rgba(221,140,24,.15);
}
.has-update .update-dot { display: block; }
.has-update small { color: #b45309; }
.side-panel {
  padding: 18px;
  overflow: hidden;
  animation: softEnter .62s ease .1s both;
}
.ops-side-panel {
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  gap: 14px;
}
.ops-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.ops-summary div,
.plain-note {
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  background: #fff;
  padding: 12px;
}
.ops-summary span,
.plain-note p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.ops-summary strong {
  display: block;
  margin-top: 6px;
  font-size: 22px;
}
.plain-note {
  align-self: start;
}
.plain-note strong {
  display: block;
  margin-bottom: 6px;
}
.plain-note p {
  margin: 0;
}

.line-deck {
  min-height: 0;
  padding: 16px;
  overflow: hidden;
  animation: softEnter .6s ease both;
}
.seg-tabs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tab {
  height: 34px;
  min-height: 34px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  color: #607089;
  font-size: 13px;
  font-weight: 800;
}
.tab.active { color: #fff; background: #111720; border-color: #111720; }
.line-table {
  margin-top: 13px;
  border: 1px solid #e2e8f1;
  border-radius: var(--r);
  overflow: hidden;
}
.line-row {
  min-height: 78px;
  display: grid;
  grid-template-columns: 16px minmax(180px,1.4fr) .55fr .9fr .7fr auto;
  gap: 12px;
  align-items: center;
  padding: 0 14px;
  border-bottom: 1px solid #e8edf4;
  background: #fff;
  transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}
.line-row:last-child { border-bottom: 0; }
.line-row.selected,
.line-row:hover {
  transform: translateX(4px);
  box-shadow: inset 3px 0 0 rgba(47,109,246,.38);
  background: linear-gradient(90deg, rgba(47,109,246,.08), transparent 58%), #fff;
}
.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 99px;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(19,163,122,.1);
}
.status-dot.warn { background: var(--amber); box-shadow: 0 0 0 4px rgba(221,140,24,.12); }
.status-dot.off { background: var(--red); box-shadow: 0 0 0 4px rgba(222,59,71,.1); }
.row-title strong { display: block; font-size: 14px; }
.row-title span { display: block; margin-top: 5px; color: #607089; font-size: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.line-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  color: #04785d;
  font-size: 12px;
  font-weight: 850;
}
.line-state i {
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: currentColor;
}
.line-state.warn { color: #95550d; }
.line-state.off { color: #a3232c; }
.code-box,
.code {
  border-radius: var(--r);
  background: #0f1520;
  color: #dfe8f5;
  padding: 13px;
  overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  line-height: 1.65;
}
.code-box {
  height: 250px;
  margin-top: 14px;
  white-space: pre-wrap;
}

.users-grid {
  height: calc(100vh - 114px);
  min-height: 760px;
  display: grid;
  grid-template-columns: 318px minmax(0, 1fr) 338px;
  gap: 16px;
}
.user-column,
.group-map,
.sub-panel {
  padding: 16px;
  min-height: 0;
  overflow: hidden;
  animation: softEnter .6s ease both;
}
.group-map { animation-delay: .08s; }
.sub-panel { animation-delay: .16s; }
.user-list { display: grid; gap: 10px; margin-top: 12px; }
.user-card {
  border-radius: var(--r);
  border: 1px solid #e0e7f0;
  background: #fff;
  min-height: 96px;
  padding: 13px;
  padding-right: 132px;
  position: relative;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  width: 100%;
  text-align: left;
}
.user-card-actions {
  position: absolute;
  right: 11px;
  top: 11px;
  display: flex;
  gap: 6px;
}
.user-card-actions span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #c9d6e7;
  border-radius: 8px;
  padding: 0 9px;
  color: #2457d6;
  background: #fff;
  font-size: 12px;
  font-weight: 900;
}
.user-card-actions span:hover {
  color: #fff;
  background: #2457d6;
  border-color: #2457d6;
}
.user-card-export {
  align-self: start;
  margin-top: 12px;
  min-height: 34px;
  padding: 0 13px;
  border-color: #2457d6;
  background: #2457d6;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(36,87,214,.16);
}
.user-card-export:hover {
  border-color: #1d46aa;
  background: #1d46aa;
  color: #fff;
}
.user-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 38px rgba(13,20,31,.09);
}
.user-card.active {
  border-color: rgba(47,109,246,.55);
  box-shadow: 0 18px 42px rgba(47,109,246,.12);
}
.user-card strong { display: block; font-size: 15px; }
.user-card p { margin: 8px 0 0; color: #607089; font-size: 12px; }
.group-canvas {
  margin-top: 13px;
  height: calc(100% - 56px);
  min-height: 520px;
  border: 1px solid #e2e8f1;
  border-radius: var(--r);
  background:
    linear-gradient(90deg, transparent 0 31px, rgba(15,23,42,.04) 32px),
    linear-gradient(0deg, transparent 0 31px, rgba(15,23,42,.04) 32px),
    #fff;
  background-size: 32px 32px, 32px 32px, auto;
  overflow: auto;
  padding: 18px;
}
.lane {
  min-height: 120px;
  border-radius: var(--r);
  border: 1px solid #dfe7f0;
  background: rgba(248,250,252,.9);
  margin-bottom: 15px;
  padding: 13px;
  position: relative;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.lane:hover {
  transform: translateX(4px);
  border-color: rgba(47,109,246,.42);
  background: rgba(255,255,255,.96);
}
.lane h3 { margin: 0; font-size: 15px; }
.lane p { margin: 6px 0 0; color: #607089; font-size: 12px; }
.lane .nodes {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.node-pill {
  min-width: 80px;
  height: 34px;
  border-radius: var(--r);
  background: #111720;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 850;
  transition: transform .18s ease, background .18s ease;
}
.node-pill:hover { transform: translateY(-2px); background: #1f58df; }
.subscription-list { display: grid; gap: 10px; margin-top: 13px; }
.sub-item,
.subscription-row {
  min-height: 78px;
  border-radius: var(--r);
  border: 1px solid #e1e8f0;
  background: #fff;
  padding: 12px;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.sub-item:hover,
.subscription-row:hover {
  transform: translateY(-2px);
  border-color: rgba(47,109,246,.38);
  box-shadow: 0 14px 32px rgba(47,109,246,.08);
}
.sub-item strong,
.subscription-row strong { font-size: 14px; }
.sub-item span,
.subscription-row span {
  color: #607089;
  font-size: 12px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.stat-triplet {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 13px;
}
.stat-triplet div {
  border: 1px solid #e1e8f0;
  background: #fff;
  border-radius: var(--r);
  padding: 11px;
}
.stat-triplet span { color: #607089; font-size: 12px; }
.stat-triplet strong { display: block; margin-top: 6px; font-size: 18px; }

.metric {
  padding: 18px;
  min-height: 118px;
}
.summary-row { margin-bottom: 18px; }
.hero-panel,
.overview-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: rgba(255,255,255,.92);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--soft-shadow);
  padding: 22px;
  margin-bottom: 16px;
}
.overview-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.eyebrow { color: var(--blue); font-size: 13px; font-weight: 700; }
.empty {
  border: 1px dashed #c4cfdd;
  border-radius: var(--r);
  padding: 32px;
  text-align: center;
  color: var(--muted);
  background: rgba(255,255,255,.72);
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
  table-layout: auto;
}
th, td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: middle;
}
th {
  color: var(--muted);
  font-weight: 800;
  background: var(--panel);
}
tr:last-child td { border-bottom: 0; }
td strong { font-weight: 800; }
.url-cell,
.sub-link {
  max-width: 440px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--muted);
}
.group-card h4 { margin: 18px 0 8px; font-size: 15px; }
.group-stats { margin-bottom: 14px; }
.compact-panel { max-height: 432px; overflow: auto; }
.log-hint { margin: -4px 0 12px; }
.subscription-cell { display: flex; flex-wrap: wrap; gap: 8px; }
.subscription-cell button { padding: 0 10px; }
.subscription-export { display: grid; gap: 12px; }
.subscription-row {
  grid-template-columns: minmax(0, 1fr) auto;
}
.subscription-row div:first-child { min-width: 0; }
.subscription-row strong,
.subscription-row span {
  display: block;
  min-width: 0;
}
.subscription-row span { margin-top: 5px; }
.subscription-preview {
  max-height: 62vh;
  white-space: pre-wrap;
}
.settings-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}
.settings-form.settings-form-wide {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
}
.settings-form-actions,
.audit-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}
.settings-preview {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  padding: 13px 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  background: var(--panel);
}
.settings-preview span { color: var(--muted); font-size: 13px; }
.settings-preview strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  color: var(--blue);
}
.audit-preview strong {
  white-space: normal;
  color: var(--ink);
}
.setting-toggle {
  align-items: flex-start;
  padding: 13px 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  background: #fff;
}
.setting-toggle span {
  display: grid;
  gap: 5px;
}
.setting-toggle strong {
  color: var(--ink);
  font-size: 14px;
}
.setting-toggle small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.audit-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.audit-actions {
  margin-top: 12px;
}
.audit-list .line-status-item {
  grid-template-columns: minmax(0, 1fr) auto;
}
.diff-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.diff-list span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid #e3eaf3;
  border-radius: 999px;
  background: #f6f9fc;
  color: #526178;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 760;
}
.warning-panel {
  border-color: rgba(217, 119, 6, .28);
  background: #fffaf0;
}
.warning-panel h3 { margin: 0 0 10px; }
.warning-panel ul {
  margin: 0;
  padding-left: 20px;
  color: #7c2d12;
}
.warning-panel li + li { margin-top: 6px; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.form-grid .wide { grid-column: 1 / -1; }
.checkbox-row {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}
.checkbox-row input {
  width: 18px;
  height: 18px;
  margin: 0;
}
dialog {
  width: min(780px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 0;
  overflow: hidden;
}
dialog::backdrop {
  background: rgba(15, 23, 42, .38);
  backdrop-filter: blur(4px);
}
#modalForm {
  max-height: calc(100vh - 32px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding: 20px;
}
#modalBody {
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}
.modal-head,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.modal-head { margin-bottom: 18px; }
.modal-head h3 { margin: 0; }
.modal-actions { margin-top: 18px; justify-content: flex-end; }
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: #111827;
  color: #fff;
  border-radius: var(--r);
  padding: 13px 15px;
  box-shadow: var(--shadow);
  max-width: 430px;
  z-index: 20;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 13, 20, .34);
  backdrop-filter: blur(4px);
  z-index: 28;
}
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(560px, calc(100vw - 24px));
  height: 100vh;
  background:
    linear-gradient(180deg, rgba(47,109,246,.06), transparent 34%),
    #f8fafc;
  border-left: 1px solid rgba(15,23,42,.12);
  box-shadow: -28px 0 70px rgba(13,20,31,.18);
  z-index: 29;
  display: grid;
  grid-template-rows: auto 1fr;
  animation: drawerIn .22s ease both;
}
@keyframes drawerIn {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}
.drawer-head {
  min-height: 92px;
  padding: 20px;
  border-bottom: 1px solid #e2e8f1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  background: rgba(255,255,255,.72);
}
.drawer-head span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}
.drawer-head h3 {
  margin: 6px 0 0;
  font-size: 24px;
  line-height: 1.1;
}
.drawer-body {
  min-height: 0;
  overflow: auto;
  padding: 18px 20px 24px;
  display: grid;
  gap: 14px;
}

.drawer-alert,
.capability-loading {
  border: 1px solid #dfe6ef;
  border-radius: var(--r);
  background: rgba(255,255,255,.86);
  padding: 18px;
  box-shadow: 0 12px 32px rgba(15,23,42,.07);
}

.drawer-alert p {
  margin: 12px 0 0;
  color: #68758a;
  line-height: 1.6;
  word-break: break-word;
}

.capability-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.capability-groups {
  display: grid;
  gap: 12px;
}

.capability-group {
  border: 1px solid #dfe6ef;
  border-radius: var(--r);
  background: rgba(255,255,255,.88);
  overflow: hidden;
}

.capability-group-head {
  min-height: 50px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #e8eef5;
}

.capability-group-head strong {
  font-size: 15px;
}

.capability-list {
  display: grid;
}

.capability-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: start;
  min-height: 62px;
  padding: 12px 14px;
  border-bottom: 1px solid #edf2f7;
}

.capability-item:last-child { border-bottom: 0; }

.capability-item > span {
  display: grid;
  place-items: center;
  min-height: 26px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.capability-item.supported > span {
  color: #04785d;
  background: #dff8ef;
}

.capability-item.missing > span {
  color: #a3232c;
  background: #ffe4e7;
}

.capability-item strong {
  display: block;
  font-size: 14px;
  line-height: 1.25;
}

.capability-item small {
  display: block;
  margin-top: 5px;
  color: #758397;
  font-size: 12px;
  line-height: 1.35;
  word-break: break-all;
}
.detail-hero,
.detail-card,
.confirm-card,
.result-card {
  border: 1px solid #dfe7f0;
  border-radius: var(--r);
  background: rgba(255,255,255,.9);
  box-shadow: var(--soft-shadow);
  padding: 15px;
}
.detail-hero {
  color: #fff;
  border-color: #111720;
  background:
    linear-gradient(135deg, rgba(47,109,246,.22), transparent 58%),
    linear-gradient(180deg, #151d28 0%, #0d1219 100%);
  overflow: hidden;
  position: relative;
  min-height: 156px;
}
.detail-hero:after {
  content: "";
  position: absolute;
  inset: auto -18px -42px auto;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  border: 1px solid rgba(66,211,232,.24);
  box-shadow: inset 0 0 42px rgba(66,211,232,.12);
}
.detail-hero h4 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 22px;
}
.detail-hero p {
  position: relative;
  z-index: 1;
  margin: 8px 0 0;
  color: #a8b9cf;
  font-size: 12px;
}
.detail-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.detail-metrics div,
.mini-result {
  border: 1px solid rgba(255,255,255,.13);
  border-radius: var(--r);
  background: rgba(255,255,255,.08);
  padding: 12px;
}
.detail-card .detail-metrics div,
.mini-result {
  border-color: #e1e8f0;
  background: #fff;
}
.detail-hero .detail-metrics {
  position: relative;
  z-index: 1;
}
.detail-metrics span,
.mini-result span {
  display: block;
  color: #8fa1b7;
  font-size: 12px;
  font-weight: 760;
}
.detail-metrics strong,
.mini-result strong {
  display: block;
  margin-top: 7px;
  font-size: 18px;
  line-height: 1;
}
.detail-card h4,
.confirm-card h4,
.result-card h4 {
  margin: 0 0 10px;
  font-size: 16px;
}
.ip-list,
.line-status-list,
.result-list {
  display: grid;
  gap: 9px;
}
.ip-list span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border-radius: var(--r);
  background: #edf6ff;
  color: #1d4ed8;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 850;
  margin: 0 7px 7px 0;
}
.line-status-item,
.result-item {
  border: 1px solid #e1e8f0;
  border-radius: var(--r);
  background: #fff;
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}
.line-status-item strong,
.result-item strong {
  display: block;
  font-size: 13px;
}
.line-status-item p,
.result-item p,
.confirm-card p {
  margin: 6px 0 0;
  color: #65758c;
  font-size: 12px;
  line-height: 1.5;
}
.result-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.result-summary .mini-result strong { color: var(--ink); }
.version-compare {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}
.version-box {
  border: 1px solid #e1e8f0;
  border-radius: var(--r);
  background: #fff;
  padding: 12px;
}
.version-box span {
  color: #607089;
  font-size: 12px;
}
.version-box strong {
  display: block;
  margin-top: 7px;
  font-size: 18px;
}
.version-arrow {
  color: var(--blue);
  font-weight: 900;
}
.update-diagnosis-card {
  display: grid;
  gap: 10px;
}
.update-reason {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border: 1px solid #fed7aa;
  border-radius: var(--r);
  background: #fff7ed;
  color: #9a3412;
  padding: 0 11px;
  font-size: 12px;
  font-weight: 900;
}
.update-next-steps {
  margin: 0;
  padding-left: 20px;
  color: #40516a;
  font-size: 12px;
  line-height: 1.65;
}
.update-log-snippet {
  display: grid;
  gap: 6px;
}
.update-log-snippet code {
  display: block;
  border: 1px solid #e1e8f0;
  border-radius: 6px;
  background: #0f172a;
  color: #dbeafe;
  padding: 8px;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 11px;
  line-height: 1.45;
}
.modal-note {
  color: #65758c;
  font-size: 12px;
  line-height: 1.6;
}

/* Premium operations console refresh */
body {
  background:
    linear-gradient(90deg, rgba(16,23,34,.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(16,23,34,.028) 1px, transparent 1px),
    linear-gradient(180deg, #f7f9fb 0%, #eef2f6 46%, #e6ebf1 100%);
  background-size: 36px 36px, 36px 36px, auto;
}

button {
  border-color: rgba(138,151,170,.42);
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(246,248,251,.92));
  box-shadow: 0 1px 0 rgba(255,255,255,.9), 0 10px 22px rgba(12,18,28,.06);
}

button:hover {
  border-color: rgba(45,99,226,.38);
  box-shadow: 0 14px 30px rgba(12,18,28,.11);
}

button.primary {
  background:
    linear-gradient(180deg, rgba(255,255,255,.13), transparent),
    linear-gradient(180deg, #3b73ee, #244fc4);
  border-color: #244fc4;
  box-shadow: 0 16px 34px rgba(45,99,226,.22);
}

button.dark {
  background:
    linear-gradient(180deg, rgba(255,255,255,.09), transparent),
    linear-gradient(180deg, #202733, #10151e);
  border-color: rgba(15,23,42,.86);
}

input, select, textarea {
  background: rgba(255,255,255,.94);
  border-color: rgba(148,163,184,.48);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.78);
}

.app {
  grid-template-columns: 92px 1fr;
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(255,255,255,.035), transparent 28%),
    linear-gradient(180deg, #0a0d12 0%, #111821 52%, #07090d 100%);
  border-right: 1px solid rgba(255,255,255,.09);
  box-shadow: 18px 0 48px rgba(12,18,28,.16);
}

.brand-mark,
.logo span {
  background:
    linear-gradient(180deg, rgba(255,255,255,.2), transparent),
    linear-gradient(135deg, #1397aa 0%, #2d63e2 58%, #1d2635 100%);
  box-shadow: 0 18px 34px rgba(45,99,226,.24);
  animation: none;
}

.sidebar nav button {
  border-radius: 10px;
  color: #8794a8;
}

.sidebar nav button:hover,
.sidebar nav button.active {
  background:
    linear-gradient(180deg, rgba(255,255,255,.13), rgba(255,255,255,.06));
  border-color: rgba(255,255,255,.14);
}

.sidebar nav button.active {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 12px 28px rgba(0,0,0,.22);
}

.sidebar nav button.active:before {
  text-shadow: none;
}

.main {
  padding: 22px 32px 34px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  min-height: 72px;
  margin: -22px -32px 18px;
  padding: 18px 32px 14px;
  background: rgba(247,249,251,.86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(148,163,184,.22);
}

.topbar h2 {
  font-size: 29px;
  letter-spacing: 0;
}

.topbar p {
  color: #68768a;
  font-size: 12px;
}

.panel,
.metric,
.side-panel,
.line-deck,
.user-column,
.group-map,
.sub-panel {
  background:
    linear-gradient(180deg, rgba(255,255,255,.88), rgba(250,252,254,.82));
  border-color: rgba(148,163,184,.34);
  box-shadow: 0 16px 38px rgba(12,18,28,.075);
}

.instrument,
.metric,
.panel {
  position: relative;
}

.instrument:before,
.metric:before,
.panel:before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  border: 1px solid rgba(255,255,255,.58);
}

.instrument {
  background:
    linear-gradient(180deg, rgba(255,255,255,.9), rgba(246,249,252,.84));
  border-color: rgba(148,163,184,.34);
  box-shadow: 0 16px 38px rgba(12,18,28,.075);
  animation: none;
}

.instrument.dark,
.detail-hero {
  background:
    linear-gradient(180deg, rgba(255,255,255,.08), transparent 48%),
    linear-gradient(135deg, #1c2430 0%, #111821 54%, #0c1017 100%);
  border-color: rgba(10,14,20,.95);
}

.instrument span,
.metric span {
  color: #6b7789;
  text-transform: uppercase;
  font-size: 11px;
}

.instrument strong,
.metric strong {
  color: #0c1420;
  font-size: 30px;
}

.instrument.dark strong {
  color: #fff;
}

.chip {
  border: 1px solid rgba(148,163,184,.2);
  background: #eef2f6;
}

.chip.green {
  color: #04745a;
  background: #e1f5ed;
  border-color: rgba(12,140,106,.16);
}

.chip.blue {
  color: #244fc4;
  background: #e8eefc;
  border-color: rgba(45,99,226,.16);
}

.chip.cyan {
  color: #0b7282;
  background: #e0f3f6;
  border-color: rgba(20,149,170,.18);
}

.chip.amber {
  color: #8b4c0d;
  background: #f8ead7;
  border-color: rgba(200,118,23,.18);
}

.chip.red {
  color: #9e2430;
  background: #fae5e8;
  border-color: rgba(207,51,64,.18);
}

.elite-dashboard {
  min-height: 760px;
  gap: 18px;
}

.bottom-grid .panel {
  background:
    linear-gradient(180deg, rgba(255,255,255,.95), rgba(248,250,253,.88));
}

.line-table,
.group-canvas {
  background:
    linear-gradient(90deg, transparent 0 31px, rgba(16,23,34,.035) 32px),
    linear-gradient(0deg, transparent 0 31px, rgba(16,23,34,.028) 32px),
    rgba(255,255,255,.82);
  border-color: rgba(148,163,184,.34);
}

.line-row,
.user-card,
.lane,
.sub-item,
.subscription-row,
.stat-triplet div,
.detail-card,
.confirm-card,
.result-card,
.line-status-item,
.result-item,
.version-box {
  background: rgba(255,255,255,.88);
  border-color: rgba(148,163,184,.3);
  box-shadow: 0 8px 22px rgba(12,18,28,.045);
}

.node-pill {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-row:hover,
.line-row.selected {
  transform: translateX(0);
  background:
    linear-gradient(90deg, rgba(45,99,226,.08), transparent 58%),
    rgba(255,255,255,.96);
  box-shadow: inset 3px 0 0 rgba(45,99,226,.6), 0 12px 28px rgba(12,18,28,.08);
}

.status-dot {
  box-shadow: 0 0 0 4px rgba(12,140,106,.1);
}

.tab {
  background: rgba(255,255,255,.76);
  border-color: rgba(148,163,184,.36);
}

.tab.active {
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255,255,255,.08), transparent),
    #141a22;
  border-color: #141a22;
}

th {
  background: rgba(244,247,250,.88);
  color: #65758a;
  text-transform: uppercase;
  font-size: 12px;
}

td {
  color: #182232;
}

.code-box,
.code {
  background:
    linear-gradient(180deg, rgba(255,255,255,.045), transparent 42%),
    #101722;
  border: 1px solid rgba(255,255,255,.08);
}

.drawer,
dialog {
  background:
    linear-gradient(180deg, rgba(45,99,226,.045), transparent 34%),
    #f7f9fb;
  border-color: rgba(148,163,184,.34);
}

.drawer-head,
#modalForm {
  background: rgba(255,255,255,.74);
}

.empty {
  background: rgba(255,255,255,.62);
  border-color: rgba(148,163,184,.44);
}

.elite-dashboard {
  height: auto;
  min-height: calc(100vh - 124px);
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto auto;
}

.status-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ops-map {
  border-radius: var(--r);
  border: 1px solid rgba(18,24,34,.9);
  background:
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(180deg, #151d27 0%, #0e141d 100%);
  background-size: 34px 34px, 34px 34px, auto;
  box-shadow: 0 24px 64px rgba(12,18,28,.18);
  color: var(--text);
  padding: 18px;
}

.ops-map .stage-head {
  margin-bottom: 16px;
}

.ops-map .stage-head h2 {
  color: #f3f7fb;
}

.ops-map .stage-head p {
  color: #9fb0c5;
}

.ops-flow-grid {
  display: grid;
  grid-template-columns: minmax(260px, .92fr) minmax(320px, 1.12fr) minmax(260px, .92fr);
  gap: 16px;
  align-items: stretch;
}

.ops-column {
  min-width: 0;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--r);
  background: rgba(255,255,255,.055);
  padding: 14px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
}

.ops-core {
  background:
    linear-gradient(180deg, rgba(45,99,226,.12), transparent 58%),
    rgba(255,255,255,.07);
}

.ops-column-head span {
  display: block;
  color: #8ea0b6;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.ops-column-head strong {
  display: block;
  margin-top: 5px;
  color: #f3f7fb;
  font-size: 16px;
}

.ops-list {
  display: grid;
  gap: 10px;
  align-content: start;
}

.ops-item,
.ops-core-card {
  width: 100%;
  min-height: 84px;
  border-radius: var(--r);
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(19,27,38,.88);
  color: #eef4fb;
  padding: 12px;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  text-align: left;
  box-shadow: none;
}

.ops-item:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,.25);
  background: rgba(25,35,49,.96);
}

.ops-item strong,
.ops-core-card strong {
  display: block;
  color: #fff;
  font-size: 15px;
}

.ops-item small,
.ops-core-card p {
  display: block;
  margin-top: 6px;
  color: #aebdce;
  font-size: 12px;
  line-height: 1.5;
}

.ops-item .mini,
.ops-core-card .mini {
  grid-column: 2;
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.ops-dot {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 99px;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(12,140,106,.12);
}

.ops-item.is-down .ops-dot {
  background: var(--red);
  box-shadow: 0 0 0 5px rgba(207,51,64,.12);
}

.ops-group .ops-dot {
  background: var(--blue);
  box-shadow: 0 0 0 5px rgba(45,99,226,.12);
}

.ops-user .ops-dot {
  background: var(--cyan);
  box-shadow: 0 0 0 5px rgba(20,149,170,.12);
}

.ops-core-card {
  grid-template-columns: 1fr;
  background:
    linear-gradient(180deg, rgba(255,255,255,.95), rgba(236,242,250,.9));
  color: #101722;
}

.ops-core-card strong {
  color: #101722;
}

.ops-core-card p {
  color: #65758a;
}

.ops-core-card .mini {
  grid-column: 1;
}

.dark-empty {
  color: #aebdce;
  background: rgba(255,255,255,.055);
  border-color: rgba(255,255,255,.14);
}

.bottom-grid.issue-only {
  grid-column: 1;
  grid-template-columns: minmax(0, 1fr);
}

.issue-only .bottom-panel {
  min-height: 150px;
}

.event-list {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.elite-dashboard .instrument,
.elite-dashboard .bottom-panel,
.stable-events .event {
  animation: none;
}

.server-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 14px;
}

.server-summary-card {
  min-height: 196px;
  width: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
  padding: 16px;
  border: 1px solid #dfe6ef;
  border-radius: 8px;
  background: #fff;
  color: #172033;
  text-align: left;
  box-shadow: none;
}

.server-summary-card:hover {
  transform: none;
  background: #f9fbfd;
  border-color: #cdd8e5;
}

.server-summary-card.is-down {
  border-color: #f0c7cc;
  background: #fff8f8;
}

.server-summary-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.server-summary-head strong {
  display: block;
  color: #172033;
  font-size: 17px;
  line-height: 1.2;
}

.server-summary-head small,
.server-summary-foot span {
  display: block;
  margin-top: 5px;
  color: #68758a;
  font-size: 12px;
  line-height: 1.4;
}

.server-summary-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.server-summary-stats span {
  min-width: 0;
  border: 1px solid #dfe6ef;
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
}

.server-summary-stats b {
  display: block;
  color: #172033;
  font-size: 16px;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.server-summary-stats small {
  display: block;
  margin-top: 5px;
  color: #68758a;
  font-size: 11px;
}

.server-summary-foot {
  min-height: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.server-summary-foot > span:not(.chip) {
  flex: 1 1 100%;
  margin-top: 2px;
}

.issue-panel {
  min-height: 142px;
}

@media (max-width: 1280px) {
  .elite-dashboard,
  .waterfall-loader,
  .servers-grid,
  .line-grid,
  .users-grid {
    height: auto;
    min-height: 0;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .bottom-grid,
  .ops-flow-grid,
  .status-strip,
  .waterfall-strip,
  .waterfall-columns,
  .server-card-grid,
  .load-error-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .waterfall-col { padding-top: 0 !important; }
  .users-grid { grid-template-columns: 1fr; }
  .group-canvas { height: auto; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto;
    justify-items: start;
    align-items: center;
    gap: 12px;
  }
  .sidebar nav {
    grid-template-columns: repeat(7, 44px);
    padding-top: 0;
    overflow-x: auto;
    max-width: 100%;
  }
  .sidebar nav button { width: 44px; height: 44px; min-height: 44px; }
  .sidebar small { display: none; }
  .main { height: auto; padding: 20px; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .status-strip,
  .waterfall-strip,
  .waterfall-columns,
  .mini-waterfall,
  .load-error-panel,
  .server-card-grid,
  .ops-flow-grid,
  .bottom-grid,
  .grid.cols-4,
  .grid.cols-3,
  .grid.cols-2,
  .form-grid,
  .settings-form,
  .stat-triplet,
  .detail-metrics,
  .result-summary,
  .capability-summary,
  .version-compare {
    grid-template-columns: 1fr;
  }
  .waterfall-loader { grid-template-rows: auto auto auto; }
  .waterfall-columns { gap: 12px; }
  .waterfall-card,
  .waterfall-card.short { height: 160px; }
  .waterfall-card.medium,
  .waterfall-card.tall { height: 190px; }
  .waterfall-card.tiny { height: 120px; }
  .version-arrow { display: none; }
  .drawer { width: 100vw; }
  .ops-map { min-height: 520px; }
  .blade,
  .line-row,
  .sub-item {
    grid-template-columns: 1fr;
    padding: 14px;
  }
  .status-dot { justify-self: start; }
  .url-cell, .sub-link { max-width: 240px; }
}

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

/* Flow8: quiet operations console */
body {
  background: #f4f6f9;
}

button {
  box-shadow: none;
}

button:hover {
  transform: none;
  box-shadow: none;
}

button.primary {
  background: #2457d6;
  border-color: #2457d6;
  box-shadow: none;
}

button.dark {
  background: #172033;
  border-color: #172033;
}

.app {
  grid-template-columns: 224px minmax(0, 1fr);
}

.sidebar {
  align-items: start;
  justify-items: stretch;
  padding: 22px 16px;
  color: #172033;
  background: #fff;
  border-right: 1px solid #e3e8ef;
  box-shadow: none;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 0 8px 18px;
  border-bottom: 1px solid #edf1f6;
}

.logo span,
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #172033;
  box-shadow: none;
}

.logo strong {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  white-space: normal;
  color: #172033;
  font-size: 16px;
}

.sidebar nav {
  gap: 4px;
  padding-top: 18px;
}

.sidebar nav button {
  width: 100%;
  height: 42px;
  min-height: 42px;
  justify-content: flex-start;
  display: flex;
  gap: 10px;
  padding: 0 10px;
  color: #647084;
  background: transparent;
  border-color: transparent;
  font-size: 14px;
  font-weight: 800;
}

.sidebar nav button:before {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: inline-grid;
  place-items: center;
  color: #7b8797;
  background: #f2f5f9;
  font-size: 12px;
  flex: 0 0 auto;
}

.sidebar nav button:after {
  display: none;
}

.sidebar nav button:hover,
.sidebar nav button.active {
  color: #172033;
  background: #f1f5fb;
  border-color: #e8edf4;
}

.sidebar nav button.active:before {
  color: #fff;
  background: #2457d6;
  text-shadow: none;
}

.sidebar small {
  writing-mode: horizontal-tb;
  padding: 14px 8px 0;
  color: #9aa5b5;
}

.sidebar-logout {
  width: 100%;
  min-height: 38px;
  justify-content: flex-start;
  padding: 0 10px;
  color: #647084;
  background: #fff;
  border-color: #e3e8ef;
  font-size: 13px;
  box-shadow: none;
}

.sidebar-logout:hover {
  color: #172033;
  background: #f8fafc;
  border-color: #cfd8e5;
}

.main {
  height: 100vh;
  padding: 24px 30px 34px;
  background: #f4f6f9;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  margin: -24px -30px 22px;
  padding: 20px 30px 16px;
  min-height: 78px;
  background: rgba(244,246,249,.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid #e2e8f0;
}

.topbar h2 {
  color: #172033;
  font-size: 28px;
}

.topbar p {
  color: #6b7686;
  font-size: 13px;
}

.panel,
.metric,
.side-panel,
.line-deck,
.user-column,
.group-map,
.sub-panel,
.instrument,
.bottom-panel {
  background: #fff;
  border-color: #dfe6ef;
  box-shadow: 0 8px 22px rgba(15,23,42,.045);
}

.instrument:before,
.metric:before,
.panel:before {
  display: none;
}

.status-strip {
  gap: 12px;
}

.instrument {
  min-height: 104px;
  padding: 16px;
  animation: none;
}

.instrument.dark {
  color: #172033;
  background: #fff;
  border-color: #cfd9e6;
  box-shadow: inset 4px 0 0 #2457d6, 0 8px 22px rgba(15,23,42,.045);
}

.instrument span,
.metric span {
  color: #68758a;
  text-transform: none;
  font-size: 12px;
}

.instrument.dark span,
.instrument.dark small {
  color: #68758a;
}

.instrument strong,
.metric strong,
.instrument.dark strong {
  color: #111827;
  font-size: 30px;
}

.chip {
  border-color: #dbe4ef;
  background: #f1f5f9;
  color: #526071;
}

.chip.dark {
  color: #334155;
  background: #edf2f7;
  border-color: #dbe4ef;
}

.elite-dashboard,
.servers-grid,
.line-grid,
.users-grid {
  height: auto;
  min-height: calc(100vh - 128px);
}

.ops-map,
.rack-room {
  color: #172033;
  background: #fff;
  border: 1px solid #dfe6ef;
  box-shadow: 0 8px 22px rgba(15,23,42,.045);
  padding: 18px;
}

.ops-map .stage-head h2,
.rack-room .stage-head h2 {
  color: #172033;
}

.ops-map .stage-head p,
.rack-room .stage-head p {
  color: #68758a;
}

.ops-flow-grid {
  grid-template-columns: minmax(260px,.95fr) minmax(320px,1.1fr) minmax(260px,.95fr);
}

.ops-column {
  background: #f8fafc;
  border-color: #e1e8f0;
}

.ops-core {
  background: #f6f8fc;
}

.ops-column-head span {
  color: #7a8798;
}

.ops-column-head strong,
.ops-item strong,
.ops-core-card strong {
  color: #172033;
}

.ops-item,
.ops-core-card {
  background: #fff;
  color: #172033;
  border-color: #dfe6ef;
  box-shadow: none;
}

.ops-item:hover {
  transform: none;
  background: #f9fbfd;
  border-color: #cdd8e5;
}

.ops-item small,
.ops-core-card p {
  color: #68758a;
}

.ops-core-card {
  background: #f2f6ff;
  border-color: #dbe6ff;
}

.rack-list {
  gap: 10px;
}

.blade {
  color: #172033;
  background: #fff;
  border-color: #dfe6ef;
  grid-template-columns: minmax(210px,.8fr) minmax(220px,1fr) minmax(250px,.82fr);
  box-shadow: none;
}

.blade:hover {
  transform: none;
  background: #f9fbfd;
  border-color: #cdd8e5;
}

.blade-title strong {
  color: #172033;
}

.blade-title small,
.meter-label,
.version-cell span {
  color: #68758a;
}

.meter-label strong {
  color: #172033;
}

.meter {
  background: #eef2f7;
}

.meter i {
  background: #2457d6;
}

.version-cell,
.version-tile,
.side-version-tile,
.ops-summary div,
.plain-note {
  background: #fff;
  border-color: #dfe6ef;
}

.version-cell b,
.version-cell strong,
.version-tile b,
.version-tile strong,
.side-version-tile strong {
  color: #172033;
}

.blade-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.blade-actions button {
  min-width: 0;
  padding: 0 8px;
}

.line-table,
.group-canvas {
  background: #fff;
  border-color: #dfe6ef;
}

.line-row,
.user-card,
.lane,
.sub-item,
.subscription-row,
.stat-triplet div,
.detail-card,
.confirm-card,
.result-card,
.line-status-item,
.result-item,
.version-box {
  background: #fff;
  border-color: #dfe6ef;
  box-shadow: none;
}

.line-row:hover,
.line-row.selected,
.user-card:hover,
.lane:hover,
.sub-item:hover,
.subscription-row:hover {
  transform: none;
  background: #f9fbfd;
  box-shadow: inset 3px 0 0 #2457d6;
}

.bottom-grid.issue-only {
  grid-template-columns: minmax(0, 1fr);
}

.event {
  background: #fff;
  border-color: #dfe6ef;
}

.drawer,
dialog {
  background: #fff;
  border-color: #dfe6ef;
}

.drawer-head,
#modalForm {
  background: #fff;
}

@media (max-width: 1280px) {
  .app {
    grid-template-columns: 196px minmax(0, 1fr);
  }

  .blade {
    grid-template-columns: 1fr;
  }

  .blade-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .sidebar nav {
    grid-template-columns: repeat(7, minmax(88px, 1fr));
    overflow-x: auto;
  }

  .main {
    height: auto;
    padding: 18px;
  }

  .topbar {
    margin: -18px -18px 18px;
    padding: 16px 18px;
  }

  .page-actions {
    width: 100%;
    justify-content: stretch;
    margin-left: 0;
  }

  .page-actions button {
    flex: 1 1 auto;
  }

}

/* API metrics: compact operational stats */
.node-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 4px;
}

.node-stat-grid span,
.user-stat-line span {
  min-width: 0;
  border: 1px solid #dfe6ef;
  border-radius: var(--r);
  background: #f8fafc;
  padding: 9px;
}

.node-stat-grid b {
  display: block;
  color: #172033;
  font-size: 14px;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.node-stat-grid small {
  display: block;
  margin-top: 5px;
  color: #68758a;
  font-size: 11px;
}

.user-stat-line {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
  color: #526071;
  font-size: 12px;
  font-weight: 800;
}

.user-stat-line span {
  padding: 7px 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-triplet.stat-quad,
.line-stat-triplet {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.line-stat-triplet {
  margin-top: 14px;
}

@media (max-width: 900px) {
  .node-stat-grid,
  .user-stat-line,
  .stat-triplet.stat-quad,
  .line-stat-triplet {
    grid-template-columns: 1fr;
  }
}

.subscription-console {
  position: relative;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid rgba(20,149,170,.42);
  border-radius: 8px;
  padding: 16px;
  color: #eaf4ff;
  background:
    radial-gradient(circle at 94% 10%, rgba(20,149,170,.2), transparent 25%),
    linear-gradient(90deg, rgba(15,149,170,.12) 1px, transparent 1px),
    linear-gradient(0deg, rgba(47,109,246,.08) 1px, transparent 1px),
    linear-gradient(180deg, #09111d 0%, #0d1321 52%, #070b13 100%);
  background-size: auto, 32px 32px, 32px 32px, auto;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.03), 0 20px 42px rgba(5,10,18,.16);
}

.subscription-console:before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 0%, rgba(255,255,255,.08) 42%, transparent 62%);
  transform: translateX(-120%);
  animation: exportScan 5.6s ease-in-out infinite;
}

.subscription-console:after {
  content: "";
  position: absolute;
  right: -1px;
  top: 18%;
  width: 2px;
  height: 70px;
  border-radius: 999px;
  background: linear-gradient(180deg, transparent, #00d5d4, transparent);
  opacity: .9;
  animation: exportPulse 2.8s ease-in-out infinite;
}

.subscription-console-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.subscription-console-head strong {
  color: #f6fbff;
  font-size: 15px;
}

.subscription-console-head span {
  color: #8fa8c3;
  font-size: 12px;
}

.subscription-client-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

button.subscription-client {
  position: relative;
  isolation: isolate;
  min-height: 62px;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 0 20px;
  border-color: rgba(148,163,184,.15);
  border-radius: 8px;
  color: #dbe7fb;
  background:
    linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.015)),
    #111827;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
  transform: none;
}

button.subscription-client:before {
  width: 21px;
  height: 21px;
  display: inline-grid;
  place-items: center;
  color: #dbe7fb;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}

button.subscription-client[data-icon="bolt"]:before { content: "\26A1"; }
button.subscription-client[data-icon="tool"]:before { content: "\2692"; }
button.subscription-client[data-icon="signal"]:before { content: "\25CE"; }
button.subscription-client[data-icon="qr"]:before { content: "\25A6"; }
button.subscription-client[data-icon="eye"]:before { content: "\25C9"; }
button.subscription-client[data-icon="target"]:before { content: "\25CE"; }
button.subscription-client[data-icon="plus"]:before { content: "+"; }
button.subscription-client[data-icon="cube"]:before { content: "\25C7"; }
button.subscription-client[data-icon="star"]:before { content: "\2606"; }

button.subscription-client:after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background:
    radial-gradient(circle at 12% 0%, rgba(0,213,212,.18), transparent 32%),
    linear-gradient(90deg, rgba(45,99,226,.16), transparent 62%);
  transition: opacity .18s ease;
}

button.subscription-client:hover {
  transform: translateY(-2px);
  border-color: rgba(0,213,212,.5);
  background:
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02)),
    #101a2b;
  box-shadow: 0 0 0 1px rgba(0,213,212,.12), 0 14px 34px rgba(0,0,0,.25);
}

button.subscription-client:hover:after,
button.subscription-client.copied:after {
  opacity: 1;
}

button.subscription-client:active {
  transform: translateY(0) scale(.99);
}

button.subscription-client.copied {
  border-color: rgba(12,140,106,.8);
  animation: copiedPop .46s ease both;
}

.client-name {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-align: left;
  font-size: 15px;
  font-weight: 850;
}

.client-action {
  color: #00c7c7;
  font-size: 13px;
  font-weight: 900;
}

.modal-console {
  margin-top: 0;
}

.export-format-row {
  min-height: 68px;
}

@keyframes exportScan {
  0%, 36% { transform: translateX(-120%); opacity: 0; }
  48% { opacity: 1; }
  68%, 100% { transform: translateX(120%); opacity: 0; }
}

@keyframes exportPulse {
  0%, 100% { opacity: .32; transform: translateY(-8px); }
  50% { opacity: .95; transform: translateY(18px); }
}

@keyframes copiedPop {
  0% { box-shadow: 0 0 0 0 rgba(12,140,106,.5); }
  100% { box-shadow: 0 0 0 9px rgba(12,140,106,0); }
}

@media (max-width: 820px) {
  .subscription-client-grid {
    grid-template-columns: 1fr;
  }

  .subscription-console-head {
    display: grid;
    gap: 4px;
  }

  .user-security-strip,
  .security-metrics,
  .security-panel.split,
  .group-overview,
  .group-overview-stats,
  .group-card-stats,
  .group-resource-grid,
  .format-toggle-grid {
    grid-template-columns: 1fr;
  }

  .security-warning,
  .access-log-item,
  .mini-row,
  .group-card-head,
  .group-card-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .access-log-item > div:last-child {
    justify-items: start;
  }

  .group-head-actions {
    justify-content: flex-start;
  }

  .group-resource-item {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .group-resource-item .chip {
    justify-self: start;
  }

  .group-resource-item .micro-danger {
    grid-column: 2 / -1;
    justify-self: start;
  }
}

.users-grid {
  grid-template-columns: 360px minmax(0, 1fr);
}

.user-status-panel {
  min-height: 0;
  overflow: auto;
  padding: 18px;
  border: 1px solid #dfe6ef;
  border-radius: var(--r);
  background: #fff;
  animation: softEnter .45s ease both;
}

.user-status-head {
  align-items: flex-start;
}

.user-export-chip {
  position: absolute;
  right: 12px;
  top: 12px;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #c9d6e7;
  border-radius: 8px;
  padding: 0 10px;
  color: #2457d6;
  background: #fff;
  font-size: 12px;
  font-weight: 900;
}

.user-export-chip:hover {
  color: #fff;
  background: #2457d6;
  border-color: #2457d6;
}

.user-status-hero {
  min-height: 148px;
  margin-top: 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border: 1px solid rgba(15,23,42,.9);
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(135deg, #121a27 0%, #0b1018 58%, #06121a 100%);
  background-size: 32px 32px, 32px 32px, auto;
}

.user-status-hero span {
  color: #92a7bf;
  font-size: 12px;
  font-weight: 800;
}

.user-status-hero strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  line-height: 1;
}

.user-status-hero p {
  margin: 12px 0 0;
  color: #b8c6d7;
  font-size: 13px;
}

.user-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.user-status-card {
  min-height: 112px;
  border: 1px solid #dfe6ef;
  border-radius: 8px;
  background: #f9fbfd;
  padding: 13px;
  overflow: hidden;
}

.user-status-card span {
  color: #65758c;
  font-size: 12px;
  font-weight: 800;
}

.user-status-card strong {
  display: block;
  margin-top: 9px;
  color: #172033;
  font-size: 22px;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.user-status-card p {
  margin: 9px 0 0;
  color: #6b7686;
  font-size: 12px;
  line-height: 1.45;
}

.user-sync-panel,
.user-lines-panel {
  margin-top: 16px;
  border: 1px solid #dfe6ef;
  border-radius: 8px;
  background: #fff;
  padding: 15px;
}

.sync-cap-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.sync-cap-item {
  min-height: 76px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid #e1e8f0;
  border-radius: 8px;
  background: #f9fbfd;
  padding: 12px;
}

.sync-cap-item strong {
  display: block;
  color: #172033;
  font-size: 14px;
}

.sync-cap-item p {
  margin: 6px 0 0;
  color: #65758c;
  font-size: 12px;
  line-height: 1.4;
}

.subscription-export .modal-console {
  margin-bottom: 14px;
}

.subscription-export > .muted {
  margin: 0 0 12px;
}

.subscription-qr {
  display: grid;
  gap: 14px;
}

.subscription-qr-card {
  width: min(100%, 360px);
  aspect-ratio: 1;
  margin: 0 auto;
  display: grid;
  place-items: center;
  padding: 16px;
  border: 1px solid #dfe6ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(15,23,42,.08);
}

.subscription-qr-card svg {
  width: 100%;
  height: 100%;
  display: block;
}

.subscription-qr-meta {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
}

.subscription-qr-meta strong {
  color: var(--ink);
  font-size: 16px;
}

.subscription-qr-meta code {
  width: 100%;
  max-width: 560px;
  display: block;
  overflow-wrap: anywhere;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #dfe6ef;
  background: #f8fafc;
  color: #354256;
  font-size: 12px;
  line-height: 1.5;
}

.health-reasons {
  margin: 9px 0 0;
  color: #6b7686;
  font-size: 12px;
  line-height: 1.45;
}

.batch-toolbar,
.subscription-security,
.remote-log-form {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.batch-toolbar {
  padding: 10px;
  border: 1px solid #dfe6ef;
  border-radius: 8px;
  background: #f8fafc;
}

.user-security-strip {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.user-security-strip div,
.security-summary-card {
  border: 1px solid #dfe6ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15,23,42,.045);
}

.user-security-strip div {
  min-height: 70px;
  padding: 12px;
}

.user-security-strip span,
.security-summary-card span,
.form-section-label {
  display: block;
  color: #65758c;
  font-size: 12px;
  font-weight: 850;
}

.user-security-strip strong {
  display: block;
  margin-top: 8px;
  color: #172033;
  font-size: 22px;
  line-height: 1;
}

.security-summary-card {
  margin: 0 0 12px;
  min-height: 96px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
}

.security-summary-card.is-locked {
  background: #fff8f8;
  border-color: #f1c7c7;
}

.security-summary-card strong {
  display: block;
  margin-top: 7px;
  color: #172033;
  font-size: 24px;
  line-height: 1;
}

.security-summary-card p {
  margin: 9px 0 0;
  color: #68758a;
  font-size: 12px;
  line-height: 1.45;
}

.security-center {
  display: grid;
  gap: 14px;
}

.security-hero {
  min-height: 132px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border: 1px solid #d8e2ef;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(36,87,214,.08), transparent 62%),
    #fff;
}

.security-hero span {
  color: #2457d6;
  font-size: 12px;
  font-weight: 900;
}

.security-hero strong {
  display: block;
  margin-top: 8px;
  color: #172033;
  font-size: 28px;
  line-height: 1.05;
}

.security-hero p {
  margin: 10px 0 0;
  color: #65758c;
  font-size: 13px;
  line-height: 1.5;
}

.security-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.security-panel {
  border: 1px solid #dfe6ef;
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.security-panel.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.security-panel h3 {
  margin: 0;
  color: #172033;
  font-size: 16px;
}

.security-warning-list,
.access-log-list {
  display: grid;
  gap: 9px;
}

.security-warning,
.access-log-item,
.mini-row {
  min-width: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f9fbfd;
  padding: 10px;
}

.security-warning span,
.mini-row span,
.access-log-item p,
.access-log-item small {
  color: #65758c;
  font-size: 12px;
  line-height: 1.45;
}

.access-log-item {
  align-items: flex-start;
}

.access-log-item.blocked {
  background: #fffaf0;
  border-color: #f1d6a8;
}

.access-log-item strong,
.mini-row strong {
  display: block;
  color: #172033;
  font-size: 13px;
}

.access-log-item > div:first-child {
  min-width: 0;
}

.access-log-item > div:last-child {
  display: grid;
  justify-items: end;
  gap: 6px;
  flex: 0 0 auto;
}

.format-toggle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 10px;
}

.format-toggle {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #dfe6ef;
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
  color: #172033;
}

.format-toggle.active,
.format-toggle:has(input:checked) {
  border-color: rgba(36,87,214,.42);
  background: #f3f7ff;
  box-shadow: inset 3px 0 0 #2457d6;
}

.format-toggle input {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.format-toggle strong {
  display: block;
  font-size: 13px;
}

.format-toggle small {
  display: block;
  margin-top: 4px;
  color: #65758c;
  font-size: 12px;
}

.form-section-label {
  margin-bottom: 2px;
}

.subscription-row.is-disabled,
button.subscription-client.is-disabled {
  opacity: .58;
  filter: grayscale(.25);
}

.group-workbench {
  display: grid;
  gap: 16px;
}

.group-overview {
  min-height: 128px;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(420px, .95fr) auto;
  align-items: center;
  gap: 16px;
  border: 1px solid #dfe6ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15,23,42,.045);
  padding: 18px;
}

.group-overview-copy span,
.group-kicker,
.group-card-stats span,
.group-resource-head span {
  color: #65758c;
  font-size: 12px;
  font-weight: 850;
}

.group-overview-copy > span,
.group-kicker {
  color: #2457d6;
}

.group-overview-copy strong {
  display: block;
  margin-top: 7px;
  color: #172033;
  font-size: 28px;
  line-height: 1;
}

.group-overview-copy p {
  margin: 10px 0 0;
  color: #68758a;
  font-size: 13px;
}

.group-overview-stats,
.group-card-stats {
  display: grid;
  gap: 10px;
}

.group-overview-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.group-overview-stats div,
.group-card-stats div {
  min-width: 0;
  border: 1px solid #e1e8f0;
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}

.group-overview-stats strong,
.group-card-stats strong {
  display: block;
  margin-top: 8px;
  color: #172033;
  font-size: 22px;
  line-height: 1;
  overflow-wrap: anywhere;
}

.group-card-stats small {
  display: block;
  margin-top: 7px;
  color: #68758a;
  font-size: 12px;
}

.group-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(520px, 100%), 1fr));
  gap: 14px;
}

.group-workbench-card {
  min-width: 0;
  display: grid;
  gap: 14px;
  border: 1px solid #dfe6ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15,23,42,.045);
  padding: 15px 16px;
  transition: transform .22s var(--motion-soft), border-color .22s ease, box-shadow .22s ease;
}

.group-workbench-card:hover {
  border-color: rgba(36,87,214,.28);
  box-shadow: 0 18px 38px rgba(15,23,42,.09);
}

.group-workbench-card.is-disabled {
  background: #fbfcfe;
}

.group-workbench-card.is-expanded {
  grid-column: 1 / -1;
  border-color: rgba(36,87,214,.24);
}

.group-card-head,
.group-resource-head,
.group-card-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.group-title-block {
  min-width: 0;
}

.group-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.group-kicker i {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: #2457d6;
  box-shadow: 0 0 0 4px rgba(36,87,214,.1);
}

.group-title-block h3 {
  margin: 8px 0 0;
  color: #172033;
  font-size: 22px;
  line-height: 1.08;
}

.group-title-block p {
  margin: 9px 0 0;
  color: #68758a;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.group-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.group-summary-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  align-items: stretch;
  gap: 12px;
}

.group-card-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.group-expand-button {
  min-width: 0;
  min-height: 60px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #2457d6;
  background: #f3f7ff;
  border-color: #d8e5ff;
  font-weight: 850;
}

.group-workbench-card .group-card-stats div {
  min-height: 60px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "label value"
    "hint hint";
  align-items: baseline;
  gap: 4px 9px;
  background: #fbfcfe;
  padding: 9px 11px;
}

.group-workbench-card .group-card-stats span {
  grid-area: label;
  white-space: nowrap;
}

.group-workbench-card .group-card-stats strong {
  grid-area: value;
  justify-self: end;
  margin-top: 0;
  font-size: 19px;
}

.group-workbench-card .group-card-stats small {
  grid-area: hint;
  margin-top: 0;
}

.group-expand-button:hover {
  color: #fff;
  background: #2457d6;
  border-color: #2457d6;
}

.group-expand-button i {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 99px;
  background: rgba(36,87,214,.11);
  font-style: normal;
  font-size: 12px;
  line-height: 1;
}

.group-expand-button span {
  white-space: nowrap;
}

.group-expand-button:hover i {
  background: rgba(255,255,255,.18);
}

.group-detail-panel {
  display: grid;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid #e5ebf2;
  animation: drawerDetailIn .24s ease both;
}

.group-collapsed-note {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #e8eef6;
  border-radius: 8px;
  background: #fbfdff;
  padding: 10px 12px;
}

.group-collapsed-note span,
.group-collapsed-note strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-collapsed-note span {
  color: #68758a;
  font-size: 12px;
}

.group-collapsed-note strong {
  color: #172033;
  font-size: 13px;
}

.group-resource-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding-top: 4px;
}

.group-resource-panel {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.group-resource-head {
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5ebf2;
}

.group-resource-head strong {
  display: block;
  color: #172033;
  font-size: 15px;
}

.group-resource-head span {
  display: block;
  margin-top: 4px;
}

.group-resource-head button,
.micro-danger,
.subtle-danger {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: 12px;
}

.group-resource-list {
  display: grid;
  gap: 8px;
}

.group-resource-item {
  min-width: 0;
  min-height: 62px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  border: 1px solid #e5ebf2;
  border-radius: 8px;
  background: #f9fbfd;
  padding: 10px;
}

.group-resource-icon {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  color: #2457d6;
  background: #eef4ff;
  font-size: 12px;
  font-weight: 900;
}

.group-resource-icon.user {
  color: #087d74;
  background: #e9fbf8;
}

.group-resource-item strong,
.group-resource-item small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-resource-item strong {
  color: #172033;
  font-size: 14px;
}

.group-resource-item small,
.group-card-footer span {
  margin-top: 5px;
  color: #68758a;
  font-size: 12px;
}

.micro-danger,
.subtle-danger {
  color: #dc2626;
  background: #fff;
  border-color: #fecaca;
}

.micro-danger:hover,
.subtle-danger:hover {
  color: #fff;
  background: #dc2626;
  border-color: #dc2626;
}

.group-empty-item {
  min-height: 62px;
  display: grid;
  place-items: center;
  border: 1px dashed #d5dee9;
  border-radius: 8px;
  color: #8a97a8;
  background: #fbfdff;
  font-size: 13px;
  font-weight: 850;
}

.group-card-footer {
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid #e5ebf2;
}

@media (max-width: 820px) {
  .group-overview,
  .group-overview-stats,
  .group-card-stats,
  .group-summary-row,
  .group-resource-grid {
    grid-template-columns: 1fr;
  }

  .group-expand-button {
    min-width: 0;
    min-height: 44px;
    width: 100%;
  }

  .group-collapsed-note {
    align-items: flex-start;
    flex-direction: column;
  }

  .group-card-head,
  .group-card-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .group-head-actions {
    justify-content: flex-start;
  }

  .group-resource-item {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .group-resource-item .chip {
    justify-self: start;
  }

  .group-resource-item .micro-danger {
    grid-column: 2 / -1;
    justify-self: start;
  }
}

.batch-toolbar span,
.subscription-security span {
  color: #65758c;
  font-size: 12px;
  font-weight: 800;
}

.user-card {
  position: relative;
}

.user-select {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 17px;
  height: 17px;
  accent-color: #2457d6;
}

.subscription-security {
  margin: 0 0 14px;
  padding: 10px;
  border: 1px solid #dfe6ef;
  border-radius: 8px;
  background: #f8fafc;
}

.remote-log-panel {
  margin-bottom: 14px;
}

.remote-log-form label {
  display: grid;
  gap: 6px;
  color: #65758c;
  font-size: 12px;
  font-weight: 800;
}

.remote-log-form select,
.remote-log-form input {
  min-width: 150px;
}

.remote-log-output {
  margin-top: 12px;
  max-height: 340px;
  overflow: auto;
  white-space: pre-wrap;
}

.rack-room,
.side-panel,
.line-deck,
.user-column,
.group-map,
.sub-panel,
.user-status-panel {
  animation: none;
}

.line-grid {
  grid-template-columns: minmax(0, 1fr);
}

.line-grid.line-full {
  height: auto;
  min-height: 0;
}

.line-deck {
  overflow: auto;
}

.line-toolbar {
  align-items: flex-start;
}

.toolbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.line-row {
  min-height: 88px;
  grid-template-columns: 14px minmax(260px, 1.7fr) minmax(170px, .7fr) minmax(170px, .65fr) minmax(92px, .38fr) 142px;
  gap: 14px;
  padding: 12px 14px;
}

.line-badges {
  min-width: 0;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.line-traffic {
  min-width: 0;
  display: grid;
  gap: 4px;
  color: #172033;
}

.line-traffic strong {
  display: block;
  font-size: 16px;
  line-height: 1.1;
}

.line-traffic span {
  color: #607089;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-row-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.line-row-actions button {
  width: 64px;
  min-width: 64px;
  min-height: 36px;
  padding: 0;
  white-space: nowrap;
}

.line-drawer-detail .panel-head {
  display: none;
}

.line-drawer-detail .action-grid {
  margin-top: 0 !important;
}

.line-edit-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.edit-context {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px;
  border: 1px solid #dfe6ef;
  border-radius: 8px;
  background: #f8fafc;
}

.edit-context > span:not(.chip) {
  color: #65758c;
  font-size: 12px;
  font-weight: 800;
}

.line-template-hint {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #dfe6ef;
  border-radius: 8px;
  background: #f8fafc;
}

.line-template-hint > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.line-template-hint p {
  margin: 0;
  color: #65758c;
  font-size: 12px;
  line-height: 1.55;
}

.line-template-hint.is-empty {
  color: #9a3412;
  background: #fff7ed;
  border-color: #fed7aa;
  font-size: 12px;
}

.line-mode-tabs {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  gap: 6px;
  padding: 4px;
  border: 1px solid #dfe6ef;
  border-radius: 8px;
  background: #f8fafc;
}

.line-mode-tabs label {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border-radius: 6px;
  color: #526071;
  font-size: 13px;
  font-weight: 850;
}

.line-mode-tabs input {
  width: 14px;
  height: 14px;
}

.line-advanced-panel {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #fbfdff;
}

.advanced-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.advanced-grid .checkbox-row {
  min-height: 54px;
  align-self: end;
}

.advanced-json {
  border-top: 1px solid #e5ebf2;
  padding-top: 10px;
}

.advanced-json summary {
  cursor: pointer;
  color: #334155;
  font-size: 13px;
  font-weight: 850;
}

.advanced-json label {
  display: grid;
  gap: 7px;
  margin-top: 10px;
  color: #617089;
  font-size: 12px;
}

.advanced-json textarea {
  min-height: 112px;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.users-grid {
  grid-template-columns: minmax(0, 1fr);
  height: auto;
  min-height: calc(100vh - 128px);
}

.user-column {
  overflow: visible;
}

.user-list {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  align-items: start;
}

.user-card {
  min-height: 224px;
  display: grid;
  align-content: start;
}

.user-card.active {
  border-color: #dfe6ef;
  box-shadow: 0 8px 22px rgba(15,23,42,.045);
}

.user-status-drawer {
  display: grid;
  gap: 14px;
  animation: drawerDetailIn .26s ease both;
}

.user-status-drawer .panel-head {
  display: grid;
  gap: 14px;
}

.user-status-drawer .actions {
  justify-content: flex-start;
}

.user-status-drawer .user-status-hero {
  margin-top: 0;
}

.user-status-drawer .user-status-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.user-status-drawer .sync-cap-grid {
  grid-template-columns: minmax(0, 1fr);
}

.status-note {
  margin: 0 0 12px;
  color: #65758c;
  font-size: 12px;
  line-height: 1.6;
}

@keyframes drawerDetailIn {
  from { opacity: 0; transform: translateX(10px); }
  to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 1280px) {
  .line-grid {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
  }

  .line-row {
    grid-template-columns: 14px minmax(220px, 1.35fr) minmax(150px, .7fr) minmax(150px, .65fr) 88px 142px;
  }

  .user-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .users-grid,
  .user-status-grid,
  .sync-cap-grid {
    grid-template-columns: 1fr;
  }

  .line-toolbar,
  .toolbar-actions {
    align-items: stretch;
    justify-content: stretch;
  }

  .toolbar-actions button {
    flex: 1 1 150px;
  }

  .line-row {
    grid-template-columns: 14px minmax(0, 1fr);
    align-items: start;
  }

  .line-badges,
  .line-traffic,
  .line-state {
    grid-column: 2 / 3;
  }

  .line-row-actions {
    grid-column: 2 / 3;
    grid-row: auto;
    justify-content: flex-start;
    align-self: start;
  }

  .line-edit-form {
    grid-template-columns: 1fr;
  }

  .advanced-grid {
    grid-template-columns: 1fr;
  }

  .user-status-head,
  .user-status-hero {
    display: grid;
  }
}

/* Motion polish manage25 + Anime.js enhancement */
:root {
  --motion-spring: cubic-bezier(.18, .86, .24, 1);
  --motion-soft: cubic-bezier(.22, .72, .28, 1);
}

@keyframes viewLiftIn {
  from { opacity: 0; transform: translateY(18px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes itemCascadeIn {
  from { opacity: 0; transform: translateY(20px) scale(.985); filter: saturate(.88); }
  to { opacity: 1; transform: translateY(0); filter: saturate(1); }
}

@keyframes valueFlash {
  0% { box-shadow: 0 0 0 0 rgba(45, 99, 226, 0); filter: brightness(1); }
  38% { box-shadow: 0 0 0 4px rgba(45, 99, 226, .16); filter: brightness(1.045); }
  100% { box-shadow: 0 0 0 0 rgba(45, 99, 226, 0); filter: brightness(1); }
}

@keyframes statusBreath {
  0%, 100% { box-shadow: 0 0 0 4px rgba(12, 140, 106, .10), 0 0 0 0 rgba(12, 140, 106, 0); }
  50% { box-shadow: 0 0 0 4px rgba(12, 140, 106, .14), 0 0 22px rgba(20, 149, 170, .18); }
}

@keyframes warnBreath {
  0%, 100% { box-shadow: 0 0 0 4px rgba(200, 118, 23, .12), 0 0 0 rgba(200, 118, 23, 0); }
  50% { box-shadow: 0 0 0 4px rgba(200, 118, 23, .16), 0 0 18px rgba(200, 118, 23, .18); }
}

@keyframes modalSheetIn {
  from { opacity: 0; transform: translateY(30px) scale(.965); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes modalSheetOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(14px) scale(.982); }
}

@keyframes backdropFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes backdropFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes drawerContentIn {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes buttonBusySweep {
  from { transform: translateX(-110%); }
  to { transform: translateX(110%); }
}

@keyframes navSweep {
  from { transform: translateX(-120%); opacity: 0; }
  24% { opacity: 1; }
  to { transform: translateX(120%); opacity: 0; }
}

@keyframes pressPop {
  0% { transform: scale(1); }
  42% { transform: scale(.955); }
  100% { transform: scale(1); }
}

.view.motion-enter > * {
  animation: viewLiftIn .52s var(--motion-spring) both;
}

.view.anime-motion.motion-enter > *,
.anime-motion .motion-item {
  animation: none !important;
}

.motion-item {
  animation: itemCascadeIn .58s var(--motion-spring) both;
  animation-delay: var(--motion-delay, 0ms);
  backface-visibility: hidden;
}

.sidebar nav button {
  overflow: hidden;
}

.sidebar nav button.nav-activated:after {
  content: "";
  display: block;
  position: absolute;
  inset: 0;
  left: 0;
  top: 0;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: linear-gradient(105deg, transparent 18%, rgba(255,255,255,.52), transparent 72%);
  box-shadow: none;
  opacity: 0;
  transform: translateX(-120%);
  animation: navSweep .62s ease both;
}

.sidebar nav button.nav-activated {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 16px 34px rgba(36,87,214,.18);
}

button.press-pop {
  animation: pressPop .26s var(--motion-spring) both;
}

.line-row.motion-item,
.user-card.motion-item,
.blade.motion-item,
.server-summary-card.motion-item {
  will-change: transform, opacity;
}

.instrument strong,
.metric strong,
.server-summary-stats b,
.node-stat-grid b,
.line-traffic strong,
.stat-triplet strong,
.mini-result strong,
.meter-label strong,
.user-stat-line span {
  font-variant-numeric: tabular-nums;
}

.value-updated {
  animation: valueFlash .62s ease both;
  border-radius: 6px;
}

.meter i,
.bar i {
  transition: width .48s var(--motion-soft), filter .2s ease;
}

.meter i.meter-updated,
.bar i.meter-updated {
  filter: brightness(1.14) saturate(1.12);
}

.status-dot:not(.off),
.ops-dot {
  animation: statusBreath 2.8s ease-in-out infinite;
}

.status-dot.warn,
.line-state.warn i {
  animation: warnBreath 2.8s ease-in-out infinite;
}

.line-state:not(.off) i {
  animation: statusBreath 2.8s ease-in-out infinite;
}

.server-summary-card,
.blade,
.line-row,
.user-card,
.event,
.ops-item,
.lane,
.sub-item,
.subscription-row,
.result-item,
.capability-item {
  transform: translateZ(0);
  transition: transform .22s var(--motion-soft), box-shadow .22s ease, border-color .22s ease, background .22s ease;
}

.server-summary-card:hover,
.user-card:hover {
  transform: translateY(-4px);
  border-color: rgba(36, 87, 214, .32);
  box-shadow: 0 20px 44px rgba(15, 23, 42, .12);
}

.blade:hover {
  transform: translateY(-4px);
  border-color: rgba(36, 87, 214, .24);
  box-shadow: 0 18px 38px rgba(15,23,42,.12);
}

.line-row:hover,
.line-row.selected {
  transform: translateX(4px);
  box-shadow: inset 3px 0 0 #2457d6, 0 14px 28px rgba(15, 23, 42, .09);
}

.ops-item:hover,
.lane:hover,
.sub-item:hover,
.subscription-row:hover,
.event:hover,
.result-item:hover,
.capability-item:hover {
  transform: translateY(-3px);
  border-color: rgba(36, 87, 214, .28);
  box-shadow: 0 16px 34px rgba(15, 23, 42, .09);
}

.drawer-backdrop {
  opacity: 0;
  transition: opacity .24s ease;
}

.drawer-backdrop.is-visible {
  opacity: 1;
}

.drawer {
  animation: none !important;
  opacity: .94;
  transform: translateX(112%);
  transition: transform .52s var(--motion-spring), opacity .28s ease;
  will-change: transform;
}

.drawer.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.drawer.is-closing {
  opacity: .78;
  transform: translateX(112%);
}

.drawer-body.drawer-content-enter > * {
  animation: drawerContentIn .42s var(--motion-spring) both;
}

dialog[open] {
  animation: modalSheetIn .42s var(--motion-spring) both;
}

dialog[open]::backdrop {
  animation: backdropFadeIn .2s ease both;
}

dialog.is-closing {
  animation: modalSheetOut .16s ease both;
}

dialog.is-closing::backdrop {
  animation: backdropFadeOut .16s ease both;
}

#modalBody > * {
  animation: itemCascadeIn .28s var(--motion-spring) both;
}

button.is-busy {
  position: relative;
  overflow: hidden;
}

button.is-busy:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.32), transparent);
  transform: translateX(-110%);
  animation: buttonBusySweep 1.05s ease-in-out infinite;
}

.toast:not(.hidden) {
  animation: toastSlideIn .24s var(--motion-spring) both;
}

.waterfall-loader {
  animation: viewLiftIn .28s var(--motion-soft) both;
}

@media (prefers-reduced-motion: reduce) {
  .view.motion-enter > *,
  .motion-item,
  .value-updated,
  .status-dot,
  .ops-dot,
  .line-state i,
  .drawer-body.drawer-content-enter > *,
  dialog[open],
  dialog[open]::backdrop,
  dialog.is-closing,
  dialog.is-closing::backdrop,
  #modalBody > *,
  button.is-busy:after,
  .sidebar nav button.nav-activated:after,
  button.press-pop,
  .toast:not(.hidden),
  .waterfall-loader {
    animation: none !important;
  }

  .drawer,
  .drawer-backdrop,
  .meter i,
  .bar i {
    transition: none !important;
  }
}
