/* =========================================================================
   admin.blueclient.net

   The launcher's language, the same as blueclient.net: dark stone, hard 2px
   edges, radius 0, bevelled slabs, Inter throughout. The tokens are the
   site's (blueclient-site/style.css); change them there and here together.
   ========================================================================= */

:root {
  --bg: #1b1b1d;
  --bg-deep: #151517;
  --panel: #313136;
  --panel-hover: #3b3b41;
  --panel-quiet: #26262a;
  --outline: #0b0b0d;

  --text-1: #f2f3f5;
  --text-2: #b4b6bd;
  --text-3: #85888f;

  --accent: #00c7ff;
  --on-accent: #06222d;
  --danger: #e5484d;
  --good: #34d06a;

  --gradient: linear-gradient(135deg, #00c7ff, #8eebff);
  --gradient-hover: linear-gradient(135deg, #2ad2ff, #b8f6ff);
  --gradient-press: linear-gradient(135deg, #00a8db, #8eccdb);

  --bevel-light: rgba(255, 255, 255, 0.14);
  --bevel-dark: rgba(0, 0, 0, 0.4);
  --accent-bevel-light: rgba(255, 255, 255, 0.38);
  --accent-bevel-dark: rgba(0, 40, 56, 0.5);

  --edge: 2px;
  --wrap: 1120px;
  --bar: 60px;

  --dur-fast: 120ms;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  --font: Inter, "Segoe UI Variable Text", "Segoe UI", -apple-system, system-ui, sans-serif;

  /* The one series colour every chart draws with. There is never a second
     series on this page, so nothing here needs telling apart by hue. */
  --series: #00c7ff;
  --grid: #2c2c31;
}

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

html { color-scheme: dark; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text-1);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

a { color: inherit; }

h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: 24px; }
h2 { font-size: 17px; }
p { margin: 0; }

.muted { color: var(--text-2); }
.quiet { color: var(--text-3); font-size: 13.5px; }
.num { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------- controls */

.mcbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border: var(--edge) solid var(--outline);
  background: var(--panel);
  color: var(--text-1);
  font: inherit;
  font-weight: 600;
  font-size: 14.5px;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: inset var(--edge) var(--edge) 0 0 var(--bevel-light),
              inset calc(var(--edge) * -1) calc(var(--edge) * -1) 0 0 var(--bevel-dark);
  transition: background var(--dur-fast) var(--ease);
}
.mcbtn:hover { background: var(--panel-hover); }
.mcbtn:active {
  box-shadow: inset var(--edge) var(--edge) 0 0 var(--bevel-dark),
              inset calc(var(--edge) * -1) calc(var(--edge) * -1) 0 0 var(--bevel-light);
}
.mcbtn:disabled { opacity: 0.45; cursor: default; }
.mcbtn:disabled:hover { background: var(--panel); }
.mcbtn--accent {
  background-color: var(--accent);
  background-image: var(--gradient);
  color: var(--on-accent);
  box-shadow: inset var(--edge) var(--edge) 0 0 var(--accent-bevel-light),
              inset calc(var(--edge) * -1) calc(var(--edge) * -1) 0 0 var(--accent-bevel-dark);
}
.mcbtn--accent:hover { background-color: #2ad2ff; background-image: var(--gradient-hover); }
.mcbtn--accent:active { background-color: #00a8db; background-image: var(--gradient-press); }
.mcbtn--danger { color: #ffb4b6; }
.mcbtn--sm { height: 34px; padding: 0 14px; font-size: 13.5px; }
.mcbtn--icon { width: 34px; padding: 0; }
.mcbtn--full { width: 100%; }

.field {
  display: block;
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: var(--edge) solid var(--outline);
  background: var(--bg-deep);
  color: var(--text-1);
  font: inherit;
  font-size: 14.5px;
  box-shadow: inset var(--edge) var(--edge) 0 0 rgba(0, 0, 0, 0.5);
}
.field:focus { outline: var(--edge) solid var(--accent); outline-offset: 0; }
.field--sm { height: 34px; font-size: 13.5px; padding: 0 10px; }
.field::placeholder { color: var(--text-3); }

label.lbl {
  display: block;
  margin-bottom: 6px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* A vanilla-shaped switch: a slab with a knob that slides to the accent. */
.switch {
  position: relative;
  width: 44px;
  height: 24px;
  border: var(--edge) solid var(--outline);
  background: var(--bg-deep);
  cursor: pointer;
  padding: 0;
  flex: none;
}
.switch::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: var(--text-3);
  transition: transform var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.switch[aria-checked="true"] { background: rgba(0, 199, 255, 0.18); }
.switch[aria-checked="true"]::after { transform: translateX(20px); background: var(--accent); }

.note {
  padding: 10px 12px;
  border: var(--edge) solid var(--outline);
  background: var(--panel-quiet);
  color: var(--text-2);
  font-size: 13.5px;
}
.note--bad { color: #ffb4b6; border-color: #4a1b1e; background: #2a1517; }
.note--good { color: #b8f0c8; border-color: #1d4a2b; background: #15291b; }

/* ------------------------------------------------------------------ bar */

.bar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--bar);
  background: var(--panel-quiet);
  border-bottom: var(--edge) solid var(--outline);
}
.bar__inner {
  height: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__mark { width: 24px; height: 24px; }
.brand__name { font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.brand__tag {
  margin-left: 2px;
  padding: 2px 7px;
  border: var(--edge) solid var(--outline);
  background: var(--bg-deep);
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.bar__nav { display: flex; gap: 22px; margin-left: auto; }
.bar__nav a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  padding: 4px 0;
  border-bottom: var(--edge) solid transparent;
  transition: color var(--dur-fast) var(--ease);
}
.bar__nav a:hover { color: var(--text-1); }
.bar__nav a.is-active { color: var(--text-1); border-bottom-color: var(--accent); }

/* ----------------------------------------------------------------- page */

main {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 28px 24px 64px;
}

.head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.stack { display: grid; gap: 24px; }

/* --------------------------------------------------------------- sign in */

.gate {
  min-height: calc(100vh - 120px);
  display: grid;
  place-items: center;
}
.gate__panel {
  width: min(380px, 100%);
  padding: 28px;
  border: var(--edge) solid var(--outline);
  background: var(--panel);
  box-shadow: inset var(--edge) var(--edge) 0 0 var(--bevel-light),
              inset calc(var(--edge) * -1) calc(var(--edge) * -1) 0 0 var(--bevel-dark);
  display: grid;
  gap: 18px;
}
.gate__brand { display: flex; align-items: center; gap: 12px; }
.gate__brand img { width: 40px; height: 40px; }

/* ---------------------------------------------------------------- tiles */

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}
.tile {
  padding: 14px 16px 12px;
  border: var(--edge) solid var(--outline);
  background: var(--panel-quiet);
  display: grid;
  gap: 2px;
}
.tile--live { background: var(--panel); }
.tile__label { color: var(--text-2); font-size: 13px; font-weight: 500; }
.tile__value {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.tile__sub { color: var(--text-3); font-size: 12.5px; }
.tile__value .dot {
  display: inline-block;
  width: 10px; height: 10px;
  margin: 0 8px 2px 0;
  background: var(--good);
  vertical-align: middle;
}

/* --------------------------------------------------------------- panels */

.panel {
  border: var(--edge) solid var(--outline);
  background: var(--panel-quiet);
  padding: 16px 18px 14px;
}
.panel__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.panel__head h2 { font-size: 15px; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }

/* --------------------------------------------------------------- charts */

.chart { position: relative; height: 170px; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart .grid { stroke: var(--grid); stroke-width: 1; shape-rendering: crispEdges; }
.chart .bar { fill: var(--series); }
.chart .bar.is-hot { fill: #8eebff; }
.chart .axis { fill: var(--text-3); font-size: 11.5px; }
.chart .hit { fill: transparent; }
.chart__empty {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: var(--text-3); font-size: 13.5px;
}

.tip {
  position: fixed;
  z-index: 60;
  pointer-events: none;
  padding: 6px 10px;
  border: var(--edge) solid var(--outline);
  background: var(--bg-deep);
  color: var(--text-1);
  font-size: 13px;
  white-space: nowrap;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}
.tip b { font-weight: 600; }

/* --------------------------------------------------------------- tables */

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 8px 8px; text-align: left; border-bottom: 1px solid var(--grid); vertical-align: middle; }
th { color: var(--text-3); font-size: 12px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }
td.right, th.right { text-align: right; }
td .bar-line {
  display: inline-block;
  height: 8px;
  background: var(--series);
  vertical-align: middle;
  margin-right: 8px;
}

/* -------------------------------------------------------------- servers */

.rows { display: grid; gap: 8px; }
.row {
  display: grid;
  grid-template-columns: 72px minmax(120px, 1.1fr) minmax(160px, 1.4fr) 140px minmax(160px, 1.6fr) 48px auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: var(--edge) solid var(--outline);
  background: var(--panel-quiet);
}
.row--head {
  background: transparent;
  border-color: transparent;
  padding-top: 0;
  padding-bottom: 0;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.row--add { background: var(--panel); }
.row--off { opacity: 0.55; }
.row__order { display: flex; gap: 4px; }
.row__actions { display: flex; gap: 6px; justify-content: flex-end; }
.row.is-dirty { border-color: #3a5560; }

.form-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

@media (max-width: 900px) {
  .row { grid-template-columns: 1fr 1fr; }
  .row--head { display: none; }
  .row__actions { grid-column: span 2; }
  .grid-2 { grid-template-columns: 1fr; }
}
