/* ======================================================================
   DRACONIUM PANEL — design system v2.2
   Light-first premium theme (dark mode via [data-theme="dark"]).
   No frameworks, no build step. Console stays dark — editor style.
   ====================================================================== */

:root {
  /* ---- light (default) surfaces ---- */
  --bg0: #eef1f6;            /* app chrome / sidebar        */
  --bg1: #f5f7fb;            /* main content background     */
  --bg2: #ffffff;            /* panels / cards              */
  --bg3: #f1f4f9;            /* inputs, wells               */
  --bg4: #e8edf5;            /* hover surfaces              */
  --bg-inset: #e6ebf3;       /* pressed / inset             */

  --line: #e2e8f1;           /* hairlines                   */
  --line2: #d3dce8;          /* stronger lines              */
  --acc-line: #cfe4db;       /* accent-tinted line          */

  /* text */
  --tx0: #151e29;            /* headings / strong           */
  --tx1: #3d4c5f;            /* body                        */
  --tx2: #74859b;            /* muted                       */
  --tx3: #9aa9bc;            /* faint                       */

  /* semantics — tuned for white surfaces */
  --acc: #0ea26e;
  --acc-strong: #0b8a5d;
  --acc-contrast: #ffffff;
  --acc-dim: rgba(14, 162, 110, 0.10);
  --acc-glow: rgba(14, 162, 110, 0.22);
  --ok: #0ea26e;
  --warn: #b97f14;
  --warn-dim: rgba(185, 127, 20, 0.12);
  --err: #d64545;
  --err-dim: rgba(214, 69, 69, 0.10);
  --info: #2e7fa8;
  --cmd: #0b7d9e;

  /* shape + depth */
  --r: 12px;
  --r-sm: 8px;
  --shadow-1: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-2: 0 1px 2px rgba(16, 24, 40, 0.04), 0 6px 20px -6px rgba(16, 24, 40, 0.10);
  --shadow-pop: 0 4px 6px -2px rgba(16, 24, 40, 0.06), 0 20px 45px -12px rgba(16, 24, 40, 0.22);

  --console-bg: #0c1117;     /* console is a dark editor in both themes */
  --console-line: #1d2733;
  --console-tx: #c6d3e2;

  --side-w: 252px;
  --mono: ui-monospace, "SFMono-Regular", "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------------- dark theme ---------------- */
[data-theme="dark"] {
  --bg0: #0a0d12;
  --bg1: #0d1117;
  --bg2: #121822;
  --bg3: #18202c;
  --bg4: #1d2735;
  --bg-inset: #0a0e14;

  --line: #1e2836;
  --line2: #2b3a4e;
  --acc-line: #24384a;

  --tx0: #e9eef6;
  --tx1: #a6b4c6;
  --tx2: #6a7b92;
  --tx3: #48586e;

  --acc: #3fd0a4;
  --acc-strong: #56e2b8;
  --acc-contrast: #062b1e;
  --acc-dim: rgba(63, 208, 164, 0.11);
  --acc-glow: rgba(63, 208, 164, 0.25);
  --ok: #3fd0a4;
  --warn: #e6b455;
  --warn-dim: rgba(230, 180, 85, 0.12);
  --err: #ef6b5e;
  --err-dim: rgba(239, 107, 94, 0.12);
  --info: #82aecb;
  --cmd: #6fd6e8;

  --shadow-1: 0 1px 0 rgba(255, 255, 255, 0.03) inset;
  --shadow-2: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 10px 30px -12px rgba(0, 0, 0, 0.55);
  --shadow-pop: 0 12px 40px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.4);

  --console-bg: #070a0f;
  --console-line: #16202c;
  --console-tx: #c6d3e2;
}

/* ---------- reset ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden], .hidden { display: none !important; }
html, body { height: 100%; }
body {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  color: var(--tx0);
  background: var(--bg0);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background 0.25s ease, color 0.25s ease;
}
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
.mono { font-family: var(--mono); }
.dim { color: var(--tx2); }

/* ---- global icon defaults (feather-style stroke icons) ----
   Every svg.ic is sized + stroked here so icons NEVER fall back to the
   300x150 replaced-element default (the giant-folder bug) and always
   render as clean line icons. Context rules below override size/color. */
svg.ic {
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  display: inline-block;
  vertical-align: -0.14em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---- global select: one clean chevron (was a broken double-arrow hack) ---- */
select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' fill='none' stroke='%2374859b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-position: right 11px center;
  background-size: 10px 6px;
  background-repeat: no-repeat;
  padding-right: 30px;
}

/* scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-track { background: transparent; }

/* ====================== layout ====================== */
#app { display: flex; min-height: 100vh; }

#sidebar {
  width: var(--side-w);
  flex: 0 0 var(--side-w);
  background: var(--bg0);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 40;
}

#main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1100px 340px at 60% -140px, var(--acc-glow), transparent 62%),
    var(--bg1);
  min-height: 100vh;
}

#view {
  flex: 1;
  padding: 24px 28px 48px;
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  outline: none;
}

/* ====================== sidebar ====================== */
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 18px 18px 16px;
  border-bottom: 1px solid var(--line);
}
.brand-mark { width: 32px; height: 32px; flex: 0 0 32px; filter: drop-shadow(0 2px 6px var(--acc-glow)); }
.brand-name { line-height: 1.25; min-width: 0; }
.brand-name strong { display: block; font-size: 15px; letter-spacing: 0.2px; font-weight: 700; }
.brand-name span { display: block; font-size: 10px; color: var(--tx2); letter-spacing: 1px; text-transform: uppercase; font-weight: 600; }

.nav-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--tx3);
  padding: 14px 12px 4px;
}
#nav { padding: 8px 12px 12px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8.5px 11px;
  border-radius: var(--r-sm);
  color: var(--tx1);
  font-size: 13.5px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background 0.16s, color 0.16s, border-color 0.16s;
  position: relative;
}
.nav-item:hover { background: var(--bg4); color: var(--tx0); }
.nav-item.active {
  background: var(--acc-dim);
  border-color: transparent;
  color: var(--acc);
  font-weight: 600;
}
.nav-item .ic { width: 16.5px; height: 16.5px; flex: 0 0 16.5px; }
.nav-count {
  margin-left: auto;
  font-style: normal;
  font-size: 11px;
  font-family: var(--mono);
  color: var(--tx2);
  background: var(--bg3);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 7px;
  line-height: 17px;
  min-width: 21px;
  text-align: center;
}
.nav-item.active .nav-count { color: var(--acc); background: transparent; border-color: var(--acc-line); }

.side-foot {
  margin-top: auto;
  padding: 12px 14px 14px;
  border-top: 1px solid var(--line);
  font-size: 11px;
}
.side-foot-row { display: flex; justify-content: space-between; color: var(--tx1); gap: 8px; }
.side-foot-row.dim { color: var(--tx3); }
.side-foot .ver { color: var(--tx2); }

.acct {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: var(--r);
  background: var(--bg2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
  margin-bottom: 9px;
}
.acct-avatar {
  width: 32px; height: 32px; flex: 0 0 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--acc), var(--acc-strong));
  color: var(--acc-contrast);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
  font-family: var(--sans);
}
.acct-main { min-width: 0; flex: 1; }
.acct-name { font-weight: 650; font-size: 13px; color: var(--tx0); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-role { margin-top: 1px; }

.rolechip {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 1.5px 7px;
  border-radius: 20px;
  background: var(--bg3);
  color: var(--tx1);
  border: 1px solid var(--line);
}
.rolechip.admin { background: var(--warn-dim); color: var(--warn); border-color: transparent; }
.rolechip.premium { background: var(--acc-dim); color: var(--acc); border-color: transparent; }
.rolechip.free { background: var(--bg3); color: var(--tx2); }
.rolechip.pending { background: var(--warn-dim); color: var(--warn); }

#side-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(9, 13, 20, 0.55);
  backdrop-filter: blur(2px);
  z-index: 35;
}

