/* KAZUxREDEDIT control panel — dark, neon, dependency-free */
:root {
  --bg: #070b12;
  --panel: #0e1624;
  --panel-2: #111b2b;
  --panel-3: #162235;
  --line: rgba(122, 162, 212, 0.14);
  --line-strong: rgba(122, 162, 212, 0.26);
  --text: #e9f0fb;
  --muted: #8ea3c0;
  --dim: #637a99;
  --accent: #35e3a6;
  --accent-2: #58a6ff;
  --accent-soft: rgba(53, 227, 166, 0.10);
  --danger: #ff6173;
  --danger-soft: rgba(255, 97, 115, 0.10);
  --warn: #ffc65c;
  --radius: 16px;
  --radius-sm: 10px;
  --font: "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --mono: "Cascadia Code", "JetBrains Mono", "SF Mono", Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
}

body {
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(900px 520px at 8% -12%, rgba(53, 227, 166, 0.08), transparent 62%),
    radial-gradient(900px 620px at 102% -4%, rgba(88, 166, 255, 0.09), transparent 56%),
    var(--bg);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font-family: inherit; }
code, .mono { font-family: var(--mono); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(122, 162, 212, 0.18); border-radius: 99px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(122, 162, 212, 0.3); background-clip: content-box; }

.hidden { display: none !important; }

/* ------------------------------------------------------------------ layout */
.app {
  display: flex;
  height: 100vh;
  height: 100dvh;
}

.sidebar {
  width: 248px;
  flex: 0 0 248px;
  display: flex;
  flex-direction: column;
  padding: 22px 16px 18px;
  background: linear-gradient(180deg, rgba(13, 20, 32, 0.92), rgba(8, 13, 21, 0.96));
  border-right: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 22px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-weight: 800;
  font-size: 19px;
  color: #04140e;
  background: linear-gradient(145deg, #46f0b4, #22c9d9);
  box-shadow: 0 10px 24px rgba(53, 227, 166, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand-text strong { font-size: 14px; letter-spacing: 0.06em; white-space: nowrap; }
.brand-text span { font-size: 9px; letter-spacing: 0.22em; color: var(--dim); margin-top: 5px; }
.auth-brand .brand-text strong { font-size: 18px; letter-spacing: 0.05em; }

.nav { display: flex; flex-direction: column; gap: 4px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}

.nav-item svg { width: 18px; height: 18px; flex: 0 0 18px; opacity: .9; }
.nav-item:hover { background: rgba(255, 255, 255, 0.035); color: var(--text); }
.nav-item.active {
  background: linear-gradient(90deg, rgba(53, 227, 166, 0.13), rgba(53, 227, 166, 0.03));
  border-color: rgba(53, 227, 166, 0.18);
  color: var(--accent);
  box-shadow: inset 2px 0 0 var(--accent);
}

.nav-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}
.nav-item.active .nav-badge { color: var(--accent); background: rgba(53, 227, 166, 0.1); border-color: rgba(53, 227, 166, 0.2); }

.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }

.server-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
}
.server-card b { display: block; font-size: 12px; }
.server-card small { display: block; font-size: 10.5px; color: var(--dim); margin-top: 3px; }

.dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 9px; }
.dot.online { background: var(--accent); box-shadow: 0 0 0 4px rgba(53, 227, 166, 0.12), 0 0 12px rgba(53, 227, 166, 0.6); }
.dot.offline { background: var(--danger); box-shadow: 0 0 0 4px rgba(255, 97, 115, 0.1); }

.sidebar-meta { display: flex; justify-content: space-between; padding: 0 4px; font-size: 9px; letter-spacing: 0.18em; color: var(--dim); }

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 30px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 11, 18, 0.55);
  backdrop-filter: blur(8px);
}

.page-title h1 { margin: 0; font-size: 21px; letter-spacing: -0.01em; }
.page-title p { margin: 4px 0 0; font-size: 12px; color: var(--muted); }

.topbar-actions { display: flex; align-items: center; gap: 10px; }

