@import url("/vendor/fonts/fonts.css");
:root {
  --base00: #0f0f0f;
  --base01: #191919;
  --base02: #262626;
  --base03: #525252;
  --base04: #dde1e6;
  --base05: #f2f4f8;
  --base06: #f0f0f0;
  --base07: #ffffff;
  --base08: #c27476;
  --base09: #30b4de;
  --base0a: #dd936e;
  --base0b: #a6cc4e;
  --base0c: #51c4a3;
  --base0d: #7c6eaa;
  --base0e: #b06b84;
  --base0f: #ac8a8c;

  --ink: var(--base00);
  --panel: var(--base01);
  --rule: var(--base02);
  --faint: var(--base03);
  --dim: var(--base03);
  --bone: var(--base05);
  --white: var(--base07);
  --gold: var(--base0d);
  --ok: var(--base0b);
  --err: var(--base08);
  --kw: var(--base0e);
  --fn: var(--base0d);
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", "Go Mono", Menlo, Consolas, monospace;
  --sans: "Inter", system-ui, "Helvetica Neue", Arial, sans-serif;

  --glass: rgba(25, 25, 25, .88);
  --shadow-pop: 0 4px 10px rgba(0, 0, 0, .35), 0 16px 40px rgba(0, 0, 0, .5);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--ink);
  background-attachment: fixed;
  color: var(--bone);
  font: 13px/1.6 var(--mono);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv05" 1, "ss03" 1;
  display: flex;
  flex-direction: column;
}
a { color: var(--gold); text-decoration: none; transition: color .12s; }
a:hover { text-decoration: underline; }
::selection { background: var(--gold); color: var(--ink); }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--base02); border-radius: 5px; border: 2px solid var(--ink); }
::-webkit-scrollbar-thumb:hover { background: var(--base03); }
* { scrollbar-width: thin; scrollbar-color: var(--base02) transparent; }

header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--rule);
  background: var(--panel);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand {
  display: inline-flex;
  align-items: center;
  height: 27px;
  font-family: var(--sans);
  font-weight: 800;
  font-size: 14px;
  line-height: 1;
  letter-spacing: .22em;
  color: var(--white);
  white-space: nowrap;
}
.brand:hover { color: var(--white); text-decoration: none; }
nav {
  display: flex; gap: 2px; padding: 2px; flex-wrap: nowrap;
  max-width: 100%; overflow-x: auto; scrollbar-width: none;
  border: 1px solid var(--rule); border-radius: 7px; background: var(--ink);
}
nav::-webkit-scrollbar { display: none; }
nav a {
  display: inline-flex; align-items: center; height: 21px;
  font-family: var(--sans);
  padding: 0 10px; border: 0; border-radius: 5px;
  color: var(--dim); font-size: 11px; white-space: nowrap;
  transition: color .12s, background .12s;
}
nav a:hover { color: var(--white); background: var(--base01); text-decoration: none; }
nav a.on { color: var(--white); background: var(--rule); }
.grow { flex: 1; }
.who { color: var(--dim); font-size: 12px; white-space: nowrap; }
.who b { color: var(--bone); font-weight: 600; }

main { flex: 1; min-height: 0; overflow-y: auto; }
.view { max-width: 1500px; margin: 0 auto; padding: 16px; }
.view.wide { max-width: none; }

h1 { font-family: var(--sans); font-size: 15px; font-weight: 750; letter-spacing: .02em; margin: 0 0 12px; color: var(--white); }
h2 { font-family: var(--sans); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin: 0 0 10px; }
.muted { color: var(--dim); }
.faint { color: var(--faint); }
.err { color: var(--err); white-space: pre-wrap; }
.ok { color: var(--ok); }
.gold { color: var(--gold); }
.nowrap { white-space: nowrap; }
.mono { font-family: var(--mono); }
.flex { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1;
  color: var(--bone);
  background: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 6px;
  height: 27px;
  padding: 0 11px;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .13s, color .13s, background .13s, opacity .13s;
}
button:hover, .btn:hover { border-color: var(--gold); color: var(--white); background: rgba(124, 110, 170, .12); text-decoration: none; }
button.primary, .btn.primary { border-color: var(--gold); color: var(--gold); }
button.primary:hover, .btn.primary:hover { background: var(--gold); color: var(--ink); }
.victim-view button.primary:not(.icon-btn) { border-color: var(--rule); color: var(--bone); }
.victim-view button.primary:not(.icon-btn):hover { border-color: var(--gold); color: var(--white); background: rgba(124, 110, 170, .12); }
button.danger, .btn.danger { border-color: var(--err); color: var(--err); }
button.danger:hover, .btn.danger:hover { background: var(--err); color: var(--ink); }
button.sm, .btn.sm { height: 22px; padding: 0 8px; font-size: 11px; }
.toolbar button, .stream-bar > button { height: 27px; padding: 0 11px; font-size: 12px; }
button.copy-btn { min-width: 72px; }
button:disabled, .btn:disabled { opacity: .4; cursor: not-allowed; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 1px;
}

