:root {
  --bg: #120909;
  --bg-soft: #1c1010;
  --card: #231414;
  --card-edge: #3a2222;
  --accent: #d53a2e;
  --accent-soft: #ff8a7a;
  --burgundy: #9e2b25;
  --text: #f7ecec;
  --muted: #b99d9d;
  --green: #3ddc84;
  --red: #ff6b7a;
  --orange: #f0a83a;
  --header-bg: rgba(18,9,9,.88);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.55; min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
a { color: var(--accent-soft); text-decoration: none; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

/* ── Navbar ── */
header {
  position: sticky; top: 0; z-index: 10;
  background: var(--header-bg); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--card-edge);
}
.nav { display: flex; align-items: center; gap: 14px; padding: 12px 0; }
.nav .brand { display: flex; align-items: center; gap: 10px; color: inherit; font-weight: 800; letter-spacing: .02em; white-space: nowrap; }
.nav .brand img { height: 34px; width: 34px; border-radius: 8px; }
.nav .brand span { color: var(--accent-soft); }
.nav nav { margin-left: auto; display: flex; gap: 18px; align-items: center; font-size: .95rem; flex-wrap: wrap; }
.nav nav a { color: var(--muted); }
.nav nav a:hover { color: var(--text); }
.nav nav a.btn-primary, .nav nav a.btn-primary:hover { color: #fff; }
.chip {
  background: rgba(213,58,46,.16); color: var(--accent-soft);
  padding: 4px 12px; border-radius: 99px; font-weight: 700; font-size: .85rem;
}

/* ── Buttons ── */
.btn {
  display: inline-block; padding: 12px 26px; border-radius: 10px;
  font-weight: 600; font-size: .98rem; border: none; cursor: pointer;
  transition: transform .12s, box-shadow .12s; font-family: inherit;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 24px rgba(213,58,46,.35); }
.btn-ghost { border: 1px solid var(--card-edge); color: var(--text); background: var(--bg-soft); }
.btn-sm { padding: 8px 16px; font-size: .88rem; }
.btn-xs { padding: 5px 10px; font-size: .78rem; border-radius: 8px; }
.btn-danger { background: rgba(255,107,122,.14); color: var(--red); border: 1px solid rgba(255,107,122,.4); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-green { background: rgba(61,220,132,.14); color: var(--green); border: 1px solid rgba(61,220,132,.4); }
.btn-green:hover { background: var(--green); color: #082; }
.btn-wa { background: #1faa53; color: #fff; }
.btn-wa:hover { background: #25d366; color: #fff; }
.btn[disabled] { opacity: .45; cursor: default; }

/* ── Hero / landing ── */
.hero {
  padding: 80px 0 60px; text-align: center;
  background:
    radial-gradient(700px 340px at 20% 0%, rgba(213,58,46,.24), transparent 70%),
    radial-gradient(600px 300px at 85% 20%, rgba(158,43,37,.18), transparent 70%);
}
.hero img.lion { width: 132px; height: 132px; border-radius: 28px; box-shadow: 0 16px 50px rgba(213,58,46,.35); }
.hero h1 { font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.15; margin-top: 22px; }
.hero h1 span { color: var(--accent-soft); }
.hero p { max-width: 640px; margin: 14px auto 0; color: var(--muted); font-size: 1.08rem; }
.hero .cta { margin-top: 30px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero .dev { margin-top: 26px; color: var(--accent-soft); font-weight: 700; letter-spacing: .06em; font-size: .85rem; text-transform: uppercase; }
section { padding: 56px 0; }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  background: linear-gradient(135deg, rgba(213,58,46,.12), rgba(213,58,46,.02)), var(--card);
  border: 1px solid var(--card-edge); border-radius: 16px; padding: 24px;
  display: flex; flex-direction: column; gap: 10px;
}
.card h3 { font-size: 1.1rem; }
.card p { color: var(--muted); font-size: .92rem; }

/* ── Auth forms ── */
.auth-wrap { display: flex; justify-content: center; padding: 60px 20px; }
.auth-card {
  width: 100%; max-width: 440px;
  background: var(--card); border: 1px solid var(--card-edge);
  border-radius: 18px; padding: 32px;
}
.auth-card h2 { text-align: center; margin-bottom: 6px; }
.auth-card .sub { text-align: center; color: var(--muted); font-size: .92rem; margin-bottom: 22px; }
.auth-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.auth-brand img { width: 48px; height: 48px; border-radius: 12px; }
.auth-brand-name { font-weight: 800; font-size: 1.15rem; }
.auth-brand-sub { color: var(--muted); font-size: .85rem; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: .84rem; color: var(--muted); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 14px; border-radius: 10px;
  border: 1px solid var(--card-edge); background: var(--bg-soft);
  color: var(--text); font-size: .95rem; outline: none; font-family: inherit;
}
.field textarea { min-height: 120px; font-family: Consolas, "Cascadia Mono", monospace; font-size: .85rem; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.field .hint { color: var(--muted); font-size: .78rem; margin-top: 4px; }
.auth-card .btn { width: 100%; margin-top: 6px; }
.auth-card .alt { text-align: center; margin-top: 16px; font-size: .9rem; color: var(--muted); }
.error {
  background: rgba(255,107,122,.12); color: var(--red);
  border: 1px solid rgba(255,107,122,.35);
  padding: 10px 14px; border-radius: 10px; font-size: .9rem; margin-bottom: 16px;
}
.notice {
  background: rgba(61,220,132,.1); color: var(--green);
  border: 1px solid rgba(61,220,132,.35);
  padding: 10px 14px; border-radius: 10px; font-size: .9rem; margin-bottom: 16px;
}
.warn-box {
  background: rgba(240,168,58,.1); color: var(--orange);
  border: 1px solid rgba(240,168,58,.4);
  padding: 10px 14px; border-radius: 10px; font-size: .9rem; margin-bottom: 16px;
}

/* ── Dashboard / admin layout ── */
.dash { padding: 40px 0 60px; }
.admin-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 22px;
}
.admin-head h2 { font-size: 1.5rem; }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.stats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 22px; }
.stat { background: var(--card); border: 1px solid var(--card-edge); border-radius: 14px; padding: 16px 20px; }
.stat-num { font-size: 1.9rem; font-weight: 800; color: var(--accent-soft); line-height: 1.1; }
.stat-label { color: var(--muted); font-size: .85rem; margin-top: 4px; }
.stat-link { color: var(--text); display: block; transition: border-color .15s; }
.stat-link:hover { border-color: var(--accent); color: var(--text); }
.tile-grid { display: grid; gap: 18px; margin-top: 22px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.tile {
  background: linear-gradient(135deg, rgba(213,58,46,.13), rgba(213,58,46,.02)), var(--card);
  border: 1px solid var(--card-edge); border-radius: 16px;
  padding: 22px; color: var(--text); display: flex; flex-direction: column; gap: 8px;
  transition: transform .15s, border-color .15s;
}
.tile:hover { transform: translateY(-4px); border-color: var(--accent); color: var(--text); }
.tile-icon { font-size: 1.6rem; }
.tile h3 { font-size: 1.08rem; }
.tile p { color: var(--muted); font-size: .86rem; flex: 1; }
.tile-go { color: var(--accent-soft); font-weight: 700; font-size: .88rem; }

.detail-box {
  background: var(--card); border: 1px solid var(--card-edge);
  border-radius: 18px; padding: 24px; display: flex; flex-direction: column; gap: 22px; margin-bottom: 22px;
}
.detail-header { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; border-bottom: 1px solid var(--card-edge); padding-bottom: 18px; }
.detail-id { flex: 1; min-width: 240px; }
.detail-controls { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.detail-section h3 { font-size: 1.02rem; margin-bottom: 10px; }
.avatar {
  flex: none; width: 76px; height: 76px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--burgundy));
  color: #fff; font-size: 2rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 30px rgba(213,58,46,.35);
}
.profile-name { font-size: 1.5rem; font-weight: 800; line-height: 1.2; }
.profile-line { color: var(--text); font-size: .93rem; }
.profile-line.muted { color: var(--muted); font-size: .84rem; margin-top: 4px; }
.inline-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.inline-form input, .inline-form select {
  padding: 8px 10px; border-radius: 8px; width: 110px;
  border: 1px solid var(--card-edge); background: var(--bg-soft); color: var(--text); outline: none; font-family: inherit;
}
.inline-form input.wide { width: 240px; }
.inline-form input:focus { border-color: var(--accent); }
.admin-search { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; align-items: center; }
.admin-search input, .admin-search select {
  padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--card-edge); background: var(--bg-soft); color: var(--text); font-size: .92rem; outline: none; font-family: inherit;
}
.admin-search input[type=text], .admin-search input[type=search] { flex: 1; min-width: 200px; }
.admin-search input:focus { border-color: var(--accent); }

.table-scroll { overflow-x: auto; border: 1px solid var(--card-edge); border-radius: 14px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .9rem; background: var(--card); }
.admin-table th, .admin-table td { padding: 10px 13px; text-align: left; white-space: nowrap; vertical-align: middle; }
.admin-table thead th { background: var(--bg-soft); color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; }
.admin-table tbody tr { border-top: 1px solid var(--card-edge); }
.admin-table tbody tr:hover { background: rgba(213,58,46,.06); }
.admin-table .empty { text-align: center; color: var(--muted); padding: 24px; white-space: normal; }
.admin-table td.wrap-cell { white-space: normal; max-width: 320px; }
.badge {
  display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 99px; white-space: nowrap;
}
.badge-live { background: rgba(61,220,132,.14); color: var(--green); }
.badge-soon { background: rgba(240,168,58,.16); color: var(--orange); }
.badge-aud  { background: rgba(185,157,157,.16); color: var(--muted); }
.badge-warn { background: rgba(255,107,122,.14); color: var(--red); }
.badge-acc  { background: rgba(213,58,46,.18); color: var(--accent-soft); }
.muted { color: var(--muted); }
.mono { font-family: Consolas, "Cascadia Mono", monospace; font-size: .84rem; }
.plain { color: inherit; }
.plain:hover { color: var(--accent-soft); }
.sec-sub { color: var(--muted); font-size: .9rem; margin-bottom: 14px; }

/* codes */
.code-banner {
  background: linear-gradient(135deg, rgba(61,220,132,.14), rgba(213,58,46,.10)), var(--card);
  border: 2px solid var(--green); border-radius: 16px; padding: 20px; margin-bottom: 20px; text-align: center;
}
.code-banner-label { color: var(--green); font-weight: 700; margin-bottom: 8px; }
.code-banner-code {
  font-family: Consolas, "Cascadia Mono", monospace; font-size: 1.55rem; font-weight: 800; letter-spacing: .08em;
  color: var(--text); user-select: all; margin: 4px 0;
}
.code-banner-meta { color: var(--muted); font-size: .85rem; margin: 6px 0 12px; }
.batch { border: 1px solid var(--card-edge); border-radius: 16px; padding: 14px 16px; margin-bottom: 16px; background: var(--card); }
.batch-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.batch-actions { display: flex; gap: 8px; align-items: center; }
.tile-quick { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* chart */
.chart-card { background: var(--card); border: 1px solid var(--card-edge); border-radius: 16px; padding: 18px 20px 12px; margin-bottom: 22px; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.chart-head span { color: var(--muted); font-size: .84rem; }
.chart-svg { width: 100%; height: 140px; display: block; }
.chart-axis { stroke: var(--card-edge); stroke-width: 1; }
.chart-bar { fill: var(--accent); opacity: .9; }
.chart-bar:hover { fill: var(--accent-soft); }
.chart-bar-zero { fill: var(--card-edge); }
.chart-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: .72rem; margin-top: 6px; }

/* licence card on the dashboard */
.licence-card {
  background: linear-gradient(135deg, rgba(213,58,46,.25), rgba(213,58,46,.06)), var(--card);
  border: 1px solid var(--accent); border-radius: 18px; padding: 26px; margin-bottom: 22px;
  display: flex; align-items: center; gap: 26px; flex-wrap: wrap;
}
.licence-card .days { font-size: 3rem; font-weight: 800; line-height: 1; color: var(--accent-soft); }
.licence-card .days small { font-size: 1rem; color: var(--muted); font-weight: 600; }
.licence-card .meta { flex: 1; min-width: 220px; }
.licence-card .meta strong { display: block; font-size: 1.2rem; }
.activate-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.activate-form input {
  padding: 11px 14px; border-radius: 10px; min-width: 240px;
  border: 1px solid var(--card-edge); background: var(--bg-soft); color: var(--text); outline: none;
  text-transform: uppercase; font-family: Consolas, "Cascadia Mono", monospace; font-size: .95rem;
}
.activate-form input:focus { border-color: var(--accent); }
.two-col { display: grid; gap: 22px; grid-template-columns: 1fr 1fr; }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }

/* TOTP */
.qr-box { display: flex; justify-content: center; margin: 14px 0; background: #fff; border-radius: 14px; padding: 12px; }
.qr-box img { width: 190px; height: 190px; }
.totp-secret { text-align: center; color: var(--muted); font-size: .85rem; margin-bottom: 16px; }
.totp-secret code {
  display: inline-block; margin-top: 6px; padding: 6px 10px; background: var(--bg-soft); border: 1px solid var(--card-edge);
  border-radius: 8px; color: var(--accent-soft); font-family: Consolas, monospace; font-size: .85rem; word-break: break-all;
}
.keybox { font-family: Consolas, monospace; font-size: .85rem; background: var(--bg-soft); border: 1px solid var(--card-edge); border-radius: 8px; padding: 8px 10px; word-break: break-all; user-select: all; }

footer { border-top: 1px solid var(--card-edge); padding: 22px 0; text-align: center; color: var(--muted); font-size: .86rem; }
footer strong { color: var(--accent-soft); }
.step-list { font-family: Consolas, monospace; font-size: .78rem; color: var(--muted); white-space: normal; }
.radio-row { display: flex; gap: 16px; flex-wrap: wrap; margin: 6px 0 10px; font-size: .9rem; }
.radio-row label { display: flex; gap: 6px; align-items: center; cursor: pointer; }
