/* gomotologominer — control surface.
   One accent, one type scale, three surface levels. Every interactive element
   has a hover and a focus state; nothing leans on shadow alone for depth. */
:root {
  --bg: #08090c;
  --panel: #0f1116;
  --panel-2: #14171d;
  --panel-3: #1b1f27;
  --line: rgba(255, 255, 255, .075);
  --line-2: rgba(255, 255, 255, .14);
  --fg: #ededf0;
  --fg-2: #c4c7ce;
  --muted: #8b8f99;
  --accent: #63b3ff;
  --accent-2: #8fcaff;
  --accent-dim: rgba(99, 179, 255, .12);
  --accent-line: rgba(99, 179, 255, .34);
  --ok: #45d9a0;
  --warn: #ffc45e;
  --bad: #ff6b6b;
  --violet: #a78bfa;
  --teal: #46d3c2;
  --r-sm: 8px;
  --r: 13px;
  --r-lg: 18px;
  --shadow: 0 24px 70px rgba(0, 0, 0, .55);
  --ease: cubic-bezier(.32, .72, 0, 1);
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 14px/1.55 "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px);
  min-height: 100vh;
}
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background:
    radial-gradient(900px 520px at 8% -8%, rgba(99, 179, 255, .10), transparent 60%),
    radial-gradient(760px 480px at 105% 8%, rgba(167, 139, 250, .07), transparent 62%),
    radial-gradient(900px 600px at 50% 115%, rgba(70, 211, 194, .045), transparent 60%);
}
h1, h2, h3,
.brand-txt b, .tile .v, .hv, .bp-name, .login-card h1, .drawer h3 {
  font-family: "Outfit", "Inter", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
.hidden { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; }
::selection { background: rgba(99, 179, 255, .3); }
:focus-visible { outline: 2px solid var(--accent-line); outline-offset: 2px; }
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }

svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.ic { width: 14px; height: 14px; }

/* ---------------------------------------------------------------- controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid var(--line-2); background: linear-gradient(180deg, var(--panel-3), var(--panel-2)); color: var(--fg);
  padding: 8px 14px; border-radius: var(--r-sm); cursor: pointer; font: inherit;
  font-size: 13px; font-weight: 550; white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
  transition: background .15s var(--ease), border-color .15s var(--ease), transform .1s;
}
.btn:hover { background: var(--panel-3); border-color: rgba(148, 170, 205, .34); }
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: linear-gradient(135deg, #6cbaff, #8fcaff); border-color: transparent; color: #061019;
  font-weight: 650; box-shadow: 0 8px 22px rgba(99, 179, 255, .22), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.btn.primary:hover { background: linear-gradient(135deg, #7cc2ff, #a5d6ff); }
.btn.small { padding: 5px 10px; font-size: 12px; }
.btn.danger { color: #ffb4b4; border-color: rgba(255, 107, 107, .32); background: rgba(255, 107, 107, .06); }
.btn.danger:hover { background: rgba(255, 107, 107, .13); border-color: rgba(255, 107, 107, .55); }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.icon-btn {
  display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: transparent;
  color: var(--muted); cursor: pointer; transition: color .15s, border-color .15s, background .15s;
}
.icon-btn:hover { color: var(--fg); border-color: var(--line-2); background: var(--panel-2); }

input, select, textarea {
  background: #080d14; border: 1px solid var(--line-2); color: var(--fg);
  padding: 9px 11px; border-radius: var(--r-sm); font: inherit; width: 100%;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .35);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
input:hover, select:hover { border-color: rgba(148, 170, 205, .34); }
input:focus, select:focus {
  outline: none; border-color: var(--accent); background: #0a1119;
  box-shadow: 0 0 0 3px rgba(99, 179, 255, .16), inset 0 1px 3px rgba(0, 0, 0, .35);
}
input::placeholder { color: #596578; }
select { cursor: pointer; appearance: none; padding-right: 32px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b96a8' stroke-width='2.4' stroke-linecap='round'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat; background-position: right 11px center; }
input[type=checkbox] { width: auto; }
.err { color: #ffb4b4; font-size: 12px; min-height: 15px; }

/* ---------------------------------------------------------------- login */
/* Deliberately generic: the sign-in page says nothing about what the panel
   controls, who runs it or what it mines. */
