.btn:disabled { opacity: .55; cursor: wait; }

/* Soft glass surfaces over an ambient color field. */
:root {
  color-scheme: light;
  --background: #d8dcea;
  --foreground: #172235;
  --card-bg: rgba(250, 252, 255, .72);
  --card-hover: rgba(255, 255, 255, .88);
  --card-data-bg: rgba(240, 246, 255, .48);
  --primary: #356dcc;
  --primary-light: rgba(232, 240, 255, .72);
  --primary-text: #fff;
  --muted: rgba(239, 245, 255, .54);
  --muted-foreground: #536276;
  --border: rgba(255, 255, 255, .6);
  --border-focus: #356dcc;
  --success: #238364;
  --warning: #986700;
  --destructive: #c23b50;
  --control-bg: rgba(255, 255, 255, .8);
  --shadow-sm: 0 10px 30px rgba(42, 55, 99, .12);
  --shadow-md: 0 20px 48px rgba(42, 55, 99, .18);
}
.container { position: relative; z-index: 1; max-width: 1480px; padding: 24px 36px 96px; }
body { background: var(--background); }
.powered-by-pill {
  position: fixed;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: calc(100vw - 28px);
  padding: 9px 18px;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 999px;
  background: rgba(255, 255, 255, .68);
  box-shadow: 0 12px 32px rgba(42, 55, 99, .2), inset 0 1px 0 rgba(255, 255, 255, .75);
  backdrop-filter: blur(20px) saturate(145%);
  -webkit-backdrop-filter: blur(20px) saturate(145%);
  color: var(--muted-foreground);
  font-size: 12px;
  white-space: nowrap;
}
body::before {
  content: '';
  position: fixed;
  inset: -8%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 48% 60% at 8% 18%, rgba(255, 170, 139, .9), transparent 78%),
    radial-gradient(ellipse 55% 72% at 84% 8%, rgba(103, 171, 228, .84), transparent 76%),
    radial-gradient(ellipse 45% 54% at 55% 46%, rgba(151, 147, 209, .52), transparent 78%),
    radial-gradient(ellipse 52% 68% at 88% 94%, rgba(250, 154, 94, .8), transparent 78%),
    linear-gradient(135deg, #efc8c4 0%, #c7d4e9 48%, #edba9f 100%);
  filter: blur(28px) saturate(1.14);
}
.navbar {
  position: relative;
  z-index: 40;
  padding: 8px 0;
  margin-bottom: 26px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.brand-title { font-size: 19px; }
.brand-badge { font-size: 10px; font-weight: 500; letter-spacing: 1px; }
.brand-icon { background: rgba(255, 255, 255, .7); border-radius: 10px; }
.btn { border-radius: 8px; font-weight: 500; }
.hex-section-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.hex-section-label { font-size: 11px; font-weight: 400; color: var(--success); }
.hex-section-label::before, .hex-live-dot { content: ''; display: inline-block; width: 6px; height: 6px; background: var(--success); border-radius: 50%; margin-right: 6px; }
.hex-stats { display: grid; grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr); gap: 18px; margin-bottom: 24px; align-items: center; }
.hex-stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); min-width: 0; min-height: 326px; overflow: hidden; background: rgba(255, 255, 255, .61); border: 1px solid rgba(255, 255, 255, .68); border-radius: 20px; box-shadow: 0 22px 55px rgba(42, 55, 99, .16), inset 0 1px 0 rgba(255, 255, 255, .72); backdrop-filter: blur(22px) saturate(145%); -webkit-backdrop-filter: blur(22px) saturate(145%); }
.hex-stat { padding: 20px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hex-stat:nth-child(even) { border-left: 1px solid rgba(255, 255, 255, .52); }
.hex-stat:nth-child(n+3) { border-top: 1px solid rgba(255, 255, 255, .52); }
.hex-stat > span { font-size: 12px; color: var(--muted-foreground); }
.hex-stat > strong { font-size: 25px; letter-spacing: -.8px; font-variant-numeric: tabular-nums; }
.hex-stat em { font-style: normal; font-size: 18px; color: var(--primary); font-weight: 500; }
.hex-stat small { font-size: 11px; color: var(--muted-foreground); }
.hex-stat-network { display: flex; gap: 12px; flex-wrap: wrap; }
.hex-stat-network span:first-child { color: var(--primary); }
.hex-stat-network span:last-child { color: var(--success); }
.hex-globe-panel { position: relative; min-width: 0; height: 460px; background: radial-gradient(circle at 54% 48%, rgba(255, 255, 255, .2), transparent 68%); }
.hex-globe-canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.hex-globe-canvas:active { cursor: grabbing; }
.controls-bar { justify-content: flex-start; gap: 12px; margin-bottom: 18px; }
.node-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.hex-card { padding: 20px; border-radius: 14px; gap: 22px; min-width: 0; }
.hex-card:hover { transform: translateY(-4px); border-color: rgba(255, 255, 255, .88); }
.node-card {
  background: rgba(250, 252, 255, .7);
  border-color: rgba(255, 255, 255, .72);
  box-shadow: 0 16px 38px rgba(42, 55, 99, .14), inset 0 1px 0 rgba(255, 255, 255, .74);
  content-visibility: auto;
  contain-intrinsic-size: auto 600px;
}
.node-card:hover { background: rgba(255, 255, 255, .82); box-shadow: 0 22px 48px rgba(42, 55, 99, .18); }
.hex-card.offline { opacity: 1; }
.hex-node-header { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.hex-node-identity { min-width: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 8px; align-items: center; }
.hex-node-identity h2 { font-size: 15px; font-weight: 650; overflow-wrap: anywhere; }
.hex-region { font-size: 11px; color: var(--muted-foreground); }
.hex-system { grid-column: 1 / -1; color: var(--muted-foreground); font-size: 11px; overflow-wrap: anywhere; }
.hex-status { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; font-size: 10px; color: var(--muted-foreground); background: var(--card-data-bg); border-radius: 5px; padding: 3px 6px; }
.hex-status i { width: 5px; height: 5px; background: currentColor; border-radius: 50%; }
.hex-status.is-online { color: var(--success); background: color-mix(in srgb, var(--success) 9%, transparent); }
.hex-resources { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.hex-metric { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hex-metric .metric-meta { gap: 6px; align-items: center; }
.hex-metric .metric-meta strong { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.hex-metric small { font-size: 10px; color: var(--muted-foreground); overflow-wrap: anywhere; }
.progress-track { height: 3px; border: 0; border-radius: 1px; }
.progress-bar { border-radius: 1px; }
.hex-network { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding-top: 2px; }
.hex-network > div { display: flex; flex-direction: column; gap: 5px; text-align: center; }
.hex-network span { font-size: 11px; color: var(--primary); }
.hex-network > div:last-child span { color: var(--success); }
.hex-network strong { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.hex-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.hex-facts > div { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0; text-align: center; }
.hex-facts > div + div { border-left: 1px solid var(--border); }
.hex-facts span, .hex-billing span { font-size: 11px; color: var(--muted-foreground); }
.hex-facts strong { font-size: 11px; font-weight: 500; overflow-wrap: anywhere; }
.hex-probes { border-top: 1px solid var(--border); padding-top: 14px; }
.ping-panel { background: transparent; padding: 0; border-radius: 0; }
.panel-label { font-size: 11px; }
.ping-row-heading { font-size: 10px; }
.target-dot { width: 5px; height: 5px; }
.sample-bar { height: 8px; border-radius: 1px; }
.sample-bar.fast { background: var(--primary); opacity: .65; }
.sample-bar.received { background: var(--success); opacity: .65; }
.ping-empty { font-size: 11px; padding: 6px 0; }
.hex-billing { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.hex-billing > div { display: flex; flex-direction: column; gap: 4px; }
.hex-billing strong { font-size: 12px; font-weight: 500; }
.hex-billing small { font-size: 10px; color: var(--muted-foreground); }
.hex-card-footer { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding-top: 14px; margin-top: auto; border-top: 1px solid var(--border); color: var(--muted-foreground); font-size: 11px; overflow-wrap: anywhere; }
.hex-card-footer strong { font-weight: 500; }
.hex-card.offline .hex-network strong { color: var(--muted-foreground); }
.modal { border-radius: 14px; }
@media (max-width: 1120px) {
  .node-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .container { padding-left: 24px; padding-right: 24px; }
  .hex-stat { padding: 16px; }
  .hex-stat > strong { font-size: 22px; }
}
@media (max-width: 900px) {
  .hex-stats { grid-template-columns: minmax(0, 1fr); align-items: stretch; }
  .hex-globe-panel { height: 380px; }
}
@media (max-width: 720px) {
  .container { padding: 14px 14px 92px; }
  .navbar { gap: 12px; padding: 6px 0; margin-bottom: 20px; }
  .hex-stats { margin-bottom: 16px; }
  .hex-stats-grid { min-height: 260px; }
  .hex-stat { padding: 14px; }
  .hex-stat > strong { font-size: 20px; }
  .hex-stat-network { gap: 4px; }
  .hex-globe-panel { height: 340px; }
  .node-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .hex-card { padding: 18px; }
  .ping-panels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::after { transition: none !important; animation: none !important; }
}
