/* ===========================================================================
   Nezha monitoring theme — Windows 2000
   ---------------------------------------------------------------------------
   One stylesheet, four skins, two colour schemes.  Every surface is built out
   of the same three things the classic Win32 widgets were: a two-tone bevel
   (outer 1px highlight/shadow, inner 1px light/dark), a dither pattern where
   the OS used 50% checkerboards, and -- for meters -- a repeating gradient
   whose stops make the LED-style segments.

   The skin matrix is chosen with `body[data-skin]` and the scheme with
   `body.light`, both set before first paint by the inline script in
   index.html.  No attribute at all means Windows 2000, dark.

   Layout note: the whole page is one application window sitting on a desktop,
   and every card inside it is a smaller window of the same construction, which
   is why `.win`, `.raised`, `.sunken` and `.title-bar` carry most of the
   weight here.
   ======================================================================== */

/* --- tokens: Windows 2000, dark (the default) --------------------------- */
body {
  --desktop: #20303f;
  --face: #3b3b3b;
  --hilight: #6e6e6e;
  --light: #3b3b3b;
  --shadow: #1f1f1f;
  --dkshadow: #0d0d0d;
  --window: #1f1f1f;
  --window-alt: #262626;
  --text: #e6e6e6;
  --text-muted: #b0b0b0;
  --gray-text: #8a8a8a;
  --gray-text-shadow: transparent;
  --title-a: #123a7a;
  --title-b: #2f6ea8;
  --title-text: #fff;
  --title-off-a: #2b2b2b;
  --title-off-b: #4a4a4a;
  --title-off-text: #a0a0a0;
  --select-bg: #123a7a;
  --select-text: #fff;
  --bar: #5b8fd0;
  --bar-hot: #e8863c;
  --trough: #232323;
  --online: #4ed06a;
  --offline: #ff6b6b;
  --link: #9dc2ff;
  --link-hover: #ffb4b4;
  --row-line: #2e2e2e;
  --dither-a: #4c4c4c;
  --dither-b: #3b3b3b;
  --overlay: #00000073;
  --tip-bg: #ffffe1;
  --tip-text: #000;
  --graph-bg: #0a0a0a;
  --graph-grid: #0a7a44;
  --graph-axis: #8fd0a0;
  --accent-green: #4ed06a;
  --accent-yellow: #e0b040;
  --accent-red: #ff6b6b;
  /* Readings inside a card panel.  Kept apart from the window colours: a dark
     scheme wants four legible hues on one line, not four pastels. */
  --read-up: #6fc47a;
  --read-down: #7ba7e8;
  --read-latency: #dda94b;
  --read-loss: #55bdb0;
  --pie-used: #5b8fd0;
  --pie-free: #565656;
  /* Geometry defaults.  Skins override these below; they live here rather than
     in a `var(--x, fallback)` form because a custom property that references
     itself is a cycle, and a cycle invalidates the declaration outright. */
  --r-window: 0;
  --r-control: 0;
  --r-track: 0;
  --r-tab: 0;
  --title-h: 18px;
  --win-pad: 3px;
  --seg-on: 6px;
  --seg-gap: 2px;
  --bevel-ctl: 1px;
  --active-bg: var(--dither-a);
  --active-dither: var(--dither-tile-plain);
  --title-grad: linear-gradient(90deg, var(--title-a) 0%, var(--title-b) 100%);
  --title-grad-off: linear-gradient(
    90deg,
    var(--title-off-a) 0%,
    var(--title-off-b) 100%
  );
  color-scheme: dark;
}

/* --- tokens: Windows 2000, light (the canonical palette) ---------------- */
body.light {
  --desktop: #3a6ea5;
  --face: #d4d0c8;
  --hilight: #fff;
  --light: #d4d0c8;
  --shadow: gray;
  --dkshadow: #404040;
  --window: #fff;
  --window-alt: #f4f4f4;
  --text: #000;
  --text-muted: #404040;
  --gray-text: gray;
  --gray-text-shadow: #fff;
  --title-a: #0a246a;
  --title-b: #a6caf0;
  --title-text: #fff;
  --title-off-a: gray;
  --title-off-b: silver;
  --title-off-text: #d4d0c8;
  --select-bg: #0a246a;
  --select-text: #fff;
  --bar: navy;
  --bar-hot: #a04000;
  --trough: #eceae6;
  --online: #00b000;
  --offline: #c00000;
  --link: #00f;
  --link-hover: red;
  --row-line: #e8e8e8;
  --dither-a: #fff;
  --dither-b: #d4d0c8;
  --overlay: #00000026;
  --graph-bg: #000;
  --graph-grid: #008040;
  --graph-axis: #404040;
  --accent-green: #007a00;
  --accent-yellow: #a06a00;
  --accent-red: #c00000;
  --read-up: #15803d;
  --read-down: #1d4ed8;
  --read-latency: #b45309;
  --read-loss: #0f766e;
  --pie-used: navy;
  --pie-free: #a0a0a0;
  color-scheme: light;
}

