/* Reaper — design system */
:root {
  --bg: #06080c;
  --bg-2: #0a0d13;
  --surface: #0e121a;
  --surface-2: #131926;
  --surface-3: #192132;
  --border: #1d2535;
  --border-2: #2a3550;
  --text: #e8edf6;
  --text-2: #a3aec2;
  --text-3: #6b778d;
  --blue: #3b82f6;
  --blue-2: #60a5fa;
  --blue-3: #1d4ed8;
  --cyan: #22d3ee;
  --blue-glow: rgba(59, 130, 246, .35);
  --blue-soft: rgba(59, 130, 246, .12);
  --green: #34d399;
  --amber: #fbbf24;
  --red: #f87171;
  --red-soft: rgba(248, 113, 113, .12);
  --discord: #5865f2;
  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --body: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  --chamfer: 12px;
  --radius: 4px;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--blue); color: #fff; }
:focus-visible { outline: 2px solid var(--blue-2); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--mono); }
.muted { color: var(--text-2); }
.dim { color: var(--text-3); }
.hidden { display: none !important; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(6, 8, 12, .82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font: 800 24px/1 var(--display); letter-spacing: .06em; text-transform: uppercase; }
.brand svg { width: 30px; height: 30px; }
.brand b { color: var(--blue-2); font-weight: 800; }
.nav { display: flex; gap: 4px; height: 100%; }
.nav a {
  position: relative; display: flex; align-items: center; padding: 0 14px;
  font: 700 15px/1 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--text-2);
  transition: color .15s;
}
.nav a:hover, .nav a.active { color: var(--text); }
.nav a.active::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 2px; background: var(--blue); box-shadow: 0 0 12px var(--blue); }
.nav a.discord { color: #8b95ff; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.status-pill {
  white-space: nowrap;
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px;
  border: 1px solid var(--border-2); background: var(--surface); font: 600 13px/1 var(--mono); color: var(--text-2);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); flex: none; }
.dot.on { background: var(--green); box-shadow: 0 0 0 3px rgba(52, 211, 153, .18); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(52, 211, 153, 0); } }
.avatar { width: 36px; height: 36px; image-rendering: pixelated; background: var(--surface-3); border: 1px solid var(--border-2); }
.menu-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--border-2); width: 40px; height: 40px; cursor: pointer; }
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after { display: block; width: 18px; height: 2px; background: var(--text); margin: 0 auto; position: relative; content: ''; }
.menu-toggle span::before { position: absolute; top: -6px; }
.menu-toggle span::after { position: absolute; top: 6px; }

/* ---------- Buttons ---------- */
.btn {
  --c: var(--surface-3);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 46px; padding: 0 22px; border: 0; cursor: pointer; white-space: nowrap;
  background: var(--c); color: var(--text);
  font: 700 16px/1 var(--display); letter-spacing: .1em; text-transform: uppercase;
  clip-path: polygon(0 0, calc(100% - var(--chamfer)) 0, 100% var(--chamfer), 100% 100%, var(--chamfer) 100%, 0 calc(100% - var(--chamfer)));
  transition: filter .15s, transform .15s, background .15s;
}
.btn:hover { filter: brightness(1.15); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; filter: none; }
.btn svg { width: 18px; height: 18px; }
.btn-primary { --c: var(--blue); box-shadow: 0 0 0 1px var(--blue-2) inset; }
.btn-primary:hover { --c: #4b8ff8; }
.btn-discord { --c: var(--discord); }
.btn-ghost { --c: transparent; box-shadow: 0 0 0 1px var(--border-2) inset; clip-path: none; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { --c: #b91c1c; }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; --chamfer: 8px; }
.btn-xs { height: 28px; padding: 0 10px; font-size: 12px; --chamfer: 6px; letter-spacing: .08em; }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--border); }
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 70% at 80% 40%, rgba(37, 99, 235, .22), transparent 70%),
    radial-gradient(ellipse 40% 50% at 10% 100%, rgba(34, 211, 238, .08), transparent 70%);
}
.hero-grid {
  position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 80% at 70% 40%, #000 20%, transparent 75%);
}
.hero-mark { position: absolute; right: -80px; top: 50%; transform: translateY(-50%); width: 640px; opacity: .07; pointer-events: none; }
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; padding-top: 88px; padding-bottom: 72px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 22px; padding: 6px 12px;
  border: 1px solid var(--border-2); background: rgba(14, 18, 26, .7);
  font: 600 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-2);
}
.eyebrow b { color: var(--blue-2); font-weight: 600; }
.hero h1 { margin: 0; font: 800 clamp(64px, 10vw, 128px)/.86 var(--display); letter-spacing: -.01em; text-transform: uppercase; }
.hero h1 .accent {
  display: block;
  background: linear-gradient(90deg, var(--blue) 0%, var(--blue-2) 45%, var(--cyan) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 28px rgba(59, 130, 246, .35));
}
.hero p.lead { max-width: 520px; margin: 26px 0 34px; font-size: 18px; color: var(--text-2); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 26px; font-size: 14px; color: var(--text-2); }
.hero-meta strong { color: var(--text); font-family: var(--mono); }
.hero-meta .sep { width: 1px; height: 14px; background: var(--border-2); }

