/* ZKNesia Billing — refined purple/dark theme. Lightweight, self-contained. */
:root {
  --bg: #0b0a12;
  --bg-2: #111019;
  --surface: #16151f;
  --surface-2: #1d1c28;
  --border: #272636;
  --border-soft: #201f2c;
  --text: #ededf2;
  --muted: #9b99ad;
  --primary: #7c5cff;
  --primary-2: #9d7cff;
  --primary-glow: rgba(124, 92, 255, .35);
  --accent: #22d3ee;
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #f87171;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -16px rgba(0,0,0,.7);
  --shadow-lg: 0 12px 40px -16px rgba(0,0,0,.65);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background:
    radial-gradient(900px 500px at 100% -20%, rgba(124,92,255,.10) 0%, transparent 55%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 20px; }

/* Navbar */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(13,10,24,.75);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; }
.brand .logo {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  display: grid; place-items: center; font-size: 18px;
  box-shadow: 0 6px 18px -4px var(--primary-glow);
}
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links a { padding: 8px 14px; border-radius: 10px; color: var(--muted); font-weight: 500; font-size: .94rem; transition: .15s; }
.nav-links a:hover { color: var(--text); background: var(--surface); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px; font-weight: 600; font-size: .92rem;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .1s, opacity .15s;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-2); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); border-color: #34334a; }
.btn-danger { background: transparent; color: var(--danger); border-color: rgba(248,113,113,.35); }
.btn-danger:hover { background: rgba(248,113,113,.12); }
.btn-block { width: 100%; }
.btn-lg { padding: 11px 20px; font-size: .94rem; border-radius: 11px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* Cards & surfaces */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-pad { padding: 22px; }
.grid { display: grid; gap: 18px; }

/* Hero */
.hero { padding: 64px 0 32px; text-align: center; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.hero .gradient { background: linear-gradient(120deg, var(--primary-2), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); font-size: 1.08rem; max-width: 600px; margin: 18px auto 0; }
.eyebrow { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--primary-2); font-size: .8rem; font-weight: 600; margin-bottom: 18px; }

/* Plan grid */
.plans { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); padding: 24px 0 64px; }
.plan-card { position: relative; padding: 24px; display: flex; flex-direction: column; transition: border-color .15s, transform .15s; overflow: hidden; }
.plan-card:hover { transform: translateY(-3px); border-color: var(--primary); }
.plan-card .icon { font-size: 28px; margin-bottom: 8px; }
.plan-card h3 { font-size: 1.3rem; font-weight: 700; }
.plan-card .desc { color: var(--muted); font-size: .88rem; min-height: 38px; margin: 6px 0 14px; }
.plan-card .price { font-size: 1.7rem; font-weight: 800; }
.plan-card .price span { font-size: .88rem; color: var(--muted); font-weight: 500; }
.plan-specs { list-style: none; margin: 16px 0; display: grid; gap: 9px; }
.plan-specs li { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .9rem; }
.plan-specs li b { color: var(--text); font-weight: 600; }
.badge {
  position: absolute; top: 16px; right: -34px; transform: rotate(45deg);
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff; font-size: .68rem; font-weight: 700; padding: 4px 40px; letter-spacing: .04em;
}
.badge.recommended { background: linear-gradient(135deg, var(--accent), #0ea5e9); }

/* Spec tiles */
.spec-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.spec-tile { display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.spec-tile .si { width: 40px; height: 40px; border-radius: 10px; background: rgba(124,92,255,.14); display: grid; place-items: center; font-size: 19px; }
.spec-tile .sl { font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.spec-tile .sv { font-size: 1.02rem; font-weight: 700; }

/* Forms */
.field { margin-bottom: 16px; }
.label { display: block; font-size: .84rem; color: var(--muted); margin-bottom: 7px; font-weight: 500; }
.input, .select, textarea.input {
  width: 100%; padding: 11px 14px; border-radius: 10px;
  background: var(--bg-2); border: 1px solid var(--border); color: var(--text);
  font-size: 16px; transition: border-color .15s, box-shadow .15s; font-family: inherit;
}
@media (min-width: 768px) { .input, .select, textarea.input { font-size: .92rem; } }
.input::placeholder, textarea.input::placeholder { color: #6f6d80; }
.input:focus, .select:focus, textarea.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124,92,255,.18); }
.select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239b99ad' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; font-size: .9rem; color: var(--muted); }
.checkbox-row input { margin-top: 3px; accent-color: var(--primary); width: 16px; height: 16px; flex-shrink: 0; }

/* Auth */
.auth-wrap { min-height: calc(100vh - 66px); display: grid; place-items: center; padding: 40px 20px; }
.auth-card { width: 100%; max-width: 410px; padding: 32px; }
.auth-card h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); font-size: .92rem; margin-bottom: 24px; }
.auth-foot { text-align: center; color: var(--muted); font-size: .9rem; margin-top: 18px; }
.auth-foot a { color: var(--primary-2); font-weight: 600; }

/* Alerts */
.alert { padding: 12px 15px; border-radius: 10px; font-size: .9rem; margin-bottom: 16px; border: 1px solid; }
.alert-success { background: rgba(52,211,153,.1); border-color: rgba(52,211,153,.28); color: #6ee7b7; }
.alert-error { background: rgba(248,113,113,.1); border-color: rgba(248,113,113,.28); color: #fca5a5; }
.alert-info { background: rgba(124,92,255,.1); border-color: rgba(124,92,255,.28); color: var(--primary-2); }

/* Status pills */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: .76rem; font-weight: 600; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-pending { background: rgba(251,191,36,.12); color: var(--warning); }
.pill-active { background: rgba(52,211,153,.12); color: var(--success); }
.pill-suspended { background: rgba(248,113,113,.12); color: var(--danger); }
.pill-expired, .pill-cancelled { background: rgba(155,153,173,.14); color: var(--muted); }

/* Layout helpers */
.two-col { display: grid; grid-template-columns: 1.6fr 1fr; gap: 22px; align-items: start; }
.section-title { font-size: 1.45rem; font-weight: 700; letter-spacing: -.02em; }
.muted { color: var(--muted); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.summary-line { display: flex; justify-content: space-between; padding: 7px 0; font-size: .92rem; }
.summary-line .v { font-weight: 600; }
.total-line { display: flex; justify-content: space-between; align-items: center; padding-top: 14px; }
.total-line .amt { font-size: 1.55rem; font-weight: 800; color: var(--success); }
.mb-0{margin-bottom:0}.mt-2{margin-top:8px}.mt-3{margin-top:16px}.mt-4{margin-top:24px}
.text-c{text-align:center}.flex{display:flex}.gap{gap:12px}.wrap{flex-wrap:wrap}

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(6,5,12,.7); backdrop-filter: blur(6px); display: none; place-items: center; z-index: 100; padding: 20px; }
.modal-overlay.open { display: grid; }
.modal { width: 100%; max-width: 430px; padding: 26px; animation: pop .18s ease; box-shadow: var(--shadow-lg); }
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.modal h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 4px; }
.method-opt { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; transition: .15s; margin-top: 12px; background: var(--bg-2); }
.method-opt:hover { border-color: var(--primary); background: var(--surface-2); }
.method-opt .mi { width: 44px; height: 44px; border-radius: 11px; background: rgba(124,58,237,.16); display: grid; place-items: center; font-size: 22px; }
.method-opt .mt { font-weight: 600; }
.method-opt .md { font-size: .82rem; color: var(--muted); }

/* Countdown / QR */
.countdown { font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--warning); }
.qr-box { background: #fff; padding: 16px; border-radius: 16px; display: inline-block; }
.qr-box img { display: block; width: 260px; height: 260px; }
.va-number { font-size: 1.5rem; font-weight: 800; letter-spacing: .06em; font-family: ui-monospace, monospace; }

/* Table */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--border); }
.table td { padding: 14px; border-bottom: 1px solid var(--border); font-size: .92rem; }
.table tr:last-child td { border-bottom: none; }