/* --- skin: Windows 3.1 — square corners, navy titles, 2px bevels -------- */
body[data-skin="win31"] {
  --desktop: #062626;
  --face: #333;
  --hilight: #666;
  --light: #333;
  --shadow: #1c1c1c;
  --dkshadow: #000;
  --window: #1c1c1c;
  --window-alt: #242424;
  --title-a: #00006a;
  --title-b: #00006a;
  --title-off-a: #2a2a2a;
  --title-off-b: #2a2a2a;
  --title-off-text: #a8a8a8;
  --bar: #4f6098;
  --bar-hot: #d2703a;
  --trough: #242424;
  --row-line: #2c2c2c;
  --dither-a: #4a4a4a;
  --dither-b: #333;
  --r-window: 0;
  --r-control: 0;
  --r-track: 0;
  --r-tab: 0;
  --title-h: 19px;
  --seg-on: 9px;
  --seg-gap: 3px;
  --win-pad: 4px;
  --bevel-ctl: 2px;
}
body[data-skin="win31"].light {
  --desktop: teal;
  --face: silver;
  --hilight: #fff;
  --light: silver;
  --shadow: gray;
  --dkshadow: #000;
  --window: #fff;
  --window-alt: #f0f0f0;
  --row-line: #d8d8d8;
  --dither-a: #fff;
  --dither-b: silver;
  --title-a: #0000a8;
  --title-b: #0000a8;
  --title-off-a: #fff;
  --title-off-b: #fff;
  --title-off-text: #000;
  --bar: #0000a8;
  --bar-hot: #a80000;
  --trough: #fff;
}

/* --- skin: Windows XP (Luna) — rounded, blue-bordered, green meters ----- */
body[data-skin="xp"] {
  --desktop: #1b2b40;
  --face: #3a3a3a;
  --hilight: #6a6a6a;
  --light: #3a3a3a;
  --shadow: #1e1e1e;
  --dkshadow: #0e0e0e;
  --window: #1f1f1f;
  --window-alt: #262626;
  --title-a: #0a3f9c;
  --title-b: #2f6fc4;
  --title-hi: #6fa1d8;
  --title-off-a: #2a2a2a;
  --title-off-b: #3a3a3a;
  --title-off-text: #a8a8a8;
  --select-bg: #2a5fa8;
  --bar: #3ca03c;
  --bar-hi: #7ac97a;
  --bar-hot: #e07030;
  --bar-hi-hot: #f0a878;
  --trough: #242424;
  --row-line: #2c2c2c;
  --dither-a: #4a4a4a;
  --dither-b: #3a3a3a;
  --r-window: 8px;
  --r-control: 3px;
  --r-track: 4px;
  --r-tab: 3px;
  --title-h: 22px;
  --ctl-line: #5a7fb0;
  --ctl-line-on: #7aa7e0;
  --active-bg: #2a5fa8;
  --active-dither: none;
  --active-text: #fff;
  /* Luna meters were a two-tone rounded capsule, not segments. */
  --meter-style: capsule;
}
body[data-skin="xp"].light {
  --desktop: #4a7fc1;
  --face: #ece9d8;
  --hilight: #fff;
  --light: #f7f5ee;
  --shadow: #aca899;
  --dkshadow: #716f64;
  --window: #fff;
  --window-alt: #f8f7f2;
  --text: #000;
  --text-muted: #4a4a4a;
  --gray-text: #7a786c;
  --gray-text-shadow: transparent;
  --title-a: #0058ee;
  --title-b: #3f8cf3;
  --title-hi: #7fb4f7;
  --title-off-a: #a8c8ee;
  --title-off-b: #c8dcf5;
  --title-off-text: #f0f6fd;
  --select-bg: #316ac5;
  --bar: #3cb43c;
  --bar-hi: #86d486;
  --bar-hot: #e04a1a;
  --bar-hi-hot: #f08a68;
  --trough: #fff;
  --row-line: #e4e1d4;
  --dither-a: #fff;
  --dither-b: #ece9d8;
  --ctl-line: #003c74;
  --ctl-line-on: #316ac5;
  --active-bg: #c1d2ee;
  --active-text: #14357a;
  --online: #007a00;
  --offline: #c00000;
}

