:root {
  color-scheme: dark;
  --bg: #030712;
  --bg-2: #071427;
  --panel: rgba(8, 14, 28, 0.82);
  --panel-border: rgba(124, 158, 218, 0.18);
  --text: #edf4ff;
  --muted: #93a7c4;
  --accent: #7ef0d2;
  --accent-2: #6aa8ff;
  --accent-3: #8f7bff;
  --danger: #fb7185;
  --warn: #f59e0b;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Manrope, Inter, ui-sans-serif, system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(103, 168, 255, 0.22), transparent 28%),
    radial-gradient(circle at top right, rgba(99, 242, 213, 0.16), transparent 24%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  overflow-x: hidden;
}
.shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}
.sidebar {
  padding: 28px;
  border-right: 1px solid var(--panel-border);
  background: rgba(4, 8, 20, 0.40);
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.brand { font-size: 28px; font-weight: 800; letter-spacing: -0.04em; }
.muted { color: var(--muted); }
.nav { display: grid; gap: 12px; }
.nav a {
  color: var(--text);
  text-decoration: none;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
}
.content {
  padding: 32px;
  display: grid;
  gap: 22px;
  align-content: start;
}
.auth-view .shell {
  grid-template-columns: 1fr;
}
.auth-view .sidebar {
  display: none;
}
.auth-view .content {
  min-height: 100vh;
  padding: 0;
}
.auth-view .content > * {
  min-height: 100vh;
}
.panel, .card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 22px;
  box-shadow: 0 20px 80px rgba(0,0,0,0.24);
}
.panel { padding: 22px; }
.hero h1, .panel h2 { margin: 0 0 8px; }
.cards { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.grid { display: grid; gap: 16px; }
.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.top-metrics { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.hero {
  padding-top: 2px;
}
.overview-panel {
  display: grid;
  gap: 18px;
}
.overview-metrics-box {
  padding: 6px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(11, 18, 34, 0.96), rgba(7, 12, 24, 0.88));
  border: 1px solid rgba(148, 163, 184, 0.10);
}
.overview-network-card {
  display: grid;
  gap: 14px;
  min-width: 0;
  --pulse-line: #67d7ff;
  --pulse-fill-start: rgba(103, 215, 255, 0.24);
  --pulse-fill-end: rgba(103, 215, 255, 0.02);
}
.overview-network-card[data-state="active"] {
  --pulse-line: #29f59a;
  --pulse-fill-start: rgba(41, 245, 154, 0.30);
  --pulse-fill-end: rgba(41, 245, 154, 0.03);
}
.overview-network-card[data-state="idle"] {
  --pulse-line: #67d7ff;
  --pulse-fill-start: rgba(103, 215, 255, 0.24);
  --pulse-fill-end: rgba(103, 215, 255, 0.02);
}
.overview-network-card[data-state="stale"] {
  --pulse-line: #64748b;
  --pulse-fill-start: rgba(100, 116, 139, 0.16);
  --pulse-fill-end: rgba(100, 116, 139, 0.02);
}
.overview-network-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  flex-wrap: wrap;
}
.overview-network-head h2 {
  margin: 4px 0 0;
  font-size: 18px;
}
.overview-network-shell {
  position: relative;
  min-height: 190px;
  border-radius: 18px;
  overflow: hidden;
  padding: 12px 14px;
  background:
    radial-gradient(circle at 18% 20%, rgba(41, 245, 154, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(11, 19, 36, 0.94), rgba(8, 13, 24, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.14);
}
.overview-network-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(to right, rgba(52, 213, 255, 0.07) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(to bottom, rgba(52, 213, 255, 0.05) 0 1px, transparent 1px 24px);
  opacity: 0.7;
  pointer-events: none;
}
.overview-network-shell::after {
  content: "";
  position: absolute;
  inset: auto 10% -32px 10%;
  height: 46px;
  background: radial-gradient(circle, rgba(41, 245, 154, 0.18), transparent 72%);
  filter: blur(18px);
  pointer-events: none;
}
.overview-network-canvas {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-height: 164px;
}
.overview-network-speed {
  position: absolute;
  right: 16px;
  bottom: 14px;
  z-index: 2;
  display: grid;
  gap: 4px;
  min-width: 168px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(8, 14, 28, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(10px);
}
.overview-network-speed--top {
  top: 14px;
  bottom: auto;
}
.overview-network-speed strong {
  font-size: 18px;
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.snapshot-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card { padding: 20px; }
.card-label { color: var(--muted); font-size: 14px; }
.card-value { font-size: 34px; font-weight: 800; margin-top: 8px; }
.card-note {
  margin: 10px 0 0;
  color: #afc1d9;
  font-size: 13px;
  line-height: 1.45;
}
.metric-card {
  position: relative;
  overflow: hidden;
}
.metric-card::before {
  content: "";
  position: absolute;
  inset: auto -20px -22px auto;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(106, 168, 255, 0.16), transparent 70%);
  pointer-events: none;
}
.metric-card-accent::before {
  background: radial-gradient(circle, rgba(126, 240, 210, 0.16), transparent 70%);
}
.metric-card .card-value,
.snapshot-card .card-value {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.05;
}
.snapshot-card {
  display: grid;
  gap: 2px;
}
.chart-reset-form {
  display: inline-flex;
}
.filters { display: flex; gap: 10px; flex-wrap: wrap; }
.chip {
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
}
.chip.is-active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #04111d;
  border-color: transparent;
}
.chart {
  min-height: 320px;
  border-radius: 18px;
  background: transparent;
  border: 1px solid rgba(148,163,184,0.10);
  overflow: hidden;
}
.chart-empty {
  min-height: 300px;
  display: grid;
  place-items: center;
  color: #94a3b8;
}
.svg-chart { width: 100%; height: 100%; display: block; }
.svg-chart text {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 700;
}
.chart-grid line {
  stroke: rgba(148,163,184,0.26);
  stroke-width: 1;
  shape-rendering: crispEdges;
}
.chart-grid line.minor {
  stroke: rgba(148,163,184,0.10);
}
.chart-grid line.major {
  stroke: rgba(148,163,184,0.24);
}
.chart-grid text, .chart-axis text {
  fill: #cbd5e1;
  font-size: 11px;
  font-weight: 700;
}
.chart-axis-line {
  stroke: rgba(203,213,225,0.55);
  stroke-width: 1;
  shape-rendering: crispEdges;
}
.chart-right-axis text {
  fill: #cbd5e1;
  font-size: 11px;
  font-weight: 700;
}
.chart-line {
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.chart-line.cpu { stroke: #60a5fa; }
.chart-line.memory { stroke: #2dd4bf; }
.chart-line.disk { stroke: #f59e0b; }
.chart-line.traffic { stroke: #7ef0d2; stroke-width: 1.95; }
.chart-point {
  stroke: rgba(3, 7, 18, 0.92);
  stroke-width: 1.85;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 7px rgba(103, 168, 255, 0.34));
}
.form { display: grid; gap: 14px; }
.form.inline { grid-template-columns: 1fr 1.6fr auto; align-items: end; }
.new-client-form {
  gap: 14px;
}
.new-client-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  align-items: end;
}
.new-client-form-actions {
  display: flex;
  justify-content: flex-end;
}
.new-client-form-actions .button {
  min-width: 160px;
}
.grow { min-width: 0; }
label span { display: block; color: var(--muted); font-size: 13px; margin-bottom: 6px; }
input {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  padding: 12px 14px;
  border-radius: 14px;
}
select {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  padding: 12px 14px;
  border-radius: 14px;
  color-scheme: dark;
}
.readable-select {
  background-color: rgba(18, 27, 46, 0.96);
  color: var(--text);
}
.readable-select option,
.readable-select optgroup {
  background: #0f172a;
  color: var(--text);
}
.readable-select option:checked,
.readable-select option:hover,
.readable-select option:focus-visible {
  background: #1d4f8f;
  color: #f8fbff;
}
input::placeholder { color: rgba(159, 176, 199, 0.72); }
input:focus,
select:focus {
  outline: none;
  border-color: rgba(103, 168, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(103, 168, 255, 0.15);
}
input[type="checkbox"] {
  width: auto;
  margin: 0;
  accent-color: var(--accent-2);
  box-shadow: none;
}
.button {
  border: none;
  border-radius: 14px;
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2) 58%, var(--accent-3));
  color: #04111d;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
  box-shadow: 0 6px 16px rgba(67, 170, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.button.secondary { background: rgba(255,255,255,0.08); color: var(--text); }
.button.danger { background: rgba(251, 113, 133, 0.20); color: #ffd1d9; }
.button:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
}
.button:active { transform: translateY(0); }
.alert {
  padding: 12px 14px;
  background: rgba(251, 113, 133, 0.12);
  border: 1px solid rgba(251, 113, 133, 0.35);
  border-radius: 14px;
}
.panel-feedback {
  margin-bottom: 18px;
}
.form-feedback {
  margin: 0 0 14px;
}
.table { display: grid; gap: 10px; }
.row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.6fr 1fr 1fr 1fr;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
}
.row.head { background: transparent; color: var(--muted); font-size: 13px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
}
.pill.ok { background: rgba(94, 234, 212, 0.15); color: var(--accent); }
.pill.warn { background: rgba(245, 158, 11, 0.15); color: var(--warn); }
.pill.danger { background: rgba(251, 113, 133, 0.15); color: var(--danger); }
.service-list, .metrics { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.metrics div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.metrics dt { color: var(--muted); }
.metrics dd { margin: 0; font-weight: 700; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; }
.small { font-size: 12px; }
.tiny { padding: 8px 12px; border-radius: 12px; font-size: 12px; }
.chart-status {
  padding-top: 4px;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.client-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.client-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.client-toolbar-note {
  max-width: 420px;
  line-height: 1.45;
}
.client-list {
  display: grid;
  gap: 14px;
}
.client-item {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
}
.client-item[open] {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(96, 165, 250, 0.24);
}
.client-summary {
  list-style: none;
  padding: 18px 20px;
  cursor: pointer;
}
.client-summary::-webkit-details-marker {
  display: none;
}
.client-summary-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1.2fr) minmax(600px, 2.1fr) repeat(2, minmax(176px, 0.44fr));
  gap: 12px;
  align-items: stretch;
}
.client-summary-card {
  min-height: 88px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.14);
  display: grid;
  gap: 6px;
  align-content: start;
}
.client-summary-card--identity {
  gap: 8px;
}
.client-summary-card--identity strong {
  font-size: 20px;
  letter-spacing: -0.03em;
}
.client-summary-card--identity .muted {
  line-height: 1.45;
}
.client-identity-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}
.client-identity-text {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.client-identity-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  justify-content: flex-end;
}
.client-identity-meta-item {
  display: grid;
  gap: 6px;
  align-content: start;
}
.client-summary-activity-cluster {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) 176px;
  gap: 12px;
  min-width: 0;
}
.client-summary-card--speed,
.client-summary-card--metric {
  min-width: 176px;
  min-height: 88px;
  padding: 12px 14px;
  justify-content: space-between;
}
.client-summary-card--pulse {
  min-width: 0;
  --pulse-line: #67d7ff;
  --pulse-fill-start: rgba(103, 215, 255, 0.24);
  --pulse-fill-end: rgba(103, 215, 255, 0.02);
}
.client-summary-card--pulse[data-state="active"] {
  --pulse-line: #29f59a;
  --pulse-fill-start: rgba(41, 245, 154, 0.30);
  --pulse-fill-end: rgba(41, 245, 154, 0.03);
}
.client-summary-card--pulse[data-state="idle"] {
  --pulse-line: #67d7ff;
  --pulse-fill-start: rgba(103, 215, 255, 0.24);
  --pulse-fill-end: rgba(103, 215, 255, 0.02);
}
.client-summary-card--pulse[data-state="stale"] {
  --pulse-line: #64748b;
  --pulse-fill-start: rgba(100, 116, 139, 0.16);
  --pulse-fill-end: rgba(100, 116, 139, 0.02);
}
.client-pulse-shell {
  position: relative;
  height: 90px;
  border-radius: 12px;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(41, 245, 154, 0.08), transparent 35%),
    linear-gradient(180deg, rgba(8, 14, 26, 0.82), rgba(7, 12, 22, 0.42));
}
.client-pulse-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(to right, rgba(52, 213, 255, 0.08) 0 1px, transparent 1px 18px),
    repeating-linear-gradient(to bottom, rgba(52, 213, 255, 0.05) 0 1px, transparent 1px 16px);
  opacity: 0.38;
  pointer-events: none;
}
.client-pulse-shell::after {
  content: "";
  position: absolute;
  inset: auto 12% -26px 12%;
  height: 32px;
  background: radial-gradient(circle, rgba(41, 245, 154, 0.18), transparent 70%);
  filter: blur(16px);
  pointer-events: none;
}
.client-pulse-canvas {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
}
.client-pulse-presence {
  position: absolute;
  right: 12px;
  top: 10px;
  z-index: 2;
  font-size: 11px;
  line-height: 1.1;
  letter-spacing: 0.02em;
  color: rgba(226, 232, 240, 0.92);
  text-shadow: none;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(96, 165, 250, 0.20);
  background: rgba(7, 12, 22, 0.78);
  pointer-events: none;
}
.client-pulse-svg {
  display: block;
  width: 100%;
  height: 100%;
}
.client-pulse-dot {
  stroke: rgba(8, 14, 26, 0.9);
  stroke-width: 1.8;
}
.summary-value {
  font-size: 18px;
  letter-spacing: -0.03em;
}
.summary-speed-meta {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}
.summary-substatus {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.summary-value--muted {
  font-size: clamp(2.4rem, 2rem + 0.7vw, 3rem);
  line-height: 1.02;
}
.client-summary-card--speed .summary-value,
.client-summary-card--metric .summary-value {
  font-size: clamp(2.4rem, 2rem + 0.7vw, 3rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}
.client-summary-card--speed .summary-value {
  word-break: normal;
  overflow-wrap: normal;
}
.client-summary-card .mini-card-label {
  font-size: 11px;
}
.client-summary-card--speed .summary-speed-meta {
  margin-top: 4px;
  font-size: 10px;
}
.summary-status.ok,
.summary-days.ok {
  color: #7ef0d2;
}
.summary-status.warn,
.summary-days.warn {
  color: #facc15;
}
.summary-status.danger,
.summary-days.danger,
.summary-substatus.danger {
  color: #fb7185;
}
.summary-substatus.warn {
  color: #facc15;
}
.summary-substatus.ok {
  color: #7ef0d2;
}
.client-details {
  padding: 0 18px 18px;
  display: grid;
  gap: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}
.client-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  padding-top: 12px;
}
.mini-card {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.12);
  display: grid;
  gap: 4px;
}
.mini-card-label {
  color: var(--muted);
  font-size: 12px;
}
.mini-card strong {
  font-size: 16px;
  letter-spacing: -0.02em;
}
.client-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.client-subscription-block {
  display: grid;
  gap: 12px;
  padding-top: 4px;
}
.client-subscription-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  padding-top: 0;
}
.client-edit-shell {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(6, 11, 24, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.12);
}
.client-edit-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.1fr) minmax(220px, 1.45fr) 150px 120px auto;
  gap: 10px;
  align-items: end;
}
.compact-field {
  display: grid;
  gap: 6px;
}
.client-edit-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  align-self: end;
}
.client-edit-actions .button {
  min-width: 116px;
}
.compact-create-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.55fr) minmax(280px, 1.9fr) minmax(112px, 0.62fr) minmax(96px, 0.5fr) minmax(84px, 0.42fr) 148px;
  gap: 10px;
  align-items: end;
}
.compact-create-field {
  min-width: 0;
}
.compact-create-field--role,
.compact-create-field--mode {
  justify-self: stretch;
}
.compact-create-field--role select,
.compact-create-field--mode select,
.compact-create-field--name input,
.compact-create-field--notes input {
  width: 100%;
  min-width: 0;
}
.new-client-form-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}
.compact-create-grid--with-action .new-client-form-actions--inline {
  margin-top: 0;
  align-self: end;
}
.compact-create-grid--with-action .new-client-form-actions--inline .button {
  width: 100%;
  min-width: 0;
  padding-inline: 18px;
}
.detail-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}
.detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.12);
}
.client-actions-block {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}
.client-actions-block .inline-form {
  display: block;
}
.client-actions-block .button {
  width: 100%;
}
.client-tech-details {
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.38);
  overflow: hidden;
}
.client-tech-summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.client-tech-summary::-webkit-details-marker {
  display: none;
}
.client-tech-details .client-info-grid {
  padding: 0 14px 14px;
}
.inline-form {
  display: inline-flex;
}
.empty-state {
  padding: 28px;
  border-radius: 16px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed rgba(148, 163, 184, 0.24);
  background: rgba(255,255,255,0.02);
}
.compact {
  min-height: 180px;
}
@media (max-width: 1480px) {
  .client-summary-grid {
    grid-template-columns: minmax(320px, 1.15fr) minmax(500px, 1.9fr) repeat(2, minmax(170px, 0.46fr));
  }
}
@media (max-width: 1180px) {
  .client-summary-grid {
    grid-template-columns: minmax(300px, 1.1fr) minmax(420px, 1.65fr) repeat(2, minmax(160px, 0.46fr));
  }
  .client-summary-activity-cluster {
    grid-template-columns: minmax(320px, 1fr) 160px;
  }
  .client-edit-row,
  .compact-create-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
  .compact-create-grid--with-action .new-client-form-actions--inline {
    grid-column: 1 / -1;
  }
  .client-edit-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
}
@media (max-width: 860px) {
  .client-summary-grid {
    grid-template-columns: 1fr;
  }
  .client-identity-shell {
    grid-template-columns: 1fr;
  }
  .client-identity-meta {
    justify-content: flex-start;
  }
  .overview-network-head {
    align-items: start;
  }
  .overview-network-speed {
    min-width: 150px;
  }
  .client-summary-activity-cluster {
    grid-template-columns: minmax(0, 1fr) 120px;
  }
  .client-actions-block {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .overview-network-shell {
    padding: 10px 10px 72px;
    min-height: 220px;
  }
  .overview-network-canvas {
    min-height: 138px;
  }
  .overview-network-speed {
    left: 10px;
    right: 10px;
    bottom: 10px;
    min-width: 0;
  }
  .overview-network-speed--top {
    top: auto;
    bottom: 10px;
  }
  .client-summary {
    padding: 16px;
  }
  .client-summary-activity-cluster,
  .client-edit-row,
  .compact-create-grid {
    grid-template-columns: 1fr;
  }
  .compact-create-grid--with-action .new-client-form-actions--inline .button {
    width: 100%;
  }
  .client-edit-actions {
    justify-content: stretch;
  }
  .client-edit-actions .button {
    width: 100%;
  }
}
.auth-shell {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 15% 20%, rgba(102, 168, 255, 0.14), transparent 24%),
    radial-gradient(circle at 84% 16%, rgba(126, 240, 210, 0.10), transparent 22%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}
.auth-shell::before,
.auth-shell::after {
  content: "";
  position: absolute;
  inset: auto;
  border-radius: 999px;
  filter: blur(90px);
  pointer-events: none;
  opacity: 0.7;
  z-index: -2;
}
.auth-shell::before {
  width: 520px;
  height: 520px;
  left: -140px;
  top: -120px;
  background: rgba(106, 168, 255, 0.18);
  animation: drift 18s ease-in-out infinite alternate;
}
.auth-shell::after {
  width: 600px;
  height: 600px;
  right: -200px;
  bottom: -220px;
  background: rgba(126, 240, 210, 0.12);
  animation: drift 22s ease-in-out infinite alternate-reverse;
}
.auth-atlas {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  opacity: 0.95;
}
.auth-atlas::before,
.auth-atlas::after {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    linear-gradient(rgba(120, 152, 214, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 152, 214, 0.08) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at center, black 0%, black 42%, transparent 78%);
  opacity: 0.35;
  animation: gridFlow 28s linear infinite;
}
.auth-atlas::after {
  background-size: 96px 96px;
  opacity: 0.18;
  animation-direction: reverse;
}
.auth-node,
.auth-glow {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}
.auth-node {
  width: 6px;
  height: 6px;
  background: #bff9ea;
  box-shadow:
    0 0 14px rgba(126, 240, 210, 0.96),
    0 0 34px rgba(106, 168, 255, 0.58),
    0 0 60px rgba(143, 123, 255, 0.22);
  animation: nodePulse 3.8s ease-in-out infinite;
}
.auth-node::before,
.auth-node::after {
  content: "";
  position: absolute;
  inset: -28px;
  border-radius: inherit;
  border: 1px solid rgba(126, 240, 210, 0.10);
  opacity: 0.5;
}
.auth-node::after {
  inset: -54px;
  border-color: rgba(106, 168, 255, 0.08);
}
.auth-glow {
  width: 200px;
  height: 200px;
  background:
    radial-gradient(circle, rgba(126, 240, 210, 0.28) 0%, rgba(106, 168, 255, 0.10) 34%, transparent 70%);
  filter: blur(22px);
  mix-blend-mode: screen;
  animation: glowDrift 20s ease-in-out infinite alternate;
}
.g1 { left: 8%; top: 18%; }
.g2 { left: 34%; top: 9%; animation-duration: 24s; }
.g3 { right: 16%; top: 22%; animation-duration: 21s; }
.g4 { right: 8%; bottom: 12%; animation-duration: 26s; }
.n1 { left: 10%; top: 22%; animation-delay: 0s; }
.n2 { left: 26%; top: 16%; animation-delay: .4s; }
.n3 { left: 42%; top: 24%; animation-delay: .8s; }
.n4 { left: 60%; top: 18%; animation-delay: 1.2s; }
.n5 { left: 74%; top: 30%; animation-delay: .2s; }
.n6 { left: 18%; top: 58%; animation-delay: 1.4s; }
.n7 { left: 49%; top: 64%; animation-delay: .7s; }
.n8 { left: 82%; top: 72%; animation-delay: 1.1s; }
.auth-outer {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 18px;
  padding: 18px;
  border-radius: 32px;
  background:
    linear-gradient(180deg, rgba(8, 14, 28, 0.78), rgba(8, 14, 28, 0.68)),
    radial-gradient(circle at top left, rgba(126, 240, 210, 0.10), transparent 40%);
  border: 1px solid rgba(124, 158, 218, 0.18);
  box-shadow:
    0 30px 110px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(22px);
}
.auth-box {
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(11, 18, 34, 0.92), rgba(8, 14, 28, 0.88)),
    radial-gradient(circle at top left, rgba(126, 240, 210, 0.08), transparent 40%);
  border: 1px solid rgba(124, 158, 218, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  padding: 28px;
  min-height: 100%;
}
.auth-copy-box {
  display: grid;
  align-content: center;
  gap: 18px;
}
.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(124, 158, 218, 0.18);
  color: #bfd1f1;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}
.auth-copy-box h1 {
  margin: 0;
  font-size: clamp(2.5rem, 5vw, 4.8rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
}
.lead {
  margin: 0;
  max-width: 28ch;
  color: #d1dcef;
  font-size: 1rem;
  line-height: 1.55;
}
.muted {
  color: var(--muted);
}
.auth-form-box {
  display: grid;
  align-content: center;
  gap: 18px;
}
.auth-card-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}
.auth-card h2 {
  margin: 10px 0 0;
  font-size: clamp(1.6rem, 2.7vw, 2.2rem);
  letter-spacing: -0.05em;
}
.auth-badge {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(126, 240, 210, 0.10);
  border: 1px solid rgba(126, 240, 210, 0.20);
  color: #d7fff5;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.auth-form {
  gap: 14px;
}
.auth-form label span {
  color: #c8d6ea;
}
.auth-form input {
  background: rgba(255,255,255,0.04);
  border-color: rgba(124, 158, 218, 0.18);
}
.auth-form input:focus {
  border-color: rgba(126, 240, 210, 0.55);
  box-shadow: 0 0 0 4px rgba(126, 240, 210, 0.12);
}
.auth-button {
  margin-top: 4px;
  padding: 15px 18px;
  font-size: 15px;
  border-radius: 16px;
  background: linear-gradient(135deg, #7ef0d2, #6aa8ff 55%, #8f7bff);
  box-shadow: 0 18px 46px rgba(106, 168, 255, 0.25);
}
.alert {
  margin: 0;
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { border-right: none; border-bottom: 1px solid var(--panel-border); }
  .row { grid-template-columns: 1fr; }
  .form.inline { grid-template-columns: 1fr; }
  .chart { min-height: 300px; }
  .client-summary { grid-template-columns: 1fr; }
  .limits-form { grid-template-columns: 1fr; }
  .auth-shell {
    padding: 18px;
  }
  .auth-outer {
    grid-template-columns: 1fr;
    padding: 14px;
    border-radius: 26px;
  }
  .auth-box {
    padding: 22px;
  }
  .auth-copy-box h1 {
    font-size: clamp(2.2rem, 12vw, 3.6rem);
  }
  .lead {
    max-width: 100%;
  }
  .auth-form-box {
    gap: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .auth-shell::before,
  .auth-shell::after,
  .auth-atlas::before,
  .auth-atlas::after,
  .auth-node,
  .auth-glow {
    animation: none;
  }
  .button {
    transition: none;
  }
}
@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(20px, -18px, 0) scale(1.08); }
}
@keyframes gridFlow {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(80px, 40px, 0) scale(1.04); }
}
@keyframes nodePulse {
  0%, 100% {
    opacity: 0.55;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.25);
  }
}
@keyframes glowDrift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(28px, -18px, 0) scale(1.12); }
}