.login {
  display: grid; place-items: center; min-height: 100vh; padding: 24px;
}
.login-card {
  width: min(360px, 100%); display: grid; gap: 12px; padding: 32px 30px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .02), transparent), var(--panel);
  border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow);
}
.login-mark {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: var(--accent-dim); border: 1px solid var(--accent-line); color: var(--accent-2);
  margin-bottom: 4px;
}
.login-mark svg { width: 18px; height: 18px; }
.login-card h1 { margin: 0; font-size: 18px; font-weight: 650; letter-spacing: -.2px; }
.login-sub { margin: -8px 0 4px; font-size: 12.5px; color: var(--muted); }
.login-card label { display: grid; gap: 6px; font-size: 11px; color: var(--muted); font-weight: 650;
  text-transform: uppercase; letter-spacing: .7px; }
.login-card .btn { margin-top: 4px; }

/* ---------------------------------------------------------------- shell */
.app { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side {
  background: linear-gradient(180deg, rgba(17, 24, 35, .72), rgba(9, 13, 19, .9));
  border-right: 1px solid var(--line); backdrop-filter: blur(16px);
  display: flex; flex-direction: column; gap: 4px; padding: 18px 14px;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 2px 6px 18px; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(99, 179, 255, .26), rgba(167, 139, 250, .16));
  border: 1px solid var(--accent-line); color: var(--accent-2);
  box-shadow: 0 8px 24px rgba(99, 179, 255, .16); flex: none;
}
.brand-mark svg { width: 16px; height: 16px; }
.brand-txt { display: flex; flex-direction: column; min-width: 0; }
.brand-txt b { font-size: 13.5px; font-weight: 650; letter-spacing: -.1px; }
.brand-txt i { font-style: normal; font-size: 9.5px; letter-spacing: 1.1px; text-transform: uppercase; color: var(--muted); }
.side nav { display: grid; gap: 2px; }
.side nav a {
  position: relative; display: flex; align-items: center; gap: 10px; color: var(--fg-2);
  padding: 9px 10px; border-radius: var(--r-sm); font-size: 13px; font-weight: 500;
  transition: background .14s var(--ease), color .14s var(--ease);
}
.side nav a svg { color: var(--muted); transition: color .14s; width: 16px; height: 16px; }
.side nav a:hover { background: rgba(255, 255, 255, .035); color: var(--fg); }
.side nav a:hover svg { color: var(--fg-2); }
.side nav a.on {
  background: linear-gradient(90deg, rgba(99, 179, 255, .14), rgba(99, 179, 255, .05));
  color: var(--accent-2);
}
.side nav a.on::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px;
  border-radius: 2px; background: var(--accent); box-shadow: 0 0 12px rgba(99, 179, 255, .6);
}
.side nav a.on svg { color: var(--accent); }
.navlab {
  font-size: 9.5px; text-transform: uppercase; letter-spacing: 1.2px; color: #5a6474;
  padding: 16px 10px 5px; font-weight: 700;
}
.side-foot {
  margin-top: auto; display: flex; align-items: center; gap: 8px; justify-content: space-between;
  padding-top: 14px; border-top: 1px solid var(--line);
}
.me { display: flex; align-items: center; gap: 9px; min-width: 0; font-size: 12px; color: var(--fg-2); }
.me-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; overflow: hidden; }
.avatar {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: var(--panel-3); border: 1px solid var(--line-2); color: var(--fg-2);
  font-size: 12px; font-weight: 700; text-transform: uppercase; flex: none;
}
.role {
  align-self: flex-start; font-size: 9px; text-transform: uppercase; letter-spacing: .8px;
  font-weight: 700; padding: 2px 5px; border-radius: 4px; border: 1px solid var(--line-2); color: var(--muted);
}
.role.admin { color: var(--accent-2); border-color: var(--accent-line); background: var(--accent-dim); }
.role.worker { color: #8ee0ae; border-color: rgba(61, 220, 151, .35); background: rgba(61, 220, 151, .1); }

.main { min-width: 0; display: flex; flex-direction: column; }
.top {
  display: flex; align-items: center; gap: 12px; padding: 0 22px; height: 60px;
  border-bottom: 1px solid var(--line); background: rgba(7, 10, 15, .72);
  backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 20;
}
.top-title { display: flex; align-items: center; gap: 9px; min-width: 0; }
.top h2 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -.2px; }
.crumb { font-size: 12px; color: var(--muted); }
.crumb-sep { width: 13px; height: 13px; color: #3e4a5c; transform: rotate(0deg); }
.fleet {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted);
  padding: 4px 11px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .015);
}
.fleet:empty { display: none; }
.fleet::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok);
  box-shadow: 0 0 8px rgba(61, 220, 151, .7); }