.job-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 14px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  white-space: nowrap;
}
.job-pill .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.job-pill .job-time { font-size: 10.5px; color: var(--dim); font-family: var(--mono); }
.job-pill.running { color: var(--accent); border-color: rgba(53, 227, 166, 0.28); background: rgba(53, 227, 166, 0.07); }
.job-pill.running .pulse { background: var(--accent); animation: pulse 1.4s infinite; }
.job-pill.stopping { color: var(--warn); border-color: rgba(255, 198, 92, 0.3); background: rgba(255, 198, 92, 0.07); }
.job-pill.stopping .pulse { background: var(--warn); animation: pulse 0.8s infinite; }
.job-pill.finished { color: var(--accent); border-color: rgba(53, 227, 166, 0.22); }
.job-pill.finished .pulse { background: var(--accent); }
.job-pill.error, .job-pill.stopped { color: var(--danger); border-color: rgba(255, 97, 115, 0.28); background: rgba(255, 97, 115, 0.07); }
.job-pill.error .pulse, .job-pill.stopped .pulse { background: var(--danger); }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(53, 227, 166, 0.5); }
  70% { box-shadow: 0 0 0 7px rgba(53, 227, 166, 0); }
  100% { box-shadow: 0 0 0 0 rgba(53, 227, 166, 0); }
}

.content {
  flex: 1;
  overflow-y: auto;
  padding: 24px 30px 30px;
  scroll-behavior: smooth;
}

.view { display: none; flex-direction: column; gap: 18px; }
.view.active { display: flex; animation: viewIn .25s ease; }
@keyframes viewIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

/* ----------------------------------------------------------------- panels */
.panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0) 40%),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 0;
}
.panel-head h3 { margin: 0; font-size: 14.5px; letter-spacing: 0.01em; }
.panel-head p { margin: 4px 0 0; font-size: 11.5px; }
.panel-head + * { margin-top: 16px; }

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

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 28px 30px;
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(520px 260px at 82% 20%, rgba(53, 227, 166, 0.12), transparent 70%),
    radial-gradient(420px 260px at 100% 100%, rgba(88, 166, 255, 0.12), transparent 70%),
    var(--panel);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(122, 162, 212, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(122, 162, 212, 0.05) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(600px 300px at 80% 30%, #000, transparent 75%);
  pointer-events: none;
}
.hero-copy { max-width: 620px; position: relative; z-index: 1; }
.eyebrow { font-size: 9.5px; letter-spacing: 0.26em; font-weight: 700; color: var(--accent); }
.hero h2 { margin: 10px 0 10px; font-size: clamp(20px, 2.4vw, 28px); letter-spacing: -0.02em; line-height: 1.18; }
.hero p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; max-width: 560px; }
.hero-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

