/* VibeMonitor layout and controls; the active appearance is set in themes.css. */

.powered-by-link { color: var(--primary); text-decoration: none; }
.powered-by-link:hover,
.powered-by-link:focus-visible { text-decoration: underline; }

/* The site title is the explicit entry point to the management panel. */
.site-menu-trigger { display: block; border-radius: 8px; text-decoration: none; }
.site-menu-trigger:hover .brand-title { color: var(--primary); }
.site-menu-trigger:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Historical rankings share the active theme's colors. The page lives in the
   management area, so only the cards and the toolbar need styling here. */
.rankings-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.rankings-period { color: var(--muted-foreground); font-size: 12px; margin: 12px 0 18px; }
.rankings-status { color: var(--muted-foreground); font-size: 13px; }
.rankings-status:empty { display: none; }
.rankings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ranking-card { min-width: 0; padding: 18px; border: 1px solid var(--border); background: var(--card-data-bg); border-radius: 12px; }
.ranking-card:last-child { grid-column: 1 / -1; }
.ranking-card-heading { display: flex; flex-direction: column; gap: 5px; margin-bottom: 18px; }
.ranking-card-heading h4 { margin: 0; font-size: 14px; font-weight: 600; }
.ranking-card-heading span { font-size: 11px; color: var(--muted-foreground); }
.ranking-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.ranking-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ranking-place { width: 23px; height: 23px; display: grid; place-items: center; flex: none; background: var(--muted); color: var(--muted-foreground); border-radius: 7px; font-size: 12px; font-weight: 600; }
.ranking-row:first-child .ranking-place { background: var(--primary); color: var(--primary-text); }
.ranking-detail { flex: 1; min-width: 0; }
.ranking-line { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 12px; }
.ranking-node { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranking-line strong { flex: none; font-weight: 600; font-variant-numeric: tabular-nums; }
.ranking-track { height: 3px; margin-top: 8px; background: var(--muted); border-radius: 3px; overflow: hidden; }
.ranking-track i { display: block; height: 100%; border-radius: inherit; background: var(--primary); opacity: .65; }
.ranking-empty { color: var(--muted-foreground); font-size: 12px; padding: 24px 0; margin: 0; }
.rankings-footnote { margin: 18px 0 0; font-size: 11px; line-height: 1.8; color: var(--muted-foreground); }
@media (min-width: 700px) {
  .ranking-card:last-child .ranking-rows { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .ranking-card:last-child .ranking-line { flex-direction: column; gap: 5px; }
  .ranking-card:last-child .ranking-node { max-width: 100%; }
}
@media (max-width: 600px) {
  .rankings-grid { grid-template-columns: minmax(0, 1fr); }
  .ranking-card { padding: 16px; }
}
/* Sort Nodes Modal */
.sort-nodes-list { display: flex; flex-direction: column; gap: 4px; max-height: 60vh; overflow-y: auto; padding: 2px; }
.sort-node-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: var(--card-bg); border: 1.5px solid var(--border); border-radius: 8px;
  cursor: grab; user-select: none; transition: box-shadow 0.18s, border-color 0.18s, transform 0.18s, opacity 0.18s;
}
.sort-node-item:hover { border-color: var(--primary); box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.sort-node-item.dragging { opacity: 0.45; transform: scale(0.97); box-shadow: 0 4px 16px rgba(0,0,0,0.12); border-color: var(--primary); }
.sort-node-item.drag-over { border-color: var(--primary); box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 25%, transparent); }
.sort-node-grip { color: var(--muted-foreground); font-size: 16px; line-height: 1; flex-shrink: 0; cursor: grab; opacity: 0.5; }
.sort-node-grip:hover { opacity: 1; }
.sort-node-name { flex: 1; font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sort-node-order {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 28px; height: 24px; padding: 0 6px;
  background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary);
  border-radius: 6px; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.sort-node-actions { display: flex; gap: 2px; flex-shrink: 0; }
.sort-node-actions button {
  width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 6px; background: transparent;
  color: var(--muted-foreground); cursor: pointer; font-size: 13px; transition: all 0.15s;
  padding: 0;
}
.sort-node-actions button:hover:not(:disabled) { background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary); border-color: var(--primary); }
.sort-node-actions button:disabled { opacity: 0.3; cursor: not-allowed; }

:root {
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --overlay-bg: rgba(0, 0, 0, 0.7);
  /* Mirrors the offline band drawn by ping-history.js. */
  --chart-offline: #ef4444;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* One keyboard-focus ring for every theme; components may still refine it. */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--background);
  color: var(--foreground);
  min-height: 100vh;
  line-height: 1.5;
  transition: background-color 0.2s ease, color 0.2s ease;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Form controls keep the UA's sizes but should still use the page typeface. */
button, input, select, textarea { font-family: inherit; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 24px 60px;
}

/* Solid Clean Navigation Bar */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px 24px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: var(--card-data-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.brand-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.brand-icon img {
  width: 28px;
  height: 28px;
  max-width: 28px;
  max-height: 28px;
  object-fit: contain;
  border-radius: 6px;
  display: block;
}

.logo-upload-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
}

.logo-preview-box {
  flex-shrink: 0;
}

.logo-upload-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.logo-upload-hint {
  font-size: 11px;
  color: var(--muted-foreground);
  margin-top: 6px;
}

.logo-status-text {
  font-size: 12px;
  color: var(--success);
  font-weight: 500;
}

.brand-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--foreground);
}

