:root {
  --bg: #0d1117;
  --panel: #161b22;
  --panel-2: #1c2330;
  --line: #2b3340;
  --text: #e6edf3;
  --muted: #8b97a7;
  --accent: #4f9dff;
  --accent-2: #7c5cff;
  --green: #2ea043;
  --amber: #d29922;
  --red: #f0506e;
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.muted { color: var(--muted); }
.small { font-size: 0.82rem; }
.hidden { display: none !important; }

.brand { font-weight: 700; font-size: 1.15rem; letter-spacing: 0.2px; }
.brand span { color: var(--accent); }
.brand-lg { font-size: 1.7rem; margin-bottom: 4px; }
.login-logo { display: block; width: 76px; height: 76px; margin: 0 auto 14px; border-radius: 18px; object-fit: contain; box-shadow: 0 8px 24px rgba(0,0,0,0.35); }
.login-logo-gif { display: block; width: auto; max-width: 260px; height: auto; margin: 0 auto 18px; object-fit: contain; }

/* ===== Thank-you / download page (world-class) ===== */
.ty-body {
  min-height: 100vh; margin: 0;
  display: grid; place-items: center; padding: 32px 20px;
  background:
    radial-gradient(900px 520px at 50% -10%, rgba(79,157,255,0.20), transparent 60%),
    radial-gradient(680px 500px at 92% 112%, rgba(124,92,255,0.16), transparent 55%),
    var(--bg);
}
.ty-card {
  width: 100%; max-width: 560px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 20px; padding: 44px 40px 34px; text-align: center;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
  animation: tyIn 0.4s cubic-bezier(0.2,0.7,0.2,1);
}
@keyframes tyIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.ty-logo { width: 46px; height: 46px; border-radius: 12px; display: block; margin: 0 auto 22px; object-fit: contain; }
.ty-check {
  width: 70px; height: 70px; margin: 0 auto 22px; border-radius: 50%;
  background: rgba(46,160,67,0.15); color: #56d364;
  display: grid; place-items: center; font-size: 2.1rem; font-weight: 700;
  box-shadow: 0 0 0 8px rgba(46,160,67,0.07);
}
.ty-h1 { font-size: 1.9rem; margin: 0 0 10px; letter-spacing: -0.02em; }
.ty-sub { color: var(--muted); font-size: 1.02rem; line-height: 1.6; margin: 0 auto 26px; max-width: 430px; }
.ty-btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 16px 34px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-weight: 600; font-size: 1.05rem; border-radius: 12px; text-decoration: none;
  box-shadow: 0 12px 32px rgba(79,157,255,0.32);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ty-btn:hover { transform: translateY(-2px); box-shadow: 0 18px 44px rgba(79,157,255,0.44); }
.ty-btn-icon { font-size: 1.15rem; line-height: 1; }
.ty-meta { color: var(--muted); font-size: 0.82rem; margin-top: 13px; }
.ty-steps { margin-top: 34px; text-align: left; border-top: 1px solid var(--line); padding-top: 26px; }
.ty-steps-title { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin: 0 0 18px; text-align: center; }
.ty-steplist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.ty-steplist li { display: flex; gap: 14px; align-items: flex-start; }
.ty-num {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
  background: rgba(79,157,255,0.15); color: var(--accent);
  display: grid; place-items: center; font-size: 0.85rem; font-weight: 700; margin-top: 1px;
}
.ty-steplist b { font-size: 0.95rem; color: var(--text); }
.s-desc { color: var(--muted); font-size: 0.88rem; margin-top: 2px; }
.ty-foot { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; font-size: 0.82rem; color: var(--muted); }
.ty-foot b { color: var(--text); }

/* ---------- Login ---------- */
.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: radial-gradient(1200px 600px at 50% -10%, #1b2740, var(--bg));
  padding: 20px;
}
.login-card {
  width: 100%;
  max-width: 360px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.login-card .brand, .login-card > p.muted { text-align: center; }
.login-card label, .gen-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

input, select {
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.95rem;
  outline: none;
}
input:focus, select:focus { border-color: var(--accent); }

button {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 11px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}
button:hover { filter: brightness(1.08); }
button.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 7px 12px;
  font-weight: 500;
}
button:disabled { opacity: 0.6; cursor: progress; }

.error {
  background: rgba(240, 80, 110, 0.12);
  border: 1px solid var(--red);
  color: #ffb3c1;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
}

/* ---------- App shell ---------- */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  position: sticky;
  top: 0;
  z-index: 5;
}
.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-right form { margin: 0; }

.wrap {
  max-width: 1150px;
  margin: 0 auto;
  padding: 22px 16px 60px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.card h2 { margin: 0 0 16px; font-size: 1.05rem; }
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.card-head h2 { margin: 0; }

/* ---------- Generate form ---------- */
.gen-grid {
  display: grid;
  grid-template-columns: 1.2fr 1.4fr 1.2fr auto;
  gap: 12px;
  align-items: end;
}
.gen-grid button { height: 42px; }

.result {
  margin-top: 16px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
}
.result .key {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.1rem;
  color: var(--accent);
  letter-spacing: 1px;
  user-select: all;
}
.result-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 6px; }