/* --- skin: Mac OS X 10.6 (Aqua) — pinstripes, traffic lights, blue ----- */
body[data-skin="aqua"] {
  --desktop: #2b2b30;
  --face: #3a3a3c;
  --hilight: #5a5a5e;
  --light: #3a3a3c;
  --shadow: #1e1e20;
  --dkshadow: #101012;
  --window: #1e1e20;
  --window-alt: #262628;
  --text: #e8e8e8;
  --text-muted: #b0b0b0;
  --title-text: #e0e0e0;
  --title-off-text: #909090;
  --select-bg: #2a7fdb;
  --bar: #4a9ae8;
  --bar-hi: #a3cbf4;
  --bar-hot: #e0705a;
  --bar-hi-hot: #f0a898;
  --trough: #2a2a2c;
  --row-line: #2c2c2e;
  --dither-a: #4a4a4a;
  --dither-b: #3a3a3c;
  --r-window: 10px;
  --r-control: 5px;
  --r-track: 7px;
  --r-tab: 10px;
  --title-h: 24px;
  --menu-bg: var(--window);
  --title-grad: linear-gradient(180deg, #4e4e52 0, #3a3a3e 48%, #2e2e32 52%, #424246 100%);
  --title-grad-off: linear-gradient(180deg, #343438, #2a2a2e);
  --ctl-face: linear-gradient(180deg, #4a4a4c, #333336);
  --ctl-line: #5a5a5e;
  --btn-on-line: #8e8e93;
  --btn-on-shadow: inset 0 1px 2px #00000059;
  --tab-on-bg: #8e8e93;
  --tab-on-text: #1a1a1c;
  --active-bg: #3a3a3c;
  --active-dither: none;
  --meter-style: capsule;
  --traffic-lights: inline-flex;
  --title-align: center;
}
body[data-skin="aqua"].light {
  --desktop: #d9d9de;
  --face: #d0d0d0;
  --hilight: #fff;
  --light: #e8e8e8;
  --shadow: #a8a8a8;
  --dkshadow: #787878;
  --window: #fff;
  --window-alt: #f6f6f6;
  --text: #1a1a1a;
  --text-muted: #6a6a6a;
  --gray-text: #8a8a8a;
  --title-text: #3c3c3c;
  --title-off-text: #9a9a9a;
  --select-bg: #2a7fdb;
  --bar: #2a7fdb;
  --bar-hi: #8fbdf0;
  --bar-hot: #d04a3a;
  --bar-hi-hot: #ea8f84;
  --trough: #e2e2e2;
  --row-line: #ececec;
  --dither-a: #f0f0f0;
  --dither-b: #dcdcdc;
  --menu-bg: #f6f6f6;
  --title-grad: linear-gradient(180deg, #f4f4f4 0, #d6d6d6 48%, #c2c2c2 52%, #dadada 100%);
  --title-grad-off: linear-gradient(180deg, #ececec, #d8d8d8);
  --ctl-face: linear-gradient(180deg, #f4f4f4, #d8d8d8);
  --ctl-line: #9a9a9a;
  --btn-on-line: #7a7a7a;
  --btn-on-shadow: inset 0 1px 2px #00000038;
  --tab-on-bg: #6f6f6f;
  --tab-on-text: #fff;
  --active-bg: #d0d0d0;
  --pie-free: #b8b8b8;
  --online: #1a8a2a;
  --offline: #c02a1a;
}

/* --- derived tokens ----------------------------------------------------- */
body {
  /* The 50% checkerboard Win2k laid over the title bar fade and under the
     pressed state of a toolbar button.  Kept as an image only: position and
     size belong to the `background` shorthand, and carrying them in a custom
     property makes every `background-image: var(--dither-tile)` invalid. */
  --dither-tile: repeating-conic-gradient(#ffffff73 0 25%, transparent 0 50%);
  --dither-tile-plain: repeating-conic-gradient(
      var(--dither-b) 0 25%,
      transparent 0 50%
    );
  /* A meter is a row of LEDs: paint `--seg-on` of every `--seg-on + gap`. */
  --segments: repeating-linear-gradient(
    90deg,
    var(--bar) 0 var(--seg-on),
    transparent var(--seg-on) calc(var(--seg-on) + var(--seg-gap))
  );
  --segments-hot: repeating-linear-gradient(
    90deg,
    var(--bar-hot) 0 var(--seg-on),
    transparent var(--seg-on) calc(var(--seg-on) + var(--seg-gap))
  );
  --capsule: linear-gradient(
    180deg,
    var(--bar-hi, var(--bar)) 0 46%,
    var(--bar) 46% 100%
  );
  --capsule-hot: linear-gradient(
    180deg,
    var(--bar-hi-hot, var(--bar-hot)) 0 46%,
    var(--bar-hot) 46% 100%
  );
  --meter-fill: var(--segments);
  --meter-fill-hot: var(--segments-hot);
}

/* XP and Aqua meters are capsules; the segment geometry belongs to 3.1/2000. */
body[data-skin="xp"],
body[data-skin="aqua"] {
  --meter-fill: var(--capsule);
  --meter-fill-hot: var(--capsule-hot);
}

/* --- base --------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--desktop);
  font: 12px/1.35 Tahoma, "MS Sans Serif", SimSun, 宋体, "Microsoft YaHei",
    "PingFang SC", sans-serif;
  color: var(--text);
}

a {
  color: var(--link);
  text-decoration: none;
}
a:hover {
  color: var(--link-hover);
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
p,
figure {
  margin: 0;
}

[hidden] {
  display: none !important;
}

.num {
  font-variant-numeric: tabular-nums;
}

.text-muted {
  color: var(--text-muted);
}
.text-online {
  color: var(--online);
}
.text-offline {
  color: var(--offline);
}
.text-gray {
  color: var(--gray-text);
}

/* --- bevels ------------------------------------------------------------- */
.raised {
  background: var(--face);
  border: 1px solid;
  border-color: var(--hilight) var(--dkshadow) var(--dkshadow) var(--hilight);
  box-shadow: inset -1px -1px var(--shadow), inset 1px 1px var(--light);
}

.sunken {
  background: var(--window);
  border: 1px solid;
  border-color: var(--shadow) var(--hilight) var(--hilight) var(--shadow);
  box-shadow: inset 1px 1px var(--dkshadow), inset -1px -1px var(--light);
}

.thin-raised {
  border: 1px solid;
  border-color: var(--hilight) var(--shadow) var(--shadow) var(--hilight);
}

.thin-sunken {
  border: 1px solid;
  border-color: var(--shadow) var(--hilight) var(--hilight) var(--shadow);
}

/* A window: outer 2-tone frame, inner 1px light/shadow, 3px of face colour. */
.win {
  background: var(--face);
  border: 1px solid;
  border-color: var(--light) var(--dkshadow) var(--dkshadow) var(--light);
  box-shadow: inset 1px 1px var(--hilight), inset -1px -1px var(--shadow);
  border-radius: var(--r-window);
  padding: var(--win-pad);
}

/* --- window chrome ------------------------------------------------------ */
.desktop {
  min-height: 100vh;
  padding: 16px;
}

.app-window {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 1440px;
  min-height: calc(100vh - 32px);
  margin: 0 auto;
}

.app-window > .title-bar {
  position: sticky;
  top: 0;
  z-index: 20;
}

.title-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  height: var(--title-h);
  padding: 0 2px 0 3px;
  background-color: var(--title-a);
  background-image: var(--dither-tile), var(--title-grad);
  background-size: 2px 2px, auto;
  border-radius: max(0px, calc(var(--r-window) - 3px))
    max(0px, calc(var(--r-window) - 3px)) 0 0;
  color: var(--title-text);
  font-size: 11px;
  font-weight: 700;
  user-select: none;
}

/* Aqua centred its title and dropped the checkerboard. */
body[data-skin="aqua"] .title-bar {
  background-image: var(--title-grad);
  background-size: auto;
}

.title-bar.inactive {
  background-image: var(--title-grad-off);
  color: var(--title-off-text);
}

.title-bar-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-align: var(--title-align, left);
}

.app-window h1.title-bar-text {
  font-size: 11px;
  font-weight: 700;
}

.title-bar-icon {
  flex-shrink: 0;
  display: inline-flex;
  width: 16px;
  height: 16px;
}

.title-bar-icon svg {
  display: block;
  width: 16px;
  height: 16px;
}

.title-buttons {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.title-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 14px;
  padding: 0 3px;
  background: var(--face);
  border: 1px solid;
  border-color: var(--hilight) var(--dkshadow) var(--dkshadow) var(--hilight);
  box-shadow: inset -1px -1px var(--shadow), inset 1px 1px var(--light);
  border-radius: var(--r-control);
  color: var(--text);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.title-btn svg {
  display: block;
}

.title-btn:active,
.title-btn[aria-expanded="true"] {
  border-color: var(--dkshadow) var(--hilight) var(--hilight) var(--dkshadow);
  box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--light);
}

.title-btn-last {
  margin-left: 2px;
}

.title-btn:focus-visible,
.btn:focus-visible,
.tool-btn:focus-visible,
.tab:focus-visible,
.toggle:focus-visible,
.listview tbody tr:focus-visible {
  outline: 1px dotted var(--text);
  outline-offset: -4px;
}

/* Aqua's three lights replace the Win32 title buttons. */
.traffic-lights {
  display: none;
  align-items: center;
  gap: 5px;
  margin-right: 5px;
  flex-shrink: 0;
}

body[data-skin="aqua"] .traffic-lights {
  display: var(--traffic-lights, inline-flex);
}

body[data-skin="aqua"] .app-window > .title-bar .traffic-lights {
  order: -1;
}

.traffic-lights > i {
  display: block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 0.5px #0003;
}

.traffic-lights .tl-close {
  background: #ff5f57;
}
.traffic-lights .tl-min {
  background: #febc2e;
}
.traffic-lights .tl-zoom {
  background: #28c840;
}

/* --- menus (skin picker, colour scheme, "more countries") --------------- */
.menu-wrap {
  position: relative;
  display: inline-flex;
}

.menu {
  position: absolute;
  top: calc(100% + 3px);
  right: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 132px;
  padding: 2px;
  background: var(--menu-bg, var(--face));
  border: 1px solid;
  border-color: var(--hilight) var(--dkshadow) var(--dkshadow) var(--hilight);
  box-shadow: inset -1px -1px var(--shadow), inset 1px 1px var(--light),
    3px 3px 6px #00000040;
  border-radius: var(--r-control);
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 21px;
  padding: 0 7px;
  background: none;
  border: 0;
  border-radius: calc(var(--r-control) / 2);
  color: var(--text);
  white-space: nowrap;
  text-align: left;
  cursor: pointer;
}

.menu-item:hover,
.menu-item:focus-visible {
  background: var(--select-bg);
  color: var(--select-text);
  outline: none;
}

.menu-item[aria-checked="true"] {
  font-weight: 700;
}

.menu-check {
  flex-shrink: 0;
  width: 11px;
  text-align: center;
}

.menu-label {
  flex: 1;
}

.menu-sep {
  height: 2px;
  margin: 2px 1px;
  border-top: 1px solid var(--shadow);
  border-bottom: 1px solid var(--hilight);
}

.menu-scroll {
  max-height: 300px;
  overflow-y: auto;
}

/* --- buttons ------------------------------------------------------------ */
.btn {
  min-width: 75px;
  min-height: 23px;
  padding: 0 10px;
  background: var(--face);
  border: 1px solid;
  border-color: var(--hilight) var(--dkshadow) var(--dkshadow) var(--hilight);
  box-shadow: inset -1px -1px var(--shadow), inset 1px 1px var(--light);
  border-radius: var(--r-control);
  color: var(--text);
  cursor: pointer;
}

.btn:active:not(:disabled) {
  border-color: var(--dkshadow) var(--hilight) var(--hilight) var(--dkshadow);
  box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--light);
  padding: 1px 9px 0 11px;
}

.btn:disabled {
  color: var(--gray-text);
  text-shadow: 1px 1px var(--gray-text-shadow);
  cursor: default;
}

/* --- toolbar ------------------------------------------------------------ */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  padding: 3px 3px 4px;
  border-bottom: 1px solid var(--shadow);
  box-shadow: 0 1px var(--hilight);
}

body[data-skin="win31"] .toolbar {
  border-bottom-color: var(--dkshadow);
}

.tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 8px;
  background: var(--ctl-face, var(--face));
  border: var(--bevel-ctl) solid var(--btn-line, var(--hilight));
  border-right-color: var(--btn-line-right, var(--dkshadow));
  border-bottom-color: var(--btn-line-bottom, var(--dkshadow));
  box-shadow: inset -1px -1px var(--shadow), inset 1px 1px var(--light);
  border-radius: var(--r-control);
  color: var(--text);
  white-space: nowrap;
  cursor: pointer;
}

body[data-skin="win31"] .tool-btn {
  height: 26px;
  padding: 0 9px;
}

.tool-btn:hover {
  border-color: var(--ctl-line-on, var(--hilight));
  border-right-color: var(--ctl-line-on, var(--shadow));
  border-bottom-color: var(--ctl-line-on, var(--shadow));
}

body[data-skin="xp"] .tool-btn,
body[data-skin="aqua"] .tool-btn {
  border-color: var(--ctl-line);
  box-shadow: none;
}

body[data-skin="xp"] .tool-btn:hover,
body[data-skin="aqua"] .tool-btn:hover {
  border-color: var(--ctl-line-on);
}

.tool-btn .tb-icon {
  display: inline-flex;
  flex-shrink: 0;
}

/* The pressed state: sunken bevel plus the checkerboard fill. */
.tool-btn.active {
  border-color: var(--btn-on-line, var(--dkshadow));
  border-right-color: var(--hilight);
  border-bottom-color: var(--hilight);
  box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--light);
  background-color: var(--active-bg, var(--dither-a));
  background-image: var(--active-dither, var(--dither-tile-plain));
  background-size: 2px 2px;
  color: var(--active-text, var(--text));
}

body[data-skin="xp"] .tool-btn.active,
body[data-skin="aqua"] .tool-btn.active {
  box-shadow: inset 0 1px 2px #00000038;
}

body[data-skin="aqua"] .tool-btn.active {
  background-color: var(--window);
  background-image: none;
  color: var(--text);
}

.tool-sep {
  align-self: stretch;
  width: 2px;
  margin: 2px 5px;
  border-left: 1px solid var(--shadow);
  border-right: 1px solid var(--hilight);
}

.tool-label {
  padding: 0 4px;
  white-space: nowrap;
}

.tool-spacer {
  flex: 1;
  min-width: 8px;
}

/* --- text field -------------------------------------------------------- */
.field {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.input {
  height: 21px;
  padding: 0 3px;
  background: var(--window);
  border: 1px solid;
  border-color: var(--shadow) var(--hilight) var(--hilight) var(--shadow);
  box-shadow: inset 1px 1px var(--dkshadow), inset -1px -1px var(--light);
  border-radius: 0;
  color: var(--text);
}

.input::placeholder {
  color: var(--gray-text);
}

.select {
  height: 21px;
  padding: 0 2px;
  background: var(--window);
  border: 1px solid;
  border-color: var(--shadow) var(--hilight) var(--hilight) var(--shadow);
  box-shadow: inset 1px 1px var(--dkshadow), inset -1px -1px var(--light);
  border-radius: 0;
  color: var(--text);
}

/* --- checkboxes and radio buttons, as drawn by the OS ------------------ */
.toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 5px;
  background: var(--face);
  border: 1px solid;
  border-color: var(--hilight) var(--dkshadow) var(--dkshadow) var(--hilight);
  box-shadow: inset -1px -1px var(--shadow), inset 1px 1px var(--light);
  border-radius: var(--r-control);
  color: var(--text);
  white-space: nowrap;
  cursor: pointer;
}

.toggle-box {
  position: relative;
  flex-shrink: 0;
  width: 13px;
  height: 13px;
  background: var(--window);
  border: 1px solid;
  border-color: var(--shadow) var(--hilight) var(--hilight) var(--shadow);
  box-shadow: inset 1px 1px var(--dkshadow), inset -1px -1px var(--light);
}

.toggle-box.radio {
  border-radius: 50%;
}

.toggle[aria-pressed="true"] .toggle-box::after {
  content: "";
  position: absolute;
  inset: 3px;
  background: var(--text);
}

.toggle[aria-pressed="true"] .toggle-box.radio::after {
  border-radius: 50%;
}

.toggle[aria-pressed="true"] {
  border-color: var(--dkshadow) var(--hilight) var(--hilight) var(--dkshadow);
  box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--light);
}