/* ====================== topbar ====================== */
#topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 28px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--bg1) 82%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
#view-title { font-size: 16.5px; font-weight: 700; letter-spacing: -0.15px; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.conn-pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11.5px; font-weight: 600;
  color: var(--tx2);
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4.5px 11px;
  box-shadow: var(--shadow-1);
}
.conn-pill .dot { width: 7px; height: 7px; }
.conn-pill.on { color: var(--acc); border-color: var(--acc-line); }
.conn-pill.on .dot { background: var(--acc); animation: pulse 2.2s infinite; }
.conn-pill.off { color: var(--err); }
.conn-pill.off .dot { background: var(--err); }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 var(--acc-glow); } 50% { box-shadow: 0 0 0 4px transparent; } }

/* ====================== buttons ====================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--r-sm);
  background: var(--bg2);
  border: 1px solid var(--line2);
  color: var(--tx0);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-1);
  white-space: nowrap;
}
.btn:hover { border-color: var(--tx3); transform: translateY(-1px); box-shadow: var(--shadow-2); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn .ic { width: 14.5px; height: 14.5px; }

.btn-primary {
  background: linear-gradient(180deg, var(--acc), var(--acc-strong));
  border-color: transparent;
  color: var(--acc-contrast);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.10), 0 4px 14px -4px var(--acc-glow);
}
.btn-primary:hover { filter: brightness(1.05); box-shadow: 0 2px 4px rgba(16,24,40,.12), 0 6px 18px -4px var(--acc-glow); }

.btn-danger { background: var(--bg2); border-color: var(--line2); color: var(--err); }
.btn-danger:hover { border-color: var(--err); background: var(--err-dim); }
.btn-danger-solid { background: var(--err); border-color: transparent; color: #fff; }
.btn-danger-solid:hover { filter: brightness(1.06); }
.btn-ok { color: var(--acc); }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 7px; }
.btn-add { padding: 7.5px 13px; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 31px; height: 31px;
  border-radius: var(--r-sm);
  color: var(--tx1);
  border: 1px solid transparent;
  transition: all 0.14s;
  flex: 0 0 auto;
}
.icon-btn:hover { background: var(--bg4); color: var(--tx0); border-color: var(--line); }
.icon-btn .ic { width: 15.5px; height: 15.5px; }

/* ====================== badges / dots / chips ====================== */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 650;
  padding: 2.5px 9px;
  border-radius: 999px;
  letter-spacing: 0.2px;
  background: var(--bg3);
  color: var(--tx1);
  border: 1px solid var(--line);
  text-transform: lowercase;
}
.badge .dot { width: 6.5px; height: 6.5px; }
.badge-online, .badge-active { background: var(--acc-dim); color: var(--acc); border-color: transparent; }
.badge-starting { background: var(--info); border-color: transparent; color: #fff; opacity: 0.85; }
.badge-reconnecting { background: var(--warn-dim); color: var(--warn); border-color: transparent; }
.badge-stopping { background: var(--bg3); color: var(--tx2); }
.badge-offline { background: var(--bg3); color: var(--tx2); border-color: var(--line); }
.badge-banned, .badge-dead { background: var(--err-dim); color: var(--err); border-color: transparent; }
.badge-pending { background: var(--warn-dim); color: var(--warn); border-color: transparent; }
.badge-ok { background: var(--acc-dim); color: var(--acc); border-color: transparent; }
.badge-warn { background: var(--warn-dim); color: var(--warn); border-color: transparent; }
.badge-err { background: var(--err-dim); color: var(--err); border-color: transparent; }

.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--tx3);
  display: inline-block; flex: 0 0 auto;
}
.dot.online { background: var(--acc); box-shadow: 0 0 0 3px var(--acc-dim); }
.dot.offline { background: var(--tx3); }
.dot.starting { background: var(--info); animation: blink 1.1s infinite; }
.dot.reconnecting { background: var(--warn); animation: blink 0.9s infinite; }
.dot.stopping { background: var(--tx2); animation: blink 1.3s infinite; }
.dot.dead { background: var(--err); }
@keyframes blink { 50% { opacity: 0.35; } }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--bg3);
  border: 1px solid var(--line);
  color: var(--tx1);
  white-space: nowrap;
}
.chip.acc { background: var(--acc-dim); color: var(--acc); border-color: transparent; }
.chip .ic { width: 12px; height: 12px; }

.sep { height: 1px; background: var(--line); border: none; }

/* ====================== panels & cards ====================== */
.panel {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-2);
  overflow: hidden;
}
.panel + .panel, .panel + .tiles, .tiles + .panel, .composer + .panel { margin-top: 16px; }
.panel-head {
  display: flex; align-items: center; gap: 9px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 13px; font-weight: 700;
  color: var(--tx0);
  letter-spacing: -0.1px;
}
.panel-head .ic { width: 15px; height: 15px; color: var(--acc); }
.panel-head .right { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--tx2); font-weight: 500; font-size: 12px; }
.panel-body { padding: 6px 0; }
.panel-body.padded { padding: 16px 18px; }

/* ====================== tiles ====================== */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.tile {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px 16px 12px;
  box-shadow: var(--shadow-1);
  transition: transform 0.15s, box-shadow 0.15s;
}
.tile:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); }
.tile-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.7px;
  color: var(--tx2);
}
.tile-label .ic { width: 13px; height: 13px; }
.tile-num { font-size: 26px; font-weight: 750; letter-spacing: -0.5px; margin-top: 3px; font-variant-numeric: tabular-nums; }
.tile-num.n-ok { color: var(--acc); }
.tile-num.n-warn { color: var(--warn); }
.tile-num.n-dim { color: var(--tx2); }

/* ====================== rows ====================== */
.mini-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  transition: background 0.13s;
}
.mini-row:last-child { border-bottom: none; }
.mini-row:hover { background: var(--bg3); }
.mini-row .name { font-weight: 650; font-size: 13.5px; color: var(--tx0); }
.mini-row .srv { font-size: 11.5px; color: var(--tx2); font-family: var(--mono); }
.mini-row .right { margin-left: auto; display: flex; align-items: center; gap: 9px; }
.mini-row .stat { font-size: 12px; color: var(--tx2); font-variant-numeric: tabular-nums; }

.bot-row {
  display: flex; align-items: center; gap: 16px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.13s;
}
.bot-row:last-child { border-bottom: none; }
.bot-row:hover { background: var(--bg3); }
.bot-id { display: flex; align-items: center; gap: 10px; min-width: 178px; }
.bot-id .n { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 13.5px; }
.bot-id .u { font-size: 11.5px; color: var(--tx2); font-family: var(--mono); margin-top: 1px; }
.bot-col { min-width: 90px; }
.bot-col .k { font-size: 10px; font-weight: 700; letter-spacing: 0.7px; text-transform: uppercase; color: var(--tx3); }
.bot-col .v { font-size: 12.5px; color: var(--tx1); font-weight: 550; margin-top: 1px; }
.bot-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }

/* ====================== activity ====================== */
.act-row {
  display: flex; align-items: baseline; gap: 10px;
  padding: 7.5px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
}
.act-row:last-child { border-bottom: none; }
.act-row .t { color: var(--tx3); font-family: var(--mono); font-size: 11px; flex: 0 0 auto; }
.act-row .who { font-weight: 650; color: var(--tx0); flex: 0 0 auto; }
.act-row .tx { color: var(--tx1); overflow-wrap: anywhere; }
.act-row.lv-success .tx { color: var(--acc); }
.act-row.lv-error .tx { color: var(--err); }
.act-row.lv-warn .tx { color: var(--warn); }

/* ====================== bot detail ====================== */
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--tx2); font-size: 12.5px; font-weight: 600;
  margin-bottom: 14px;
  transition: color 0.14s;
}
.back-link:hover { color: var(--acc); }
.back-link .ic { width: 14px; height: 14px; }

