:root {
  --bg: #02040a;
  --panel: #0a1120;
  --text: #e8f1ff;
  --subtext: #87a3c8;
  --line: #1d3355;
  --glow: #2da0ff;
}

body.theme-day {
  --bg: #e8eef8;
  --panel: #f4f8ff;
  --text: #10233f;
  --subtext: #4b6b95;
  --line: #acc3e6;
  --glow: #2d78ff;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 85% 12%, rgba(44, 132, 255, 0.24) 0%, rgba(5, 13, 30, 0) 38%),
    radial-gradient(circle at 16% 86%, rgba(39, 184, 255, 0.14) 0%, rgba(2, 8, 18, 0) 36%),
    radial-gradient(circle at 20% 10%, #0a1630 0%, var(--bg) 45%, #010207 100%);
  color: var(--text);
  font-family: "SF Pro Display", "Segoe UI", "PingFang SC", sans-serif;
  overflow: hidden;
}

body.admin-body {
  overflow: auto;
}

body.theme-day {
  background:
    radial-gradient(circle at 82% 16%, rgba(82, 157, 255, 0.26) 0%, rgba(9, 20, 40, 0) 36%),
    radial-gradient(circle at 16% 82%, rgba(66, 132, 230, 0.2) 0%, rgba(8, 18, 33, 0) 36%),
    radial-gradient(circle at 20% 10%, #0d1b34 0%, #081120 55%, #050a15 100%);
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(2, 6, 14, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-gate.hidden {
  display: none;
}

.auth-card {
  width: min(420px, 88vw);
  border: 1px solid rgba(75, 130, 217, 0.45);
  border-radius: 14px;
  padding: 18px 16px;
  background: linear-gradient(180deg, rgba(10, 22, 44, 0.95), rgba(5, 12, 24, 0.95));
  box-shadow: 0 0 28px rgba(36, 115, 222, 0.26), inset 0 0 0 1px rgba(92, 159, 254, 0.14);
}

.auth-card h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 1px;
}

.auth-card p {
  margin: 8px 0 12px;
  color: #9ebbe2;
  font-size: 13px;
}

.auth-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.auth-form input {
  border: 1px solid rgba(83, 139, 226, 0.45);
  background: rgba(5, 12, 24, 0.88);
  color: #e0efff;
  border-radius: 8px;
  padding: 8px 10px;
  outline: none;
}

.auth-form button {
  border: 1px solid rgba(89, 152, 247, 0.55);
  background: rgba(26, 82, 168, 0.72);
  color: #eaf4ff;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
}

.auth-mode-btn {
  margin-top: 8px;
  border: 0;
  background: transparent;
  color: #9fc2ef;
  cursor: pointer;
  font-size: 12px;
  padding: 0;
  text-align: left;
}

.app-modal {
  position: fixed;
  inset: 0;
  z-index: 48;
  background: rgba(2, 7, 16, 0.66);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.modal-card {
  width: min(520px, 94vw);
  border: 1px solid rgba(93, 146, 226, 0.48);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(9, 21, 41, 0.95), rgba(6, 13, 24, 0.95));
  box-shadow: 0 0 26px rgba(43, 121, 227, 0.24), inset 0 0 0 1px rgba(108, 171, 255, 0.1);
  padding: 12px;
}

.modal-title {
  font-size: 14px;
  color: #000000;
  margin-bottom: 8px;
}

.modal-close {
  margin-top: 8px;
  border: 1px solid rgba(104, 146, 212, 0.6);
  border-radius: 7px;
  background: rgba(17, 58, 121, 0.52);
  color: #dcecff;
  padding: 5px 8px;
  font-size: 11px;
  cursor: pointer;
}

.profile-info {
  display: grid;
  gap: 3px;
  color: #000000;
  font-size: 12px;
  margin-bottom: 8px;
}

.change-form {
  display: grid;
  gap: 5px;
}

.change-form input,
.change-form button {
  border-radius: 7px;
  border: 1px solid rgba(85, 145, 232, 0.55);
  font-size: 11px;
  padding: 6px 8px;
}

.change-form input {
  background: rgba(9, 18, 35, 0.9);
  color: #deedff;
}

.change-form button {
  background: rgba(27, 89, 183, 0.75);
  color: #ecf5ff;
  cursor: pointer;
}

.auth-error {
  min-height: 18px;
  margin-top: 8px;
  color: #ff9c9c;
  font-size: 12px;
}

body.emergency-flash::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 55;
  animation: emergencyPulse 0.3s ease-in-out 6;
  background: rgba(255, 28, 28, 0.22);
}

@keyframes emergencyPulse {
  0%,
  100% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
}

.emergency-label {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 56;
  padding: 12px 20px;
  border: 1px solid rgba(255, 120, 120, 0.75);
  border-radius: 10px;
  background: rgba(70, 12, 12, 0.72);
  color: #ffd6d6;
  font-size: clamp(24px, 3vw, 42px);
  font-weight: 700;
  letter-spacing: 1px;
  text-shadow: 0 0 12px rgba(255, 128, 128, 0.9);
  box-shadow: 0 0 20px rgba(255, 73, 73, 0.38);
}

.emergency-label.show {
  animation: emergencyLabelPulse 0.3s ease-in-out 6;
}

@keyframes emergencyLabelPulse {
  0%,
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.98);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.02);
  }
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(39, 104, 183, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(39, 104, 183, 0.12) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
  pointer-events: none;
}

.container {
  position: relative;
  z-index: 1;
  width: min(1920px, 99vw);
  margin: 0 auto;
  height: 100vh;
  padding: 10px 0 10px;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 8px;
}

.header {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(14, 29, 54, 0.75), rgba(8, 16, 30, 0.85));
  backdrop-filter: blur(6px);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: inset 0 0 0 1px rgba(40, 125, 227, 0.22), 0 0 32px rgba(25, 111, 219, 0.18);
}

.header-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.header-main {
  min-width: 260px;
}

.header-controls {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: min(580px, 62vw);
}

.quick-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.control-btn {
  border: 1px solid rgba(85, 145, 232, 0.55);
  border-radius: 7px;
  color: #d9ebff;
  background: rgba(17, 58, 121, 0.66);
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
}

body.theme-day .control-btn {
  color: #174b8a;
  background: rgba(195, 220, 255, 0.8);
}

.add-form {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) minmax(120px, 1fr) minmax(90px, auto) auto;
  gap: 4px;
}