.toggle-count {
  color: var(--gray-text);
}

.toggle[aria-pressed="true"] .toggle-count {
  color: inherit;
}

.flag-img {
  flex-shrink: 0;
  width: 16px;
  height: 11px;
  object-fit: cover;
  vertical-align: middle;
  border: 1px solid #00000059;
}

.flag-fallback {
  display: inline-block;
  flex-shrink: 0;
  width: 16px;
  height: 11px;
  background: var(--window);
  border: 1px solid var(--shadow);
  color: var(--text);
  font-size: 8px;
  line-height: 9px;
  text-align: center;
}

/* Platform logos ship pre-tinted with their brand colour (an <img> cannot be
   recoloured from CSS), so the rule only handles size and seating. */
.os-icon-img {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  object-fit: contain;
  vertical-align: -2px;
}

.host-item dd .os-icon-img {
  margin-right: 5px;
}

/* --- group boxes ------------------------------------------------------- */
.groupbox {
  min-width: 0;
  margin: 0;
  padding: 8px 10px 10px;
  border: 1px solid var(--shadow);
  box-shadow: inset 1px 1px var(--hilight), 1px 1px var(--hilight);
  border-radius: var(--r-control);
}

body[data-skin="xp"] .groupbox,
body[data-skin="aqua"] .groupbox {
  border-color: var(--ctl-line);
  box-shadow: none;
}