/* Empty state */
.empty { text-align: center; padding: 56px 24px; }
.empty .ei { font-size: 48px; margin-bottom: 12px; }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 28px 0; color: var(--muted); font-size: .9rem; margin-top: 48px; }

@media (max-width: 820px) {
  .two-col { grid-template-columns: 1fr; }
  .nav-links a:not(.btn) { display: none; }
}

/* ───────────────────────── Portal (client area) ───────────────────────── */
.portal { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  padding: 18px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  padding-top: max(18px, env(safe-area-inset-top));
}
.sidebar .brand { margin-bottom: 22px; padding: 6px 8px; }
.sidebar .brand img { width: 32px; height: 32px; border-radius: 8px; }
.side-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .07em; color: #6c6a7e; padding: 16px 12px 7px; font-weight: 600; }
.side-link {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 9px;
  color: var(--muted); font-weight: 500; font-size: .9rem; margin-bottom: 1px;
  transition: background .12s, color .12s;
}
.side-link:hover { background: var(--surface); color: var(--text); }
.side-link.active { background: var(--surface-2); color: #fff; }
.side-link.active .ic { color: var(--primary-2); }
.side-link .ic { width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--muted); }
.side-link .ic svg { width: 18px; height: 18px; }

.portal-main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 60px; border-bottom: 1px solid var(--border); display: flex; align-items: center;
  justify-content: space-between; padding: 0 24px; background: rgba(11,10,18,.7); backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 40;
}
.topbar .page-title { font-weight: 700; font-size: 1.02rem; }
.acct-chip { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 9px; background: var(--surface); border: 1px solid var(--border); }
.acct-chip .av { width: 30px; height: 30px; border-radius: 8px; background: var(--primary); display: grid; place-items: center; font-weight: 700; font-size: .85rem; color: #fff; }
.portal-body { padding: 26px 24px; flex: 1; min-width: 0; }

/* Stat cards */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.stat { padding: 18px; display: flex; align-items: center; gap: 14px; }
.stat .si { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; font-size: 20px; flex-shrink: 0; }
.stat .sv { font-size: 1.5rem; font-weight: 800; line-height: 1; }
.stat .sl { color: var(--muted); font-size: .82rem; margin-top: 3px; }
.si.violet { background: rgba(124,92,255,.15); }
.si.green { background: rgba(52,211,153,.14); }
.si.amber { background: rgba(251,191,36,.14); }
.si.cyan { background: rgba(34,211,238,.14); }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.panel-head { padding: 15px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.panel-head h3 { font-size: 1rem; font-weight: 700; }
.panel-body { padding: 18px; }
.panel-body.flush { padding: 0; overflow-x: auto; }

.table-clean { width: 100%; border-collapse: collapse; }
.table-clean th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 12px 18px; background: var(--bg-2); font-weight: 600; }
.table-clean td { padding: 14px 18px; border-top: 1px solid var(--border); font-size: .9rem; vertical-align: middle; }
.table-clean tbody tr { transition: background .12s; }
.table-clean tbody tr:hover { background: var(--surface-2); }
.svc-name { display: flex; align-items: center; gap: 12px; }
.svc-name .si { width: 36px; height: 36px; border-radius: 9px; background: rgba(124,92,255,.15); display: grid; place-items: center; font-size: 17px; flex-shrink: 0; }

/* Store cards inside portal */
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }

@media (max-width: 900px) {
  .portal { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: -280px; width: 256px; z-index: 60; transition: left .2s; }
  .sidebar.open { left: 0; }
  .topbar .menu-toggle { display: inline-flex !important; }
}
.menu-toggle { display: none; }

/* ───────────────────────── Payment success ───────────────────────── */
.success-wrap { max-width: 620px; margin: 0 auto; }
.success-hero { text-align: center; padding: 36px 24px 8px; }
.success-check {
  width: 96px; height: 96px; border-radius: 50%; margin: 0 auto 20px;
  background: radial-gradient(circle at 30% 30%, #34d399, #059669);
  display: grid; place-items: center; box-shadow: 0 12px 40px -8px rgba(52,211,153,.6);
  animation: pop-in .5s cubic-bezier(.2,.9,.3,1.4);
}
.success-check svg { width: 50px; height: 50px; stroke: #fff; stroke-width: 4; fill: none; }
.success-check svg path { stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .5s .25s forwards ease; }
@keyframes pop-in { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.success-hero h1 { font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; }
.success-hero p { color: var(--muted); margin-top: 8px; }

/* confetti */
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 90; }
.confetti i {
  position: absolute; top: -12px; width: 9px; height: 14px; opacity: .9;
  animation: fall linear forwards;
}
@keyframes fall {
  to { transform: translateY(105vh) rotate(720deg); opacity: 1; }
}

/* Password show/hide toggle */
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 44px; }
.pw-toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: transparent; border: none; cursor: pointer; font-size: 1.05rem;
  padding: 6px; line-height: 1; border-radius: 8px;
}
.pw-toggle:hover { background: var(--surface-2); }

