/* ═══════════════════════════════════════════════════════════════════════
   PhantomStrikeRipper · Control Panel — design system
   Dark, modern, glassy. Teal accent (#2dd4bf), Inter + JetBrains Mono.
   Based on PhantomRipper design system — unchanged palette + aurora.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  --bg: #070a0f;
  --bg-2: #0a0e15;
  --surface: #0e141d;
  --surface-2: #121a25;
  --surface-3: #17202d;
  --line: #1c2635;
  --line-2: #253347;
  --text: #e7eef7;
  --text-2: #9fb0c4;
  --muted: #6d7f95;
  --dim: #47566a;

  --accent: #2dd4bf;
  --accent-2: #5eead4;
  --accent-dim: #14b8a6;
  --accent-ink: #04211d;
  --glow: rgba(45, 212, 191, 0.35);
  --glow-soft: rgba(45, 212, 191, 0.12);

  --ok: #34d399;
  --warn: #fbbf24;
  --danger: #f87171;
  --info: #60a5fa;

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --r-xl: 26px;

  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
  --shadow-soft: 0 10px 30px -16px rgba(0, 0, 0, 0.6);
  --ring: 0 0 0 3px rgba(45, 212, 191, 0.16);
  --hair: inset 0 1px 0 rgba(255, 255, 255, 0.045);

  --sans: "Inter", ui-sans-serif, system-ui, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Menlo, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
.hidden { display: none !important; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.ok { color: var(--ok); }
.error { color: var(--danger); }
::selection { background: var(--accent); color: var(--accent-ink); }

/* ── aurora background ─────────────────────────────────────────────── */
.aurora { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.aurora-blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5; }
.aurora-blob.a { width: 620px; height: 620px; top: -220px; right: -120px;
  background: radial-gradient(circle, rgba(45,212,191,0.34), transparent 65%);
  animation: drift-a 26s ease-in-out infinite; }
.aurora-blob.b { width: 560px; height: 560px; bottom: -240px; left: -140px;
  background: radial-gradient(circle, rgba(56,189,248,0.20), transparent 65%);
  animation: drift-b 32s ease-in-out infinite; }
.aurora-blob.c { width: 460px; height: 460px; top: 40%; left: 42%;
  background: radial-gradient(circle, rgba(20,184,166,0.14), transparent 68%);
  animation: drift-c 40s ease-in-out infinite; }
.grid-overlay { position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 80%); }
@keyframes drift-a { 0%,100%{transform:translate(0,0)} 50%{transform:translate(-60px,50px)} }
@keyframes drift-b { 0%,100%{transform:translate(0,0)} 50%{transform:translate(70px,-40px)} }
@keyframes drift-c { 0%,100%{transform:translate(0,0)} 50%{transform:translate(-40px,-50px)} }

/* ── status dot ────────────────────────────────────────────────────── */
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; display: inline-block; }
.status-dot.on { background: var(--ok); box-shadow: 0 0 0 0 rgba(52,211,153,0.6); animation: pulse 2.4s infinite; }
.status-dot.off { background: var(--danger); }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(52,211,153,0.5)} 70%{box-shadow:0 0 0 7px rgba(52,211,153,0)} 100%{box-shadow:0 0 0 0 rgba(52,211,153,0)} }

/* ═══════════════ LOGIN ═══════════════ */
.login-screen { position: fixed; inset: 0; z-index: 5; display: grid; place-items: center; padding: 24px; }
.login-shell {
  position: relative; z-index: 1;
  width: min(1000px, 100%);
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  background: linear-gradient(180deg, rgba(18,26,37,0.9), rgba(10,14,21,0.94));
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow), var(--hair);
  overflow: hidden;
  animation: rise 0.7s var(--ease) both;
}
@keyframes rise { from{opacity:0; transform:translateY(22px) scale(0.99)} to{opacity:1; transform:none} }

.login-brand { padding: 46px 44px; display: flex; flex-direction: column;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(45,212,191,0.10), transparent 55%),
    linear-gradient(180deg, rgba(20,29,41,0.6), rgba(9,13,19,0.2));
  border-right: 1px solid var(--line); }
.brandmark { display: flex; align-items: center; gap: 12px; margin-bottom: 44px; }
.brandmark-glyph { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px;
  color: var(--accent); background: linear-gradient(160deg, rgba(45,212,191,0.16), rgba(45,212,191,0.03));
  border: 1px solid rgba(45,212,191,0.28); box-shadow: 0 0 26px var(--glow-soft), var(--hair); }