.groupbox > legend {
  padding: 0 3px;
  margin-left: 2px;
  background: var(--face);
}

/* --- layout ------------------------------------------------------------- */
.app-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.page {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.page-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 14px;
  min-width: 0;
  padding: 8px 6px;
}

.panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

/* --- summary boxes ----------------------------------------------------- */
.summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.summary .groupbox {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.stat-figure {
  display: block;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.stat-big {
  display: block;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.stat-sub {
  display: block;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 10px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.stat-sub > i {
  font-style: normal;
}

.stat-sep {
  color: var(--gray-text);
}

.stat-busy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 3px 8px;
  min-width: 0;
}

.stat-busy-name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.stat-busy > .progress {
  grid-column: 1 / -1;
}

/* One cell per server: the fleet at a glance. */
.fleet-bar {
  display: flex;
  gap: 2px;
  height: 9px;
  margin-top: 4px;
}

.fleet-bar > i {
  display: block;
  flex: 1 1 0;
  min-width: 0;
  background: var(--accent-green);
  border-radius: max(0px, calc(var(--r-track) / 2));
}

.fleet-bar > i.off {
  background: var(--accent-red);
}

/* --- meters ------------------------------------------------------------ */
.progress {
  position: relative;
  height: 13px;
  padding: 1px;
  background: var(--trough);
  border: 1px solid;
  border-color: var(--shadow) var(--hilight) var(--hilight) var(--shadow);
  border-radius: var(--r-track);
  overflow: hidden;
}

.progress-fill {
  display: block;
  height: 100%;
  max-width: 100%;
  background: var(--meter-fill);
  background-position: 0 0;
  border-radius: var(--r-track);
}

.progress-fill.hot {
  background: var(--meter-fill-hot);
}

.progress-fill.unknown {
  background: repeating-linear-gradient(
    90deg,
    var(--gray-text) 0 var(--seg-on),
    transparent var(--seg-on) calc(var(--seg-on) + var(--seg-gap))
  );
  opacity: 0.5;
}

.progress-indeterminate {
  height: 18px;
  padding: 2px;
}

.progress-indeterminate .progress-fill {
  width: 36%;
  animation: w2k-progress 1.6s steps(12, end) infinite;
}

@keyframes w2k-progress {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(280%);
  }
}

/* --- uptime strips ----------------------------------------------------- */
.strip {
  display: flex;
  gap: 1px;
  height: 8px;
  min-width: 0;
}

.strip > i {
  display: block;
  flex: 1 1 0;
  min-width: 0;
  background: var(--online);
  border-radius: max(0px, calc(var(--r-track) / 2));
}

.strip > i.down {
  background: var(--offline);
}

.strip > i.idle {
  background: var(--gray-text);
  opacity: 0.45;
}

.strip.thin {
  height: 5px;
}

/* --- server cards ------------------------------------------------------ */
.servers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 10px;
}

.servers-grid.view-ring {
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
}

.server-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 3px 3px 7px;
  color: var(--text);
  /* The whole card is one anchor, so underline and link colour stay off: it
     reads as a window, not as hypertext. */
  text-decoration: none;
}