.bot-head { display: flex; align-items: center; gap: 15px; margin-bottom: 18px; flex-wrap: wrap; }
.bot-head .avatar {
  width: 52px; height: 52px; flex: 0 0 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--acc), var(--acc-strong));
  color: var(--acc-contrast);
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; font-weight: 750;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 14px -4px var(--acc-glow);
}
.bh-name { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bh-name h2 { font-size: 21px; font-weight: 750; letter-spacing: -0.3px; }
.bh-sub { font-size: 12.5px; color: var(--tx2); margin-top: 2px; }
.bh-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.info-strip {
  display: grid;
  /* first cell (server host:port) gets a wider track so the address never wraps/truncates */
  grid-template-columns: minmax(185px, 1.45fr) repeat(auto-fit, minmax(135px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.info-cell {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 11px 14px;
  box-shadow: var(--shadow-1);
}
.info-cell .k {
  display: flex; align-items: center; gap: 6px;
  font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.7px;
  color: var(--tx3);
}
.info-cell .k .ic { width: 12.5px; height: 12.5px; color: var(--acc); }
.info-cell .v { font-size: 15.5px; font-weight: 700; margin-top: 3px; font-variant-numeric: tabular-nums; }
.info-cell .v.small { font-size: 12.5px; font-weight: 600; font-family: var(--mono); overflow-wrap: anywhere; }
/* host:port / position must stay on one line — mid-value wraps look broken */
.info-cell .v.small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.healthbar {
  height: 5px; border-radius: 4px;
  background: var(--bg-inset);
  margin-top: 7px;
  overflow: hidden;
}
.healthbar i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--acc), var(--acc-strong));
  border-radius: 4px;
  transition: width 0.4s ease;
}
.healthbar i.low { background: var(--warn); }
.healthbar i.crit { background: var(--err); }

.note {
  background: var(--warn-dim);
  color: var(--warn);
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  padding: 9px 13px;
  font-size: 12.5px;
  font-weight: 550;
  margin-bottom: 14px;
  overflow-wrap: anywhere;
}

/* ====================== console ====================== */
.console-wrap {
  background: var(--console-bg);
  border: 1px solid var(--console-line);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow-2);
}
.console-head {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--console-line);
  background: rgba(255, 255, 255, 0.02);
}
.console-title {
  display: flex; align-items: center; gap: 8px;
  color: #8fa3ba;
  font-size: 12px; font-weight: 650;
  letter-spacing: 0.2px;
}
.console-title .ic { width: 14px; height: 14px; color: var(--acc); }
.console-head .right { margin-left: auto; }
/* target-select outside the dark console head (e.g. bots-page sort): light chrome */
select.target-select {
  background-color: var(--bg2);
  border: 1px solid var(--line2);
  border-radius: var(--r-sm);
  color: var(--tx0);
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 30px 7px 11px;
  box-shadow: var(--shadow-1);
  cursor: pointer;
}
.console-head select.target-select {
  background-color: #131b26;
  border-color: var(--console-line);
  color: var(--console-tx);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 24px 4px 8px;
  box-shadow: none;
}
.console-head select.target-select option { background: #131b26; }

.console {
  height: calc(100vh - 435px);
  min-height: 300px;
  overflow-y: auto;
  padding: 10px 0 12px;
  position: relative;
  font-family: var(--mono);
  font-size: 12.3px;
  line-height: 1.65;
  outline: none;
  scrollbar-width: thin;
  scrollbar-color: #2a3646 transparent;
}
.console .ln {
  display: flex; gap: 10px;
  padding: 0.5px 16px;
  color: var(--console-tx);
}
.console .ln .t { color: #4d5f76; font-size: 11px; flex: 0 0 auto; padding-top: 1px; }
.console .ln .b {
  color: #7ea6d8; flex: 0 0 auto;
  max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.console .ln .b::after { content: " ›"; color: #3b4c61; }
.console .ln .tx { overflow-wrap: anywhere; white-space: pre-wrap; }
.console .ln.lv-system .tx { color: #7d93ad; font-style: italic; }
.console .ln.lv-info .tx { color: var(--console-tx); }
.console .ln.lv-success .tx { color: #3fd0a4; }
.console .ln.lv-warn .tx { color: #e6b455; }
.console .ln.lv-error .tx { color: #ef6b5e; }
.console .ln.lv-chat .tx { color: #dbe6f2; }
.console .ln.lv-command .tx { color: #6fd6e8; }
.console .ln.lv-debug { display: none; }
.console.show-debug .ln.lv-debug { display: flex; }
.console.show-debug .ln.lv-debug .tx { color: #5d7189; }
.console.only-chat .ln:not(.lv-chat):not(.lv-command) { display: none; }

.cmd-new {
  position: sticky;
  bottom: 10px;
  margin-left: 50%;
  transform: translateX(-50%);
  background: var(--acc);
  color: var(--acc-contrast);
  font-size: 11px; font-weight: 700;
  padding: 4px 13px;
  border-radius: 999px;
  box-shadow: 0 4px 14px -2px var(--acc-glow);
  display: none;
}
.cmd-new.show { display: block; }

.chips { display: flex; align-items: center; gap: 6px; }
.fchip, .toggle-pill {
  font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.4px;
  color: #7d93ad;
  background: transparent;
  border: 1px solid #263342;
  border-radius: 999px;
  padding: 2.5px 10px;
  transition: all 0.14s;
}
.fchip:hover, .toggle-pill:hover { border-color: #3a4c61; color: #c6d3e2; }
.fchip.on, .toggle-pill.on { background: var(--acc-dim); border-color: transparent; color: var(--acc); }

.console-input {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px;
  border-top: 1px solid var(--console-line);
  background: rgba(255, 255, 255, 0.02);
}
.console-input .prompt { color: var(--acc); font-family: var(--mono); font-weight: 700; }
.console-input input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #e4edf6;
  font-family: var(--mono);
  font-size: 12.8px;
  caret-color: var(--acc);
}
.console-input input::placeholder { color: #46586e; }
.console-input .btn { background: #14202c; border-color: #263342; color: #aebfd2; }
.console-input .btn:hover { border-color: var(--acc); color: var(--acc); }
.console-head + .console { height: calc(100vh - 485px); }
.console-input + * { margin-top: 0; }
.console-wrap .console-input { margin: 0; }

/* ====================== forms ====================== */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 13px; }
.field label { font-size: 12px; font-weight: 650; color: var(--tx1); letter-spacing: 0.1px; }
.field input, .field select, .field textarea,
.modal input[type="text"], .modal input[type="password"], .modal input[type="number"], .modal select, .modal textarea {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--line2);
  border-radius: var(--r-sm);
  padding: 8.5px 12px;
  font-size: 13.5px;
  color: var(--tx0);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.field input:focus, .field select:focus, .field textarea:focus,
.modal input:focus, .modal select:focus, .modal textarea:focus {
  border-color: var(--acc);
  box-shadow: 0 0 0 3px var(--acc-dim);
  background: var(--bg2);
}
.field textarea, .modal textarea { resize: vertical; min-height: 74px; font-family: var(--mono); font-size: 12.8px; line-height: 1.6; }
.field input:disabled, .field select:disabled, .modal input:disabled { opacity: 0.55; cursor: not-allowed; }
.field .hint { font-size: 11.5px; color: var(--tx2); }
.hint { font-size: 12px; color: var(--tx2); }
.field-error { color: var(--err); font-size: 12px; font-weight: 550; min-height: 0; }
.field-error.show, .field.invalid .field-error { display: block; }
.field-error { display: none; }
.field.invalid input, .field.invalid textarea, .field.invalid select { border-color: var(--err); }
.field.invalid input:focus, .field.invalid textarea:focus { box-shadow: 0 0 0 3px var(--err-dim); }

.switch-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.switch-row:last-child { border-bottom: none; }
.switch-row .lab { font-size: 13px; font-weight: 600; color: var(--tx0); }
.switch-row .sub { font-size: 11.5px; color: var(--tx2); margin-top: 1px; }
.switch { position: relative; width: 38px; height: 22px; flex: 0 0 38px; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch i {
  position: absolute; inset: 0;
  background: var(--bg-inset);
  border: 1px solid var(--line2);
  border-radius: 999px;
  transition: all 0.18s;
}
.switch i::before {
  content: "";
  position: absolute;
  width: 16px; height: 16px;
  left: 2px; top: 2px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.25);
  transition: transform 0.18s;
}
.switch input:checked + i { background: var(--acc); border-color: var(--acc); }
.switch input:checked + i::before { transform: translateX(16px); }
.switch input:disabled + i { opacity: 0.45; }

/* settings page */
.set-section { margin-bottom: 14px; }
.set-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.statline { font-size: 12px; color: var(--tx2); }

/* ====================== toolbar / search ====================== */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.search {
  display: flex; align-items: center; gap: 8px;
  flex: 1;
  max-width: 360px;
  background: var(--bg2);
  border: 1px solid var(--line2);
  border-radius: var(--r-sm);
  padding: 8px 12px;
  box-shadow: var(--shadow-1);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search:focus-within { border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-dim); }
.search .ic { width: 14px; height: 14px; color: var(--tx3); }
.search input { flex: 1; background: none; border: none; outline: none; color: var(--tx0); font-size: 13px; }
.search input::placeholder { color: var(--tx3); }

/* ====================== dropdown menu ====================== */
.menu {
  position: fixed;
  z-index: 90;
  min-width: 208px;
  background: var(--bg2);
  border: 1px solid var(--line2);
  border-radius: var(--r);
  box-shadow: var(--shadow-pop);
  padding: 5px;
  animation: menuIn 0.12s ease;
}
@keyframes menuIn { from { opacity: 0; transform: translateY(-4px) scale(0.98); } to { opacity: 1; transform: none; } }
.menu button {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 8px 11px;
  border-radius: var(--r-sm);
  font-size: 13px; font-weight: 550;
  color: var(--tx1);
  transition: background 0.12s, color 0.12s;
  text-align: left;
}
.menu button:hover { background: var(--bg3); color: var(--tx0); }
.menu button.danger { color: var(--err); }
.menu button.danger:hover { background: var(--err-dim); }
.menu button .ic { width: 14.5px; height: 14.5px; }
.menu .sep { margin: 5px 4px; }

/* ====================== modals ====================== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(10, 15, 22, 0.45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  padding: 18px;
  animation: fadeIn 0.15s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 100%;
  max-width: 470px;
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-pop);
  animation: modalIn 0.18s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }
.modal-head {
  display: flex; align-items: center; gap: 10px;
  padding: 15px 20px 13px;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0;
  background: var(--bg2);
  z-index: 2;
}
.modal-head h3 { font-size: 15.5px; font-weight: 700; letter-spacing: -0.1px; flex: 1; }
.modal-head .ic { width: 16px; height: 16px; }
.modal-body { padding: 16px 20px 4px; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 9px;
  padding: 14px 20px 18px;
}
.danger-note {
  background: var(--err-dim);
  border-radius: var(--r-sm);
  padding: 11px 14px;
  color: var(--tx1);
  font-size: 13px;
  line-height: 1.6;
}
.danger-note strong { color: var(--err); }

.notif-body {
  font-size: 13.5px; color: var(--tx1);
  white-space: pre-wrap;
  background: var(--bg3);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  margin-bottom: 10px;
  overflow-wrap: anywhere;
}
.notif-meta { font-size: 11.5px; color: var(--tx2); }

/* ====================== toasts ====================== */
#toast-root {
  position: fixed;
  right: 20px; bottom: 20px;
  display: flex; flex-direction: column; gap: 9px;
  z-index: 200;
  max-width: 340px;
}
.toast {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--bg2);
  border: 1px solid var(--line2);
  border-radius: var(--r);
  padding: 11px 14px;
  font-size: 13px; font-weight: 550;
  color: var(--tx0);
  box-shadow: var(--shadow-pop);
  animation: toastIn 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}
@keyframes toastIn { from { opacity: 0; transform: translateY(8px) scale(0.97); } to { opacity: 1; transform: none; } }
.toast .ic { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 1px; }
.toast.ok .ic { color: var(--acc); }
.toast.err .ic { color: var(--err); }
.toast.info .ic { color: var(--info); }
.toast.out { opacity: 0; transform: translateY(6px); transition: all 0.3s; }

/* ====================== gates (auth / maintenance) ====================== */
.gate {
  position: fixed; inset: 0;
  z-index: 300;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background:
    radial-gradient(900px 480px at 18% -10%, var(--acc-glow), transparent 60%),
    radial-gradient(700px 420px at 105% 110%, var(--acc-dim), transparent 55%),
    var(--bg1);
  overflow-y: auto;
}
body.gate-mode > #app { display: none; }

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-pop);
  overflow: hidden;
}
.auth-hero {
  padding: 30px 28px 22px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(420px 160px at 50% -60px, var(--acc-glow), transparent 70%);
}
.auth-hero .brand-mark { width: 44px; height: 44px; margin: 0 auto 12px; }
.auth-hero h1 { font-size: 20px; font-weight: 800; letter-spacing: -0.3px; }
.auth-hero p { font-size: 12.5px; color: var(--tx2); margin-top: 5px; }
.auth-body { padding: 20px 24px 6px; }
.auth-tabs {
  display: flex;
  background: var(--bg3);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 3px;
  margin-bottom: 15px;
}
.auth-tabs button {
  flex: 1;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 12.5px; font-weight: 650;
  color: var(--tx2);
  transition: all 0.15s;
}
.auth-tabs button.on { background: var(--bg2); color: var(--tx0); box-shadow: var(--shadow-1); }
.auth-err, .auth-ok {
  display: none;
  border-radius: var(--r-sm);
  padding: 9px 13px;
  font-size: 12.5px; font-weight: 550;
  margin-bottom: 13px;
  overflow-wrap: anywhere;
}
.auth-err.show { display: block; background: var(--err-dim); color: var(--err); }
.auth-ok.show { display: block; background: var(--acc-dim); color: var(--acc); }
.auth-foot {
  padding: 13px 24px 16px;
  text-align: center;
  font-size: 11.5px;
  color: var(--tx3);
}

.maint-card {
  width: 100%;
  max-width: 430px;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-pop);
  padding: 36px 30px;
  text-align: center;
}
.maint-card .tool .ic { width: 40px; height: 40px; color: var(--warn); }
.maint-card h1 { font-size: 20px; font-weight: 800; margin-top: 12px; letter-spacing: -0.3px; }
.maint-card p { font-size: 13px; color: var(--tx2); margin-top: 7px; }
.maint-card .reason {
  margin-top: 15px;
  background: var(--warn-dim);
  color: var(--warn);
  border-radius: var(--r-sm);
  padding: 12px 15px;
  font-size: 13px; font-weight: 600;
  overflow-wrap: anywhere;
}
.maint-actions { margin-top: 20px; display: flex; justify-content: center; }

/* ====================== tables ====================== */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: left;
  font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--tx3);
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.tbl td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr { transition: background 0.12s; }
.tbl tr:hover { background: var(--bg3); }
.tbl select {
  background: var(--bg3);
  border: 1px solid var(--line2);
  border-radius: 7px;
  padding: 4.5px 9px;
  font-size: 12.5px;
  color: var(--tx0);
  outline: none;
}
.row-actions { display: flex; gap: 7px; justify-content: flex-end; }

/* ====================== plans ====================== */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 16px;
  align-items: start;
}
.plan-card {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px 24px 20px;
  box-shadow: var(--shadow-2);
  position: relative;
  transition: transform 0.18s, box-shadow 0.18s;
}
.plan-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-pop); }
.plan-card.premium {
  background:
    linear-gradient(160deg, var(--acc-dim), transparent 45%),
    var(--bg2);
  border-color: var(--acc-line);
}
.plan-card.current { border-color: var(--acc); box-shadow: 0 0 0 1px var(--acc), var(--shadow-2); }
.plan-top { display: flex; align-items: center; gap: 11px; }
.plan-ic {
  width: 40px; height: 40px;
  border-radius: 11px;
  background: var(--acc-dim);
  color: var(--acc);
  display: flex; align-items: center; justify-content: center;
}
.plan-ic .ic { width: 19px; height: 19px; }
.plan-top h3 { font-size: 18px; font-weight: 750; flex: 1; }
.plan-badge { margin-left: auto; }
.plan-price { font-size: 12.5px; color: var(--tx2); margin: 4px 0 15px; padding-left: 51px; }
.plan-feats { list-style: none; display: flex; flex-direction: column; gap: 9px; }
/* li must stay inline flow: flex split its inline children into broken columns */
.plan-feats li { font-size: 13px; color: var(--tx1); line-height: 1.5; }
.plan-feats li .ic { width: 13px; height: 13px; color: var(--acc); margin-right: 7px; vertical-align: -0.15em; }
.plan-note {
  margin-top: 17px;
  padding-top: 14px;
  border-top: 1px dashed var(--line2);
  font-size: 11.5px;
  color: var(--tx2);
}

/* ====================== updates ====================== */
.composer {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-2);
  padding: 18px 20px;
  margin-bottom: 16px;
}
.composer h3 { display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 700; margin-bottom: 13px; }
.composer h3 .ic { width: 15px; height: 15px; color: var(--acc); }
.update-post {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px 19px;
  box-shadow: var(--shadow-1);
  margin-bottom: 13px;
}
.update-post .u-head { display: flex; align-items: center; gap: 11px; margin-bottom: 8px; }
.update-post .u-head h3 { font-size: 15px; font-weight: 700; flex: 1; letter-spacing: -0.1px; }
.update-post .u-date { font-size: 11.5px; color: var(--tx3); white-space: nowrap; }
.update-post .u-body {
  font-size: 13.5px; color: var(--tx1);
  white-space: pre-wrap;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

/* ====================== generator / bulk join ====================== */
.ng-hero { margin-bottom: 16px; }
.ng-top { display: flex; align-items: flex-start; gap: 15px; flex-wrap: wrap; }
.ng-ic {
  width: 46px; height: 46px; flex: 0 0 46px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--acc), var(--acc-strong));
  color: var(--acc-contrast);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px -4px var(--acc-glow);
}
.ng-ic .ic { width: 22px; height: 22px; }
.ng-top h3 { font-size: 17px; font-weight: 750; letter-spacing: -0.2px; }
.ng-top p { font-size: 12.5px; color: var(--tx2); margin-top: 3px; max-width: 560px; }
.ng-top .chip { margin-left: auto; }
.ng-controls { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-top: 17px; }
.ng-controls .btn { padding: 9px 16px; }

.namegrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 9px;
}
.namechip {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg3);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px 8px 8px 12px;
  font-size: 12.8px;
  transition: all 0.14s;
  min-width: 0;
}
.namechip:hover { border-color: var(--acc); background: var(--acc-dim); }
.namechip .nn { flex: 1; font-weight: 600; color: var(--tx0); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.namechip .icon-btn { width: 24px; height: 24px; border-radius: 6px; }
.namechip .icon-btn .ic { width: 12.5px; height: 12.5px; }

.bj-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.bj-item {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 16px;
  font-size: 12.5px;
  border-bottom: 1px solid var(--line);
}
.bj-item:last-child { border-bottom: none; }
.bj-item .nn { font-weight: 600; min-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bj-item .st { text-transform: uppercase; font-size: 10px; font-weight: 700; letter-spacing: 0.6px; color: var(--tx2); min-width: 58px; }
.bj-item .er { color: var(--tx3); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.bj-item.st-online .st { color: var(--acc); }
.bj-item.st-failed .st, .bj-item.st-invalid .st { color: var(--err); }
.bj-item.st-skipped .st { color: var(--tx3); }
.bj-item.st-starting .st { color: var(--info); }

.progress {
  height: 6px;
  background: var(--bg-inset);
  border-radius: 4px;
  overflow: hidden;
  margin: 0 18px 4px;
}
.progress i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--acc), var(--acc-strong));
  border-radius: 4px;
  transition: width 0.5s ease;
}