.brandmark-glyph.sm { width: 34px; height: 34px; border-radius: 10px; }
.brandmark-text { display: flex; flex-direction: column; line-height: 1.15; }
.brandmark-text strong { font-size: 16px; letter-spacing: 0.2px; }
.brandmark-text span { font-size: 11px; color: var(--muted); letter-spacing: 0.6px; text-transform: uppercase; }

.login-headline { font-size: 34px; line-height: 1.12; font-weight: 800; letter-spacing: -0.9px; margin: 0 0 16px; }
.login-headline em { font-style: normal; background: linear-gradient(120deg, var(--accent-2), var(--info));
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-sub { color: var(--text-2); font-size: 13.5px; line-height: 1.65; margin: 0 0 26px; max-width: 42ch; }
.login-feats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.login-feats li { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 13px; }
.feat-ic { color: var(--accent); font-size: 9px; }
.login-foot { margin-top: auto; padding-top: 30px; display: flex; align-items: center; gap: 9px;
  color: var(--muted); font-size: 12px; font-family: var(--mono); }

.login-pane { display: grid; place-items: center; padding: 40px 38px; }
.login-card { width: 100%; max-width: 360px; }
.login-card-head { margin-bottom: 26px; }
.login-card-head h2 { margin: 0 0 6px; font-size: 22px; font-weight: 700; letter-spacing: -0.4px; }
.login-card-head p { margin: 0; color: var(--muted); font-size: 13px; }

.field { display: block; margin-bottom: 16px; }
.field-label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 7px; font-weight: 500; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-ic { position: absolute; left: 13px; color: var(--dim); pointer-events: none; transition: color .2s; }
.input-wrap input { padding-left: 40px; }
.input-wrap:focus-within .input-ic { color: var(--accent); }

input, select, textarea {
  width: 100%; background: #080c12; color: var(--text);
  border: 1px solid var(--line-2); border-radius: var(--r-sm);
  padding: 11px 13px; font-size: 14px; font-family: inherit;
  outline: none; transition: border-color .18s, box-shadow .18s, background .18s;
}
input::placeholder, textarea::placeholder { color: var(--dim); }
input:hover, select:hover { border-color: #2f415a; }
input:focus, select:focus, textarea:focus { border-color: var(--accent-dim); box-shadow: var(--ring); background: #0a1017; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z' fill='%236d7f95'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
textarea { resize: vertical; min-height: 90px; }

.pw-toggle { position: absolute; right: 8px; display: grid; place-items: center; width: 28px; height: 28px;
  border: none; background: transparent; color: var(--dim); cursor: pointer; border-radius: 6px; transition: color .15s, background .15s; }
.pw-toggle:hover { color: var(--text-2); background: rgba(255,255,255,0.05); }

.login-error { background: rgba(248,113,113,0.09); border: 1px solid rgba(248,113,113,0.3); color: #fca5a5;
  padding: 10px 12px; border-radius: var(--r-sm); font-size: 12.5px; margin: 0 0 16px; }
.shake { animation: shake 0.4s; }
@keyframes shake { 0%,100%{transform:translateX(0)} 20%{transform:translateX(-7px)} 40%{transform:translateX(6px)} 60%{transform:translateX(-4px)} 80%{transform:translateX(3px)} }

.login-card-foot { display: flex; justify-content: space-between; margin-top: 22px; padding-top: 16px;
  border-top: 1px solid var(--line); color: var(--dim); font-size: 11px; letter-spacing: 0.4px; }

/* ═══════════════ BUTTONS ═══════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line-2); background: linear-gradient(180deg, #141c27, #10161f);
  color: var(--text); padding: 10px 16px; border-radius: var(--r-sm);
  font-size: 13.5px; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: border-color .15s, background .15s, transform .1s, color .15s, box-shadow .15s;
}
.btn:hover { border-color: #33465f; color: #fff; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn.primary { border: none; color: var(--accent-ink); font-weight: 700;
  background: linear-gradient(135deg, var(--accent-2), var(--accent-dim));
  box-shadow: 0 8px 26px -8px var(--glow), var(--hair); }
.btn.primary:hover { filter: brightness(1.07); box-shadow: 0 12px 34px -8px var(--glow); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.btn.danger { color: #fca5a5; border-color: rgba(248,113,113,0.28); background: rgba(248,113,113,0.06); }
.btn.danger:hover { background: rgba(248,113,113,0.14); color: #fff; border-color: rgba(248,113,113,0.5); }
.btn.sm { padding: 7px 12px; font-size: 12.5px; border-radius: 7px; }
.btn.lg { padding: 12px 18px; font-size: 14px; }
.btn-lg { padding: 12px 18px; font-size: 14px; }
.btn.block { width: 100%; }
.btn.icon-btn { padding: 8px; width: 34px; height: 34px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-label { display: inline-flex; }
.btn-spinner { width: 15px; height: 15px; border-radius: 50%; border: 2px solid rgba(4,33,29,0.35);
  border-top-color: var(--accent-ink); display: none; animation: spin 0.7s linear infinite; }
.btn.loading .btn-label { display: none; }
.btn.loading .btn-spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── loot filter buttons (active state uses accent) ────────────────── */
.loot-filter-btn.active {
  border-color: rgba(45,212,191,0.45);
  color: var(--accent-2);
  background: rgba(45,212,191,0.09);
}

/* ═══════════════ APP SHELL ═══════════════ */
.app { position: relative; z-index: 2; display: grid; grid-template-columns: 276px 1fr; height: 100vh; }
.sidebar { display: flex; flex-direction: column; padding: 18px 14px;
  background: linear-gradient(180deg, rgba(13,18,26,0.92), rgba(8,11,16,0.92));
  border-right: 1px solid var(--line); backdrop-filter: blur(12px); }
.side-brand { display: flex; align-items: center; gap: 11px; padding: 4px 6px 20px; }
.side-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.side-brand-text strong { font-size: 14px; }
.side-brand-text span { font-size: 10px; color: var(--muted); letter-spacing: 0.7px; text-transform: uppercase; }

.nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.nav a { position: relative; display: flex; align-items: center; gap: 12px; padding: 11px 13px;
  border-radius: 10px; color: var(--text-2); font-size: 14.5px; font-weight: 500; transition: color .15s, background .15s; }
.nav a .ni { display: grid; place-items: center; color: var(--dim); transition: color .15s; }
.nav a .nbadge { margin-left: auto; font-size: 11px; color: var(--muted); font-family: var(--mono); }
.nav a:hover { color: var(--text); background: rgba(255,255,255,0.035); }
.nav a:hover .ni { color: var(--text-2); }
.nav a.active { color: #fff; background: linear-gradient(90deg, rgba(45,212,191,0.14), rgba(45,212,191,0.02)); }
.nav a.active .ni { color: var(--accent); }
.nav a.active::before { content: ""; position: absolute; left: -14px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px; border-radius: 0 3px 3px 0; background: var(--accent); box-shadow: 0 0 12px var(--glow); }

.sidebar-foot { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.conn-pill { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 9px;
  background: rgba(255,255,255,0.025); color: var(--text-2); font-size: 12px; }
.user-card { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px;
  background: rgba(255,255,255,0.025); border: 1px solid var(--line); }
.avatar { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none;
  background: linear-gradient(140deg, var(--accent-dim), #0f766e); color: #04211d; font-weight: 700; font-size: 12px; }
.user-meta { display: flex; flex-direction: column; line-height: 1.2; overflow: hidden; }
.user-meta strong { font-size: 12.5px; }
.user-meta span { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }

.content { display: flex; flex-direction: column; overflow: hidden; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 34px; border-bottom: 1px solid var(--line);
  background: rgba(9,13,19,0.55); backdrop-filter: blur(10px); }
.topbar-left h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.3px; }
.page-sub { margin: 4px 0 0; font-size: 13.5px; color: var(--muted); }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.pill { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2);
  border: 1px solid var(--line-2); padding: 7px 14px; border-radius: 999px; background: rgba(255,255,255,0.02); }
.page { flex: 1; overflow-y: auto; padding: 30px 34px 70px; scroll-behavior: smooth; }

/* ═══════════════ CARDS / GRID ═══════════════ */
.grid { display: grid; gap: 18px; }
/* auto-fit so cards grow to the viewport instead of cropping their content */
.cols-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.cols-3 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.cols-2 { grid-template-columns: repeat(auto-fit, minmax(460px, 1fr)); }

.card { position: relative; background: linear-gradient(180deg, rgba(18,26,37,0.72), rgba(12,17,24,0.72));
  border: 1px solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: var(--hair);
  transition: border-color .2s, transform .2s; }
.card.hoverable:hover { border-color: var(--line-2); transform: translateY(-2px); }
.card h3 { margin: 0 0 16px; font-size: 12.5px; text-transform: uppercase; letter-spacing: 1.1px; color: var(--muted); font-weight: 600; }
.card.flush { padding: 0; overflow: hidden; }
.card.clickable { cursor: pointer; }
.card.clickable:hover { border-color: rgba(45,212,191,0.22); }

.stat { display: flex; flex-direction: column; gap: 12px; }
.stat-top { display: flex; align-items: center; justify-content: space-between; }
.stat-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: rgba(45,212,191,0.1); color: var(--accent); border: 1px solid rgba(45,212,191,0.18); }
.stat-ic.blue { background: rgba(96,165,250,0.1); color: var(--info); border-color: rgba(96,165,250,0.2); }
.stat-ic.violet { background: rgba(167,139,250,0.1); color: #a78bfa; border-color: rgba(167,139,250,0.2); }
.stat-ic.amber { background: rgba(251,191,36,0.1); color: var(--warn); border-color: rgba(251,191,36,0.2); }
.stat-ic.red { background: rgba(248,113,113,0.1); color: var(--danger); border-color: rgba(248,113,113,0.2); }
.stat-value { font-size: 38px; font-weight: 800; letter-spacing: -1.2px; line-height: 1; }
.stat-value.accent { background: linear-gradient(120deg, var(--accent-2), var(--info)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-label { color: var(--muted); font-size: 12px; }

.bar { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent-dim), var(--accent-2)); }
.osrow { display: grid; grid-template-columns: 90px 1fr 34px; align-items: center; gap: 12px; margin-bottom: 10px; font-size: 12.5px; }
.osrow .osn { color: var(--text-2); text-transform: capitalize; }

/* ═══════════════ TABLES ═══════════════ */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 13px 18px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.9px;
  position: sticky; top: 0; background: rgba(12,17,24,0.95); backdrop-filter: blur(6px); z-index: 1; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: rgba(255,255,255,0.026); }
tbody tr:last-child td { border-bottom: none; }
tr.clickable { cursor: pointer; }
.cell-host { display: flex; align-items: center; gap: 11px; }
.cell-host .avatar { width: 32px; height: 32px; border-radius: 9px; font-size: 12px; }
.cell-host .hmeta { display: flex; flex-direction: column; line-height: 1.25; }
.cell-host .hmeta strong { font-size: 13px; font-weight: 600; }
.cell-host .hmeta span { font-size: 11px; color: var(--dim); font-family: var(--mono); }

.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600;
  padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--text-2); background: rgba(255,255,255,0.02); }
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.9; }
.tag.active { color: var(--ok); border-color: rgba(52,211,153,0.3); background: rgba(52,211,153,0.08); }
.tag.dead { color: var(--danger); border-color: rgba(248,113,113,0.3); background: rgba(248,113,113,0.07); }
.tag.win { color: #7dd3fc; border-color: rgba(125,211,252,0.28); background: rgba(125,211,252,0.07); }
.tag.linux { color: #fcd34d; border-color: rgba(252,211,77,0.28); background: rgba(252,211,77,0.07); }
.tag.macos { color: #c4b5fd; border-color: rgba(196,181,253,0.28); background: rgba(196,181,253,0.07); }
.tag.neutral::before { display: none; }
/* loot type tags */
.tag.loot { color: var(--warn); border-color: rgba(251,191,36,0.3); background: rgba(251,191,36,0.07); }
.tag.loot::before { display: none; }

/* ═══════════════ TERMINAL ═══════════════ */
.term { background: #04070b; border: 1px solid var(--line); border-radius: var(--r);
  font-family: var(--mono); font-size: 13px; line-height: 1.65;
  height: clamp(380px, 52vh, 760px); overflow-y: auto; padding: 18px 20px;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.5); }
.term .line { white-space: pre-wrap; word-break: break-word; }
.term .cmd { color: var(--accent-2); }
.term .cmd::before { content: "❯ "; color: var(--dim); }
.term .out { color: var(--text); margin-bottom: 8px; }
.term .err { color: #fca5a5; }
.term .meta { color: var(--dim); font-size: 11.5px; font-style: italic; }
.term .ts { color: var(--dim); font-size: 10.5px; margin-left: 8px; }
.cmdbar { display: flex; gap: 10px; margin-top: 12px; }
.cmdbar input { margin: 0; flex: 1; font-family: var(--mono); }

/* ═══════════════ MISC ═══════════════ */
.row { display: flex; gap: 12px; align-items: center; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.kv { display: grid; grid-template-columns: 152px 1fr; gap: 10px 16px; font-size: 13.5px; align-items: center; }
.kv .k { color: var(--muted); font-size: 12px; }
.kv .v { color: var(--text); overflow-wrap: anywhere; }
.section-title { margin: 26px 0 13px; font-size: 11.5px; text-transform: uppercase; letter-spacing: 1.1px; color: var(--muted); font-weight: 600; }
hr.sep { border: none; border-top: 1px solid var(--line); margin: 18px 0; }
.empty { color: var(--dim); text-align: center; padding: 52px 20px; font-size: 13px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty svg { opacity: 0.4; }
.qactions { display: flex; flex-wrap: wrap; gap: 9px; }
.qactions .btn { min-width: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 720px) { .form-grid { grid-template-columns: 1fr; } }
label.field2 { display: block; }
label.field2 > span { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 7px; font-weight: 500; }

/* switch */
.switch { display: flex; align-items: center; gap: 10px; font-size: 13px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { position: relative; width: 38px; height: 22px; border-radius: 999px; background: var(--surface-3);
  border: 1px solid var(--line-2); transition: background .18s, border-color .18s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: #8ea2b8; transition: transform .2s var(--ease), background .18s; }
.switch input:checked + .track { background: rgba(45,212,191,0.22); border-color: rgba(45,212,191,0.5); }
.switch input:checked + .track::after { transform: translateX(16px); background: var(--accent-2); }
.switch input:focus-visible + .track { box-shadow: var(--ring); }

/* skeleton */
.skel { background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%);
  background-size: 400% 100%; animation: shimmer 1.4s infinite; border-radius: 7px; }
@keyframes shimmer { 0%{background-position:100% 0} 100%{background-position:-100% 0} }
.skel-row { height: 44px; margin-bottom: 8px; }

/* ═══════════════ MODAL ═══════════════ */
.modal-backdrop { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px;
  background: rgba(3,5,8,0.66); backdrop-filter: blur(6px); animation: fade .18s var(--ease); }
@keyframes fade { from{opacity:0} to{opacity:1} }
.modal { width: min(560px, 100%); background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 26px; box-shadow: var(--shadow);
  animation: rise 0.32s var(--ease) both; }
.modal h3 { margin: 0 0 8px; font-size: 18px; font-weight: 700; }
.modal p { margin: 0 0 20px; color: var(--text-2); font-size: 13.5px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* ═══════════════ TOASTS ═══════════════ */
.toast-root { position: fixed; bottom: 22px; right: 22px; z-index: 80; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.toast { display: flex; align-items: center; gap: 11px; min-width: 240px; max-width: 380px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line-2);
  border-left: 3px solid var(--accent); border-radius: var(--r-sm); padding: 12px 15px; font-size: 13px;
  box-shadow: var(--shadow-soft); animation: toast-in 0.32s var(--ease) both; }
.toast.out { animation: toast-out 0.28s var(--ease) both; }
.toast.err { border-left-color: var(--danger); }
.toast .ti { flex: none; color: var(--accent); }
.toast.err .ti { color: var(--danger); }
@keyframes toast-in { from{opacity:0; transform:translateX(20px) scale(0.98)} to{opacity:1; transform:none} }
@keyframes toast-out { to{opacity:0; transform:translateX(20px) scale(0.98)} }

/* ═══════════════ SCROLLBARS ═══════════════ */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #1b2634; border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #29394e; }

/* ═══════════════ RESPONSIVE ═══════════════ */
@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .app { grid-template-columns: 68px 1fr; }
  .side-brand-text, .nav a span:not(.ni), .user-meta, .conn-pill span:not(.status-dot) { display: none; }
  .nav a { justify-content: center; padding: 11px; }
  .user-card { justify-content: center; }
  .sidebar-foot .btn span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ═══ v0.2 — artifacts, live view, offensive tasks ═══════════════════ */

.artifact-viewer {
  width: min(920px, 100%);
  max-height: 88vh;
  overflow: auto;
}
.artifact-viewer img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #05070b;
  margin-top: 12px;
}

.stream-backdrop {
  background: rgba(4, 6, 10, 0.86);
  backdrop-filter: blur(10px);
}
.stream-modal {
  width: min(1500px, 97vw);
  max-height: 96vh;
  overflow: auto;
}
.stream-frame {
  margin-top: 4px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: #05070b;
  min-height: 380px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.stream-frame img {
  width: 100%;
  height: auto;
  display: block;
  cursor: crosshair;
  user-select: none;
  -webkit-user-drag: none;
}
.stream-frame img[src*='data:image'] { min-height: 0; }

#task-verb {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  padding: 8px 10px;
  font-size: 12px;
  outline: none;
}
#task-verb:focus { border-color: var(--accent-dim); }
#task-args {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  padding: 8px 10px;
  font-size: 12.5px;
  outline: none;
}
#task-args:focus { border-color: var(--accent-dim); }

/* ── TOTP login step ───────────────────────────────────────────────── */
.totp-secret {
  text-align: left;
  border: 1px solid rgba(45, 212, 191, 0.35);
  background: rgba(45, 212, 191, 0.05);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.totp-secret-head {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 6px;
}
.totp-hint {
  margin: 0;
  font-size: 11.5px;
  color: var(--text-2);
  line-height: 1.5;
}
.totp-secret-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
#totp-secret-value {
  flex: 1;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--accent-2);
  background: #05070b;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  word-break: break-all;
}
#totp-block { text-align: left; margin-bottom: 14px; }

/* ═══ v1.0 — Loot Vault (PhantomStrikeRipper) ════════════════════════ */

/* Loot summary cards in victim detail */
.loot-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  padding: 4px 0;
}

.loot-card {
  background: linear-gradient(160deg, rgba(18,26,37,0.8), rgba(12,17,24,0.8));
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color .18s, transform .18s, box-shadow .18s;
}
.loot-card:hover {
  border-color: rgba(45,212,191,0.28);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px -8px var(--glow-soft);
}
.loot-card-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.9px;
  font-weight: 600;
  margin-bottom: 8px;
}
.loot-card-count {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.8px;
  color: var(--accent-2);
  line-height: 1;
  margin-bottom: 4px;
}
.loot-card-meta {
  font-size: 11px;
  color: var(--dim);
  line-height: 1.4;
}

/* Loot data pre/code blocks */
.loot-pre {
  background: #04070b;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 14px 16px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.65;
  overflow-y: auto;
  max-height: 420px;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--text-2);
  margin-top: 10px;
}
.loot-pre .hl { color: var(--accent-2); }

/* Loot record modal — wider */
.loot-modal {
  width: min(1040px, 96vw);
  max-height: 94vh;
  overflow-y: auto;
}

/* Screenshot viewer inside loot modal */
.loot-screenshot {
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #05070b;
  margin-top: 12px;
  display: block;
}

/* Credential table inside loot modal */
.cred-table td:nth-child(3) {
  color: var(--accent-2);
  font-family: var(--mono);
  font-size: 12px;
}

/* IP badge in victim header */
.ip-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-family: var(--mono);
  color: var(--text-2);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 9px;
}
.ip-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); flex: none; }