body[data-skin="aqua"] .server-card {
  background: var(--window);
}

.server-card .title-bar {
  gap: 5px;
}

.card-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 14px;
  padding: 0 4px;
  background: var(--face);
  border: 1px solid;
  border-color: var(--hilight) var(--dkshadow) var(--dkshadow) var(--hilight);
  color: var(--text);
  font-weight: 400;
  white-space: nowrap;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 0 5px;
  min-width: 0;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
}

.card-meta-item {
  white-space: nowrap;
}

.card-meta-spacer {
  flex: 1;
}

.card-meta-right {
  color: var(--gray-text);
  font-size: 11px;
}

.meters {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.meter-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 54px;
  align-items: center;
  gap: 4px 6px;
}

.meter-row > .num {
  text-align: right;
}

/* The inset readings panel: 3.1 and 2000 drew it sunken; Aqua framed it. */
.card-data {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  margin: 0 -6px;
  padding: 5px 6px;
  box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--hilight);
}

body[data-skin="aqua"] .card-data {
  box-shadow: inset 0 0 0 1px var(--row-line);
  border-radius: var(--r-control);
}

.reads {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 6px;
  min-width: 0;
}

.read-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.read {
  display: flex;
  align-items: baseline;
  gap: 3px;
  min-width: 0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.read > b {
  display: inline-block;
  min-width: 4.6ch;
  text-align: right;
  font-weight: 700;
}

.read-icon {
  flex-shrink: 0;
  align-self: center;
}

.read-unit {
  color: var(--text-muted);
  font-size: 10px;
  font-style: normal;
}

.read-text {
  color: var(--text-muted);
}

.read-up,
.read-up > b,
.read-up .read-icon {
  color: var(--read-up);
}

.read-down,
.read-down > b,
.read-down .read-icon {
  color: var(--read-down);
}

.read-plain,
.read-plain > b {
  color: var(--text);
}

.read-alert,
.read-alert > b,
.read-alert .read-icon {
  color: var(--offline);
}

.read-price > b {
  min-width: 0;
  font-size: 10px;
}

/* --- service probes inside a card ------------------------------------- */
.probes {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  padding-top: 5px;
  font-size: 11px;
  box-shadow: inset 0 1px var(--shadow), inset 0 2px var(--hilight);
}

.probe-row {
  display: grid;
  grid-template-columns: 68px 46px minmax(0, 1fr) 38px minmax(0, 1fr);
  align-items: center;
  gap: 0 5px;
  min-width: 0;
  white-space: nowrap;
}

.probe-name {
  overflow: hidden;
  text-overflow: ellipsis;
}

.probe-ms {
  text-align: right;
  color: var(--read-latency);
  font-weight: 700;
}

.probe-loss {
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 2px;
  color: var(--read-loss);
  font-weight: 700;
}

.probe-loss.warn,
.probe-loss.loss-warn {
  color: var(--read-latency);
}

.probe-loss.bad,
.probe-loss.loss-bad {
  color: var(--offline);
}

.probe-more {
  color: var(--gray-text);
}

/* --- ring view: the pseudo-3D disk gauge ------------------------------- */
.rings {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  text-align: center;
}

.ring-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

.cylinder {
  position: relative;
  display: block;
  width: 74px;
  height: 48px;
  margin-bottom: 4px;
  --pct: 0%;
}

.cylinder-top,
.cylinder-side {
  position: absolute;
  left: 0;
  width: 74px;
  height: 40px;
  border-radius: 50%;
}

.cylinder-top {
  top: 0;
  background: conic-gradient(
    from 90deg,
    var(--pie-used) 0 var(--pct),
    var(--pie-free) var(--pct) 100%
  );
  box-shadow: inset 0 0 0 1px #00000059;
}

.cylinder-side {
  top: 8px;
  background: conic-gradient(
    from 90deg,
    color-mix(in oklab, var(--pie-used) 68%, #000) 0 var(--pct),
    color-mix(in oklab, var(--pie-free) 68%, #000) var(--pct) 100%
  );
  box-shadow: 0 0 0 1px #00000059;
}

.ring-value {
  position: absolute;
  top: 14px;
  left: 0;
  width: 100%;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 3px var(--window), 0 0 3px var(--window);
}

.ring-label {
  overflow: hidden;
  max-width: 100%;
  color: var(--text-muted);
  font-size: 11px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* --- table view -------------------------------------------------------- */
.table-scroll {
  padding: 2px;
  overflow-x: auto;
}

.listview {
  width: 100%;
  border-collapse: collapse;
  background: var(--window);
  color: var(--text);
}

.listview th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 0;
  text-align: left;
  font-weight: 400;
}

.listview .col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  width: 100%;
  height: 19px;
  padding: 0 6px;
  background: var(--face);
  border: 1px solid;
  border-color: var(--hilight) var(--dkshadow) var(--dkshadow) var(--hilight);
  box-shadow: inset -1px -1px var(--shadow), inset 1px 1px var(--light);
  color: var(--text);
  white-space: nowrap;
  text-align: left;
}

body[data-skin="xp"] .col-head,
body[data-skin="aqua"] .col-head {
  border-color: var(--ctl-line);
  box-shadow: none;
}

.listview td {
  height: 23px;
  padding: 0 6px;
  border-bottom: 1px solid var(--row-line);
  white-space: nowrap;
}

.listview tbody tr {
  cursor: pointer;
}

.listview tbody tr:hover,
.listview tbody tr:focus-visible {
  background: var(--select-bg);
  color: var(--select-text);
  outline: none;
}

.listview tbody tr:hover a,
.listview tbody tr:hover .text-muted,
.listview tbody tr:hover .probe-ms,
.listview tbody tr:hover .text-online,
.listview tbody tr:hover .text-offline {
  color: inherit;
}

.listview tbody tr.offline {
  color: var(--gray-text);
}

.listview tbody tr.offline:hover {
  color: var(--select-text);
}

.listview .cell-flex {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.listview .cell-meter {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.listview .cell-meter .progress {
  width: 52px;
  height: 11px;
}

.listview a {
  color: inherit;
}

.table-empty td {
  text-align: center;
  cursor: default;
  color: var(--text-muted);
}

/* --- filter row -------------------------------------------------------- */
.filters {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filters .toolbar {
  border-bottom: 0;
  box-shadow: none;
  padding: 0;
}

.filter-menu {
  max-height: 320px;
  overflow-y: auto;
}

.filter-measure {
  position: absolute;
  top: 0;
  left: -9999px;
  flex-wrap: nowrap;
  visibility: hidden;
  pointer-events: none;
}

/* --- status bar -------------------------------------------------------- */
.status-bar {
  display: flex;
  gap: 2px;
  min-height: 20px;
  margin-top: 2px;
  font-size: 11px;
}

.status-field {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 1px 5px;
  overflow: hidden;
  border: 1px solid;
  border-color: var(--shadow) var(--hilight) var(--hilight) var(--shadow);
  border-radius: var(--r-control);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.status-field.grow {
  flex: 1;
}

.status-field.plain {
  border: 0;
  box-shadow: none;
}

.led {
  display: inline-block;
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  background: var(--offline);
  border: 1px solid #000;
}

.led.on {
  background: var(--online);
}

.badge {
  display: inline-block;
  padding: 0 3px;
  background: var(--face);
  border: 1px solid;
  border-color: var(--hilight) var(--shadow) var(--shadow) var(--hilight);
  border-radius: var(--r-control);
  color: var(--text);
  font-size: 10px;
  line-height: 13px;
  white-space: nowrap;
}

/* --- detail page ------------------------------------------------------- */
.host-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.host-title {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  font-size: 14px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.host-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 1px 8px;
  background: var(--window);
}

.host-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
}

.host-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  padding: 4px 8px;
  border-bottom: 1px solid var(--row-line);
}

.host-item dt {
  color: var(--text-muted);
  font-size: 11px;
}

.host-item dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.charts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 10px;
}

.chart-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.chart-box.full {
  grid-column: 1 / -1;
}

/* The latency chart gets a taller panel, like the reference's wide graph. */
.graph-wide {
  height: 220px;
}

.period-group {
  display: inline-flex;
  gap: 2px;
}

.period-group .tool-btn:disabled {
  color: var(--gray-text);
  text-shadow: 1px 1px var(--gray-text-shadow);
  cursor: default;
}

/* A full-width meter row under the host grid: label, trough, value. */
.wide-meter {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 90px;
  align-items: center;
  gap: 4px 8px;
  margin-top: 6px;
}

.wide-meter > .num {
  text-align: right;
}

.legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 4px;
  vertical-align: baseline;
  border: 1px solid #00000040;
}

.chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-height: 14px;
  font-size: 11px;
}

.chart-values {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 8px;
  min-width: 0;
}

.chart-legend {
  display: inline-flex;
  flex-shrink: 0;
  gap: 2px;
}

.chart-value-item {
  white-space: nowrap;
}

/* The graphs keep the black panel and green grid of a Win32 perf monitor. */
.graph {
  position: relative;
  height: 170px;
  padding: 2px;
  background: var(--graph-bg);
}

.graph canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.graph-tip {
  position: absolute;
  z-index: 5;
  padding: 2px 6px;
  background: var(--tip-bg);
  border: 1px solid #000;
  color: var(--tip-text);
  font-size: 11px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.graph-tip-when {
  color: var(--gray-text);
}

/* --- dialog ------------------------------------------------------------ */
.dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--overlay);
}