.fleet b { color: var(--ok); font-weight: 650; }
.fleet.bad::before { background: var(--bad); box-shadow: 0 0 8px rgba(255, 107, 107, .7); }
.fleet.bad b { color: var(--bad); }
.top-actions { margin-left: auto; display: flex; gap: 8px; }
.view { padding: 22px; display: grid; gap: 16px; align-content: start; max-width: 1560px; width: 100%; margin: 0 auto; }
.lead { font-size: 13px; color: var(--muted); margin-top: -6px; max-width: 78ch; }

/* ---------------------------------------------------------------- data */
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tile {
  position: relative; background: linear-gradient(180deg, rgba(255, 255, 255, .022), transparent), var(--panel);
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 15px 16px 16px; overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
}
.tile .k { display: flex; align-items: center; gap: 7px; color: var(--muted);
  font-size: 10.5px; font-weight: 650; letter-spacing: .5px; text-transform: uppercase; }
.tile .k svg { width: 13px; height: 13px; }
.tile .v { font-size: 24px; font-weight: 650; margin-top: 9px; letter-spacing: -.6px;
  font-variant-numeric: tabular-nums; line-height: 1.1; }
.tile.ok .v { color: var(--ok); } .tile.ok .k svg { color: var(--ok); }
.tile.bad .v { color: var(--bad); } .tile.bad .k svg { color: var(--bad); }
.tile.hero {
  grid-column: span 2; grid-row: span 2;
  background:
    radial-gradient(360px 200px at 100% 0%, rgba(99, 179, 255, .14), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, .03), transparent), var(--panel);
  display: flex; flex-direction: column; justify-content: center;
}
.tile.hero .k { font-size: 11px; }
.tile.hero .v { font-size: 38px; margin-top: 10px; letter-spacing: -1.2px; }
.tile.hero::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 150px; height: 150px;
  border-radius: 50%; border: 1px solid rgba(99, 179, 255, .18); pointer-events: none;
}
/* The two lanes are different coins on different pools; the hero keeps them
   apart instead of summing them into one meaningless number. */
