/* Native adaptation inspired by tom2almighty/monitor-theme-design (MIT).
 * See third-party-notices.txt. Uses VibeMonitor's existing controls and data.
 */
:root {
  color-scheme: light;
  --background: #eeece8;
  --foreground: #36352f;
  --card-bg: #fdfcf9;
  --card-hover: #fffefa;
  --card-data-bg: #f4f2ed;
  --primary: #b65b3c;
  --primary-light: #f5e8df;
  --primary-text: #fff;
  --muted: #f1eee7;
  --muted-foreground: #706f66;
  --border: #e1dfd8;
  --border-focus: #b65b3c;
  --success: #059669;
  --label-green: #0a7252;
  --label-blue: #245d9c;
  --label-orange: #a04b13;
  --warning: #b7791f;
  --destructive: #c2413c;
  --control-bg: #fffefa;
  --shadow-sm: 0 1px 3px rgba(54, 53, 47, .05);
  --shadow-md: 0 3px 10px rgba(54, 53, 47, .06);
  --shadow-lg: 0 12px 36px rgba(54, 53, 47, .12);
}
body { background: var(--background); }
body::before {
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23grain)' opacity='.13'/%3E%3C/svg%3E") repeat;
  filter: none;
  opacity: .4;
}
::selection { background: var(--primary-light); color: var(--foreground); }
.container {
  /* Keep the dashboard and its six summary cells compact on wide screens. */
  max-width: 960px;
  width: calc(100% - 48px);
  margin: 20px auto 72px;
  padding: 16px 20px 20px;
  background: rgba(253, 252, 249, .94);
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 18px;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, .35), var(--shadow-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.navbar {
  margin-bottom: 18px;
  padding: 0 0 14px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
}
.brand-title { color: var(--foreground); font-size: 18px; font-weight: 650; }
.hex-section-label { font-size: 13px; font-weight: 650; color: var(--foreground); }
.hex-section-label::before { background: var(--success); }
.hex-stats { display: block; margin-bottom: 14px; }
.hex-section-heading { margin-bottom: 12px; }
.hex-globe-panel { display: none; }
/* 1px gaps over a bordered grid draw the dividers at any column count. */
.hex-stats-grid {
  --hex-stat-columns: 2;
  grid-template-columns: repeat(var(--hex-stat-columns), minmax(0, 1fr));
  grid-template-rows: auto;
  gap: 1px;
  min-height: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--border);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.hex-stat:nth-child(n) { padding: 8px 10px; gap: 2px; align-items: center; justify-content: center; text-align: center; border: 0; background: var(--card-data-bg); }
.hex-stat dt { font-size: 11px; }
.hex-stat dd { align-items: center; }
.hex-stat dd strong { font-size: 18px; letter-spacing: -.4px; }
.hex-stat dd.hex-stat-speeds { justify-content: center; gap: 2px 8px; }
.hex-stat dd.hex-stat-speeds strong { font-size: 13px; }
.hex-stat small { font-size: 10px; }
.controls-bar { margin-bottom: 14px; }
.node-grid { grid-template-columns: minmax(0, 1fr); gap: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.node-card, .node-card:hover { background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.hex-card {
  display: grid;
  /* Let the resource meters fill their column instead of leaving a blank band
     between the online dot and CPU. */
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 5.1fr);
  grid-template-areas:
    "identity identity identity resources"
    "network network network resources"
    "facts facts facts probes"
    "billing billing price probes";
  align-items: start;
  gap: 3px 1em;
  font-size: 12px;
  padding: 6px 0;
}
.hex-card + .hex-card { border-top: 1px solid var(--border); }
.hex-card:hover { transform: none; background: var(--card-data-bg); }
.hex-node-header { grid-area: identity; gap: 6px; }
.hex-node-identity h2 { font-size: 14px; font-weight: 650; }
.hex-node-identity { row-gap: 2px; }
/* Keep system, ASN, service regions and resource captions at one text level. */
.hex-system,
.node-network-identity,
body .hex-card .hex-metric .metric-name {
  color: var(--muted-foreground);
  font-family: inherit;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.5;
}
/* Clickable metrics keep the caption tone but turn bold, use the body ink and
   step up to the value size, so the chart behind each one is easy to find. */
body .hex-card .hex-metric.metric-button .metric-name { color: var(--foreground); font-size: 12px; font-weight: 650; }
/* Higher specificity than the flat caption rule above, which would otherwise
   keep the hover and keyboard focus colour muted. */
body .hex-card .metric-button:hover .metric-name,
body .hex-card .metric-button:focus-visible .metric-name { color: var(--primary); }
.node-network-identity { gap: 2px 10px; font-size: 10px; line-height: 1.4; }
.node-google-region { gap: 5px; }
.node-google-region img { flex-basis: 1em; width: 1em; height: 1em; }
/* The status chip is a dot in this theme: the halo shrinks with the card. */
.hex-status { width: 13px; height: 13px; }
.hex-status.is-online { background: color-mix(in srgb, var(--success) 12%, transparent); }
.hex-resources { grid-area: resources; gap: 4px 10px; }
.hex-metric { gap: 2px; }
.hex-metric .metric-meta strong { font-size: 12px; font-weight: 500; }
.hex-metric .metric-name { font-size: 11px; }
.progress-track { height: 4px; border-radius: 99px; background: #e6e5e0; }
.progress-bar { border-radius: 99px; background: var(--success); }
.progress-bar.high { background: var(--warning); }
.progress-bar.critical { background: var(--destructive); }
.hex-network { grid-area: network; padding-top: 0; gap: 8px 4px; }
.hex-network > div, .hex-network > button { align-items: flex-start; gap: 1px; text-align: left; line-height: 1.4; }
.hex-network strong { font-size: 12px; }
.hex-network span { font-size: 10px; }
.hex-facts { grid-area: facts; column-gap: 4px; }
.hex-facts > div { align-items: flex-start; gap: 1px; text-align: left; line-height: 1.4; }
.hex-facts span, .hex-billing span { font-size: 10px; }
.hex-facts > div + div { border: 0; }
.hex-facts strong { font-size: 10px; }
.hex-probes { grid-area: probes; padding: 0; border: 0; }
.hex-billing { grid-area: billing; padding: 0; gap: 8px 4px; border: 0; background: transparent; border-radius: 0; }
.hex-billing > div { gap: 1px; line-height: 1.4; }
.hex-billing strong { font-size: 11px; }
.hex-card-footer { grid-area: price; min-width: 0; flex-direction: column; align-items: flex-start; gap: 1px; margin-top: 0; border: 0; padding: 0; font-size: 10px; line-height: 1.4; }
.hex-card-footer strong { color: var(--foreground); font-size: 11px; }
.hex-probes .ping-sample-row { padding-top: 3px; }
.hex-probes .ping-row-heading { margin-bottom: 3px; }
/* The offline reminder reads as a small floating pill on the design sheet. */
.hex-probes .ping-offline-notice { margin-bottom: 8px; padding: 3px 10px; background: var(--card-bg); box-shadow: var(--shadow-sm); font-size: 10px; }
.sample-bar { height: 6px; border-radius: 2px; }
.sample-bar.fast { background: var(--success); opacity: .8; }
.btn { border-radius: 7px; background: var(--control-bg); box-shadow: var(--shadow-sm); }
.btn:hover { background: var(--muted); }
.btn-primary, .btn.active { background: var(--primary); color: var(--primary-text); }
.btn-primary:hover { background: color-mix(in srgb, var(--primary) 86%, #000); }
.btn-danger { background: var(--destructive); color: #fff; }
.btn-danger:hover { background: color-mix(in srgb, var(--destructive) 86%, #000); }
.modal { background: rgba(253, 252, 249, .98); border: 1px solid var(--border); box-shadow: var(--shadow-lg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.modal { border-radius: 12px; }
.modal-title { font-size: 17px; }
.modal-overlay { background: rgba(54, 53, 47, .28); }
.form-input, .form-select, .form-textarea { background: var(--control-bg); border-color: var(--border); border-radius: 7px; }
.theme-row { background: var(--card-bg); border-radius: 8px; }
/* Retain shared fixed positioning, safe-area inset and horizontal centering. */
.powered-by-pill { background: rgba(253, 252, 249, .94); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
/* Four metrics share one strip when the compact sheet reaches full width. */
@media (min-width: 1008px) {
  .hex-stats-grid { --hex-stat-columns: 4; }
}
.hex-resources, .hex-probes { width: 100%; min-width: 0; }
@media (max-width: 720px) {
  .container { width: calc(100% - 24px); margin-top: 18px; padding: 18px 14px; border-radius: 12px; }
  .hex-stats-grid { --hex-stat-columns: 2; }
  .hex-stat:nth-child(n) { padding: 8px 10px; }
  .hex-card {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-areas:
      "identity identity identity"
      "network network network"
      "facts facts facts"
      "billing billing price"
      "resources resources resources"
      "probes probes probes";
    padding: 10px 0;
    gap: 5px 6px;
  }
  .hex-facts strong { font-size: 11px; }
}
@media (max-width: 360px) {
  .hex-stats-grid { --hex-stat-columns: 1; }
}