/* ───────────────────────── Mini bar charts (analytics) ───────────────────────── */
.chart { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding-top: 10px; }
.chart .bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.chart .bar .fill {
  width: 100%; max-width: 22px; border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, var(--primary-2), var(--primary));
  transition: height .3s; min-height: 2px;
}
.chart .bar .fill.green { background: linear-gradient(180deg, #34d399, #059669); }
.chart .bar .lbl { font-size: .62rem; color: var(--muted); margin-top: 6px; white-space: nowrap; }
.chart .bar .val { font-size: .6rem; color: var(--text); margin-bottom: 4px; opacity: .7; }
.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.bar-row .name { width: 110px; font-size: .85rem; color: var(--muted); }
.bar-row .track { flex: 1; height: 10px; background: var(--bg-2); border-radius: 6px; overflow: hidden; }
.bar-row .track i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-2)); border-radius: 6px; }
.bar-row .num { width: 30px; text-align: right; font-weight: 600; font-size: .85rem; }

/* ───────────────────────── Ticket conversation ───────────────────────── */
.msg { display: flex; margin-bottom: 14px; }
.msg.staff { justify-content: flex-start; }
.msg.cust { justify-content: flex-end; }
.msg .bubble { max-width: 78%; padding: 12px 15px; border-radius: 14px; font-size: .92rem; line-height: 1.5; }
.msg.staff .bubble { background: var(--surface-2); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.msg.cust .bubble { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; border-bottom-right-radius: 4px; }
.msg .who { font-size: .72rem; opacity: .8; margin-bottom: 4px; font-weight: 600; }
.msg .time { font-size: .68rem; opacity: .6; margin-top: 5px; }
.msg .bubble.staff-badge .who { color: var(--primary-2); }

/* ───────────────────────── Responsive / mobile ───────────────────────── */
/* Smooth horizontal scroll for tables on touch devices */
.panel-body.flush, .table-clean, .card[style*="overflow-x"] { -webkit-overflow-scrolling: touch; }
table.table-clean, table.table { min-width: 520px; }
.panel-body.flush { overflow-x: auto; }

/* Sidebar backdrop (mobile) */
.sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(6,4,16,.6); backdrop-filter: blur(2px); z-index: 55; }
.sidebar-backdrop.show { display: block; }

@media (max-width: 900px) {
  .acct-chip .av { margin: 0; }
  .acct-chip > div { display: none; }            /* hide name/email, keep avatar */
  .topbar { padding: 0 16px; }
  .portal-body { padding: 18px 16px; }
}

@media (max-width: 640px) {
  /* Stack every multi-column grid on phones (overrides inline templates) */
  .grid { grid-template-columns: 1fr !important; }
  .two-col { grid-template-columns: 1fr !important; }
  .container { padding: 0 16px; }
  .card-pad { padding: 18px; }
  .hero { padding: 40px 0 20px; }
  .auth-card { padding: 26px 20px; }
  .section-title { font-size: 1.35rem; }
  .total-line .amt { font-size: 1.35rem; }
  .nav-inner { height: 58px; }
  .btn { padding: 11px 16px; }
  .btn-lg { padding: 13px 20px; }
  /* analytics bars: tighter labels */
  .chart { gap: 3px; height: 130px; }
  .chart .bar .lbl { font-size: .52rem; }
  .bar-row .name { width: 84px; font-size: .8rem; }
  /* modal full-ish width */
  .modal { max-width: 100%; }
  .qr-box img { width: 220px; height: 220px; }
}

@media (max-width: 380px) {
  .stats { grid-template-columns: 1fr; }
  .stat .sv { font-size: 1.3rem; }
}

/* ───────────────────────── Polish & accessibility ───────────────────────── */
/* Custom scrollbar */
* { scrollbar-width: thin; scrollbar-color: #34334a transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-thumb { background: #2f2e40; border-radius: 6px; }
*::-webkit-scrollbar-thumb:hover { background: #3c3b50; }

/* Keyboard focus ring (not on mouse) */
:focus-visible { outline: 2px solid var(--primary-2); outline-offset: 2px; border-radius: 6px; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .confetti { display: none !important; }
}

/* iOS safe areas */
.topbar { padding-top: env(safe-area-inset-top); height: calc(60px + env(safe-area-inset-top)); }
.footer { padding-bottom: max(28px, env(safe-area-inset-bottom)); }
.portal-body { padding-bottom: max(26px, env(safe-area-inset-bottom)); }

/* Links inside content */
a.inline-link { color: var(--primary-2); font-weight: 600; }

/* Capacity bars (admin nodes) */
.cap { display: flex; flex-direction: column; gap: 4px; min-width: 140px; }
.cap .lbl { display: flex; justify-content: space-between; font-size: .76rem; color: var(--muted); }
.cap .track { height: 6px; background: var(--bg-2); border-radius: 6px; overflow: hidden; }
.cap .track i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-2)); }
.cap.warn .track i { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.cap.full .track i { background: linear-gradient(90deg, #f87171, #ef4444); }

/* ───────────────────────── Success animation (upgraded) ───────────────────────── */
.success-anim { position: relative; width: 120px; height: 120px; margin: 0 auto 24px; }
.success-anim .ring {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle, rgba(52,211,153,.25), rgba(52,211,153,0) 70%);
  animation: ring-pulse 1.6s ease-out infinite;
}
.success-anim .ring2 { animation-delay: .4s; }
.success-anim svg { position: relative; width: 100%; height: 100%; display: block; }
.success-anim .circle-bg { fill: none; stroke: rgba(52,211,153,.15); stroke-width: 4; }
.success-anim .circle-fg {
  fill: none; stroke: #34d399; stroke-width: 4; stroke-linecap: round;
  stroke-dasharray: 314; stroke-dashoffset: 314;
  transform: rotate(-90deg); transform-origin: 50% 50%;
  animation: circle-draw .7s cubic-bezier(.65,.05,.36,1) .1s forwards;
  filter: drop-shadow(0 0 12px rgba(52,211,153,.45));
}
.success-anim .check {
  fill: none; stroke: #fff; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 36; stroke-dashoffset: 36;
  animation: check-draw .35s cubic-bezier(.5,.1,.3,1) .65s forwards;
}
.success-anim .check-bg {
  fill: #10b981;
  transform-origin: 50% 50%; transform: scale(0);
  animation: check-pop .35s cubic-bezier(.4,0,.2,1.2) .55s forwards;
  filter: drop-shadow(0 6px 18px rgba(52,211,153,.55));
}
@keyframes circle-draw { to { stroke-dashoffset: 0; } }
@keyframes check-draw { to { stroke-dashoffset: 0; } }
@keyframes check-pop { to { transform: scale(1); } }
@keyframes ring-pulse { 0%{transform:scale(.7);opacity:.9} 100%{transform:scale(1.6);opacity:0} }
@media (prefers-reduced-motion: reduce) {
  .success-anim .ring { animation: none; }
  .success-anim .circle-fg, .success-anim .check, .success-anim .check-bg { animation-duration: .001s !important; animation-delay: 0s !important; }
}

/* ───────────────────────── Auth (split layout) ───────────────────────── */
.auth-split { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100vh - 66px); }
.auth-split .auth-art {
  position: relative; overflow: hidden; padding: 48px;
  background:
    radial-gradient(900px 500px at 100% 0%, rgba(124,92,255,.22), transparent 60%),
    radial-gradient(700px 400px at 0% 100%, rgba(34,211,238,.14), transparent 55%),
    var(--bg-2);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; justify-content: space-between;
}
.auth-split .auth-art::before {
  content: ''; position: absolute; inset: 0; opacity: .4; pointer-events: none;
  background-image:
    linear-gradient(rgba(124,92,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,92,255,.06) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}
.auth-split .auth-art .top, .auth-split .auth-art .mid, .auth-split .auth-art .bot { position: relative; z-index: 1; }
.auth-split .auth-art .brand-row { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 1.25rem; }
.auth-split .auth-art .brand-row img { width: 40px; height: 40px; border-radius: 10px; }
.auth-split .auth-art h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.15; max-width: 26ch; }
.auth-split .auth-art h2 span { color: var(--primary-2); }
.auth-split .auth-art p { color: var(--muted); margin-top: 14px; max-width: 38ch; font-size: 1rem; line-height: 1.6; }
.auth-feats { display: grid; gap: 12px; margin-top: 24px; max-width: 380px; }
.auth-feat { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: rgba(22,21,31,.6); backdrop-filter: blur(6px); }
.auth-feat .ic { width: 32px; height: 32px; border-radius: 9px; background: rgba(124,92,255,.15); color: var(--primary-2); display: grid; place-items: center; flex-shrink: 0; }
.auth-feat .ic svg { width: 18px; height: 18px; }
.auth-feat .ft strong { display: block; font-size: .92rem; }
.auth-feat .ft span { color: var(--muted); font-size: .82rem; }
.auth-split .auth-form-wrap { display: grid; place-items: center; padding: 40px 24px; }
.auth-split .auth-form { width: 100%; max-width: 400px; }
.auth-split .auth-form h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: 6px; }
.auth-split .auth-form .sub { color: var(--muted); font-size: .92rem; margin-bottom: 22px; }

