:root {
  color-scheme: dark;
  --bg: #09090b;
  --bg-2: #111113;
  --surface: #16161a;
  --surface-2: #1f1f24;
  --line: rgba(255, 255, 255, .08);
  --text: #fafafa;
  --muted: #a1a1aa;
  --blue: #3b82f6;
  --blue-2: #60a5fa;
  --accent: #3b82f6;
  --green: #22c55e;
  --red: #f43f5e;
  --amber: #f59e0b;
  --shadow: 0 18px 40px rgba(0, 0, 0, .28);
  --radius: 12px;
  --sidebar: 248px;
  --font: "Inter", "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
}
[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f7fb;
  --bg-2: #e8eef7;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --line: rgba(15, 23, 42, .08);
  --text: #0f172a;
  --muted: #64748b;
  --shadow: 0 20px 50px rgba(15, 23, 42, .08);
}
@media (prefers-color-scheme: light) {
  [data-theme="system"] {
    color-scheme: light;
    --bg: #f4f7fb;
    --bg-2: #e8eef7;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --line: rgba(15, 23, 42, .08);
    --text: #0f172a;
    --muted: #64748b;
    --shadow: 0 20px 50px rgba(15, 23, 42, .08);
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  letter-spacing: -.015em;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar);
  flex: 0 0 var(--sidebar);
  padding: 22px 16px;
  border-right: 1px solid var(--line);
  background: #0c0c0e;
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 20;
}
[data-theme="light"] .sidebar { background: rgba(255, 255, 255, .9); }
.brand { display: flex; gap: 12px; align-items: center; padding: 0 8px 22px; }
.brand img { width: 38px; height: 38px; border-radius: 12px; }
.brand strong { display: block; font-size: 14px; letter-spacing: -.03em; font-weight: 650; }
.brand span { color: var(--muted); font-size: 12px; }
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px; border-radius: 14px; color: var(--muted); margin-bottom: 4px;
  transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.nav-link svg { width: 18px; height: 18px; }
.nav-link:hover { background: var(--surface-2); color: var(--text); transform: translateX(2px); }
.nav-link.active {
  background: rgba(59, 130, 246, .14);
  color: var(--text);
  box-shadow: none;
}
.side-foot { margin-top: auto; padding: 12px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.main { flex: 1; min-width: 0; }
.topbar {
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
  height: 56px; padding: 0 20px; position: sticky; top: 0; z-index: 15;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.topbar form { margin: 0; flex: 0 0 auto; }
.top-lead, .top-actions { display: flex; align-items: center; gap: 10px; min-width: 0; }
.top-mark { display: flex; align-items: center; gap: 8px; font-weight: 650; letter-spacing: -.03em; }
.top-mark img { width: 22px; height: 22px; border-radius: 6px; }
.env-pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 8px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); font-size: 12px;
}
.env-pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.top-user { color: var(--muted); font-size: 13px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-exit {
  border: 0; background: transparent; color: var(--text); height: 32px; padding: 0 8px;
  border-radius: 8px; font-size: 13px;
}
.top-exit:hover { background: var(--surface-2); }
.topbar .menu-btn { height: 32px; width: 32px; padding: 0; border-radius: 8px; }
.topbar select.top-select {
  width: auto; height: 32px; padding: 0 28px 0 10px; border-radius: 8px;
  background: transparent; font-size: 13px;
}
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
[data-theme="light"] .topbar { background: var(--bg); }
.content { padding: 8px 28px 56px; }
.page-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; margin: 12px 0 22px; flex-wrap: wrap; }
.page-head .hero-actions { margin-top: 0; align-items: center; }
.page-head .hero-actions form { margin: 0; }
td form { margin: 0; }
td .btn, td .btn-ghost { padding: 8px 12px; white-space: nowrap; }
.page-head h1 { margin: 0; font-size: 32px; font-weight: 650; letter-spacing: -.04em; }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpis + .kpis { margin-top: 14px; }
.card {
  background: linear-gradient(180deg, rgba(255,255,255,.035), transparent 42%), var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow);
  animation: rise .45s var(--ease) both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.kpi .label { color: var(--muted); font-size: 13px; }