.add-form input,
.add-form button {
  border-radius: 7px;
  border: 1px solid rgba(85, 145, 232, 0.55);
  font-size: 11px;
  padding: 5px 7px;
}

.add-form input {
  background: rgba(9, 18, 35, 0.9);
  color: #deedff;
}

.add-form button {
  background: rgba(27, 89, 183, 0.75);
  color: #ecf5ff;
  cursor: pointer;
}

.import-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px;
}

.import-form textarea {
  min-height: 40px;
  resize: vertical;
  border-radius: 7px;
  border: 1px solid rgba(85, 145, 232, 0.55);
  background: rgba(9, 18, 35, 0.9);
  color: #deedff;
  padding: 5px 7px;
  font-size: 11px;
}

.import-form button {
  border-radius: 7px;
  border: 1px solid rgba(85, 145, 232, 0.55);
  background: rgba(27, 89, 183, 0.75);
  color: #ecf5ff;
  cursor: pointer;
  padding: 5px 8px;
  font-size: 11px;
}

.export-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px;
}

.export-wrap textarea {
  min-height: 40px;
  resize: vertical;
  border-radius: 7px;
  border: 1px solid rgba(85, 145, 232, 0.55);
  background: rgba(9, 18, 35, 0.9);
  color: #deedff;
  padding: 5px 7px;
  font-size: 11px;
}

.export-wrap button {
  border-radius: 7px;
  border: 1px solid rgba(85, 145, 232, 0.55);
  background: rgba(27, 89, 183, 0.75);
  color: #ecf5ff;
  cursor: pointer;
  padding: 5px 8px;
  font-size: 11px;
}

body.theme-day .add-form input {
  background: rgba(243, 249, 255, 0.95);
  color: #173f72;
}

body.theme-day .add-form button {
  background: rgba(146, 189, 252, 0.75);
  color: #103a70;
}

body.theme-day .import-form textarea {
  background: rgba(243, 249, 255, 0.95);
  color: #173f72;
}

body.theme-day .import-form button {
  background: rgba(146, 189, 252, 0.75);
  color: #103a70;
}

body.theme-day .export-wrap textarea {
  background: rgba(243, 249, 255, 0.95);
  color: #173f72;
}

body.theme-day .export-wrap button {
  background: rgba(146, 189, 252, 0.75);
  color: #103a70;
}

.add-error {
  min-height: 16px;
  color: #ff9a9a;
  font-size: 11px;
}

.timeout-banner {
  margin-top: 8px;
  border: 1px solid rgba(74, 129, 212, 0.34);
  border-radius: 10px;
  background: rgba(7, 15, 30, 0.72);
  padding: 7px 10px;
  box-shadow: inset 0 0 0 1px rgba(88, 151, 241, 0.12);
}

.hidden-banner {
  margin-top: 6px;
  border: 1px solid rgba(75, 124, 194, 0.32);
  border-radius: 10px;
  background: rgba(7, 14, 27, 0.62);
  padding: 5px 10px;
}

.hidden-list {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
  color: #86a2cb;
}

.hidden-item {
  border: 1px solid rgba(108, 149, 211, 0.44);
  border-radius: 14px;
  background: rgba(20, 45, 88, 0.62);
  color: #d0e5ff;
  padding: 3px 8px;
  cursor: pointer;
}

.timeout-panel {
  width: 100%;
  border: 1px solid rgba(74, 129, 212, 0.34);
  border-radius: 10px;
  background: rgba(7, 15, 30, 0.72);
  padding: 7px 10px;
  box-shadow: inset 0 0 0 1px rgba(88, 151, 241, 0.12);
}

.timeout-title {
  font-size: 12px;
  color: #a9caf4;
  letter-spacing: 0.5px;
}

.timeout-list {
  margin-top: 4px;
  color: #8fb0da;
  font-size: 12px;
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  grid-auto-flow: column;
  grid-auto-columns: minmax(130px, 1fr);
  column-gap: 10px;
  row-gap: 2px;
  overflow: hidden;
  padding-bottom: 2px;
}

.timeout-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 1px 0;
  color: #ff9f9f;
  font-size: 11px;
}

.timeout-item:hover {
  color: #ffc3c3;
}

.header h1 {
  margin: 0;
  font-size: clamp(18px, 2.2vw, 30px);
  letter-spacing: 1.6px;
  text-shadow: 0 0 18px rgba(78, 161, 255, 0.55);
}

.header p {
  margin: 4px 0 0;
  color: var(--subtext);
  font-size: 13px;
}

.meta {
  margin-top: 8px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: #b9d2f1;
  font-size: 12px;
}

#userBadge {
  border: 1px solid rgba(89, 145, 225, 0.45);
  border-radius: 12px;
  padding: 2px 8px;
  background: rgba(14, 42, 87, 0.45);
}

.legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 2px;
  color: var(--subtext);
  font-size: 12px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  box-shadow: 0 0 1px currentColor;
}