/* Solid Stats Overview Bar removed: the overview now renders as .hex-stat cells. */

/* Controls & Filter Bar */
.controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 22px;
}


.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--control-bg);
  color: var(--foreground);
  transition: all 0.15s ease;
  user-select: none;
}

/* Shared so every theme package dims busy or unavailable actions. */
.btn:disabled,
.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn:hover {
  background: var(--card-hover);
  border-color: var(--border-focus);
}

.btn.active, .btn-primary {
  background: var(--primary);
  color: var(--primary-text);
  font-weight: 700;
  border-color: var(--primary);
}

.btn-primary:hover {
  filter: brightness(1.1);
}

.btn-danger {
  background: color-mix(in srgb, var(--destructive) 12%, transparent);
  color: var(--destructive);
  border-color: color-mix(in srgb, var(--destructive) 28%, transparent);
}

.btn-danger:hover {
  background: var(--destructive);
  color: #fff;
}

/* Node Grid - Solid Modern Cards */
.ss-table-head { display: none; }
.node-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.node-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.node-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-focus);
  box-shadow: var(--shadow-md);
}

.node-card.offline {
  opacity: 0.65;
}

/* Metric Bars */
.metric-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

.metric-name {
  color: var(--muted-foreground);
  font-weight: 500;
}

.progress-track {
  width: 100%;
  height: 6px;
  background: var(--card-data-bg);
  border-radius: 9999px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.progress-bar {
  height: 100%;
  border-radius: 9999px;
  background: var(--primary);
  transition: width 0.3s ease, background-color 0.2s ease;
}

.progress-bar.high {
  background: var(--warning);
}

.progress-bar.critical {
  background: var(--destructive);
}

/* Probe pills were replaced by the .ping-sample-row bars in every theme. */

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--overlay-bg);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
  pointer-events: auto;
  overscroll-behavior: contain;
}

/* Keep the page behind a dialog from scrolling on touch devices. */
body:has(.modal-overlay.active) { overflow: hidden; }

/* Shared footer row for dialog forms. */
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}
.modal-actions.is-divided {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
/* A dialog body that just stacks its sections. */
.modal-body { padding-top: 10px; }
.form-note { margin-top: 8px; font-size: 13px; }
.form-error { color: var(--destructive); font-size: 13px; }
/* The hidden attribute must win over any theme rule that sets a display value. */
[hidden] { display: none !important; }

.modal {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  width: 90%;
  max-width: 500px;
  padding: 26px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 18px;
  transform: translateY(12px);
  transition: transform 0.2s ease;
  max-height: 90vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
}

.modal-overlay.active .modal {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Keep the title and the close button reachable while a tall dialog scrolls. */
  position: sticky;
  top: 0;
  /* Above scrolling dialog content (chart tooltips sit at 10), below the overlay. */
  z-index: 20;
  /* Glass themes keep the card translucent, so frost what scrolls underneath. */
  background: var(--card-bg);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--foreground);
}