/* ---------- Summary chips ---------- */
.summary { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
}
.chip b { color: var(--text); }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 0.85rem; min-width: 860px; }
thead th {
  text-align: left;
  padding: 11px 12px;
  background: var(--panel-2);
  color: var(--muted);
  font-weight: 600;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
tbody td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.8rem; }

.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
}
.badge.Active { background: rgba(46,160,67,0.16); color: #56d364; }
.badge.Online { background: rgba(46,160,67,0.16); color: #56d364; }
.badge.Trial { background: rgba(124,92,255,0.18); color: #b6a4ff; }
.badge.Offline { background: rgba(139,151,167,0.16); color: var(--muted); }
.badge.Pending { background: rgba(210,153,34,0.16); color: #e3b341; }
.badge.Expired { background: rgba(240,80,110,0.16); color: #ff7b93; }
.badge.Revoked { background: rgba(240,80,110,0.22); color: #ff7b93; }

.row-actions { display: flex; gap: 6px; }
.row-actions button {
  padding: 5px 9px;
  font-size: 0.74rem;
  font-weight: 500;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
}
.row-actions button.danger { color: #ff7b93; border-color: rgba(240,80,110,0.4); }

.acc-list { color: var(--muted); font-size: 0.76rem; }

.gen-submit { grid-column: 1 / -1; }

@media (max-width: 720px) {
  .gen-grid { grid-template-columns: 1fr 1fr; }
  .gen-submit { grid-column: 1 / -1; }
}

/* ---------- Pending orders ---------- */
.pay-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--muted);
  text-transform: capitalize;
}
.ref-cell { max-width: 180px; word-break: break-all; font-size: 0.76rem; color: var(--muted); }
.row-actions button.approve { color: #56d364; border-color: rgba(46,160,67,0.4); }

/* ================================================================
   PUBLIC CHECKOUT — premium redesign (gold/amber accent system)
   All checkout-specific rules are scoped to .checkout-body or
   classes used only on the checkout page. Nothing below removes
   or renames any admin/ty/login class.
   ================================================================ */

/* -- checkout accent tokens (override accent for this page only via cascade) -- */
.checkout-body {
  --co-gold:    #D4A853;
  --co-gold-2:  #B8872A;
  --co-gold-glow: rgba(212,168,83,0.22);
  --co-gold-ring: rgba(212,168,83,0.30);
  --co-surface: #111620;
  --co-raise:   #161c28;
  --co-float:   #1c2335;
  --co-border:  rgba(255,255,255,0.07);
  --co-border-hi: rgba(212,168,83,0.40);

  min-height: 100vh;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background:
    radial-gradient(ellipse 900px 500px at 50% -60px, rgba(212,168,83,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 700px 600px at 90% 80%, rgba(79,100,157,0.10) 0%, transparent 65%),
    #0b0e16;
}

/* ---- Site header ---- */
.checkout-body .site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11,14,22,0.80);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.checkout-body .sh-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.checkout-body .sh-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
}
.checkout-body .sh-brand img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}
.checkout-body .sh-brand img.sh-brand-gif {
  width: auto;
  height: 30px;
  max-width: 200px;
  border-radius: 0;
}
.checkout-body .sf-brandcol .sh-brand img.sh-brand-gif { height: 34px; }
.checkout-body .sh-brand b { color: var(--co-gold); }
.checkout-body .sh-nav {
  display: flex;
  gap: 26px;
  margin-left: auto;
}
.checkout-body .sh-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 450;
  transition: color 0.15s ease;
}
.checkout-body .sh-nav a:hover { color: var(--text); }
.checkout-body .sh-cta {
  background: linear-gradient(135deg, var(--co-gold), var(--co-gold-2));
  color: #0d1015;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.84rem;
  letter-spacing: 0.01em;
  padding: 9px 20px;
  border-radius: 9px;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(212,168,83,0.25);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.checkout-body .sh-cta:hover {
  box-shadow: 0 8px 28px rgba(212,168,83,0.38);
  transform: translateY(-1px);
}

/* ---- Hero section ---- */
.checkout-body .hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 72px 28px 52px;
  text-align: center;
}
.checkout-body .hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--co-gold);
  background: rgba(212,168,83,0.10);
  border: 1px solid rgba(212,168,83,0.22);
  border-radius: 999px;
  padding: 5px 14px;
  margin-bottom: 24px;
}
.checkout-body .hero-eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--co-gold);
  box-shadow: 0 0 8px var(--co-gold);
}
.checkout-body .hero-logo {
  width: 58px;
  height: 58px;
  border-radius: 15px;
  display: block;
  margin: 0 auto 20px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.07);
}
.checkout-body .hero-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.10;
  letter-spacing: -0.03em;
  margin: 0 auto 18px;
  max-width: 780px;
  color: var(--text);
}
.checkout-body .hero-title em {
  font-style: normal;
  color: var(--co-gold);
}
.checkout-body .hero-sub {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.70;
  max-width: 600px;
  margin: 0 auto 48px;
}

/* Screenshot marquee: fixed height, width follows aspect.
   Phones (portrait) show ~3 at a time; a desktop shot (landscape) fills the width of 3. */