.hsplit { display: flex; gap: 34px; margin-top: 14px; flex-wrap: wrap; position: relative; z-index: 1; }
.hblk { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.hlab { font-size: 10px; letter-spacing: .9px; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.hv { font-size: 31px; font-weight: 650; letter-spacing: -.9px; line-height: 1.05;
  font-variant-numeric: tabular-nums; }
.hv.cpu { color: var(--teal); }
.hv.gpu { color: var(--violet); }
.hlab.cpu { color: rgba(70, 211, 194, .8); }
.hlab.gpu { color: rgba(167, 139, 250, .85); }
.hsub { margin-top: 12px; font-size: 11.5px; color: var(--muted); position: relative; z-index: 1; }
@media (max-width: 820px) {
  .hsplit { gap: 22px; }
  .hv { font-size: 25px; }
}
@media (max-width: 1200px) {
  .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tile.hero { grid-column: span 2; }
}
@media (max-width: 820px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile.hero { grid-column: span 2; grid-row: auto; }
}

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .018), transparent), var(--panel);
  border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .02);
}
.card-head {
  display: flex; align-items: center; gap: 9px; padding: 13px 16px; min-height: 46px;
  border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 650;
  letter-spacing: .2px; color: var(--fg-2); background: rgba(255, 255, 255, .012);
}
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .8px;
  font-weight: 700; background: var(--panel-2); position: sticky; top: 0; }
tbody tr { transition: background .12s; }
tbody tr:hover td { background: rgba(99, 179, 255, .045); }
tbody tr:last-child td { border-bottom: 0; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.code { font-family: "JetBrains Mono", "Cascadia Mono", Consolas, monospace; font-size: 11px; color: var(--muted); }
td.code { max-width: 230px; overflow: hidden; text-overflow: ellipsis; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 7px;
  border-radius: 999px; font-size: 10.5px; font-weight: 650; letter-spacing: .3px; text-transform: uppercase; }
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.online { background: rgba(61, 220, 151, .12); color: var(--ok); }
.badge.online::before { box-shadow: 0 0 7px rgba(61, 220, 151, .8); }
.badge.offline { background: rgba(139, 150, 168, .12); color: var(--muted); }
.badge.hot { background: rgba(255, 107, 107, .13); color: var(--bad); }
.badge.weak { background: rgba(255, 196, 94, .12); color: var(--warn); }
.badge.disabled { background: rgba(139, 150, 168, .1); color: #5c6675; }
.row-actions { display: flex; gap: 6px; }
.bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.bar input, .bar select { width: auto; min-width: 170px; }
.warnband {
  background: rgba(255, 196, 94, .07); border: 1px solid rgba(255, 196, 94, .26);
  color: #ffd98f; padding: 11px 14px; border-radius: var(--r-sm); font-size: 12.5px;
}
.lane-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 7px;
  font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums;
  background: rgba(255, 255, 255, .03); border: 1px solid var(--line);
}
.lane-chip::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.lane-chip.cpu { color: var(--teal); background: rgba(70, 211, 194, .08); border-color: rgba(70, 211, 194, .2); }
.lane-chip.gpu { color: var(--violet); background: rgba(167, 139, 250, .09); border-color: rgba(167, 139, 250, .22); }
.lane-chip.off { color: var(--muted); background: transparent; }
.lane-chip.off::before { background: var(--muted); }

/* ---------------------------------------------------------------- map */
.mapcard { display: flex; flex-direction: column; }
.mapbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--fg-2);
  font-weight: 650; background: rgba(255, 255, 255, .012); }
.mapbar .legend { display: flex; align-items: center; gap: 6px; margin-left: auto;
  font-weight: 500; color: var(--muted); font-size: 11px; }
.mapbar .legend i { width: 11px; height: 11px; border-radius: 3px; background: var(--accent);
  opacity: .2; border: 1px solid var(--accent-line); }
.mapbar .legend i:nth-child(2) { opacity: .45; }
.mapbar .legend i:nth-child(3) { opacity: .8; }
.wm-wrap { position: relative; padding: 8px 10px; }
.wm-svg { width: 100%; height: auto; display: block; overflow: visible; }
.wm-c { fill: #141c27; stroke: #0a0f16; stroke-width: .6; stroke-linejoin: round;
  transition: fill-opacity .16s; }
