:root {
  --bg: #090a09;
  --surface: #101110;
  --surface-solid: #101110;
  --surface2: #161816;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --lime: #e4ff3a;
  --lime-dim: #c6e020;
  --lime-glow: rgba(228, 255, 58, 0.08);
  --text: #f3f5ef;
  --muted: #8d9486;
  --dim: #5e6558;
  --red: #ff5a45;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --sans: 'Barlow', 'Segoe UI', system-ui, sans-serif;
  --shadow: none;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
}

body::before { content: none; }

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.login-card {
  width: min(420px, 92vw);
  padding: 36px 30px 38px;
  background: linear-gradient(165deg, rgba(18, 28, 18, 0.96), rgba(8, 12, 8, 0.94));
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  box-shadow: var(--shadow), 0 0 80px var(--lime-glow);
  backdrop-filter: blur(16px);
}

.login-brand { text-align: center; margin-bottom: 24px; }
.brand-logo {
  display: block;
  object-fit: contain;
  user-select: none;
}
.brand-logo--login {
  width: min(300px, 88vw);
  height: auto;
  margin: 0 auto 10px;
  filter: drop-shadow(0 0 28px rgba(184, 255, 60, 0.22));
}
.brand-logo--topbar {
  height: 34px;
  width: auto;
  filter: drop-shadow(0 0 10px rgba(184, 255, 60, 0.18));
}
.login-tag { font-size: 11px; text-transform: uppercase; letter-spacing: 0.2em; color: var(--muted); margin-top: 4px; }
.login-field { margin-bottom: 14px; }
.login-field label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 6px; }
.login-field input {
  width: 100%; padding: 11px 14px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); font-family: var(--mono); font-size: 13px; outline: none;
}
.login-field input:focus { border-color: var(--lime-dim); box-shadow: 0 0 0 3px var(--lime-glow); }
.login-btn {
  width: 100%; margin-top: 8px; padding: 13px;
  background: linear-gradient(135deg, #d4ff6a, #9ee030); border: none; border-radius: 12px;
  color: #0a1208; font-weight: 700; font-size: 13px; cursor: pointer;
  box-shadow: 0 8px 24px rgba(184, 255, 60, 0.22);
  transition: transform 0.15s, filter 0.15s;
}
.login-btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.login-error {
  margin-bottom: 12px; padding: 10px 12px;
  background: rgba(255, 107, 107, 0.1); border: 1px solid rgba(255, 107, 107, 0.35);
  border-radius: 8px; color: var(--red); font-size: 12px;
}

.app { display: flex; flex-direction: column; height: 100vh; position: relative; z-index: 1; }
.topbar {
  display: flex; align-items: center; gap: 16px; padding: 12px 20px;
  background: rgba(8, 14, 8, 0.72);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px) saturate(1.15);
  flex-shrink: 0;
}
.topbar-brand { display: flex; align-items: center; flex-shrink: 0; }
.topbar-stats { flex: 1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; }
.stat-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px;
  font-size: 11px; font-family: var(--mono); font-weight: 500;
  border: 1px solid var(--border); background: rgba(255, 255, 255, 0.03); color: var(--muted);
}
.stat-pill.on { color: var(--lime); border-color: rgba(198, 255, 74, 0.28); background: rgba(198, 255, 74, 0.08); }
.stat-pill .live-dot { margin-right: 0; }
.stat-pill.off { color: #9ca3af; }
.stat-on { color: var(--lime); }
.stat-off { color: #6b7280; }
.live-dot {
  display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%;
  background: var(--lime); box-shadow: 0 0 8px var(--lime);
  animation: live-pulse 2s ease-in-out infinite; vertical-align: middle;
}
@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}
.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}
.topbar-icon-btn,
.topbar .btn-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.topbar-icon-btn:hover {
  color: var(--lime);
  border-color: rgba(184, 255, 60, 0.35);
  background: rgba(184, 255, 60, 0.08);
}
.topbar .btn-logout:hover {
  color: var(--red);
  border-color: rgba(255, 107, 107, 0.35);
  background: rgba(255, 107, 107, 0.08);
}
.topbar-icon-btn svg,
.topbar .btn-logout svg { display: block; }

.settings-window {
  width: min(440px, 96vw);
  height: auto;
  max-height: min(90vh, 640px);
}
.settings-body {
  padding: 14px 16px 8px;
  overflow: auto;
  flex: 1;
}
.settings-hint {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 14px;
  line-height: 1.45;
}
.settings-field { margin-bottom: 12px; }
.settings-field label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 5px;
}
.settings-input {
  width: 100%;
  padding: 9px 11px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 13px;
  outline: none;
}
.settings-input.settings-mono { font-family: var(--mono); font-size: 12px; }
.settings-input:focus { border-color: var(--lime-dim); box-shadow: 0 0 0 2px var(--lime-glow); }
.settings-row { margin-top: 4px; }
.settings-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text);
  cursor: pointer;
  text-transform: none;
  letter-spacing: normal;
}
.settings-check input { accent-color: var(--lime); width: 15px; height: 15px; }
.settings-foot {
  padding: 10px 16px 14px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
}
.settings-msg {
  font-family: var(--mono);
  font-size: 11px;
  min-height: 16px;
  margin-top: 4px;
}
.settings-msg.ok { color: var(--lime); }
.settings-msg.err { color: var(--red); }

.modules-window {
  width: min(920px, 98vw);
  height: min(580px, 92vh);
  display: flex;
  flex-direction: column;
}
.modules-layout {
  display: flex;
  flex: 1;
  min-height: 0;
  border-top: 1px solid var(--border);
}
.modules-sidebar {
  width: 200px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.2);
}
.modules-new-btn { margin: 10px; width: calc(100% - 20px); font-size: 11px; }
.modules-list { flex: 1; overflow: auto; padding: 0 6px 8px; }
.mod-list-item {
  display: block; width: 100%; text-align: left;
  padding: 8px 10px; margin-bottom: 4px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 6px; color: var(--text);
  font-family: var(--mono); font-size: 11px; cursor: pointer;
}
.mod-list-item:hover { border-color: var(--lime-dim); }
.mod-list-item.active { border-color: var(--lime); background: var(--lime-glow); }
.mod-list-item .mod-list-label { font-weight: 600; color: var(--lime); display: block; }
.mod-list-item .mod-list-meta { font-size: 9px; color: var(--muted); margin-top: 3px; }
.mod-list-item.is-off { opacity: 0.55; }
.modules-editor { flex: 1; overflow: auto; padding: 12px 14px; min-width: 0; }
.modules-flags { display: flex; gap: 16px; flex-wrap: wrap; }
.modules-code {
  width: 100%; min-height: 220px; padding: 10px 12px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 6px;
  color: var(--text); font-family: var(--mono); font-size: 11px;
  line-height: 1.45; resize: vertical; outline: none;
}
.modules-code:focus { border-color: var(--lime-dim); box-shadow: 0 0 0 2px var(--lime-glow); }
.modules-foot { justify-content: space-between; align-items: center; }
.modules-foot-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  justify-content: flex-end;
  min-width: 0;
}
.modules-foot-right .settings-msg { margin: 0; flex: 1; text-align: right; }
.modules-foot .term-send:disabled { opacity: 0.55; cursor: wait; }
.mod-del-btn { color: var(--red) !important; border-color: rgba(255,107,107,.35) !important; }
.tree-chip.is-disabled {
  opacity: 0.45; cursor: not-allowed;
  border-color: var(--border) !important; color: var(--muted) !important;
}

