:root {
  --bg: #0c0618;
  --bg2: #160b2e;
  --card: rgba(12, 6, 24, 0.82);
  --line: #6d28d9;
  --accent: #c026d3;
  --hot: #e879f9;
  --text: #f5f3ff;
  --muted: #c4b5fd;
  --danger: #ff6b9d;
  --ok: #4ade80;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(192, 38, 211, .35), transparent 60%),
    radial-gradient(900px 400px at 100% 0%, rgba(109, 40, 217, .35), transparent 55%),
    var(--bg);
}
a { color: var(--hot); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 980px; margin: 0 auto; padding: 24px 20px 64px; }
header.nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 36px;
}
.brand { font-weight: 800; letter-spacing: .12em; font-size: 18px; color: var(--hot); text-shadow: 0 0 18px #c026d3; }
.nav-links { display: flex; gap: 16px; font-size: 14px; color: var(--muted); }
.hero h1 { font-size: 42px; margin: 0 0 12px; }
.hero p { color: var(--muted); max-width: 520px; line-height: 1.5; }
.actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 0 40px rgba(192, 38, 211, .12);
  max-width: 440px;
}
.card.wide { max-width: 720px; }
h2 { margin: 0 0 8px; }
.sub { color: var(--muted); margin: 0 0 22px; font-size: 14px; }
label { display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--hot); margin: 14px 0 6px; }
input {
  width: 100%; padding: 12px 14px; border-radius: 8px;
  border: 1px solid var(--line); background: rgba(12, 6, 24, 0.82); color: var(--text);
  font-size: 15px;
}
input:focus { outline: none; border-color: var(--hot); box-shadow: 0 0 14px rgba(192, 38, 211, .6); }
.btn {
  display: inline-block; border: 0; cursor: pointer; border-radius: 8px;
  padding: 12px 18px; font-weight: 700; font-size: 15px;
  background: var(--accent); color: #1a0524;
  box-shadow: 0 0 18px rgba(192, 38, 211, .7);
}
.btn:hover { background: var(--hot); }
.btn.ghost { background: transparent; color: var(--muted); box-shadow: none; border: 1px solid var(--line); }
.btn.full { width: 100%; margin-top: 18px; }
.msg { margin-top: 14px; font-size: 14px; color: var(--muted); }
.msg.err { color: var(--danger); }
.msg.ok { color: var(--ok); }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stat {
  border: 1px solid var(--line); border-radius: 12px; padding: 16px;
  background: rgba(22, 11, 46, .6);
}
.stat b { display: block; font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; background: #2a1644; }
.badge.on { background: #14532d; color: var(--ok); }
.badge.off { background: #4c0519; color: var(--danger); }
.badge.warn { background: #3b2a08; color: #fbbf24; }
.wrap-wide { max-width: 1180px; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 12px; }
table.data th, table.data td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #3b1d6e; vertical-align: top; }
table.data th { color: var(--muted); font-size: 11px; letter-spacing: .06em; }
table.data tr:hover td { background: rgba(109, 40, 217, .15); }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
.row-actions > div { flex: 1; min-width: 140px; }
.keys-once { background: #1a0a2e; border: 1px dashed var(--hot); padding: 12px; border-radius: 8px; margin-top: 12px; white-space: pre-wrap; font-family: Consolas, monospace; font-size: 13px; }
.btn.tiny { padding: 6px 10px; font-size: 12px; width: auto; margin-top: 0; }
.btn.danger { background: #7f1d1d; color: #fecaca; box-shadow: 0 0 12px rgba(239, 68, 68, .35); }
.btn.danger:hover { background: #991b1b; }
.btn.ghost.tiny { padding: 6px 10px; font-size: 12px; }
.actions-cell { display: flex; gap: 6px; flex-wrap: wrap; }
.dev-toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
footer { margin-top: 48px; color: #7c3aed; font-size: 12px; }
.profile {
  display: flex; align-items: center; gap: 16px; margin-bottom: 22px;
}
.avatar {
  width: 72px; height: 72px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--hot); box-shadow: 0 0 16px rgba(192, 38, 211, .5);
  background: #160b2e;
}
.gear {
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line);
  background: rgba(22, 11, 46, .8); color: var(--hot); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.gear:hover { border-color: var(--hot); }
.lic-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.lic-row .btn { flex-shrink: 0; }
.overlay {
  position: fixed; inset: 0; background: rgba(6, 2, 14, .72);
  display: none; align-items: center; justify-content: center; padding: 16px; z-index: 40;
}
.overlay.open { display: flex; }
.modal {
  width: min(720px, 100%); background: var(--bg2); border: 1px solid var(--line);
  border-radius: 16px; padding: 22px; max-height: 90vh; overflow: auto;
  box-shadow: 0 0 40px rgba(192, 38, 211, .25);
}
.modal.small { width: min(420px, 100%); }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.plan {
  border: 1px solid var(--line); border-radius: 12px; padding: 16px; cursor: pointer;
  background: rgba(12, 6, 24, .6);
}
.plan:hover, .plan.pick { border-color: var(--hot); box-shadow: 0 0 14px rgba(192, 38, 211, .4); }
.plan h3 { margin: 0 0 6px; }
.plan .price { color: var(--hot); font-weight: 700; font-size: 20px; }
.avatars { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 18px; }
.avatars img {
  width: 64px; height: 64px; border-radius: 50%; object-fit: cover; cursor: pointer;
  border: 2px solid transparent;
}
.avatars img.pick { border-color: var(--hot); }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.x { background: none; border: 0; color: var(--muted); font-size: 22px; cursor: pointer; }

/* Full-screen auth gate — background covers entire viewport */
body.auth-page {
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;
  margin: 0;
  padding: 0;
  background: #070414;
}
.auth-shell {
  position: relative;
  width: 100vw;
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;
  background: #070414;
}
.auth-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #070414;
}
.auth-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  opacity: 0;
  transition: opacity 1.6s cubic-bezier(0.45, 0, 0.2, 1);
  pointer-events: none;
}
.auth-slide.is-on {
  opacity: 1;
}
.auth-art-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(7, 4, 20, 0.1) 0%,
    rgba(7, 4, 20, 0.05) 40%,
    rgba(7, 4, 20, 0.65) 72%,
    rgba(7, 4, 20, 0.94) 100%
  );
}
.auth-slide-dots {
  position: absolute;
  left: 32px;
  bottom: 32px;
  z-index: 3;
  display: flex;
  gap: 8px;
}
.auth-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .28);
  transition: transform .35s ease, background .35s ease, box-shadow .35s ease;
}
.auth-dot.is-on {
  background: var(--hot);
  box-shadow: 0 0 12px rgba(232, 121, 249, .85);
  transform: scale(1.25);
}
.auth-panel {
  position: relative;
  z-index: 3;
  margin-left: auto;
  width: min(500px, 100%);
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 24px 44px 28px 40px;
  background: transparent;
  border: none;
}
.auth-panel-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.auth-brand-link {
  font-size: 12px;
  color: #a78bfa;
  text-decoration: none;
}
.auth-brand-link:hover { color: var(--hot); text-decoration: none; }
.auth-reg-btn {
  padding: 8px 16px;
  font-size: 13px;
  text-decoration: none;
  background: transparent;
  color: var(--hot);
  border: 1px solid var(--hot);
  box-shadow: 0 0 14px rgba(192, 38, 211, .45);
}
.auth-reg-btn:hover {
  background: var(--accent);
  color: #1a0524;
  text-decoration: none;
  border-color: var(--accent);
}
.auth-panel-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-title {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: .04em;
  text-shadow: 0 0 16px rgba(192, 38, 211, .9);
}
.auth-sub {
  margin: 8px 0 6px;
  color: #c4b5fd;
  font-size: 13px;
}
.auth-tagline {
  margin: 0 0 22px;
  color: #7c3aed;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
}
.auth-panel label:not(.auth-check) {
  margin-top: 0;
}
.auth-panel label + input { margin-bottom: 0; }
.auth-panel label[for="password"] { margin-top: 16px; }
.auth-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 0;
  font-size: 13px;
  color: #a78bfa;
  font-weight: 500;
  letter-spacing: 0;
  cursor: pointer;
}
.auth-check input {
  width: auto;
  margin: 0;
  accent-color: var(--hot);
}
.auth-panel .btn.full {
  margin-top: 22px;
  height: 44px;
  letter-spacing: .04em;
}
.auth-forgot {
  margin: 16px 0 0;
  font-size: 13px;
  color: #a78bfa;
}
.auth-panel-foot {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #6d28d9;
  color: #c4b5fd;
  font-size: 11px;
  font-weight: 600;
}

@media (max-width: 720px) {
  .hero h1 { font-size: 30px; }
  .plans { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  .card { max-width: none; }
  body.auth-page { height: auto; min-height: 100vh; overflow: auto; }
  .auth-shell { min-height: 100vh; height: auto; }
  .auth-art { position: fixed; min-height: 100vh; }
  .auth-art-overlay {
    background: linear-gradient(
      180deg,
      rgba(7, 4, 20, 0.2) 0%,
      rgba(7, 4, 20, 0.75) 55%,
      rgba(7, 4, 20, 0.95) 100%
    );
  }
  .auth-panel {
    margin-left: 0;
    width: 100%;
    min-height: 100vh;
    height: auto;
    padding: 20px 20px 28px;
  }
  .auth-slide-dots { left: 20px; bottom: auto; top: 20px; }
}

