@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;600;700;800&display=swap");
:root {
  --bg: #07070b;
  --panel: #101018;
  --sidebar: #0b0b12;
  --line: #2a2140;
  --text: #f4f1ff;
  --muted: #9b93b3;
  --purple: #8b2be2;
  --purple-2: #b56cff;
  --ok: #3ecf8e;
  --warn: #e0a14a;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { overflow-x: clip; }
body { font-family: "Plus Jakarta Sans", Segoe UI, system-ui, sans-serif; background: var(--bg); color: var(--text); overflow-x: clip; overscroll-behavior-x: none; }
a { color: var(--purple-2); text-decoration: none; }
.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  left: 0;
  top: 0;
  overflow: hidden;
  pointer-events: none;
}
.app {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
  align-items: stretch;
}
.sidebar {
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 1.15rem 0.9rem 1rem;
  min-height: 100vh;
}
.brand {
  display: flex;
  justify-content: center;
  margin: 0.2rem 0 1.5rem;
}
.brand-logo {
  width: 168px;
  height: auto;
  display: block;
  filter: drop-shadow(0 0 22px rgba(139, 43, 226, 0.55));
}
.sidebar nav { display: flex; flex-direction: column; gap: 0.25rem; width: 100%; }
.sidebar nav a {
  color: var(--muted);
  padding: 0.72rem 0.85rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
}
.nav-ico {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  stroke: currentColor;
}
.sidebar nav a.active, .sidebar nav a:hover {
  background: linear-gradient(90deg, #6a21c5, #8b2be2);
  color: #fff;
}
.sidebar-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; color: var(--muted); }
.sidebar-foot .linkish,
button.linkish {
  width: auto;
  background: transparent;
  color: var(--muted);
  border: 0;
  padding: 0;
  font-weight: 600;
  cursor: pointer;
}
.workspace {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.2rem;
  border-bottom: 1px solid var(--line);
  background: #0d0d16;
}
.header-logo {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 0;
}
.header-logo img {
  height: 36px;
  width: auto;
  display: block;
  filter: drop-shadow(0 0 12px rgba(139, 43, 226, 0.45));
}
.top-titles { display: flex; flex-direction: column; min-width: 0; }
.top-titles strong { display: block; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-titles small { color: #3ecf8e; letter-spacing: 0.08em; text-transform: uppercase; }
.menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #141422;
  cursor: pointer;
  padding: 0;
}
.menu-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}
.sidebar-backdrop {
  display: none;
}
.user-chip {
  white-space: nowrap;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}
.top-actions { display: flex; gap: 0.45rem; align-items: center; flex-wrap: wrap; }
.action-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 40px;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.01em;
  color: #fff;
  cursor: pointer;
  width: auto;
  text-decoration: none;
  font-family: inherit;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}