.kpi strong { display: block; margin-top: 8px; font-size: 26px; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.kpi em { font-style: normal; color: var(--blue-2); font-size: 12px; }
.grid-2 { display: grid; grid-template-columns: 1.4fr .8fr; gap: 14px; margin-top: 14px; }
.grid-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-weight: 500; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
tr:hover td { background: rgba(14, 165, 233, .04); }
.num { font-family: var(--mono); font-size: 13px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; border-radius: 999px;
  padding: 5px 11px; font-size: 12px; background: var(--surface-2); font-weight: 500;
}
.pill.paid, .pill.completed, .pill.active { color: var(--green); background: rgba(34,197,94,.12); }
.pill.pending, .pill.requested, .pill.in_review, .pill.processing, .pill.approved { color: var(--blue-2); background: rgba(14,165,233,.12); }
.pill.expired, .pill.canceled, .pill.rejected, .pill.failed, .pill.suspended { color: var(--red); background: rgba(244,63,94,.12); }
.pill.review { color: var(--amber); background: rgba(245,158,11,.12); }
.btn, .btn-ghost, .btn-danger {
  border: 0; border-radius: 14px; padding: 12px 18px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), opacity .18s var(--ease), background .18s var(--ease);
  position: relative;
}
.btn {
  background: linear-gradient(135deg, var(--blue), #0284c7);
  color: white; box-shadow: 0 10px 28px rgba(14, 165, 233, .28); font-weight: 600;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 14px 32px rgba(14, 165, 233, .34); }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn-ghost:hover { background: rgba(255,255,255,.04); }
.btn-danger { background: rgba(244, 63, 94, .12); color: var(--red); }
.btn[disabled], .btn.is-loading { opacity: .6; cursor: wait; pointer-events: none; }
.btn.is-loading::after {
  content: ""; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.25); border-top-color: #fff;
  animation: spin .7s linear infinite; margin-left: 4px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field span { color: var(--muted); font-size: 13px; }
input, select, textarea {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px; outline: none;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(14, 165, 233, .15); }
.field-error { color: var(--red); font-size: 12px; margin: 0; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; padding: 10px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.02); }
.filters input, .filters select { width: auto; min-width: 140px; }
.auth-wrap, .install-wrap, .checkout-wrap { min-height: 100vh; display: grid; place-items: center; padding: 28px 16px; }
.auth-card, .checkout-card { width: min(460px, 100%); }
.auth-card.wide, .install-card { width: min(760px, 100%); }
.checkout-card { width: 100%; text-align: center; --pay: var(--blue); }
.checkout-stack { width: min(440px, 100%); display: grid; gap: 16px; position: relative; z-index: 1; }
.checkout-brand { display: flex; align-items: center; gap: 12px; text-align: left; }
.checkout-brand img, .brand-mark { width: 52px; height: 52px; border-radius: 16px; object-fit: cover; }
.checkout-brand img { background: color-mix(in srgb, var(--pay) 14%, #fff); box-shadow: 0 10px 24px color-mix(in srgb, var(--pay) 28%, transparent); }
.brand-mark { display: grid; place-items: center; flex: 0 0 52px; color: #fff; font-weight: 700; letter-spacing: .02em;
  background: linear-gradient(135deg, var(--pay), color-mix(in srgb, var(--pay) 42%, #0f172a)); }
.checkout-brand strong { display: block; font-size: 17px; letter-spacing: -.02em; line-height: 1.2; }
.checkout-brand .tiny { margin-bottom: 2px; }
.checkout-status { margin: 10px 0 0; }
.checkout-card .btn, .checkout-shell .btn { background: linear-gradient(135deg, var(--pay), color-mix(in srgb, var(--pay) 55%, #082f49)); color: #fff; }
.checkout-processor { margin: 16px 0 0; }
.checkout-custom {
  width: 100%; height: 148px; min-height: 120px; border: 0; border-radius: 24px;
  background: transparent; overflow: hidden; box-shadow: 0 18px 40px rgba(0,0,0,.22);
  animation: rise .55s var(--ease);
}
.checkout-shell {
  position: relative; overflow: hidden; width: 100%; text-align: center; --pay: var(--blue);
  border-radius: 28px; padding: 22px 20px 20px;
  border: 1px solid color-mix(in srgb, var(--pay) 34%, transparent);
  background:
    linear-gradient(180deg, rgba(255,255,255,.05), transparent 28%),
    rgba(8, 12, 22, .82);
  box-shadow: 0 30px 80px rgba(0,0,0,.38);
  backdrop-filter: blur(22px);
  animation: rise .5s var(--ease);
}
.checkout-glow {
  position: absolute; inset: -20% -10% auto; height: 55%; pointer-events: none;
  background: radial-gradient(ellipse at 50% 0%, color-mix(in srgb, var(--pay) 34%, transparent), transparent 70%);
  opacity: .9;
}
.checkout-head, .checkout-amount, .checkout-live, .checkout-paid { position: relative; z-index: 1; }
.checkout-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.checkout-amount { margin-bottom: 18px; }
.checkout-amount .tiny { letter-spacing: .12em; text-transform: uppercase; }
.checkout-amount h1 {
  margin: 6px 0 0; font-size: clamp(36px, 9vw, 48px); font-weight: 700;
  letter-spacing: -.05em; font-variant-numeric: tabular-nums; line-height: 1;
}
.checkout-fx { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.checkout-timer {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 16px;
  border-radius: 18px; border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03); text-align: left;
}
.checkout-timer strong { display: block; margin-top: 2px; font-size: 20px; letter-spacing: -.03em; }
.timer-ring {
  width: 38px; height: 38px; border-radius: 50%; flex: 0 0 38px;
  background: conic-gradient(var(--pay), color-mix(in srgb, var(--pay) 20%, transparent) 70%, transparent);
  display: grid; place-items: center; animation: spin 8s linear infinite;
}
.timer-ring i { width: 26px; height: 26px; border-radius: 50%; background: #0b1220; }
.secure-chip {
  margin-left: auto; font-size: 11px; font-weight: 600; letter-spacing: .04em;
  padding: 7px 10px; border-radius: 999px; white-space: nowrap;
  color: color-mix(in srgb, var(--pay) 80%, #fff);
  background: color-mix(in srgb, var(--pay) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--pay) 28%, transparent);
}
.qr-stage { margin: 4px 0 18px; }
.qr-frame {
  position: relative; width: min(268px, 78vw); margin: 0 auto; padding: 14px;
  border-radius: 28px; background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
  box-shadow: 0 20px 50px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.08);
}
.qr-frame.has-qr::before {
  content: ""; position: absolute; inset: -1px; border-radius: 29px; padding: 1px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--pay) 70%, #fff), transparent 40%, color-mix(in srgb, var(--pay) 55%, transparent));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}
.qr-corner {
  position: absolute; width: 22px; height: 22px; border: 2.5px solid var(--pay); opacity: .85;
}
.qr-corner.tl { top: 8px; left: 8px; border-right: 0; border-bottom: 0; border-radius: 8px 0 0 0; }
.qr-corner.tr { top: 8px; right: 8px; border-left: 0; border-bottom: 0; border-radius: 0 8px 0 0; }
.qr-corner.bl { bottom: 8px; left: 8px; border-right: 0; border-top: 0; border-radius: 0 0 0 8px; }
.qr-corner.br { bottom: 8px; right: 8px; border-left: 0; border-top: 0; border-radius: 0 0 8px 0; }
.qr-scan {
  position: absolute; left: 18px; right: 18px; height: 2px; top: 18%;
  background: linear-gradient(90deg, transparent, var(--pay), transparent);
  box-shadow: 0 0 18px var(--pay); opacity: .75; z-index: 2;
  animation: qrScan 2.4s var(--ease) infinite;
}
@keyframes qrScan {
  0% { top: 16%; opacity: 0; }
  15% { opacity: .85; }
  85% { opacity: .85; }
  100% { top: 82%; opacity: 0; }
}
.qr-box {
  background: #fff; border-radius: 20px; padding: 14px; min-height: 220px;
  display: grid; place-items: center; position: relative; overflow: hidden;
}
.qr-box img { width: 220px; height: 220px; display: block; }
.sim-qr {
  width: 220px; height: 220px; border-radius: 16px; display: grid; place-items: center;
  background: repeating-linear-gradient(45deg, #e2e8f0, #e2e8f0 12px, #f8fafc 12px, #f8fafc 24px);
  color: #0f172a; font-weight: 650; padding: 16px; text-align: center; font-size: 14px;
}
.pix-copy { text-align: left; margin-bottom: 16px; }
.pix-copy > .tiny { display: block; margin-bottom: 8px; }
.copy-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: stretch; }
.copy-row textarea, #pix-code, #share-link { font-family: var(--mono); font-size: 12px; }
#pix-code {
  min-height: 64px; max-height: 72px; resize: none; margin: 0;
  background: rgba(2, 6, 23, .55); border-radius: 16px; line-height: 1.45;
}
.copy-row .btn { min-width: 104px; border-radius: 16px; }
.pay-steps {
  list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; text-align: left;
}
.pay-steps li {
  display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start;
  padding: 10px 12px; border-radius: 16px; border: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.025);
}
.pay-steps span {
  width: 28px; height: 28px; border-radius: 10px; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--pay), color-mix(in srgb, var(--pay) 40%, #0f172a));
}
.pay-steps strong { display: block; font-size: 13px; margin-bottom: 2px; }
.pay-steps em { display: block; font-style: normal; color: var(--muted); font-size: 12px; line-height: 1.4; }
.checkout-help { margin: 0 0 14px; line-height: 1.5; }
.checkout-auto { margin: 4px 0 0; text-align: center; color: var(--muted); line-height: 1.5; }
.checkout-cta { margin-top: 2px; min-height: 50px; font-weight: 650; letter-spacing: -.01em; }
.checkout-paid {
  margin-top: 4px; padding: 26px 18px; border-radius: 22px;
  background: linear-gradient(180deg, rgba(34,197,94,.16), rgba(34,197,94,.04));
  border: 1px solid rgba(34,197,94,.28); animation: rise .5s var(--ease);
}
.checkout-paid h2 { margin: 14px 0 8px; font-size: 24px; letter-spacing: -.03em; }
.checkout-paid p { margin: 0; color: var(--muted); line-height: 1.55; }
.checkout-paid .tiny { margin-top: 10px; }
.paid-badge {
  width: 64px; height: 64px; margin: 0 auto; border-radius: 50%;
  display: grid; place-items: center; color: var(--green);
  background: rgba(34,197,94,.16); box-shadow: 0 0 0 10px rgba(34,197,94,.08);
  animation: pop .45s var(--ease);
}
@keyframes pop {
  from { transform: scale(.7); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.checkout-shell.is-paid .checkout-live { display: none; }
.checkout-foot { text-align: center; margin: 0; opacity: .7; position: relative; z-index: 1; }
body.pay-page {
  min-height: 100vh; background: #05080f; color: var(--skin-ink, #f8fafc);
  overflow-x: hidden;
}
body.pay-page .checkout-wrap {
  background: transparent; position: relative; z-index: 1;
  padding: 36px 16px 48px; align-content: center;
}
.pay-ambient {
  position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0;
  background:
    radial-gradient(90% 55% at 50% -10%, color-mix(in srgb, var(--pay) 28%, transparent), transparent 58%),
    var(--skin, #070b14);
}
.pay-ambient .orb {
  position: absolute; border-radius: 50%; filter: blur(40px); opacity: .45;
  animation: floatOrb 12s ease-in-out infinite;
}
.orb-a { width: 340px; height: 340px; left: -80px; top: 12%; background: color-mix(in srgb, var(--pay) 55%, transparent); }
.orb-b { width: 280px; height: 280px; right: -60px; bottom: 8%; background: color-mix(in srgb, var(--pay) 35%, #14b8a6); animation-delay: -4s; }
.orb-c { width: 180px; height: 180px; left: 40%; top: 55%; background: rgba(255,255,255,.08); animation-delay: -7s; }
.pay-grid {
  position: absolute; inset: 0; opacity: .18;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 30%, #000 20%, transparent 75%);
}
@keyframes floatOrb {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(18px, -22px, 0) scale(1.08); }
}
body.pay-page[data-skin="light"] .checkout-shell {
  background: rgba(255,255,255,.94); color: #0f172a;
  border-color: color-mix(in srgb, var(--pay) 28%, #cbd5e1);
}
body.pay-page[data-skin="light"] .tiny,
body.pay-page[data-skin="light"] .pay-steps em,
body.pay-page[data-skin="light"] .checkout-fx { color: #475569; }
body.pay-page[data-skin="light"] .checkout-timer,
body.pay-page[data-skin="light"] .pay-steps li { background: rgba(15,23,42,.03); border-color: rgba(15,23,42,.08); }
body.pay-page[data-skin="light"] #pix-code { background: #f8fafc; color: #0f172a; }
body.pay-page[data-skin="light"] .timer-ring i { background: #fff; }
body.pay-page[data-skin="light"] .checkout-foot { color: #64748b; }
.create-grid { display: grid; grid-template-columns: minmax(0, .86fr) minmax(320px, 1.14fr); gap: 16px; align-items: start; }
.brand-studio { display: grid; gap: 14px; background:
  radial-gradient(90% 40% at 100% 0%, rgba(14,165,233,.14), transparent 60%),
  var(--surface); }
.studio-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.studio-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.studio-save { margin: 0; flex: 1; }
.brand-stage {
  border-radius: 24px; padding: 16px; display: grid; gap: 12px;
  border: 1px solid color-mix(in srgb, var(--pay) 42%, var(--line));
  background:
    radial-gradient(80% 70% at 100% 0%, color-mix(in srgb, var(--pay) 24%, transparent), transparent 62%),
    rgba(2,6,23,.35);
}
.studio-banner { border-radius: 20px; overflow: hidden; border: 1px solid rgba(255,255,255,.08); }
.studio-banner-frame, .template-preview, .preview-banner {
  width: 100%; height: 148px; border: 0; border-radius: 20px; background: transparent; display: block;
}
.brand-stage .checkout-card, .studio-card {
  width: min(420px, 100%); margin: 0 auto; text-align: center; box-shadow: 0 24px 60px rgba(2,6,23,.28);
  padding: 18px; border-radius: 24px;
  border: 1px solid color-mix(in srgb, var(--pay) 34%, transparent);
  background: linear-gradient(180deg, rgba(255,255,255,.04), transparent 40%), rgba(8,12,22,.9);
}
.brand-stage .checkout-brand { justify-content: center; margin-bottom: 10px; }
.brand-stage h2 { margin: 8px 0 0; font-size: 36px; letter-spacing: -.04em; }
.brand-qr { width: 132px; height: 132px; margin: 14px auto; border-radius: 18px; background-color: #fff;
  background-image: linear-gradient(#0f172a,#0f172a), linear-gradient(#0f172a,#0f172a), linear-gradient(#0f172a,#0f172a), linear-gradient(#0f172a,#0f172a);
  background-size: 28px 28px, 28px 28px, 22px 22px, 12px 12px;
  background-position: 14px 14px, 90px 14px, 14px 96px, 58px 58px;
  background-repeat: no-repeat;
  box-shadow: inset 0 0 0 10px #fff, 0 10px 30px rgba(2,6,23,.18); }
.logo-drop em { display: block; margin-top: 6px; }
.logo-preview { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; background: #fff; margin-bottom: 12px; }
.code-panel { border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px 2px; margin: 0 0 14px; }
.code-panel summary { cursor: pointer; font-weight: 600; margin-bottom: 8px; }
textarea.code { min-height: 130px; font-family: var(--mono); font-size: 12px; }
input[type="color"] { height: 48px; padding: 6px 8px; }
.template-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0 0 12px; }
.template-chip {
  width: 100%; border: 1px solid var(--line); border-radius: 16px; padding: 12px; text-align: left; color: var(--text);
  background: linear-gradient(160deg, color-mix(in srgb, var(--swatch) 34%, transparent), rgba(255,255,255,.03) 62%);
  transition: transform .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.template-chip strong { display: block; font-size: 13px; margin-bottom: 2px; }
.template-chip span { display: block; font-size: 11px; color: var(--muted); }
.template-chip i { display: block; height: 8px; border-radius: 99px; background: var(--swatch); margin-bottom: 10px; box-shadow: 0 0 12px color-mix(in srgb, var(--swatch) 70%, transparent); }
.template-chip.is-on, .template-chip:hover { border-color: var(--swatch); box-shadow: 0 0 0 1px var(--swatch); transform: translateY(-1px); }
.template-preview { margin: 0 0 14px; overflow: hidden; }
.logo-lockup { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.preview-hint { margin: 0 0 14px; color: var(--muted); font-size: 13px; line-height: 1.45; text-align: left; }
.preview-shell { display: grid; gap: 12px; text-align: left; }
.preview-banner { height: 140px; border-radius: 18px; overflow: hidden; border: 1px solid rgba(255,255,255,.08); }
.preview-card {
  border-radius: 22px; padding: 18px; text-align: center;
  border: 1px solid color-mix(in srgb, var(--pay) 34%, transparent);
  background: linear-gradient(180deg, rgba(255,255,255,.04), transparent 40%), rgba(8,12,22,.92);
}
.preview-brand { display: flex; align-items: center; justify-content: center; gap: 12px; text-align: left; margin-bottom: 12px; }
.preview-brand img, .preview-brand .brand-mark { width: 48px; height: 48px; border-radius: 14px; object-fit: cover; }
.preview-brand .brand-mark {
  display: grid; place-items: center; color: #fff; font-weight: 700;
  background: linear-gradient(135deg, var(--pay), color-mix(in srgb, var(--pay) 42%, #0f172a));
}
.preview-amount { font-size: 34px; font-weight: 700; letter-spacing: -.04em; margin: 4px 0 12px; }
.preview-qr {
  width: 132px; height: 132px; margin: 0 auto 12px; border-radius: 18px; background: #fff;
  background-image: linear-gradient(#0f172a,#0f172a), linear-gradient(#0f172a,#0f172a), linear-gradient(#0f172a,#0f172a), linear-gradient(#0f172a,#0f172a);
  background-size: 28px 28px, 28px 28px, 22px 22px, 12px 12px;
  background-position: 14px 14px, 90px 14px, 14px 96px, 58px 58px;
  background-repeat: no-repeat;
  box-shadow: inset 0 0 0 10px #fff;
}
.preview-chip {
  display: inline-flex; margin-bottom: 12px; padding: 6px 10px; border-radius: 999px; font-size: 11px; font-weight: 600;
  color: color-mix(in srgb, var(--pay) 80%, #fff);
  background: color-mix(in srgb, var(--pay) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--pay) 28%, transparent);
}
.preview-card .btn { width: 100%; background: linear-gradient(135deg, var(--pay), color-mix(in srgb, var(--pay) 55%, #082f49)); color: #fff; }
.preview-swal { max-width: 460px !important; }
.notice { border: 1px solid var(--line); background: rgba(14, 165, 233, .08); border-radius: 14px; padding: 12px 14px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.notice.warning { background: rgba(245, 158, 11, .1); }
.toast-stack { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 50; }
.toast {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px;
  box-shadow: var(--shadow); min-width: 240px; animation: rise .35s var(--ease);
}
.menu-btn { display: none; }
.skeleton { height: 220px; border-radius: 16px; background: linear-gradient(90deg, var(--surface-2), rgba(56,189,248,.12), var(--surface-2)); background-size: 200% 100%; animation: shine 1.2s infinite; }
@keyframes shine { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.check { display: flex; gap: 8px; align-items: flex-start; color: var(--muted); font-size: 14px; margin-bottom: 10px; }
.steps { display: flex; gap: 8px; margin-bottom: 16px; }
.steps i { height: 4px; flex: 1; border-radius: 99px; background: var(--line); display: block; }
.steps i.on { background: linear-gradient(90deg, var(--blue), var(--accent)); }
.lang-row, .theme-row { display: flex; gap: 6px; }
.tiny { font-size: 12px; color: var(--muted); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.secret { background: #020617; color: #e2e8f0; border-radius: 12px; padding: 12px; font-family: var(--mono); word-break: break-all; }
.eyebrow { margin: 0 0 8px; color: var(--blue-2); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; }
.lede { color: var(--muted); line-height: 1.65; max-width: 52ch; }
.auth-stage { min-height: 100vh; display: grid; grid-template-columns: 1.12fr .88fr; }
.auth-story {
  position: relative; display: flex; flex-direction: column; justify-content: center; padding: 64px 72px;
}
.auth-story::before {
  content: ""; position: absolute; inset: 28px; border-radius: 32px; border: 1px solid var(--line);
  background:
    radial-gradient(520px 260px at 12% 0%, rgba(14, 165, 233, .32), transparent 62%),
    radial-gradient(420px 280px at 92% 90%, rgba(20, 184, 166, .22), transparent 58%),
    linear-gradient(180deg, rgba(255,255,255,.04), transparent 46%),
    rgba(15, 23, 42, .35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.auth-story > * { position: relative; z-index: 1; }
.auth-story h2 { margin: 18px 0 10px; font-size: 40px; line-height: 1.05; letter-spacing: -.045em; max-width: 14ch; font-weight: 680; }
.auth-panel { display: grid; place-items: center; padding: 32px 28px; align-items: start; overflow: auto; padding-top: 64px; }
.auth-card {
  border-radius: 24px;
  animation: rise .5s var(--ease);
}
.auth-card h1 { margin: 0 0 8px; font-size: 30px; letter-spacing: -.035em; font-weight: 680; }
.auth-links { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 4px 0 16px; }
.btn-block { width: 100%; }
.story-points { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 16px; max-width: 460px; }
.story-points li { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; }
.story-points strong { display: block; margin-bottom: 2px; }
.story-points span { color: var(--muted); font-size: 14px; line-height: 1.45; }
.mark {
  width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center;
  background: rgba(14, 165, 233, .16); color: var(--blue-2); font-weight: 680;
}
.hero { display: grid; grid-template-columns: 1.45fr .8fr; gap: 16px; margin: 8px 0 18px; }
.hero-copy, .hero-side {
  border-radius: 28px; border: 1px solid var(--line); padding: 28px;
  background:
    radial-gradient(460px 180px at 0% 0%, rgba(14, 165, 233, .2), transparent 62%),
    linear-gradient(180deg, rgba(255,255,255,.04), transparent 42%),
    var(--surface);
  box-shadow: var(--shadow);
  animation: rise .5s var(--ease) both;
}
.hero-copy h1 { margin: 0; font-size: 40px; letter-spacing: -.045em; font-weight: 680; }
.hero-balance { margin-top: 22px; }
.hero-balance span, .mini span, .balance-strip span { color: var(--muted); font-size: 13px; }
.hero-balance strong { display: block; margin-top: 4px; font-size: 52px; letter-spacing: -.055em; font-variant-numeric: tabular-nums; line-height: 1; }
.hero-balance em.tiny, .hero-balance .tiny { display: block; margin-top: 8px; font-style: normal; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.hero-side { display: grid; gap: 12px; align-content: center; }
.mini, .balance-strip { padding: 14px 16px; border-radius: 16px; background: rgba(6, 10, 18, .4); border: 1px solid var(--line); }
.mini strong { display: block; margin-top: 4px; font-size: 22px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.balance-strip { display: flex; gap: 12px; align-items: baseline; margin-bottom: 14px; }
.balance-strip strong { font-size: 28px; letter-spacing: -.03em; }
.balance-strip em, .kpi em { font-style: normal; color: var(--blue-2); font-size: 12px; letter-spacing: .08em; }
.kpi { position: relative; overflow: hidden; }
.kpi::before { content: ""; position: absolute; left: 18px; right: 18px; top: 0; height: 2px; background: linear-gradient(90deg, var(--blue), transparent); }
.chart-card h2, .card h2 { margin: 0 0 12px; font-size: 16px; font-weight: 600; letter-spacing: -.02em; }
[data-theme="light"] .mini, [data-theme="light"] .balance-strip { background: rgba(255,255,255,.72); }
@media (prefers-color-scheme: light) {
  [data-theme="system"] .mini, [data-theme="system"] .balance-strip { background: rgba(255,255,255,.72); }
}
.locale-float { margin: 0 0 22px; }
.locale-float select { width: auto; min-width: 148px; border-radius: 999px; padding: 8px 14px; background: rgba(15, 23, 42, .72); }
[data-theme="light"] .locale-float select { background: rgba(255, 255, 255, .9); }
.auth-card.wide { width: min(560px, 100%); }
.form-block { margin-top: 8px; }
.form-block h2 { margin: 8px 0 12px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.phone-row { display: grid; grid-template-columns: 88px 1fr; gap: 8px; }
.phone-row .dial { text-align: center; font-variant-numeric: tabular-nums; }
.choice { display: flex; gap: 10px; align-items: center; margin: 0 0 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; color: var(--muted); }
.choice span { flex: 1; line-height: 1.4; }
.choice a { color: var(--blue-2); }
.auth-foot { margin: 16px 0 0; }
.hero-slim .hero-copy, .hero-slim .hero-side { padding: 22px 24px; }
.hero-slim .hero-balance strong { font-size: 42px; }
.wd-note { margin: -6px 0 16px; }
.wd-grid, .pay-layout { display: grid; grid-template-columns: 1.15fr .85fr; gap: 16px; align-items: start; }
.receipt { position: sticky; top: 84px; }
.receipt-row, .receipt-total { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.receipt-row span, .receipt-total span { color: var(--muted); }
.receipt-row strong, .receipt-total strong { font-family: var(--mono); font-weight: 500; font-variant-numeric: tabular-nums; text-align: right; }
.receipt-row em { font-style: normal; color: var(--blue-2); }
.receipt-total { border-bottom: 0; padding-top: 16px; }
.receipt-total strong { font-family: var(--font); font-size: 26px; font-weight: 620; letter-spacing: -.03em; }
.receipt.is-short [data-q="note"] { color: var(--red); }
.pay-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.pay-amount { margin: 8px 0 12px; font-size: 48px; letter-spacing: -.05em; font-variant-numeric: tabular-nums; line-height: 1; }
input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  width: 22px; height: 22px; min-width: 22px; flex: 0 0 22px;
  margin: 0; padding: 0; border-radius: 7px;
  border: 1.5px solid rgba(148, 163, 184, .55);
  background: var(--bg); display: grid; place-content: center; cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
input[type="checkbox"]:checked {
  background: linear-gradient(135deg, var(--blue), #0284c7);
  border-color: transparent;
  box-shadow: 0 8px 18px rgba(14, 165, 233, .35);
}
input[type="checkbox"]:checked::after {
  content: ""; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px);
}
input[type="checkbox"]:focus { box-shadow: 0 0 0 4px rgba(14, 165, 233, .2); }
.check, .choice {
  display: flex; align-items: center; gap: 12px; margin: 0 0 8px; padding: 13px 14px;
  border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.025); cursor: pointer;
}
.check:hover, .choice:hover { border-color: rgba(56, 189, 248, .4); }
.check:has(input:checked), .choice:has(input:checked) {
  border-color: rgba(56, 189, 248, .55);
  background: linear-gradient(180deg, rgba(14,165,233,.14), rgba(14,165,233,.04));
  color: var(--text);
}
.choice strong, .check strong { display: block; font-weight: 600; color: var(--text); }
.choice em, .check em { display: block; margin-top: 2px; font-style: normal; color: var(--muted); font-size: 12px; font-family: var(--mono); }
.perm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.stack { display: grid; gap: 14px; }
.key-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.key-row .num { margin: 6px 0; word-break: break-all; }
.key-actions { display: flex; gap: 8px; }
.secret-card { margin-bottom: 16px; }
.secret-card .secret { margin: 6px 0 14px; }
.fine-print { margin: 0 0 16px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.kpi i, .kpi svg { width: 18px; height: 18px; color: var(--blue-2); }
.pill-select { width: auto !important; min-width: 0; border-radius: 999px; padding: 8px 14px; background: rgba(255,255,255,.03); }
.ops-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; margin: 18px 0 16px; flex-wrap: wrap; }
.ops-kicker { margin: 0 0 4px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .16em; }
.ops-head h1 { margin: 0; font-size: 28px; font-weight: 640; letter-spacing: -.04em; }
.ops-head p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.ops-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ops-note { margin: 14px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.metric-row {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
}
.metric { padding: 16px 18px; border-right: 1px solid var(--line); min-width: 0; }
.metric:last-child { border-right: 0; }
.metric span { display: block; color: var(--muted); font-size: 12px; }
.metric strong { display: block; margin-top: 6px; font-size: 22px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.ops-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, .8fr); gap: 16px; margin-top: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0; font-size: 14px; font-weight: 600; }
.panel-head a { color: var(--muted); font-size: 13px; }
.panel .table-wrap { padding: 0 6px 6px; }
.queue-item { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); }
.panel > .queue-item:first-of-type { border-top: 0; }
.queue-item span { color: var(--muted); font-size: 13px; }
.queue-item strong { font-size: 14px; font-variant-numeric: tabular-nums; font-weight: 600; }
.rate-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.rate-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; }
.rate-card span { color: var(--muted); font-size: 12px; letter-spacing: .04em; }
.rate-card strong { display: block; margin-top: 8px; font-size: 32px; letter-spacing: -.04em; }
.rate-card em { display: block; margin-top: 8px; color: var(--muted); font-style: normal; font-size: 12px; }
.table-scroll { max-height: 420px; overflow: auto; }
.chart-card canvas { height: 220px !important; }
.swal2-popup {
  background: var(--surface) !important; color: var(--text) !important;
  border: 1px solid var(--line) !important; border-radius: 22px !important;
  font-family: var(--font) !important; box-shadow: var(--shadow) !important;
}
.swal2-title { color: var(--text) !important; font-weight: 650 !important; letter-spacing: -.03em !important; }
.swal2-html-container { color: var(--muted) !important; }
.swal2-confirm {
  background: linear-gradient(135deg, var(--blue), #0284c7) !important;
  border-radius: 12px !important; box-shadow: 0 8px 22px rgba(14,165,233,.28) !important;
}
.swal2-cancel { border-radius: 12px !important; background: transparent !important; border: 1px solid var(--line) !important; color: var(--text) !important; }
.page-loader {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center;
  background: rgba(6, 10, 18, .45); backdrop-filter: blur(4px); opacity: 0; pointer-events: none;
  transition: opacity .2s var(--ease);
}
.page-loader.is-on { opacity: 1; pointer-events: auto; }
.page-loader span {
  width: 42px; height: 42px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.12); border-top-color: var(--blue-2);
  animation: spin .8s linear infinite;
}
@media (max-width: 980px) {
  .kpis, .grid-2, .grid-charts, .split, .auth-stage, .hero, .wd-grid, .pay-layout, .perm-grid, .create-grid, .ops-grid, .rate-grid { grid-template-columns: 1fr; }
  .metric-row { grid-template-columns: 1fr 1fr; }
  .metric:nth-child(2) { border-right: 0; }
  .top-user { display: none; }
  .template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth-story { padding: 24px 18px 4px; min-height: auto; }
  .auth-story::before { inset: 14px; border-radius: 24px; }
  .auth-story h2 { font-size: 28px; max-width: none; }
  .auth-panel { padding: 12px 16px 40px; }
  .auth-card, .auth-card.wide { width: 100%; }
  .hero-balance strong { font-size: 36px; }
  .hero-slim .hero-balance strong { font-size: 32px; }
  .pay-amount { font-size: 36px; }
  .sidebar {
    position: fixed; transform: translateX(-105%); transition: transform .25s var(--ease);
    box-shadow: 24px 0 60px rgba(0,0,0,.35);
  }
  .sidebar.open { transform: none; }
  .menu-btn { display: inline-flex; }
  .content, .topbar { padding-left: 16px; padding-right: 16px; }
  .page-head h1 { font-size: 26px; }
  .checkout-shell { padding: 18px 14px 16px; border-radius: 24px; }
  .checkout-head { flex-wrap: wrap; }
  .copy-row { grid-template-columns: 1fr; }
  .copy-row .btn { width: 100%; min-height: 48px; }
  .secure-chip { display: none; }
  .qr-box { min-height: 200px; }
  .qr-box img, .sim-qr { width: min(210px, 68vw); height: min(210px, 68vw); }
}
@media (max-width: 560px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .top-actions { gap: 6px; }
  .pill-select { min-width: 0; padding: 7px 10px; font-size: 12px; }
  .hero-copy, .hero-side { padding: 20px; border-radius: 22px; }
  .story-points { margin-top: 18px; }
  .checkout-amount h1 { font-size: 34px; }
  .pay-steps li { padding: 9px 10px; }
}