.ss-frame {
  position: relative;
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 1px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(212,168,83,0.50), rgba(212,168,83,0.06) 38%, rgba(255,255,255,0.05) 62%, rgba(212,168,83,0.42));
  box-shadow: 0 26px 72px rgba(0,0,0,0.52), 0 0 60px rgba(212,168,83,0.06);
}
.ss-frame::before,
.ss-frame::after {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--co-gold);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
  background: rgba(10,13,20,0.68);
  border: 1px solid rgba(212,168,83,0.42);
  box-shadow: 0 6px 20px rgba(0,0,0,0.45), inset 0 0 0 1px rgba(255,255,255,0.05);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  pointer-events: none;
}
.ss-frame::before { content: "\276E"; left: 14px; }
.ss-frame::after  { content: "\276F"; right: 14px; }
#ssViewport {
  overflow: hidden;
  width: 100%;
  border-radius: 21px;
  background: #0a0e18;
}
.ss-track {
  display: flex;
  gap: 18px;
  width: max-content;
  align-items: center;
  will-change: transform;
  animation: ss-marquee 45s linear infinite;
}
#ssViewport:hover .ss-track { animation-play-state: paused; }
.ss-slide { flex: 0 0 auto; }
.ss-slide img {
  height: 420px;
  width: auto;
  display: block;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.09);
  box-shadow:
    0 0 0 5px rgba(255,255,255,0.04),
    0 20px 60px rgba(0,0,0,0.55),
    0 4px 16px rgba(0,0,0,0.40);
  background: #0a0e18;
}
@keyframes ss-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---- Order / checkout section ---- */
.order-section {
  padding: 16px 20px 24px;
}
.checkout-wrap {
  max-width: 660px;
  margin: 0 auto;
  background: var(--co-raise);
  border: 1px solid var(--co-border);
  border-radius: 20px;
  padding: 40px 44px;
  box-shadow:
    0 2px 4px rgba(0,0,0,0.25),
    0 12px 40px rgba(0,0,0,0.40),
    0 40px 80px rgba(0,0,0,0.25);
  position: relative;
  overflow: hidden;
}
.checkout-wrap::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212,168,83,0.45), transparent);
}

.order-title {
  font-family: 'DM Serif Display', Georgia, serif;
  text-align: center;
  font-size: 1.85rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  color: var(--text);
}
.order-intro {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 28px;
}

/* Step labels */
.step {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--co-gold);
  margin: 28px 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.step::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--co-border);
}
.step:first-of-type { margin-top: 0; }

/* Tier cards — JS injects .tier-card[data-tier] here */
.tier-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.tier-card {
  border: 1.5px solid var(--co-border);
  border-radius: 13px;
  padding: 16px 14px;
  cursor: pointer;
  background: var(--co-float);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  text-align: left;
}
.tier-card:hover {
  transform: translateY(-3px);
  border-color: rgba(212,168,83,0.25);
  box-shadow: 0 8px 24px rgba(0,0,0,0.30);
}
.tier-card.sel {
  border-color: var(--co-gold);
  background: rgba(212,168,83,0.07);
  box-shadow: 0 0 0 3px var(--co-gold-ring), 0 8px 28px rgba(0,0,0,0.25);
}
.tier-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}
.tier-acct {
  font-size: 0.76rem;
  color: var(--muted);
  margin: 5px 0;
}
.tier-from {
  font-size: 0.88rem;
  color: var(--co-gold);
  font-weight: 700;
}

/* Period buttons — JS injects .period-opt[data-period] here */
.period-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.period-opt {
  flex: 1;
  min-width: 130px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-start;
  background: var(--co-float);
  border: 1.5px solid var(--co-border);
  color: var(--text);
  border-radius: 11px;
  padding: 12px 14px;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.period-opt:hover {
  border-color: rgba(212,168,83,0.28);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.28);
}
.period-opt b {
  font-size: 1.05rem;
  color: var(--text);
}
.period-opt span {
  font-size: 0.8rem;
  color: var(--muted);
}
.period-opt.sel {
  border-color: var(--co-gold);
  background: rgba(212,168,83,0.07);
  box-shadow: 0 0 0 3px var(--co-gold-ring);
}

/* Detail fields */
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.field-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.80rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  text-transform: uppercase;
}
.checkout-body input[type="text"],
.checkout-body input[type="email"],
.checkout-body input:not([type="submit"]):not([type="button"]):not([type="radio"]):not([type="checkbox"]) {
  background: var(--co-surface);
  border: 1px solid var(--co-border);
  color: var(--text);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.95rem;
  outline: none;
  width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.checkout-body input:focus {
  border-color: var(--co-gold);
  box-shadow: 0 0 0 3px var(--co-gold-ring);
}

/* Payment method buttons */
.pay-methods {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.pay-opt {
  flex: 1;
  min-width: 120px;
  background: var(--co-float);
  border: 1.5px solid var(--co-border);
  color: var(--text);
  border-radius: 11px;
  padding: 11px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.pay-opt:hover {
  border-color: rgba(212,168,83,0.28);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.28);
}
.pay-opt.sel {
  border-color: var(--co-gold);
  background: rgba(212,168,83,0.07);
  box-shadow: 0 0 0 3px var(--co-gold-ring);
  color: var(--co-gold);
}

/* Pay instructions panel — JS toggles .hidden, injects .pay-link and .pay-code */
.pay-instructions {
  margin-top: 14px;
  background: var(--co-surface);
  border: 1px solid rgba(212,168,83,0.18);
  border-radius: 13px;
  padding: 16px 18px;
  font-size: 0.9rem;
  animation: fadeUp 0.18s ease;
}
.pay-instructions p { margin: 6px 0; color: var(--muted); }
.pay-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 6px;
  padding: 11px 20px;
  background: linear-gradient(135deg, var(--co-gold), var(--co-gold-2));
  color: #0d1015;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 6px 20px rgba(212,168,83,0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.pay-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(212,168,83,0.40);
}
.pay-code {
  display: block;
  margin: 10px 0 6px;
  padding: 12px 14px;
  background: #080c12;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.84rem;
  color: var(--co-gold);
  word-break: break-all;
  user-select: all;
  letter-spacing: 0.03em;
}

/* Reference input */
.ref-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.80rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: 20px;
}