@media (max-width: 900px) {
  .auth-split { grid-template-columns: 1fr; min-height: auto; }
  .auth-split .auth-art { padding: 32px 24px; border-right: none; border-bottom: 1px solid var(--border); }
  .auth-split .auth-art h2 { font-size: 1.6rem; }
  .auth-feats { display: none; }
}

/* ───────────────────────── Dashboard hero ───────────────────────── */
.hero-card {
  position: relative; overflow: hidden; padding: 28px;
  background:
    radial-gradient(700px 220px at 100% -30%, rgba(124,92,255,.22), transparent 60%),
    var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between;
  box-shadow: var(--shadow);
}
.hero-card::before {
  content: ''; position: absolute; right: -40px; top: -40px; width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(124,92,255,.18), transparent 65%);
  border-radius: 50%; pointer-events: none;
}
.hero-card .left { position: relative; }
.hero-card h1 { font-size: 1.5rem; font-weight: 700; letter-spacing: -.01em; }
.hero-card h1 .wave { display: inline-block; animation: wave 1.6s ease-in-out infinite; transform-origin: 70% 70%; }
.hero-card p { color: var(--muted); font-size: .94rem; margin-top: 4px; }
@keyframes wave { 0%,60%,100%{transform:rotate(0)} 10%,30%,50%{transform:rotate(14deg)} 20%,40%{transform:rotate(-8deg)} }
@media (prefers-reduced-motion: reduce) { .hero-card h1 .wave { animation: none; } }

.quick-actions { display: flex; gap: 10px; flex-wrap: wrap; position: relative; }
.qa-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px;
  border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text); font-weight: 600; font-size: .88rem; transition: border-color .15s, background .15s;
}
.qa-btn:hover { border-color: var(--primary); background: var(--surface); }
.qa-btn svg { width: 16px; height: 16px; }
.qa-btn.primary { background: var(--primary); border-color: transparent; color: #fff; }
.qa-btn.primary:hover { background: var(--primary-2); }

/* Stat refinement */
.stat .delta { font-size: .72rem; padding: 2px 8px; border-radius: 999px; background: rgba(52,211,153,.12); color: var(--success); margin-top: 6px; display: inline-block; }

/* ───────────────────────── Sensitive value (blur until hover) ───────────────────────── */
.sensitive {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 10px; border-radius: 8px; background: var(--bg-2);
  border: 1px solid var(--border); cursor: pointer; user-select: all;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .95rem; font-weight: 600;
  transition: border-color .15s;
}
.sensitive:hover { border-color: var(--primary); }
.sensitive .val {
  filter: blur(7px); transition: filter .18s ease;
  -webkit-user-select: text; user-select: text;
}
.sensitive:hover .val,
.sensitive:focus-within .val,
.sensitive.revealed .val { filter: none; }
.sensitive .ic { width: 14px; height: 14px; color: var(--muted); flex-shrink: 0; }
.sensitive .ic svg { width: 14px; height: 14px; }
.sensitive .hint { font-size: .68rem; color: var(--muted); font-weight: 500; opacity: 1; transition: opacity .15s; font-family: 'Inter', sans-serif; }
.sensitive:hover .hint, .sensitive.revealed .hint { opacity: 0; }
@media (hover: none) {
  /* Touch devices: tap to reveal */
  .sensitive:active .val { filter: none; }
}


/* ───────────────────────── Dashboard refresh (modern stat + service cards) ───────────────────────── */
.eyebrow-chip {
  display: inline-block; padding: 5px 12px; border-radius: 999px;
  background: rgba(124,92,255,.14); border: 1px solid rgba(124,92,255,.32);
  color: var(--primary-2); font-size: .72rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; margin-bottom: 8px;
}
.hero-card .left h1 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); }