.wm-c.wm-hot { fill: var(--accent); fill-opacity: var(--wm-op, .4); cursor: pointer; }
.wm-c.wm-on { fill-opacity: .95; stroke: var(--accent-2); stroke-width: .9; }
.wm-c.wm-picked { fill-opacity: .95; stroke: var(--accent-2); stroke-width: 1.2; }
.wm-c.wm-dim { opacity: .3; }
.wm-failed { padding: 24px 16px; }
.wm-tip { position: absolute; transform: translate(-50%, -100%); pointer-events: none;
  background: var(--panel-3); border: 1px solid var(--line-2); border-radius: var(--r-sm);
  padding: 7px 10px; font-size: 12px; line-height: 1.35; box-shadow: var(--shadow);
  white-space: nowrap; z-index: 5; }
.wm-tip-h { font-weight: 650; margin-bottom: 1px; }

/* ---------------------------------------------------------------- builder */
.buildgrid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; align-items: start; }
@media (max-width: 1060px) { .buildgrid { grid-template-columns: 1fr; } }
.bform { display: flex; flex-direction: column; }
.bgroup { padding: 18px 20px; border-bottom: 1px solid var(--line); }
.bgroup-t { font-size: 12.5px; font-weight: 650; color: var(--fg); margin-bottom: 2px; }
.bgroup-n { font-size: 12px; color: var(--muted); margin-bottom: 14px; max-width: 66ch; }
.brow { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 3px 16px;
  padding: 8px 0; }
.brow .bl { font-size: 13px; color: var(--fg); }
.brow .bh { grid-column: 2; font-size: 11.5px; color: var(--muted); margin-top: -1px; }
.brow input[type=text], .brow input[type=number], .brow select { max-width: 300px; }
.bgroup > input { max-width: 340px; }
.binput { display: flex; align-items: center; gap: 8px; }
.binput input { width: 84px; max-width: 84px; text-align: right; font-variant-numeric: tabular-nums; }
.bunit { font-size: 11.5px; color: var(--muted); font-family: ui-monospace, monospace; }
.binput.dim { opacity: .38; }

.bmore { border-bottom: 1px solid var(--line); }
.bmore > summary { display: flex; align-items: center; gap: 9px; padding: 15px 20px;
  cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--fg-2); list-style: none;
  user-select: none; transition: color .14s, background .14s; }
.bmore > summary::-webkit-details-marker { display: none; }
.bmore > summary::before { content: "+"; color: var(--accent); font-weight: 700; font-size: 15px;
  width: 12px; }
.bmore[open] > summary::before { content: "−"; }
.bmore > summary:hover { color: var(--fg); background: rgba(255, 255, 255, .015); }
.mbody { padding: 0 20px 16px; }
.msw { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px 18px;
  padding-top: 14px; margin-top: 10px; border-top: 1px solid var(--line); }

.bfoot { display: flex; align-items: center; gap: 16px; padding: 14px 20px;
  background: rgba(255, 255, 255, .015); }
.bsum { flex: 1 1 auto; font-size: 12px; color: var(--muted); line-height: 1.5; display: grid; gap: 4px; }
.bsub { margin: 16px 0 2px; font-size: 10px; text-transform: uppercase; letter-spacing: .9px;
  color: var(--muted); font-weight: 700; }
.bprow { display: flex; gap: 10px; font-size: 12px; line-height: 1.55; }
.bpk { color: var(--muted); flex: none; min-width: 88px; }
.bpv { color: var(--fg-2); overflow-wrap: anywhere; }
.bwarn { margin: 0 20px 14px; padding: 11px 13px; border-radius: var(--r-sm); font-size: 12.5px;
  background: rgba(255, 196, 94, .08); border: 1px solid rgba(255, 196, 94, .28); color: #ffd98f; }
.bempty { padding: 34px 16px; text-align: center; color: var(--muted); font-size: 13px; }

.bpreview {
  position: sticky; top: 76px; padding: 20px;
  display: flex; flex-direction: column; gap: 14px;
  background:
    radial-gradient(260px 160px at 100% 0%, rgba(99, 179, 255, .12), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, .025), transparent), var(--panel);
  border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
}
.bp-t { font-size: 10.5px; text-transform: uppercase; letter-spacing: 1.1px; color: var(--muted); font-weight: 700; }
.bp-name { font-size: 19px; font-weight: 650; letter-spacing: -.4px; word-break: break-word; }
.bp-sum { font-size: 12.5px; color: var(--fg-2); line-height: 1.6; }
.bp-note { font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.bp-dl { margin-top: 2px; }
.bp-rule { height: 1px; background: var(--line); margin: 2px 0; }

.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none;
  font-size: 12.5px; color: var(--fg-2); }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 34px; height: 19px; border-radius: 999px; background: var(--line-2);
  position: relative; transition: background .16s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px;
  border-radius: 50%; background: #8d97a6; transition: transform .16s, background .16s; }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(15px); background: #061019; }