/* Order summary */
.order-summary {
  margin: 16px 0 6px;
  font-size: 0.92rem;
  color: var(--muted);
  background: var(--co-surface);
  border: 1px solid var(--co-border);
  border-radius: 10px;
  padding: 10px 14px;
  min-height: 38px;
}
.order-summary b { color: var(--text); }

/* Submit button */
.big-btn {
  width: 100%;
  margin-top: 14px;
  padding: 16px;
  font-size: 1rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--co-gold) 0%, var(--co-gold-2) 100%);
  color: #0d1015;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 28px rgba(212,168,83,0.30);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.big-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 14px 38px rgba(212,168,83,0.42);
}
.big-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Order result box — JS sets .result / .result.ok, toggles .hidden */
.result {
  margin-top: 14px;
  background: rgba(240,80,110,0.08);
  border: 1px solid rgba(240,80,110,0.30);
  border-radius: 10px;
  padding: 13px 16px;
  font-size: 0.9rem;
}
.result.ok {
  background: rgba(46,160,67,0.08);
  border-color: rgba(46,160,67,0.35);
  color: #56d364;
}

.cf-turnstile { margin-top: 18px; }

/* ---- Conversion section ---- */
.sell-outer {
  padding: 16px 20px 80px;
}
.sell-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding-top: 60px;
  display: flex;
  flex-direction: column;
  gap: 52px;
}

/* section divider line */
.sell-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--co-border) 30%, var(--co-border) 70%, transparent);
  margin: 0;
}

.sell-block {}

.sell-h {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.55rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0 0 24px;
  color: var(--text);
}

/* Why choose — 4-grid */
.sell-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.sell-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--co-raise);
  border: 1px solid var(--co-border);
  border-radius: 14px;
  padding: 18px 16px;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.sell-item:hover {
  border-color: var(--co-border-hi);
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.30);
}
.sell-ic {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgba(212,168,83,0.12);
  color: var(--co-gold);
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  margin-top: 1px;
}
.sell-item b {
  font-size: 0.93rem;
  color: var(--text);
  display: block;
  margin-bottom: 5px;
}
.sell-item p {
  color: var(--muted);
  font-size: 0.84rem;
  margin: 0;
  line-height: 1.6;
}

/* How it works — vertical steps */
.sell-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.sell-steps li {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 20px 0;
  border-bottom: 1px solid var(--co-border);
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.6;
}
.sell-steps li:last-child { border-bottom: 0; }
.sell-steps b { color: var(--text); display: block; margin-bottom: 4px; }
.sell-num {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(212,168,83,0.12);
  border: 1px solid rgba(212,168,83,0.25);
  color: var(--co-gold);
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  font-weight: 700;
  margin-top: 2px;
}

/* FAQ */
.faq {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.faq-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--co-border);
}
.faq-item:last-child { border-bottom: 0; }
.faq-item b {
  font-size: 0.95rem;
  color: var(--text);
  display: block;
  margin-bottom: 8px;
}
.faq-item p {
  color: var(--muted);
  font-size: 0.875rem;
  margin: 0;
  line-height: 1.65;
}

/* Trust bar */
.trust-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 28px;
  padding: 24px 0 0;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 500;
}
.trust-item .trust-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(212,168,83,0.10);
  border: 1px solid rgba(212,168,83,0.18);
  color: var(--co-gold);
  display: grid;
  place-items: center;
  font-size: 0.88rem;
}

/* ---- Site footer ---- */
.checkout-body .site-footer {
  border-top: 1px solid rgba(255,255,255,0.05);
  background: #080b13;
  margin-top: 0;
}
.checkout-body .sf-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 28px 28px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 28px;
}
.checkout-body .sf-brandcol .sh-brand { font-size: 1.15rem; }
.checkout-body .sf-brandcol p {
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.6;
  margin: 12px 0 0;
  max-width: 220px;
}
.checkout-body .sf-col h4 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--muted);
  margin: 0 0 14px;
  font-weight: 700;
}
.checkout-body .sf-col a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.87rem;
  margin-bottom: 10px;
  transition: color 0.15s ease;
}
.checkout-body .sf-col a:hover { color: var(--text); }
.checkout-body .sf-bottom {
  border-top: 1px solid rgba(255,255,255,0.05);
  text-align: center;
  padding: 18px;
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
}

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .checkout-body .sf-inner { grid-template-columns: 1fr 1fr; gap: 28px; }
}
@media (max-width: 720px) {
  .checkout-body .sh-nav { display: none; }
  .checkout-body .hero { padding: 52px 20px 40px; }
  .checkout-body .hero-title { font-size: 2rem; }
  .checkout-body .hero-sub { font-size: 0.95rem; }
  .ss-frame { max-width: 100%; }
  .ss-slide img { height: 320px; }
  .sell-grid { grid-template-columns: 1fr; }
  .checkout-wrap { padding: 28px 22px; }
}
@media (max-width: 600px) {
  .checkout-wrap { padding: 22px 16px; border-radius: 14px; }
  .tier-cards { grid-template-columns: 1fr; }
  .field-grid { grid-template-columns: 1fr; }
  .period-opt, .pay-opt { flex: 1 1 100%; }
  .checkout-body .sf-inner { grid-template-columns: 1fr; }
  .ss-slide img { height: 280px; }
  .ss-frame::before, .ss-frame::after { width: 30px; height: 30px; font-size: 0.85rem; }
}