/* Fake client window on hero */
.client-window {
  position: relative; background: rgba(10, 13, 19, .92); border: 1px solid var(--border-2);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8), 0 0 0 1px rgba(59, 130, 246, .08), 0 0 80px -30px var(--blue-glow);
}
.client-window::before { content: ''; position: absolute; left: -1px; top: -1px; width: 56px; height: 2px; background: var(--blue); box-shadow: 0 0 14px var(--blue); }
.cw-bar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.cw-bar .title { font: 800 16px/1 var(--display); letter-spacing: .12em; text-transform: uppercase; }
.cw-bar .title b { color: var(--blue-2); }
.cw-bar .tag { margin-left: auto; font: 600 11px/1 var(--mono); padding: 5px 8px; border: 1px solid var(--blue-3); color: var(--blue-2); background: var(--blue-soft); }
.cw-body { display: grid; grid-template-columns: 132px 1fr; min-height: 300px; }
.cw-cats { border-right: 1px solid var(--border); padding: 10px 8px; display: flex; flex-direction: column; gap: 2px; }
.cw-cats button {
  all: unset; cursor: pointer; padding: 9px 12px; font: 700 14px/1 var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3);
  border-left: 2px solid transparent;
}
.cw-cats button.active { color: var(--text); border-color: var(--blue); background: linear-gradient(90deg, var(--blue-soft), transparent); }
.cw-mods { padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.cw-mod { display: flex; align-items: center; justify-content: space-between; padding: 11px 14px; background: var(--surface); border: 1px solid var(--border); }
.cw-mod span { font-weight: 600; font-size: 15px; }
.cw-mod small { display: block; color: var(--text-3); font-size: 12px; font-weight: 400; }

/* ---------- Toggle ---------- */
.toggle { position: relative; width: 38px; height: 20px; flex: none; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.toggle i { position: absolute; inset: 0; background: var(--surface-3); border: 1px solid var(--border-2); transition: background .15s, border-color .15s; }
.toggle i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; background: var(--text-3); transition: transform .15s, background .15s; }
.toggle input:checked + i { background: var(--blue-soft); border-color: var(--blue); }
.toggle input:checked + i::after { transform: translateX(18px); background: var(--blue-2); box-shadow: 0 0 10px var(--blue); }
.toggle input:focus-visible + i { outline: 2px solid var(--blue-2); outline-offset: 2px; }

/* ---------- Stat strip ---------- */
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--border); background: var(--surface); margin-top: -1px; }
.stat-strip > div { padding: 22px 24px; border-right: 1px solid var(--border); }
.stat-strip > div:last-child { border-right: 0; }
.label { font: 600 11px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); }
.stat-strip .value { margin-top: 10px; font: 800 34px/1 var(--display); letter-spacing: .02em; }
.stat-strip .value small { font-size: 16px; color: var(--text-3); margin-left: 4px; }