/* New stat tile */
.stat-card {
  position: relative; padding: 20px; display: grid;
  grid-template-areas: "icon ." "value value" "label label";
  grid-template-columns: auto 1fr; row-gap: 6px;
  transition: transform .15s, border-color .15s;
}
.stat-card:hover { transform: translateY(-2px); border-color: rgba(124,92,255,.4); }
.stat-card .si-wrap, .stat-card .si-img { grid-area: icon; }
.stat-card .sv { grid-area: value; font-size: 1.75rem; font-weight: 800; line-height: 1; letter-spacing: -.02em; margin-top: 14px; }
.stat-card .sl { grid-area: label; color: var(--muted); font-size: .82rem; font-weight: 500; }
.stat-card .si-wrap {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
}
.stat-card .si-wrap svg { width: 22px; height: 22px; }
.si-wrap.violet { background: rgba(124,92,255,.16); color: var(--primary-2); }
.si-wrap.green  { background: rgba(34,197,94,.18);  color: #4ade80; }
.si-wrap.amber  { background: rgba(251,191,36,.16); color: var(--warning); }
.si-wrap.cyan   { background: rgba(34,211,238,.16); color: var(--accent); }
.si-wrap.rose   { background: rgba(248,113,113,.16); color: var(--danger); }
.stat-card .si-img {
  width: 44px; height: 44px; display: grid; place-items: center;
  filter: drop-shadow(0 6px 18px rgba(34,197,94,.35));
}
.stat-card .si-img img { width: 100%; height: 100%; }
.stat-card-active {
  background: linear-gradient(160deg, rgba(34,197,94,.10), rgba(22,21,31,.8) 60%);
  border-color: rgba(34,197,94,.28);
}
.stat-card-active .sv { color: #4ade80; }

/* Service grid (modern card layout, replaces table look) */
.svc-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}
.svc-card {
  display: flex; flex-direction: column; gap: 14px; padding: 18px;
  transition: transform .15s, border-color .15s, box-shadow .15s;
  position: relative; overflow: hidden;
}
.svc-card::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(420px 160px at 100% 0%, rgba(124,92,255,.10), transparent 60%);
  opacity: 0; transition: opacity .2s;
}
.svc-card:hover { transform: translateY(-3px); border-color: rgba(124,92,255,.4); box-shadow: var(--shadow-lg); }
.svc-card:hover::before { opacity: 1; }
.svc-card.is-suspended { opacity: .82; }
.svc-card .svc-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 10px;
}
.svc-card .svc-name { display: flex; align-items: center; gap: 12px; min-width: 0; }
.svc-card .svc-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 10px; background: rgba(124,92,255,.16); color: var(--primary-2);
  display: grid; place-items: center;
}
.svc-card .svc-icon svg { width: 20px; height: 20px; }
.svc-card .svc-title {
  font-weight: 700; font-size: 1rem; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14ch;
}
.svc-card .svc-meta { display: grid; gap: 8px; font-size: .88rem; }
.svc-card .svc-meta-row { display: flex; align-items: center; gap: 10px; }
.svc-card .svc-meta-row svg { width: 15px; height: 15px; }
.svc-card .svc-actions {
  display: flex; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border-soft);
  margin-top: auto;
}
.svc-card .svc-actions .btn { flex: 1; }
.btn-sm { padding: 8px 12px; font-size: .85rem; border-radius: 9px; }
.text-warn { color: var(--warning); font-weight: 600; }

/* Empty state polish */
.empty .ei-wrap {
  width: 64px; height: 64px; margin: 0 auto 14px;
  border-radius: 16px; background: rgba(124,92,255,.16); color: var(--primary-2);
  display: grid; place-items: center;
}
.empty .ei-wrap svg { width: 30px; height: 30px; }
.empty h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; }