/* ====================== profile / user page ====================== */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.ban-box { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.ban-box .field { flex: 1; min-width: 130px; margin-bottom: 0; }

/* ====================== empty state ====================== */
.empty {
  text-align: center;
  padding: 54px 24px;
}
.empty .art {
  width: 58px; height: 58px;
  margin: 0 auto 15px;
  border-radius: 16px;
  background: var(--acc-dim);
  color: var(--acc);
  display: flex; align-items: center; justify-content: center;
}
.empty .art .ic { width: 26px; height: 26px; }
.empty h3 { font-size: 15.5px; font-weight: 700; color: var(--tx0); }
.empty p { font-size: 13px; color: var(--tx2); margin-top: 6px; max-width: 400px; margin-left: auto; margin-right: auto; }
.empty .btn { margin-top: 16px; }

/* ====================== helpers ====================== */
.text-link { color: var(--acc); font-weight: 600; }
.text-link:hover { text-decoration: underline; }
.only-mobile { display: none; }
.hide-xs { display: inline-flex; }
.stat { font-size: 12px; color: var(--tx2); font-variant-numeric: tabular-nums; }
.right { margin-left: auto; }

/* ====================== responsive ====================== */
@media (max-width: 960px) {
  .hide-mobile { display: none !important; }
  #view { padding: 18px 16px 40px; }
  #topbar { padding: 11px 16px; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .set-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  #sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    transform: translateX(-104%);
    transition: transform 0.22s ease;
    box-shadow: none;
    z-index: 60;
  }
  body.side-open #sidebar { transform: translateX(0); box-shadow: var(--shadow-pop); }
  body.side-open #side-backdrop { display: block; }
  .only-mobile { display: inline-flex; }
  .btn-add span { display: none; }
  .btn-add { padding: 7.5px 9px; }
}