/* ---------- Sections ---------- */
section.block { padding: 110px 0; position: relative; }
section.block.alt { background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 44px; }
.section-head h2, .page-title { margin: 0; font: 800 clamp(40px, 6vw, 60px)/.95 var(--display); text-transform: uppercase; letter-spacing: .01em; }
.section-head h2 em, .page-title em { font-style: normal; color: var(--blue-2); }
.section-head p { margin: 12px 0 0; color: var(--text-2); max-width: 520px; }
.index { font: 600 12px/1 var(--mono); color: var(--blue-2); letter-spacing: .16em; margin-bottom: 14px; display: block; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); }
.feature { background: var(--bg); padding: 34px 30px; position: relative; transition: background .2s; }
.feature:hover { background: var(--surface); }
.feature:hover .ico { color: var(--blue-2); border-color: var(--blue); box-shadow: 0 0 20px -6px var(--blue); }
.feature .ico { width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid var(--border-2); color: var(--text-2); margin-bottom: 22px; transition: all .2s; }
.feature .ico svg { width: 22px; height: 22px; }
.feature h3 { margin: 0 0 8px; font: 700 24px/1.1 var(--display); text-transform: uppercase; letter-spacing: .04em; }
.feature p { margin: 0; color: var(--text-2); font-size: 15px; }