.switch:hover .stext { color: var(--fg); }

/* worker licenses */
.wform { display: grid; grid-template-columns: repeat(auto-fit, minmax(176px, 1fr));
  gap: 12px 14px; padding: 16px 20px; align-items: end; }
.wfield { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.wl { font-size: 10.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted);
  font-weight: 650; }
.wh { font-size: 11px; color: var(--muted); }
.wcreate { display: flex; align-items: stretch; }
.wcreate .btn { width: 100%; }
.wform input[type=date] { color-scheme: dark; }

.result { margin: 0 20px 20px; padding: 16px; border-radius: var(--r);
  border: 1px solid rgba(61, 220, 151, .3); background: rgba(61, 220, 151, .06);
  display: flex; flex-direction: column; gap: 13px; align-items: flex-start; }
.result .rt { font-weight: 650; color: #8ee0ae; font-size: 13px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; width: 100%; }
.fact { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.fact .fk { font-size: 10px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted);
  font-weight: 650; }
.fact .fv { font: 600 12px/1.4 ui-monospace, monospace; word-break: break-all; }

/* ---------------------------------------------------------------- drawer */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(580px, 100%);
  background: linear-gradient(180deg, rgba(17, 24, 35, .6), transparent 260px), var(--panel);
  border-left: 1px solid var(--line); padding: 22px; overflow-y: auto; z-index: 40;
  box-shadow: -30px 0 80px rgba(0, 0, 0, .55); animation: drawerin .2s var(--ease); }
@keyframes drawerin { from { transform: translateX(24px); opacity: .4; } }
.drawer h3 { margin: 0 0 4px; font-size: 16px; letter-spacing: -.2px; }
.dtiles { grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 16px 0; }
.dtiles .tile { padding: 11px 12px; }
.dtiles .tile .v { font-size: 17px; margin-top: 4px; }
@media (max-width: 560px) { .dtiles { grid-template-columns: repeat(2, 1fr); } }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 9px 14px; font-size: 13px; margin: 18px 0;
  padding: 14px 16px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r); }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
canvas { width: 100%; height: 170px; display: block; background: #080d13; border-radius: var(--r-sm);
  border: 1px solid var(--line); }

.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px;
  background: var(--panel-3); border: 1px solid var(--line-2); padding: 11px 16px;
  border-radius: 10px; box-shadow: var(--shadow); font-size: 13px; z-index: 60;
  animation: toastin .22s var(--ease); }
.toast .ticon { display: grid; place-items: center; width: 18px; height: 18px; flex: none;
  border-radius: 50%; background: rgba(61, 220, 151, .18); color: var(--ok);
  font-size: 11px; font-weight: 800; }