.dialog {
  display: flex;
  flex-direction: column;
  width: 420px;
  max-width: 100%;
  max-height: calc(100vh - 32px);
  box-shadow: inset 1px 1px var(--hilight), inset -1px -1px var(--shadow),
    3px 3px 0 #0000004d;
}

.dialog-body {
  display: flex;
  gap: 12px;
  padding: 14px;
  overflow: auto;
}

.dialog-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
}

.dialog-message {
  flex: 1;
  min-width: 0;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.dialog-message p + p {
  margin-top: 6px;
}

.dialog-buttons {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 6px 10px 10px;
}

/* Free text under the host grid: the public note and an order link. */
.dialog-line {
  margin: 0 0 6px;
  padding: 4px 8px 0;
  font-size: 11px;
}

.dialog-line:last-child {
  margin-bottom: 0;
}

/* --- tooltips ---------------------------------------------------------- */
[data-tip] {
  position: relative;
}

[data-tip]:hover::after,
[data-tip]:focus-visible::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  z-index: 50;
  padding: 1px 5px;
  background: var(--tip-bg);
  border: 1px solid #000;
  color: var(--tip-text);
  font-size: 11px;
  font-weight: 400;
  white-space: nowrap;
  pointer-events: none;
  transform: translateX(-50%);
}