.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.plan {
  position: relative; padding: 38px 36px; background: var(--surface); border: 1px solid var(--border);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px));
}
.plan.featured { background: linear-gradient(160deg, rgba(37, 99, 235, .16), var(--surface) 55%); border-color: var(--blue-3); }
.plan .badge { position: absolute; top: 22px; right: 36px; }
.plan h3 { margin: 0; font: 800 44px/1 var(--display); text-transform: uppercase; }
.plan h3 b { color: var(--blue-2); }
.plan .tagline { color: var(--text-2); margin: 8px 0 26px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 32px; display: grid; gap: 12px; }
.plan li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; }
.plan li svg { width: 18px; height: 18px; color: var(--blue-2); flex: none; margin-top: 3px; }
.plan li.off { color: var(--text-3); }
.plan li.off svg { color: var(--text-3); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
.step { padding: 28px; border: 1px solid var(--border); background: var(--surface); position: relative; }
.step::before {
  counter-increment: step; content: '0' counter(step);
  display: block; font: 800 64px/1 var(--display); color: transparent; -webkit-text-stroke: 1px var(--border-2); margin-bottom: 18px;
}
.step h3 { margin: 0 0 6px; font: 700 22px/1.1 var(--display); text-transform: uppercase; letter-spacing: .04em; }
.step p { margin: 0; color: var(--text-2); font-size: 15px; }

.remote-block { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.check-list { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 14px; }
.check-list li { display: flex; gap: 12px; color: var(--text-2); }
.check-list li::before { content: ''; width: 8px; height: 8px; margin-top: 9px; background: var(--blue); box-shadow: 0 0 10px var(--blue); flex: none; }

.faq { display: grid; gap: 10px; max-width: 860px; }
.faq details { border: 1px solid var(--border); background: var(--surface); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 24px; font: 700 20px/1.2 var(--display); text-transform: uppercase; letter-spacing: .04em; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--blue-2); font-family: var(--mono); }
.faq details[open] summary::after { content: '–'; }
.faq details[open] { border-color: var(--border-2); }
.faq details p { margin: 0; padding: 0 24px 22px; color: var(--text-2); }

.cta-band { border: 1px solid var(--blue-3); background: linear-gradient(110deg, rgba(37, 99, 235, .25), rgba(14, 18, 26, .9) 60%); padding: 48px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { margin: 0; font: 800 44px/1 var(--display); text-transform: uppercase; }

.site-footer { border-top: 1px solid var(--border); padding: 36px 0; color: var(--text-3); font-size: 14px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; align-items: center; }
.site-footer nav { display: flex; gap: 20px; }
.site-footer a:hover { color: var(--text); }

/* ---------- Cards / panels ---------- */
.card { background: var(--surface); border: 1px solid var(--border); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.card-head h2, .card-head h3 { margin: 0; font: 700 20px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; }
.card-body { padding: 22px; }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; font: 600 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; border: 1px solid var(--border-2); color: var(--text-2); white-space: nowrap; }
.badge.blue { border-color: var(--blue-3); color: var(--blue-2); background: var(--blue-soft); }
.badge.green { border-color: rgba(52, 211, 153, .4); color: var(--green); background: rgba(52, 211, 153, .08); }
.badge.red { border-color: rgba(248, 113, 113, .4); color: var(--red); background: var(--red-soft); }
.badge.amber { border-color: rgba(251, 191, 36, .4); color: var(--amber); background: rgba(251, 191, 36, .08); }
.empty { padding: 36px 20px; text-align: center; color: var(--text-3); font-size: 14px; }

/* ---------- Forms ---------- */
.field { display: grid; gap: 8px; margin-bottom: 16px; }
.field label { font: 600 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.input, select.input, textarea.input {
  width: 100%; height: 46px; padding: 0 14px; background: var(--bg-2); border: 1px solid var(--border-2); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
textarea.input { height: auto; min-height: 90px; padding: 12px 14px; resize: vertical; }
.input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.input.sm { height: 34px; font-size: 14px; }
.input::placeholder { color: var(--text-3); }
.form-error { min-height: 20px; color: var(--red); font-size: 14px; margin: 4px 0 10px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }

/* ---------- Auth page ---------- */
.auth-page { min-height: calc(100vh - 64px); display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { position: relative; overflow: hidden; border-right: 1px solid var(--border); display: flex; flex-direction: column; justify-content: flex-end; padding: 56px; }
.auth-side .hero-grid { opacity: .6; }
.auth-side h1 { position: relative; margin: 0; font: 800 88px/.86 var(--display); text-transform: uppercase; }
.auth-side p { position: relative; color: var(--text-2); max-width: 420px; }
.auth-main { display: grid; place-items: center; padding: 48px 24px; }
.auth-box { width: 100%; max-width: 420px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--border); margin-bottom: 28px; }
.tabs button, .tabs a { all: unset; cursor: pointer; text-align: center; padding: 14px; font: 700 16px/1 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.tabs button.active, .tabs a.active { background: var(--surface-2); color: var(--text); box-shadow: inset 0 -2px 0 var(--blue); }

/* ---------- App shell (painel/admin) ---------- */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 64px); }
.sidebar { border-right: 1px solid var(--border); background: var(--bg-2); padding: 22px 14px; position: sticky; top: 64px; height: calc(100vh - 64px); overflow-y: auto; }
.sidebar .who { display: flex; gap: 12px; align-items: center; padding: 6px 8px 22px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.sidebar .who img { width: 40px; height: 40px; image-rendering: pixelated; }
.sidebar .who b { display: block; font: 700 18px/1.1 var(--display); letter-spacing: .04em; }
.sidebar .who small { color: var(--text-3); font-size: 12px; }
.side-nav { display: grid; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; color: var(--text-2); font: 700 15px/1 var(--display); letter-spacing: .1em; text-transform: uppercase; border-left: 2px solid transparent; }
.side-nav a svg { width: 18px; height: 18px; }
.side-nav a:hover { color: var(--text); background: var(--surface); }
.side-nav a.active { color: var(--text); border-color: var(--blue); background: linear-gradient(90deg, var(--blue-soft), transparent); }
.side-nav .count { margin-left: auto; font: 600 11px/1 var(--mono); color: var(--blue-2); }
.side-sep { height: 1px; background: var(--border); margin: 14px 0; }
.content { padding: 34px 40px 80px; min-width: 0; }
.content-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.page-title { font-size: 46px; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.kpi { padding: 20px 22px; background: var(--surface); border: 1px solid var(--border); position: relative; }
.kpi .value { margin-top: 12px; font: 800 38px/1 var(--display); }
.kpi .sub { margin-top: 6px; font-size: 13px; color: var(--text-3); }
.kpi.accent::before { content: ''; position: absolute; left: -1px; top: -1px; bottom: -1px; width: 2px; background: var(--blue); box-shadow: 0 0 12px var(--blue); }

.product-card { display: flex; gap: 18px; align-items: center; padding: 22px; border: 1px solid var(--border); background: var(--surface); }
.product-card.active { border-color: var(--blue-3); background: linear-gradient(120deg, rgba(37, 99, 235, .14), var(--surface) 60%); }
.product-card .pi { width: 52px; height: 52px; display: grid; place-items: center; background: var(--surface-3); border: 1px solid var(--border-2); flex: none; }
.product-card.active .pi { border-color: var(--blue); color: var(--blue-2); box-shadow: 0 0 22px -6px var(--blue); }
.product-card .pi svg { width: 26px; height: 26px; }
.product-card h3 { margin: 0; font: 800 26px/1 var(--display); text-transform: uppercase; letter-spacing: .03em; }
.product-card p { margin: 4px 0 0; color: var(--text-2); font-size: 14px; }
.product-card .right { margin-left: auto; text-align: right; }
.progress { height: 4px; background: var(--surface-3); margin-top: 10px; width: 160px; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--cyan)); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; padding: 12px 16px; font: 600 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--bg-2); }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: rgba(255, 255, 255, .015); }
.table tr.clickable { cursor: pointer; }
.table .user-cell { display: flex; align-items: center; gap: 10px; }
.table .user-cell img { width: 28px; height: 28px; image-rendering: pixelated; }
.table .actions { text-align: right; white-space: nowrap; }
.code { font-family: var(--mono); font-size: 13px; letter-spacing: .02em; }
.copy { all: unset; cursor: pointer; color: var(--text-3); padding: 2px 4px; }
.copy:hover { color: var(--blue-2); }
.copy svg { width: 14px; height: 14px; display: inline-block; vertical-align: -2px; }
.pager { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-3); }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.seg { display: inline-flex; border: 1px solid var(--border-2); }
.seg button { all: unset; cursor: pointer; padding: 0 12px; height: 32px; display: inline-flex; align-items: center; font: 600 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.seg button.active { background: var(--surface-3); color: var(--text); }

/* bars chart */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding-top: 10px; }
.bars .bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; height: 100%; position: relative; }
.bars .bar i { display: block; background: var(--blue); min-height: 2px; }
.bars .bar i.b { background: var(--cyan); opacity: .8; }
.bars .bar:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--surface-3); border: 1px solid var(--border-2); padding: 4px 8px; font: 500 11px/1.3 var(--mono); white-space: nowrap; z-index: 2; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--text-3); }
.legend i { display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: -1px; }