/* ===== Admin SPA shell ===== */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 220px; flex-shrink: 0; background: var(--panel); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 18px 14px;
  position: sticky; top: 0; height: 100vh;
}
.brand-side { font-size: 1.2rem; margin-bottom: 22px; padding-left: 6px; }
.nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.nav-item {
  background: transparent; border: 0; color: var(--muted); text-align: left;
  padding: 10px 12px; border-radius: 8px; font-size: 0.92rem; font-weight: 500;
  display: flex; justify-content: space-between; align-items: center; cursor: pointer; width: 100%;
}
.nav-item:hover { background: var(--panel-2); color: var(--text); }
.nav-item.active { background: rgba(79,157,255,0.14); color: var(--accent); }
.nav-badge { background: var(--amber); color: #1a1205; border-radius: 999px; font-size: 0.7rem; font-weight: 700; padding: 1px 7px; }
.sidebar-bottom { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 8;
  display: flex; align-items: center; gap: 14px;
  padding: 0 22px; height: 58px;
  background: var(--panel); border-bottom: 1px solid var(--line);
}
.topbar-title { font-size: 1.15rem; font-weight: 600; flex: 1; }
.topbar-right { position: relative; }
.profile-btn { background: transparent; border: 0; padding: 0; cursor: pointer; }
.avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-weight: 700; }
.profile-menu { position: absolute; right: 0; top: 48px; width: 220px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 40px rgba(0,0,0,0.45); padding: 8px; z-index: 12; }
.pm-name { padding: 8px 10px 0; font-weight: 600; font-size: 0.9rem; }
.pm-email { padding: 2px 10px 8px; color: var(--muted); font-size: 0.78rem; border-bottom: 1px solid var(--line); margin-bottom: 6px; word-break: break-all; }
.pm-item { display: block; width: 100%; text-align: left; background: transparent; border: 0; color: var(--text); padding: 9px 10px; border-radius: 7px; font-size: 0.9rem; cursor: pointer; }
.pm-item:hover { background: var(--panel-2); }
/* sidebar + profile links are real anchors so each section can be opened in its own tab */
a.nav-item, a.pm-item { text-decoration: none; box-sizing: border-box; }
.pm-item.danger { color: #ff7b93; }
.profile-menu form { margin: 0; }

.content { flex: 1; padding: 24px 26px 60px; }
.view-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.view-head h1 { margin: 0; font-size: 1.4rem; }
.view.hidden { display: none; }
.view .card { margin-bottom: 20px; }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 22px; }
.kpi-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.kpi-card.green { border-left: 3px solid var(--green); }
.kpi-card.amber { border-left: 3px solid var(--amber); }
.kpi-value { font-size: 1.7rem; font-weight: 700; }
.kpi-label { color: var(--muted); font-size: 0.82rem; margin-top: 4px; }
.kpi-sub { color: var(--accent); font-size: 0.76rem; margin-top: 6px; }

.search { background: var(--panel-2); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 8px 12px; font-size: 0.9rem; min-width: 240px; outline: none; }
.search:focus { border-color: var(--accent); }

.config-box { display: flex; flex-direction: column; gap: 2px; }
.cfg-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 0.88rem; }
.cfg-row:last-child { border-bottom: 0; }
.cfg-row span { color: var(--muted); }
.cfg-row b { text-align: right; word-break: break-all; }

.pw-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; }
.pw-form label { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; color: var(--muted); }
.pw-form button { height: 42px; }

