:root {
  --bg: #0b0d12;
  --panel: #151922;
  --panel-2: #1d2330;
  --line: #262d3b;
  --text: #f2f5fa;
  --muted: #98a2b3;
  --accent: #6c5ce7;
  --accent-2: #a29bfe;
  --ok: #2ed573;
  --warn: #ffb142;
  --err: #ff5c7a;
  --radius: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: radial-gradient(1200px 700px at 15% -10%, #1b1f3a 0%, var(--bg) 55%) fixed;
  color: var(--text);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 10px; line-height: 1.2; }
h1 { font-size: 34px; letter-spacing: -0.5px; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
p { margin: 0 0 12px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }

.top {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 13, 18, 0.75);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
  flex-wrap: wrap;
}
.brand { font-weight: 800; letter-spacing: 2px; color: var(--text); font-size: 18px; }
.brand span { color: var(--accent-2); }
.top nav { display: flex; gap: 16px; flex: 1; flex-wrap: wrap; }
.top nav a { color: var(--muted); font-weight: 500; }
.top nav a:hover { color: var(--text); text-decoration: none; }
.right { display: flex; align-items: center; gap: 12px; }
.who { color: var(--muted); font-size: 13px; }

main { width: min(1180px, 100% - 40px); margin: 28px auto; flex: 1; }
footer {
  width: min(1180px, 100% - 40px);
  margin: 20px auto 28px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.card {
  background: linear-gradient(180deg, rgba(29, 35, 48, 0.85), rgba(21, 25, 34, 0.92));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}
.card h2 { margin-bottom: 14px; }
.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 22px; }
.narrow { max-width: 520px; margin: 0 auto; }

.hero {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 28px;
  align-items: center;
  padding: 10px 0 8px;
}
.hero h1 { font-size: 44px; max-width: 620px; }
.login-card { max-width: 420px; justify-self: end; width: 100%; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-2);
  margin-bottom: 10px;
}
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; word-break: break-all; }
.right { text-align: right; }

.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row-form input, .row-form select { flex: 1; min-width: 140px; }

label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
input, select, textarea {
  width: 100%;
  background: #0e121b;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  font: inherit;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: white;
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform .08s, filter .15s;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.ghost {
  background: transparent;
  color: var(--accent-2);
  border: 1px solid var(--line);
}
.btn.small { padding: 7px 12px; font-size: 13px; }
.link {
  background: none;
  border: 0;
  color: var(--accent-2);
  font: inherit;
  cursor: pointer;
  padding: 0;
}
.link.danger { color: var(--err); }

.alert {
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  background: var(--panel);
}
.alert.ok { border-color: rgba(46, 213, 115, 0.35); color: #b9f6ce; background: rgba(46, 213, 115, 0.08); }
.alert.err { border-color: rgba(255, 92, 122, 0.35); color: #ffc2cd; background: rgba(255, 92, 122, 0.08); }

.device-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.device-head h1 { margin-bottom: 6px; }

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
}
.badge.active, .badge.paid, .badge.redeemed { color: #b9f6ce; background: rgba(46, 213, 115, 0.12); border-color: rgba(46, 213, 115, 0.3); }
.badge.trial { color: #ffe0a3; background: rgba(255, 177, 66, 0.12); border-color: rgba(255, 177, 66, 0.3); }
.badge.expired, .badge.unused { color: #ffc2cd; background: rgba(255, 92, 122, 0.12); border-color: rgba(255, 92, 122, 0.3); }
.badge.plan { color: var(--accent-2); background: rgba(108, 92, 231, 0.14); border-color: rgba(108, 92, 231, 0.35); }

table { width: 100%; border-collapse: collapse; margin: 6px 0 14px; }
th, td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); font-weight: 700; }
tr:last-child td { border-bottom: 0; }
td .btn { margin-top: 2px; }
td.neg { color: var(--err); font-weight: 700; }
td.pos { color: var(--ok); font-weight: 700; }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.plan {
  background: #10141d;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
}
.plan h3 { margin-bottom: 4px; }
.price { font-size: 22px; font-weight: 800; color: var(--accent-2); margin: 0 0 6px; }
.plan .btn { width: 100%; margin-top: 8px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat span { font-size: 30px; font-weight: 800; letter-spacing: -1px; }
.stat small { color: var(--muted); text-transform: uppercase; letter-spacing: 1px; font-size: 10px; }

.list { margin: 0; padding-left: 18px; color: var(--muted); }
.list li { margin-bottom: 6px; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; }
  .login-card { justify-self: stretch; max-width: none; }
  .top { gap: 12px; }
  .top nav { order: 3; width: 100%; }
  main, footer { width: calc(100% - 24px); }
}