/* ---------- Remote control ---------- */
.instance { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; transition: border-color .15s; }
.instance:hover, .instance.active { border-color: var(--blue-3); }
.instance .meta { font-size: 13px; color: var(--text-3); }
.remote-layout { display: grid; grid-template-columns: 220px 1fr; border: 1px solid var(--border); background: var(--surface); min-height: 420px; }
.remote-sections { border-right: 1px solid var(--border); max-height: 620px; overflow-y: auto; padding: 8px; }
.remote-sections button { all: unset; box-sizing: border-box; display: flex; justify-content: space-between; width: 100%; cursor: pointer; padding: 9px 12px; font: 600 14px/1.2 var(--body); color: var(--text-2); border-left: 2px solid transparent; }
.remote-sections button:hover { color: var(--text); }
.remote-sections button.active { color: var(--text); border-color: var(--blue); background: var(--blue-soft); }
.remote-sections button .on { width: 7px; height: 7px; background: var(--blue-2); box-shadow: 0 0 8px var(--blue); align-self: center; }
.remote-settings { padding: 8px 18px; max-height: 620px; overflow-y: auto; }
.setting { display: flex; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.setting:last-child { border-bottom: 0; }
.setting .name { flex: 1; min-width: 0; font-size: 14px; }
.setting .name small { display: block; color: var(--text-3); font: 500 11px/1.4 var(--mono); }
.setting .input { width: 180px; }
.setting input[type=color] { width: 44px; height: 30px; padding: 0; border: 1px solid var(--border-2); background: none; cursor: pointer; }

/* ---------- Drawer / modal / toast ---------- */
.overlay { position: fixed; inset: 0; background: rgba(2, 4, 8, .7); backdrop-filter: blur(3px); z-index: 80; display: flex; justify-content: flex-end; }
.drawer { width: min(720px, 100%); height: 100%; overflow-y: auto; background: var(--bg-2); border-left: 1px solid var(--border-2); animation: slide .2s ease-out; }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
.drawer-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 14px; padding: 20px 24px; background: var(--bg-2); border-bottom: 1px solid var(--border); }
.drawer-head img { width: 48px; height: 48px; image-rendering: pixelated; }
.drawer-head h2 { margin: 0; font: 800 30px/1 var(--display); text-transform: uppercase; }
.drawer-body { padding: 24px; display: grid; gap: 20px; }
.modal-wrap { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: rgba(2, 4, 8, .7); backdrop-filter: blur(3px); padding: 16px; }
.modal { width: min(480px, 100%); background: var(--surface); border: 1px solid var(--border-2); animation: pop .15s ease-out; }
@keyframes pop { from { transform: scale(.97); opacity: 0; } }
.modal .card-body p { margin-top: 0; color: var(--text-2); }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--border); }
.icon-btn { all: unset; cursor: pointer; width: 34px; height: 34px; display: grid; place-items: center; color: var(--text-3); border: 1px solid transparent; }
.icon-btn:hover { color: var(--text); border-color: var(--border-2); }
.icon-btn svg { width: 18px; height: 18px; }
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: grid; gap: 10px; }
.toast { min-width: 260px; max-width: 380px; padding: 14px 16px; background: var(--surface-2); border: 1px solid var(--border-2); border-left: 2px solid var(--blue); font-size: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); animation: pop .15s ease-out; }
.toast.error { border-left-color: var(--red); }
.toast.success { border-left-color: var(--green); }
.keys-output { font-family: var(--mono); font-size: 13px; background: var(--bg); border: 1px solid var(--border-2); padding: 12px 14px; max-height: 260px; overflow: auto; white-space: pre; margin: 0 0 14px; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 10px 16px; font-size: 14px; }
.kv dt { color: var(--text-3); font: 600 11px/1.9 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.loading { display: grid; place-items: center; min-height: 50vh; color: var(--text-3); font: 600 13px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; }

/* ---------- 404 ---------- */
.notfound { min-height: calc(100vh - 64px); display: grid; place-items: center; text-align: center; }
.notfound h1 { margin: 0; font: 800 180px/.9 var(--display); color: transparent; -webkit-text-stroke: 2px var(--blue); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .hero .wrap, .remote-block { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--border); display: flex; gap: 2px; overflow-x: auto; padding: 8px 12px; }
  .side-nav { display: flex; gap: 2px; flex: none; }
  .side-nav a { white-space: nowrap; border-left: 0; border-bottom: 2px solid transparent; }
  .side-nav a.active { border-color: var(--blue); }
  .side-sep, .sidebar .who { display: none; }
  .content { padding: 26px 16px 60px; }
}
@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .nav, .header-actions .status-pill { display: none; }
  .menu-toggle { display: block; }
  .header-actions { margin-left: 0; }
  .site-header.open .nav { display: flex; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; background: var(--bg); border-bottom: 1px solid var(--border); height: auto; padding: 8px 0; }
  .site-header.open .nav a { padding: 14px 16px; }
  .site-header.open .nav a.active::after { display: none; }
  .hero .wrap { padding-top: 56px; padding-bottom: 48px; gap: 40px; }
  .stat-strip { grid-template-columns: 1fr 1fr; }
  .stat-strip > div:nth-child(2) { border-right: 0; }
  .stat-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .features, .plans, .steps, .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  section.block { padding: 72px 0; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .remote-layout { grid-template-columns: 1fr; }
  .remote-sections { border-right: 0; border-bottom: 1px solid var(--border); max-height: 200px; }
  .setting .input { width: 130px; }
  .cta-band { padding: 30px 22px; }
  .cw-body { grid-template-columns: 1fr; }
  .cw-cats { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--border); }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 10px; }
  .product-card { flex-wrap: wrap; }
  .product-card .right { margin-left: 0; text-align: left; width: 100%; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.accent-text { color: var(--blue-2); }
.legend .lg-a { background: var(--blue); }
.legend .lg-b { background: var(--cyan); opacity: .8; }
.mt { margin-top: 12px; }
.table tr.active td { background: var(--blue-soft); }
button.badge { cursor: pointer; background: none; }
.drawer .card-body > .row + .row { margin-top: 10px; }
.remote-sections > .input { margin-bottom: 8px; }
.row > .input { width: auto; }
.row > .input.grow, .row > .grow > .input { width: 100%; }
.drawer { overflow-x: hidden; }
.brand svg { flex: none; }
@media (max-width: 760px) {
  .site-header .wrap { gap: 10px; }
  .header-actions { margin-left: auto; }
  .header-actions .btn-ghost, .header-actions a:has(.avatar) { display: none; }
  .menu-toggle { order: 3; margin-left: 0; flex: none; }
}

/* ---------- Phones: tables become stacked cards ---------- */
@media (max-width: 760px) {
  .table-wrap { overflow: visible; }
  table.table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table thead { display: none; }
  .table tr { padding: 12px 16px; border-bottom: 1px solid var(--border); }
  .table tr:last-child { border-bottom: 0; }
  .table td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 5px 0; border: 0; text-align: right; min-height: 30px; }
  .table td[data-label]::before { content: attr(data-label); font: 600 10px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); text-align: left; flex: none; }
  .table td:not([data-label]), .table td[data-label=""] { justify-content: flex-end; }
  .table td:empty { display: none; }
  .table .actions { text-align: right; }
  .table tbody tr:hover td { background: none; }
  .toolbar .seg { overflow-x: auto; max-width: 100%; }
  .content-head .row { width: 100%; }
  .content-head .row .btn { flex: 1; }
  .page-title { font-size: 38px; }
  .kpi .value { font-size: 32px; }
  .card-head { flex-wrap: wrap; }
  .drawer-head h2 { font-size: 24px; }
  .drawer-body { padding: 16px; }
  .pager { flex-direction: column; gap: 10px; }
  .setting { flex-wrap: wrap; }
  .setting .input { width: 100%; }
  .hero h1 { font-size: clamp(56px, 19vw, 84px); }
  .stat-strip .value { font-size: 28px; }
  .modal .grid-2 { grid-template-columns: 1fr 1fr; }
  .cta-band h2 { font-size: 34px; }
}
@media (max-width: 380px) {
  .header-actions .btn-primary { display: none; }
  .plan { padding: 30px 22px; }
  .plan h3 { font-size: 36px; }
}
@media (min-width: 1600px) {
  :root { --wrap: 1320px; }
}