.toast.error { background: #2b1719; border-color: rgba(255, 107, 107, .4); color: #ffb4b4; }
.toast.error .ticon { background: rgba(255, 107, 107, .2); color: var(--bad); }
@keyframes toastin { from { opacity: 0; transform: translate(-50%, 8px); } }

.setupband { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 16px;
  border-radius: var(--r); background: rgba(255, 196, 94, .06);
  border: 1px solid rgba(255, 196, 94, .26); }
.setupband .sb-t { font-weight: 650; color: #ffd98f; font-size: 13px; }
.setupband .muted { flex: 1 1 240px; font-size: 12px; }

td.bad { color: var(--bad); font-size: 12px; }
.geo { display: flex; align-items: center; gap: 7px; }
.geo .cc {
  font: 700 9.5px/1 ui-monospace, monospace; color: var(--fg-2); letter-spacing: .6px;
  padding: 4px 6px; border: 1px solid var(--line-2); border-radius: 5px; background: var(--panel-2);
}
.geo .cn { font-size: 12px; color: var(--muted); }

.modal-back { position: fixed; inset: 0; background: rgba(3, 6, 10, .72); backdrop-filter: blur(4px);
  display: grid; place-items: center; z-index: 50; animation: toastin .16s var(--ease); }
.modal { width: min(470px, 92vw); background: var(--panel); border: 1px solid var(--line-2);
  border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.modal-body { display: flex; flex-direction: column; gap: 8px; padding: 16px; }
.modal .btn { align-self: flex-start; }
.modal .card-head { padding: 14px 16px; }
.mhint { font-size: 12px; line-height: 1.45; margin-bottom: 2px; }
.mlab { font-size: 10.5px; text-transform: uppercase; letter-spacing: .7px; color: var(--muted);
  font-weight: 650; margin-top: 4px; }
.mfoot { display: flex; justify-content: flex-end; gap: 8px; padding: 0 16px 16px; }

/* legacy helpers still referenced by untouched views */
.form { padding: 14px; display: flex; flex-direction: column; gap: 14px; }
.frow { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 11px; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); }
.field .hint { font-size: 11px; color: var(--muted); opacity: .8; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 18px;
  border-top: 1px solid var(--line); padding-top: 14px; }
.facts-actions { display: flex; gap: 10px; }

@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center;
    border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 14px; gap: 10px; min-width: 0; }
  .brand { padding: 0; }
  .brand-txt i { display: none; }
  .side nav { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 4px; width: 100%; order: 3;
    scrollbar-width: none; padding-bottom: 2px; min-width: 0; }
  .side nav a { white-space: nowrap; }
  .side nav a.on::before { top: auto; bottom: 0; left: 8px; right: 8px; width: auto; height: 2px; }
  .navlab { display: none; }
  .side-foot { margin: 0 0 0 auto; border: 0; padding: 0; }
  .top { padding: 0 14px; height: 54px; }
  .crumb, .crumb-sep { display: none; }
  .view { padding: 14px; }
  .kv { grid-template-columns: 1fr; }
  .brow { grid-template-columns: 1fr; }
  .brow .bh { grid-column: 1; }
  .bpreview { position: static; }
}

/* configs */
.cfcustom { display: grid; grid-template-columns: 1fr 110px; gap: 8px; }
.cfnew { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; gap: 8px; }
.durs { display: flex; flex-wrap: wrap; gap: 6px; }
.durs .btn.on { border-color: var(--accent); color: var(--accent-2); background: var(--accent-dim); }
.gone { display: flex; }

/* builder presets */
.bpresets { display: grid; gap: 6px; }
.bpreset { text-align: left; border: 1px solid var(--line-2); background: var(--panel-2);
  border-radius: var(--r-sm); padding: 9px 11px; cursor: pointer; color: var(--fg-2);
  transition: border-color .15s, background .15s; }
.bpreset:hover { border-color: var(--accent-line); }
.bpreset.on { border-color: var(--accent); background: var(--accent-dim); }
.bpreset .bp-t2 { font-size: 12.5px; font-weight: 650; color: var(--fg); }
.bpreset .bp-n2 { font-size: 11px; color: var(--muted); margin-top: 1px; }
.bnum { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 8px;
  border-radius: 50%; background: var(--accent-dim); border: 1px solid var(--accent-line);
  color: var(--accent-2); font-size: 10.5px; font-weight: 700; }
.bgroup-t { display: flex; align-items: center; }