input, select, textarea {
  font: inherit;
  font-size: 12px;
  color: var(--bone);
  background: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 6px;
  height: 27px;
  padding: 0 8px;
  transition: border-color .13s;
}
input:hover, select:hover, textarea:hover { border-color: var(--base03); }
input:focus, select:focus, textarea:focus {
  border-color: var(--gold);
  outline: none;
}
textarea { height: auto; padding: 6px 8px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input[type=checkbox], input[type=radio] { height: auto; accent-color: var(--gold); }
input[type=range] { height: auto; padding: 0; accent-color: var(--gold); }
input[type=file] { height: auto; padding: 3px 6px; border-style: dashed; }
input[type=file]::file-selector-button {
  font: inherit;
  font-size: 12px;
  color: var(--bone);
  background: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 5px;
  height: 24px;
  padding: 0 10px;
  margin-right: 8px;
  cursor: pointer;
}
input[type=file]::file-selector-button:hover { border-color: var(--gold); color: var(--white); background: rgba(124, 110, 170, .12); }
label.chk { display: inline-flex; align-items: center; gap: 6px; color: var(--dim); font-size: 12px; cursor: pointer; }
label.chk input { margin: 0; }
label.toggle { justify-content: space-between; gap: 10px; }
.flex.end { justify-content: flex-end; }
.field { display: block; margin-bottom: 10px; }
.field > span {
  display: block;
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 4px;
}
.field > input, .field > select, .field > textarea { width: 100%; }

.seg { display: flex; border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; }
.seg button {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--dim);
  height: 27px;
}
.seg button + button { border-left: 1px solid var(--rule); }
.seg button.on { background: var(--rule); color: var(--bone); }
#inputSeg button.on { background: rgba(166, 204, 78, .18); color: var(--ok); box-shadow: inset 0 0 0 1px rgba(166, 204, 78, .35); }

.card { background: var(--panel); border: 1px solid var(--rule); border-radius: 8px; padding: 14px; }
.card + .card { margin-top: 14px; }
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.admin-grid .card + .card { margin-top: 0; }
@media (max-width: 1000px) { .admin-grid { grid-template-columns: 1fr; } }
.card-h { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-h h2 { margin: 0; }

.seg button .cnt { color: var(--faint); margin-left: 3px; font-variant-numeric: tabular-nums; }
.seg button.on .cnt { color: var(--gold); }

.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar .search { flex: 1; min-width: 160px; max-width: 360px; }

.tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.tbl th {
  text-align: left;
  font-weight: 600;
  color: var(--dim);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 7px 8px;
  border-bottom: 1px solid var(--rule);
  white-space: nowrap;
}
.tbl td { padding: 6px 8px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .1s; }
.tbl tbody tr:hover { background: var(--base01); }
.tbl tbody tr[data-uid] { cursor: pointer; }
.tbl .actions { display: flex; gap: 4px; flex-wrap: wrap; }
.tbl .actions .open { min-width: 58px; height: 24px; padding: 0 14px; font-size: 12px; }
#buildRows .actions { gap: 10px; }
.tbl .owner { padding-left: 12px; }
#buildRows th:last-child, #buildRows td:last-child,
#bdList th:last-child, #bdList td:last-child { width: 1%; white-space: nowrap; }
#buildRows .actions, #bdList .actions { flex-wrap: nowrap; }
button.ok, .btn.ok { border-color: var(--ok); color: var(--ok); }
.tbl .uid { color: var(--faint); font-size: 10px; }
.bname { display: inline-flex; align-items: center; gap: 6px; }
.bname .icon-btn { width: 20px; height: 20px; border: 0; background: none; color: var(--faint); }
.bname .icon-btn svg { width: 13px; height: 13px; }
.bname .icon-btn:hover { color: var(--gold); background: none; }
.bname .icon-btn.ok { color: var(--ok); background: none; }
.status {
  display: inline-block;
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--dim);
  white-space: nowrap;
  vertical-align: 1px;
}
.status.on { color: var(--ok); }
.kl-state.on { color: var(--ok); }
.badge {
  display: inline-block;
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0 5px;
  font-size: 10px;
  color: var(--dim);
  letter-spacing: .04em;
  white-space: nowrap;
}
.badge.admin { color: var(--err); border-color: var(--err); }
.badge.ok { color: var(--ok); border-color: var(--ok); }
.badge.gold { color: var(--gold); border-color: var(--gold); }

.empty { padding: 40px 12px; text-align: center; color: var(--dim); }