.action-chip svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  stroke: currentColor;
}
.action-chip.is-live {
  background: linear-gradient(180deg, #1d3b32, #132820);
  border-color: rgba(62, 207, 142, 0.45);
  color: #9dffea;
}
.action-chip.is-alerts {
  background: linear-gradient(180deg, #f0c14b, #d4a017);
  border-color: rgba(255, 220, 120, 0.55);
  color: #1a1400;
  box-shadow: 0 6px 16px rgba(212, 160, 23, 0.28);
}
.action-chip.is-alerts svg { stroke: #1a1400; }
.action-chip.is-alerts.is-on {
  background: linear-gradient(180deg, #ffe08a, #f0c14b);
  box-shadow: 0 0 0 1px rgba(255, 224, 138, 0.35), 0 8px 18px rgba(212, 160, 23, 0.35);
}
.action-chip.is-apps {
  background: linear-gradient(180deg, #2a2148, #1a1430);
  border-color: rgba(181, 108, 255, 0.35);
  color: #e6d7ff;
}
.action-chip.is-apk {
  background: linear-gradient(90deg, #7a24d6, #9b3dff);
  border-color: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.action-chip.is-telegram {
  background: linear-gradient(90deg, #1c8fc7, #2aabee);
  border-color: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.action-chip.is-telegram svg {
  fill: currentColor;
  stroke: none;
}
.action-chip:hover { filter: brightness(1.08); color: inherit; }
.action-chip.is-busy svg { animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--purple);
  background: transparent;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  width: auto;
}
.btn[hidden]:not(.is-visible) { display: none !important; }
.btn.is-visible { display: inline-flex !important; }
.btn.primary { background: var(--purple); }
.btn.ghost { background: transparent; }
.wrap form button:not(.linkish) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  border: 0;
  background: var(--purple);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  width: auto;
}
.wrap { flex: 1; padding: 1.1rem 1.25rem 2rem; }
.wrap:not(.wrap-console) {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.wrap:not(.wrap-console) > * {
  width: min(1320px, 100%);
  max-width: 100%;
  min-width: 0;
}
.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none; /* Firefox: esconde scroll */
  -ms-overflow-style: none; /* IE/Edge legado */
  padding-bottom: 2px;
}
.table-wrap::-webkit-scrollbar {
  height: 0;
  width: 0;
  background: transparent;
}
/* Scroll só aparece ao passar o mouse — fino e transparente */
.table-wrap:hover {
  scrollbar-width: thin;
  scrollbar-color: rgba(181, 108, 255, 0.35) transparent;
}
.table-wrap:hover::-webkit-scrollbar {
  height: 4px;
  width: 4px;
}
.table-wrap:hover::-webkit-scrollbar-track {
  background: transparent;
}
.table-wrap:hover::-webkit-scrollbar-thumb {
  background: rgba(181, 108, 255, 0.32);
  border-radius: 999px;
}
.table-wrap:hover::-webkit-scrollbar-thumb:hover {
  background: rgba(181, 108, 255, 0.55);
}
.table-wrap::-webkit-scrollbar-corner {
  background: transparent;
}

/* Scroll transparente no painel */
.wrap,
.tabs,
.top-actions,
.profile-box,
.sidebar,
.content {
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 43, 226, 0.28) transparent;
}
.wrap::-webkit-scrollbar,
.tabs::-webkit-scrollbar,
.top-actions::-webkit-scrollbar,
.profile-box::-webkit-scrollbar,
.sidebar::-webkit-scrollbar,
.content::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
.wrap::-webkit-scrollbar-track,
.tabs::-webkit-scrollbar-track,
.top-actions::-webkit-scrollbar-track,
.profile-box::-webkit-scrollbar-track,
.sidebar::-webkit-scrollbar-track,
.content::-webkit-scrollbar-track {
  background: transparent;
}
.wrap::-webkit-scrollbar-thumb,
.tabs::-webkit-scrollbar-thumb,
.top-actions::-webkit-scrollbar-thumb,
.profile-box::-webkit-scrollbar-thumb,
.sidebar::-webkit-scrollbar-thumb,
.content::-webkit-scrollbar-thumb {
  background: rgba(139, 43, 226, 0.22);
  border-radius: 999px;
}
.wrap::-webkit-scrollbar-thumb:hover,
.tabs::-webkit-scrollbar-thumb:hover,
.top-actions::-webkit-scrollbar-thumb:hover,
.profile-box::-webkit-scrollbar-thumb:hover,
.sidebar::-webkit-scrollbar-thumb:hover,
.content::-webkit-scrollbar-thumb:hover {
  background: rgba(181, 108, 255, 0.5);
}
.ws-stat .ws-url {
  display: block;
  margin-top: 0.35rem;
  color: var(--purple-2);
  font-size: 0.82rem;
  font-weight: 700;
  word-break: break-all;
  line-height: 1.35;
}
.connect-list > h2 { margin: 0.35rem 0 0.25rem; }
.connect-list > .muted { margin: 0 0 0.7rem; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 1rem; margin: 0.85rem 0; }
.grid.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; }
.grid.stats .card { margin: 0; }
.grid.stats .card h2 { margin: 0; color: var(--purple-2); }
.grid.stats .card p { margin: 0.3rem 0 0; color: var(--muted); }
.list-block { margin-top: 0.35rem; }
.list-block + .list-block { margin-top: 1.15rem; }
.list-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 0.55rem;
}
.list-block-head h2 {
  margin: 0;
  font-size: 1.05rem;
}
.offline-block .list-block-head h2 { color: var(--warn); }
.table-wrap.card {
  padding: 0.35rem 0.45rem 0.45rem;
  background: linear-gradient(180deg, #12121c 0%, #0e0e16 100%);
  border-color: rgba(139, 43, 226, 0.28);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}
.list-block .table-wrap table {
  min-width: 980px;
  width: 100%;
}
table { width: 100%; border-collapse: collapse; }
.list-block th,
.list-block td {
  text-align: left;
  padding: 0.52rem 0.48rem;
  border-bottom: 1px solid rgba(42, 33, 64, 0.7);
  font-size: 0.84rem;
  vertical-align: middle;
  white-space: nowrap;
}
.list-block th {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom-color: rgba(139, 43, 226, 0.35);
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}
.list-block tbody tr:last-child td { border-bottom: 0; }
.list-block tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.015); }
th, td { text-align: left; padding: 0.65rem; border-bottom: 1px solid var(--line); font-size: 0.92rem; vertical-align: middle; }
tr.client-row { cursor: pointer; transition: background 0.15s ease; }
tr.client-row:hover { background: rgba(139, 43, 226, 0.12); }
tr.client-row .user-cell svg,
tr.client-row .metric-ico,
tr.client-row .metric-ico svg,
tr.client-row .user-flag { pointer-events: none; }
a.user-open {
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  position: relative;
  z-index: 2;
}
a.user-open:hover .user-name { color: var(--purple-2); text-decoration: underline; }
.open-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.7rem;
  border-radius: 8px;
  background: #6b2be2;
  color: #fff !important;
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 0.01em;
  text-shadow: none;
  filter: none;
  box-shadow: none;
  white-space: nowrap;
  line-height: 1.2;
}
.open-link:hover {
  background: #7d3ef0;
  color: #fff !important;
  text-decoration: none;
}
.row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  white-space: nowrap;
}
.del-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(224, 161, 74, 0.55);
  background: transparent;
  color: var(--warn);
  font-weight: 700;
  font-size: 0.72rem;
  cursor: pointer;
  line-height: 1.2;
}
.del-link:hover {
  background: rgba(224, 161, 74, 0.14);
  border-color: var(--warn);
}
.del-link:disabled {
  opacity: 0.5;
  cursor: wait;
}
td:has(.open-link),
td.row-actions { text-align: right; }
.pill { padding: 0.14rem 0.5rem; border-radius: 999px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
.pill.online { background: #163c2e; color: var(--ok); }
.pill.offline { background: #3a2a16; color: var(--warn); }
.user-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}
.user-ava {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.84rem;
  color: #fff;
  flex: 0 0 30px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.user-flag,
.user-flag-code {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 14px;
  height: 10px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px #07070b;
  overflow: hidden;
}
.user-flag-code {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1b1430;
  color: #d7c8ff;
  font-size: 6px;
  font-weight: 800;
  letter-spacing: 0;
}
.user-phone {
  width: 16px;
  height: 24px;
  flex: 0 0 16px;
  display: inline-flex;
  opacity: 0.85;
}
.user-phone svg { width: 16px; height: 24px; display: block; }
.user-name {
  font-weight: 600;
  white-space: nowrap;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.list-block td[data-label="ID"],
.list-block td[data-label="IP"] {
  max-width: 118px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #b7aecc;
  font-variant-numeric: tabular-nums;
  font-size: 0.8rem;
}
.days-cell { color: #7dffe3; font-weight: 600; white-space: nowrap; }
.ver-cell { color: #8fd4ff; font-weight: 600; }
.metric-ico {
  display: inline-flex;
  align-items: center;
  color: #e8e4f4;
}
.metric-ico svg { display: block; }
.metric-ico.wifi svg { width: 18px; height: 18px; }
.metric-ico.batt svg { width: 13px; height: 20px; }
.metric-ico.batt { color: #f2f0fa; }
.batt-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}
.batt-pct {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ok);
}
.tabs { display: flex; gap: 0.5rem; margin: 0.5rem 0 1rem; }
.tabs a,
.tabs button {
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: transparent;
  font: inherit;
  cursor: pointer;
}
.tabs a.active,
.tabs button.active { color: #fff; background: #1b1430; border-color: var(--purple); }
.search { width: 100%; margin: 0.4rem 0 0.8rem; padding: 0.7rem; border-radius: 8px; border: 1px solid var(--line); background: #0a0a10; color: #fff; }
.alert { padding: 0.75rem; border-radius: 8px; }
.alert.warning { background: #3a2a16; }
.alert.info { background: #1a1430; }
.feed { list-style: none; padding: 0; margin: 0; }
.feed li { padding: 0.45rem 0; border-bottom: 1px solid var(--line); color: var(--muted); }

/* Logs page */
.logs-page { width: min(960px, 100%); margin: 0 auto; }
.logs-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin: 0.2rem 0 1rem;
  padding: 1.1rem 1.15rem;
  border-radius: 16px;
  border: 1px solid rgba(139, 43, 226, 0.28);
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(139, 43, 226, 0.22), transparent 55%),
    linear-gradient(180deg, #14121f, #0e0e16);
}
.logs-kicker {
  margin: 0 0 0.25rem;
  color: var(--purple-2);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.logs-hero h1 {
  margin: 0;
  font-size: 1.55rem;
  letter-spacing: -0.02em;
}
.logs-hero .muted { margin: 0.35rem 0 0; }
.logs-kpis {
  display: flex;
  gap: 0.55rem;
  flex-shrink: 0;
}
.logs-kpis article {
  min-width: 92px;
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--line);
  text-align: right;
}
.logs-kpis article.is-hot {
  border-color: rgba(224, 161, 74, 0.55);
  box-shadow: 0 0 0 1px rgba(224, 161, 74, 0.12);
}
.logs-kpis span {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.logs-kpis strong {
  display: block;
  margin-top: 0.15rem;
  font-size: 1.35rem;
  color: var(--purple-2);
}
.logs-kpis article.is-hot strong { color: var(--warn); }
.logs-tabs { margin-top: 0.15rem; }
.logs-panel[hidden] { display: none !important; }
.logs-empty {
  text-align: center;
  padding: 2rem 1rem;
}
.logs-empty strong { display: block; font-size: 1.05rem; }
.logs-empty .muted { margin: 0.4rem 0 0; }
.logs-timeline {
  position: relative;
  padding: 0.35rem 0.85rem 0.55rem 1.05rem;
  margin: 0;
  overflow: hidden;
}
.logs-timeline::before {
  content: "";
  position: absolute;
  left: 1.35rem;
  top: 1rem;
  bottom: 1rem;
  width: 2px;
  background: linear-gradient(180deg, rgba(139, 43, 226, 0.55), rgba(42, 33, 64, 0.2));
}
.logs-item {
  position: relative;
  display: grid;
  grid-template-columns: 18px 72px minmax(0, 1fr);
  gap: 0.65rem;
  align-items: start;
  padding: 0.85rem 0.25rem;
  border-bottom: 1px solid rgba(42, 33, 64, 0.65);
}
.logs-item:last-child { border-bottom: 0; }
.logs-dot {
  width: 10px;
  height: 10px;
  margin-top: 0.35rem;
  margin-left: 0.15rem;
  border-radius: 50%;
  background: var(--purple-2);
  box-shadow: 0 0 0 4px rgba(139, 43, 226, 0.16);
  z-index: 1;
}
.logs-meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding-top: 0.1rem;
}
.logs-time {
  color: var(--text);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 0.92rem;
}
.logs-date {
  color: var(--muted);
  font-size: 0.72rem;
}
.logs-body h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}
.logs-body p {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.4rem 0 0;
}
.logs-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: rgba(139, 43, 226, 0.16);
  border: 1px solid rgba(139, 43, 226, 0.28);
  color: #e8ddff;
  font-size: 0.72rem;
  font-weight: 600;
}
.logs-chip.soft {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
  color: var(--muted);
}
.logs-alerts {
  display: grid;
  gap: 0.7rem;
}
.logs-alert {
  margin: 0;
  padding: 0.95rem 1rem;
  border-left: 3px solid var(--purple);
}
.logs-alert.sev-warn { border-left-color: var(--warn); }
.logs-alert.sev-crit { border-left-color: #f07178; }
.logs-alert.sev-ok { border-left-color: var(--ok); }
.logs-alert.sev-info { border-left-color: var(--purple-2); }
.logs-alert header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}
.logs-alert h3 {
  margin: 0;
  font-size: 1rem;
}
.logs-alert p {
  margin: 0.4rem 0 0;
  color: var(--muted);
  line-height: 1.45;
}
.pill.sev-warn { background: #3a2a16; color: var(--warn); }
.pill.sev-crit { background: #3a1620; color: #ff8f98; }
.pill.sev-ok { background: #163c2e; color: var(--ok); }
.pill.sev-info { background: #1b1430; color: var(--purple-2); }
@media (max-width: 720px) {
  .logs-hero {
    flex-direction: column;
    align-items: stretch;
  }
  .logs-kpis { width: 100%; }
  .logs-kpis article { flex: 1; text-align: left; }
  .logs-item {
    grid-template-columns: 14px minmax(0, 1fr);
    grid-template-rows: auto auto;
  }
  .logs-meta {
    grid-column: 2;
    flex-direction: row;
    gap: 0.45rem;
    align-items: baseline;
  }
  .logs-body { grid-column: 2; }
}
.pair-row, .inline { display: inline-flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }
.inline button { width: auto; }
label { display: block; margin: 0.7rem 0; color: var(--muted); }
input, select { width: 100%; padding: 0.7rem; border-radius: 8px; border: 1px solid var(--line); background: #0a0a10; color: var(--text); }
.auth-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background:
    radial-gradient(ellipse 70% 50% at 15% 10%, rgba(139, 43, 226, 0.35), transparent 55%),
    radial-gradient(ellipse 55% 45% at 90% 85%, rgba(62, 207, 142, 0.12), transparent 50%),
    linear-gradient(180deg, #12081f 0%, #07070b 55%, #050508 100%);
}
.login-card {
  position: relative;
  overflow: hidden;
  width: min(440px, 100%);
  text-align: center;
  padding: 2rem 1.65rem 1.5rem;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(22, 18, 36, 0.92), rgba(12, 10, 20, 0.88));
  border: 1px solid rgba(181, 108, 255, 0.28);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
}
.login-glow {
  pointer-events: none;
  position: absolute;
  inset: -40% auto auto 50%;
  width: 280px;
  height: 180px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(181, 108, 255, 0.35), transparent 70%);
}
.login-card img {
  position: relative;
  width: min(240px, 78%);
  height: auto;
  object-fit: contain;
  border-radius: 0;
  margin-bottom: 0.35rem;
  filter: drop-shadow(0 0 22px rgba(139, 43, 226, 0.55));
}
.login-kicker {
  position: relative;
  margin: 0.15rem 0 0.35rem;
  color: var(--purple-2);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.login-card h1 {
  position: relative;
  margin: 0;
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.login-lead {
  position: relative;
  margin: 0.45rem 0 1.15rem;
  line-height: 1.45;
}
.login-card form { position: relative; text-align: left; }
.login-card label { font-size: 0.82rem; font-weight: 600; color: #c9c0e0; }
.login-card input {
  margin-top: 0.35rem;
  padding: 0.9rem 0.95rem;
  border-radius: 12px;
  border: 1px solid rgba(181, 108, 255, 0.22);
  background: rgba(7, 7, 12, 0.7);
  font-size: 16px;
  line-height: 1.3;
  transform: translateZ(0);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.login-card input:focus {
  outline: none;
  border-color: var(--purple-2);
  box-shadow: 0 0 0 3px rgba(139, 43, 226, 0.22);
}
.login-card button[type="submit"] {
  width: 100%;
  margin-top: 0.85rem;
  padding: 0.9rem 1rem;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(90deg, #6a21c5, #8b2be2 55%, #b56cff);
  box-shadow: 0 10px 28px rgba(139, 43, 226, 0.35);
  font-size: 0.98rem;
  letter-spacing: 0.01em;
}
.login-card button[type="submit"]:hover {
  filter: brightness(1.08);
}
.telegram-buy {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  margin-top: 0.85rem;
  padding: 0.88rem 1rem;
  border-radius: 12px;
  background: #229ed9;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(34, 158, 217, 0.28);
}
.telegram-buy svg { width: 22px; height: 22px; flex: 0 0 22px; }
.telegram-buy:hover { filter: brightness(1.08); color: #fff; }
.telegram-buy { border: 0; cursor: pointer; font: inherit; }
.plans-modal {
  width: min(420px, calc(100% - 2rem));
  border: 1px solid rgba(181, 108, 255, 0.3);
  border-radius: 20px;
  padding: 0;
  background: #12101c;
  color: var(--text);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}
.plans-modal::backdrop { background: rgba(5, 5, 10, 0.72); backdrop-filter: blur(8px); }
.plans-box { padding: 1.4rem 1.3rem 1.2rem; text-align: center; }
.plans-box h2 { margin: 0.15rem 0 0.35rem; font-size: 1.45rem; }
.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; margin: 1rem 0 1.1rem; }
.plan-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.9rem 0.6rem;
  background: #0b0b14;
}
.plan-card span { display: block; color: var(--muted); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.plan-card strong { display: block; margin-top: 0.35rem; font-size: 1.45rem; }
.plan-card-hot { border-color: var(--purple-2); box-shadow: 0 0 18px rgba(139, 43, 226, 0.25); }
.plan-actions { display: flex; gap: 0.6rem; align-items: center; }
.plan-actions .telegram-buy { margin-top: 0; flex: 1; }
.ghost-btn {
  width: auto;
  margin: 0;
  background: transparent !important;
  border: 1px solid var(--line) !important;
  color: var(--muted);
  font-weight: 700;
  border-radius: 12px;
  padding: 0.88rem 1rem;
  cursor: pointer;
}
.login-qr {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 0.2rem auto 0.7rem;
  border-radius: 12px;
  background: #fff;
  padding: 8px;
  filter: none;
}
.login-secret {
  position: relative;
  margin: 0 0 0.8rem;
  font-size: 0.78rem;
  color: var(--muted);
  word-break: break-all;
}
.login-secret code { color: var(--text); }
.login-back {
  position: relative;
  display: inline-block;
  margin-top: 0.9rem;
  color: var(--muted);
  font-size: 0.86rem;
}
.builder-page { max-width: 720px; width: 100%; margin: 0 auto; }
.builder-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-end;
  margin: 0.2rem 0 0.8rem;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  border: 1px solid rgba(139, 43, 226, 0.28);
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(139, 43, 226, 0.22), transparent 55%),
    linear-gradient(180deg, #14121f, #0e0e16);
}
.builder-head h1 { margin: 0.15rem 0 0.35rem; font-size: 1.75rem; letter-spacing: -0.03em; }
.builder-easy .builder-hero {
  padding: 0.35rem 1.05rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(22, 18, 37, 0.92), rgba(12, 12, 20, 0.96));
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}
.builder-step {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 0.85rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.builder-step:last-of-type { border-bottom: 0; }
.step-n {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.95rem;
  color: #fff;
  background: linear-gradient(145deg, #8b2be2, #3a1675);
}
.step-body h2 { margin: 0.15rem 0 0.65rem; font-size: 1.05rem; }
.step-hint { margin: 0 0 0.85rem; }
.form-stack { display: grid; gap: 0.75rem; }
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.field label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.82rem;
  color: var(--muted);
}
.field .opt { opacity: 0.7; font-weight: 400; }
.field-help { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.78rem; }
.icon-pick input[type="file"] { padding: 0.55rem 0; }
.build-progress {
  margin: 0 0 1rem;
  padding: 1rem 1.1rem 1.05rem;
  border-radius: 16px;
  border: 1px solid rgba(139, 43, 226, 0.45);
  background: linear-gradient(180deg, rgba(40, 22, 70, 0.9), rgba(14, 12, 24, 0.96));
}
.build-progress-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.build-progress-label {
  margin: 0;
  font-weight: 800;
  color: #fff;
  font-size: 1.05rem;
}
.build-progress-name { margin: 0.25rem 0 0; }
.build-progress-pct {
  font-size: 1.35rem;
  font-weight: 800;
  color: #c4b5fd;
  letter-spacing: -0.03em;
}
.build-bar {
  height: 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}
.build-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #7c3aed, #a78bfa, #6ee7b7, #7c3aed);
  background-size: 200% 100%;
  transition: width 0.35s linear;
}
.build-bar span.is-pulse {
  animation: buildPulse 1.2s linear infinite;
}
@keyframes buildPulse {
  0% { background-position: 0% 0; filter: brightness(1); }
  50% { background-position: 100% 0; filter: brightness(1.25); }
  100% { background-position: 0% 0; filter: brightness(1); }
}
.build-step {
  margin: 0.7rem 0 0.35rem;
  color: #e9e5ff;
  font-size: 0.95rem;
  font-weight: 700;
}
.build-log {
  list-style: none;
  margin: 0 0 0.55rem;
  padding: 0.55rem 0.7rem;
  min-height: 72px;
  max-height: 140px;
  overflow: auto;
  border-radius: 10px;
  background: rgba(0,0,0,0.28);
  border: 1px solid rgba(255,255,255,0.06);
  color: #b7b3c9;
  font-size: 0.8rem;
  display: grid;
  gap: 0.28rem;
}
.build-progress-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-top: 0.9rem;
}
.build-progress.is-ready {
  border-color: rgba(110, 231, 183, 0.45);
}
.build-progress.is-ready .build-progress-pct { color: #6ee7b7; }
.build-progress.is-failed {
  border-color: rgba(248, 113, 113, 0.45);
}
.build-progress.is-failed .build-progress-pct { color: #fca5a5; }
.field input[type="text"],
.field input[type="url"],
.field input[type="file"],
.field select {
  width: 100%;
  max-width: none;
}
.kind-row-easy { margin-bottom: 0; }
.btn-lg { padding: 0.85rem 1.35rem; font-size: 1rem; }
.builder-advanced {
  margin-top: 0.6rem;
  border-top: 1px dashed rgba(255,255,255,0.08);
  padding-top: 0.75rem;
}
.builder-advanced summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.9rem;
  user-select: none;
}
.builder-advanced summary:hover { color: #fff; }
.advanced-body { margin-top: 0.85rem; display: grid; gap: 0.75rem; }
.mini-kinds {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  color: #ddd;
  font-size: 0.9rem;
}
.perm-grid-easy { margin-bottom: 0; }
.eyebrow {
  margin: 0;
  color: var(--purple-2);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.builder-kpis { display: flex; gap: 0.7rem; }
.builder-kpis article {
  min-width: 132px;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #161225, #101018);
}
.builder-kpis span { display: block; font-size: 1.45rem; font-weight: 800; color: #fff; }
.builder-kpis small { color: var(--muted); }
.builder-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem 0.9rem;
  margin: 0.4rem 0 1rem;
}
.form-grid .span-2 { grid-column: 1 / -1; }
.kind-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.65rem; margin: 0.4rem 0 1rem; }
.kind {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 0.55rem 0.7rem;
  align-items: center;
  padding: 0.95rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #161225, #101018);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  position: relative;
}
.kind input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.kind-ico {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #c9b8ef;
  background: rgba(139, 43, 226, 0.14);
  border: 1px solid rgba(139, 43, 226, 0.28);
}
.kind-ico svg {
  width: 28px;
  height: 28px;
  display: block;
}
.kind-copy {
  grid-column: 2;
  min-width: 0;
}
.kind b { display: block; color: #fff; font-size: 0.95rem; }
.kind small { display: block; color: var(--muted); font-size: 0.74rem; margin-top: 0.2rem; line-height: 1.35; }
.kind:hover {
  border-color: rgba(181, 108, 255, 0.45);
  transform: translateY(-1px);
}
.kind:has(input:checked) {
  border-color: #8b2be2;
  box-shadow: 0 0 0 1px rgba(139, 43, 226, 0.55), 0 10px 24px rgba(139, 43, 226, 0.16);
  background: linear-gradient(180deg, #1d1533, #12101c);
}
.kind:has(input:checked) .kind-ico {
  color: #fff;
  background: linear-gradient(145deg, #8b2be2, #5a1aa0);
  border-color: transparent;
  box-shadow: 0 8px 16px rgba(139, 43, 226, 0.35);
}
.builder-easy .kind { background: linear-gradient(180deg, #161225, #101018); }
.builder-easy .kind:has(input:checked) {
  background: linear-gradient(180deg, #1d1533, #12101c);
}
.perm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 0.8rem;
  margin: 0.35rem 0 1rem;
}
.perm { display: flex; gap: 0.45rem; align-items: center; color: #ddd; font-size: 0.88rem; }
.builder-hero, .builder-code, .apk-library { margin-top: 0.9rem; }
.builder-hero h2, .builder-code h2, .apk-library h2 { margin: 0 0 0.75rem; font-size: 1.05rem; }
.builder-form { margin-top: 0; display: flex; flex-direction: column; gap: 0.35rem; align-items: stretch; }
.builder-form.compact { margin-top: 0.7rem; }
.builder-form select { max-width: none; }
.builder-steps { margin: 0; padding-left: 1.2rem; color: var(--muted); display: grid; gap: 0.55rem; }
.builder-steps b { color: #fff; }
.alert.ok { border-color: #6ee7b7; color: #bbf7d0; }
.builder-actions { display: flex; gap: 0.5rem; margin-top: 0.45rem; }
.hint { margin: 0.4rem 0 0; color: var(--muted); font-size: 0.82rem; }
.apk-library-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.empty-apks { margin: 0.4rem 0 0; }
.apk-list { display: flex; flex-direction: column; gap: 0.55rem; }
.apk-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0c0c16;
}
.apk-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.apk-del-form { margin: 0; display: inline-flex; }
.btn-del-apk {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0.35rem 0.7rem;
  border-radius: 9px;
  border: 1px solid rgba(224, 161, 74, 0.55);
  background: transparent;
  color: var(--warn);
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
  font-family: inherit;
}
.btn-del-apk:hover {
  background: rgba(224, 161, 74, 0.14);
  border-color: var(--warn);
}
.apk-item.missing { opacity: 0.65; }
.apk-ico-img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  background: #0c0c16;
}
.apk-ico {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
  background: linear-gradient(145deg, #8b2be2, #3a1675);
}
.apk-meta strong { display: block; }
.apk-meta p { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.82rem; }
.join-toasts {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 80;
  display: flex;
  flex-direction: column-reverse;
  gap: 0.7rem;
  width: min(400px, calc(100vw - 1.5rem));
  pointer-events: none;
}
.join-toast {
  pointer-events: auto;
  display: grid;
  grid-template-columns: 8px 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  background: linear-gradient(180deg, #1a1430, #101018);
  color: #fff;
  box-shadow: 0 18px 40px rgba(0,0,0,.5), 0 0 0 1px rgba(139, 43, 226, 0.35);
  border: 1px solid rgba(139, 43, 226, 0.4);
  animation: join-in .35s ease;
}
.join-toast b {
  display: block;
  font-size: 0.98rem;
  color: #f4f1ff;
}
.join-toast small {
  display: block;
  margin-top: 0.25rem;
  color: #c9b8ef;
  font-size: 0.84rem;
  line-height: 1.35;
}
.join-toast .join-bar {
  width: 8px;
  align-self: stretch;
  border-radius: 8px;
  background: linear-gradient(180deg, #b56cff, #3ecf8e);
}
.join-toast.alerts-hint {
  border-color: rgba(240, 193, 75, 0.55);
}
.join-toast.alerts-hint .join-bar {
  background: linear-gradient(180deg, #ffe08a, #d4a017);
}
  background: #e50914;
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
}
@keyframes join-in {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
@media (max-width: 720px) {
  .join-toasts { right: 0.6rem; left: 0.6rem; width: auto; bottom: 0.7rem; }
}
.code-box {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 1rem;
  margin: 0.6rem 0;
  border-radius: 12px;
  background: #0a0a12;
  border: 1px solid var(--purple);
  text-align: center;
  word-break: break-all;
}
.profile-box {
  margin-top: 1rem;
  padding: 0.85rem;
  border-radius: 10px;
  background: #0a0a12;
  border: 1px solid var(--line);
  overflow: auto;
}
.profile-box code {
  display: block;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
  font-size: 0.88rem;
}
.pair-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-top: 0.75rem;
}
.client-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.client-head h1 { margin: 0; }
.muted { color: var(--muted); }
.client-grid { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 0.9rem; }
.tool-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.45rem; }
.tool-grid button {
  width: auto;
  background: #16141f;
  border: 1px solid var(--line);
  color: #fff;
  border-radius: 10px;
  padding: 0.62rem 0.5rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.45rem;
  text-align: left;
}
.tool-grid button:hover { border-color: var(--purple-2); background: #1b1430; }
.tool-ico {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  stroke: currentColor;
}
.tool-span { grid-column: 1 / -1; }
#tool-status { margin: 0.75rem 0 0.45rem; color: #8fd4ff; }
.keylog-card {
  margin-top: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0a0a12;
  padding: 0.7rem 0.75rem;
}
.keylog-card h3 {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--purple-2);
}
.keylog-box {
  margin: 0;
  min-height: 140px;
  max-height: 240px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: #d7c8ff;
  font-size: 0.78rem;
  line-height: 1.45;
}
.phone-skin {
  width: min(360px, 100%);
  margin: 0 auto;
  background: #111018;
  border: 2px solid #3a3358;
  border-radius: 28px;
  padding: 10px 10px 14px;
  box-shadow: 0 0 0 2px #09090f, 0 18px 40px rgba(0,0,0,.45);
}
.phone-notch {
  width: 92px;
  height: 10px;
  margin: 0 auto 8px;
  background: #07070b;
  border-radius: 8px;
}
.phone-home {
  width: 78px;
  height: 6px;
  margin: 10px auto 0;
  background: #2b2540;
  border-radius: 99px;
}
.tool-grid button.is-on {
  border-color: #7c5cff;
  background: #2a1f55;
  box-shadow: 0 0 0 1px rgba(124,92,255,.35);
}
.phone-screen, .screen-box {
  min-height: 420px;
  background: #000;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.black-screen {
  position: absolute;
  inset: 0;
  background: #000;
  z-index: 0;
}
.live-canvas {
  position: relative;
  z-index: 1;
  display: none;
  width: 100%;
  max-height: 58vh;
  object-fit: contain;
  background: #000;
}
.live-canvas.is-on { display: block; }
.phone-screen img, .screen-box img {
  position: relative;
  z-index: 1;
  max-width: 100%;
  max-height: 58vh;
  display: none;
  background: #000;
}
.phone-screen img.is-on, .screen-box img.is-on { display: block; }
.phone-screen img:not([src]), .screen-box img:not([src]) { display: none !important; }
.phone-screen #screen-empty, .screen-box #screen-empty {
  position: relative;
  z-index: 2;
  margin: 0;
  padding: 1rem;
  color: #8b82a8;
  text-align: center;
}
.phone-screen.is-live #screen-empty { display: none; }
.screen-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.45rem 0.55rem 1.4rem;
  background: linear-gradient(180deg, rgba(8,6,18,.92) 0%, rgba(8,6,18,.55) 62%, rgba(8,6,18,0) 100%);
  color: #f4efff;
  font-size: 0.72rem;
  pointer-events: none;
}
.sh-tree { min-width: 0; flex: 1; }
.sh-crumb {
  margin: 0 0 0.2rem;
  font-weight: 800;
  letter-spacing: .01em;
  color: #d7c8ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sh-hier {
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: ui-monospace, Consolas, monospace;
  line-height: 1.25;
  color: #c8bedf;
}
.sh-hier li {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sh-hier li.root { color: #9ae6b4; font-weight: 700; }
.sh-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.12rem;
  font-weight: 800;
  white-space: nowrap;
}
#sh-bp { color: #ffe08a; }
#sh-fps { color: #7dffb3; }
.result-box {
  margin: 0.8rem 0 0;
  max-height: 240px;
  overflow: auto;
  background: #08080f;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.6rem;
  font-size: 0.8rem;
}
.result-box table { width: 100%; }
.result-box td, .result-box th { padding: 0.3rem; border-bottom: 1px solid var(--line); }
.live-feed {
  margin: 0.8rem 0 0;
  max-height: 220px;
  overflow: auto;
  background: #08080f;
  border-radius: 10px;
  padding: 0.7rem;
  color: #c9c0e0;
  font-size: 0.78rem;
  white-space: pre-wrap;
}
@media (max-width: 1100px) {
  .grid.stats { grid-template-columns: 1fr 1fr; }
  .builder-grid { grid-template-columns: 1fr; }
  .form-grid, .kind-row, .perm-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .app {
    display: block;
    min-height: 100%;
  }
  .workspace { min-height: 100vh; }
  .menu-btn { display: inline-flex; }
  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 40;
  }
  .sidebar-backdrop[hidden] { display: none; }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 50;
    width: min(280px, 86vw);
    height: 100%;
    min-height: 0;
    overflow: hidden;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-100%);
    transition: transform 0.22s ease, visibility 0.22s;
    box-shadow: none;
  }
  .sidebar.is-open {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    box-shadow: 16px 0 40px rgba(0, 0, 0, 0.45);
  }
  body.nav-open { overflow: hidden; }
  .topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.75rem;
    background: linear-gradient(180deg, #14121f 0%, #0d0d16 100%);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  }
  .top-left {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
    flex: 1 1 auto;
  }
  .header-logo {
    display: flex;
    margin: 0 auto;
  }
  .header-logo img { height: 42px; }
  .top-titles { display: none; }
  .menu-btn {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 12px;
    background: #1a1730;
  }
  .top-actions {
    flex: 1 1 100%;
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    gap: 0.45rem;
    padding-bottom: 0.2rem;
  }
  .top-actions .action-chip {
    flex: 0 0 auto;
    min-height: 44px;
    width: auto;
    padding: 0.45rem 0.85rem;
    font-size: 0.78rem;
    border-radius: 12px;
    white-space: nowrap;
  }
  .top-actions .action-chip svg { width: 15px; height: 15px; }
  .user-chip { display: none; }
  .wrap { padding: 0.9rem 0.8rem 5.5rem; }
  .card { padding: 0.85rem; border-radius: 16px; }
  .grid.stats {
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
  }
  .grid.stats .ws-stat { grid-column: 1 / -1; }
  .grid.stats .card {
    padding: 0.85rem 0.8rem 0.75rem;
    background: linear-gradient(180deg, #161225, #101018);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
    min-width: 0;
  }
  .grid.stats .card p {
    margin: 0;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  .grid.stats .card h2 {
    margin: 0.2rem 0 0;
    font-size: 1.55rem;
    overflow-wrap: anywhere;
  }
  .table-wrap {
    margin: 0;
    overflow: visible;
    border: 0;
    background: transparent;
    padding: 0;
    box-shadow: none;
  }
  .list-block .table-wrap table {
    min-width: 0;
    width: 100%;
  }
  .list-block th,
  .list-block td {
    white-space: normal;
  }
  .user-name {
    max-width: none;
  }
  .list-block td[data-label="ID"],
  .list-block td[data-label="IP"] {
    max-width: none;
  }
  .table-wrap table {
    min-width: 0;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.65rem;
  }
  .table-wrap thead { display: none; }
  .table-wrap tbody { display: block; }
  .table-wrap tr {
    display: block;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0.7rem 0.8rem 0.55rem;
    margin: 0;
  }
  .table-wrap td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    width: 100%;
    padding: 0.38rem 0;
    border: 0;
    border-bottom: 1px solid #1d1a2a;
    font-size: 0.86rem;
    min-width: 0;
    text-align: right;
  }
  .table-wrap td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-align: left;
    flex: 0 0 34%;
  }
  .table-wrap td:first-child {
    display: block;
    text-align: left;
    border-bottom: 1px solid var(--line);
    padding-bottom: 0.55rem;
    margin-bottom: 0.15rem;
  }
  .table-wrap td:first-child::before { display: none; }
  .table-wrap td:last-child {
    border-bottom: 0;
    justify-content: flex-end;
    padding-top: 0.55rem;
  }
  .table-wrap td:last-child::before { display: none; }
  .table-wrap .empty-row td {
    display: block;
    text-align: center;
    border: 0;
    color: var(--muted);
  }
  .table-wrap .empty-row td::before { display: none; }
  .user-name { white-space: normal; word-break: break-word; }
  td:has(.open-link) { text-align: right; }
  .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.4rem;
    padding-bottom: 0.15rem;
    -webkit-overflow-scrolling: touch;
  }
  .tabs a {
    flex: 0 0 auto;
    font-size: 0.78rem;
    padding: 0.42rem 0.7rem;
  }
  .builder-grid, .builder-head { grid-template-columns: 1fr; display: grid; }
  .builder-head { align-items: stretch; }
  .builder-head h1 { font-size: 1.45rem; }
  .builder-kpis { flex-wrap: wrap; }
  .builder-kpis article { flex: 1 1 120px; min-width: 0; }
  .field-row, .kind-row-easy { grid-template-columns: 1fr; }
  .kind {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .kind-ico {
    width: 44px;
    height: 44px;
  }
  .builder-step { grid-template-columns: 28px minmax(0, 1fr); gap: 0.65rem; }
  .step-n { width: 28px; height: 28px; font-size: 0.8rem; }
  .apk-item { grid-template-columns: 48px minmax(0, 1fr); }
  .apk-item .btn { grid-column: 2; justify-self: start; }
  .client-grid { grid-template-columns: 1fr; }
  .tool-grid { grid-template-columns: 1fr 1fr; }
  .plan-grid { grid-template-columns: 1fr; }
  .plan-actions { flex-direction: column; }
  .login-card { padding: 1.5rem 1.1rem 1.2rem; }
  .login-card h1 { font-size: 1.55rem; }
  .auth-body {
    display: block;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0.85rem 0.85rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
    min-height: 100svh;
  }
  .login-card {
    margin: 0 auto;
    width: 100%;
  }
  .login-card input {
    font-size: 16px;
    min-height: 48px;
  }
}
@media (max-width: 520px) {
  .header-logo img { height: 38px; }
  .tool-grid { grid-template-columns: 1fr; }
}