@media (max-width: 480px) {
  .tiles { grid-template-columns: repeat(2, 1fr); gap: 9px; }
  .tile-num { font-size: 21px; }
  .bot-row { flex-wrap: wrap; gap: 10px; }
  .bot-id { min-width: 0; flex: 1 1 100%; }
  .bot-actions { margin-left: 0; }
  .bh-actions { margin-left: 0; width: 100%; }
  .info-strip { grid-template-columns: repeat(2, 1fr); }
  .console { height: 60vh; }
  .console-head + .console { height: 56vh; }
  .namegrid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  #toast-root { left: 14px; right: 14px; max-width: none; }
  .modal { max-width: none; }
  .ng-top .chip { margin-left: 0; }
}


/* ================= v2.3 additions: proxies & stop-all ================= */

.proxy-row {
  display: flex; align-items: center; gap: 16px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  transition: background 0.13s;
}
.proxy-row:last-child { border-bottom: none; }
.proxy-row:hover { background: var(--bg3); }
.proxy-row .n {
  display: flex; align-items: center; gap: 8px;
  font-weight: 650; font-size: 13.5px; color: var(--tx0);
}
.proxy-row .n .ic { color: var(--acc); width: 15px; height: 15px; }
.proxy-row .u { font-size: 11.5px; color: var(--tx2); }
.proxy-row .bot-actions { margin-left: auto; display: flex; align-items: center; }

.test-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 600; line-height: 1;
  padding: 4px 8px; border-radius: 999px;
  max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.test-chip .ic { width: 12px; height: 12px; flex: none; }
.test-chip.ok { background: var(--acc-dim); color: var(--acc); }
.test-chip.err { background: var(--err-dim, rgba(229, 72, 77, 0.12)); color: var(--err); }

select {
  appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--tx2) 50%),
    linear-gradient(135deg, var(--tx2) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(1em + 3px), calc(100% - 13px) calc(1em + 3px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

@media (max-width: 900px) {
  .proxy-row { flex-wrap: wrap; gap: 10px; }
  .proxy-row .bot-actions { margin-left: 0; }
}


/* ================= v2.4 additions: tab bar, groups, skins, vip ================= */

/* ---- clearer active-tab indicator (sidebar, all sizes) ---- */
.nav-item.active { box-shadow: inset 3px 0 0 var(--acc); }
.nav-item.active .ic { color: var(--acc); }

/* ---- mobile bottom tab bar (≤900px): always-visible active tab ---- */
#tabbar {
  display: none;
}
@media (max-width: 900px) {
  #tabbar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 45;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    background: var(--bg2);
    border-top: 1px solid var(--line);
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -6px 18px rgba(16, 24, 40, 0.07);
  }
  #tabbar a, #tabbar button {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 6px 2px 5px;
    border-radius: var(--r-sm);
    color: var(--tx2);
    font-size: 9.5px; font-weight: 600; letter-spacing: 0.2px;
    background: none; border: none; cursor: pointer;
    position: relative;
    -webkit-tap-highlight-color: transparent;
  }
  #tabbar .ic { width: 20px; height: 20px; }
  #tabbar a::before, #tabbar button::before {
    content: "";
    position: absolute; top: -4px; left: 50%; transform: translateX(-50%) scaleX(0);
    width: 26px; height: 3px; border-radius: 0 0 4px 4px;
    background: var(--acc);
    transition: transform 0.18s ease;
  }
  #tabbar a.active, #tabbar button.active { color: var(--acc); }
  #tabbar a.active::before, #tabbar button.active::before { transform: translateX(-50%) scaleX(1); }
  #main { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
}