.ctx-menu {
  position: fixed;
  z-index: 200;
  min-width: 168px;
  padding: 5px;
  background: var(--glass);
  border: 1px solid var(--base03);
  border-radius: 9px;
  box-shadow: var(--shadow-pop);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: ctxIn .13s var(--ease-out);
  transform-origin: top left;
}
@keyframes ctxIn {
  from { opacity: 0; transform: scale(.94) translateY(-3px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.ctx-menu button {
  display: block;
  width: 100%;
  height: auto;
  padding: 7px 11px;
  text-align: left;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--bone);
  font-size: 12px;
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: .01em;
  transition: background .1s, color .1s;
}
.ctx-menu button:hover { background: rgba(124, 110, 170, .18); color: var(--white); }
.ctx-menu button.danger { color: var(--err); }
.ctx-menu button.danger:hover { background: rgba(194, 116, 118, .14); color: var(--err); }
.ctx-menu button:disabled { opacity: .35; cursor: default; }
.ctx-menu button:disabled:hover { background: transparent; color: inherit; }
.ctx-menu-sep {
  height: 1px;
  margin: 4px 6px;
  background: var(--base03);
  border: 0;
}

/* ---- confirm dialog ---- */
.confirm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: confirmIn .15s ease;
}
@keyframes confirmIn { from { opacity: 0; } to { opacity: 1; } }
.confirm-box {
  width: min(400px, 100%);
  padding: 18px 18px 16px;
  background: var(--glass);
  border: 1px solid var(--base03);
  border-radius: 12px;
  box-shadow: var(--shadow-pop);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: confirmPop .18s var(--ease-out);
}
@keyframes confirmPop {
  from { opacity: 0; transform: scale(.95) translateY(6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.confirm-box .confirm-msg {
  margin: 0 0 16px;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.55;
  color: var(--bone);
  overflow-wrap: anywhere;
}
.confirm-box .confirm-msg b, .confirm-box .confirm-msg code { color: var(--white); }
.confirm-box .confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.confirm-box .confirm-actions button { min-width: 84px; }
.confirm-box.modal { width: min(440px, 100%); }
.confirm-box.modal .confirm-actions { margin-top: 14px; }
.modal-title { margin: 0 0 14px; font-size: 11px; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--dim); }
.modal-err { min-height: 0; margin: 8px 0 0; font-size: 12px; color: var(--err); }
.modal-err:empty { display: none; }
.tfa-qr { display: flex; justify-content: center; margin: 2px 0 12px; }
.tfa-qr svg { width: 176px; height: 176px; background: #fff; border-radius: 8px; padding: 6px; }
.tfa-secret-row { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; }
.tfa-secret-row .tfa-reveal { flex: none; width: 52px; height: 27px; padding: 0; font-size: 11px; }
.tfa-secret-row .icon-btn { flex: none; }
.tfa-secret-row .icon-btn.ok { color: var(--ok); border-color: var(--ok); }
.tfa-secret { flex: 1 1 auto; min-width: 0; height: 27px; margin: 0; padding: 0 10px;
  display: block; line-height: 25px; text-align: center; background: var(--base00);
  border: 1px solid var(--rule); border-radius: 6px; font-family: var(--mono); font-size: 12px;
  letter-spacing: .04em; color: var(--bone); white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; }
.tfa-secret.shown { color: var(--gold); }
#licDays { margin-left: 6px; font-size: 11px; color: var(--dim); }
.sec-list { display: flex; flex-direction: column; gap: 10px; }
.sec-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  background: var(--panel); border: 1px solid var(--rule); border-radius: 8px; }
.sec-ico { width: 18px; height: 18px; flex: none; color: var(--dim); }
.sec-main { flex: 1; min-width: 0; }
.sec-title { font-size: 12px; color: var(--white); }
.sec-hint { margin-top: 2px; font-size: 11px; color: var(--dim); }
.sec-row .badge, .sec-row button { flex: none; }
.sec-row button { height: 30px; padding: 0 14px; }
#tfaBackdrop[hidden] { display: none; }

.upd-box .upd-file {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  padding: 10px;
  background: var(--ink);
  border: 1px dashed var(--rule);
  border-radius: 8px;
  cursor: pointer;
}
.upd-box .upd-file:hover { border-color: var(--gold); }
.upd-box .upd-file:focus-within { outline: 1px solid var(--gold); outline-offset: 1px; }
.upd-box .upd-file input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.upd-file-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  height: 27px;
  padding: 0 11px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  color: var(--bone);
  font-size: 12px;
}
.upd-file-name {
  min-width: 0;
  color: var(--dim);
  font-size: 11px;
  overflow-wrap: anywhere;
}

pre, code, .pre { font-family: var(--mono); }
pre.out {
  margin: 0;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 9px 11px;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 55vh;
  overflow: auto;
  font-size: 12px;
  line-height: 1.5;
  min-height: 40px;
}
pre.out .err { color: var(--err); }
code.inline { background: var(--rule); padding: 0 4px; border-radius: 3px; overflow-wrap: anywhere; }

/* ---- victim page ---- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--rule); margin-bottom: 14px; overflow-x: auto; }
.tabs button {
  flex: none;
  font-family: var(--sans);
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--dim);
  height: 30px;
  transition: color .12s, background .12s, border-color .12s;
}
.tabs button:hover { color: var(--white); background: var(--base01); border-color: transparent; }
.tabs button.on { color: var(--white); border-bottom-color: var(--gold); }
.victim-view { display: flex; flex-direction: column; gap: 12px; }
.victim-head {
  position: sticky;
  top: 0;
  z-index: 15;
  width: 100%;
  max-width: 1456px;
  margin: 0 auto;
  padding: 7px 12px;
  box-shadow: 0 10px 18px var(--ink);
}
.vhead { display: flex; align-items: stretch; flex-wrap: wrap; row-gap: 7px; font-variant-numeric: tabular-nums; }
.vhead-state {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  padding-right: 13px;
  border-right: 1px solid var(--rule);
}
.vfield { display: flex; flex-direction: column; justify-content: center; gap: 1px; min-width: 0; flex: 1 1 118px; padding: 0 13px; }
.vfield + .vfield { border-left: 1px solid var(--rule); }
.vfield-seen .vval { color: var(--bone); }
.vlabel {
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--faint);
  line-height: 1.2;
}
.vval {
  font-size: 12px;
  line-height: 1.4;
  color: var(--bone);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vval-id { color: var(--gold); font-size: 11.5px; letter-spacing: .04em; }
.vhead-update {
  flex: none;
  width: 27px;
  height: 27px;
  padding: 0;
  color: var(--gold);
  background: var(--ink);
  border-color: var(--rule);
}
.vhead-update svg { width: 14px; height: 14px; }
.vhead-update:hover { color: var(--ink); border-color: var(--gold); background: var(--gold); }
.vhead-kill {
  flex: none;
  width: 27px;
  height: 27px;
  padding: 0;
  color: var(--err);
  background: var(--ink);
  border-color: var(--rule);
}
.vhead-kill svg { width: 14px; height: 14px; }
.vhead-kill:hover { color: var(--ink); border-color: var(--err); background: var(--err); }

.victim-view .tabs {
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--rule);
  border-radius: 7px;
  background: var(--ink);
  width: 100%;
  max-width: 1456px;
  margin: 0 auto;
  scrollbar-width: none;
}
.victim-view .tabs::-webkit-scrollbar { display: none; }
.victim-view .tabs button {
  flex: 1 1 0;
  min-width: 0;
  height: 26px;
  padding: 0 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--dim);
  font-size: 11px;
}
.victim-view .tabs button:hover { color: var(--white); background: var(--base01); }
.victim-view .tabs button.on { background: var(--rule); color: var(--white); }
.tab { display: none; }
.tab.on { display: block; }
.victim-view .tab {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 14px;
  min-height: 120px;
  width: 100%;
  max-width: 1456px;
  margin: 0 auto;
}

/* misc: stacked panels */
#tab-misc { padding: 0; background: none; border: 0; min-height: 0; }
#tab-misc.on { display: flex; flex-direction: column; gap: 12px; }
.misc-panel + .misc-panel { margin-top: 0; }
.misc-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
@media (max-width: 900px) { .misc-pair { grid-template-columns: 1fr; } }
.misc-panel .stealer-title { margin-bottom: 10px; }
.misc-block-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.misc-block-head .stealer-title { margin: 0; }
.misc-panel .toolbar { margin-bottom: 8px; }
.misc-panel .empty { padding: 26px 12px; }
.misc-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.misc-row button { gap: 6px; }
.misc-row button svg { width: 14px; height: 14px; flex: none; }
.misc-row select { flex: 0 1 auto; width: auto; max-width: 100%; min-width: 0; }
#tab-misc .out { margin-top: 10px; background: var(--ink); min-height: 40px; max-height: 220px; }
.victim-view #tab-screen .stream-wrap { height: auto; aspect-ratio: 16 / 9; }
.victim-view #tab-hvnc .stream-wrap { height: auto; aspect-ratio: 16 / 9; }
#streamView { display: none; }
#tab-screen #streamView, #tab-hvnc #streamView { display: block; }
#hvncPanel[hidden] { display: none; }
#hvncPanel .toolbar { border-top: 1px solid var(--rule); }
.hvnc-launcher { margin-top: 10px; background: var(--ink); border: 1px solid var(--rule);
  border-radius: 8px; padding: 12px; }
.hvnc-launch-row { display: flex; gap: 6px; }
.hvnc-cmd { flex: 1; font-family: var(--mono); font-size: 12px; background: var(--base00);
  border: 1px solid var(--rule); border-radius: 6px; padding: 7px 10px; color: var(--bone); }
.hvnc-cmd:focus { outline: none; border-color: var(--gold); }
.hvnc-cmd::placeholder { color: var(--faint); }
.hvnc-run-btn { font-weight: 600; padding: 7px 16px; }
.hvnc-apps-wrap { margin-top: 10px; }
.hvnc-apps-label { font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--dim); margin-bottom: 6px; }
.hvnc-apps { display: flex; flex-wrap: wrap; gap: 6px;
  max-height: 170px; overflow-y: auto; padding-right: 2px; }
.hvnc-apps[hidden] { display: none; }
.hvnc-apps-note { flex: 1 1 100%; font-size: 11px; color: var(--dim); padding: 6px 2px; }
.hvnc-apps .hvnc-app { flex: 1 1 150px; min-width: 0; display: flex; align-items: center; gap: 8px;
  text-align: left; padding: 7px 10px; overflow: hidden; background: var(--panel);
  border: 1px solid var(--rule); border-radius: 6px; }
.hvnc-apps .hvnc-app:hover { border-color: var(--gold); color: var(--white); }
.hvnc-apps .hvnc-app:focus-visible { outline-offset: -2px; }
.hvnc-apps .hvnc-app svg { width: 15px; height: 15px; flex: none; color: var(--dim); }
.hvnc-apps .hvnc-app:hover svg { color: var(--gold); }
.hvnc-app-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.victim-view #tab-screen #streamCanvas { width: 100%; height: 100%; }
.victim-view #tab-screen .stream-wrap:fullscreen #streamCanvas { width: 100%; height: 100%; max-width: none; max-height: none; }
.bar { display: flex; gap: 6px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.bar input { flex: 1; min-width: 140px; }
.section { margin-top: 14px; }
.section h4 { margin: 0 0 8px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.toolbar .grow-input { flex: 1; min-width: 120px; }
#fsMsg:empty, .file-meta:empty { display: none; }
#fsMsg { margin-bottom: 8px; }
.file-meta { margin: -4px 0 10px; font-size: 11px; }
pre.out.out-tall { min-height: 180px; max-height: 52vh; }
pre.out.out-short { max-height: 220px; }
pre.out:empty:not(#shellOut):not(#keylogOut) { display: none; }

.tbl-wrap { border: 1px solid var(--rule); border-radius: 6px; overflow: auto; max-height: 46vh; }
.files-tbl { min-width: 440px; }
.files-tbl tbody tr { cursor: pointer; }
.files-tbl th:first-child, .files-tbl td:first-child { width: 62px; }
.files-tbl th:nth-child(2), .files-tbl td:nth-child(2) { width: 100px; }
.files-tbl th:nth-child(3), .files-tbl td:nth-child(3) { width: 170px; }
.files-tbl .name { color: var(--gold); overflow-wrap: anywhere; }
.files-tbl tbody tr.is-dir .name { font-weight: 600; }
.files-tbl tr[data-path] { cursor: context-menu; }

.fm { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; align-items: start; }
.fm-main { min-width: 0; }
.fm-read { margin-top: 8px; }
.fm-box { background: var(--ink); border: 1px solid var(--rule); border-radius: 8px; padding: 10px; }
.fm-box + .fm-box { margin-top: 10px; }
.fm-box h4 { margin: 0 0 8px; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.fm-box .field { margin-bottom: 8px; }
.fm-box #upFile { width: 100%; }
.fm-box .file-meta { margin: 0 0 8px; }
.fm-btn { width: 100%; }
.fm-box pre.out { margin-top: 8px; }

.stream-wrap {
  position: relative;
  width: 100%;
  height: 62vh;
  background: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
#streamCanvas, #webcamCanvas, #hvncCanvas {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  background: var(--ink);
  touch-action: none;
}
/* Fill the pane, preserve the stream aspect inside it: a canvas has an
   intrinsic bitmap size and would otherwise stay at 1074x600 in fullscreen,
   showing thick black borders instead of scaling up. */
.stream-wrap > #streamCanvas { width: 100%; height: 100%; object-fit: contain; }
.stream-wrap:fullscreen { height: 100vh; width: 100vw; border: 0; border-radius: 0; }
.stream-wrap:fullscreen #streamCanvas { max-width: 100%; max-height: 100%; }
.stream-wrap.controlling #streamCanvas { cursor: crosshair; }
.stream-load {
  position: absolute; inset: 0; z-index: 5;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10, 10, 10, .55);
}
.stream-load[hidden] { display: none; }
.stream-load-track { width: min(260px, 56vw); height: 3px; border-radius: 2px; overflow: hidden; background: var(--rule); }
.stream-load-track span { display: block; width: 40%; height: 100%; border-radius: 2px; background: var(--gold); animation: streamload 1.2s ease-in-out infinite; }
@keyframes streamload { from { transform: translateX(-100%); } to { transform: translateX(350%); } }
.cam-wrap { height: min(46vh, 520px); }
.stream-bar { margin: 8px 0 0; }
.stream-bar .seg button { padding: 0 12px; }
.stream-bar select { max-width: 220px; }
.stream-bar .vol-track { width: 150px; flex: none; }
#fsBtn { min-width: 110px; }
.stream-row { display: flex; gap: 8px; flex: none; }
.icon-btn { width: 27px; height: 27px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.icon-btn svg { width: 15px; height: 15px; display: block; }
.icon-btn:disabled { opacity: .6; }
.stream-bar:not(.fs) .stream-row .icon-btn { flex: none; width: 48px; height: 27px; padding: 0; }
.stream-bar:not(.fs) .stream-row .icon-btn svg { width: 16px; height: 16px; }
#inputSeg button { background: var(--ink); color: var(--bone); }
#webcamDevSel { max-width: 280px; }
.stream-vol { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 8px; background: var(--ink); border: 1px solid var(--rule); border-radius: 6px; }
.vol-track { position: relative; height: 100%; }
#volInput { position: absolute; inset: 0; display: block; appearance: none; -webkit-appearance: none; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; background: transparent; cursor: pointer; }
#volInput::-webkit-slider-runnable-track { height: 8px; border-radius: 4px; background: var(--rule); }
#volInput::-webkit-slider-thumb { -webkit-appearance: none; width: 1px; height: 8px; margin-top: 0; border: 0; background: transparent; }
#volInput::-moz-range-track { height: 8px; border-radius: 4px; background: var(--rule); }
#volInput::-moz-range-progress { height: 8px; border-radius: 4px; background: transparent; }
#volInput::-moz-range-thumb { width: 1px; height: 8px; border: 0; background: transparent; }
.vol-fill { position: absolute; left: 0; top: 50%; transform: translateY(-50%); height: 8px; width: var(--vol, 100%); border-radius: 4px; background: var(--gold); pointer-events: none; }
#volLabel { min-width: 26px; text-align: right; font-size: 11px; color: var(--bone); font-variant-numeric: tabular-nums; }
.fs-only { display: none; }
.stream-bar.fs {
  position: absolute; left: 12px; top: 50%; right: auto; bottom: auto;
  transform: translateY(-50%); z-index: 6;
  width: min(230px, calc(100% - 24px)); max-height: calc(100% - 24px); overflow: auto;
  margin: 0; padding: 10px;
  display: flex; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 8px;
  background: rgba(15, 15, 15, .86);
  border: 1px solid var(--rule);
  border-radius: 8px;
  backdrop-filter: blur(6px);
  transition: opacity .18s ease;
}
.stream-bar.fs .spacer { display: none; }
.stream-bar.fs .seg button { flex: 1; padding: 0 8px; color: var(--bone); }
.stream-bar.fs select { max-width: none; width: 100%; }
.stream-bar.fs .stream-row .icon-btn { flex: 1; }
.stream-bar.fs .vol-track { width: auto; flex: 1; min-width: 0; }
.stream-bar.fs .fs-only { display: flex; flex-direction: column; gap: 6px; }
.stream-bar.fs .fs-only button { width: 100%; }
.stream-bar.fs.hide { opacity: 0; pointer-events: none; }

.sh-head { margin-bottom: 10px; flex-wrap: wrap; row-gap: 6px; }
.ws-chip { height: 22px; padding: 0 8px; border: 1px solid var(--rule); border-radius: 5px; background: var(--ink); color: var(--dim); font-size: 10px; }
.ws-chip:hover { border-color: var(--gold); color: var(--white); }
.ws-chip.ok { color: var(--ok); border-color: rgba(166, 204, 78, .45); }
.ws-chip.wait { color: var(--bone); border-color: var(--gold); }
.ws-chip.err { color: var(--err); border-color: rgba(194, 116, 118, .45); }
.px-head { flex-wrap: wrap; row-gap: 6px; }
.px-loc { display: inline-flex; align-items: center; gap: 8px; margin-left: 6px; min-width: 0; }
.px-loc-ip { font: 600 11px/1 var(--mono); color: var(--bone); }
.px-flag { width: 20px; height: 14px; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; line-height: 1; flex: none; }
.px-flag img { display: block; width: 20px; height: 14px; object-fit: cover; border-radius: 2px; }
.px-flag:empty { display: none; }
.px-field {
  display: inline-flex; align-items: center; height: 27px; padding: 0 10px;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  background: var(--ink); border: 1px solid var(--rule); border-radius: 5px;
  color: var(--bone); font: 12px/1 var(--mono);
}
.px-cred-row { display: flex; align-items: center; gap: 8px; }
.px-cred-row .px-field { flex: 1 1 auto; min-width: 0; }
.px-cred-url {
  display: block; width: auto; height: 27px; min-height: 0;
  padding: 0 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 25px;
}
#tab-proxy > .section:first-child { margin-top: 0; }
.sh-term {
  display: flex; flex-direction: column;
  height: calc(100vh - 330px); min-height: 320px; max-height: 760px;
  border: 1px solid var(--rule); border-radius: 8px; background: var(--ink); overflow: hidden;
}
.sh-term pre.sh-out {
  flex: 1; min-height: 0; max-height: none; margin: 0; padding: 12px 14px;
  border: 0; border-radius: 0; background: transparent;
}
.sh-term pre.sh-out:empty::before { content: "no output yet"; color: var(--faint); }
.sh-cmd { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-top: 1px solid var(--rule); background: var(--panel); }
.sh-cmd .grow-input { flex: 1; min-width: 0; }
.sh-prompt { color: var(--ok); font-weight: 700; font-size: 12px; }
.sh-echo { color: var(--ok); }

.kl-head { margin-bottom: 10px; }
#tab-keylog [data-act="keylog-clear"] { color: var(--bone); }
#tab-keylog [data-act="keylog-clear"]:hover { color: var(--gold); }
.kl-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kl-stat { display: flex; flex-direction: column; gap: 3px; padding: 8px 11px; border: 1px solid var(--rule); border-radius: 7px; background: var(--ink); }
.kl-stat > span { font-size: 10px; text-transform: uppercase; letter-spacing: .6px; color: var(--faint); }
.kl-stat b { font-size: 13px; font-weight: 600; color: var(--text); }
#keylogOut:empty::before { content: 'no keystrokes captured yet — start capture, then refresh'; color: var(--faint); }
#keylogOut.cleared:empty::before { content: none; }

.cfg-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--rule); }
.cfg-row:last-child { border-bottom: 0; }
.cfg-row .k { color: var(--dim); font-size: 11px; width: 92px; flex: none; }
.shot-img { display: block; max-width: 100%; margin-top: 8px; border: 1px solid var(--rule); border-radius: 8px; }
.cfg-row code {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  height: 27px;
  overflow-x: auto;
  white-space: nowrap;
  background: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 5px;
  padding: 0 8px;
  font-size: 12px;
}
#tab-stealer { padding: 0; background: none; border: 0; min-height: 0; }
#tab-stealer.on { display: flex; flex-direction: column; gap: 12px; }
#tab-stealer .card + .card { margin-top: 0; }
.stealer-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.stealer-title { margin: 0; font-family: var(--sans); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.stealer-actions { flex-wrap: wrap; margin-bottom: 0; }
.rec-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.rec-head .grow-input { max-width: 320px; }
#recCounts:empty { display: none; }
.rec-wrap { max-height: 38vh; }
.rec-tbl { min-width: 520px; background: var(--ink); }
.rec-tbl th:first-child, .rec-tbl td:first-child { width: 84px; }
.rec-tbl th:nth-child(2), .rec-tbl td:nth-child(2) { width: 110px; }
.rec-tbl tbody tr { cursor: pointer; }
.rec-tbl .name { color: var(--gold); overflow-wrap: anywhere; }
.rec-snippet { color: var(--dim); font-size: 11px; margin-top: 2px; overflow-wrap: anywhere; }
.rec-path { color: var(--bone); font-size: 12px; overflow-wrap: anywhere; }
.tok-badge { display: inline-block; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--rule); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.tok-valid, .tok-account_exists { color: var(--good, #6fbf73); border-color: currentColor; }
.tok-invalid { color: var(--bad, #d05a5a); border-color: currentColor; }
.tok-rate_limited { color: var(--gold); border-color: currentColor; }
.tok-unknown, .tok-error { color: var(--dim); }
.tok-val { font-family: var(--mono, monospace); font-size: 11px; color: var(--bone); overflow-wrap: anywhere; }
.key-cell { display: flex; align-items: center; gap: 8px; }
.key-cell .icon-btn { width: 22px; height: 22px; border: 0; background: none; color: var(--faint); }
.key-cell .icon-btn:hover { color: var(--gold); background: none; }
.key-cell .icon-btn.ok { color: var(--ok); background: none; }
.key-cell .icon-btn svg { width: 13px; height: 13px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--rule); font-size: 12px; }
.kv:last-child { border-bottom: 0; }
.inline-num {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--bone);
  white-space: nowrap;
}
.inline-num input { width: 64px; text-align: right; }
.tbl .st-cell { padding-left: 14px; }
.kv .k { color: var(--dim); white-space: nowrap; }
.kv .v { color: var(--bone); text-align: right; overflow-wrap: anywhere; }

.settings { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.settings .card + .card { margin-top: 0; }
.settings #themeCard { grid-column: 1 / -1; }
.settings .me { max-width: none; margin: 0; }
.settings #accountCard { display: flex; flex-direction: column; }
.settings #accountCard .card-h .actions { margin-top: 0; justify-content: flex-end; }
.settings .kv { justify-content: space-between; gap: 10px; }
.settings .kv .v { text-align: right; }
.settings #themeCard .field { max-width: 100%; }
.theme-editor { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; align-items: stretch; margin-bottom: 12px; }
.theme-editor .field { margin: 0; }
.theme-editor textarea { display: block; }
.palette { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(8, minmax(0, 1fr)); gap: 6px; min-height: 0; }
.swatch {
  display: flex; flex-direction: column; justify-content: center; min-height: 0;
  padding: 4px 7px; border: 1px solid var(--rule); border-radius: 4px;
  font-family: var(--mono); font-size: 9px; line-height: 1.35;
}
.swatch b { font-weight: 600; opacity: .85; }
.swatch span { opacity: .8; }
@media (max-width: 1020px) {
  .settings { max-width: 980px; }
}
@media (max-width: 780px) {
  .theme-editor { grid-template-columns: 1fr; }
  .palette { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(4, minmax(34px, auto)); }
  .settings { grid-template-columns: 1fr; }
  .settings #themeCard { grid-column: auto; }
}

.build-wrap { max-width: 980px; margin: 0 auto; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 12px; }

.cap-block, .pkg-block { margin-bottom: 12px; border: 1px solid var(--rule); border-radius: 6px; background: var(--ink); overflow: hidden; }
.build-cols { display: flex; gap: 12px; margin-bottom: 12px; align-items: stretch; }
.build-cols > .cap-block { flex: 1.5 1 0; min-width: 0; }
.build-cols > .pkg-block { flex: 1 1 0; min-width: 0; }
.build-cols .cap-block, .build-cols .pkg-block { margin-bottom: 0; }
.build-cols .cap-block { display: flex; flex-direction: column; }
.build-cols .cap-row { flex: 1; }
.cap-h { font-family: var(--sans); padding: 8px 12px; border-bottom: 1px solid var(--rule); color: var(--dim); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.cap-row { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-bottom: 1px solid var(--rule); }
.cap-row:last-child { border-bottom: 0; }
.cap-text { flex: 1; min-width: 0; }
.cap-text b { display: block; font-weight: 600; }
.cap-text small { color: var(--dim); font-size: 11px; }
.cap-row select { width: 150px; }
.cap-row input[type=checkbox], .toggle input[type=checkbox] {
  appearance: none; flex: none; width: 30px; height: 16px; padding: 0; border-radius: 10px;
  border: 1px solid var(--rule); background: var(--panel); position: relative; cursor: pointer;
  transition: border-color .15s;
}
.cap-row input[type=checkbox]::after, .toggle input[type=checkbox]::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--dim); transition: transform .15s, background .15s;
}
.cap-row input[type=checkbox]:checked, .toggle input[type=checkbox]:checked { border-color: var(--gold); }
.cap-row input[type=checkbox]:checked::after, .toggle input[type=checkbox]:checked::after { transform: translateX(14px); background: var(--gold); }
.adv .chk { display: inline-flex; justify-content: flex-start; gap: 8px; padding: 8px 0 2px; }
.adv .seed-row { display: flex; align-items: center; gap: 8px; }
.adv .seed-row input { width: 132px; flex: none; font-family: var(--mono); font-size: 12px; }
.adv .seed-random { flex: none; width: auto; height: 27px; padding: 0 12px; font-size: 11px; }

.pkg-block { display: flex; flex-direction: column; }
.pkg-grid { display: grid; grid-template-columns: minmax(0, 1fr); grid-auto-rows: 1fr; padding: 0; flex: 1; }
.pkg { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border: 0; border-bottom: 1px solid var(--rule); background: transparent; cursor: pointer; min-width: 0; }
.pkg:last-child { border-bottom: 0; }
.pkg:has(input[type=radio]:checked) { color: var(--gold); }
.pkg input[type=radio] {
  appearance: none; box-sizing: border-box; flex: none; width: 12px; height: 12px; padding: 0;
  margin: 0; border-radius: 50%; border: 1px solid var(--rule); background: transparent;
  cursor: pointer; transition: background .15s, border-color .15s;
}
.pkg input[type=radio]:checked { background: var(--gold); border-color: var(--gold); }
.pkg b { display: block; font-weight: 600; white-space: nowrap; }
.pkg small { display: block; color: var(--dim); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pkg-main { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; cursor: pointer; }
.pkg-main > span { min-width: 0; }
.pkg-zip .pkg-main, .pkg-drop .pkg-main { flex: 0 1 auto; }
.pkg-pass { display: none; flex: 1; min-width: 0; max-width: 180px; margin-left: 8px; text-align: center; }
.pkg-zip:has(input[type=radio]:checked) .pkg-pass, .pkg-drop:has(input[type=radio]:checked) .pkg-pass { display: block; }
.pkg-multi { display: none; align-items: center; gap: 8px; margin-left: auto; color: var(--dim); font-size: 11px; cursor: pointer; flex: none; white-space: nowrap; }
.pkg-drop:has(input[type=radio]:checked) .pkg-multi { display: inline-flex; }
@media (max-width: 900px) {
  .build-cols { flex-direction: column; }
  .build-cols > .cap-block, .build-cols > .pkg-block { flex: none; width: 100%; }
}
.adv { border-top: 1px solid var(--rule); padding-top: 10px; margin-bottom: 12px; }
.adv summary { font-family: var(--sans); cursor: pointer; color: var(--dim); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 10px; }
.adv summary:hover { color: var(--gold); }
.adv[open] summary { margin-bottom: 12px; }
.build-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; border-top: 1px solid var(--rule); padding-top: 12px; }
.build-actions button { display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.build-actions #buildBtn, .build-actions #bdBuildBtn {
  position: relative; overflow: hidden; isolation: isolate; min-width: 104px;
  transition: border-color .15s, color .15s;
}
.build-actions .build-label { position: relative; z-index: 1; }
.build-actions .build-fill {
  position: absolute; inset: 0 auto 0 0; width: var(--p, 0%);
  background: var(--gold); opacity: .3; pointer-events: none;
  transition: width .25s linear;
}
.build-actions #buildBtn.busy:disabled, .build-actions #bdBuildBtn.busy:disabled { opacity: 1; cursor: progress; }
.build-actions #buildBtn.busy .build-label, .build-actions #bdBuildBtn.busy .build-label { color: var(--white); }

/* ---- auth ---- */
body.auth { display: block; min-height: 100vh; overflow-x: hidden; }
body.auth::before {
  content: "XOR";
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 700 clamp(260px, 46vw, 760px)/0.72 var(--sans);
  letter-spacing: -.1em;
  color: #fff;
  opacity: .055;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  transform: scaleX(1.08) translateX(-0.05em);
  transform-origin: center;
}
.auth-wrap { position: relative; z-index: 1; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-card {
  width: 340px;
  padding: 22px 20px 20px;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 10px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .45);
}
.auth-card .brand { margin-bottom: 16px; }
.auth-card .tabs { border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; margin-bottom: 18px; padding: 0; gap: 0; }
.auth-card .tabs button { flex: 1; border: 0; border-radius: 0; height: 30px; }
.auth-card .tabs button + button { border-left: 1px solid var(--rule); }
.auth-card .tabs button.on { background: var(--rule); color: var(--bone); border-bottom: 0; }
.auth-card .form { display: none; }
.auth-card .form.on { display: block; }
.auth-card .field input { width: 100%; }
.auth-card button[type=submit] { width: 100%; }

@media (max-width: 1024px) {
  .fm { grid-template-columns: 1fr; }
  .fm-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
  .fm-box + .fm-box { margin-top: 0; }
}
@media (max-width: 780px) {
  header { flex-wrap: wrap; gap: 8px; padding: 8px 12px; }
  .build-cols { flex-direction: column; }
  .view { padding: 10px; }
  .tbl:not(.files-tbl) th:nth-child(4), .tbl:not(.files-tbl) td:nth-child(4),
  .tbl:not(.files-tbl) th:nth-child(5), .tbl:not(.files-tbl) td:nth-child(5),
  .tbl:not(.files-tbl) th:nth-child(6), .tbl:not(.files-tbl) td:nth-child(6),
  .tbl:not(.files-tbl) th:nth-child(8), .tbl:not(.files-tbl) td:nth-child(8) { display: none; }
  .files-tbl { min-width: 0; }
  .files-tbl th:nth-child(2), .files-tbl td:nth-child(2),
  .files-tbl th:nth-child(3), .files-tbl td:nth-child(3) { display: none; }
}
@media (max-width: 640px) {
  .victim-head { padding: 7px 10px; }
  .vhead { row-gap: 9px; }
  .vfield { padding: 0 10px; }
  .vfield:first-of-type { padding-left: 0; }
  .vval { max-width: 18ch; }
  .vfield-seen { margin-left: auto; }
  .victim-view .tab { padding: 10px; }
  .victim-view .tabs button { flex: 0 0 auto; min-width: 64px; }
  .kl-head { flex-wrap: wrap; row-gap: 6px; }
  .fm-side { grid-template-columns: 1fr; }
  .cam-wrap { height: 34vh; }
  .stream-bar .seg { flex: 1 1 100%; }
  .stream-bar .seg button { flex: 1; }
  .stream-bar select { max-width: none; flex: 1 1 100%; }
  .cfg-row { flex-wrap: wrap; }
  .cfg-row code { flex-basis: 100%; order: 3; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