/* Telegram config info box */
.tg-info-box {
  background: rgba(45,212,191,0.05);
  border: 1px solid rgba(45,212,191,0.22);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.6;
}
.tg-info-box strong { color: var(--accent); }
.tg-info-box .cmd { color: var(--accent-2); font-family: var(--mono); background: rgba(0,0,0,0.3); padding: 1px 5px; border-radius: 4px; }

/* Panel IP auto-detect banner */
.ip-detect-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(96,165,250,0.07);
  border: 1px solid rgba(96,165,250,0.22);
  border-radius: var(--r-sm);
  font-size: 12.5px;
  color: var(--text-2);
  margin-bottom: 14px;
}
.ip-detect-banner .copy-ip {
  margin-left: auto;
  flex: none;
}

/* Loot filter strip */
.loot-filter-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Loot count badge on Loot Vault nav item */
.loot-badge {
  margin-left: auto;
  font-size: 10px;
  background: rgba(251,191,36,0.18);
  color: var(--warn);
  border-radius: 999px;
  padding: 1px 7px;
  font-family: var(--mono);
  font-weight: 700;
}

/* Telegram command reference card */
.tg-cmd-table td:first-child {
  font-family: var(--mono);
  color: var(--accent-2);
  font-size: 12px;
  white-space: nowrap;
}

/* Victim geo chip */
.geo-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--muted);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 2px 8px;
}