/* ───────────────────────── Refined breakpoints — every viewport ───────────────────────── */
/* Tighten stat layout on smaller screens */
@media (max-width: 768px) {
  .stats { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .stat-card { padding: 16px; }
  .stat-card .sv { font-size: 1.45rem; margin-top: 10px; }
  .stat-card .sl { font-size: .76rem; }
  .stat-card .si-wrap, .stat-card .si-img { width: 38px; height: 38px; }
  .stat-card .si-wrap svg { width: 19px; height: 19px; }
  .svc-grid { grid-template-columns: 1fr; gap: 12px; }
  .hero-card { padding: 22px; }
  .hero-card h1 { font-size: 1.3rem; }
}

@media (max-width: 420px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .quick-actions .qa-btn { padding: 9px 12px; font-size: .82rem; }
  .qa-btn svg { width: 14px; height: 14px; }
  .svc-card { padding: 16px; }
  .svc-card .svc-title { max-width: 11ch; font-size: .96rem; }
}

/* Touch-target safety on phones (>= 44px tap area) */
@media (hover: none) and (pointer: coarse) {
  .btn, .qa-btn { min-height: 42px; }
  .btn-sm { min-height: 38px; }
}

/* Crisper card hover only when device has hover */
@media (hover: none) {
  .svc-card:hover, .stat-card:hover { transform: none; }
}

/* Slight tighten of admin tables on small screens */
@media (max-width: 640px) {
  .table-clean th, .table-clean td { padding: 11px 14px; font-size: .85rem; }
  .panel-head { padding: 13px 15px; }
  .panel-head h3 { font-size: .96rem; }
}


/* ───────────────────────── Menu toggle icon sizing ───────────────────────── */
.menu-toggle svg { width: 20px; height: 20px; }
.menu-toggle { display: none; }
@media (max-width: 900px) {
  .menu-toggle { display: inline-flex !important; align-items: center; justify-content: center; }
}

/* Hero card eyebrow chip on mobile keeps its rhythm */
@media (max-width: 480px) {
  .eyebrow-chip { font-size: .65rem; padding: 4px 10px; }
  .hero-card .left p { font-size: .88rem; }
}


/* ───────────────────────── Public verification page ───────────────────────── */
.verify-seal {
    width: 110px; height: 110px; margin: 0 auto;
    border-radius: 50%;
    display: grid; place-items: center;
    background: radial-gradient(circle at 35% 30%, rgba(34,197,94,.22), rgba(34,197,94,0) 70%);
    filter: drop-shadow(0 12px 30px rgba(34,197,94,.35));
}
.verify-seal-bad {
    background: radial-gradient(circle at 35% 30%, rgba(248,113,113,.22), rgba(248,113,113,0) 70%);
    filter: drop-shadow(0 12px 30px rgba(248,113,113,.35));
}
.verify-meta {
    text-align: left;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 6px 18px;
}
.verify-meta .vm-row {
    display: flex; justify-content: space-between; align-items: center;
    gap: 14px;
    padding: 11px 0; font-size: .9rem;
    border-bottom: 1px solid var(--border-soft);
}
.verify-meta .vm-row:last-child { border-bottom: none; }
.verify-meta .vm-row .v { font-weight: 600; text-align: right; word-break: break-all; }
@media (max-width: 540px) {
    .verify-meta .vm-row { flex-direction: column; align-items: flex-start; gap: 4px; padding: 9px 0; }
    .verify-meta .vm-row .v { text-align: left; }
}


/* ───────────────────────── Profile (avatar) ───────────────────────── */
.profile-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.avatar-lg { width: 76px; height: 76px; border-radius: 16px; object-fit: cover; flex-shrink: 0; }
.avatar-initials {
    display: grid; place-items: center; background: linear-gradient(135deg, #7c5cff, #9d7cff);
    color: #fff; font-size: 1.8rem; font-weight: 800;
}
.acct-chip .av-img { object-fit: cover; }

/* ───────────────────────── Wallet ───────────────────────── */
.hero-balance { text-align: right; }
.hero-balance .balance-amount {
    font-size: 1.9rem; font-weight: 800; color: #4ade80;
    font-variant-numeric: tabular-nums; letter-spacing: -.01em;
}
.amount-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.amount-chip {
    background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
    padding: 10px 12px; border-radius: 10px; font-size: .88rem; font-weight: 600;
    cursor: pointer; transition: .15s;
}
.amount-chip:hover { border-color: var(--primary); }
.amount-chip.active { background: var(--primary); color: #fff; border-color: transparent; }

.side-bal {
    margin-left: auto; font-size: .68rem; padding: 2px 8px; border-radius: 999px;
    background: rgba(34,197,94,.14); color: #4ade80; font-weight: 700;
    font-variant-numeric: tabular-nums; white-space: nowrap;
}

/* ───────────────────────── Status page ───────────────────────── */
.status-banner {
    display: flex; align-items: center; gap: 16px;
    padding: 22px 24px; border-radius: 16px;
    border: 1px solid var(--border); background: var(--surface);
}
.status-banner-success {
    background: linear-gradient(160deg, rgba(34,197,94,.12), rgba(22,21,31,.9));
    border-color: rgba(34,197,94,.3);
}
.status-banner-warn {
    background: linear-gradient(160deg, rgba(251,191,36,.12), rgba(22,21,31,.9));
    border-color: rgba(251,191,36,.3);
}
.status-banner-error {
    background: linear-gradient(160deg, rgba(248,113,113,.14), rgba(22,21,31,.9));
    border-color: rgba(248,113,113,.3);
}
.status-banner .sb-icon { width: 56px; height: 56px; display: grid; place-items: center; }
.status-banner .sb-icon svg { width: 32px; height: 32px; color: var(--danger); }
.status-banner .sb-title { font-size: 1.1rem; font-weight: 800; }
.status-banner .sb-sub { color: var(--muted); font-size: .82rem; margin-top: 2px; }

.status-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.status-card { padding: 16px; }
.status-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.status-card .status-name { font-weight: 700; }
.uptime-row { display: flex; justify-content: space-between; padding: 6px 0; }

.history-bars { display: flex; gap: 2px; align-items: flex-end; height: 22px; }
.history-bars .hbar { flex: 1; height: 16px; border-radius: 2px; }
.hbar-up { background: #34d399; }
.hbar-partial { background: #fbbf24; }
.hbar-down { background: #f87171; }
.hbar-na { background: #2f2e40; }


/* ════════════════════════════════════════════════════════════════════
 *  ZKNesia · Premium UI System
 *  Distinctive design tokens that lift the product above stock dashboards.
 * ════════════════════════════════════════════════════════════════════ */

:root {
    /* Brand depth */
    --bg-deep: #07060f;
    --primary-deep: #6235ff;
    --accent-electric: #38bdf8;
    --accent-mint: #34d399;
    --accent-magenta: #ec4899;
    --gradient-aurora: linear-gradient(135deg, #6235ff 0%, #ec4899 50%, #38bdf8 100%);
    --gradient-mesh-1: radial-gradient(900px 480px at 10% -10%, rgba(99, 53, 255, .22), transparent 55%);
    --gradient-mesh-2: radial-gradient(700px 460px at 100% 20%, rgba(56, 189, 248, .12), transparent 55%);
    --gradient-mesh-3: radial-gradient(700px 380px at 50% 110%, rgba(236, 72, 153, .10), transparent 55%);
    --shadow-orb: 0 12px 40px -8px rgba(124, 92, 255, .55);
}

/* Aurora background for marketing-y pages */
.bg-aurora {
    position: relative; overflow: hidden;
}
.bg-aurora::before {
    content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0;
    background:
        var(--gradient-mesh-1),
        var(--gradient-mesh-2),
        var(--gradient-mesh-3);
}
.bg-aurora > * { position: relative; z-index: 1; }

/* Glass cards — subtle frosted layer */
.glass {
    background: rgba(22, 21, 31, .72);
    backdrop-filter: blur(14px) saturate(120%);
    -webkit-backdrop-filter: blur(14px) saturate(120%);
    border: 1px solid rgba(255, 255, 255, .06);
}
.glass-strong {
    background: rgba(15, 14, 22, .82);
    backdrop-filter: blur(22px) saturate(130%);
    -webkit-backdrop-filter: blur(22px) saturate(130%);
    border: 1px solid rgba(255, 255, 255, .08);
}

/* Gradient text */
.gradient-text {
    background: var(--gradient-aurora);
    -webkit-background-clip: text; background-clip: text;
    color: transparent;
    background-size: 200% 200%;
    animation: aurora-shift 12s ease-in-out infinite;
}
@keyframes aurora-shift {
    0%,100% { background-position: 0% 50%; }
    50%     { background-position: 100% 50%; }
}

/* Live pulse dot — for online/active indicators */
.live-dot {
    display: inline-block;
    width: 8px; height: 8px; border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 0 0 rgba(52, 211, 153, .7);
    animation: live-pulse 1.6s cubic-bezier(.4, 0, .2, 1) infinite;
    vertical-align: middle;
}
@keyframes live-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(52, 211, 153, .55); }
    70%  { box-shadow: 0 0 0 10px rgba(52, 211, 153, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}
.live-dot.warn { background: #fbbf24; box-shadow: 0 0 0 0 rgba(251,191,36,.55); animation-name: live-pulse-warn; }
.live-dot.down { background: #f87171; box-shadow: 0 0 0 0 rgba(248,113,113,.55); animation-name: live-pulse-down; }
@keyframes live-pulse-warn { 0%{box-shadow:0 0 0 0 rgba(251,191,36,.55);} 70%{box-shadow:0 0 0 10px rgba(251,191,36,0);} 100%{box-shadow:0 0 0 0 rgba(251,191,36,0);} }
@keyframes live-pulse-down { 0%{box-shadow:0 0 0 0 rgba(248,113,113,.55);} 70%{box-shadow:0 0 0 10px rgba(248,113,113,0);} 100%{box-shadow:0 0 0 0 rgba(248,113,113,0);} }

/* Plan icon as glowing gradient orb (replaces flat emoji) */
.plan-orb {
    position: relative; display: grid; place-items: center;
    width: 72px; height: 72px; border-radius: 22px;
    background: linear-gradient(135deg, rgba(124, 92, 255, .25), rgba(56, 189, 248, .14));
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: var(--shadow-orb), inset 0 1px 0 rgba(255, 255, 255, .12);
    font-size: 32px; line-height: 1;
    transition: transform .3s cubic-bezier(.2, .9, .3, 1.4);
}
.plan-orb::after {
    content: ''; position: absolute; inset: -1px; border-radius: inherit;
    background: linear-gradient(135deg, rgba(124, 92, 255, .55), transparent 50%, rgba(56, 189, 248, .35));
    z-index: -1; filter: blur(14px); opacity: .55;
}
.plan-card:hover .plan-orb { transform: rotate(-6deg) scale(1.06); }

/* Plan card upgrade — elevated, hover-glow border, ribbon */
.plan-card-v2 {
    position: relative; padding: 26px 24px 22px;
    background: linear-gradient(180deg, rgba(29, 28, 40, .8), rgba(22, 21, 31, .9));
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    transition: transform .25s cubic-bezier(.2, .9, .3, 1.2), border-color .25s, box-shadow .25s;
    display: flex; flex-direction: column; gap: 16px;
}
.plan-card-v2::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(420px 220px at 0% 0%, rgba(124, 92, 255, .14), transparent 60%);
    opacity: 0; transition: opacity .3s;
}
.plan-card-v2:hover {
    transform: translateY(-6px);
    border-color: rgba(124, 92, 255, .55);
    box-shadow:
        0 24px 50px -20px rgba(99, 53, 255, .35),
        0 0 0 1px rgba(124, 92, 255, .25),
        inset 0 1px 0 rgba(255, 255, 255, .08);
}
.plan-card-v2:hover::before { opacity: 1; }
.plan-card-v2.is-featured { border-color: rgba(56, 189, 248, .45); }
.plan-card-v2.is-featured::after {
    content: ''; position: absolute; inset: -1px; border-radius: inherit;
    background: linear-gradient(135deg, rgba(56, 189, 248, .35), rgba(124, 92, 255, .35));
    z-index: -1; filter: blur(18px); opacity: .25;
}

.plan-ribbon {
    position: absolute; top: 14px; right: -38px;
    background: var(--gradient-aurora); color: #fff;
    font-size: .68rem; font-weight: 800; padding: 5px 44px;
    letter-spacing: .12em; text-transform: uppercase;
    transform: rotate(45deg);
    box-shadow: 0 6px 16px -8px rgba(124, 92, 255, .65);
}
.plan-ribbon.bs { background: linear-gradient(135deg, #f59e0b, #ec4899); }

.plan-card-v2 .plan-name {
    font-size: 1.4rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1;
}
.plan-card-v2 .plan-desc {
    color: var(--muted); font-size: .86rem; min-height: 36px; line-height: 1.5;
}
.plan-price {
    display: flex; align-items: baseline; gap: 4px;
    margin-top: 6px;
}
.plan-price .nominal {
    font-size: 2rem; font-weight: 800; letter-spacing: -.03em;
    background: linear-gradient(180deg, #fff, #cbd5e1);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    font-variant-numeric: tabular-nums;
}
.plan-price .period { color: var(--muted); font-size: .85rem; font-weight: 500; }

/* Spec list with colored mini chips */
.specs-v2 { list-style: none; display: grid; gap: 10px; padding: 0; margin: 4px 0 0; }
.specs-v2 li {
    display: flex; align-items: center; gap: 10px; font-size: .9rem;
    color: var(--muted);
}
.specs-v2 li b { color: var(--text); font-weight: 700; }
.specs-v2 .spec-ic {
    width: 26px; height: 26px; flex-shrink: 0;
    border-radius: 8px; display: grid; place-items: center;
    background: rgba(124, 92, 255, .14); color: var(--primary-2);
}
.specs-v2 .spec-ic svg { width: 14px; height: 14px; }
.specs-v2 .spec-ic.ram { background: rgba(56, 189, 248, .14); color: var(--accent); }
.specs-v2 .spec-ic.cpu { background: rgba(251, 191, 36, .14); color: var(--warning); }
.specs-v2 .spec-ic.disk { background: rgba(52, 211, 153, .14); color: var(--success); }
.specs-v2 .spec-ic.port { background: rgba(236, 72, 153, .14); color: var(--accent-magenta); }
.specs-v2 .spec-ic.db { background: rgba(168, 85, 247, .14); color: #c4b5fd; }
.specs-v2 .spec-ic.bk { background: rgba(20, 184, 166, .14); color: #5eead4; }

/* Trust badges row */
.trust-row {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px;
    margin: 28px 0 8px;
}
.trust-pill {
    display: flex; align-items: center; gap: 10px; padding: 14px 16px;
    background: rgba(22, 21, 31, .6);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
}
.trust-pill .ic {
    width: 36px; height: 36px; border-radius: 10px;
    background: rgba(124, 92, 255, .14); color: var(--primary-2);
    display: grid; place-items: center; flex-shrink: 0;
}
.trust-pill .ic svg { width: 18px; height: 18px; }
.trust-pill strong { display: block; font-size: .92rem; }
.trust-pill span { color: var(--muted); font-size: .76rem; }

/* Big section heading */
.heading-mega {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800; letter-spacing: -.03em; line-height: 1.1;
}
.eyebrow {
    display: inline-block; padding: 6px 13px; border-radius: 999px;
    background: rgba(124, 92, 255, .14); border: 1px solid rgba(124, 92, 255, .28);
    color: var(--primary-2);
    font-size: .72rem; font-weight: 700; letter-spacing: .12em;
    text-transform: uppercase;
}

/* Floating "stats" bar (live counters style) */
.live-stats {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1px; margin-top: 22px;
    background: var(--border-soft);
    border: 1px solid var(--border);
    border-radius: 16px; overflow: hidden;
}
.live-stats .ls-item {
    background: rgba(22, 21, 31, .72);
    padding: 16px 18px;
    display: flex; flex-direction: column; gap: 4px;
}
.live-stats .ls-v {
    font-size: 1.4rem; font-weight: 800; letter-spacing: -.02em;
    background: linear-gradient(180deg, #fff, #94a3b8);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    font-variant-numeric: tabular-nums;
}
.live-stats .ls-l { color: var(--muted); font-size: .76rem; letter-spacing: .04em; text-transform: uppercase; }

/* Sticky order rail (used on plan detail) */
.sticky-rail {
    position: sticky; top: 84px;
}

/* Reveal-on-scroll (use class .reveal then add .reveal-in via JS) */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s, transform .6s; }
.reveal.reveal-in { opacity: 1; transform: none; }

/* FAQ accordion */
.faq { display: grid; gap: 10px; margin-top: 18px; }
.faq details {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 12px; padding: 14px 18px;
    transition: border-color .2s;
}
.faq details[open] { border-color: rgba(124, 92, 255, .4); }
.faq summary {
    cursor: pointer; font-weight: 700; font-size: .96rem;
    list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: '+'; color: var(--primary-2); font-size: 1.2rem;
    transition: transform .2s;
}
.faq details[open] summary::after { content: '−'; }
.faq .a { color: var(--muted); margin-top: 10px; line-height: 1.6; font-size: .9rem; }

/* Keyboard focus ring upgrade */
:focus-visible { outline: 2px solid var(--primary-2); outline-offset: 3px; }

/* Smaller breakpoint tweaks */
@media (max-width: 540px) {
    .plan-card-v2 { padding: 20px 18px; }
    .plan-orb { width: 60px; height: 60px; font-size: 26px; border-radius: 18px; }
    .plan-price .nominal { font-size: 1.7rem; }
    .heading-mega { font-size: 1.7rem; }
}


/* spec-tile icons rendered as SVG (no longer emoji) */
.spec-tile .si svg { width: 19px; height: 19px; color: var(--primary-2); }
.spec-tile .si {
    background: linear-gradient(135deg, rgba(124, 92, 255, .18), rgba(56, 189, 248, .12));
}

/* "Live" pill — animates the existing dot instead of stacking another. */
.pill-live::before { animation: live-pulse 1.6s cubic-bezier(.4, 0, .2, 1) infinite; }
.pill-live.pill-suspended::before { animation-name: live-pulse-down; }
.pill-live.pill-pending::before { animation-name: live-pulse-warn; }


/* ────────────────────────── Payment cards (QRIS / VA) ────────────────────────── */
.countdown-wrap {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 8px 16px; border-radius: 999px;
    background: rgba(251, 191, 36, .1);
    border: 1px solid rgba(251, 191, 36, .25);
}
.countdown-wrap .countdown {
    font-size: 1.6rem; font-weight: 800; color: var(--warning);
    font-variant-numeric: tabular-nums; letter-spacing: -.01em;
}

/* QRIS branded frame */
.qr-frame {
    display: inline-block;
    padding: 14px;
    background: linear-gradient(160deg, rgba(124, 92, 255, .14), rgba(56, 189, 248, .08));
    border: 1px solid rgba(124, 92, 255, .25);
    border-radius: 18px;
    text-align: center;
}
.qr-frame-head {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    color: var(--text); font-weight: 700; font-size: .88rem;
    margin-bottom: 10px;
}
.qr-frame-head img { border-radius: 6px; vertical-align: middle; }
.qr-frame .qr-box { background: #fff; padding: 14px; border-radius: 12px; display: inline-block; }
.qr-frame .qr-box img { display: block; width: 248px; height: 248px; }
.qr-frame-foot {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    color: var(--muted); font-size: .76rem; margin-top: 10px;
}
.qr-frame-foot svg { width: 12px; height: 12px; }

/* Virtual Account branded card */
.va-frame {
    background: linear-gradient(160deg, rgba(124, 92, 255, .14), rgba(15, 14, 22, .8));
    border: 1px solid rgba(124, 92, 255, .25);
    border-radius: 16px;
    padding: 18px 20px;
    text-align: left;
    max-width: 460px;
    margin: 0 auto;
}
.va-frame-head {
    display: flex; align-items: center; justify-content: space-between;
    color: var(--muted); font-size: .78rem; letter-spacing: .04em;
    text-transform: uppercase; font-weight: 600;
    margin-bottom: 10px;
}
.va-frame-head svg { width: 14px; height: 14px; vertical-align: middle; margin-right: 4px; }
.va-bank {
    background: rgba(34, 211, 238, .14); color: var(--accent);
    padding: 3px 10px; border-radius: 999px;
    font-size: .72rem; letter-spacing: .04em;
}
.va-number-row {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    background: rgba(0, 0, 0, .25);
    padding: 14px 16px; border-radius: 12px;
    border: 1px dashed rgba(124, 92, 255, .3);
}
.va-number-row .va-number {
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-size: 1.5rem; font-weight: 800; letter-spacing: .04em;
    color: #fff; user-select: all;
}
.va-amount-row {
    display: flex; justify-content: space-between; padding-top: 12px;
    margin-top: 12px; border-top: 1px dashed rgba(255, 255, 255, .08);
    font-size: .92rem;
}
.va-amount-row strong { color: var(--text); font-variant-numeric: tabular-nums; }

/* Method-opt polish (icon swap from emoji) */
.method-opt {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--border); border-radius: 14px;
    cursor: pointer; transition: .15s; margin-top: 10px;
    background: rgba(0, 0, 0, .15);
}
.method-opt:hover { border-color: var(--primary); background: rgba(124, 92, 255, .08); }
.method-opt:has(input:checked) {
    border-color: var(--primary);
    background: rgba(124, 92, 255, .12);
    box-shadow: inset 0 0 0 1px var(--primary);
}
.method-opt input[type="radio"] { margin: 0; flex-shrink: 0; width: 16px; height: 16px; }
.method-opt .mi {
    width: 42px; height: 42px; border-radius: 12px;
    display: grid; place-items: center;
    flex-shrink: 0;
}
.method-opt .mi svg { width: 20px; height: 20px; }
.method-opt .mt { font-weight: 700; font-size: .96rem; }
.method-opt .md { color: var(--muted); font-size: .8rem; margin-top: 2px; }

/* Modal close icon (we use trash icon as the close X — give it neutral color) */
.modal .row-between .btn-ghost svg { color: var(--muted); width: 16px; height: 16px; }