/* ---- groups (folders) ---- */
.gsec-head .ic { width: 14px; height: 14px; flex: 0 0 14px; color: var(--tx2); }
.gchip .ic { width: 12px; height: 12px; flex: 0 0 12px; }
.movelist .mv .ic { width: 14px; height: 14px; flex: 0 0 14px; }
.groupline {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 2px 0 12px;
}
.gchip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg2);
  color: var(--tx1);
  font-size: 12.5px; font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.gchip:hover { background: var(--bg4); }
.gchip.on { background: var(--acc-dim); border-color: var(--acc-line); color: var(--acc); }
.gchip .cnt { font-size: 10.5px; color: var(--tx2); font-family: var(--mono); font-weight: 500; }
.gchip.on .cnt { color: var(--acc); }
.gchip.add { border-style: dashed; color: var(--tx2); }
.gdot {
  width: 9px; height: 9px; border-radius: 50%; flex: 0 0 9px;
  background: var(--gdot, var(--acc));
}
.gdot.green { --gdot: #0ea26e; } .gdot.blue { --gdot: #2e7fa8; }
.gdot.purple { --gdot: #7c5cd6; } .gdot.amber { --gdot: #d69a2d; }
.gdot.red { --gdot: #d64545; } .gdot.teal { --gdot: #17a2a2; }
.gdot.pink { --gdot: #d65692; } .gdot.slate { --gdot: #64748b; }

.gsec {
  margin: 0 0 14px;
}
.gsec-head {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 4px 8px;
  font-size: 12.5px; font-weight: 700; color: var(--tx1);
}
.gsec-head .cnt {
  font-size: 10.5px; color: var(--tx2); font-family: var(--mono);
  background: var(--bg3); border: 1px solid var(--line);
  padding: 0 7px; border-radius: 9px; line-height: 17px; font-weight: 500;
}
.gsec-head .ln { flex: 1; height: 1px; background: var(--line); }
.gchip-row { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.gchip-row .nm { font-size: 11px; color: var(--tx2); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px; }

.seg {
  display: inline-flex; align-items: center;
  background: var(--bg3); border: 1px solid var(--line);
  border-radius: 9px; padding: 2.5px; gap: 2px;
}
.seg button {
  border: none; background: none; cursor: pointer;
  font: inherit; font-size: 12px; font-weight: 600; color: var(--tx2);
  padding: 5px 11px; border-radius: 7px;
  transition: background 0.14s, color 0.14s;
}
.seg button.on { background: var(--bg2); color: var(--tx0); box-shadow: var(--shadow-1); }
.seg button .ic { width: 13px; height: 13px; margin-right: 5px; vertical-align: -2px; }

/* ---- skins ---- */
.skin-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px;
}
.skin-card {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px 16px 13px;
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
  position: relative;
}
.skin-card:hover { border-color: var(--line2); box-shadow: var(--shadow-2, 0 6px 20px rgba(16,24,40,0.08)); transform: translateY(-1px); }
.skin-face {
  width: 72px; height: 72px; border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(14,162,110,0.08), rgba(46,127,168,0.07)),
    repeating-conic-gradient(var(--bg3) 0% 25%, var(--bg2) 0% 50%) 0 0 / 14px 14px;
  border: 1px solid var(--line);
  overflow: hidden;
}
.skin-face i {
  display: block; width: 72px; height: 72px;
  background-repeat: no-repeat;
  image-rendering: pixelated;
}
.skin-name { font-weight: 650; font-size: 13px; color: var(--tx0); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.skin-sub { font-size: 10.5px; color: var(--tx3); letter-spacing: 0.4px; text-transform: uppercase; font-weight: 700; }
.skin-actions { display: flex; gap: 6px; margin-top: 2px; }
.skin-card .corner { position: absolute; top: 8px; right: 8px; transform: translateY(-55%); box-shadow: var(--shadow-1); }
.skin-card.vip-lock { border-style: dashed; justify-content: center; min-height: 190px; text-align: center; }
.skin-card.upload-card {
  border-style: dashed; cursor: pointer; justify-content: center; min-height: 190px; text-align: center;
  color: var(--tx2);
}
.skin-card.upload-card:hover { border-color: var(--acc); color: var(--acc); }
.skin-card.upload-card .ic { width: 26px; height: 26px; }

/* role + plan: VIP */
.rolechip.vip { background: rgba(124, 92, 214, 0.12); color: #7c5cd6; border-color: transparent; }
[data-theme="dark"] .rolechip.vip { background: rgba(139, 108, 235, 0.18); color: #a893ea; }
.plan-card.vip.current { border-color: #7c5cd6; box-shadow: 0 0 0 3px rgba(124, 92, 214, 0.14); }
.plan-card.vip .plan-ic { background: rgba(124, 92, 214, 0.12); color: #7c5cd6; }
.plan-card.vip .plan-note { color: #7c5cd6; }

/* move-to-group modal list */
.movelist { display: flex; flex-direction: column; gap: 6px; }
.movelist .mv {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--bg2);
  cursor: pointer; font: inherit; font-size: 13px; font-weight: 600; color: var(--tx1);
  text-align: left; width: 100%;
}
.movelist .mv:hover { background: var(--bg4); }
.movelist .mv.on { border-color: var(--acc); color: var(--acc); background: var(--acc-dim); }
.movelist .mv .gcnt { margin-left: auto; font-size: 11px; color: var(--tx3); font-family: var(--mono); font-weight: 500; }

@media (max-width: 480px) {
  .skin-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .groupline .gchip { padding: 5px 10px; font-size: 11.5px; }
  .toolbar { flex-wrap: wrap; }
  .toolbar .search { flex: 1 1 100%; max-width: none; }
}

/* ================================================================
   DRACONIUM PANEL — control-room refinement
   Keeps all existing behavior and selectors; improves hierarchy, depth,
   density, and motion without introducing a framework.
   ================================================================ */
:root{
  --bg0:#e9ebe6;--bg1:#f3f5f1;--bg2:#ffffff;--bg3:#edf1ec;--bg4:#e4ebe4;--bg-inset:#e1e8e1;
  --line:#dce3dc;--line2:#cbd6cc;--acc-line:#c4dfce;--tx0:#17211b;--tx1:#415048;--tx2:#77877d;--tx3:#a0afa5;
  --acc:#17784f;--acc-strong:#0d6240;--acc-contrast:#fff;--acc-dim:rgba(23,120,79,.11);--acc-glow:rgba(23,120,79,.24);
  --r:14px;--r-sm:9px;--shadow-1:0 1px 2px rgba(26,42,32,.05);--shadow-2:0 1px 2px rgba(26,42,32,.04),0 11px 30px -14px rgba(26,42,32,.22);--shadow-pop:0 10px 25px -8px rgba(26,42,32,.20),0 24px 55px -20px rgba(26,42,32,.20);
}
[data-theme="dark"]{--bg0:#0a100d;--bg1:#0e1511;--bg2:#121b16;--bg3:#17251c;--bg4:#1e3025;--bg-inset:#0b120e;--line:#213126;--line2:#304638;--acc-line:#24503a;--tx0:#eff5f0;--tx1:#b4c4b8;--tx2:#72877a;--tx3:#4c6153;--acc:#55cf8d;--acc-strong:#39b978;--acc-dim:rgba(85,207,141,.12);--acc-glow:rgba(85,207,141,.24);--shadow-2:0 1px 0 rgba(255,255,255,.025) inset,0 15px 35px -14px rgba(0,0,0,.65)}
body{background-color:var(--bg0);background-image:linear-gradient(90deg,rgba(23,120,79,.025) 1px,transparent 1px),linear-gradient(rgba(23,120,79,.025) 1px,transparent 1px);background-size:42px 42px}
#sidebar{background:linear-gradient(180deg,var(--bg0),color-mix(in srgb,var(--bg0) 85%,var(--acc-dim)));border-right-color:var(--line2)}.brand{padding:21px 19px 19px}.brand-mark{filter:drop-shadow(0 4px 10px var(--acc-glow));transition:transform .35s cubic-bezier(.23,1,.32,1)}.brand:hover .brand-mark{transform:rotate(8deg) scale(1.06)}.brand-name strong{letter-spacing:.35px}.nav-label{padding:18px 13px 6px;color:var(--tx3);font-size:9px}.nav-item{margin:2px 0;padding:10px 12px;border-radius:10px;transition:background .2s,color .2s,transform .2s,border-color .2s}.nav-item:hover{transform:translateX(3px);background:var(--bg4)}.nav-item.active{background:linear-gradient(90deg,var(--acc-dim),transparent);border-left:3px solid var(--acc);padding-left:9px;box-shadow:inset 0 0 20px rgba(23,120,79,.04)}.nav-item.active:after{content:'';position:absolute;right:11px;width:5px;height:5px;border-radius:50%;background:var(--acc);box-shadow:0 0 0 4px var(--acc-dim)}.nav-count{background:var(--bg2);border-color:var(--line2)}
#main{background:radial-gradient(900px 300px at 65% -120px,var(--acc-glow),transparent 65%),var(--bg1)}#topbar{padding:16px 32px;border-bottom-color:var(--line2);background:color-mix(in srgb,var(--bg1) 88%,transparent);box-shadow:0 5px 18px rgba(20,35,25,.035)}#view-title{font-size:18px;letter-spacing:-.3px}#view{padding:30px 32px 60px;max-width:1280px}.conn-pill{padding:6px 12px;background:color-mix(in srgb,var(--bg2) 86%,var(--acc-dim));border-color:var(--acc-line)}.btn{border-radius:9px;transition:transform .2s cubic-bezier(.23,1,.32,1),box-shadow .2s,border-color .2s,background .2s}.btn:hover{transform:translateY(-2px)}.btn:active{transform:scale(.97)}.btn-primary{background:linear-gradient(135deg,var(--acc),var(--acc-strong));box-shadow:0 5px 16px -6px var(--acc-glow)}
.panel,.tile,.info-cell,.plan-card,.composer{border-color:var(--line);border-radius:var(--r);box-shadow:var(--shadow-2);transition:transform .24s cubic-bezier(.23,1,.32,1),box-shadow .24s,border-color .24s}.panel:hover,.tile:hover,.info-cell:hover,.plan-card:hover,.composer:hover{border-color:var(--line2);box-shadow:var(--shadow-pop)}.panel-head{padding:14px 19px;background:linear-gradient(180deg,color-mix(in srgb,var(--bg2) 90%,var(--acc-dim)),var(--bg2))}.panel-head .ic{filter:drop-shadow(0 2px 4px var(--acc-glow))}.tiles{gap:14px;margin-bottom:18px}.tile{padding:17px 18px 15px;position:relative;overflow:hidden}.tile:after{content:'';position:absolute;right:-18px;bottom:-24px;width:86px;height:86px;border-radius:50%;border:1px solid var(--acc-line);opacity:.6}.tile:hover{transform:translateY(-4px)}.tile-label{font-size:10px}.tile-num{font-size:30px;margin-top:6px}.bot-row,.mini-row,.act-row{transition:background .18s,transform .18s,padding-left .18s}.bot-row:hover,.mini-row:hover{background:var(--bg3);transform:translateX(3px)}.bot-row{padding:15px 19px}.bot-id .n{font-size:14px}.badge{padding:3px 10px}.badge-online,.badge-active{box-shadow:0 0 0 3px var(--acc-dim)}
.console-wrap{border-radius:var(--r);box-shadow:0 14px 35px -18px rgba(0,0,0,.5)}.console-head{padding:11px 15px}.console{background:linear-gradient(180deg,var(--console-bg),#0a0e13)}.ln{transition:background .16s}.ln:hover{background:rgba(255,255,255,.045)}.composer{padding:19px 21px}.field input,.field select,.field textarea,.search{border-radius:9px;border-color:var(--line2);transition:border-color .2s,box-shadow .2s,background .2s}.field input:focus,.field select:focus,.field textarea:focus,.search:focus-within{box-shadow:0 0 0 4px var(--acc-dim);border-color:var(--acc)}
.plan-card{padding:26px 25px 22px}.plan-card.premium{box-shadow:0 0 0 1px var(--acc-line),var(--shadow-pop)}.plan-card.current{box-shadow:0 0 0 2px var(--acc),var(--shadow-pop)}.plan-ic{transition:transform .3s cubic-bezier(.23,1,.32,1)}.plan-card:hover .plan-ic{transform:rotate(-8deg) scale(1.08)}.modal-overlay{background:rgba(8,16,11,.5);backdrop-filter:blur(7px)}.modal{border-radius:16px;box-shadow:var(--shadow-pop)}.toast{border-radius:11px;box-shadow:var(--shadow-pop)}
.gate{background:radial-gradient(850px 460px at 18% -10%,var(--acc-glow),transparent 60%),radial-gradient(650px 400px at 105% 110%,var(--acc-dim),transparent 55%),var(--bg1)}.auth-card,.maint-card{border-radius:20px;box-shadow:0 25px 70px -25px rgba(20,40,25,.28)}
@keyframes panelEnter{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}#view>.panel,#view>.tiles,#view>.toolbar,#view>.bot-head,#view>.info-strip,#view>.ng-hero{animation:panelEnter .42s cubic-bezier(.23,1,.32,1) both}#view>.tiles{animation-delay:.03s}#view>.panel:nth-child(2){animation-delay:.06s}#view>.panel:nth-child(3){animation-delay:.09s}
@media(max-width:900px){#view{padding:22px 18px 42px}#topbar{padding:13px 18px}.tiles{gap:10px}.tile{padding:14px}.panel-head{padding:13px 15px}.bot-row{padding:13px 15px}}
@media(prefers-reduced-motion:reduce){.brand-mark,.nav-item,.btn,.panel,.tile,.info-cell,.plan-card,.bot-row,.mini-row,.ln,.plan-ic,#view>.panel,#view>.tiles,#view>.toolbar,#view>.bot-head,#view>.info-strip,#view>.ng-hero{transition:none;animation:none}}

/* ======================================================================
   FLOODER — batch sessions (v2.5.0)
   ====================================================================== */
.cards-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:14px}
.card{background:var(--bg2);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow-1);padding:15px 16px;display:flex;flex-direction:column;gap:8px;transition:transform .2s cubic-bezier(.23,1,.32,1),box-shadow .2s,border-color .2s;text-decoration:none;color:inherit}
.card:hover{transform:translateY(-3px);box-shadow:var(--shadow-pop);border-color:var(--acc-line)}
a.card:hover .card-title{color:var(--acc-strong)}
.card-top{display:flex;align-items:center;justify-content:space-between;gap:10px}
.card-title{font-weight:700;color:var(--tx0);font-size:13.5px;display:flex;align-items:center;gap:7px;min-width:0}
.card-title .ic{color:var(--acc);flex:0 0 auto}
.card-kv{display:flex;align-items:baseline;gap:8px;font-size:12.5px}
.card-kv .k{color:var(--tx2);display:inline-flex;align-items:center;gap:6px;flex:0 0 96px;font-size:11.5px;text-transform:uppercase;letter-spacing:.04em}
.card-kv .k .ic{width:12px;height:12px}
.card-kv .v{color:var(--tx1);font-weight:600;overflow-wrap:anywhere}
.flood-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:12px;padding:14px 16px}
.flood-bot-card{gap:6px}
.flood-bot-card .dot{width:8px;height:8px;border-radius:50%;display:inline-block}
.flood-bot-actions{display:flex;gap:8px;margin-top:4px}
.flood-head-kv{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:8px 18px}
.flood-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px;padding-top:14px;border-top:1px dashed var(--line)}
.flood-activity{margin-top:12px;background:var(--bg3);border:1px solid var(--line);border-radius:var(--r-sm);padding:10px 12px;max-height:150px;overflow:auto}
.flood-activity>div[data-flood-activity]{display:flex;flex-direction:column;gap:4px;margin-top:6px}
.fc-row{display:grid;grid-template-columns:1fr 1fr 1fr;gap:12px}
@media(max-width:640px){.fc-row{grid-template-columns:1fr}}
.back-btn{margin-bottom:2px}
.flood-console{border-radius:var(--r-sm)}
.badge.badge-warn .dot.starting{background:var(--warn)}
[data-theme="dark"] .card{background:var(--bg2)}

/* ====================== HomeArea — public landing ====================== */
/* play.hosting-inspired: always-dark hero, theme-aware sections below.    */
.gate.landing-gate {
  display: block;
  padding: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--bg1);
}
.landing { min-height: 100%; display: flex; flex-direction: column; }
.ld-wrap { width: 100%; max-width: 1060px; margin: 0 auto; padding: 0 18px; }

/* ---- nav ---- */
.ld-nav {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg1) 78%, transparent);
  border-bottom: 1px solid var(--line);
}
.ld-nav-row { display: flex; align-items: center; justify-content: space-between; height: 58px; }
.ld-brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--tx0); }
.ld-brand .brand-mark { width: 26px; height: 26px; }
.ld-brand strong { font-size: 15.5px; font-weight: 800; letter-spacing: -0.2px; }
.ld-brand-sub { font-size: 11.5px; color: var(--tx2); font-weight: 550; margin-left: 2px; }
.ld-nav-actions { display: flex; align-items: center; gap: 8px; }

/* ---- hero (always dark, like a hosting landing) ---- */
.ld-hero {
  position: relative;
  margin-top: 18px;
  border-radius: 24px;
  overflow: hidden;
  padding: clamp(26px, 5vw, 52px);
  color: #eafff5;
  background:
    radial-gradient(700px 300px at 85% -10%, rgba(63, 208, 164, 0.20), transparent 60%),
    radial-gradient(520px 260px at -10% 110%, rgba(46, 127, 168, 0.16), transparent 60%),
    linear-gradient(165deg, #07130e 0%, #0a1a13 55%, #081017 100%);
  border: 1px solid rgba(63, 208, 164, 0.18);
  box-shadow: 0 30px 70px -30px rgba(6, 40, 28, 0.55);
}
.ld-hero-badges { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.ld-pill {
  font-size: 11px; font-weight: 650; letter-spacing: 0.2px;
  color: rgba(234, 255, 245, 0.75);
  border: 1px solid rgba(234, 255, 245, 0.16);
  background: rgba(234, 255, 245, 0.05);
  padding: 4px 10px; border-radius: 999px;
}
.ld-pill-acc { color: #07130e; background: #3fd0a4; border-color: #3fd0a4; }
.ld-hero h1 {
  font-size: clamp(30px, 7vw, 54px);
  line-height: 1.04; font-weight: 850; letter-spacing: -1.4px;
  margin: 0 0 14px;
}
.ld-grad {
  background: linear-gradient(92deg, #3fd0a4 10%, #7ee7c6 55%, #58b7e8 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.ld-sub {
  max-width: 560px; font-size: clamp(13.5px, 2.4vw, 15.5px);
  line-height: 1.65; color: rgba(234, 255, 245, 0.72); margin: 0 0 22px;
}
.ld-cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.ld-ghost {
  background: rgba(234, 255, 245, 0.07);
  border: 1px solid rgba(234, 255, 245, 0.22);
  color: #eafff5;
}
.ld-ghost:hover { background: rgba(234, 255, 245, 0.13); }
.btn-lg { padding: 12px 20px; font-size: 14px; }

/* ---- live stats band ---- */
.ld-stats {
  margin-top: 26px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
}
.ld-stat {
  background: rgba(234, 255, 245, 0.045);
  border: 1px solid rgba(234, 255, 245, 0.12);
  border-radius: 14px;
  padding: 14px 14px 12px;
  min-width: 0;
}
.ld-stat-num { font-size: clamp(20px, 4.6vw, 30px); font-weight: 800; letter-spacing: -0.5px; color: #fff; }
.ld-stat-label {
  margin-top: 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.25px;
  color: rgba(234, 255, 245, 0.6);
  display: flex; align-items: center; gap: 5px; white-space: nowrap;
}
.ld-stat-label .ic { width: 12px; height: 12px; opacity: 0.7; }
.ld-live {
  width: 7px; height: 7px; border-radius: 50%;
  background: #3fd0a4; flex: none;
  box-shadow: 0 0 0 0 rgba(63, 208, 164, 0.55);
  animation: ldPulse 1.8s ease-out infinite;
}
@keyframes ldPulse {
  0% { box-shadow: 0 0 0 0 rgba(63, 208, 164, 0.5); }
  70% { box-shadow: 0 0 0 7px rgba(63, 208, 164, 0); }
  100% { box-shadow: 0 0 0 0 rgba(63, 208, 164, 0); }
}

/* ---- sections ---- */
.ld-sec { padding: clamp(34px, 6vw, 60px) 0 0; }
.ld-sec h2 { font-size: clamp(20px, 4.4vw, 27px); font-weight: 820; letter-spacing: -0.6px; color: var(--tx0); margin: 0 0 6px; }
.ld-sec-sub { font-size: 13px; color: var(--tx2); margin: 0 0 20px; max-width: 620px; line-height: 1.6; }

.ld-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ld-card {
  background: var(--bg2); border: 1px solid var(--line); border-radius: 16px;
  padding: 18px 16px 16px; box-shadow: var(--shadow-1);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.ld-card:hover { transform: translateY(-2px); border-color: var(--acc-line); box-shadow: var(--shadow-2); }
.ld-ic {
  width: 38px; height: 38px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: var(--acc-dim); color: var(--acc); margin-bottom: 12px;
}
.ld-ic .ic { width: 19px; height: 19px; }
.ld-card h3 { font-size: 14.5px; font-weight: 750; color: var(--tx0); margin: 0 0 6px; letter-spacing: -0.2px; }
.ld-card p { font-size: 12.5px; line-height: 1.62; color: var(--tx2); margin: 0; }

/* ---- steps ---- */
.ld-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ld-step { position: relative; background: var(--bg2); border: 1px solid var(--line); border-radius: 16px; padding: 18px 16px 16px; }
.ld-step em {
  font-style: normal; display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 8px; margin-bottom: 10px;
  background: var(--acc); color: var(--acc-contrast);
  font-size: 13px; font-weight: 800;
}
.ld-step h3 { font-size: 14px; font-weight: 750; color: var(--tx0); margin: 0 0 5px; }
.ld-step p { font-size: 12.5px; line-height: 1.6; color: var(--tx2); margin: 0; }

/* ---- plans ---- */
.ld-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: stretch; }
.ld-plan {
  position: relative; display: flex; flex-direction: column;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 18px;
  padding: 20px 18px 18px; box-shadow: var(--shadow-1);
}
.ld-plan.featured { border-color: var(--acc); box-shadow: 0 0 0 1px var(--acc), var(--shadow-2); }
.ld-plan-chip {
  position: absolute; top: -11px; right: 14px;
  font-style: normal; font-size: 10.5px; font-weight: 750; letter-spacing: 0.3px;
  background: var(--acc); color: var(--acc-contrast);
  padding: 3px 10px; border-radius: 999px;
}
.ld-plan h4 { font-size: 16.5px; font-weight: 800; color: var(--tx0); margin: 0 0 3px; }
.ld-plan-tag { font-size: 12px; color: var(--tx2); margin: 0 0 12px; }
.ld-plan ul { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; flex: 1; }
.ld-plan li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--tx1); font-weight: 550; }
.ld-plan li .ic { width: 14px; height: 14px; color: var(--acc); flex: none; }
.ld-plan-cta { margin-top: auto; }

/* ---- footer ---- */
.ld-foot { margin-top: clamp(36px, 7vw, 64px); border-top: 1px solid var(--line); padding: 18px 0 26px; }
.ld-foot-row { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; justify-content: space-between; font-size: 11.5px; color: var(--tx2); }

/* ---- auth back link ---- */
.auth-back {
  display: block; width: 100%; margin-top: 10px;
  background: none; border: none; cursor: pointer;
  font-size: 12px; font-weight: 600; color: var(--tx2);
  padding: 10px 0 14px; text-align: center;
}
.auth-back:hover { color: var(--acc); }

/* ---- responsive: 2-col tablets, 1-col phones ---- */
@media (max-width: 900px) {
  .ld-grid, .ld-plans { grid-template-columns: repeat(2, 1fr); }
  .ld-steps { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .ld-stats { grid-template-columns: repeat(2, 1fr); }
  .ld-grid, .ld-plans { grid-template-columns: 1fr; }
  .ld-hero { border-radius: 18px; }
  .ld-cta-row .btn { flex: 1 1 auto; justify-content: center; }
  .ld-brand-sub { display: none; }
}