.nav a.nav-mobile { display: none; }
@media (max-width: 760px) {
  .site-header.open .nav a.nav-mobile { display: flex; color: var(--blue-2); border-top: 1px solid var(--border); }
  .site-header.open .nav a.nav-mobile ~ a.nav-mobile { border-top: 0; }
}

/* Header collapses to the hamburger menu on tablets too */
@media (max-width: 1000px) {
  .nav, .header-actions .status-pill { display: none; }
  .menu-toggle { display: block; order: 3; margin-left: 0; flex: none; }
  .header-actions { margin-left: auto; }
  .header-actions .btn-ghost, .header-actions a:has(.avatar) { display: none; }
  .site-header.open .nav { display: flex; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; background: var(--bg); border-bottom: 1px solid var(--border); height: auto; padding: 8px 0; }
  .site-header.open .nav a { padding: 14px 24px; }
  .site-header.open .nav a.active::after { display: none; }
  .site-header.open .nav a.nav-mobile { display: flex; color: var(--blue-2); }
}

/* ---------- Language picker ---------- */
.lang { position: relative; }
.lang-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px; background: var(--surface); border: 1px solid var(--border-2); cursor: pointer; font: 700 13px/1 var(--mono); color: var(--text-2); }
.lang-btn:hover, .lang.open .lang-btn { color: var(--text); border-color: var(--blue-3); }
.lang-btn svg { width: 15px; height: 15px; }
.lang-menu { display: none; position: absolute; right: 0; top: calc(100% + 6px); min-width: 170px; background: var(--surface-2); border: 1px solid var(--border-2); box-shadow: 0 16px 40px rgba(0, 0, 0, .55); z-index: 60; padding: 4px; }
.lang.open .lang-menu { display: grid; }
.lang-menu button { all: unset; cursor: pointer; display: flex; gap: 10px; align-items: center; padding: 9px 10px; font-size: 14px; color: var(--text-2); }
.lang-menu button b { font: 700 11px/1 var(--mono); color: var(--text-3); width: 22px; }
.lang-menu button:hover { background: var(--surface-3); color: var(--text); }
.lang-menu button.active { color: var(--text); background: var(--blue-soft); }
.lang-menu button.active b { color: var(--blue-2); }
.tabs a { display: block; }