.subtabs { display: flex; gap: 4px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.subtab { background: transparent; border: 0; border-bottom: 2px solid transparent; color: var(--muted); padding: 9px 14px; font-size: 0.92rem; font-weight: 500; cursor: pointer; }
.subtab:hover { color: var(--text); }
.subtab.active { color: var(--accent); border-bottom-color: var(--accent); }
.subview.hidden { display: none; }

.cfg-form { display: flex; flex-direction: column; gap: 14px; max-width: 640px; }
.cfg-form label { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; color: var(--muted); }
.cfg-form button { align-self: flex-start; }
.form-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.edit-btn { padding: 6px 16px; font-size: 0.82rem; }

/* ===== Per-field editable rows ===== */
.cfg-list { display: flex; flex-direction: column; }
.cfg-field { padding: 12px 0; border-bottom: 1px solid var(--line); }
.cfg-field:last-child { border-bottom: 0; }
.cfg-field-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cfg-label { color: var(--muted); font-size: 0.85rem; min-width: 210px; flex-shrink: 0; }
.cfg-shown { flex: 1 1 220px; min-width: 0; word-break: break-all; }
.cfg-field-row .edit-field { padding: 5px 16px; font-size: 0.8rem; flex-shrink: 0; margin-left: auto; }
.cfg-field-edit { margin-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.cfg-input { width: 100%; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.82rem; }

/* ===== Whop links grid ===== */
.whop-grid { width: 100%; border-collapse: collapse; }
.whop-grid th, .whop-grid td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.whop-grid th:not(:last-child), .whop-grid td:not(:last-child) { border-right: 1px solid var(--line); }
.whop-grid thead th { color: var(--muted); font-size: 0.8rem; font-weight: 600; }
.whop-grid th.whop-tier { color: var(--text); font-weight: 600; white-space: nowrap; }
.whop-grid tbody tr:last-child td, .whop-grid tbody tr:last-child th { border-bottom: 0; }
.whop-cell { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.whop-meta { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.whop-dot { font-size: 0.7rem; flex-shrink: 0; }
.whop-dot.set { color: var(--green); }
.whop-dot.unset { color: var(--muted); }
.whop-link { color: var(--text); font-size: 0.8rem; white-space: nowrap; }
.whop-link.muted { color: var(--muted); }
.whop-edit-btn { padding: 4px 14px; font-size: 0.8rem; flex-shrink: 0; }

/* ===== Modal ===== */
.modal-backdrop { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(5, 8, 13, 0.62); backdrop-filter: blur(2px); animation: fadeIn 0.14s ease; }
.modal-backdrop.hidden { display: none; }
.modal { width: 100%; max-width: 400px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55); animation: modalPop 0.16s ease; }
.modal h3 { margin: 0 0 4px; }
.modal label { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; color: var(--muted); margin: 16px 0; }
.modal select { width: 100%; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalPop { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }

/* ===== Motion & micro-interactions ===== */
button, a.pay-link, .nav-item, .subtab, .tier-card, .period-opt, .pay-opt,
input, select, .kpi-card, .avatar, .row-actions button, .badge, .pm-item, .chip {
  transition: background-color .15s ease, border-color .15s ease, color .15s ease,
              transform .15s ease, box-shadow .15s ease, filter .15s ease, padding-left .14s ease;
}
button:not(.ghost):not(.nav-item):not(.subtab):not(.pm-item):not(.profile-btn):not(.hamburger):hover {
  transform: translateY(-1px); box-shadow: 0 6px 18px rgba(79,157,255,0.30);
}
button:active { transform: translateY(0) scale(0.99); }
.row-actions button:hover { filter: brightness(1.18); transform: translateY(-1px); }
.ghost:hover { border-color: var(--accent); color: var(--text); }

.kpi-card:hover { transform: translateY(-3px); border-color: rgba(79,157,255,0.45); box-shadow: 0 12px 30px rgba(0,0,0,0.35); }
tbody tr { transition: background-color .12s ease; }
tbody tr:hover { background: rgba(79,157,255,0.06); }

input:focus, select:focus, .search:focus { box-shadow: 0 0 0 3px rgba(79,157,255,0.18); }

.nav-item:hover { padding-left: 16px; }
.profile-btn:hover .avatar { transform: scale(1.06); box-shadow: 0 0 0 3px rgba(79,157,255,0.28); }
.tier-card:hover, .period-opt:hover, .pay-opt:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0,0,0,0.28); }

/* entrance animations */
.view:not(.hidden) { animation: fadeUp .24s ease; }
.subview:not(.hidden) { animation: fadeUp .2s ease; }
.profile-menu:not(.hidden) { animation: fadeUp .14s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.kpi-card { animation: fadeUp .3s ease backwards; }
.kpi-grid .kpi-card:nth-child(2) { animation-delay: .04s; }
.kpi-grid .kpi-card:nth-child(3) { animation-delay: .08s; }
.kpi-grid .kpi-card:nth-child(4) { animation-delay: .12s; }
.kpi-grid .kpi-card:nth-child(5) { animation-delay: .16s; }
.kpi-grid .kpi-card:nth-child(6) { animation-delay: .20s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.hamburger { display: none; background: transparent; border: 0; color: var(--text); font-size: 1.3rem; cursor: pointer; padding: 4px 8px; }

@media (max-width: 860px) {
  .hamburger { display: block; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 15; transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 40px rgba(0,0,0,0.5); }
  .sidebar.open { transform: translateX(0); }
  .topbar { padding: 0 14px; }
  .content { padding: 18px 14px 60px; }
  .pw-form { grid-template-columns: 1fr; }
  .search { min-width: 0; width: 100%; }
}

/* =============================================================================
   PREMIUM THEME LAYER  (black / white / gold)
   Visual only. Retones the design tokens and refines admin components by their
   existing class names. No markup, ids, or JS hooks are touched.
   ========================================================================== */
:root {
  --bg: #0a0a0b;            /* near-black canvas */
  --panel: #121214;        /* cards / surfaces */
  --panel-2: #1a1a1e;      /* raised inputs / rows */
  --line: rgba(255,255,255,0.08);
  --line-strong: rgba(255,255,255,0.14);
  --text: #f5f4f2;         /* warm white */
  --muted: #9a968f;        /* warm grey */
  --gold: #d9b26a;         /* primary gold */
  --gold-2: #b8923f;       /* deep gold */
  --gold-soft: rgba(217,178,106,0.12);
  --accent: #d9b26a;       /* remap blue accent -> gold everywhere */
  --accent-2: #b8923f;
  --green: #5fbf8f;
  --amber: #d9b26a;
  --red: #e0736f;
  --radius: 14px;
}

/* The premium backdrop (gold aurora + grain + vignette) is owned entirely by
   bg.css via the fixed body::before/::after layers, so every page body stays
   transparent and lets it show through. Do not set a solid background here. */
body, body.app-shell, body.login-body, body.checkout-body { background: transparent !important; }

/* Retone the order/download/thank-you pages (.checkout-body) to the premium
   gold + black system (their own tokens were the old cream-gold + blue). */
.checkout-body {
  --co-gold: #d9b26a; --co-gold-2: #b8923f;
  --co-gold-glow: rgba(217,178,106,0.22); --co-gold-ring: rgba(217,178,106,0.30);
  --co-surface: #121214; --co-raise: #121214; --co-float: #1a1a1e;
  --co-border: rgba(255,255,255,0.08); --co-border-hi: rgba(217,178,106,0.40);
}
.checkout-body .sh-brand b, .checkout-body .hero-title em { color: var(--gold); }

/* brand + gold accent word */
.brand span, .brand-lg span { color: var(--gold); }
.muted { color: var(--muted); }

/* ---- Sidebar ---- */
.sidebar {
  background: linear-gradient(180deg, #0e0e10, #0a0a0b);
  border-right: 1px solid var(--line);
}
.brand-side { letter-spacing: .3px; }
.nav-item {
  color: var(--muted); border-radius: 10px; font-weight: 500;
  transition: background .15s, color .15s, padding .15s;
}
.nav-item:hover { background: rgba(255,255,255,0.04); color: var(--text); }
.nav-item.active {
  background: var(--gold-soft); color: var(--gold);
  box-shadow: inset 2px 0 0 var(--gold);
}
.nav-badge { background: var(--gold); color: #0a0a0b; font-weight: 800; }

/* ---- Topbar ---- */
.topbar {
  background: rgba(10,10,11,0.72); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-title { font-weight: 700; letter-spacing: .2px; }
.avatar {
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  color: #0a0a0b; font-weight: 800;
  box-shadow: 0 0 0 1px rgba(217,178,106,0.35), 0 6px 18px rgba(217,178,106,0.18);
}
.profile-menu {
  background: var(--panel); border: 1px solid var(--line-strong);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.pm-item:hover { background: rgba(255,255,255,0.05); }

/* ---- Cards ---- */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent), var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(255,255,255,0.03), 0 18px 40px rgba(0,0,0,0.28);
}
.card h2 { letter-spacing: .2px; }
.card-head { border-bottom: 1px solid var(--line); }

/* ---- KPI tiles ---- */
.kpi-card {
  background: linear-gradient(180deg, rgba(217,178,106,0.05), transparent), var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius);
  position: relative; overflow: hidden;
}
.kpi-card::after {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(217,178,106,0.5), transparent);
  opacity: 0; transition: opacity .2s;
}
.kpi-card:hover::after { opacity: 1; }
.kpi-card:hover { border-color: rgba(217,178,106,0.4); box-shadow: 0 14px 34px rgba(0,0,0,0.4); }
.kpi-card.green { border-left: 3px solid var(--green); }
.kpi-card.amber { border-left: 3px solid var(--gold); }
.kpi-value { font-weight: 800; letter-spacing: -.02em; color: var(--text); }
.kpi-label { color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; }

/* ---- Tables ---- */
.table-wrap { border: 1px solid var(--line); border-radius: 12px; }
thead th {
  background: #0e0e10; color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em; font-size: .72rem; font-weight: 600;
  border-bottom: 1px solid var(--line-strong);
}
tbody td { border-bottom: 1px solid var(--line); }
tbody tr:hover td { background: rgba(217,178,106,0.03); }

/* ---- Buttons ---- */
.gen-submit, .big-btn, .co-submit {
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  color: #0a0a0b; font-weight: 700; border: 0;
  box-shadow: 0 6px 20px rgba(217,178,106,0.22);
}
.gen-submit:hover, .big-btn:hover:not(:disabled) { filter: brightness(1.06); }
.ghost {
  background: transparent; border: 1px solid var(--line-strong); color: var(--text);
}
.ghost:hover { border-color: rgba(217,178,106,0.5); color: var(--gold); }
.row-actions button {
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; transition: all .14s;
}
.row-actions button:hover { border-color: rgba(217,178,106,0.5); color: var(--gold); }
.row-actions button.danger, .pm-item.danger { color: var(--red); }
.row-actions button.danger:hover { border-color: var(--red); color: var(--red); }

/* inputs */
input, select, .cfg-input, .search {
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
}
input:focus, select:focus, .cfg-input:focus, .search:focus {
  border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); outline: none;
}

/* ---- Badges (status pills) recolored to the gold/warm system ---- */
.badge { font-weight: 700; letter-spacing: .02em; }
.badge.Active, .badge.Online { background: rgba(95,191,143,0.15); color: #7fd6a8; }
.badge.Trial { background: var(--gold-soft); color: var(--gold); }
.badge.Offline { background: rgba(255,255,255,0.06); color: var(--muted); }
.badge.Pending { background: var(--gold-soft); color: var(--gold); }
.badge.Expired, .badge.Revoked { background: rgba(224,115,111,0.15); color: #e89490; }

/* ---- Sub-tabs (Settings) ---- */
.subtab { color: var(--muted); }
.subtab.active { color: var(--gold); border-bottom-color: var(--gold); }

/* ---- Modals ---- */
.modal-backdrop { background: rgba(0,0,0,0.6); backdrop-filter: blur(3px); }
.modal {
  background: var(--panel); border: 1px solid var(--line-strong);
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}
.modal h3 { color: var(--text); }

/* ---- Login card ---- */
.login-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), transparent), var(--panel);
  border: 1px solid var(--line-strong);
  box-shadow: 0 30px 90px rgba(0,0,0,0.55), 0 0 0 1px rgba(217,178,106,0.06);
}
.login-card button[type="submit"] {
  background: linear-gradient(135deg, var(--gold), var(--gold-2)); color: #0a0a0b; font-weight: 700; border: 0;
}
.login-logo { filter: drop-shadow(0 4px 14px rgba(217,178,106,0.25)); }

/* config list rows */
.cfg-row, .cfg-field-row { border-color: var(--line); }
.cfg-label { color: var(--muted); }
.result.ok { color: #7fd6a8; }

/* =============================================================================
   HOME-THEME MATCH  (order/checkout page)
   Retones the .checkout-body pages to match the marketing home redesign:
   brighter gold #e8b84b, sky-blue #57c1f7 secondary accent, flat near-black
   background, and Inter headings (no serif). Scoped to .checkout-body so the
   admin / login / thank-you shells are unaffected. Appended last = wins.
   ========================================================================== */
.checkout-body {
  --co-gold:      #e8b84b;
  --co-gold-2:    #c8952b;
  --co-gold-glow: rgba(232,184,75,0.18);
  --co-gold-ring: rgba(232,184,75,0.28);
  --co-sky:       #57c1f7;
  --co-sky-2:     #8ad6ff;
  --co-sky-soft:  rgba(87,193,247,0.12);
  --co-surface:   #0f1319;
  --co-raise:     #12161e;
  --co-float:     #171c26;
  --co-border:    rgba(255,255,255,0.08);
  --co-border-hi: rgba(232,184,75,0.40);
  /* flat near-black backdrop to match home (kills the gold/blue aurora here) */
  background: #080a0f !important;
}
/* home uses Inter everywhere — drop the serif on checkout headings */
.checkout-body .hero-title,
.checkout-body .order-title,
.checkout-body .sell-h {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
}
/* eyebrow / step labels + sky-tinted secondary accents */
.checkout-body .hero-eyebrow { color: var(--co-sky-2); background: var(--co-sky-soft); border-color: rgba(87,193,247,0.28); }
.checkout-body .hero-eyebrow::before { background: var(--co-sky); box-shadow: 0 0 6px rgba(87,193,247,0.5); }
/* period chips selected -> sky ring (secondary accent), plan chips stay gold */
.checkout-body .co-period-chip.active { border-color: var(--co-sky); background: var(--co-sky-soft); }
.checkout-body .co-period-chip.active .pp-price { color: var(--co-sky-2); }
/* softer, less-neon glows to match home's reduced-glow pass */
.checkout-body .co-submit,
.checkout-body .big-btn { box-shadow: 0 4px 14px rgba(232,184,75,0.15); }
.checkout-body .co-card { border-color: rgba(232,184,75,0.22); }

/* =============================================================================
   HOME-THEME MATCH  (admin / login / thank-you — the global shell)
   Retones the global :root tokens to the marketing home palette: brighter gold
   #e8b84b, flat near-black #080a0f, plus a sky-blue secondary accent used on
   active nav + focus states. Appended last = wins.
   ========================================================================== */
:root {
  --bg: #080a0f;
  --panel: #12161e;
  --panel-2: #171c26;
  --line: rgba(255,255,255,0.08);
  --line-strong: rgba(255,255,255,0.14);
  --text: #f4f6f9;
  --muted: #9aa2ad;
  --gold: #e8b84b;
  --gold-2: #c8952b;
  --gold-soft: rgba(232,184,75,0.12);
  --accent: #e8b84b;
  --accent-2: #c8952b;
  --sky: #57c1f7;
  --sky-2: #8ad6ff;
  --sky-soft: rgba(87,193,247,0.12);
  --green: #5ec98a;
  --amber: #e8b84b;
  --red: #e0736f;
}
/* sky-blue secondary accent on admin active nav + focus rings */
.nav-item.active {
  background: var(--sky-soft);
  color: var(--sky-2);
  box-shadow: inset 2px 0 0 var(--sky);
}
.subtab.active { color: var(--sky-2); border-bottom-color: var(--sky); }
input:focus, select:focus, .cfg-input:focus, .search:focus {
  border-color: var(--sky);
  box-shadow: 0 0 0 3px var(--sky-soft);
}
.kpi-sub { color: var(--sky-2); }

/* Flash a license row when jumped-to from the duplicate-check "Open" link. */
@keyframes rowFlash {
  0%   { background: var(--gold-soft, rgba(212,175,55,.35)); }
  100% { background: transparent; }
}
tr.row-flash > td { animation: rowFlash 2s ease-out; }
