/* stealer.cloud operator panel
   black / white / gray monospace, square edges, monochrome. */

:root {
  --bg: #000;
  --panel: #0a0a0a;
  --panel2: #101010;
  --hover: #141414;
  --line: #1c1c1c;
  --line2: #262626;
  --text: #e0e0e0;
  --dim: #707070;
  --faint: #4a4a4a;
  --err: #e07070;
}

* { box-sizing: border-box; border-radius: 0; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 13px/1.55 'SF Mono', 'Cascadia Code', 'JetBrains Mono', Consolas, Menlo, 'Courier New', monospace;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

a { color: #fff; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #2c2c2c; }
a:hover { text-decoration-color: #fff; }

::selection { background: #fff; color: #000; }

input, select, button, textarea {
  font: inherit;
  letter-spacing: inherit;
  color: var(--text);
  background: var(--panel2);
  border: 1px solid var(--line2);
  padding: 7px 10px;
}
input:focus, select:focus, button:focus { outline: 1px solid #fff; outline-offset: 0; }
input::placeholder { color: var(--faint); }
button { cursor: pointer; color: #000; background: #e0e0e0; border-color: #e0e0e0; font-weight: 700; }
button:hover { background: #fff; border-color: #fff; }

/* ---------- shell: icon rail + content ---------- */

.shell { display: grid; grid-template-columns: 64px minmax(0, 1fr); min-height: 100vh; }

.side {
  border-right: 1px solid var(--line);
  padding: 16px 0 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}
.brand img { display: block; width: 44px; height: auto; }

.nav { display: flex; flex-direction: column; align-items: center; gap: 6px; }

.nav a, .nav .navout {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  color: var(--dim);
  text-decoration: none;
  border-left: none;
}
.nav a:hover, .nav .navout:hover { color: #fff; }
.nav a.on {
  color: #fff;
  box-shadow: inset 2px 0 0 #fff;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), transparent 80%);
}
.nav svg { width: 18px; height: 18px; }

.nav form { margin: 0; margin-top: auto; }
.navout {
  background: none;
  border: none;
  color: var(--dim);
  cursor: pointer;
}
.navout:hover { color: #fff; background: none; }

.main { padding: 26px 32px 60px; min-width: 0; }

/* ---------- page furniture ---------- */

.pagehead { margin-bottom: 22px; }
.pagehead h1 {
  margin: 0;
  font-size: 15px;
  font-weight: 400;
  color: #fff;
  letter-spacing: 0.02em;
  word-break: break-all;
}

.empty { color: var(--faint); padding: 10px 0; }
.err { color: var(--err); padding: 10px 0; }

/* numbered pager: back, window of pages, forward */
.pager { display: flex; gap: 6px; align-items: center; margin-top: 18px; }
.pager a, .pager .cur, .pager .gap {
  min-width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line2);
  font-size: 12px;
  color: var(--dim);
  text-decoration: none;
  padding: 0 6px;
}
.pager a:hover { color: #fff; border-color: #4a4a4a; }
.pager .cur { color: #fff; background: var(--panel2); border-color: #3a3a3a; }
.pager .gap { border: none; color: var(--faint); }

/* small square action links inside tree leaves and headers */
.act {
  font-size: 10.5px;
  border: 1px solid var(--line2);
  padding: 0 7px;
  color: var(--dim);
  text-decoration: none;
  white-space: nowrap;
}
.act:hover { color: #fff; border-color: #4a4a4a; }
.dlbtn {
  display: inline-block;
  border: 1px solid var(--line2);
  padding: 5px 14px;
  color: #fff;
  text-decoration: none;
  font-size: 12px;
}
.dlbtn:hover { border-color: #fff; }

.id { word-break: break-all; }
.num { text-align: right; white-space: nowrap; }
.dim { color: var(--dim); }
.wrap { white-space: normal; word-break: break-all; }

.tag {
  display: inline-block;
  border: 1px solid var(--line2);
  color: var(--dim);
  font-size: 10.5px;
  padding: 0 6px;
  letter-spacing: 0.06em;
}

/* ---------- search bar ---------- */

.bar {
  display: flex;
  border: 1px solid var(--line2);
  background: var(--panel);
}
.bar select { border: none; border-right: 1px solid var(--line2); background: var(--panel); color: var(--dim); flex: none; }
.bar input[type="search"] { border: none; background: var(--panel); flex: 1; min-width: 0; color: #fff; }
.bar input[type="search"]:focus { outline: none; }
.bar:focus-within { border-color: #6a6a6a; }
.bar button { border: none; border-left: 1px solid var(--line2); flex: none; width: 44px; padding: 0; display: flex; align-items: center; justify-content: center; }
.bar button svg { width: 16px; height: 16px; }

/* ---------- tables ----------
   Wide tables scroll inside .tscroll, never the page: nowrap data columns
   make min-content wider than any viewport, so the wrapper owns the
   overflow. */

.tscroll { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border: 1px solid var(--line);
  font-size: 12px;
}
th, td {
  text-align: left;
  padding: 6px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  white-space: nowrap;
}
th {
  color: var(--faint);
  font-size: 10px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background: var(--panel2);
  white-space: normal;
}
th.num { text-align: right; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--hover); }

/* ---------- machine result blocks ---------- */

.mlist { display: flex; flex-direction: column; gap: 14px; }

.mrow { border: 1px solid var(--line); background: var(--panel); }
.mrow > .tree { border-top: 1px solid var(--line); }

.mhead {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  padding: 9px 12px;
  font-size: 12px;
}
.mhead .who { color: #fff; word-break: break-all; }
.count { color: #e0e0e0; margin-left: auto; white-space: nowrap; }

/* ---------- file trees ----------
   Native <details>/<summary>: no script, so the CSP stays closed. Folders
   carry a leaf count; leaves carry type, size and payload/machine links. */

.tree {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 8px 14px 12px;
  font-size: 12px;
}

.tree summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 2px 0;
  color: var(--text);
}
.tree summary::-webkit-details-marker { display: none; }
.tree summary::before {
  content: "+";
  color: var(--faint);
  width: 12px;
  flex: none;
}
.tree details[open] > summary::before { content: "-"; }
.tree summary:hover .dname { color: #fff; }

.dname { word-break: break-all; }
.dcount { color: var(--faint); font-size: 10.5px; letter-spacing: 0.04em; }
.tkids {
  margin-left: 5px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.leaf {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 2px 0 2px 22px;
}
.leaf .fname { word-break: break-all; }
.leaf .lmeta { color: var(--dim); font-size: 11px; white-space: nowrap; }
.leaf .lsha { font-size: 11px; }
.leaf .lsha + .lsha { margin-left: -6px; }

/* ---------- definition grids ----------
   Two dt/dd pairs per row, explicitly: dt and dd are siblings in the
   grid, so columns must always be a multiple of 2 or the pairs split
   across rows. minmax(0,1fr) lets long values shrink instead of
   stretching the page. */

.meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(130px, max-content) minmax(0, 1fr));
  border: 1px solid var(--line);
  background: var(--panel);
  margin: 0;
}
.meta dt {
  color: var(--faint);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 8px 12px;
  background: var(--panel2);
  border-right: 1px solid var(--line);
}
.meta dd {
  margin: 0;
  padding: 8px 12px;
  word-break: break-all;
  background: var(--panel);
}
.meta dt, .meta dd { border-bottom: 1px solid var(--line); }

/* ---------- payload preview ---------- */

pre.preview {
  margin: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 14px;
  overflow: auto;
  max-height: 72vh;
  font-size: 12px;
  line-height: 1.5;
}

/* ---------- login ---------- */

.loginwrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 40px 16px;
}
.logincloud { margin-bottom: 6px; }
.loginbrand { color: #fff; font-size: 16px; letter-spacing: 0.08em; }
.loginerr { color: var(--err); font-size: 12px; }
.loginnote { color: var(--dim); font-size: 12px; }

.loginform { display: flex; gap: 8px; margin-top: 8px; }
.loginform input { width: 260px; }

/* ---------- narrow screens ---------- */

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; justify-content: flex-start; gap: 4px; border-right: none; border-bottom: 1px solid var(--line); padding: 8px 10px; }
  .brand { width: auto; border-bottom: none; margin-bottom: 0; padding: 0 8px 0 0; }
  .brand img { width: 30px; }
  .nav { flex-direction: row; }
  .nav a, .nav .navout { width: 36px; height: 36px; }
  .nav a.on { box-shadow: inset 0 2px 0 #fff; background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 80%); }
  .nav form { margin-top: 0; margin-left: auto; }
  .main { padding: 18px 14px 40px; }
  .meta { grid-template-columns: minmax(110px, max-content) minmax(0, 1fr); }
}