.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(80px);
  z-index: 9500; padding: 10px 18px; border-radius: 8px; font-size: 12px; font-family: var(--mono);
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  box-shadow: 0 8px 32px rgba(0,0,0,.5); opacity: 0; pointer-events: none; transition: transform .25s, opacity .25s;
  max-width: min(520px, 92vw); text-align: center;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.ok { border-color: var(--lime-dim); color: var(--lime); }
.toast.err { border-color: rgba(255,107,107,.5); color: #ff8a8a; }
.toast.info { border-color: var(--lime-dim); color: var(--muted); }

.browser-wrap {
  flex: 1; overflow: auto; padding: 18px 20px 28px;
  background: transparent;
}
.tree-root { width: 100%; max-width: none; }
.tree-empty {
  padding: 64px 24px; text-align: center; color: var(--muted);
  font-family: var(--mono); font-size: 13px;
  border: 1px dashed var(--border-strong); border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
}

.sess-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-family: var(--mono);
  font-size: 12px;
  background: linear-gradient(180deg, rgba(16, 26, 16, 0.92), rgba(8, 12, 8, 0.88));
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.sess-table thead {
  background: rgba(0, 0, 0, 0.42);
  position: sticky;
  top: 0;
  z-index: 2;
  backdrop-filter: blur(10px);
}
.sess-table th {
  padding: 11px 12px;
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--dim);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.sess-table th.col-chev,
.sess-table td.col-chev { width: 22px; padding: 7px 4px 7px 10px; color: var(--lime-dim); }
.sess-table th.col-flag,
.sess-table td.col-flag { width: 32px; text-align: center; padding: 7px 4px; }
.sess-table th.col-agent,
.sess-table td.col-agent { width: 56px; }
.sess-table th.col-seen,
.sess-table td.col-seen { width: 56px; color: var(--dim); white-space: nowrap; }
.sess-table th.col-ban,
.sess-table td.col-ban,
.sess-table th.col-x,
.sess-table td.col-x { width: 32px; text-align: center; padding-left: 0; padding-right: 4px; }
.sess-table td.col-x { padding-right: 10px; }
.sess-ban {
  height: 22px; padding: 0 6px; border-radius: 6px;
  border: 1px solid transparent; background: transparent;
  color: var(--dim); font-size: 9px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; cursor: pointer;
}
.sess-row:hover .sess-ban { color: #c4a574; }
.sess-ban:hover { color: #ffb347; border-color: rgba(255, 179, 71, 0.45); background: rgba(255, 179, 71, 0.1); }
.sess-x {
  width: 22px; height: 22px; border-radius: 6px;
  border: 1px solid transparent; background: transparent;
  color: var(--dim); font-size: 16px; line-height: 1; cursor: pointer;
}
.sess-row:hover .sess-x { color: #b7c4b4; }
.sess-x:hover { color: var(--red); border-color: rgba(255, 122, 122, 0.5); background: rgba(255, 122, 122, 0.1); }
.sess-table th.col-st,
.sess-table td.col-st { width: 78px; text-align: center; }
.sess-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
  color: var(--text);
}
.sess-row { cursor: pointer; transition: background 0.15s; }
.sess-row.is-online { box-shadow: inset 3px 0 0 var(--lime); }
.sess-row.is-online .col-host { color: var(--lime); }
.sess-row.is-offline { box-shadow: inset 3px 0 0 #4b5563; opacity: 0.82; }
.sess-row.is-offline .col-host { color: #c5cdd6; }
.sess-row:hover { background: rgba(198, 255, 74, 0.07); }
.sess-row.is-offline:hover { background: rgba(255, 255, 255, 0.035); opacity: 1; }
.sess-row.open { background: rgba(198, 255, 74, 0.08); }
.sess-row.is-offline.open { background: rgba(255, 255, 255, 0.03); }
.st-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px 3px 6px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.st-badge.on {
  color: #d9ff9a;
  background: rgba(198, 255, 74, 0.12);
  border: 1px solid rgba(198, 255, 74, 0.35);
}
.st-badge.off {
  color: #d1d5db;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.st-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.st-badge.on .st-dot {
  background: var(--lime);
  box-shadow: 0 0 8px rgba(198, 255, 74, 0.8);
  animation: live-pulse 2s ease-in-out infinite;
}
.st-badge.off .st-dot { background: #9ca3af; }
.col-host { font-weight: 600; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col-user { color: var(--muted); max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col-ip { color: #79c0ff; white-space: nowrap; }
.col-os { color: var(--muted); max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col-agent { color: var(--dim); font-size: 10px; }
.col-flag { font-size: 14px; line-height: 1; }
.sess-detail td {
  padding: 0;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid var(--border);
}
.sess-panel { padding: 8px 12px 10px; }

.tree-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.tree-block.is-offline { opacity: 0.72; }
.tree-block.tree-nested {
  background: transparent; border: none; border-radius: 0;
  margin-left: calc(var(--depth, 1) * 12px);
}
.tree-block.tree-module {
  margin-bottom: 8px;
}
.tree-module-row {
  font-weight: 600;
  padding: 8px 10px;
}
.tree-tag.c-mod-dev {
  background: rgba(184, 255, 60, 0.18);
  color: #b8ff3c;
  font-size: 11px;
}
.tree-tag.c-mod-net {
  background: rgba(88, 166, 255, 0.18);
  color: #58a6ff;
  font-size: 11px;
}
.tree-tag.c-mod-game {
  background: rgba(255, 140, 220, 0.18);
  color: #ff8cdc;
  font-size: 11px;
}
.tree-tag.c-game-cli { background: rgba(255, 140, 220, 0.14); color: #ff9ee0; }
.tree-tag.c-game { background: rgba(180, 120, 255, 0.14); color: #c8a0ff; }
.tree-tag.c-mod-browser {
  background: rgba(255, 180, 100, 0.18);
  color: #ffb464;
  font-size: 11px;
}
.tree-tag.c-browser { background: rgba(255, 180, 100, 0.14); color: #ffc080; }
.tree-tag.c-browser-prof { background: rgba(255, 210, 140, 0.12); color: #ffd28c; }
.tree-tag.c-mod-crypto {
  background: rgba(255, 215, 80, 0.18);
  color: #ffd750;
  font-size: 11px;
}
.tree-tag.c-crypto { background: rgba(255, 215, 80, 0.14); color: #ffe080; }
.tree-tag.c-crypto-data { background: rgba(220, 190, 60, 0.12); color: #e8c860; }
.tree-tag.c-mod-ai {
  background: rgba(120, 200, 255, 0.18);
  color: #78c8ff;
  font-size: 11px;
}
.tree-tag.c-ai { background: rgba(120, 200, 255, 0.14); color: #90d4ff; }
.tree-tag.c-ai-model { background: rgba(160, 180, 255, 0.14); color: #b0b8ff; }
.tree-tag.c-ai-cfg { background: rgba(100, 170, 220, 0.12); color: #88c0e8; }
.tree-tag.c-mod-vpn {
  background: rgba(100, 220, 180, 0.18);
  color: #64dcb4;
  font-size: 11px;
}
.tree-tag.c-vpn { background: rgba(100, 220, 180, 0.14); color: #78e8c8; }
.tree-tag.c-vpn-cfg { background: rgba(80, 200, 160, 0.12); color: #68d8b0; }
.tree-tag.c-vpn-act { background: rgba(60, 255, 180, 0.14); color: #50ffb0; }
.tree-tag.c-mod-mail { background: rgba(120, 180, 255, 0.18); color: #9ec8ff; font-size: 11px; }
.c-mail { background: rgba(100, 160, 240, 0.12); color: #8ab8f0; }
.c-mail-off { background: rgba(180, 140, 255, 0.12); color: #c8b0ff; }
.c-mail-path { background: rgba(90, 150, 220, 0.1); color: #88b0e0; }

.tree-tag.c-mod-msg {
  background: rgba(180, 140, 255, 0.18);
  color: #b48cff;
  font-size: 11px;
}
.tree-tag.c-msg { background: rgba(180, 140, 255, 0.14); color: #c8a8ff; }
.tree-tag.c-msg-data { background: rgba(160, 120, 240, 0.12); color: #b898f0; }
.tree-tag.c-mod-cloud { background: rgba(80, 170, 255, 0.18); color: #7ec4ff; font-size: 11px; }
.tree-tag.c-cloud { background: rgba(80, 170, 255, 0.14); color: #9ad0ff; }
.tree-tag.c-cloud-dir { background: rgba(60, 140, 220, 0.12); color: #7eb8ee; }
.tree-tag.c-mod-remote { background: rgba(255, 140, 80, 0.18); color: #ffb080; font-size: 11px; }
.tree-tag.c-remote { background: rgba(255, 140, 80, 0.14); color: #ffc098; }
.tree-tag.c-remote-act { background: rgba(255, 100, 60, 0.14); color: #ff8868; }
.tree-tag.c-mod-code { background: rgba(140, 200, 120, 0.18); color: #b0e090; font-size: 11px; }
.tree-tag.c-code { background: rgba(140, 200, 120, 0.14); color: #c4eea8; }
.tree-tag.c-code-path { background: rgba(110, 170, 90, 0.12); color: #a8d890; }
.tree-tag.c-mod-sec { background: rgba(255, 200, 120, 0.18); color: #ffc878; font-size: 11px; }
.tree-tag.c-sec { background: rgba(255, 200, 120, 0.14); color: #ffd498; }
.tree-tag.c-sec-svc { background: rgba(220, 160, 80, 0.12); color: #e8b868; }
.tree-tag.c-mod-media { background: rgba(255, 120, 180, 0.18); color: #ff90c0; font-size: 11px; }
.tree-tag.c-mod-software { background: rgba(160, 210, 255, 0.18); color: #a8d4ff; font-size: 11px; }
.tree-tag.c-mod-schtasks { background: rgba(200, 160, 255, 0.18); color: #c8a8ff; font-size: 11px; }
.tree-tag.c-mod-startup { background: rgba(255, 180, 100, 0.18); color: #ffc080; font-size: 11px; }
.tree-tag.c-media { background: rgba(255, 120, 180, 0.14); color: #ffa8d0; }
.tree-tag.c-media-lib { background: rgba(220, 90, 150, 0.12); color: #f090c0; }
.tree-row {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 6px 10px;
  background: transparent; border: none; cursor: pointer;
  color: var(--text); font-family: var(--mono); font-size: 11px;
  text-align: left;
}
.tree-row:hover { background: var(--lime-glow); }
.tree-row.open { background: rgba(184, 255, 60, 0.06); }
.tree-chev {
  width: 12px; flex-shrink: 0; color: var(--lime-dim);
  font-family: var(--mono); font-size: 10px;
}
.tree-label {
  font-family: var(--mono); font-weight: 600; color: var(--lime);
  flex-shrink: 0;
}
.is-offline .tree-label { color: #9ca3af; }
.tree-badge {
  font-size: 8px; font-weight: 600; text-transform: uppercase;
  padding: 2px 5px; border-radius: 3px; font-family: var(--mono);
  display: inline-block;
}
.tree-badge.on { background: var(--lime); color: #0a1208; }
.tree-badge.off { background: #374151; color: #d1d5db; }
.tree-tag {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; padding: 2px 7px; border-radius: 4px;
}
.tree-tag.c-if { background: rgba(121, 192, 255, 0.15); color: #79c0ff; }
.tree-tag.c-dns { background: rgba(88, 166, 255, 0.15); color: #58a6ff; }
.tree-tag.c-gw { background: rgba(255, 166, 87, 0.15); color: #ffa657; }
.tree-tag.c-lan { background: rgba(184, 255, 60, 0.12); color: #b8ff3c; }
.tree-tag.c-tcp { background: rgba(86, 211, 100, 0.12); color: #56d364; }
.tree-tag.c-sys { background: rgba(210, 168, 255, 0.15); color: #d2a8ff; }
.tree-tag.c-lst { background: rgba(255, 123, 114, 0.12); color: #ff7b72; }
.tree-tag.c-shr { background: rgba(255, 214, 102, 0.12); color: #ffd666; }
.tree-tag.c-wifi { background: rgba(121, 192, 255, 0.12); color: #a5d6ff; }
.tree-tag.c-wifinb { background: rgba(90, 170, 255, 0.1); color: #7ec8ff; }
.tree-tag.c-users { background: rgba(180, 220, 255, 0.1); color: #b4dcff; }
.tree-tag.c-rdp { background: rgba(255, 180, 120, 0.12); color: #ffb878; }
.tree-tag.c-periph { background: rgba(255, 166, 217, 0.12); color: #ffa6d9; }
.tree-tag.c-av { background: rgba(255, 200, 120, 0.12); color: #ffc878; }
.leaf-cat {
  display: inline-block; min-width: 72px; padding: 1px 6px; border-radius: 4px;
  background: rgba(255, 255, 255, 0.06); color: var(--muted); font-size: 9px;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.leaf-tag {
  display: inline-block; padding: 1px 6px; border-radius: 4px;
  background: rgba(184, 255, 60, 0.12); color: #c8f070; font-size: 9px;
}
.tree-count {
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  margin-left: auto;
}
.tree-children {
  border-top: 1px solid var(--border);
  padding: 6px 0 8px;
  background: rgba(0, 0, 0, 0.2);
}
.tree-nested .tree-children { border-top: none; padding: 0 0 4px; }
.tree-actions {
  display: flex; flex-wrap: wrap; gap: 5px;
  padding: 4px 2px 8px;
}
.sess-actions {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 6px 4px 10px;
  flex-wrap: wrap;
}
.sess-actions-core {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  padding-right: 12px;
}
.sess-mod-pickers {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 6px;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}
.sess-mod-picker {
  display: inline-flex;
}
.sess-mod-empty {
  padding: 10px 14px;
  font-size: 12px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.45);
}
.sess-mod-toggle {
  white-space: nowrap;
}
.sess-mod-toggle[aria-expanded="true"] {
  background: var(--lime);
  color: #111408;
}
.sess-mod-menu-portal {
  display: none;
  position: fixed;
  z-index: 10050;
  min-width: 220px;
  max-width: min(320px, calc(100vw - 16px));
  padding: 6px 0;
  background: #141812;
  border: 1px solid rgba(184, 255, 46, 0.22);
  border-radius: 10px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.65);
}
.sess-mod-menu-portal.open { display: block; }
.sess-mod-menu-portal.is-scroll {
  max-height: min(360px, 58vh);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(184, 255, 46, 0.35) rgba(0, 0, 0, 0.25);
}
.sess-mod-menu-portal.is-scroll::-webkit-scrollbar { width: 7px; }
.sess-mod-menu-portal.is-scroll::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.25); border-radius: 4px; }
.sess-mod-menu-portal.is-scroll::-webkit-scrollbar-thumb {
  background: rgba(184, 255, 46, 0.28);
  border-radius: 4px;
}
.sess-mod-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 7px 14px;
  border: none;
  background: transparent;
  color: #e8ede0;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}
.sess-mod-item:hover:not(:disabled) {
  background: var(--lime-glow);
  color: var(--lime);
}
.sess-mod-item.is-disabled,
.sess-mod-item:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.sess-mod-item-meta {
  font-size: 9px;
  color: var(--lime-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex-shrink: 0;
  opacity: 0.85;
}
.sess-mod-item-stat {
  text-transform: none;
  letter-spacing: normal;
  font-family: var(--mono);
  font-size: 10px;
  min-width: 88px;
  text-align: right;
}
.sess-mod-item-stat.is-ran { color: var(--lime); opacity: 1; }
.sess-mod-item-stat.is-empty { color: var(--muted); opacity: 0.85; }
.sess-mod-item-stat.is-none { color: var(--dim); font-style: italic; font-size: 9px; text-transform: lowercase; }
.sess-mod-toggle.has-ran { color: var(--lime-dim); }
.sess-actions-core .tree-chip.sess-del {
  color: #ff9a9a;
  border-color: rgba(255, 107, 107, 0.35);
}
.sess-actions-core .tree-chip.sess-del:hover {
  color: var(--red);
  border-color: rgba(255, 107, 107, 0.6);
}
.tree-chip {
  padding: 5px 10px; background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); font-size: 10px; font-family: var(--mono); cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.tree-chip:hover { border-color: var(--lime-dim); color: var(--lime); background: var(--lime-glow); }
.tree-leaf {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  padding: 4px 10px 4px calc(10px + var(--depth, 2) * 14px);
  font-family: var(--mono); font-size: 10px; color: var(--text);
  border-left: 2px solid transparent;
}
.tree-leaf:hover { background: rgba(255,255,255,0.03); border-left-color: var(--border); }
.leaf-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-left: auto;
}
.leaf-actions .tree-chip {
  padding: 1px 6px;
  font-size: 9px;
  text-transform: lowercase;
  opacity: 0.85;
}
.leaf-actions .tree-chip:hover { opacity: 1; }
.leaf-dim { color: var(--muted); }
.tree-leaf .tree-chip {
  padding: 2px 7px; font-size: 10px; margin-left: 6px; vertical-align: middle;
}

#ctx-menu {
  display: none; position: fixed; z-index: 9999; min-width: 200px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5); overflow: hidden; padding: 4px 0;
}
.ctx-title {
  padding: 10px 14px 8px; font-size: 11px; font-weight: 600; text-transform: uppercase;
  color: var(--lime); border-bottom: 1px solid var(--border);
}
.ctx-item { padding: 9px 14px; font-size: 12px; cursor: pointer; color: var(--text); }
.ctx-item:hover { background: var(--lime-glow); color: var(--lime); }
.ctx-sep { height: 1px; background: var(--border); margin: 4px 0; }

#out-drawer {
  display: none; position: fixed; right: 16px; bottom: 16px;
  width: min(520px, calc(100vw - 32px)); max-height: 40vh;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; z-index: 9000;
  flex-direction: column; overflow: hidden;
}
#out-drawer.open { display: flex; }
.out-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  font-size: 11px; text-transform: uppercase; color: var(--lime);
}
.out-body {
  padding: 12px 14px; overflow: auto; font-family: var(--mono);
  font-size: 11px; line-height: 1.5; white-space: pre-wrap; color: var(--muted);
}
.out-close {
  background: none; border: none; color: var(--dim); cursor: pointer; font-size: 18px;
  padding: 0; line-height: 1;
}
.out-close:hover { color: var(--text); }

.term-overlay {
  display: none; position: fixed; inset: 0; z-index: 8600;
  pointer-events: none;
}
.term-overlay.open { display: block; }
.term-window {
  pointer-events: auto;
  position: fixed;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: min(860px, 96vw); height: min(620px, 90vh);
  display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.55), 0 0 40px var(--lime-glow);
  overflow: hidden;
}
.term-window.term-floating { transform: none; }
.term-window.term-dragging {
  box-shadow: 0 16px 56px rgba(0, 0, 0, 0.65), 0 0 48px var(--lime-glow);
  border-color: var(--lime-dim);
}
.term-head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid var(--border); flex-shrink: 0;
  cursor: grab; user-select: none;
}
.term-head::before {
  content: '⋮⋮';
  font-size: 11px; line-height: 1; letter-spacing: -2px;
  color: var(--dim); margin-right: 2px;
}
.term-head.dragging { cursor: grabbing; }
.term-head .out-close,
.float-head .out-close {
  flex-shrink: 0;
  width: 32px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--muted);
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
}
.term-head .out-close:hover,
.float-head .out-close:hover {
  border-color: rgba(255, 120, 100, 0.65);
  color: #ffb4a8;
  background: rgba(255, 70, 55, 0.14);
}
.win-min-btn {
  flex-shrink: 0; width: 32px; height: 30px; padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 6px;
  background: rgba(0, 0, 0, 0.22); color: var(--muted);
  font-size: 17px; line-height: 1; cursor: pointer;
}
.win-min-btn:hover { border-color: var(--lime-dim); color: var(--lime); background: var(--lime-glow); }
.term-head-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.term-overlay.panel-minimized .term-window {
  visibility: hidden; opacity: 0; pointer-events: none;
}
.panel-taskbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 8950;
  height: 40px; padding: 4px 10px 6px;
  display: flex; align-items: stretch;
  background: linear-gradient(180deg, rgba(8, 10, 8, 0.72), rgba(6, 8, 6, 0.96));
  border-top: 1px solid var(--border);
  backdrop-filter: blur(10px);
  pointer-events: auto;
}
.panel-taskbar[hidden] { display: none !important; }
.panel-taskbar-inner {
  display: flex; align-items: center; gap: 6px;
  flex: 1; min-width: 0; overflow-x: auto;
}
.panel-task-btn {
  flex: 0 1 auto; max-width: min(220px, 42vw);
  height: 30px; padding: 0 12px;
  border-radius: 8px 8px 4px 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted); font-family: var(--mono); font-size: 11px;
  cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.panel-task-btn:hover { border-color: var(--lime-dim); color: var(--text); }
.panel-task-btn.is-active {
  background: rgba(198, 255, 74, 0.12); border-color: var(--lime-dim); color: var(--lime);
  box-shadow: inset 0 -2px 0 var(--lime);
}
.panel-task-btn.is-minimized { opacity: 0.82; }
body.panel-taskbar-on .browser-wrap { padding-bottom: 52px; }
.term-clear-btn {
  height: 26px; padding: 0 10px; border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(0, 0, 0, 0.25);
  color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; cursor: pointer;
}
.term-clear-btn:hover { border-color: var(--lime-dim); color: var(--lime); background: var(--lime-glow); }
.term-title {
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--lime); flex: 1;
}
.term-status { font-size: 10px; color: var(--muted); font-family: var(--mono); }
.term-quick {
  display: flex; flex-direction: column; gap: 8px;
  padding: 8px 12px; border-bottom: 1px solid var(--border); flex-shrink: 0;
  background: rgba(0, 0, 0, 0.18);
}
.term-quick-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.term-quick-row select {
  height: 30px; padding: 0 8px; border-radius: 8px;
  border: 1px solid var(--border); background: rgba(0,0,0,0.35); color: var(--text);
  font-family: var(--mono); font-size: 11px; outline: none;
}
#term-shell { width: 118px; flex-shrink: 0; }
#term-preset { flex: 1; min-width: 0; }
.term-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.term-chip {
  padding: 4px 8px; border-radius: 7px; border: 1px solid var(--border);
  background: rgba(255,255,255,0.03); color: var(--text);
  font-family: var(--mono); font-size: 10px; cursor: pointer;
}
.term-chip:hover { border-color: var(--lime-dim); color: var(--lime); background: var(--lime-glow); }
.term-out {
  flex: 1; margin: 0; padding: 14px; overflow: auto;
  font-family: var(--mono); font-size: 11px; line-height: 1.55;
  color: var(--muted); white-space: pre-wrap; word-break: break-word; background: var(--bg);
}
.term-input-row {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-top: 1px solid var(--border); flex-shrink: 0;
}
.term-prompt { font-family: var(--mono); font-size: 12px; color: var(--lime-dim); }
.term-input {
  flex: 1; padding: 8px 10px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 6px; color: var(--text); font-family: var(--mono); font-size: 12px; outline: none;
}
.term-input:focus { border-color: var(--lime-dim); box-shadow: 0 0 0 2px var(--lime-glow); }
.term-send {
  padding: 8px 16px;
  background: var(--surface2);
  border: 1px solid var(--lime-dim);
  border-radius: 6px;
  color: var(--lime);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.term-send:hover {
  background: var(--lime-glow);
  border-color: var(--lime);
  color: var(--lime);
}
.term-send:active { transform: scale(0.98); }

.files-window { width: min(980px, 98vw); height: min(640px, 92vh); }
.files-head-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
  color: var(--lime); background: var(--lime-glow); border: 1px solid var(--border);
}
.files-status-pill {
  font-size: 10px; font-family: var(--mono); color: var(--lime);
  padding: 3px 8px; border-radius: 999px;
  border: 1px solid rgba(198, 255, 74, 0.28);
  background: rgba(198, 255, 74, 0.08);
}
.files-status-pill:empty { display: none; }
.files-status-pill.is-err {
  color: #ffb4b4; border-color: rgba(255, 122, 122, 0.4); background: rgba(255, 122, 122, 0.1);
}
.files-toolbar {
  display: flex; align-items: stretch; gap: 10px;
  padding: 10px 12px; border-bottom: 1px solid var(--border); flex-shrink: 0;
  background: rgba(0, 0, 0, 0.18);
}
.files-nav, .files-tools { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.files-addr { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.fb-icon, .fb-text {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 10px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--border); background: rgba(255,255,255,0.03);
  color: var(--text); font-family: var(--mono); font-size: 11px;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.fb-icon { width: 32px; padding: 0; color: var(--muted); }
.fb-icon:hover, .fb-text:hover { border-color: var(--lime-dim); color: var(--lime); background: var(--lime-glow); }
.fb-go, .fb-upload {
  background: rgba(198, 255, 74, 0.1); border-color: rgba(198, 255, 74, 0.35); color: var(--lime); font-weight: 600;
}
.fb-upload input { display: none; }
.files-path-input {
  flex: 1; min-width: 0; height: 32px;
  padding: 0 10px; background: rgba(0,0,0,0.35);
  border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); font-family: var(--mono); font-size: 11px; outline: none;
}
.files-path-input:focus { border-color: var(--lime-dim); box-shadow: 0 0 0 2px var(--lime-glow); }
.files-addr-row { display: flex; gap: 6px; }
.files-crumb {
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 16px;
}
.files-crumb button {
  background: none; border: none; color: var(--lime); cursor: pointer;
  font-family: inherit; font-size: inherit; padding: 0 1px;
}
.files-crumb button:hover { text-decoration: underline; }
.files-crumb span { color: var(--dim); margin: 0 2px; }
.files-table-wrap { flex: 1; overflow: auto; background: rgba(0,0,0,0.22); }
.files-table {
  width: 100%; border-collapse: collapse;
  font-family: var(--mono); font-size: 12px;
}
.files-table thead { position: sticky; top: 0; z-index: 1; }
.files-table th {
  text-align: left; padding: 9px 12px;
  background: #121a12; color: var(--dim);
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em;
  border-bottom: 1px solid var(--border);
}
.files-table td { padding: 8px 12px; border-bottom: 1px solid rgba(255,255,255,0.045); vertical-align: middle; }
.files-table tbody tr { transition: background 0.12s; }
.files-table tbody tr:hover { background: rgba(198, 255, 74, 0.06); }
.files-table tbody tr.is-dir { cursor: pointer; }
.files-table tbody tr.is-dir:hover .files-name b { color: var(--lime); }
.files-col-type { width: 72px; color: var(--muted); }
.files-col-size { width: 88px; color: var(--muted); }
.files-col-mod { width: 140px; color: var(--dim); white-space: nowrap; }
.files-col-act { width: 168px; text-align: right; white-space: nowrap; }
.files-type { color: var(--muted); font-size: 10px; letter-spacing: 0.04em; }
.fb-act {
  display: inline-flex; align-items: center; height: 24px; padding: 0 8px; margin-left: 4px;
  border-radius: 6px; border: 1px solid var(--border); background: transparent;
  color: var(--text); font-family: var(--mono); font-size: 10px; cursor: pointer;
}
.fb-act:hover { border-color: var(--lime-dim); color: var(--lime); }
.fb-act-danger { color: #ffb0b0; border-color: rgba(255, 122, 122, 0.28); }
.fb-act-danger:hover { color: var(--red); border-color: rgba(255, 122, 122, 0.6); background: rgba(255, 122, 122, 0.08); }
.files-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 14px; border-top: 1px solid var(--border); flex-shrink: 0;
  font-family: var(--mono); font-size: 10px; color: var(--muted);
  background: rgba(0, 0, 0, 0.2);
}
.files-foot-hint { color: var(--dim); }
.proc-window { position: relative; }
.proc-col-pid { width: 72px; }
.proc-col-num { width: 88px; color: var(--muted); text-align: right; }
.proc-col-path { min-width: 120px; max-width: 280px; color: var(--dim); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proc-table td.proc-col-num { text-align: right; color: var(--muted); }
.proc-sort {
  background: none; border: none; color: inherit; font: inherit; cursor: pointer; padding: 0;
  letter-spacing: 0.06em; text-transform: uppercase; font-size: 10px;
}
.proc-sort:hover { color: var(--lime); }
.proc-path-cell { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proc-detail {
  position: absolute; inset: 48px 12px 40px; z-index: 4;
  background: rgba(12, 14, 10, 0.96); border: 1px solid rgba(198, 255, 74, 0.22);
  border-radius: 8px; display: flex; flex-direction: column; min-height: 0;
}
.proc-detail[hidden] { display: none !important; }
.proc-detail-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.proc-detail-body {
  flex: 1; overflow: auto; margin: 0; padding: 12px 14px;
  font-size: 12px; line-height: 1.45; color: var(--muted); white-space: pre-wrap; word-break: break-all;
}
.proc-detail-close { font-size: 18px; line-height: 1; padding: 0 6px; }
@media (max-width: 760px) {
  .files-toolbar { flex-wrap: wrap; }
  .files-addr { flex-basis: 100%; }
  .files-col-mod, .files-table th.files-col-mod { display: none; }
}

.capture-window { width: min(920px, 94vw); max-height: min(88vh, 820px); display: flex; flex-direction: column; }
.capture-toolbar { flex-shrink: 0; align-items: center; gap: 8px; flex-wrap: wrap; }
.capture-auto { margin-left: auto; font-size: 12px; color: var(--muted); }
.capture-grid {
  flex: 1; min-height: 0; overflow: auto; padding: 10px 12px 14px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 280px));
  gap: 12px;
  align-content: start;
  align-items: start;
  justify-content: start;
}
.capture-empty { padding: 24px; text-align: center; color: var(--muted); font-size: 13px; }
.capture-card {
  background: var(--surface2); border: 1px solid var(--border); border-radius: 10px;
  overflow: hidden; cursor: zoom-in;
  display: flex; flex-direction: column; align-self: start;
  width: 100%; max-width: 280px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.capture-card:hover {
  border-color: var(--lime-dim);
  box-shadow: 0 0 0 1px rgba(198, 255, 74, 0.15);
}
.cap-thumb {
  position: relative; background: #000; line-height: 0;
}
.capture-card img {
  display: block; width: 100%; height: auto; max-height: 200px;
  object-fit: contain; background: #000;
}
.cap-zoom {
  position: absolute; right: 8px; bottom: 8px;
  width: 28px; height: 28px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.72); border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff; font-size: 16px; line-height: 1; pointer-events: none;
  opacity: 0; transition: opacity 0.15s;
}
.capture-card:hover .cap-zoom { opacity: 1; }
.capture-meta { padding: 6px 8px; font-size: 10px; color: var(--muted); font-family: var(--mono); flex-shrink: 0; }
.capture-grid:not(:empty) + .capture-empty { display: none; }
.mic-grid .capture-card { cursor: default; }
.capture-card audio { display: block; width: 100%; min-height: 40px; background: #0a0a0a; }
.mic-len-label { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.mic-len-select {
  background: var(--surface2); border: 1px solid var(--border); color: var(--text);
  border-radius: 6px; padding: 4px 8px; font-size: 12px;
}

.cap-lightbox {
  display: none; position: fixed; inset: 0; z-index: 20000;
  background: rgba(0, 0, 0, 0.92); align-items: center; justify-content: center;
  flex-direction: column; padding: 48px 16px 16px;
}
.cap-lightbox.open { display: flex; }
.cap-lightbox img {
  max-width: min(96vw, 1600px); max-height: calc(100vh - 80px);
  object-fit: contain; border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}
.cap-lightbox-close {
  position: absolute; top: 12px; right: 16px; width: 40px; height: 40px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface);
  color: var(--text); font-size: 24px; line-height: 1; cursor: pointer;
}
.cap-lightbox-close:hover { border-color: var(--lime-dim); color: var(--lime); }
.cap-lightbox-meta {
  margin-top: 10px; font-size: 12px; color: var(--muted); font-family: var(--mono);
}
.files-name { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.files-glyph {
  width: 16px; height: 14px; flex-shrink: 0; border-radius: 2px;
  border: 1px solid rgba(198, 255, 74, 0.35); position: relative;
}
.files-glyph.is-dir {
  background: rgba(198, 255, 74, 0.16);
  border-radius: 2px 4px 2px 2px;
}
.files-glyph.is-dir::before {
  content: ''; position: absolute; top: -4px; left: 0; width: 7px; height: 4px;
  border: 1px solid rgba(198, 255, 74, 0.35); border-bottom: none; border-radius: 2px 2px 0 0;
  background: rgba(198, 255, 74, 0.16);
}
.files-glyph.is-file { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.16); }
.files-empty { padding: 36px 16px; text-align: center; color: var(--muted); font-family: var(--mono); font-size: 12px; }

.history-window { width: min(1080px, 98vw); height: min(680px, 92vh); display: flex; flex-direction: column; }
.history-toolbar { flex-wrap: wrap; gap: 8px; align-items: center; }
.hist-run-select { min-width: 160px; max-width: 240px; }
.bsnap-tabs { display: flex; flex-wrap: wrap; gap: 0; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.bsnap-tab {
  padding: 8px 14px; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase;
  background: transparent; border: none; border-bottom: 2px solid transparent; color: var(--muted);
  cursor: pointer; font-family: inherit;
}
.bsnap-tab:hover { color: var(--text); }
.bsnap-tab.active { color: var(--lime); border-bottom-color: var(--lime); }
.bsnap-panel { flex: 1; min-height: 0; display: none; }
.bsnap-panel.active { display: flex; flex-direction: column; }
.history-table-wrap { flex: 1; overflow: auto; background: rgba(0,0,0,0.22); position: relative; }
.history-table .hist-col-when { width: 140px; white-space: nowrap; color: var(--dim); }
.history-table .hist-col-br { width: 120px; color: var(--muted); }
.history-table .hist-col-title { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-table .hist-col-folder { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--dim); }
.history-table .hist-col-val { word-break: break-all; max-width: 420px; }
.history-table .hist-col-src { width: 120px; color: var(--dim); }
.history-table .hist-col-url a { color: #9ad0ff; text-decoration: none; word-break: break-all; }
.history-table .hist-col-url a:hover { color: var(--lime); text-decoration: underline; }
.history-table-wrap:not(.has-rows) .history-table { display: none; }
.history-table-wrap.has-rows .bsnap-empty { display: none; }
.files-table-wrap.files-loading { opacity: 0.55; }
.files-table-wrap.files-loading .files-table { pointer-events: none; }
.files-head, .files-toolbar { flex-shrink: 0; position: relative; z-index: 2; }

/* ── Notatnik ───────────────────────────────────────────────────────────── */
.notes-window {
  width: min(920px, 98vw);
  height: min(580px, 92vh);
  display: flex;
  flex-direction: column;
}
.notes-textarea {
  width: 100%; min-height: 280px; flex: 1;
  padding: 10px 12px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 6px;
  color: var(--text); font-family: var(--mono); font-size: 12px;
  line-height: 1.5; resize: vertical; outline: none;
}
.notes-textarea:focus { border-color: var(--lime-dim); box-shadow: 0 0 0 2px var(--lime-glow); }
.notes-body-field { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.notes-editor { display: flex; flex-direction: column; min-height: 0; }
.notes-meta { font-size: 10px; color: var(--muted); font-family: var(--mono); margin-right: 10px; }
.notes-list-preview { font-size: 9px; color: var(--dim); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.paste-url-row { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.paste-url-row .settings-input { flex: 1; min-width: 160px; }
.paste-textarea { min-height: 220px; font-family: var(--mono); font-size: 12px; }

/* ── Access log ─────────────────────────────────────────────────────────── */
.accesslog-window {
  width: min(1040px, 96vw);
  height: min(560px, 88vh);
}
.al-path {
  max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: var(--mono); color: var(--text);
}
.al-path.is-other { color: #ffb0b0; }
.accesslog-table td { vertical-align: top; }
.al-nowrap { white-space: nowrap; }
.al-ua {
  max-width: 320px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.al-ev-ok { color: var(--lime); }
.al-ev-bad { color: var(--red); }
.al-who {
  display: inline-block; padding: 2px 7px; border-radius: 999px;
  font-size: 9px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  border: 1px solid var(--border);
}
.al-who-browser { color: var(--lime); border-color: rgba(198, 255, 74, 0.35); background: rgba(198, 255, 74, 0.08); }
.al-who-bot { color: #79c0ff; border-color: rgba(121, 192, 255, 0.35); background: rgba(121, 192, 255, 0.08); }
.al-who-suspect { color: #ffb0b0; border-color: rgba(255, 122, 122, 0.45); background: rgba(255, 122, 122, 0.1); }
.al-who-unknown { color: var(--muted); }
.accesslog-count {
  margin-left: auto; align-self: center;
  color: var(--muted); font-family: var(--mono); font-size: 10px;
}

/* Sharp console — no cards, no pills, no glow frames */
*, *::before, *::after { border-radius: 0 !important; }

.login-card {
  width: min(420px, 90vw);
  padding: 8px 0 8px 28px;
  background: transparent;
  border: none;
  border-left: 3px solid var(--lime);
  box-shadow: none;
  backdrop-filter: none;
}
.brand-logo--login { filter: none; margin-bottom: 28px; }
.login-field input {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.18);
  padding: 12px 0;
}
.login-field input:focus { border-color: var(--lime); box-shadow: none; }
.login-btn {
  background: var(--lime);
  color: #111408;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  box-shadow: none;
}
.login-btn:hover { filter: none; transform: none; background: #fff; }
.login-error { background: transparent; border: none; border-left: 2px solid var(--red); border-radius: 0; }

.topbar {
  height: 52px;
  padding: 0 18px;
  background: var(--bg);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: none;
}
.brand-logo--topbar { filter: none; height: 28px; }
.stat-pill {
  padding: 0 16px 0 0;
  border: none;
  background: transparent;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 10px;
  font-family: var(--sans);
  font-weight: 600;
}
.stat-pill.on { background: transparent; border: none; }
.topbar-icon-btn,
.topbar .btn-logout {
  width: 36px; height: 36px;
  border: none;
  background: transparent;
}
.topbar-icon-btn:hover {
  background: var(--lime);
  color: #111408;
  border: none;
}
.topbar .btn-logout:hover {
  background: var(--red);
  color: #111408;
  border: none;
}

.browser-wrap { padding: 0 0 48px; }
.tree-empty {
  margin: 48px 24px;
  border: none;
  border-top: 1px solid rgba(255,255,255,0.12);
  background: transparent;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 11px;
}
.sess-table {
  background: transparent;
  border: none;
  box-shadow: none;
  width: 100%;
  table-layout: fixed;
}
.sess-table th,
.sess-table td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sess-table th.col-chev, .sess-table td.col-chev { width: 32px; }
.sess-table th.col-flag, .sess-table td.col-flag { width: 40px; }
.sess-table th.col-st, .sess-table td.col-st { width: 9%; text-align: left; }
.sess-table th.col-host, .sess-table td.col-host { width: 14%; max-width: none; }
.sess-table th.col-user, .sess-table td.col-user { width: 9%; max-width: none; }
.sess-table th.col-path, .sess-table td.col-path { width: 24%; max-width: none; }
.sess-table th.col-ip, .sess-table td.col-ip { width: 13%; }
.sess-table th.col-os, .sess-table td.col-os { width: 9%; max-width: none; }
.sess-table th.col-agent, .sess-table td.col-agent { width: 8%; }
.sess-table th.col-seen, .sess-table td.col-seen { width: 8%; }
.sess-table th.col-x, .sess-table td.col-x { width: 36px; text-align: center; }
.sess-path {
  display: block; width: 100%; max-width: 100%;
  padding: 0; border: none; background: none;
  color: var(--muted); font: inherit; text-align: left; cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sess-path:hover { color: var(--lime); }
.sess-detail td { overflow: visible; text-overflow: clip; white-space: normal; }
.sess-table thead { background: rgba(9, 10, 9, 0.92); backdrop-filter: none; }
.sess-table th {
  padding: 16px 14px 10px;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--dim);
  border-bottom: 1px solid rgba(255,255,255,0.14);
}
.sess-table td {
  padding: 13px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.055);
}
.sess-row.is-online { box-shadow: inset 2px 0 0 var(--lime); }
.sess-row.is-online .col-host { color: #fff; letter-spacing: 0.02em; }
.sess-row.is-offline { box-shadow: inset 2px 0 0 #3a3f38; }
.sess-row:hover { background: rgba(228, 255, 58, 0.045); }
.sess-row.open { background: rgba(255,255,255,0.025); }
.st-badge {
  padding: 0;
  gap: 8px;
  background: transparent;
  border: none;
  letter-spacing: 0.16em;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
}
.st-badge.on, .st-badge.off { background: transparent; border: none; }
.st-badge.on { color: var(--lime); }
.st-dot, .live-dot { width: 6px; height: 6px; box-shadow: none; }
.col-ip { color: #d7dece; }
.sess-x { border: none; }
.sess-x:hover { background: var(--red); color: #111408; border: none; }
.sess-detail td { background: transparent; }
.sess-panel { padding: 2px 8px 20px 28px; }

.sess-actions {
  gap: 0;
  padding: 8px 0 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 2px;
}
.sess-actions-core { gap: 0; padding-right: 0; }
.tree-chip {
  background: transparent;
  border: none;
  padding: 6px 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 11px;
  color: var(--muted);
}
.tree-chip:hover,
.sess-mod-toggle:hover {
  background: var(--lime);
  color: #111408;
  border: none;
}
.sess-actions-core .tree-chip { color: #fff; }
.sess-mod-toggle { color: #c5ccbc; }

.tree-block,
.tree-block.tree-module {
  background: transparent;
  border: none;
  margin: 0;
  overflow: visible;
}
.tree-block.tree-module { border-bottom: 1px solid rgba(255,255,255,0.06); }
.tree-module-row { padding: 11px 4px; font-weight: 500; }
.tree-row:hover { background: rgba(228, 255, 58, 0.04); }
.tree-row.open { background: transparent; }
.tree-tag,
.tree-module-row .tree-tag {
  background: transparent !important;
  padding: 0 !important;
  letter-spacing: 0.16em;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 12px;
}
.tree-count {
  margin-left: 14px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  color: var(--dim);
}
.tree-age {
  margin-left: 10px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--dim);
}
.tree-row { width: 100%; }
.tree-children {
  border-top: none;
  background: transparent;
  padding: 0 0 8px 12px;
}
.leaf-cat, .leaf-tag, .tree-badge, .al-who {
  background: transparent !important;
  border: none !important;
  padding: 0 6px 0 0;
  letter-spacing: 0.08em;
}
.tree-leaf { border-left: none; padding-top: 5px; padding-bottom: 5px; }
.tree-leaf:hover { background: rgba(255,255,255,0.03); }

.term-window, #ctx-menu, #out-drawer, .toast, .capture-card, .mod-list-item {
  box-shadow: none;
  backdrop-filter: none;
}
.term-window {
  background: #0e0f0e;
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: none;
}
.term-head { border-bottom: 1px solid rgba(255,255,255,0.1); }
.term-title { font-family: var(--sans); letter-spacing: 0.2em; color: #fff; }
.term-send {
  background: var(--lime);
  color: #111408;
  border: none;
  font-family: var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 11px;
}
.term-send:hover { background: #fff; color: #111408; border: none; }
.term-input, .settings-input, .modules-code, .files-path-input, .term-quick-row select, .mic-len-select {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.16);
}
.term-input:focus, .settings-input:focus, .modules-code:focus, .files-path-input:focus {
  border-color: var(--lime);
  box-shadow: none;
}
.term-chip, .fb-icon, .fb-text, .fb-act, .files-head-mark, .files-status-pill {
  background: transparent;
  border: none;
  border-bottom: 1px solid transparent;
}
.term-chip:hover, .fb-icon:hover, .fb-text:hover, .fb-act:hover {
  background: transparent;
  color: var(--lime);
  border-bottom-color: var(--lime);
}
.fb-go, .fb-upload { background: transparent; border: none; color: var(--lime); }
.mod-list-item { background: transparent; border: none; border-left: 2px solid transparent; }
.mod-list-item.active { background: transparent; border-left-color: var(--lime); }
.mod-list-item:hover { border-color: transparent; border-left-color: var(--lime-dim); }
.toast { background: #0e0f0e; border: none; border-left: 2px solid var(--lime); box-shadow: none; }
.toast.err { border-left-color: var(--red); }