/* --- loading and empty states ----------------------------------------- */
.loading-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 320px;
  max-width: 100%;
  margin: 48px auto;
}

.empty-state {
  margin: 24px 0;
  text-align: center;
}

/* --- scrollbars, the OS way ------------------------------------------- */
::-webkit-scrollbar {
  width: 16px;
  height: 16px;
}

::-webkit-scrollbar-track {
  background-color: var(--dither-a);
  background-image: var(--dither-tile-plain);
  background-size: 2px 2px;
}

::-webkit-scrollbar-thumb {
  background: var(--face);
  border: 1px solid;
  border-color: var(--light) var(--dkshadow) var(--dkshadow) var(--light);
  box-shadow: inset 1px 1px var(--hilight), inset -1px -1px var(--shadow);
}

::-webkit-scrollbar-corner {
  background: var(--face);
}

::-webkit-scrollbar-button:single-button {
  display: block;
  width: 16px;
  height: 16px;
  background-color: var(--face);
  background-repeat: no-repeat;
  background-position: 50%;
  border: 1px solid;
  border-color: var(--light) var(--dkshadow) var(--dkshadow) var(--light);
  box-shadow: inset 1px 1px var(--hilight), inset -1px -1px var(--shadow);
}

::-webkit-scrollbar-button:single-button:vertical:decrement {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='4'%3E%3Cpath d='M3.5 0L7 4H0z' fill='%23808080'/%3E%3C/svg%3E");
}

::-webkit-scrollbar-button:single-button:vertical:increment {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='4'%3E%3Cpath d='M0 0h7L3.5 4z' fill='%23808080'/%3E%3C/svg%3E");
}

::-webkit-scrollbar-button:single-button:horizontal:decrement {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='7'%3E%3Cpath d='M0 3.5L4 0v7z' fill='%23808080'/%3E%3C/svg%3E");
}

::-webkit-scrollbar-button:single-button:horizontal:increment {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='7'%3E%3Cpath d='M0 0l4 3.5L0 7z' fill='%23808080'/%3E%3C/svg%3E");
}

@supports not selector(::-webkit-scrollbar) {
  html {
    scrollbar-color: var(--face) var(--dither-a);
  }
}

/* --- custom code injected by the panel --------------------------------- */
.custom-code {
  padding: 6px;
  font-size: 12px;
}

/* --- responsive -------------------------------------------------------- */
@media (max-width: 1100px) {
  .charts-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .host-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .desktop {
    padding: 0;
  }
  .app-window {
    min-height: 100vh;
    border: 0;
    box-shadow: none;
  }
  .servers-grid,
  .servers-grid.view-ring {
    grid-template-columns: minmax(0, 1fr);
  }
  .status-bar {
    flex-wrap: wrap;
  }
  .status-bar .status-field.grow {
    flex-basis: 100%;
  }
  .stat-summary-extra {
    display: none;
  }
}

@media (max-width: 560px) {
  .summary {
    grid-template-columns: minmax(0, 1fr);
  }
  .host-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .probe-row {
    grid-template-columns: 62px 42px minmax(0, 1fr) 36px;
  }
  .probe-row .strip:last-child {
    display: none;
  }
}

@media (max-width: 340px) {
  .host-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