.modal-close {
  background: none;
  border: none;
  color: var(--muted-foreground);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
  padding: 0;
  flex-shrink: 0;
}

.modal-close:hover {
  background: var(--control-bg);
  color: var(--foreground);
}

.modal-close:active {
  transform: scale(0.92);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted-foreground);
}

.form-input {
  background: var(--card-data-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--foreground);
  padding: 10px 14px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s ease;
  resize: vertical;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 32%, transparent);
}

.telegram-template-section {
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.telegram-template-section p,
.telegram-template-section small {
  color: var(--muted-foreground);
  font-size: 12px;
}

.telegram-template-fields {
  display: grid;
  gap: 14px;
  margin: 14px 0;
}

.telegram-template-fields textarea {
  width: 100%;
  min-height: 68px;
  box-sizing: border-box;
  resize: vertical;
  font: inherit;
}

.code-box {
  background: #0b1524;
  color: #e6edf7;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .14);
  word-break: break-all;
  user-select: all;
}

/* Ping Latency Fluctuation Modal */
.modal-lg {
  max-width: 760px;
}

.time-range-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  background: var(--control-bg);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.range-btn {
  background: transparent;
  border: none;
  color: var(--muted-foreground);
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.range-btn:hover {
  color: var(--foreground);
}
.range-btn.active {
  background: var(--primary);
  color: #ffffff;
}

.target-pill-btn {
  background: var(--control-bg);
  border: 1px solid var(--border);
  color: var(--foreground);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.target-pill-btn:hover {
  border-color: var(--primary);
}
.target-pill-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.ping-stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
@media (max-width: 600px) {
  .ping-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.ping-stat-card {
  background: var(--control-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  text-align: center;
}
.ping-stat-label {
  font-size: 11px;
  color: var(--muted-foreground);
  margin-bottom: 4px;
}
.ping-stat-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--foreground);
  font-variant-numeric: tabular-nums;
}

.ping-chart-container {
  position: relative;
  width: 100%;
  height: 240px;
  background: var(--control-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

#pingChartSvg, #resourceChartSvg {
  width: 100%;
  height: 100%;
  display: block;
}

.resource-modal-subtitle { font-size: 12px; color: var(--muted-foreground); margin-top: 2px; }
/* Ping history dialog: toolbar, targets, chart caption and legend. */
.ping-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; flex-wrap: wrap; gap: 10px; }
.ping-targets { display: flex; gap: 6px; flex-wrap: wrap; }
.chart-caption {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  font-size: 11px; color: var(--muted-foreground); margin-top: 8px;
}
.chart-caption-meta { display: flex; align-items: center; gap: 8px; }
.legend-item { display: inline-flex; align-items: center; gap: 4px; }
.legend-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
/* Colours mirror the palettes drawn by ping-history.js / resource-history.js. */
.legend-swatch-offline { background: color-mix(in srgb, var(--chart-offline) 35%, transparent); border: 1px solid var(--chart-offline); }
.legend-label-offline { color: var(--destructive); font-weight: 500; }
.legend-online { color: #238364; }
.legend-offline { color: #dc4444; }
.legend-partial { color: #d49120; }
.legend-incomplete { color: #8792a2; }
.legend-pending { color: #b7bec8; }

.resource-range-row { display: flex; justify-content: flex-end; margin-bottom: 14px; }
.resource-stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 600px) { .resource-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.chart-tooltip {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.9);
  color: #f8fafc;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  z-index: 10;
}

@media (max-width: 768px) {
  .container {
    padding: 16px 16px 40px;
  }
  .navbar {
    flex-direction: column;
    align-items: stretch;
    padding: 16px 18px;
  }
  .controls-bar {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Compact node overview with independent targets and billing. */
.node-card { gap: 12px; padding: 16px; }
/* The 24-sample history stays a compact sparkline: stretching it across the
   whole card turned each sample into a wide block, so the two panels share a
   fixed, readable width instead. */
.ping-panels { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; max-width:540px; }
.ping-panel { min-width:0; padding:12px; background:var(--card-data-bg); border-radius:14px; }
.panel-label, .ping-empty { color:var(--muted-foreground); font-size:13px; }
.ping-sample-row { display:block; width:100%; background:transparent; color:var(--foreground); border:0; padding:10px 0 0; cursor:pointer; text-align:left; }
.ping-row-heading { display:flex; justify-content:space-between; gap:4px; font-size:12px; margin-bottom:7px; }
.ping-row-heading > span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ping-row-heading strong { white-space:nowrap; }
.target-dot { display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:5px; }
.sample-bars { display:flex; gap:2px; }
.sample-bar { flex:1; height:13px; border-radius:2px; background:var(--border); }
.sample-bar.fast { background:#a3e635; } .sample-bar.received { background:#35a680; }
.sample-bar.slow { background:#fbbf24; } .sample-bar.lost { background:#fb7185; }
.sample-bar.empty { opacity:.35; }
@media (max-width:400px) { .ping-panels { grid-template-columns:1fr; } }
/* The CPU / memory / disk / traffic meters follow the ping strip: capped to the
   same width so each one reads as a gauge instead of a full-width bar. */
@media (min-width:721px) { .hex-resources { max-width:540px; } }

/* Password input with toggle button */
.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.password-input-wrap .form-input {
  width: 100%;
  padding-right: 42px;
}
.btn-toggle-pwd {
  position: absolute;
  right: 8px;
  background: transparent;
  border: none;
  color: var(--muted-foreground);
  cursor: pointer;
  padding: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
  border-radius: 6px;
  transition: color 0.15s ease, background-color 0.15s ease;
  user-select: none;
}
.btn-toggle-pwd:hover {
  color: var(--foreground);
  background-color: var(--card-data-bg);
}

/* Shared placeholder for the loading and no-node states of #nodeGrid. */
.empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 56px 20px;
  text-align: center;
  color: var(--muted-foreground);
  font-size: 13px;
  line-height: 1.7;
}
.empty-state strong {
  color: var(--foreground);
  font-size: 14px;
  font-weight: 600;
}

/* Secondary line under a modal title (probe name, metric scope, …). */
.modal-subtitle {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted-foreground);
}

/* Visually hidden but still keyboard reachable (e.g. the theme file picker). */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
#themeUploadLabel { position: relative; }
#themeUploadLabel:focus-within {
  border-color: var(--primary);
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}


.theme-list { display: grid; gap: 10px; margin: 18px 0; max-height: 45vh; overflow: auto; }
.theme-row { display: flex; align-items: center; gap: 12px; border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.theme-option { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; cursor: pointer; }
.theme-option span { min-width: 0; overflow-wrap: anywhere; }
.theme-option small { display: block; margin-top: 4px; color: var(--muted-foreground); }
.theme-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.theme-actions a { text-decoration: none; }
#themeStatus { font-size: 13px; overflow-wrap: anywhere; }

/* Phones: dialogs keep a breathing edge instead of nearly touching the bezel. */
@media (max-width: 480px) {
  .modal-overlay { padding: 12px; }
  .modal {
    width: 100%;
    padding: 20px 18px;
    gap: 14px;
    max-height: 92vh;
  }
  .modal-title { font-size: 16px; }
  .form-group { gap: 5px; }
  /* 16px keeps iOS Safari from zooming the page when a field gains focus. */
  .form-input { font-size: 16px; }
}

/* Shared by every theme: distinguish an old snapshot from current status. */
.connection-status { margin: 8px auto; padding: 8px 14px; max-width: 1440px; font-size: 12px; color: var(--muted-foreground); }
.connection-status[data-state="stale"] {
  color: var(--warning);
  background: color-mix(in srgb, var(--warning) 14%, var(--card-bg));
  border: 1px solid color-mix(in srgb, var(--warning) 50%, var(--card-bg));
  border-radius: 6px;
}
#nodeGrid[data-stale="true"] .node-card { opacity: .8; }