.dot.low { background: #3cf2bc; color: #3cf2bc; }
.dot.mid { background: #ffd56a; color: #ffd56a; }
.dot.high { background: #ff7f7f; color: #ff7f7f; }
.dot.off { background: #556175; color: #556175; }

.cards {
  min-height: 0;
  overflow: auto;
  align-content: start;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  grid-auto-rows: minmax(180px, auto);
  gap: 8px;
}

.card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px;
  background: rgba(10, 17, 32, 0.82);
  box-shadow: inset 0 0 0 1px rgba(45, 113, 214, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.card-actions {
  display: inline-flex;
  gap: 5px;
}

.card-btn {
  border: 1px solid rgba(98, 140, 204, 0.55);
  border-radius: 12px;
  padding: 2px 7px;
  font-size: 10px;
  cursor: pointer;
  color: #d6e9ff;
  background: rgba(18, 49, 97, 0.68);
}

.card-btn.delete-btn {
  border-color: rgba(212, 101, 101, 0.7);
  color: #ffb4b4;
  background: rgba(90, 22, 22, 0.6);
}

.card.card-highlight {
  box-shadow: inset 0 0 0 1px rgba(160, 214, 255, 0.44), 0 0 30px rgba(82, 167, 247, 0.55);
  animation: cardFlash 1.8s ease;
}

@keyframes cardFlash {
  0% { transform: translateY(-2px) scale(1.01); }
  60% { transform: translateY(-3px) scale(1.01); }
  100% { transform: translateY(0) scale(1); }
}

.card:hover {
  transform: translateY(-2px);
}

.card .location {
  font-size: 12px;
  color: #b6cbeb;
}

.card .ip {
  margin-top: 2px;
  font-size: 11px;
  color: #6b93c7;
}

.card .latency {
  margin-top: 4px;
  font-size: clamp(16px, 1.3vw, 22px);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.card .status {
  margin-top: 2px;
  font-size: 11px;
  color: #94b6e0;
}

.trend-wrap {
  margin-top: auto;
}

.trend-title {
  margin-bottom: 2px;
  font-size: 10px;
  letter-spacing: 0.6px;
  color: #93aad0;
}

.trend {
  width: 100%;
  height: 42px;
  border: 1px solid rgba(129, 163, 215, 0.25);
  border-radius: 8px;
  display: block;
  shape-rendering: geometricPrecision;
  text-rendering: geometricPrecision;
}

.trend-bg {
  fill: rgba(8, 18, 35, 0.7);
}

.trend-axis {
  stroke: rgba(143, 173, 218, 0.28);
  stroke-width: 1;
}

.trend-grid {
  stroke: rgba(112, 147, 194, 0.2);
  stroke-width: 1;
  stroke-dasharray: 3 4;
}

.trend-label {
  fill: rgba(165, 194, 233, 0.82);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2px;
  paint-order: stroke;
  stroke: rgba(5, 12, 24, 0.65);
  stroke-width: 0.8;
}

.trend-unit {
  fill: rgba(136, 187, 255, 0.95);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  paint-order: stroke;
  stroke: rgba(5, 12, 24, 0.65);
  stroke-width: 0.8;
}

.trend-seg {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trend-seg.normal {
  stroke: #77beff;
  filter: drop-shadow(0 0 4px rgba(66, 169, 255, 0.6));
}

.trend-seg.normal.low {
  stroke: #47f6c2;
  filter: drop-shadow(0 0 4px rgba(71, 246, 194, 0.55));
}

.trend-seg.normal.mid {
  stroke: #ffd777;
  filter: drop-shadow(0 0 4px rgba(255, 215, 119, 0.55));
}

.trend-seg.normal.high {
  stroke: #ff8c8c;
  filter: drop-shadow(0 0 4px rgba(255, 140, 140, 0.55));
}

.trend-seg.normal.offline {
  stroke: #7f90ad;
  filter: drop-shadow(0 0 4px rgba(127, 144, 173, 0.45));
}

.trend-seg.timeout {
  stroke: #ff5252;
  filter: drop-shadow(0 0 4px rgba(255, 82, 82, 0.62));
}

.trend-point {
  fill: rgba(188, 224, 255, 0.86);
  opacity: 0.25;
  transition: opacity 0.15s ease, r 0.15s ease;
}

.trend-point.timeout {
  fill: #ff7b7b;
  opacity: 0.75;
}

.trend-point:hover {
  opacity: 1;
  r: 3.4;
}

.point-tooltip {
  position: fixed;
  z-index: 20;
  pointer-events: none;
  background: rgba(9, 15, 28, 0.96);
  border: 1px solid rgba(107, 165, 247, 0.56);
  border-radius: 6px;
  padding: 4px 8px;
  color: #cde5ff;
  font-size: 12px;
  box-shadow: 0 0 14px rgba(71, 143, 232, 0.28);
}

.hidden {
  display: none;
}

.card.low {
  border-color: #23a683;
  background: linear-gradient(180deg, rgba(8, 53, 43, 0.8), rgba(8, 24, 27, 0.85));
  box-shadow: inset 0 0 0 1px rgba(60, 242, 188, 0.16), 0 0 22px rgba(60, 242, 188, 0.12);
}

.card.mid {
  border-color: #ab7d26;
  background: linear-gradient(180deg, rgba(68, 53, 17, 0.8), rgba(26, 21, 10, 0.85));
  box-shadow: inset 0 0 0 1px rgba(255, 213, 106, 0.16), 0 0 22px rgba(255, 213, 106, 0.12);
}

.card.high {
  border-color: #a44747;
  background: linear-gradient(180deg, rgba(74, 28, 28, 0.8), rgba(26, 10, 10, 0.85));
  box-shadow: inset 0 0 0 1px rgba(255, 127, 127, 0.16), 0 0 22px rgba(255, 127, 127, 0.12);
}

.card.offline {
  border-color: #39465d;
  background: linear-gradient(180deg, rgba(35, 42, 57, 0.75), rgba(15, 19, 29, 0.9));
  box-shadow: inset 0 0 0 1px rgba(120, 139, 168, 0.12);
}

body.theme-day .header,
body.theme-day .timeout-banner,
body.theme-day .hidden-banner,
body.theme-day .card,
body.theme-day .trend-bg {
  background: rgba(238, 246, 255, 0.95);
}

body.theme-day .modal-card {
  background: linear-gradient(180deg, rgba(246, 251, 255, 0.98), rgba(230, 241, 255, 0.96));
}

body.theme-day .header h1,
body.theme-day .card .latency,
body.theme-day .card .location,
body.theme-day .timeout-title {
  color: #26a257;
  text-shadow: none;
}

body.theme-day .card .ip,
body.theme-day .card .status,
body.theme-day .meta,
body.theme-day .legend,
body.theme-day .trend-title {
  color: #4e7098;
}

body.theme-day .timeout-item,
body.theme-day .hidden-item {
  color: #b54444;
}

body.theme-day .change-form input {
  background: rgba(243, 249, 255, 0.95);
  color: #173f72;
}

body.theme-day .change-form button,
body.theme-day .modal-close {
  background: rgba(146, 189, 252, 0.75);
  color: #103a70;
}

@media (max-width: 920px) {
  body {
    overflow: auto;
  }

  .container {
    height: auto;
    min-height: 100vh;
  }

  .timeout-list {
    overflow-x: auto;
    overflow-y: hidden;
  }

  .header-top {
    flex-direction: column;
  }

  .header-controls {
    width: 100%;
  }

  .control-btn {
    align-self: flex-start;
  }

  .quick-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

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

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

  .export-wrap {
    grid-template-columns: 1fr;
  }

  .cards {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    grid-auto-rows: minmax(210px, auto);
    gap: 12px;
  }

  .trend {
    height: 64px;
  }
}

.admin-page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 14px;
  color: var(--text);
}

body.admin-body .admin-page {
  min-height: auto;
  padding-bottom: 20px;
}

.admin-login {
  width: min(460px, 94vw);
  margin: 10vh auto 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(14, 29, 54, 0.88), rgba(8, 16, 30, 0.92));
}

.admin-login h2 {
  margin: 0;
  font-size: 22px;
}

.admin-login p {
  margin: 8px 0 12px;
  color: var(--subtext);
  font-size: 12px;
}

.admin-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(14, 29, 54, 0.86), rgba(8, 16, 30, 0.92));
  padding: 12px;
}

body.admin-body .admin-panel {
  overflow: visible;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.admin-header h1 {
  margin: 0;
  font-size: 20px;
}

.admin-actions {
  display: inline-flex;
  gap: 6px;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  gap: 10px;
  min-height: calc(100vh - 110px);
}

body.admin-body .admin-layout {
  min-height: 0;
}

.admin-users-wrap,
.admin-targets-wrap {
  border: 1px solid rgba(89, 145, 225, 0.35);
  border-radius: 10px;
  background: rgba(7, 15, 30, 0.72);
  padding: 10px;
}

.admin-subtitle {
  font-size: 12px;
  color: #a9caf4;
  margin-bottom: 8px;
}

.admin-users {
  display: grid;
  gap: 6px;
}

.admin-user-item {
  border: 1px solid rgba(85, 145, 232, 0.45);
  border-radius: 8px;
  background: rgba(14, 40, 83, 0.62);
  color: #dcebff;
  padding: 8px;
  text-align: left;
  cursor: pointer;
}

.admin-user-item.active {
  box-shadow: inset 0 0 0 1px rgba(99, 179, 255, 0.4), 0 0 16px rgba(57, 144, 226, 0.35);
}

.admin-user-item .email {
  font-size: 12px;
}

.admin-user-item .meta {
  margin-top: 4px;
  font-size: 11px;
  color: #9fbde3;
}

.admin-add-form {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(150px, 1fr) 120px auto;
  gap: 6px;
  margin-bottom: 8px;
}

.admin-add-form input,
.admin-add-form select,
.admin-add-form button {
  border-radius: 7px;
  border: 1px solid rgba(85, 145, 232, 0.55);
  background: rgba(9, 18, 35, 0.9);
  color: #deedff;
  font-size: 12px;
  padding: 6px 8px;
}

.admin-add-form button {
  background: rgba(27, 89, 183, 0.75);
  cursor: pointer;
}

.admin-targets {
  overflow: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid rgba(97, 140, 203, 0.28);
  padding: 6px 4px;
  text-align: left;
}

.admin-op-col {
  display: inline-flex;
  gap: 4px;
}

.control-btn.danger {
  border-color: rgba(212, 101, 101, 0.7);
  color: #ffb4b4;
  background: rgba(90, 22, 22, 0.6);
}

body.theme-day .admin-panel,
body.theme-day .admin-login,
body.theme-day .admin-users-wrap,
body.theme-day .admin-targets-wrap {
  background: rgba(238, 246, 255, 0.95);
}

body.theme-day .admin-user-item {
  background: rgba(197, 221, 255, 0.78);
  color: #14467f;
}

body.theme-day .admin-user-item .meta {
  color: #3f6fa6;
}

body.theme-day .admin-add-form input,
body.theme-day .admin-add-form select,
body.theme-day .admin-add-form button {
  background: rgba(243, 249, 255, 0.95);
  color: #173f72;
}

@media (max-width: 920px) {
  .admin-layout {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .admin-add-form {
    grid-template-columns: 1fr;
  }
}

.admin-membership-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.admin-membership-bar select,
.admin-membership-bar button {
  border-radius: 8px;
  border: 1px solid #d4dbe6;
  background: #ffffff;
  color: #1f2937;
  font-size: 12px;
  padding: 6px 8px;
}

.admin-membership-bar button {
  cursor: pointer;
}

.admin-user-pagination {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 8px;
  font-size: 12px;
  color: #64748b;
}

.admin-user-pagination .control-btn {
  padding: 4px 8px;
  font-size: 12px;
}

body {
  background: #f5f7fb;
  color: #1f2937;
}

.bg-grid {
  display: none;
}

.auth-gate {
  background: rgba(248, 250, 253, 0.96);
}

.auth-card,
.header,
.timeout-banner,
.hidden-banner,
.card,
.modal-card,
.admin-login,
.admin-panel,
.admin-users-wrap,
.admin-targets-wrap {
  background: #ffffff;
  border: 1px solid #dbe3ef;
  box-shadow: none;
}

.header h1,
.admin-header h1,
.auth-card h2,
.admin-login h2 {
  color: #111827;
  text-shadow: none;
}

.header p,
.meta,
.legend,
.card .location,
.card .ip,
.card .status,
.timeout-title,
.admin-subtitle,
.auth-card p,
.admin-login p {
  color: #6b7280;
}

.control-btn,
.auth-form button,
.add-form button,
.import-form button,
.export-wrap button,
.modal-close,
.change-form button,
.admin-add-form button,
.admin-user-item {
  background: #ffffff;
  color: #1f2937;
  border: 1px solid #d4dbe6;
  box-shadow: none;
}

.control-btn:hover,
.auth-form button:hover,
.add-form button:hover,
.import-form button:hover,
.export-wrap button:hover,
.modal-close:hover,
.change-form button:hover,
.admin-add-form button:hover,
.admin-user-item:hover {
  background: #f3f6fb;
}

.card.low,
.card.mid,
.card.high,
.card.offline {
  background: #ffffff;
  box-shadow: none;
}

.card.low {
  border-color: #dbe3ef;
}

.card.mid {
  border-color: #dbe3ef;
}

.card.high {
  border-color: #dbe3ef;
}

.card.offline {
  border-color: #dbe3ef;
}

.timeout-item,
.hidden-item {
  color: #374151;
}

.timeout-item:hover {
  color: #111827;
}

.admin-user-item.active {
  border-color: #9fb3d1;
  box-shadow: none;
}

.auth-card {
  position: relative;
  width: min(460px, 90vw);
  border-radius: 14px;
  padding: 20px;
}

.auth-intro {
  border: 1px solid #e3e8f2;
  border-radius: 10px;
  background: linear-gradient(135deg, #f8fafc, #eef3fb);
  padding: 10px 12px;
  margin-bottom: 10px;
}

.auth-intro-title {
  font-size: 13px;
  color: #111827;
  font-weight: 600;
}

.auth-intro-text {
  margin-top: 4px;
  font-size: 12px;
  color: #4b5563;
  line-height: 1.45;
}

.auth-form input,
.add-form input,
.add-form select,
.import-form textarea,
.export-wrap textarea,
.change-form input,
.admin-add-form input,
.admin-add-form select,
.admin-membership-bar select,
#adminUsername,
#adminPassword {
  background: #111827;
  color: #f9fafb;
  border: 1px solid #222f45;
}

.auth-form input::placeholder,
.add-form input::placeholder,
.import-form textarea::placeholder,
.export-wrap textarea::placeholder,
.change-form input::placeholder,
.admin-add-form input::placeholder,
#adminUsername::placeholder,
#adminPassword::placeholder {
  color: #a5b4cc;
}

.auth-form button,
.add-form button,
.import-form button,
.export-wrap button,
.change-form button,
.admin-add-form button,
.admin-membership-bar button,
.control-btn,
.modal-close {
  border: 1px solid #d5dde9;
  background: #ffffff;
  color: #111827;
  font-weight: 500;
}

.header,
.admin-panel,
.admin-login,
.timeout-banner,
.hidden-banner,
.card,
.modal-card,
.admin-users-wrap,
.admin-targets-wrap {
  border-color: #e1e7f0;
}

.side-notice {
  position: fixed;
  right: 16px;
  top: 94px;
  z-index: 70;
  min-width: 220px;
  max-width: 320px;
  background: #ffffff;
  color: #111827;
  border: 1px solid #dbe4f0;
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: 0 6px 20px rgba(17, 24, 39, 0.08);
  opacity: 0;
  transform: translateX(18px);
  transition: all 0.22s ease;
}

.side-notice.show {
  opacity: 1;
  transform: translateX(0);
}

.admin-table th {
  color: #4b5563;
  font-weight: 600;
}

.admin-table td {
  color: #1f2937;
}

.region-status-badge {
  display: inline-block;
  min-width: 44px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.4;
  border: 1px solid transparent;
}

.region-status-badge.is-online {
  color: #0f7a36;
  background: #e7f8ee;
  border-color: #8fd9ab;
}

.region-status-badge.is-off {
  color: #b42318;
  background: #fdecec;
  border-color: #f6b0b0;
}

.region-status-badge.is-other {
  color: #6b7280;
  background: #f3f4f6;
  border-color: #d1d5db;
}

/* ===== 官方扁平风二次优化 ===== */
.auth-gate {
  background: linear-gradient(135deg, #0f61db 0%, #e9f0fb 100%);
}

.auth-shell {
  width: min(1200px, 96vw);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: stretch;
  position: relative;
}

.auth-logo {
  position: absolute;
  left: 0;
  top: -90px;
  z-index: 3;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  padding: 4px 6px;
  background: #fff;
}

.auth-logo img {
  display: block;
  width: 240px;
  max-width: 40vw;
  height: auto;
}

.membership-modal-card {
  width: min(760px, 92vw);
}

.membership-intro {
  font-size: 13px;
  color: #475569;
  margin-bottom: 10px;
}

.membership-plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.membership-plan {
  border: 1px solid #dbe4f0;
  border-radius: 10px;
  padding: 10px;
  background: rgba(15, 97, 219, 0.04);
}

.membership-plan h4 {
  margin: 0 0 8px;
  color: #0f61db;
  font-size: 15px;
}

.membership-plan ul {
  margin: 0;
  padding-left: 16px;
  color: #0f172a;
  font-size: 12px;
  line-height: 1.6;
}

.membership-contact-title {
  font-size: 13px;
  color: #0f172a;
  margin: 4px 0 8px;
  font-weight: 600;
}

.membership-contact-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.membership-contact-btn {
  border: 1px solid #dbe4f0;
  border-radius: 10px;
  padding: 10px 12px;
  text-decoration: none;
  font-weight: 600;
  text-align: center;
  color: #0f172a;
  background: #fff;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.membership-contact-btn:hover {
  transform: translateY(-1px);
  border-color: #0f61db;
  box-shadow: 0 8px 20px rgba(15, 97, 219, 0.14);
}

.membership-contact-btn.qq {
  background: linear-gradient(135deg, rgba(29, 155, 240, 0.14), rgba(15, 97, 219, 0.08));
}

.membership-contact-btn.telegram {
  background: linear-gradient(135deg, rgba(27, 167, 255, 0.14), rgba(15, 97, 219, 0.08));
}

.auth-visual {
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  background: #fff;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

.auth-visual img {
  width: 100%;
  max-height: 320px;
  object-fit: contain;
}

.auth-visual-text h3 {
  margin: 0;
  color: #0f172a;
  font-size: 20px;
}

.auth-visual-text p {
  margin: 6px 0 0;
  color: #475569;
  font-size: 13px;
}

.auth-card {
  width: 100%;
  margin-left: auto;
  border: 1px solid #dbe4f0;
  background: #fff;
  border-radius: 14px;
  padding: 26px 24px;
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.06);
}

.auth-card h2 {
  color: #0f172a;
  font-size: 30px;
}

.auth-card p {
  color: #64748b;
}

.auth-form {
  gap: 10px;
}

.auth-form input,
.add-form input,
.add-form select,
.import-form textarea,
.export-wrap textarea,
.change-form input,
.admin-add-form input,
.admin-add-form select,
.admin-membership-bar select,
#adminUsername,
#adminPassword {
  background: #f8fafc;
  color: #0f172a;
  border: 1px solid #d5deea;
}

.auth-form button,
.add-form button,
.import-form button,
.export-wrap button,
.change-form button,
.admin-add-form button,
.admin-membership-bar button,
.control-btn,
.modal-close,
.card-btn {
  background: #fff;
  color: #0f172a;
  border: 1px solid #d5deea;
}

.header,
.card,
.timeout-banner,
.hidden-banner,
.modal-card {
  background: #fff;
  border-color: #dbe4f0;
}

.header h1,
.header p,
.meta,
.legend,
.card .location,
.card .ip,
.card .status,
.trend-title,
.timeout-title {
  color: #475569;
  text-shadow: none;
}

.card.low,
.card.mid,
.card.high,
.card.offline {
  background: #fff;
  box-shadow: none;
}

.card.low {
  border-left: 3px solid #10b981;
}

.card.mid {
  border-left: 3px solid #f59e0b;
}

.card.high {
  border-left: 3px solid #ef4444;
}

.card.offline {
  border-left: 3px solid #94a3b8;
}

.regions-status {
  margin-top: 4px;
  font-size: 11px;
  color: #64748b;
}

.trend-seg {
  stroke-width: 1;
}

.trend-seg.normal,
.trend-seg.normal.low,
.trend-seg.normal.mid,
.trend-seg.normal.high,
.trend-seg.normal.offline,
.trend-seg.timeout {
  filter: none;
}

.timeout-list.single-line {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 12px;
  white-space: nowrap;
}

.timeout-layout-toggle {
  margin-left: auto;
}

.cards.single-line {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 10px;
}

.cards.single-line .card {
  min-width: 260px;
  flex: 0 0 260px;
}

.region-picker {
  margin-top: 8px;
  border: 1px solid #e1e8f3;
  border-radius: 10px;
  padding: 8px;
  background: #fafcff;
}

.region-title {
  font-size: 12px;
  color: #334155;
  margin-bottom: 6px;
}

.region-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.region-options label {
  font-size: 12px;
  color: #334155;
}

.region-hint {
  margin-top: 6px;
  font-size: 11px;
  color: #64748b;
}

.task-policy {
  margin-top: 8px;
  border: 1px solid #e1e8f3;
  border-radius: 10px;
  padding: 8px;
  background: #fafcff;
}

.policy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

.policy-grid label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: #334155;
}

.policy-grid select,
.policy-notify input[type="text"] {
  border: 1px solid #d5deea;
  border-radius: 7px;
  padding: 5px 7px;
  font-size: 12px;
  background: #fff;
  color: #0f172a;
}

.policy-notify {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #334155;
}

.policy-notify label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.policy-notify input[type="text"] {
  min-width: min(280px, 100%);
  flex: 1;
}

.admin-zones {
  display: grid;
  gap: 12px;
}

.admin-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 12px;
}

.admin-sidebar {
  border: 1px solid #e1e7f0;
  border-radius: 10px;
  background: #fff;
  padding: 10px;
  display: grid;
  gap: 8px;
  align-content: start;
  max-height: calc(100vh - 120px);
  position: sticky;
  top: 12px;
}

.admin-menu-item {
  border: 1px solid #d5deea;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  text-align: left;
  padding: 8px 10px;
  cursor: pointer;
}

.admin-menu-item.active {
  background: #f1f5fb;
  border-color: #b8c8df;
}

.admin-content {
  min-width: 0;
}

.admin-zone {
  border: 1px solid #e1e7f0;
  border-radius: 10px;
  background: #fff;
  padding: 10px;
  overflow: auto;
}

.region-server-form {
  grid-template-columns: repeat(3, minmax(140px, 1fr));
}

.monitor-region-form {
  grid-template-columns: minmax(180px, 1fr) minmax(160px, 1fr) auto;
  margin-bottom: 8px;
}

.admin-user-search-form {
  grid-template-columns: minmax(180px, 1fr) auto auto;
  margin-bottom: 8px;
}

.notify-settings-form {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  margin-bottom: 8px;
}

.notify-settings-form textarea {
  border-radius: 7px;
  border: 1px solid #d5deea;
  background: #f8fafc;
  color: #0f172a;
  font-size: 12px;
  padding: 6px 8px;
  resize: vertical;
}

.notify-template-body {
  grid-column: 1 / -1;
}

.notify-template-vars {
  grid-column: 1 / -1;
  font-size: 12px;
  color: #475569;
}

.notify-settings-form button {
  justify-self: start;
}

.region-server-form button {
  justify-self: start;
}

.admin-zone-title {
  margin-bottom: 8px;
  font-size: 13px;
  color: #334155;
  font-weight: 600;
}

.admin-region-picker {
  margin-bottom: 8px;
}

.admin-region-note {
  width: 100%;
  border-radius: 7px;
  border: 1px solid #d5deea;
  background: #f8fafc;
  color: #0f172a;
  font-size: 12px;
  padding: 6px 8px;
  margin-bottom: 8px;
}

@media (max-width: 960px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-logo {
    position: static;
    justify-self: start;
    margin-bottom: 8px;
  }

  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    max-height: none;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 820px) {
  .membership-plans,
  .membership-contact-actions {
    grid-template-columns: 1fr;
  }
}

.cards {
  grid-auto-rows: minmax(260px, auto);
  gap: 12px;
  overflow-y: scroll;
  scrollbar-width: none;
}

.cards::-webkit-scrollbar {
  width: 0;
}

.page-scroll-hotzone {
  position: fixed;
  top: 0;
  right: 0;
  width: 12px;
  height: 100vh;
  z-index: 80;
  background: transparent;
}

.page-scroll-rail {
  position: fixed;
  right: 2px;
  width: 8px;
  z-index: 82;
  border-radius: 999px;
  background: rgba(43, 84, 146, 0.2);
  box-shadow: inset 0 0 0 1px rgba(103, 164, 241, 0.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
}

.page-scroll-rail.disabled {
  opacity: 0 !important;
  pointer-events: none !important;
}

body.show-page-scrollbar .page-scroll-rail {
  opacity: 1;
  pointer-events: auto;
}

.page-scroll-thumb {
  width: 100%;
  min-height: 36px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(124, 189, 255, 0.85), rgba(73, 140, 227, 0.88));
  box-shadow: 0 0 10px rgba(86, 162, 255, 0.46);
  cursor: ns-resize;
  user-select: none;
}

body.is-page-scrollbar-dragging {
  user-select: none;
}

.cards.layout-big {
  grid-template-columns: 1fr;
  grid-auto-rows: 520px;
}

.cards.layout-card {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  grid-auto-rows: minmax(160px, auto);
  gap: 8px;
}

.card {
  padding: 12px;
  overflow: hidden;
}

.cards.layout-big .card {
  height: 520px;
  border-radius: 18px;
  padding: 18px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  border: 1px solid rgba(93, 149, 231, 0.55);
  background:
    linear-gradient(160deg, rgba(8, 28, 56, 0.96) 0%, rgba(8, 18, 39, 0.95) 55%, rgba(6, 13, 28, 0.98) 100%),
    radial-gradient(circle at 88% 12%, rgba(58, 169, 255, 0.24), transparent 42%);
  box-shadow:
    inset 0 0 0 1px rgba(77, 169, 255, 0.13),
    0 0 28px rgba(26, 119, 222, 0.2),
    0 10px 35px rgba(4, 12, 28, 0.45);
}

.cards.layout-card .card {
  padding: 9px;
}

.card-panels {
  min-height: 0;
}

.cards.layout-big .card-panels {
  height: 100%;
  display: grid;
  grid-template-columns: 250px minmax(0, 0.85fr) minmax(0, 1.25fr);
  gap: 14px;
}

.cards.layout-big .card-panel {
  min-height: 0;
  border: 1px solid rgba(87, 143, 226, 0.36);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(11, 27, 51, 0.84), rgba(8, 18, 37, 0.9));
  box-shadow: inset 0 0 0 1px rgba(90, 160, 248, 0.08);
}

.cards.layout-big .card-panel.left {
  padding: 12px;
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
  gap: 8px;
}

.cards.layout-big .card-panel.middle {
  padding: 12px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
}

.cards.layout-big .card-panel.right {
  padding: 12px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.cards.layout-big .trend-wrap {
  margin-top: 0;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.cards.layout-big .trend-holder {
  flex: 1;
  min-height: 0;
}

.card .location {
  font-size: 15px;
}

.cards.layout-big .card .location {
  font-size: 28px;
  line-height: 1.2;
  font-weight: 700;
  color: #d8ecff;
  text-shadow: 0 0 12px rgba(90, 177, 255, 0.35);
}

.cards.layout-card .card .location {
  font-size: 13px;
}

.card .ip {
  font-size: 13px;
  margin-top: 4px;
}

.cards.layout-big .card .ip {
  font-size: 18px;
  margin-top: 0;
  color: #83baf1;
}

.cards.layout-card .card .ip {
  font-size: 11px;
}

.regions-status {
  margin-top: 8px;
  font-size: 13px;
  color: #9db9df;
  line-height: 1.5;
}

.cards.layout-big .regions-status {
  margin-top: 0;
  font-size: 14px;
  font-weight: 600;
  color: #a9cff6;
}

.cards.layout-card .regions-status {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.35;
}

.cards.layout-big .middle-title {
  font-size: 16px;
  color: #bfe2ff;
  font-weight: 700;
}

.region-matrix {
  min-height: 0;
}

.cards.layout-big .region-matrix {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.cards.layout-big .region-matrix-col {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 10px;
}

.cards.layout-big .region-matrix-row {
  display: grid;
  gap: 6px;
}

.cards.layout-big .region-matrix-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
}

.cards.layout-big .region-matrix-name {
  font-size: 14px;
  color: #d8ecff;
}

.cards.layout-big .region-matrix-value {
  font-size: 13px;
  color: #9fc9f8;
}

.cards.layout-big .region-matrix-track {
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(34, 60, 95, 0.78), rgba(20, 36, 64, 0.82));
  border: 1px solid rgba(108, 163, 236, 0.42);
  overflow: hidden;
}

.cards.layout-big .region-matrix-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.35s ease;
}

.cards.layout-big .region-matrix-fill.low {
  background: linear-gradient(90deg, #26c281, #7df0b6);
}

.cards.layout-big .region-matrix-fill.mid {
  background: linear-gradient(90deg, #dba54a, #ffd56a);
}

.cards.layout-big .region-matrix-fill.high {
  background: linear-gradient(90deg, #d35a5a, #ff8e8e);
}

.cards.layout-big .region-matrix-fill.offline {
  background: linear-gradient(90deg, #7183a5, #9daece);
}

.cards.layout-big .region-matrix-fill.unselected {
  background: linear-gradient(90deg, #57627a, #838fa8);
}

.cards.layout-big .region-matrix-row.unselected .region-matrix-name,
.cards.layout-big .region-matrix-row.unselected .region-matrix-value {
  color: #8ea0bd;
}

.region-bars {
  margin-top: 8px;
  display: grid;
  gap: 8px;
}

.cards.layout-big .region-bars {
  margin-top: 0;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 6px;
  gap: 10px;
}

.cards.layout-card .region-bars {
  display: none;
}

.latency-legend {
  margin-top: auto;
  border: 1px solid rgba(97, 151, 228, 0.35);
  border-radius: 10px;
  background: rgba(7, 20, 40, 0.65);
  padding: 8px;
  display: grid;
  gap: 6px;
}

.latency-legend .legend-title {
  font-size: 12px;
  color: #b7dbff;
  font-weight: 700;
}

.latency-legend .legend-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #9dc5f0;
}

.latency-legend .legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.latency-legend .legend-dot.low { background: #32de9e; }
.latency-legend .legend-dot.mid { background: #ffd56a; }
.latency-legend .legend-dot.high { background: #ff8e8e; }
.latency-legend .legend-dot.off { background: #8a96ad; }

.region-bar-row {
  display: grid;
  grid-template-columns: 98px 1fr auto;
  gap: 8px;
  align-items: center;
}

.cards.layout-big .region-bar-row {
  grid-template-columns: 180px 1fr 110px;
  gap: 12px;
}

.region-bar-name,
.region-bar-value {
  font-size: 12px;
  color: #b8d2f3;
  white-space: nowrap;
}

.cards.layout-big .region-bar-name,
.cards.layout-big .region-bar-value {
  font-size: 16px;
  color: #d2e7ff;
}

.region-bar-track {
  height: 12px;
  border-radius: 999px;
  background: rgba(106, 133, 173, 0.35);
  border: 1px solid rgba(135, 167, 214, 0.36);
  overflow: hidden;
}

.cards.layout-big .region-bar-track {
  height: 18px;
  background: linear-gradient(180deg, rgba(34, 60, 95, 0.78), rgba(20, 36, 64, 0.82));
  border-color: rgba(108, 163, 236, 0.42);
  box-shadow: inset 0 0 8px rgba(18, 47, 90, 0.6);
}

.region-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.35s ease;
}

.region-bar-fill.low {
  background: linear-gradient(90deg, #26c281, #7df0b6);
  box-shadow: 0 0 12px rgba(73, 239, 174, 0.45);
}

.region-bar-fill.mid {
  background: linear-gradient(90deg, #dba54a, #ffd56a);
  box-shadow: 0 0 12px rgba(255, 213, 106, 0.4);
}

.region-bar-fill.high {
  background: linear-gradient(90deg, #d35a5a, #ff8e8e);
  box-shadow: 0 0 12px rgba(255, 119, 119, 0.42);
}

.region-bar-fill.offline {
  background: linear-gradient(90deg, #5b6b84, #8fa0be);
}

.card .latency {
  margin-top: 10px;
  font-size: clamp(22px, 2.1vw, 32px);
}

.cards.layout-big .card .latency {
  margin-top: 0;
  font-size: clamp(34px, 3.4vw, 54px);
  line-height: 1;
  color: #d8ecff;
  text-shadow: 0 0 12px rgba(115, 188, 255, 0.34);
}

.cards.layout-card .card .latency {
  margin-top: 6px;
  font-size: clamp(16px, 1.2vw, 22px);
}

.card .status {
  margin-top: 4px;
  font-size: 12px;
}

.cards.layout-big .card .status {
  margin-top: 0;
  font-size: 16px;
  color: #9ec6ee;
}

.cards.layout-card .card .status {
  margin-top: 2px;
  font-size: 10px;
}

.cards.layout-card .card-panel.middle,
.cards.layout-card .card-panel.right,
.cards.layout-card .latency-legend {
  display: none;
}

.cards.layout-card .card-panels {
  display: block;
}

.cards.layout-card .card-panel.left {
  border: 0;
  background: transparent;
  padding: 0;
  display: block;
}

.trend-title {
  margin-top: 8px;
  margin-bottom: 6px;
  font-size: 12px;
}

.cards.layout-big .trend-title {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 600;
  color: #b9dcff;
}

.trend {
  height: 64px;
}

.cards.layout-big .trend {
  height: 100%;
  border-color: rgba(99, 159, 233, 0.42);
  box-shadow: inset 0 0 0 1px rgba(95, 157, 231, 0.12), 0 0 20px rgba(39, 121, 216, 0.18);
}

.cards.layout-big .trend-seg.availability {
  stroke: #a989ff;
  filter: drop-shadow(0 0 4px rgba(169, 137, 255, 0.58));
}

.cards.layout-big .trend-point.availability {
  fill: rgba(212, 190, 255, 0.9);
  opacity: 0.85;
}

.trend-label-right {
  fill: rgba(190, 172, 255, 0.95);
}

.cards.layout-big .card .card-actions .card-btn {
  border-radius: 14px;
  padding: 5px 11px;
  font-size: 12px;
  border-color: rgba(110, 172, 249, 0.58);
  background: linear-gradient(180deg, rgba(25, 77, 148, 0.86), rgba(17, 53, 106, 0.9));
  color: #dff0ff;
}

.cards.layout-card .trend-wrap {
  display: none;
}

@media (max-width: 1360px) {
  .cards.layout-big .card {
    height: 500px;
  }
}

@media (max-width: 900px) {
  .cards.layout-big {
    grid-auto-rows: 440px;
  }

  .cards.layout-big .card {
    height: 440px;
    padding: 12px;
    gap: 8px;
  }

  .cards.layout-big .card-panels {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }

  .cards.layout-big .card-panel.left,
  .cards.layout-big .card-panel.middle,
  .cards.layout-big .card-panel.right {
    padding: 8px;
  }

  .cards.layout-big .card-panel.right {
    display: block;
  }

  .cards.layout-big .card .location {
    font-size: 20px;
  }

  .cards.layout-big .card .ip {
    font-size: 14px;
  }

  .cards.layout-big .region-matrix {
    grid-template-columns: 1fr;
  }

  .cards.layout-big .region-matrix-name,
  .cards.layout-big .region-matrix-value {
    font-size: 12px;
  }

  .cards.layout-big .card .latency {
    font-size: clamp(24px, 4.2vw, 38px);
  }

  .cards.layout-big .trend-title {
    font-size: 13px;
  }

  .cards.layout-big .trend {
    height: 100%;
  }
}

body.theme-day .regions-status,
body.theme-day .region-bar-name,
body.theme-day .region-bar-value {
  color: #0b69d3;
}

body.theme-day .header,
body.theme-day .timeout-banner,
body.theme-day .hidden-banner {
  background: linear-gradient(180deg, rgba(12, 27, 52, 0.85), rgba(8, 16, 32, 0.9));
  border-color: rgba(89, 145, 225, 0.35);
}

body.theme-day .meta,
body.theme-day .legend,
body.theme-day .timeout-title,
body.theme-day #updatedAt,
body.theme-day #refreshState,
body.theme-day #userBadge {
  color: #95bde8;
}

body.theme-day .card,
body.theme-day .cards.layout-big .card-panel {
  color: #d8ecff;
}

body.theme-day .control-btn {
  color: #d9ebff;
  background: rgba(17, 58, 121, 0.66);
}

.card.low .latency {
  color: #3cf2bc;
}

.card.mid .latency {
  color: #ffd56a;
}

.card.high .latency {
  color: #ff7f7f;
}

.card.offline .latency {
  color: #556175;
}

.card .latency.is-low {
  color: #3cf2bc;
}

.card .latency.is-mid {
  color: #ffd56a;
}

.card .latency.is-high {
  color: #ff7f7f;
}

.card .latency.is-offline {
  color: #556175;
}

.cards.layout-big .card .latency.is-low {
  color: #3cf2bc;
}

.cards.layout-big .card .latency.is-mid {
  color: #ffd56a;
}

.cards.layout-big .card .latency.is-high {
  color: #ff7f7f;
}

.cards.layout-big .card .latency.is-offline {
  color: #556175;
}

.cards.layout-card .card .latency.is-low {
  color: #3cf2bc;
}

.cards.layout-card .card .latency.is-mid {
  color: #ffd56a;
}

.cards.layout-card .card .latency.is-high {
  color: #ff7f7f;
}

.cards.layout-card .card .latency.is-offline {
  color: #556175;
}

body.theme-day .cards.layout-card .card .latency.is-low {
  color: #3cf2bc;
}

body.theme-day .cards.layout-card .card .latency.is-mid {
  color: #ffd56a;
}

body.theme-day .cards.layout-card .card .latency.is-high {
  color: #ff7f7f;
}

body.theme-day .cards.layout-card .card .latency.is-offline {
  color: #556175;
}

.card .status.is-low {
  color: #3cf2bc;
}

.card .status.is-mid {
  color: #ffd56a;
}

.card .status.is-high {
  color: #ff7f7f;
}

.card .status.is-offline {
  color: #556175;
}

.card .status.is-pending {
  color: #9ec6ee;
}

.cards.layout-big .card .status.is-low {
  color: #3cf2bc;
}

.cards.layout-big .card .status.is-mid {
  color: #ffd56a;
}

.cards.layout-big .card .status.is-high {
  color: #ff7f7f;
}

.cards.layout-big .card .status.is-offline {
  color: #556175;
}

.cards.layout-big .card .status.is-pending {
  color: #9ec6ee;
}