.hero-art { position: relative; width: 180px; height: 180px; flex: 0 0 180px; display: grid; place-items: center; z-index: 1; }
.ring { position: absolute; border-radius: 50%; border: 1px solid rgba(53, 227, 166, 0.22); }
.ring-1 { inset: 0; animation: spin 22s linear infinite; border-style: dashed; }
.ring-2 { inset: 21px; border-color: rgba(88, 166, 255, 0.22); animation: spin 16s linear infinite reverse; }
.ring-3 { inset: 44px; border-color: rgba(53, 227, 166, 0.3); }
@keyframes spin { to { transform: rotate(360deg); } }
.hero-core { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.hero-core span { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; background: linear-gradient(120deg, #8bffd4, #58a6ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-core small { font-size: 8px; letter-spacing: 0.24em; color: var(--dim); }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat { padding: 16px 18px; display: flex; flex-direction: column; gap: 5px; }
.stat-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.13em; color: var(--dim); font-weight: 600; }
.stat strong { font-size: 24px; letter-spacing: -0.02em; line-height: 1.05; }
.stat small { font-size: 10.5px; color: var(--muted); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: stretch; }
.grid-2.tight { gap: 10px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 20px 20px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
}
.chip:hover { border-color: var(--line-strong); color: var(--text); }
.chip.active { color: var(--accent); border-color: rgba(53, 227, 166, 0.3); background: rgba(53, 227, 166, 0.08); }
.region-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 8px;
  background: rgba(88, 166, 255, 0.07);
  border: 1px solid rgba(88, 166, 255, 0.16);
  font-size: 11.5px;
  color: #a9c8ee;
}
.region-tag b { color: #dcebff; font-family: var(--mono); font-size: 11px; }
.region-tag span { color: var(--dim); }

.check-list { list-style: none; margin: 0; padding: 16px 20px 16px; display: flex; flex-direction: column; gap: 10px; }
.check-list li { display: flex; align-items: flex-start; gap: 9px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.check-mark {
  flex: 0 0 18px; width: 18px; height: 18px; border-radius: 50%;
  display: grid; place-items: center; font-size: 10px; font-weight: 800;
  background: rgba(255, 198, 92, 0.12); color: var(--warn); border: 1px solid rgba(255, 198, 92, 0.3);
}
.check-mark.ok { background: rgba(53, 227, 166, 0.12); color: var(--accent); border-color: rgba(53, 227, 166, 0.3); }
.check-list + .btn { margin: 0 20px 20px; }

.pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 99px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.pill.accent { color: var(--accent); border-color: rgba(53, 227, 166, 0.25); background: rgba(53, 227, 166, 0.08); }

/* ----------------------------------------------------------------- squads */
.squad-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; padding: 16px 20px 20px; }
.squad {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}
.squad.valid { border-color: rgba(53, 227, 166, 0.22); }
.squad.invalid { border-color: rgba(255, 198, 92, 0.28); }
.squad-head { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 700; letter-spacing: 0.04em; color: var(--muted); }
.squad-status { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; }
.squad-status.ok { color: var(--accent); }
.squad-status.warn { color: var(--warn); }
.squad-members { padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.squad-member { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; background: rgba(255, 255, 255, 0.025); }
.squad-member.empty { background: transparent; border: 1px dashed rgba(122, 162, 212, 0.16); color: var(--dim); font-size: 10.5px; }
.squad-member b { font-size: 11px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.squad-member small { margin-left: auto; color: var(--dim); font-family: var(--mono); font-size: 9.5px; flex: 0 0 auto; }
.squad-empty { padding: 26px 20px; text-align: center; color: var(--dim); font-size: 12px; }

/* ----------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 17px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015));
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .12s ease, border-color .15s ease, background .15s ease, opacity .15s ease;
  user-select: none;
}
.btn svg { width: 16px; height: 16px; }
.btn:hover:not(:disabled) { border-color: rgba(122, 162, 212, 0.45); transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: 0.42; cursor: not-allowed; }
.btn-primary {
  border: none;
  color: #04140e;
  background: linear-gradient(135deg, #48efb7, #25cadb);
  box-shadow: 0 10px 24px rgba(53, 227, 166, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn-primary:hover:not(:disabled) { filter: brightness(1.06); }
.btn-danger {
  border: none;
  color: #fff;
  background: linear-gradient(135deg, #ff6173, #df344b);
  box-shadow: 0 10px 24px rgba(255, 97, 115, 0.18);
}
.btn-danger-ghost {
  color: #ff93a0;
  border-color: rgba(255, 97, 115, 0.3);
  background: rgba(255, 97, 115, 0.07);
}
.btn-danger-ghost:hover:not(:disabled) { border-color: rgba(255, 97, 115, 0.55); background: rgba(255, 97, 115, 0.12); }
.btn-small { height: 32px; padding: 0 12px; font-size: 11.5px; border-radius: 8px; }
.icon-btn {
  width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line);
  background: transparent; color: var(--muted); cursor: pointer; font-size: 19px; line-height: 1;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-strong); }

/* ----------------------------------------------------------------- toolbar */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.toolbar-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  min-width: 230px;
  transition: border-color .15s ease;
}
.search-box:focus-within { border-color: rgba(53, 227, 166, 0.4); }
.search-box svg { width: 15px; height: 15px; color: var(--dim); flex: 0 0 15px; }
.search-box input { flex: 1; min-width: 0; border: none; background: transparent; color: var(--text); font-size: 12px; outline: none; }
.search-box input::placeholder { color: var(--dim); }

select, input[type="text"], input[type="number"], input[type="password"], input[type="search"], textarea {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 12.5px;
  outline: none;
  transition: border-color .15s ease, background .15s ease;
}
textarea { height: auto; padding: 11px 12px; resize: vertical; line-height: 1.5; font-family: var(--mono); font-size: 11.5px; }
select:focus, input:focus, textarea:focus { border-color: rgba(53, 227, 166, 0.45); background: rgba(255, 255, 255, 0.045); }
.select-compact { width: auto; height: 36px; padding: 0 30px 0 11px; font-size: 11.5px; }

/* ----------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; padding: 4px 10px 0; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.data-table th {
  text-align: left;
  padding: 11px 10px;
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--dim);
  font-weight: 700;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.data-table td { padding: 10px; border-bottom: 1px solid rgba(122, 162, 212, 0.07); vertical-align: middle; }
.data-table tbody tr { transition: background .12s ease; }
.data-table tbody tr:hover { background: rgba(255, 255, 255, 0.022); }
.data-table tbody tr:last-child td { border-bottom: none; }
.w-check { width: 34px; }
.w-num { width: 42px; color: var(--dim); font-family: var(--mono); font-size: 10.5px; }
.w-id { width: 120px; color: var(--muted); font-size: 10.5px; }
.data-table input[type="checkbox"] { accent-color: #35e3a6; width: 15px; height: 15px; cursor: pointer; }
.acct-name { display: flex; align-items: center; gap: 9px; font-weight: 600; }
.acct-avatar {
  width: 27px; height: 27px; flex: 0 0 27px; border-radius: 8px;
  display: grid; place-items: center; font-size: 10.5px; font-weight: 800;
  color: var(--accent); background: rgba(53, 227, 166, 0.09); border: 1px solid rgba(53, 227, 166, 0.18);
}
.uid-cell { display: flex; align-items: center; gap: 6px; }
.copy-btn {
  border: none; background: transparent; color: var(--dim); cursor: pointer; font-size: 9.5px;
  padding: 2px 5px; border-radius: 4px; opacity: 0; transition: opacity .12s ease, color .12s ease;
}
tr:hover .copy-btn { opacity: 1; }
.copy-btn:hover { color: var(--accent); background: rgba(53, 227, 166, 0.08); }
.region-pill {
  display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 6px;
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.06em;
  color: #a9c8ee; background: rgba(88, 166, 255, 0.08); border: 1px solid rgba(88, 166, 255, 0.16);
}
.auth-pill { font-size: 10px; color: var(--muted); }
.auth-pill.token { color: #d9b4ff; }
.auth-pill.pass { color: var(--accent); }

.empty-state { padding: 54px 20px; text-align: center; }
.empty-icon { font-size: 34px; color: var(--dim); margin-bottom: 6px; }
.empty-state h4 { margin: 0 0 6px; font-size: 14px; }
.empty-state p { margin: 0 0 16px; font-size: 12px; color: var(--muted); }
.empty-actions { display: flex; justify-content: center; gap: 8px; }

.table-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; font-size: 11px; color: var(--muted); border-top: 1px solid var(--line); }

/* ----------------------------------------------------------------- forms */
.form { display: flex; flex-direction: column; gap: 15px; padding: 16px 20px 20px; }
.form label { display: flex; flex-direction: column; gap: 7px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.form label small { font-weight: 400; font-size: 10.5px; color: var(--dim); line-height: 1.45; }
.form .btn { margin-top: 3px; height: 42px; }
.hint { margin: 0; font-size: 10.5px; color: var(--dim); line-height: 1.5; }

.info-list { margin: 0; padding: 16px 22px 20px; display: flex; flex-direction: column; gap: 12px; list-style: none; }
.info-list li { position: relative; padding-left: 18px; font-size: 12px; color: var(--muted); line-height: 1.55; }
.info-list li::before { content: ""; position: absolute; left: 0; top: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: .7; }
.info-list b { color: var(--text); }

.note { margin: 0 20px 20px; padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(88, 166, 255, 0.16); background: rgba(88, 166, 255, 0.06); font-size: 11.5px; color: #a9c8ee; line-height: 1.55; }
.note b { color: #dcebff; }
.note.warn { border-color: rgba(255, 198, 92, 0.2); background: rgba(255, 198, 92, 0.055); color: #e8cf9b; }
.note.warn b { color: var(--warn); }

/* ----------------------------------------------------------------- pickers */
.picker-panel { display: flex; flex-direction: column; min-height: 0; }
.picker-tools { display: flex; align-items: center; gap: 7px; padding: 0 20px 12px; flex-wrap: wrap; }
.picker-tools .search-box { flex: 1; min-width: 150px; height: 34px; }
.picker { overflow-y: auto; padding: 0 12px 12px; max-height: 430px; display: flex; flex-direction: column; gap: 4px; }
.picker-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
}
.picker-row:hover { background: rgba(255, 255, 255, 0.03); }
.picker-row.checked { background: rgba(53, 227, 166, 0.06); border-color: rgba(53, 227, 166, 0.16); }
.picker-row input { width: 15px; height: 15px; accent-color: #35e3a6; cursor: pointer; flex: 0 0 15px; }
.pick-avatar {
  width: 28px; height: 28px; flex: 0 0 28px; border-radius: 8px; display: grid; place-items: center;
  font-size: 10px; font-weight: 800; color: var(--accent-2);
  background: rgba(88, 166, 255, 0.08); border: 1px solid rgba(88, 166, 255, 0.15);
}
.pick-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.pick-main b { font-size: 11.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-main small { font-size: 9.5px; color: var(--dim); font-family: var(--mono); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-empty { padding: 30px 20px; text-align: center; color: var(--dim); font-size: 11.5px; }

/* ----------------------------------------------------------------- console */
.console {
  flex: 0 0 auto;
  border-top: 1px solid var(--line-strong);
  background: rgba(6, 10, 17, 0.92);
  backdrop-filter: blur(10px);
}
.console-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 18px; flex-wrap: wrap; }
.console-title { display: flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.03em; color: var(--muted); }
.terminal-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px rgba(53, 227, 166, 0.7); }
.badge { padding: 2px 8px; border-radius: 99px; font-size: 9px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; border: 1px solid var(--line); color: var(--dim); background: rgba(255, 255, 255, 0.03); }
.badge.running { color: var(--accent); border-color: rgba(53, 227, 166, 0.3); background: rgba(53, 227, 166, 0.07); }
.badge.error, .badge.stopped { color: var(--danger); border-color: rgba(255, 97, 115, 0.3); background: rgba(255, 97, 115, 0.07); }
.badge.finished { color: var(--accent); border-color: rgba(53, 227, 166, 0.22); }
.console-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.console-actions .chip { padding: 4px 9px; font-size: 10px; }
.console-body { border-top: 1px solid var(--line); }
.console.collapsed .console-body { display: none; }
.console-output {
  height: 190px;
  overflow-y: auto;
  padding: 10px 18px 14px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.6;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), transparent 60%);
}
.log-line { display: flex; gap: 10px; padding: 1px 0; }
.log-ts { color: #435a78; flex: 0 0 auto; user-select: none; }
.log-text { white-space: pre-wrap; word-break: break-word; color: #a6b8d1; }
.log-line.cmd .log-text { color: #35e3a6; }
.log-line.system .log-text { color: #8096b4; font-style: italic; }
.log-line.error .log-text { color: #ff8a96; }
.log-line.warn .log-text { color: #ffd27a; }
.log-line.success .log-text { color: #5fe9b8; }
.log-line.squad .log-text { color: #7fb7ff; }

/* ----------------------------------------------------------------- toasts */
.toast-wrap { position: fixed; right: 22px; bottom: 22px; z-index: 80; display: flex; flex-direction: column; gap: 9px; pointer-events: none; }
.toast {
  display: flex; align-items: flex-start; gap: 10px;
  min-width: 260px; max-width: 380px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: #101a29;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
  animation: toastIn .2s ease;
}
.toast.out { animation: toastOut .2s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(6px); } }
.toast-icon { width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; }
.toast.success .toast-icon { color: #04140e; background: var(--accent); }
.toast.error .toast-icon { color: #fff; background: var(--danger); }
.toast.info .toast-icon { color: #04140e; background: var(--accent-2); }
.toast b { display: block; font-size: 11.5px; margin-bottom: 2px; }
.toast p { margin: 0; font-size: 11px; color: var(--muted); line-height: 1.45; word-break: break-word; }

/* ----------------------------------------------------------------- modals */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(3, 6, 11, 0.72);
  backdrop-filter: blur(4px);
  animation: fadeIn .15s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 100%; max-width: 520px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  animation: modalIn .18s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
.modal-small { max-width: 420px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 18px 20px 0; }
.modal-head h3 { margin: 0; font-size: 15px; }
.modal-head p { margin: 4px 0 0; font-size: 11px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 4px 20px 20px; }
.confirm-message { margin: 14px 20px 18px; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.confirm-message b { color: var(--text); }

/* ----------------------------------------------------------------- responsive */
@media (max-width: 1180px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-art { width: 140px; height: 140px; flex-basis: 140px; }
}

@media (max-width: 980px) {
  .app { flex-direction: column; }
  .sidebar {
    width: 100%; flex: 0 0 auto;
    flex-direction: row; align-items: center; gap: 10px;
    padding: 10px 14px; border-right: none; border-bottom: 1px solid var(--line);
  }
  .brand { padding: 0 10px 0 0; }
  .brand-mark { width: 32px; height: 32px; border-radius: 9px; font-size: 15px; }
  .brand-text span { display: none; }
  .nav { flex-direction: row; overflow-x: auto; flex: 1; padding-bottom: 2px; }
  .nav-item { white-space: nowrap; padding: 8px 11px; font-size: 12px; }
  .nav-badge { display: none; }
  .sidebar-foot { margin-top: 0; }
  .server-card { padding: 8px 10px; }
  .server-card small, .sidebar-meta { display: none; }
  .content { padding: 18px 16px 24px; }
  .topbar { padding: 14px 16px 12px; }
  .grid-2 { grid-template-columns: 1fr; }
  .hero { flex-direction: column; align-items: flex-start; padding: 22px; }
  .hero-art { display: none; }
  .console-output { height: 160px; }
}

@media (max-width: 860px) {
  .brand-text { display: flex; }
  .brand-text strong { font-size: 11px; letter-spacing: 0.02em; }
  .brand-text span { display: none; }
  .brand { padding-right: 4px; }
  .server-card small { display: none; }
  .nav-item { padding-left: 9px; padding-right: 9px; }
}

@media (max-width: 620px) {
  body { overflow: auto; }
  .app { height: auto; min-height: 100dvh; }
  .sidebar { flex-wrap: wrap; }
  .brand-text { display: none; }
  .nav-item span:not(.nav-badge) { display: none; }
  .nav-item { padding: 8px 10px; }
  .nav-item svg { margin: 0; }
  .topbar { flex-wrap: wrap; }
  .page-title h1 { font-size: 18px; }
  .job-pill { height: 30px; font-size: 11px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 13px; }
  .stat strong { font-size: 19px; }
  .toolbar { padding: 13px; }
  .toolbar-left, .toolbar-right { width: 100%; }
  .search-box { flex: 1; min-width: 0; }
  .toolbar-right .btn { flex: 1; }
  .console-actions .chip:nth-child(2) { display: none; }
  .console { position: sticky; bottom: 0; }
  .toast-wrap { left: 14px; right: 14px; bottom: 14px; }
  .toast { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ------------------------------------------------------------- user card */
.user-card {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; margin-bottom: 8px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.user-avatar {
  width: 34px; height: 34px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(53,227,166,.22), rgba(88,166,255,.22));
  border: 1px solid rgba(53,227,166,.3);
  color: var(--accent); font-weight: 700; font-size: 14px;
}
.user-meta { min-width: 0; flex: 1; }
.user-meta b {
  display: block; font-size: 13px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-meta small {
  display: block; font-size: 9px; letter-spacing: .12em;
  color: var(--dim); margin-top: 2px;
}
.user-logout {
  flex: 0 0 auto; width: 28px; height: 28px;
  display: grid; place-items: center; cursor: pointer;
  background: transparent; border: 1px solid var(--line);
  border-radius: 8px; color: var(--dim); transition: .16s;
}
.user-logout:hover { color: var(--danger); border-color: rgba(255,97,115,.4); background: var(--danger-soft); }
.user-logout svg { width: 15px; height: 15px; }

/* ------------------------------------------------------------------ admin */
.admin-stats .admin-path { font-size: 12px; line-height: 1.35; word-break: break-all; }
.role-tag {
  display: inline-block; padding: 2px 8px; border-radius: 99px;
  font-size: 10px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600;
  border: 1px solid var(--line-strong); color: var(--muted);
}
.role-tag.admin { color: var(--accent); border-color: rgba(53,227,166,.4); background: var(--accent-soft); }
.role-tag.self { margin-left: 6px; font-size: 9px; color: var(--accent-2); border-color: rgba(88,166,255,.35); background: rgba(88,166,255,.08); }
.status-tag { font-size: 11px; font-weight: 600; }
.status-tag.on { color: var(--accent); }
.status-tag.off { color: var(--danger); }
.admin-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.admin-actions .btn { padding: 4px 9px; font-size: 11px; }
.limit-editor { display: flex; align-items: center; gap: 8px; }
.limit-editor input {
  width: 96px; padding: 6px 10px; border-radius: 10px; font-size: 16px; font-weight: 700;
  border: 1px solid var(--line-strong); background: rgba(255,255,255,.03); color: var(--text);
  font-family: inherit;
}
.limit-editor input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.limit-editor .btn { padding: 6px 14px; }
.limit-tag {
  display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 6px;
  font-size: 9px; letter-spacing: .05em; text-transform: uppercase; font-weight: 700;
  color: var(--accent-2); background: rgba(88,166,255,.12); border: 1px solid rgba(88,166,255,.3);
}
.limit-tag.default { color: var(--dim); background: rgba(255,255,255,.04); border-color: var(--line-strong); }
.mono.over { color: var(--warn); }
.badge.done { color: var(--accent); border-color: rgba(53,227,166,.35); background: var(--accent-soft); }
.badge.running { color: var(--warn); border-color: rgba(255,198,92,.35); background: rgba(255,198,92,.08); }

/* ------------------------------------------------------------------ auth */
.auth-body {
  overflow: auto;
  display: flex; align-items: center; justify-content: center;
  min-height: 100dvh; padding: 28px 18px;
}
.auth-wrap {
  display: grid; grid-template-columns: 1.05fr .95fr;
  width: min(980px, 100%); gap: 26px; align-items: stretch;
}
.auth-aside {
  padding: 30px 8px;
  display: flex; flex-direction: column;
}
.auth-brand { margin-bottom: 34px; }
.auth-brand .brand-text { display: flex; }
.auth-aside h1 {
  font-size: clamp(30px, 4vw, 44px); line-height: 1.08; margin: 0 0 16px;
  letter-spacing: -.02em; font-weight: 700;
}
.auth-aside h1 span { color: var(--accent); }
.auth-aside p { color: var(--muted); font-size: 14px; line-height: 1.65; max-width: 400px; margin: 0 0 22px; }
.auth-points { list-style: none; margin: 0 0 auto; padding: 0; display: grid; gap: 11px; }
.auth-points li { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.auth-points span {
  width: 22px; height: 22px; flex: 0 0 auto; display: grid; place-items: center;
  border-radius: 50%; font-size: 11px; color: var(--accent);
  background: var(--accent-soft); border: 1px solid rgba(53,227,166,.35);
}
.auth-foot { margin-top: 28px; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }

.auth-card { padding: 24px; align-self: center; width: 100%; }
.auth-tabs {
  display: flex; gap: 4px; padding: 4px; margin-bottom: 20px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 11px;
}
.auth-tab {
  flex: 1; padding: 9px 12px; border: 0; border-radius: 8px; cursor: pointer;
  background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; transition: .16s;
}
.auth-tab.active { background: var(--panel-3); color: var(--text); box-shadow: 0 6px 16px rgba(0,0,0,.25); }
.auth-tab:hover:not(.active) { color: var(--text); }
.auth-head { margin-bottom: 16px; }
.auth-head h2 { margin: 0 0 4px; font-size: 19px; }
.auth-head p { margin: 0; color: var(--dim); font-size: 12.5px; }
.auth-card .form { gap: 13px; }
.btn-block { width: 100%; justify-content: center; margin-top: 4px; }
.auth-alert {
  margin-top: 14px; padding: 11px 13px; border-radius: 10px;
  font-size: 12.5px; line-height: 1.45;
  border: 1px solid var(--line-strong); background: var(--panel-2); color: var(--muted);
}
.auth-alert.error { color: #ffb3bd; border-color: rgba(255,97,115,.4); background: var(--danger-soft); }
.auth-alert.success { color: #9df5d4; border-color: rgba(53,227,166,.4); background: var(--accent-soft); }
.auth-note { margin: 14px 0 0; font-size: 11.5px; color: var(--dim); line-height: 1.5; text-align: center; }

@media (max-width: 820px) {
  .auth-wrap { grid-template-columns: 1fr; width: min(460px, 100%); gap: 8px; }
  .auth-aside { padding: 6px 4px 2px; }
  .auth-aside h1 { font-size: 26px; margin-bottom: 10px; }
  .auth-aside p { font-size: 13px; margin-bottom: 14px; }
  .auth-points, .auth-foot { display: none; }
  .auth-brand { margin-bottom: 16px; }
  .auth-card { padding: 19px; }
}

/* panel head action group */
.panel-head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
