/* ============ CryptoMax — Design System ============ */
:root {
  --brand: #7c5cff;
  --brand-2: #22d3a6;
  --accent: linear-gradient(135deg, #7c5cff 0%, #22d3a6 100%);
  --paid: #22d3a6;
  --pending: #f5b23c;
  --detected: #a78bfa;
  --fail: #ff5c7c;
  --radius: 14px;
  --sidebar-w: clamp(236px, 15.5vw, 282px);

  /* dark (default) */
  --bg: #0a0b10;
  --bg-2: #0f111a;
  --panel: #14161f;
  --panel-2: #1a1d29;
  --panel-3: #1f2330;
  --border: #242838;
  --text: #e7e9f0;
  --text-2: #b4b8c8;
  --muted: #8c93ab;
  --muted-strong: #a1a7bc;
  --placeholder: #6b7189;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  --header-bg: rgba(15, 17, 26, .85);
}
html.light {
  /* light mode — Stripe/Linear/Vercel pattern, WCAG AA */
  --bg: #f4f6f9;
  --bg-2: #ffffff;
  --panel: #ffffff;
  --panel-2: #f1f5f9;
  --panel-3: #e2e8f0;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --muted-strong: #475569;
  --placeholder: #64748b;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 12px rgba(15, 23, 42, 0.04);
  --header-bg: rgba(255, 255, 255, 0.85);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}
html:not(.light) body {
  background: radial-gradient(1100px 500px at 85% -15%, #1a1340 0%, transparent 55%), var(--bg);
}
code, .mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
a { color: inherit; text-decoration: none; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 6px; }

/* ============ Layout ============ */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }

/* ---- Sidebar ---- */
.sidebar {
  position: sticky; top: 0; height: 100vh;
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 18px 14px;
}
.brand { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 9px; font-size: clamp(17px, 1.25vw, 20px); font-weight: 700; padding: 10px 8px 20px; }
.brand-name { white-space: nowrap; }
.brand strong { background: var(--accent); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.brand-mark { width: 42px; height: 42px; display: block; border-radius: 11px; object-fit: cover; box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 4px 16px rgba(124,92,255,.4); }
.auth-brand .brand-mark { width: 46px; height: 46px; border-radius: 12px; }
nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: clamp(10px, 1.1vw, 13px) 14px; border-radius: 10px; color: var(--muted); font-weight: 500; font-size: clamp(14px, 1vw, 15.5px); cursor: pointer; transition: .12s; }
.nav-item { gap: 11px; padding: clamp(8px, 0.9vw, 10px) 12px; font-size: 14px; }
.nav-item .ico { width: 28px; height: 28px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; border: 1px solid transparent; transition: .15s; color: var(--muted); }
.nav-item .ico svg { width: 15px; height: 15px; stroke-width: 1.9; stroke: currentColor; display: block; }
.nav-item:not(.active):hover { background: var(--panel-2); color: var(--text); }
/* Dark: rótulos do menu lateral um pouco mais claros (melhor legibilidade) */
html:not(.light) .nav-item:not(.active) { color: #c4c9d8; }
/* FOCO DE NAVEGAÇÃO: degradê da marca (roxo → azul → verde-água), altura fina */
.nav-item.active { background: var(--accent); color: #fff; box-shadow: 0 8px 20px -9px rgba(90,100,255,.5); }
.nav-item.active .ico { background: rgba(255,255,255,.16) !important; border-color: transparent !important; color: #fff !important; }
.nav-item .tag { margin-left: auto; font-size: 10px; background: rgba(124,92,255,.18); color: var(--detected); padding: 1px 7px; border-radius: 20px; font-weight: 700; }
/* badges de ícone com cor viva da cor do item */
.nav-item.c-purple .ico { background: rgba(168,85,247,.18); border-color: rgba(168,85,247,.32); color: #b26bff; }
.nav-item.c-blue   .ico { background: rgba(59,130,246,.18); border-color: rgba(59,130,246,.32); color: #4f93ff; }
.nav-item.c-green  .ico { background: rgba(16,185,129,.18); border-color: rgba(16,185,129,.32); color: #1fd397; }
.nav-item.c-cyan   .ico { background: rgba(34,211,238,.18); border-color: rgba(34,211,238,.32); color: #2fd9f2; }
.nav-item.c-amber  .ico { background: rgba(245,158,11,.18); border-color: rgba(245,158,11,.32); color: #fbb024; }
.nav-item.c-pink   .ico { background: rgba(236,72,153,.18); border-color: rgba(236,72,153,.32); color: #f24aa0; }
.nav-item.c-indigo .ico { background: rgba(129,140,248,.18); border-color: rgba(129,140,248,.32); color: #8b93ff; }
.nav-item.c-teal   .ico { background: rgba(45,212,191,.18); border-color: rgba(45,212,191,.32); color: #2bdcc4; }
.nav-item.c-rose   .ico { background: rgba(251,113,133,.18); border-color: rgba(251,113,133,.32); color: #fb6176; }
.nav-item.c-sky    .ico { background: rgba(56,189,248,.18); border-color: rgba(56,189,248,.32); color: #38bdf8; }
.nav-item.c-violet .ico { background: rgba(139,92,246,.18); border-color: rgba(139,92,246,.32); color: #a07bff; }
.nav-section { font-size: 10px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); opacity: .65; padding: 6px 14px 5px; margin-top: 12px; }
.nav-section:first-child { margin-top: 2px; }
.nav-sep { height: 1px; background: var(--border); margin: 8px 6px; }
/* submenu (Widgets) */
.nav-group .chev { margin-left: auto; font-size: 10px; transition: transform .15s; }
.nav-group.open .chev { transform: rotate(180deg); }
.nav-sub { display: none; flex-direction: column; gap: 2px; margin: 2px 0 2px 14px; padding-left: 10px; border-left: 1px solid var(--border); }
.nav-group.open .nav-sub { display: flex; }
.nav-item.sub { padding: 7px 12px; font-size: 13px; }
.nav-label { font-size: clamp(11px, 0.8vw, 12px); text-transform: uppercase; letter-spacing: .6px; color: var(--muted); padding: 12px 12px 4px; }
.nav-item.sub { font-size: clamp(13px, 0.9vw, 14px); }
.sidebar-foot { font-size: 12px; color: var(--muted); padding: 10px 8px 2px; border-top: 1px solid var(--border); }

/* ---- Header ---- */
.main { display: flex; flex-direction: column; min-width: 0; }
.header {
  position: sticky; top: 0; z-index: 30;
  height: 62px; padding: 0 clamp(16px, 2vw, 30px);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--header-bg); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-left { display: flex; align-items: center; gap: 14px; }
.header-right { display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; background: var(--panel-2); border: 1px solid var(--border); color: var(--text-2); cursor: pointer; position: relative; font-size: 15px; transition: .12s; }
.icon-btn:hover { color: var(--text); border-color: var(--muted); }
.icon-btn .badge { position: absolute; top: -5px; right: -5px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 9px; background: var(--brand-2); color: #04110c; font-size: 10px; font-weight: 800; display: grid; place-items: center; }
.profile { display: flex; align-items: center; gap: 8px; padding: 5px 10px 5px 5px; border-radius: 30px; background: var(--panel-2); border: 1px solid var(--border); cursor: pointer; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; color: #0a0b10; font-weight: 700; font-size: 13px; }
.profile .name { font-size: 13px; font-weight: 600; }

.profile-wrap { position: relative; }
.dropdown { position: absolute; right: 0; top: calc(100% + 8px); width: 200px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; display: none; z-index: 50; }
.dropdown.open { display: block; animation: ddin .14s ease; }
@keyframes ddin { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.dd-item { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 8px; font-size: 13.5px; font-weight: 500; color: var(--text-2); cursor: pointer; }
.dd-item:hover { background: var(--panel-2); color: var(--text); }
.dd-item.danger:hover { background: rgba(255,92,124,.12); color: var(--fail); }
.dd-sep { height: 1px; background: var(--border); margin: 5px 4px; }

.content { padding: clamp(16px, 2vw, 30px); max-width: 1760px; width: 100%; margin: 0 auto; }

/* ---- Profile page ---- */
.profile-grid { display: grid; grid-template-columns: 360px 1fr; gap: 16px; align-items: start; }
.avatar-big { width: 110px; height: 110px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; color: #08110d; font-size: 38px; font-weight: 800; margin: 0 auto; position: relative; }
.avatar-big .cam { position: absolute; bottom: 4px; right: 4px; width: 32px; height: 32px; border-radius: 50%; background: var(--pending); border: 3px solid var(--panel); display: grid; place-items: center; font-size: 13px; cursor: pointer; }
.field { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px; }
.field .fi { width: 40px; height: 40px; border-radius: 10px; background: rgba(245,178,60,.12); color: var(--pending); display: grid; place-items: center; font-size: 17px; flex-shrink: 0; }
.field .fi svg { width: 20px; height: 20px; }
.profile-info .ic svg { width: 17px; height: 17px; }
.avatar-big .cam svg { width: 15px; height: 15px; color: #231400; }
.avatar-big .cam:hover { filter: brightness(1.08); transform: scale(1.06); transition: .12s; }
.avatar-big.has-photo, .avatar.has-photo { background-size: contain; background-position: center; background-repeat: no-repeat; color: transparent; }
/* ID da conta legível (antes embaralhava no mono apertado) */
.idcode { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 13px; letter-spacing: .6px; line-height: 1.55; color: var(--text); background: var(--panel-2); border: 1px solid var(--border); padding: 5px 9px; border-radius: 8px; word-break: break-all; user-select: all; display: inline-block; }
.conv-hint { font-size: 12px; color: var(--brand-2); margin-top: 6px; font-weight: 600; min-height: 15px; }
.field .fc { flex: 1; min-width: 0; }
.field .fc label { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 3px; }
.field .fc input { width: 100%; background: transparent; border: none; color: var(--text); font-size: 14.5px; font-weight: 600; font-family: inherit; padding: 0; }
.field .fc input:focus { outline: none; }
.field:focus-within { border-color: var(--brand); }
.gen-field { position: relative; }
.gen-field input { width: 100%; padding-right: 44px; }
.gen-ic { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 8px; border: none; background: var(--accent); color: #08110d; display: grid; place-items: center; cursor: pointer; transition: .15s; padding: 0; box-shadow: 0 3px 10px -4px rgba(124,92,255,.45); }
.gen-ic:hover { filter: brightness(1.08); box-shadow: 0 5px 16px -5px rgba(124,92,255,.6); }
.gen-ic:active svg { transform: rotate(180deg); }
.gen-ic svg { width: 15px; height: 15px; transition: transform .25s; }
.profile-info { display: flex; flex-direction: column; gap: 14px; font-size: 13.5px; }
.profile-info .row2 { display: flex; align-items: center; gap: 10px; }
.profile-info .ic { width: 34px; height: 34px; border-radius: 9px; background: rgba(245,178,60,.12); color: var(--pending); display: grid; place-items: center; font-size: 15px; flex-shrink: 0; }
/* ===== Perfil premium (aura, anel do avatar, ícones coloridos) ===== */
.profile-card { position: relative; overflow: hidden; }
.profile-card .aura-a { position: absolute; top: -72px; left: -72px; width: 168px; height: 168px; border-radius: 50%; background: rgba(168,85,247,.18); filter: blur(46px); z-index: 0; pointer-events: none; }
.profile-card .aura-b { position: absolute; bottom: -72px; right: -72px; width: 168px; height: 168px; border-radius: 50%; background: rgba(34,211,238,.15); filter: blur(46px); z-index: 0; pointer-events: none; }
.profile-card .pc-body { position: relative; z-index: 1; }
.avatar-ring { width: 112px; height: 112px; border-radius: 50%; padding: 4px; margin: 0 auto; background: linear-gradient(135deg, #a855f7, #22d3ee); box-shadow: 0 10px 30px -7px rgba(124,92,255,.5); }
.avatar-ring .avatar-big { width: 100%; height: 100%; margin: 0; background: var(--panel-2); color: #fff; }
.profile-info .ic { background: rgba(168,85,247,.13); color: #b06bff; }
.profile-info .ic.star { background: rgba(245,178,60,.14); color: var(--pending); }
.field .fi.fi-cyan { background: rgba(34,211,238,.13); color: #22d3ee; }
.field .fi.fi-purple { background: rgba(168,85,247,.13); color: #b06bff; }
.field .fi.fi-green { background: rgba(16,185,129,.13); color: #19d98f; }
.field .fi.fi-amber { background: rgba(245,158,11,.13); color: #fbb024; }
/* glassmorphism real nos cartões da tela de Conta */
.profile-card, .profile-grid .field {
  background: linear-gradient(135deg, rgba(255,255,255,.05) 0%, rgba(255,255,255,.014) 100%);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,.09);
  box-shadow: 0 18px 44px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.1);
}
.profile-card:hover, .profile-grid .field:focus-within {
  border-color: rgba(139,92,246,.42);
  box-shadow: 0 20px 52px rgba(0,0,0,.55), 0 0 24px rgba(139,92,246,.15), inset 0 1px 0 rgba(255,255,255,.18);
}
/* pill de vidro do plano (só Pro/Enterprise) */
.plan-glass { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: #34d399; background: rgba(16,185,129,.12); border: 1px solid rgba(16,185,129,.3); padding: 4px 11px; border-radius: 999px; backdrop-filter: blur(10px); box-shadow: inset 0 1px 0 rgba(255,255,255,.14); }
.plan-glass i { width: 7px; height: 7px; border-radius: 50%; background: #34d399; box-shadow: 0 0 7px #34d399; display: inline-block; animation: pulseDot 1.8s ease-in-out infinite; }
@keyframes pulseDot { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
/* brilhos ambiente atrás dos cartões da Conta (realçam o vidro) */
.sec-wrap { position: relative; }
.sec-glow { position: absolute; border-radius: 50%; filter: blur(110px); pointer-events: none; z-index: 0; }
.sec-glow.a { top: -50px; right: 16%; width: 340px; height: 340px; background: rgba(124,92,255,.13); }
.sec-glow.b { bottom: -20px; left: 24px; width: 340px; height: 340px; background: rgba(34,211,200,.1); }
.sec-wrap > form, .sec-wrap > .card, .sec-wrap > .vip-card, .sec-wrap > .grid-2 { position: relative; z-index: 1; }
/* vidro fosco nos cartões da aba Configurações/2FA */
.sec-wrap > .card {
  background: linear-gradient(135deg, rgba(255,255,255,.05) 0%, rgba(255,255,255,.014) 100%);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,.09);
  box-shadow: 0 18px 44px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.1);
}
.sec-wrap > .card:hover { border-color: rgba(139,92,246,.42); box-shadow: 0 20px 52px rgba(0,0,0,.55), 0 0 24px rgba(139,92,246,.15), inset 0 1px 0 rgba(255,255,255,.18); }
/* ícones das linhas de preferência */
.setting-row .tx { display: flex; align-items: center; gap: 12px; }
.sr-ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; }
.sr-ic svg { width: 17px; height: 17px; }
.sr-ic.cyan { background: rgba(34,211,238,.13); color: #22d3ee; }
.sr-ic.purple { background: rgba(168,85,247,.13); color: #b06bff; }
.sr-ic.amber { background: rgba(245,158,11,.13); color: #fbb024; }
.sr-tt { min-width: 0; }
/* Card VIP Enterprise (âmbar / vidro) */
.vip-card { position: relative; overflow: hidden; border-radius: 16px; padding: 22px; margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(245,158,11,.1) 0%, rgba(245,158,11,.03) 55%, rgba(255,255,255,.012) 100%);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(245,158,11,.34);
  box-shadow: 0 20px 50px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.12), 0 0 34px rgba(245,158,11,.1); }
.vip-glow { position: absolute; top: -70px; right: -50px; width: 240px; height: 240px; background: radial-gradient(circle, rgba(34,211,238,.2), transparent 70%); filter: blur(44px); pointer-events: none; }
.vip-hd { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; position: relative; z-index: 1; flex-wrap: wrap; }
.vip-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: #fbbf24; background: rgba(245,158,11,.14); border: 1px solid rgba(245,158,11,.3); padding: 3px 9px; border-radius: 999px; margin-bottom: 9px; }
.vip-badge svg { width: 11px; height: 11px; }
.vip-hd h3 { font-size: 19px; font-weight: 800; color: var(--text); }
.vip-hd p { font-size: 12.5px; color: var(--muted); margin-top: 3px; max-width: 420px; }
.vip-btn { background: linear-gradient(135deg, #f8be4e, #e0920f); border: none; color: #231400; font-weight: 700; box-shadow: 0 8px 20px -6px rgba(245,158,11,.5); flex-shrink: 0; }
.vip-btn svg { width: 14px; height: 14px; }
.vip-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 28px; margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.1); position: relative; z-index: 1; }
.vip-metrics .vm { font-size: 13px; }
.vip-metrics .vm-k { color: var(--muted); }
.vip-metrics .vm-v { color: var(--text); font-weight: 700; margin-left: 5px; }
@media(max-width:560px){ .vip-metrics { grid-template-columns: 1fr; } }
/* mini-card de plano (vidro âmbar) no cartão de perfil */
.plan-vip { display: flex; align-items: center; gap: 12px; padding: 12px 13px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(245,158,11,.1) 0%, rgba(245,158,11,.03) 60%, rgba(255,255,255,.012) 100%);
  border: 1px solid rgba(245,158,11,.34);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 0 20px rgba(245,158,11,.08);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.plan-vip .pv-ic { width: 36px; height: 36px; border-radius: 10px; background: rgba(245,158,11,.15); border: 1px solid rgba(245,158,11,.3); color: #2dd4bf; display: grid; place-items: center; flex-shrink: 0; font-size: 16px; line-height: 1; }
.plan-vip .pv-ic svg { width: 21px; height: 21px; }
.plan-vip .pv-tx { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 7px; }
.plan-vip .pv-k { font-size: 13px; color: var(--muted); }
.plan-vip .pv-v { font-size: 15px; font-weight: 800; color: var(--text); }

/* ============ Buttons ============ */
.btn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--border); background: var(--panel-2); color: var(--text); padding: 9px 15px; border-radius: 10px; font-weight: 600; font-size: 13.5px; cursor: pointer; transition: .12s; font-family: inherit; white-space: nowrap; }
.btn:hover { border-color: var(--muted); transform: translateY(-1px); }
.btn.primary { background: var(--accent); border: none; color: #ffffff; font-weight: 700; box-shadow: 0 8px 22px rgba(124,92,255,.32); }
.btn.amber { background: #f5a623; border: none; color: #231400; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 6px 11px; font-size: 12.5px; }
.btn.block { width: 100%; justify-content: center; padding: 12px; }
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }
/* badge de plano ativo no topo (premium) */
.btn.plan-badge { background: linear-gradient(var(--panel-2), var(--panel-2)) padding-box, var(--accent) border-box; border: 1px solid transparent; color: var(--text); box-shadow: 0 6px 18px rgba(124,92,255,.22); }
.btn.plan-badge svg { color: var(--pending); }
.btn.plan-badge b { font-weight: 700; }
.btn.plan-badge .pb-emoji { margin-right: 5px; font-size: 14px; line-height: 1; }
.btn.plan-badge .pb-exp { color: var(--muted); font-weight: 500; font-size: 11px; padding-left: 8px; margin-left: 6px; border-left: 1px solid var(--border); }

/* ============ Cards ============ */
.card { background: linear-gradient(140deg, color-mix(in srgb, var(--panel) 90%, #1b2335) 0%, var(--panel) 100%); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; transition: border-color .25s, box-shadow .25s; }
.card:hover { border-color: rgba(139,92,246,.28); box-shadow: 0 12px 34px -14px rgba(139,92,246,.17); }
.modal.card:hover, .card.stat:hover { border-color: var(--border); box-shadow: none; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 10px; flex-wrap: wrap; }
.card-head h2 { font-size: 15.5px; font-weight: 600; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 25px; font-weight: 700; letter-spacing: -.4px; }
.page-head .sub { color: var(--muted); font-size: 14px; margin-top: 3px; }
.meta-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-top: 8px; flex-wrap: wrap; }
.meta-row .mono { color: var(--text-2); background: var(--panel-2); padding: 2px 8px; border-radius: 6px; font-size: 12px; }
.chip { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; background: var(--panel-3); color: var(--text-2); }
.chip.free { color: var(--pending); background: rgba(245,178,60,.14); }
.link { color: var(--brand); font-weight: 600; cursor: pointer; }
html.light .link { color: #6d48ff; }

/* ============ Stats ============ */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat { display: flex; flex-direction: column; gap: 7px; position: relative; overflow: hidden; }
.stat .k { font-size: 13px; color: var(--muted); }
.stat .v { font-size: 25px; font-weight: 700; letter-spacing: -.6px; }
.stat .d { font-size: 12px; color: var(--muted); font-weight: 600; }
.stat .d.up { color: var(--brand-2); } .stat .d.down { color: var(--fail); }
.stat .spark { position: absolute; right: 14px; bottom: 14px; opacity: .8; }

/* ============ Badges / pills ============ */
.pill { padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; letter-spacing: .3px; display: inline-flex; align-items: center; gap: 5px; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.paid { background: rgba(34,211,166,.14); color: var(--paid); }
.pill.pending { background: rgba(245,178,60,.14); color: var(--pending); }
.pill.detected { background: rgba(167,139,250,.16); color: var(--detected); }
.pill.underpaid, .pill.expired, .pill.failed { background: rgba(255,92,124,.14); color: var(--fail); }
.pill.live { background: rgba(34,211,166,.14); color: var(--paid); }
.pill.test { background: rgba(245,178,60,.14); color: var(--pending); }

/* ============ Tables ============ */
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; color: var(--muted-strong); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; padding: 0 12px 11px; white-space: nowrap; }
.tbl td { padding: 13px 12px; border-top: 1px solid var(--border); vertical-align: middle; white-space: nowrap; }
.tbl .pill, .tbl .netpill { white-space: nowrap; }
.dash-grid .tbl { table-layout: fixed; }
.dash-grid .tbl th:nth-child(1), .dash-grid .tbl td:nth-child(1) { width: 38%; }
.dash-grid .tbl th:nth-child(2), .dash-grid .tbl td:nth-child(2) { width: 22%; }
.dash-grid .tbl th:nth-child(3), .dash-grid .tbl td:nth-child(3) { width: 18%; }
.dash-grid .tbl th:nth-child(4), .dash-grid .tbl td:nth-child(4) { width: 22%; }
.dash-grid .tbl td.mono:first-child { overflow: hidden; text-overflow: ellipsis; }
.dash-grid .tbl th, .dash-grid .tbl td { padding-left: 10px; padding-right: 10px; }
.dash-grid .tbl th:first-child, .dash-grid .tbl td:first-child { padding-left: 14px; }
.dash-grid .tbl th:last-child, .dash-grid .tbl td:last-child { padding-right: 14px; }
.tbl tbody tr { transition: .1s; }
.tbl tbody tr:hover { background: var(--panel-2); }
.tbl .mono { font-size: 12.5px; color: var(--text-2); }
.tbl .coin-cell { display: flex; align-items: center; gap: 9px; }
/* tabelas premium */
.tbl thead th { background: var(--panel-2); padding: 11px 12px; }
.tbl thead th:first-child { border-top-left-radius: 10px; border-bottom-left-radius: 10px; padding-left: 16px; }
.tbl thead th:last-child { border-top-right-radius: 10px; border-bottom-right-radius: 10px; }
.tbl td:first-child { padding-left: 16px; }
.tbl tbody tr:first-child td { border-top: none; }
.tbl tbody tr:hover { background: rgba(124,92,255,.07); }
/* stat cards premium */
.card.stat { background: linear-gradient(150deg, var(--panel) 55%, rgba(124,92,255,.07)); border-color: var(--border); }
.card.stat::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--accent); opacity: .5; }
.card.stat .v { font-size: 27px; }

/* ============ Coin icon ============ */
.coin { display: inline-flex; align-items: center; gap: 9px; }
.coin img { width: 26px; height: 26px; border-radius: 50%; }
.coin .net { font-size: 10px; font-weight: 700; color: var(--muted); background: var(--panel-3); padding: 1px 6px; border-radius: 5px; }
.coin .nm { font-weight: 600; }

/* ============ Empty state ============ */
.empty { text-align: center; padding: 46px 20px; color: var(--muted); }
.empty .ico { font-size: 34px; opacity: .5; margin-bottom: 12px; }
.empty h3 { color: var(--text-2); font-weight: 600; margin-bottom: 6px; font-size: 16px; }
.empty p { font-size: 13.5px; max-width: 380px; margin: 0 auto 16px; }

/* ============ Onboarding ============ */
.setup { margin-bottom: 20px; }
.setup-hd { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.setup-hd h2 { font-size: 17px; font-weight: 700; }
.setup-hd p { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.prog { display: flex; align-items: center; gap: 12px; }
.prog .num { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.prog-bar { width: 150px; height: 6px; border-radius: 6px; background: var(--panel-3); overflow: hidden; }
.prog-bar i { display: block; height: 100%; background: var(--accent); border-radius: 6px; transition: width .4s; }
.setup-x { border: 1px solid var(--border); background: var(--panel-2); color: var(--muted); font-size: 11.5px; font-weight: 600; padding: 5px 10px; border-radius: 8px; cursor: pointer; font-family: inherit; white-space: nowrap; }
.setup-x:hover { color: var(--text); border-color: var(--muted); }
.steps { list-style: none; display: flex; flex-direction: column; }
.step { display: flex; align-items: center; gap: 14px; padding: 16px 4px; border-top: 1px solid var(--border); }
.step:first-child { border-top: none; }
.step .ck { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); flex-shrink: 0; display: grid; place-items: center; font-size: 11px; color: transparent; }
.step.done .ck { background: var(--brand-2); border-color: var(--brand-2); color: #04110c; }
.step.cur .ck { border-color: var(--brand); }
.step .tx { flex: 1; }
.step .tx h3 { font-size: 14.5px; font-weight: 600; margin-bottom: 2px; }
.step .tx p { font-size: 13px; color: var(--muted); }
.step .tx .links { display: flex; gap: 14px; margin-top: 7px; }

/* ============ Segmented control ============ */
.seg { display: inline-flex; background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 3px; gap: 2px; flex-shrink: 0; }
.seg button { border: none; background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 600; padding: 6px 13px; border-radius: 7px; cursor: pointer; font-family: inherit; white-space: nowrap; }
.seg button.active { background: var(--panel); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.2); }

/* ============ Bars chart ============ */
.bars { display: flex; align-items: flex-end; gap: 10px; height: 160px; padding: 8px 2px; overflow: hidden; margin-top: 4px; }
.bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; }
.bar i { display: block; border-radius: 4px 4px 0 0; min-height: 2px; }
.bar .a { background: var(--accent); }
.bar .b { background: var(--panel-3); }
.bar span { text-align: center; font-size: 10.5px; color: var(--muted); margin-top: 6px; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); margin-top: 10px; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }
.sw.a { background: var(--brand); } .sw.b { background: var(--panel-3); }
/* Gráfico de área flutuante (dashboard) */
.area-chart { width: 100%; height: auto; display: block; margin-top: 2px; overflow: visible; }
.chart-legend { display: flex; gap: 18px; justify-content: center; font-size: 12px; color: var(--muted); margin: 2px 0 0; }
.chart-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.chart-card { position: relative; }
.area-chart { touch-action: none; }
.chart-tip { position: absolute; z-index: 6; pointer-events: none; background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 11px; font-size: 11.5px; color: var(--text); box-shadow: 0 8px 24px rgba(0,0,0,.4); transform: translate(-50%, -118%); white-space: nowrap; opacity: 0; transition: opacity .12s; }
.chart-tip .d { font-weight: 700; margin-bottom: 4px; font-size: 12px; }
.chart-tip .r { display: flex; align-items: center; gap: 6px; line-height: 1.6; color: var(--muted); }
.chart-tip .r b { color: var(--text); margin-left: 2px; }
.chart-tip .r i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* ================= Dashboard premium ================= */
.badge-pro { font-size: 10.5px; font-weight: 700; letter-spacing: .5px; padding: 3px 9px; border-radius: 999px; background: rgba(124, 92, 255, .14); color: var(--text); border: 1px solid rgba(124, 92, 255, .32); vertical-align: middle; margin-left: 10px; text-transform: uppercase; }
html.light .badge-pro { background: rgba(124, 92, 255, .10); color: #5b3dff; border-color: rgba(124, 92, 255, .28); }
.page-head .sub { color: var(--muted); font-size: 12.5px; margin-top: 4px; }

.pstat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
@media (max-width: 1100px) { .pstat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .pstat-grid { grid-template-columns: 1fr; } }
.pcard { position: relative; overflow: hidden; background: linear-gradient(140deg, color-mix(in srgb, var(--panel) 88%, #1b2335) 0%, var(--panel) 100%); border: 1px solid var(--border); border-radius: 18px; padding: 17px 18px; display: flex; flex-direction: column; justify-content: space-between; min-height: 148px; transition: transform .25s, border-color .25s, box-shadow .25s; }
.pcard:hover { transform: translateY(-2px); border-color: rgba(139,92,246,.35); box-shadow: 0 12px 35px -8px rgba(139,92,246,.18); }
.pcard[data-nav] { cursor: pointer; }
/* hover de cada card na cor do próprio card */
.pcard.pc-purple:hover { border-color: rgba(168,85,247,.45); box-shadow: 0 13px 34px -12px rgba(168,85,247,.32); }
.pcard.pc-blue:hover   { border-color: rgba(59,130,246,.45); box-shadow: 0 13px 34px -12px rgba(59,130,246,.32); }
.pcard.pc-green:hover  { border-color: rgba(16,185,129,.45); box-shadow: 0 13px 34px -12px rgba(16,185,129,.32); }
.pcard.pc-cyan:hover   { border-color: rgba(34,211,238,.45); box-shadow: 0 13px 34px -12px rgba(34,211,238,.32); }
.pcard .blob { position: absolute; right: -26px; bottom: -26px; width: 94px; height: 94px; border-radius: 50%; filter: blur(26px); opacity: .55; pointer-events: none; }
.pcard-hd { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; position: relative; z-index: 1; }
.pcard-k { font-size: 10.5px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: var(--muted-strong); }
.pcard-v { font-size: 25px; font-weight: 800; letter-spacing: -.5px; color: var(--text); margin: 9px 0 3px; position: relative; z-index: 1; }
.pcard-v small { font-size: 12px; font-weight: 500; color: var(--muted); }
.pcard-d { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; position: relative; z-index: 1; }
.pcard-d svg { width: 13px; height: 13px; }
.pico { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex: none; }
.pico svg { width: 18px; height: 18px; }
.pico.purple { background: rgba(168,85,247,.12); border: 1px solid rgba(168,85,247,.26); color: #c99bff; }
.pico.blue { background: rgba(59,130,246,.12); border: 1px solid rgba(59,130,246,.26); color: #7fb0ff; }
.pico.green { background: rgba(16,185,129,.12); border: 1px solid rgba(16,185,129,.26); color: #5ee9b5; }
.pico.cyan { background: rgba(34,211,238,.12); border: 1px solid rgba(34,211,238,.26); color: #67e8f9; }
.spark { width: 100%; height: 30px; margin-top: 12px; display: block; overflow: visible; position: relative; z-index: 1; }
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: #34d399; display: inline-block; box-shadow: 0 0 7px #34d399; }
.donut { position: relative; width: 54px; height: 54px; flex: none; }
.donut .lbl { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: #67e8f9; }
.pcard-foot { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); position: relative; z-index: 1; }
.pbar-row { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--muted); }
.pbar2 { width: 100%; height: 8px; border-radius: 8px; background: var(--panel-3); overflow: hidden; margin-top: 8px; border: 1px solid var(--border); }
.pbar2 i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, #9333ea, #6366f1); box-shadow: 0 0 12px rgba(168,85,247,.7); }

.chart-sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.netpill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 7px; font-size: 10.5px; font-weight: 600; }
.netpill i { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.netpill.test { background: rgba(59,130,246,.1); color: #7fb0ff; border: 1px solid rgba(59,130,246,.2); }
.netpill.test i { background: #7fb0ff; }
.netpill.main { background: rgba(16,185,129,.1); color: #5ee9b5; border: 1px solid rgba(16,185,129,.2); }
.netpill.main i { background: #5ee9b5; }
.card-foot { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; color: var(--muted); flex-wrap: wrap; gap: 8px; }
.card-foot .sec { color: #34d399; display: inline-flex; align-items: center; gap: 5px; }
.card-foot .sec svg { width: 14px; height: 14px; }

/* ============ Grids ============ */
.grid-2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.dash-grid > * { min-width: 0; }
.dash-grid .chart-card { display: flex; flex-direction: column; }
.dash-grid .chart-card .area-chart { margin-top: 12px; }
.grid-wallets { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }

/* ---- Wallet card ---- */
.wallet { display: flex; flex-direction: column; gap: 14px; transition: .14s; cursor: default; }
.wallet:hover { border-color: rgba(139,92,246,.35); transform: translateY(-2px); box-shadow: 0 14px 34px -12px rgba(139,92,246,.18); }
.wallet-top { display: flex; align-items: center; justify-content: space-between; }
.wallet-bal { font-size: 23px; font-weight: 700; letter-spacing: -.5px; }
.wallet-fiat { font-size: 13px; color: var(--muted); }
.wallet-key { display: flex; align-items: center; gap: 8px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; font-size: 12px; }
.wallet-key code { color: var(--text-2); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wallet-actions { display: flex; gap: 8px; }

/* ============ Forms ============ */
.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); font-weight: 500; }
.form input, .form select, .form textarea { background: var(--bg-2); border: 1px solid var(--border); color: var(--text); padding: 11px 13px; border-radius: 10px; font-family: inherit; font-size: 14px; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--brand); }
.form .row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.form .row > * { min-width: 0; }
.form .cap { display: block; white-space: nowrap; }
.form .req { color: var(--fail); font-style: normal; font-weight: 700; }
/* botão dentro do input (ex.: gerar ID do pedido) */
.in-wrap { position: relative; display: block; }
.in-btn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--border); background: var(--panel-2); color: var(--text-2); cursor: pointer; transition: .14s; }
.in-btn svg { width: 15px; height: 15px; }
.in-btn:hover { color: var(--brand); border-color: var(--brand); background: rgba(124,92,255,.12); }
.in-btn:active svg { transform: rotate(-180deg); transition: transform .3s; }
.in-actions { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); display: flex; gap: 6px; }
.qr-btn { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--border); background: var(--panel-2); color: var(--text-2); cursor: pointer; transition: .14s; }
.qr-btn svg { width: 16px; height: 16px; }
.qr-btn:hover { color: var(--brand); border-color: var(--brand); background: rgba(124,92,255,.12); }
#qrReader img[alt="Info icon"] { display: none; }
/* ===== Modal premium: adicionar carteira (2 colunas estilo WalletConnect) ===== */
.modal.modal-wide { width: 880px; max-width: 96vw; }
.wc { display: grid; grid-template-columns: 1.12fr .88fr; gap: 20px; align-items: stretch; }
.wc-coinhead { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.wc-coinhead .link { margin-left: auto; cursor: pointer; }
.wc-label { font-size: 11px; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); font-weight: 700; margin: 2px 0 10px; }
.wc-wallets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.wc-card { background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px; padding: 11px 6px; text-align: center; cursor: pointer; transition: .15s; }
.wc-card:hover, .wc-card.active { border-color: var(--brand); background: rgba(124,92,255,.1); transform: translateY(-2px); }
.wc-card .wi { width: 34px; height: 34px; border-radius: 9px; margin: 0 auto 6px; display: grid; place-items: center; font-weight: 800; font-size: 11.5px; color: #fff; }
.wc-card span { display: block; font-size: 10.5px; color: var(--text-2); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wc-right { background: var(--bg-2); border: 1px solid var(--border); border-radius: 14px; padding: 20px 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 11px; }
.wc-qr-title { font-size: 14.5px; font-weight: 700; }
.wc-qr-sub { font-size: 12px; color: var(--muted); line-height: 1.5; max-width: 230px; }
.wc-qr-stage { position: relative; width: 200px; height: 200px; background: #fff; border-radius: 16px; display: grid; place-items: center; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.35); padding: 10px; }
.wc-qr-stage video, .wc-qr-stage canvas { width: 100% !important; height: 100% !important; object-fit: cover; border-radius: 12px; }
.wc-qr-stage .wc-qr-img { width: 100%; height: 100%; object-fit: contain; display: block; }
.wc-qr-logo { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 42px; height: 42px; background: #fff; border-radius: 10px; padding: 4px; box-shadow: 0 4px 12px rgba(0,0,0,.25); display: grid; place-items: center; }
.wc-qr-logo img { width: 100%; height: 100%; border-radius: 7px; }
.wc-qr-ph { color: #c9ccd6; }
.qr-btn.wide { width: auto; padding: 0 10px; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--text-2); }
.wc-qr-actions { display: flex; gap: 8px; }
.wc-ro { font-size: 11px; color: var(--muted); }
@media (max-width: 760px) { .modal.modal-wide { width: 95vw; } .wc { grid-template-columns: 1fr; } .wc-right { order: -1; } .wc-qr-stage { width: 170px; height: 170px; } }
/* chip de origem da fatura */
.src { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 20px; letter-spacing: .3px; }
.src-m { background: rgba(245,178,60,.14); color: var(--pending); }
.src-a { background: rgba(124,92,255,.16); color: var(--detected); }
/* ===== Modal premium de pagamento de plano (QR EIP-681) ===== */
.pay-pg { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.pay-qr { position: relative; width: 210px; height: 210px; background: #fff; border-radius: 18px; padding: 12px; box-shadow: 0 12px 34px rgba(0,0,0,.4); }
.pay-qr-img { width: 100%; height: 100%; display: block; }
.pay-qr-logo { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 46px; height: 46px; background: #fff; border-radius: 11px; padding: 4px; box-shadow: 0 4px 12px rgba(0,0,0,.25); display: grid; place-items: center; }
.pay-qr-logo img { width: 100%; height: 100%; border-radius: 8px; }
.pay-qr-cap { font-size: 12.5px; color: var(--muted); text-align: center; max-width: 330px; line-height: 1.5; }
.pay-amt-box { width: 100%; background: linear-gradient(135deg, rgba(124,92,255,.1), rgba(34,211,166,.08)); border: 1px solid var(--border); border-radius: 14px; padding: 16px; text-align: center; }
.pay-amt-k { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; font-weight: 700; }
.pay-amt-v { font-size: 30px; font-weight: 800; letter-spacing: -1px; margin: 5px 0; font-family: 'JetBrains Mono', ui-monospace, monospace; }
.pay-amt-v small { font-size: 15px; font-weight: 700; color: var(--muted); }
.pay-amt-net { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); font-weight: 600; }
.pay-amt-net img { width: 16px; height: 16px; }
/* Rodapé do valor: linha sutil separando o detalhamento (preço + folga) do valor */
.pay-amt-foot { margin-top: 11px; padding-top: 11px; border-top: 1px solid var(--border); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pay-amt-br { font-size: 12.5px; font-weight: 700; letter-spacing: .2px; color: var(--text-2); }  /* escuro: letras claras */
html.light .pay-amt-br { color: #2e3344; }  /* claro: texto escuro e negrito, bem visível no branco */
.pay-addr { width: 100%; }
/* ações por linha na tabela de faturas */
.row-acts { display: inline-flex; gap: 6px; }
.row-acts .ra { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--border); color: var(--text-2); cursor: pointer; transition: .12s; }
.row-acts .ra svg { width: 15px; height: 15px; }
.row-acts .ra:hover { color: var(--text); border-color: var(--muted); transform: translateY(-1px); }
.row-acts .ra.ok:hover { color: var(--brand-2); border-color: var(--brand-2); }
.row-acts .ra.off { opacity: .4; cursor: default; }
.row-acts .ra.off:hover { transform: none; border-color: var(--border); color: var(--text-2); }
.hint { font-size: 12px; color: var(--muted); }

/* coin picker */
.coin-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px,1fr)); gap: 8px; }
.coin-opt { border: 1px solid var(--border); background: var(--bg-2); border-radius: 10px; padding: 11px 6px; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; font-size: 11.5px; font-weight: 600; transition: .1s; }
.coin-opt img { width: 28px; height: 28px; }
.coin-opt:hover { border-color: var(--muted); }
.coin-opt.sel { border-color: var(--brand); background: rgba(124,92,255,.08); }
.coin-opt.pro { opacity: .5; cursor: not-allowed; position: relative; }
.coin-opt.pro:hover { border-color: var(--border); }
.coin-opt .pro-tag { position: absolute; top: 5px; right: 5px; font-size: 8px; font-weight: 800; letter-spacing: .4px; padding: 1px 5px; border-radius: 6px; background: rgba(245,178,60,.9); color: #231400; }

/* ============ Toggle switch ============ */
.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; vertical-align: middle; }
.switch input { display: none; }
.switch .track { position: absolute; inset: 0; background: var(--panel-3); border-radius: 20px; transition: .15s; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .15s; }
.switch input:checked + .track { background: var(--brand-2); }
.switch input:checked + .track::after { transform: translateX(18px); }

.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-top: 1px solid var(--border); }
.setting-row:first-child { border-top: none; }
.setting-row .tx h4 { font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.setting-row .tx p { font-size: 13px; color: var(--muted); max-width: 520px; }

/* ============ Modal ============ */
.modal-bg { position: fixed; inset: 0; background: rgba(5,6,10,.72); backdrop-filter: blur(6px); display: none; align-items: center; justify-content: center; padding: 20px; z-index: 60; }
.modal-bg.open { display: flex; }
.modal { width: 540px; max-width: 100%; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow); }

.invoice-result { display: flex; gap: 20px; align-items: center; }
.qr { width: 150px; height: 150px; border-radius: 12px; background: #fff; display: grid; place-items: center; flex-shrink: 0; padding: 8px; }
.qr img { width: 100%; height: 100%; }
.pay-info { display: flex; flex-direction: column; gap: 5px; font-size: 13px; }
.pay-amount { font-size: 23px; font-weight: 700; font-family: 'JetBrains Mono', monospace; }
.pay-address { display: flex; align-items: center; gap: 8px; }
.pay-address code { background: var(--bg-2); padding: 6px 9px; border-radius: 8px; font-size: 11.5px; word-break: break-all; }

/* ============ Toast ============ */
.toast { position: fixed; bottom: 22px; right: 22px; background: var(--panel); border: 1px solid var(--border); padding: 13px 18px; border-radius: 12px; box-shadow: var(--shadow); font-size: 13.5px; font-weight: 600; z-index: 80; display: flex; align-items: center; gap: 10px; transform: translateY(80px); opacity: 0; transition: .25s; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast .dot { color: var(--brand-2); }

/* ============ Tabs (sub-nav) ============ */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { border: none; background: transparent; color: var(--muted); font-size: 13.5px; font-weight: 600; padding: 11px 15px; cursor: pointer; font-family: inherit; position: relative; white-space: nowrap; transition: .12s; }
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--text); }
.tabs button.active::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--accent); border-radius: 2px; }

/* ============ Plans (premium pricing) ============ */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.plan { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 14px; background: linear-gradient(140deg, color-mix(in srgb, var(--panel) 90%, #1b2335) 0%, var(--panel) 100%); border: 1px solid var(--border); overflow: hidden; transition: transform .2s, border-color .2s, box-shadow .2s; }
.plan:hover { transform: translateY(-3px); border-color: rgba(139,92,246,.35); box-shadow: 0 14px 34px -12px rgba(139,92,246,.18); }
.plan.pop { border-color: transparent; padding-top: 36px; background:
    linear-gradient(var(--panel), var(--panel)) padding-box,
    var(--accent) border-box; box-shadow: 0 20px 50px rgba(124,92,255,.18); }
html[lang="en"] .plan.pop::before { content: 'MOST POPULAR'; }
.plan.pop::before { content: 'MAIS POPULAR'; position: absolute; top: 12px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #08110d; font-size: 9.5px; font-weight: 800; letter-spacing: .6px; padding: 4px 13px; border-radius: 20px; white-space: nowrap; box-shadow: 0 4px 12px rgba(124,92,255,.35); }
.plan .tier { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; }
.plan .tier .crown { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 16px; }
.plan .price { font-size: 25px; font-weight: 800; letter-spacing: -1px; }
.plan .price small { font-size: 12px; font-weight: 600; color: var(--muted); }
.plan .valid { font-size: 12px; color: var(--muted); }
.plan ul { list-style: none; display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; color: var(--text-2); }
.plan ul li { display: flex; align-items: center; gap: 9px; }
.plan ul li .ck { color: var(--brand-2); font-weight: 800; }
.benefit-card { background: linear-gradient(135deg, rgba(124,92,255,.08), rgba(34,211,166,.06)); border: 1px solid var(--border); }
.coin-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.coin-badges span { display: inline-flex; align-items: center; gap: 5px; background: var(--panel-2); border: 1px solid var(--border); padding: 4px 10px; border-radius: 20px; font-size: 11.5px; font-weight: 600; }
.coin-badges img { width: 16px; height: 16px; }

/* ============ Docs layout ============ */
.docs { display: grid; grid-template-columns: 220px 1fr 180px; gap: 18px; align-items: start; }
.docs-nav { position: sticky; top: 86px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; max-height: calc(100vh - 110px); overflow-y: auto; }
.docs-nav .cat { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); padding: 14px 10px 5px; font-weight: 700; }
.docs-nav a { padding: 7px 10px; border-radius: 8px; color: var(--text-2); cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.docs-nav a:hover { background: var(--panel-2); color: var(--text); }
.docs-nav a.active { background: var(--panel-2); color: var(--text); box-shadow: inset 2px 0 0 var(--brand); }
.docs-nav .mini { font-size: 9px; font-weight: 700; padding: 1px 6px; border-radius: 10px; background: var(--panel-3); color: var(--muted); }
.docs-main { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.ep-sec { scroll-margin-top: 80px; }
.doc-card { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.doc-card-hd { display: flex; align-items: center; gap: 11px; padding: 14px 20px; background: var(--accent); }
.doc-card-hd h2 { font-size: 17px; font-weight: 700; letter-spacing: -.2px; color: #08140f; }
.doc-card-bd { padding: 20px; }
.doc-card-bd .tbl { margin-bottom: 4px; }
.faq-item { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.faq-item summary { cursor: pointer; padding: 14px 16px; font-weight: 600; font-size: 14px; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item[open] summary { color: var(--brand); }
.faq-a { padding: 0 16px 15px; color: var(--text-2); font-size: 13.5px; line-height: 1.6; }
.docs-coins { position: sticky; top: 86px; display: flex; flex-direction: column; gap: 3px; max-height: calc(100vh - 110px); overflow-y: auto; }
.docs-coins .coin-row { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 9px; cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.docs-coins .coin-row img { width: 20px; height: 20px; }
.docs-coins .coin-row:hover { background: var(--panel-2); }
.docs-coins .coin-row.active { background: var(--panel-2); color: var(--text); box-shadow: inset 2px 0 0 var(--brand); }

.ep-title { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.ep-title h1 { font-size: 23px; }
.method { font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 7px; letter-spacing: .5px; }
.method.GET { background: rgba(34,211,166,.15); color: var(--paid); }
.method.POST { background: rgba(124,92,255,.18); color: var(--detected); }
.ep-url { font-family: 'JetBrains Mono', monospace; font-size: 13px; background: var(--panel-2); border: 1px solid var(--border); padding: 10px 14px; border-radius: 10px; color: var(--text-2); display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 18px; }
.ep-desc { color: var(--text-2); font-size: 14px; line-height: 1.6; margin-bottom: 18px; }
.ep-h { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin: 22px 0 10px; }
.code-tabs { display: inline-flex; gap: 2px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 9px; padding: 3px; margin-bottom: 10px; }
.code-tabs button { border: none; background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 600; padding: 6px 14px; border-radius: 6px; cursor: pointer; font-family: inherit; }
.code-tabs button.active { background: var(--panel); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.code-block { background: #0b0d14; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
html.light .code-block { background: #1a1d29; }
.code-block .cb-head { display: flex; align-items: center; justify-content: space-between; padding: 9px 14px; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 11.5px; color: #868aa0; font-weight: 600; }
.code-block .cb-head .btn { color: #c8cde0; border-color: rgba(255,255,255,.16); background: rgba(255,255,255,.05); }
.code-block .cb-head .btn:hover { color: #fff; border-color: rgba(255,255,255,.34); background: rgba(255,255,255,.1); }
.code-block pre { padding: 15px; overflow-x: auto; font-family: 'JetBrains Mono', monospace; font-size: 12.5px; line-height: 1.65; color: #d7dbe8; }
.tok-key { color: #a78bfa; } .tok-str { color: #22d3a6; } .tok-num { color: #f5b23c; } .tok-cm { color: #6b7187; }
.steps-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13.5px; font-weight: 600; margin: 10px 0 18px; }
.steps-row .n { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #08110d; display: grid; place-items: center; font-size: 11px; font-weight: 800; }
.steps-row .arrow { color: var(--muted); }

/* ============ Responsive ============ */
@media (max-width: 1100px) { .docs { grid-template-columns: 1fr; } .docs-nav, .docs-coins { position: static; flex-direction: row; flex-wrap: wrap; max-height: none; } }
/* ============ Responsive (base) ============ */
.menu-toggle { display: none; }
@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 70; width: 250px; left: -270px; transition: left .25s; }
  .sidebar.open { left: 0; }
  .menu-toggle { display: grid; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
  .profile-grid { grid-template-columns: 1fr; }
  .profile .name { display: none; }
  .invoice-result { flex-direction: column; }
}
@media (max-width: 560px) {
  .stat-grid { grid-template-columns: 1fr; }
  .plan-grid { grid-template-columns: 1fr; }
  .form .row { grid-template-columns: 1fr; }
  .grid-wallets { grid-template-columns: 1fr; }
  .header { height: 56px; }
  .brand { font-size: 18px; }
}

/* ============ Acesso (auth) + Onboarding ============ */
.auth-theme { position: fixed; top: 18px; right: 18px; z-index: 20; }
.auth-brand { display: inline-flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; }
.auth-brand strong { background: var(--accent); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.auth-shell { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px; gap: 22px; }
.auth-head { text-align: center; max-width: 460px; }
.auth-head h1 { font-size: 18px; font-weight: 700; color: var(--pending); margin: 14px 0 6px; }
.auth-head p { font-size: 13.5px; }
.auth-card { width: 440px; max-width: 100%; padding: 28px; }
.auth-title { font-size: 21px; font-weight: 700; text-align: center; margin-bottom: 18px; }
.auth-center { text-align: center; }
.auth-ib { display: flex; align-items: center; gap: 10px; min-width: 0; background: var(--bg-2); border: 1px solid var(--border); border-radius: 11px; padding: 0 13px; }
.auth-ib span { display: inline-flex; align-items: center; justify-content: center; color: var(--muted); flex-shrink: 0; }
.auth-ib span svg { width: 17px; height: 17px; }
.auth-ib input { flex: 1; background: transparent; border: none; color: var(--text); padding: 12px 0; font-size: 14.5px; font-family: inherit; }
.auth-ib input:focus { outline: none; }
.auth-ib:focus-within { border-color: var(--brand); }
.auth-ib:focus-within span { color: var(--brand); }
/* remove o fundo branco do autofill do navegador (Chrome/Edge) */
.auth-ib input:-webkit-autofill,
.auth-ib input:-webkit-autofill:hover,
.auth-ib input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px var(--bg-2) inset;
  box-shadow: 0 0 0 1000px var(--bg-2) inset;
  caret-color: var(--text);
  transition: background-color 9999s ease 0s;
}
/* No card de vidro, o autofill usa um tom opaco que combina com o vidro (não preto) */
.auth-card .auth-ib input:-webkit-autofill,
.auth-card .auth-ib input:-webkit-autofill:hover,
.auth-card .auth-ib input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #1e2130 inset;
  box-shadow: 0 0 0 1000px #1e2130 inset;
}
.form input:-webkit-autofill, .form input:-webkit-autofill:focus,
.field input:-webkit-autofill, .field input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px var(--bg-2) inset;
  box-shadow: 0 0 0 1000px var(--bg-2) inset;
  caret-color: var(--text);
  transition: background-color 9999s ease 0s;
}
.recap { display: flex; align-items: center; gap: 10px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; font-size: 13px; }
.recap-tag { margin-left: auto; font-size: 10px; color: var(--muted); }
.cf-captcha { min-height: 66px; display: flex; justify-content: center; }
/* 2FA setup */
.tf-step { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; margin: 18px 0 10px; }
.tf-step:first-child { margin-top: 0; }
.tf-n { width: 24px; height: 24px; border-radius: 50%; background: var(--brand-2); color: #04110c; display: grid; place-items: center; font-size: 12px; font-weight: 800; flex-shrink: 0; }
.tf-apps { display: flex; flex-direction: column; gap: 8px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.tf-apps .btn { background: #1f7a4d; color: #fff; justify-content: flex-start; border: 1px solid transparent; }
.tf-apps .btn:hover { background: #22925b; }
.tf-qr { display: flex; justify-content: center; background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.tf-qr img { border-radius: 8px; background: #fff; padding: 6px; }
.tf-code { display: flex; gap: 8px; }
.tf-code input { flex: 1; min-width: 0; background: var(--panel-2); border: 1px solid var(--border); color: var(--text); padding: 11px 13px; border-radius: 10px; font-family: 'JetBrains Mono', monospace; font-size: 14px; letter-spacing: 1px; }
.tf-verify { width: 100%; background: var(--panel-2); border: 1px solid var(--border); color: var(--text); padding: 14px; border-radius: 12px; text-align: center; font-size: 22px; letter-spacing: 8px; font-family: 'JetBrains Mono', monospace; }
.tf-verify:focus { outline: none; border-color: var(--brand); }
.auth-or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin: 16px 0; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.auth-foot { text-align: center; font-size: 13px; color: var(--muted); margin-top: 16px; }
.auth-foot a, .auth-check a { color: var(--brand); font-weight: 600; cursor: pointer; }
html.light .auth-foot a, html.light .auth-check a { color: #6d48ff; }
.form .auth-check { display: flex; flex-direction: row; align-items: flex-start; gap: 9px; font-size: 13px; color: var(--text-2); font-weight: 500; line-height: 1.45; cursor: pointer; }
.auth-check span { flex: 1; min-width: 0; }
.auth-check input[type="checkbox"], .recap input[type="checkbox"] { width: 16px; height: 16px; flex: 0 0 auto; margin: 1px 0 0; padding: 0; border-radius: 4px; accent-color: var(--brand); }
.pw-bar { height: 6px; border-radius: 6px; background: var(--panel-3); overflow: hidden; margin-top: -4px; }
.pw-bar i { display: block; height: 100%; width: 0; border-radius: 6px; transition: .2s; background: var(--fail); }
.auth-ico { width: 60px; height: 60px; border-radius: 16px; background: var(--accent); display: grid; place-items: center; font-size: 26px; margin: 0 auto 14px; }
.auth-ico svg { width: 28px; height: 28px; color: #08110d; }

/* ---- Tela de acesso no tema CLARO: fundo E card claros de verdade ---- */
html.light .auth-shell {
  background:
    radial-gradient(760px 520px at 15% 0%, rgba(124,92,255,.16), transparent 58%),
    radial-gradient(720px 520px at 88% 8%, rgba(34,211,166,.13), transparent 56%),
    #f3f5fa;
}
html.light .auth-shell::before {
  background-image:
    linear-gradient(rgba(15,23,42,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,23,42,.05) 1px, transparent 1px);
}
html.light .auth-card {
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(15,23,42,.10);
  box-shadow: 0 30px 80px -30px rgba(15,23,42,.28), inset 0 1px 0 rgba(255,255,255,.9);
}
html.light .auth-card::before { background: radial-gradient(circle, rgba(124,92,255,.16), transparent 68%); }
html.light .auth-card::after { background: radial-gradient(circle, rgba(34,211,166,.14), transparent 68%); }
html.light .auth-card .auth-ib { background: #ffffff; border-color: rgba(15,23,42,.14); }

.auth-shell {
  position: relative; overflow: hidden;
  color: var(--text);
  background:
    radial-gradient(760px 520px at 15% 0%, rgba(124,92,255,.20), transparent 58%),
    radial-gradient(720px 520px at 88% 8%, rgba(34,211,166,.14), transparent 56%),
    radial-gradient(900px 600px at 50% 122%, rgba(34,211,166,.06), transparent 60%),
    #0a0b10;
}
/* grid sutil que some nas bordas */
.auth-shell::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: radial-gradient(780px 470px at 50% 12%, #000, transparent 72%);
  mask-image: radial-gradient(780px 470px at 50% 12%, #000, transparent 72%);
}
.auth-shell > * { position: relative; z-index: 1; }

/* Card em vidro com glow (roxo + verde), igual à fatura/site */
.auth-card {
  position: relative; overflow: hidden;
  background: linear-gradient(140deg, rgba(255,255,255,.055), rgba(255,255,255,.015));
  border: 1px solid rgba(255,255,255,.10);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  backdrop-filter: blur(22px) saturate(140%);
  box-shadow:
    0 30px 80px -24px rgba(0,0,0,.72),
    inset 0 1px 0 rgba(255,255,255,.08);
}
.auth-card::before {
  content: ""; position: absolute; top: -100px; left: -80px; width: 300px; height: 300px;
  border-radius: 50%; filter: blur(42px); pointer-events: none; z-index: 0;
  background: radial-gradient(circle, rgba(124,92,255,.42), transparent 68%);
}
.auth-card::after {
  content: ""; position: absolute; bottom: -90px; right: -90px; width: 320px; height: 320px;
  border-radius: 50%; filter: blur(46px); pointer-events: none; z-index: 0;
  background: radial-gradient(circle, rgba(34,211,166,.34), transparent 68%);
}
.auth-card > * { position: relative; z-index: 1; }
/* campo em tom opaco que combina com o vidro (não preto) */
.auth-card .auth-ib { background: #1e2130; border-color: rgba(255,255,255,.12); }

.code-inputs { display: flex; gap: 9px; justify-content: center; margin: 18px 0; }
.code-box { width: 46px; height: 56px; text-align: center; font-size: 22px; font-weight: 700; background: var(--bg-2); border: 1px solid var(--border); border-radius: 11px; color: var(--text); font-family: "JetBrains Mono", monospace; }
.code-box:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(124,92,255,.2); }

.onb-grid { min-height: 100vh; display: grid; grid-template-columns: 400px 1fr; }
.onb-side { background: var(--bg-2); border-right: 1px solid var(--border); padding: 28px; display: flex; flex-direction: column; position: relative; }
html:not(.light) .onb-side { background: linear-gradient(180deg, #16132a, var(--bg-2)); }
.onb-side-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 36px; }
.onb-side h2 { font-size: 24px; font-weight: 700; line-height: 1.25; letter-spacing: -.5px; }
.onb-side p { font-size: 14px; margin-top: 12px; max-width: 300px; }
.onb-meta { font-size: 13px !important; margin-top: 10px !important; }
.onb-steps { list-style: none; margin-top: 34px; display: flex; flex-direction: column; gap: 14px; }
.onb-steps li { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); font-weight: 500; }
.onb-steps li .n { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--border); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.onb-steps li.cur { color: var(--text); } .onb-steps li.cur .n { border-color: var(--brand); color: var(--brand); }
.onb-steps li.done { color: var(--text-2); } .onb-steps li.done .n { background: var(--brand-2); border-color: var(--brand-2); color: #04110c; }
.onb-barm { margin-top: auto; height: 4px; border-radius: 4px; background: var(--panel-3); overflow: hidden; }
.onb-barm i { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.onb-main { padding: 60px clamp(24px, 6vw, 96px); max-width: 720px; }
.onb-stepn { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.onb-fields { display: flex; flex-direction: column; gap: 18px; margin-top: 26px; }
.onb-fields > label { display: flex; flex-direction: column; gap: 7px; font-size: 13.5px; color: var(--text-2); font-weight: 600; }
.onb-fields input, .onb-fields select, .onb-fields textarea { background: var(--bg-2); border: 1px solid var(--border); color: var(--text); padding: 12px 13px; border-radius: 11px; font-family: inherit; font-size: 14.5px; }
.onb-fields input:focus, .onb-fields select:focus, .onb-fields textarea:focus { outline: none; border-color: var(--brand); }
.onb-lbl { font-size: 13.5px; font-weight: 600; color: var(--text-2); display: block; margin-bottom: 8px; }
.choice-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.onb-list { display: flex; flex-direction: column; gap: 8px; }
.choice { display: flex; align-items: center; gap: 11px; border: 1px solid var(--border); background: var(--bg-2); border-radius: 12px; padding: 13px 15px; cursor: pointer; transition: .12s; }
.choice input { accent-color: var(--brand); width: 17px; height: 17px; flex-shrink: 0; }
.choice.sel { border-color: var(--brand); background: rgba(124,92,255,.07); }
.choice b { display: block; font-size: 14px; font-weight: 600; color: var(--text); }
.choice span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.choice.compact { justify-content: flex-start; font-size: 14px; font-weight: 500; }
.choice.row { align-items: flex-start; }
.onb-nav { display: flex; align-items: center; gap: 14px; margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.onb-save { font-size: 12.5px; }

.rev-timeline { list-style: none; margin: 20px 0; display: flex; flex-direction: column; gap: 2px; }
.rev-timeline li { display: flex; gap: 14px; padding: 10px 0; }
.rev-timeline li span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; flex-shrink: 0; border: 1px solid var(--border); color: var(--muted); }
.rev-timeline li.done span { background: #1a1d29; color: var(--brand-2); border-color: var(--brand-2); }
.rev-timeline li.cur span { color: var(--pending); border-color: var(--pending); }
.rev-timeline li b { font-size: 14px; } .rev-timeline li small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.rev-links { display: flex; flex-direction: column; gap: 8px; }
.rev-link { display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--border); border-radius: 11px; padding: 13px 15px; }
.rev-link:hover { border-color: var(--muted); }
.rev-link b { font-size: 14px; } .rev-link span { font-size: 12.5px; color: var(--muted); }

@media (max-width: 860px) {
  .onb-grid { grid-template-columns: 1fr; }
  .onb-side { border-right: none; border-bottom: 1px solid var(--border); }
  .onb-side h2 { font-size: 19px; }
  .onb-main { padding: 28px 18px; }
  .choice-2, .choice-grid { grid-template-columns: 1fr; }
}

.mini-input { width: 80px; background: var(--panel-2); border: 1px solid var(--border); color: var(--text); padding: 8px 10px; border-radius: 9px; text-align: center; font-family: inherit; font-size: 13.5px; }
.mini-input:focus { outline: none; border-color: var(--brand); }

/* fix: colunas do grid-2 podem encolher (evita overflow de code-blocks/tabelas) */
.grid-2 > * { min-width: 0; }
.card { overflow-wrap: anywhere; }
.code-block pre { white-space: pre-wrap; word-break: break-word; }

/* ===== Marca da fatura (branding) ===== */
.brand-grid{display:grid;grid-template-columns:1.1fr .9fr;gap:16px;align-items:start}
.brand-form{display:flex;flex-direction:column;gap:12px}
.bf{display:flex;flex-direction:column;gap:6px}
.bf>span{font-size:12.5px;color:var(--text-2);font-weight:600}
.bf input{background:var(--bg-2,var(--panel-2));border:1px solid var(--border);color:var(--text);border-radius:10px;padding:10px 12px;font-size:14px;font-family:inherit}
.bf input:focus{outline:none;border-color:var(--brand)}
.bf-color{display:flex;gap:10px;align-items:center}
.bf-color input[type=color]{width:46px;height:40px;padding:3px;border-radius:10px;background:var(--bg-2,var(--panel-2));border:1px solid var(--border);cursor:pointer}
.bf-color input[type=text]{flex:1}
.bf-switch{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 0;border-top:1px solid var(--border);margin-top:4px}
.bf-switch b{display:block;font-size:14px}
.bf-switch span{font-size:12.5px;color:var(--muted)}
.brand-save{display:flex;justify-content:flex-end;margin-top:6px}
.brand-preview{position:sticky;top:16px}
.bp-cap{font-size:11px;text-transform:uppercase;letter-spacing:.5px;color:var(--muted);font-weight:700;margin-bottom:10px}
.bp-frame{width:100%;height:780px;border:1px solid var(--border);border-radius:16px;background:var(--bg);display:block;box-shadow:0 20px 50px -24px rgba(0,0,0,.6)}
.bp{border:1px solid var(--border);border-radius:16px;overflow:hidden;background:var(--bg-2,var(--panel-2));box-shadow:0 20px 50px -30px rgba(0,0,0,.8)}
.bp-top{height:3px;background:var(--bc)}
.bp-pad{padding:18px}
.bp-hd{display:flex;align-items:center;gap:10px;margin-bottom:14px}
.bp-hd img{width:30px;height:30px;border-radius:8px;object-fit:cover}
.bp-hd .bp-ini{width:30px;height:30px;border-radius:8px;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:15px}
.bp-hd b{font-size:15px;flex:1}
.bp-help{width:24px;height:24px;border-radius:50%;background:var(--bg-3,rgba(255,255,255,.06));display:flex;align-items:center;justify-content:center;color:var(--muted);font-size:13px;font-weight:700}
.bp-amt{font-size:28px;font-weight:800;letter-spacing:-.02em}
.bp-sub{font-size:13px;color:var(--text-2);margin-top:4px;display:flex;gap:8px;align-items:center}
.bp-sub span{font-size:10.5px;border:1px solid var(--border);padding:2px 7px;border-radius:999px;color:var(--muted)}
.bp-fee{display:inline-block;font-size:11.5px;font-weight:600;padding:4px 10px;border-radius:999px;margin-top:12px}
.bp-box{margin-top:12px;background:var(--bg-3,rgba(255,255,255,.04));border:1px solid var(--border);border-radius:11px;padding:10px 12px}
.bp-lbl{font-size:10px;text-transform:uppercase;letter-spacing:.5px;color:var(--muted);font-weight:600}
.bp-val{font-family:ui-monospace,Menlo,monospace;font-size:12.5px;margin-top:3px}
.bp-mail{margin-top:10px;font-size:11.5px;color:var(--muted);background:var(--bg-3,rgba(255,255,255,.04));border:1px dashed var(--border);border-radius:10px;padding:9px 11px}
.bp-btns{display:flex;gap:8px;margin-top:12px}
.bp-b{flex:1;text-align:center;font-size:12.5px;font-weight:700;padding:10px;border-radius:10px}
.bp-b.ghost{background:var(--bg-3,rgba(255,255,255,.05));border:1px solid var(--border);color:var(--text-2)}
.bp-b.wc{background:var(--bc);color:#fff}
.bp-foot{margin-top:14px;text-align:center;font-size:10.5px;color:var(--muted)}
@media(max-width:880px){.brand-grid{grid-template-columns:1fr}.brand-preview{position:static}}

/* logo uploader (branding) */
.logo-up{display:flex;align-items:center;gap:14px}
.logo-thumb{width:64px;height:64px;border-radius:12px;border:1px solid var(--border);background:var(--bg-3,rgba(255,255,255,.04));display:flex;align-items:center;justify-content:center;overflow:hidden;flex:none}
.logo-thumb img{width:100%;height:100%;object-fit:contain}
.logo-thumb span{font-size:10px;color:var(--muted)}
.logo-up-ct{display:flex;flex-direction:column;gap:7px}
.logo-up-btns{display:flex;gap:8px}

/* ============================================================
   Light Mode — structural overrides (Stripe/Linear/Vercel)
   Zero impacto no Dark Mode — tudo escopado em html.light.
   ============================================================ */

/* Cards sólidos, sem gradiente escuro mesclado */
html.light .card {
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 12px rgba(15, 23, 42, 0.04);
}
html.light .card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.10), 0 1px 3px rgba(15, 23, 42, 0.06);
}
html.light .modal.card:hover, html.light .card.stat:hover {
  border-color: var(--border);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 12px rgba(15, 23, 42, 0.04);
}

/* Cards premium (stat) — mesma base, sem glow colorido no light */
html.light .pcard {
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 12px rgba(15, 23, 42, 0.04);
}
html.light .pcard:hover {
  transform: translateY(-1px);
  border-color: #cbd5e1;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.10), 0 1px 3px rgba(15, 23, 42, 0.06);
}
html.light .pcard.pc-purple:hover,
html.light .pcard.pc-blue:hover,
html.light .pcard.pc-green:hover,
html.light .pcard.pc-cyan:hover {
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.10), 0 1px 3px rgba(15, 23, 42, 0.06);
}

/* Conta & Segurança: remove glass escuro do card de perfil, settings e field */
html.light .profile-card,
html.light .profile-grid .field,
html.light .sec-wrap > .card {
  background: #ffffff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 12px rgba(15, 23, 42, 0.04);
}
html.light .profile-card:hover,
html.light .profile-grid .field:focus-within,
html.light .sec-wrap > .card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.10), 0 1px 3px rgba(15, 23, 42, 0.06);
}
/* Brilhos coloridos atrás dos cards não cabem no light — some */
html.light .sec-glow { display: none; }
html.light .profile-card .aura-a,
html.light .profile-card .aura-b { display: none; }

/* VIP card (Enterprise) — amber pastel sólido */
html.light .vip-card {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.09) 0%, rgba(245, 158, 11, 0.03) 55%, #ffffff 100%);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid rgba(245, 158, 11, 0.4);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 12px rgba(15, 23, 42, 0.04);
}
html.light .vip-badge {
  color: #a16207;
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.4);
}
html.light .vip-metrics { border-top-color: #e2e8f0; }
html.light .vip-hd p { color: var(--text-2); }

/* plan-vip mini card — mesma lógica, amber claro */
html.light .plan-vip {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.09) 0%, rgba(245, 158, 11, 0.03) 60%, #ffffff 100%);
  border: 1px solid rgba(245, 158, 11, 0.4);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
html.light .plan-vip .pv-ic {
  color: #a16207;
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
}

/* Avatar ring: fundo claro no interior */
html.light .avatar-ring .avatar-big { background: #f1f5f9; color: #0f172a; }

/* Switch — trilho visível + bolinha com sombra Material */
html.light .switch .track {
  background: #cbd5e1;
  box-shadow: inset 0 0 0 1px #94a3b8;
}
html.light .switch .track::after {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
html.light .switch input:checked + .track {
  background: #0fbc8b;
  box-shadow: inset 0 0 0 1px #0f9970;
}

/* Botão primário: sombra discreta (nada de glow roxo pesado) */
html.light .btn.primary {
  box-shadow: 0 1px 2px rgba(124, 92, 255, 0.25), 0 4px 12px rgba(34, 211, 166, 0.18);
}
html.light .btn.primary:hover {
  box-shadow: 0 2px 4px rgba(124, 92, 255, 0.3), 0 6px 16px rgba(34, 211, 166, 0.22);
}

/* Zebra sutil + hover roxo claro em tabelas no light */
html.light .tbl tbody tr:nth-child(even) td {
  background: #f8fafc;
}
html.light .tbl tbody tr:hover td {
  background: rgba(124, 92, 255, 0.06);
}

/* Modal overlay: tom neutro no light (nada de preto quase opaco) */
html.light .modal-bg {
  background: rgba(15, 23, 42, 0.40);
}

/* Focus-ring universal — acessibilidade teclado */
html.light .btn:focus-visible,
html.light .icon-btn:focus-visible,
html.light .form input:focus-visible,
html.light .form select:focus-visible,
html.light .form textarea:focus-visible,
html.light .auth-ib:focus-within,
html.light .pcard[data-nav]:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* Chart card — subtítulos e eixos passam AA */
html.light .chart-sub,
html.light .chart-legend,
html.light .pbar-row,
html.light .card-foot {
  color: #64748b;
}

/* Status pills: âmbar escurecido no light para passar AA */
html.light .pill.pending,
html.light .chip.free {
  color: #92400e;
}
html.light .pill.detected { color: #6d28d9; }
html.light .pill.underpaid,
html.light .pill.expired,
html.light .pill.failed { color: #b91c1c; }

/* Plano badge pill no header — contraste melhor */
html.light .btn.plan-badge {
  box-shadow: 0 1px 3px rgba(124, 92, 255, 0.18), 0 1px 2px rgba(15, 23, 42, 0.04);
}

/* Topbar e icon buttons no light */
html.light .icon-btn { background: #ffffff; }
html.light .icon-btn:hover { background: #f1f5f9; border-color: #cbd5e1; }
html.light .profile { background: #ffffff; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04); }
html.light .profile:hover { border-color: #cbd5e1; }

/* Sidebar nav items — hover mais nítido */
html.light .nav-item:not(.active):hover { background: #f1f5f9; color: var(--text); }

/* Sparkline drop-shadow pesada vira sombra fina no light */
html.light .spark path[stroke] {
  filter: drop-shadow(0 1px 2px rgba(15, 23, 42, 0.1)) !important;
}

/* =====================================================================
   Dark Mode Audit — Patches C, D, E, G, H
   ===================================================================== */

/* Patch C — tabelas de página inteira: scroll horizontal + nowrap */
.page .tbl-wrap, .view .tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.page .card > .tbl, .view .card > .tbl { min-width: 560px; }
.page .tbl th, .view .tbl th,
.page .tbl td, .view .tbl td { white-space: nowrap; }
.page .tbl td.addr, .page .tbl td.hash,
.view .tbl td.addr, .view .tbl td.hash { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }

/* Patch D — empty-state unificado */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 56px 24px; gap: 14px; color: var(--muted-strong); min-height: 280px; }
.empty-state .es-ico { width: 56px; height: 56px; border-radius: 16px; background: var(--panel-2); border: 1px solid var(--border); display: grid; place-items: center; color: var(--muted-strong); }
.empty-state .es-ico svg { width: 26px; height: 26px; stroke-width: 1.8; }
.empty-state h3 { font-size: 16px; font-weight: 600; color: var(--text); margin: 0; }
.empty-state p { font-size: 13.5px; color: var(--muted-strong); max-width: 360px; margin: 0; line-height: 1.55; }
.empty-state .es-actions { display: flex; gap: 8px; margin-top: 4px; flex-wrap: wrap; justify-content: center; }
.empty-state.is-error .es-ico { background: rgba(255, 92, 124, .10); border-color: rgba(255, 92, 124, .32); color: var(--fail); }
.empty-state.is-error h3 { color: var(--text); }
html.light .empty-state.is-error .es-ico { background: #fef2f2; border-color: #fecaca; color: #dc2626; }

/* Patch E — avatar: iniciais com peso + legibilidade sobre o anel */
.avatar-ring .avatar-big .av-initials { font-size: 38px; font-weight: 800; color: #ffffff; letter-spacing: -1px; line-height: 1; }
html.light .avatar-ring .avatar-big .av-initials { color: #0f172a; opacity: .85; }
.avatar-ring .avatar-big:not(.has-photo) { background: var(--panel-2); }

/* Patch G — pcards com highlight sutil no topo (dark) */
html:not(.light) .pcard { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .045); }
html:not(.light) .pcard:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 10px 28px rgba(0, 0, 0, .45); transform: translateY(-1px); border-color: #2f3448; }

/* Patch H — placeholder legível em qualquer tema + focus-within reforçado no .field */
input::placeholder, textarea::placeholder { color: var(--placeholder); opacity: 1; }
.field:focus-within { border-color: rgba(124, 92, 255, .45); box-shadow: 0 0 0 3px rgba(124, 92, 255, .14); }
html.light .field:focus-within { box-shadow: 0 0 0 3px rgba(124, 92, 255, .10); }

/* Bônus — focus ring universal (teclado) */
:focus-visible { outline: none; }
button:focus-visible, .btn:focus-visible, .nav-item:focus-visible, a:focus-visible, [tabindex]:focus-visible { box-shadow: 0 0 0 3px rgba(124, 92, 255, .35); border-radius: 10px; }

/* Bônus — pills de status mais contrastantes no dark */
html:not(.light) .pill.pending { background: rgba(245, 178, 60, .16); color: #ffcb6b; }
html:not(.light) .pill.detected { background: rgba(167, 139, 250, .18); color: #c4b5fd; }
html:not(.light) .pill.failed { background: rgba(255, 92, 124, .16); color: #ff8ea2; }

/* ===== Consumo do servidor (admin · dados reais da VPS) ===== */
.srv-sec { margin-top: 18px; }
.srv-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.srv-title { display: flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 700; letter-spacing: -.2px; }
.srv-title svg { width: 18px; height: 18px; color: var(--brand); }
.srv-live { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.srv-live .lv { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-2); box-shadow: 0 0 0 0 rgba(34,211,166,.5); animation: srvpulse 1.8s infinite; }
@keyframes srvpulse { 0% { box-shadow: 0 0 0 0 rgba(34,211,166,.5); } 70% { box-shadow: 0 0 0 7px rgba(34,211,166,0); } 100% { box-shadow: 0 0 0 0 rgba(34,211,166,0); } }
.srv-refresh { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: var(--panel-2); border: 1px solid var(--border); color: var(--text-2); cursor: pointer; transition: .14s; }
.srv-refresh:hover { color: var(--text); }
.srv-refresh svg { width: 15px; height: 15px; }
.srv-top { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.srv-sub { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 14px; }
.srv-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.srv-m { padding: 17px 18px; }
.srv-m .mk { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.srv-m .mk svg { width: 15px; height: 15px; color: var(--text-2); }
.srv-m .mv { font-size: 30px; font-weight: 700; letter-spacing: -1px; line-height: 1; }
.srv-m .md { font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 4px; }
.srv-trk { height: 7px; border-radius: 20px; background: var(--panel-3); overflow: hidden; margin: 12px 0 2px; }
.srv-trk i { display: block; height: 100%; border-radius: 20px; transition: width .5s ease; }
.srv-mini { padding: 14px 15px; }
.srv-mini .mk { font-size: 11.5px; color: var(--muted); font-weight: 600; margin-bottom: 5px; }
.srv-mini .mv { font-size: 18px; font-weight: 700; letter-spacing: -.4px; }
.srv-rows { display: flex; flex-direction: column; }
.srv-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 2px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.srv-row:last-child { border-bottom: 0; }
.srv-row .rk { color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.srv-row .rk svg { width: 15px; height: 15px; color: var(--muted); }
.srv-row .rv { font-weight: 700; font-variant-numeric: tabular-nums; }
.srv-net { width: 100%; border-collapse: collapse; }
.srv-net th { text-align: left; font-size: 11px; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 0 6px 9px; }
.srv-net td { padding: 9px 6px; border-top: 1px solid var(--border); font-size: 13px; font-variant-numeric: tabular-nums; }
.srv-net td.if { font-weight: 700; color: var(--text); }
.srv-net td .ar { color: var(--muted); font-weight: 400; }
.srv-ch { font-size: 13px; }
.srv-grid2 .card-head h2 svg { width: 17px; height: 17px; flex: none; color: var(--brand); }
@media (max-width: 900px) { .srv-top, .srv-sub, .srv-grid2 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .srv-top, .srv-sub, .srv-grid2 { grid-template-columns: 1fr; } }

/* =====================================================================
   Admin Parity — Patches A–N (classes compartilhadas entre painéis)
   ===================================================================== */

/* Patch D — estados verdes legíveis no light + botão de perigo */
.txt-ok { color: var(--brand-2); font-weight: 600; }
html.light .txt-ok { color: #047857; }
html.light .pill.paid, html.light .pill.live { background: rgba(4, 120, 87, .10); color: #047857; }
html.light .pill.test { background: rgba(180, 83, 9, .10); color: #b45309; }
html.light .stat .d.up, html.light .pcard-d.up { color: #047857; }
html.light .dot-live { background: #059669; box-shadow: 0 0 5px rgba(5, 150, 105, .6); }
.btn.danger { color: var(--fail); border-color: rgba(255, 92, 124, .3); }
.btn.danger:hover { border-color: rgba(255, 92, 124, .55); }
html.light .btn.danger { color: #b91c1c; border-color: rgba(185, 28, 28, .35); }
html.light .btn.danger:hover { border-color: #b91c1c; background: #fef2f2; }
html.light .seg button:not(.active) { color: #475569; }
html.light .page-head .sub { color: #475569; }

/* Patch A/B — sidebar e header do admin em paridade com o lojista */
.role-badge { align-self: center; margin: -8px 8px 12px; font-size: 10.5px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--pending); background: rgba(245, 158, 11, .12); border: 1px solid rgba(245, 158, 11, .3); padding: 4px 12px; border-radius: 20px; }
html.light .role-badge { color: #854d0e; border-color: rgba(245, 158, 11, .45); }
.header-title { font-size: 15px; font-weight: 700; letter-spacing: -.2px; }

/* Patch C — grades de KPI do admin (pcards em 4 e 3 colunas) */
.pstat-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pstat-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .pstat-grid.cols-4, .pstat-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .pstat-grid.cols-4, .pstat-grid.cols-3 { grid-template-columns: 1fr; } }
.pico.amber { background: rgba(245, 158, 11, .12); border: 1px solid rgba(245, 158, 11, .26); color: #fbbf24; }

/* Patch H — raio do thead encostado, <code> em tabela, hover de card aninhado */
.card > .tbl thead th:first-child { border-top-left-radius: 13px; }
.card > .tbl thead th:last-child { border-top-right-radius: 13px; }
.tbl code { font-size: 12px; background: var(--panel-2); border: 1px solid var(--border); padding: 2px 7px; border-radius: 6px; }
#modalBody .card:hover { border-color: var(--border); box-shadow: none; }
html.light #modalBody .card:hover { border-color: var(--border); box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 12px rgba(15, 23, 42, 0.04); }

/* Patch I — inputs utilitários + dropdowns nativos no tema certo */
html:not(.light) { color-scheme: dark; }
html.light { color-scheme: light; }
.apikey { flex: 1; min-width: 0; background: var(--bg-2); border: 1px solid var(--border); color: var(--text); padding: 10px 13px; border-radius: 10px; font-family: 'JetBrains Mono', monospace; font-size: 13px; }
.apikey:focus { outline: none; border-color: var(--brand); }
.tier-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.tier-card .tname { font-size: 14.5px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.tier-card .form { gap: 10px; }
.tier-card .form label { font-size: 12px; color: var(--muted-strong); font-weight: 600; }
.tier-card .mini-input { width: 100%; text-align: left; }
.tier-card .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Modal de conta do admin — ficha premium em cards separados */
.acct-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.acct-av { width: 46px; height: 46px; border-radius: 13px; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 17px; font-weight: 800; letter-spacing: .5px; flex: none; box-shadow: 0 6px 18px rgba(124, 92, 255, .35); }
.acct-id { flex: 1; min-width: 0; }
.acct-id .nm { font-size: 16px; font-weight: 700; letter-spacing: -.2px; }
.acct-id .em { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--muted-strong); margin-top: 2px; overflow-wrap: anywhere; }
.acct-id .meta { font-size: 12px; color: var(--muted); margin-top: 3px; }
.acct-pills { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
@media (max-width: 560px) { .acct-pills { flex-direction: row; flex-wrap: wrap; align-items: center; } }
.acct-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.acct-stats .as { background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.acct-stats .as .k { font-size: 10.5px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; color: var(--muted-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-stats .as .v { font-size: 16px; font-weight: 700; margin-top: 2px; letter-spacing: -.3px; }
.dcard { background: var(--panel-2); border: 1px solid var(--border); border-radius: 14px; margin-bottom: 12px; overflow: hidden; }
.dcard-h { display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-bottom: 1px solid var(--border); font-size: 13px; font-weight: 600; }
.dcard-h svg { width: 15px; height: 15px; color: var(--muted-strong); flex: none; }
.dcard-h .cnt { margin-left: auto; font-size: 11px; font-weight: 700; background: var(--panel-3); color: var(--muted-strong); padding: 1px 8px; border-radius: 20px; }
.dcard-b { padding: 14px; }
.dcard .tbl th:first-child, .dcard .tbl td:first-child { padding-left: 14px; }
.dcard .tbl thead th { background: transparent; border-radius: 0; padding-top: 10px; }
.mini-empty { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 22px 14px; color: var(--muted); font-size: 13px; }
.mini-empty svg { width: 17px; height: 17px; opacity: .6; flex: none; }
.d-kv { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 13.5px; }
.d-kv + .d-kv { border-top: 1px solid var(--border); }
.d-kv .k { color: var(--muted-strong); }
.d-kv .v { font-weight: 600; text-align: right; }
.acct-foot { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.acct-foot .spacer { flex: 1; }
html.light .dcard, html.light .acct-stats .as { background: #f8fafc; }
html.light .acct-av { box-shadow: 0 4px 14px rgba(124, 92, 255, .25); }

/* Modal adicionar moeda — cards de rede, validação ao vivo e preview */
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ac-lbl { font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--muted-strong); margin: 0 0 8px; }
.net-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.net-opt { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 14px 8px 12px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 13px; cursor: pointer; transition: .12s; text-align: center; }
.net-opt img { width: 30px; height: 30px; border-radius: 50%; }
.net-opt .nn { font-size: 13px; font-weight: 700; }
.net-opt .ns { font-size: 11px; color: var(--muted); }
.net-opt:hover { border-color: var(--muted); }
.net-opt.sel { border-color: rgba(124, 92, 255, .55); background: rgba(124, 92, 255, .08); box-shadow: 0 0 0 3px rgba(124, 92, 255, .12); }
html.light .net-opt { background: #f8fafc; }
html.light .net-opt.sel { background: rgba(124, 92, 255, .06); }
#acContract { font-family: 'JetBrains Mono', monospace; font-size: 12.5px; }
.mini-input.ok { border-color: rgba(34, 211, 166, .6); }
.mini-input.bad { border-color: rgba(255, 92, 124, .6); }
.ac-hint { font-size: 11.5px; margin-top: 6px; min-height: 15px; color: var(--muted); font-weight: 500; }
.ac-hint.ok { color: var(--brand-2); }
html.light .ac-hint.ok { color: #047857; }
.ac-hint.bad { color: var(--fail); }
html.light .ac-hint.bad { color: #b91c1c; }
.coin-preview { display: flex; align-items: center; gap: 10px; background: var(--panel-2); border: 1px dashed var(--border); border-radius: 13px; padding: 12px 14px; }
.coin-preview img { width: 28px; height: 28px; border-radius: 50%; }
.coin-preview .cp-s { font-weight: 700; font-size: 14px; }
.coin-preview .cp-n { font-size: 12px; color: var(--muted); margin-top: 1px; }
.coin-preview .pill { margin-left: auto; }
html.light .coin-preview { background: #f8fafc; }
.btn.primary:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.ac-foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }

/* Patch N — mobile: scrim do drawer + rótulos só-ícone */
@media (max-width: 960px) {
  .sidebar.open + .main::before { content: ''; position: fixed; inset: 0; background: rgba(5, 6, 10, .55); backdrop-filter: blur(2px); z-index: 65; }
}
@media (max-width: 560px) { .hide-sm { display: none !important; } }

/* Logo da marca do lojista sobre o avatar no modal de conta (fallback: iniciais) */
.acct-av.has-logo { position: relative; overflow: hidden; }
.acct-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }

/* Banner de modo leitura (admin vendo a conta do lojista) */
#roBanner { position: fixed; top: 0; left: 0; right: 0; z-index: 9999; background: linear-gradient(90deg, #7c5cff, #22d3a6); color: #08110d; font-size: 13px; font-weight: 700; padding: 8px 16px; display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; box-shadow: 0 2px 10px rgba(0,0,0,.25); }
#roBanner button { background: rgba(0,0,0,.28); color: #fff; border: 0; padding: 4px 13px; border-radius: 7px; font-weight: 700; cursor: pointer; font-size: 12px; }
#roBanner button:hover { background: rgba(0,0,0,.45); }
body.ro-mode { padding-top: 38px; }

/* Seletor de moeda/rede (carteira de recebimento dos planos, no admin) */
.coin-picker { display: flex; gap: 10px; flex-wrap: wrap; }
.coin-opt { display: inline-flex; align-items: center; gap: 9px; padding: 9px 13px; border-radius: 11px; border: 1px solid var(--border); background: var(--panel-2); color: var(--text); cursor: pointer; font-family: inherit; transition: .12s; }
.coin-opt:hover { border-color: var(--text-2); }
.coin-opt img { width: 22px; height: 22px; flex-shrink: 0; }
.coin-opt span { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.coin-opt small { font-size: 11px; color: var(--muted); }
.coin-opt.active { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(124,92,255,.25); background: rgba(124,92,255,.08); }

/* Dentro do app (iOS/Android, html.in-app): conformidade com a App Store.
 * - some a compra/upgrade de plano (regra de In-App Purchase da Apple);
 * - some as seções de configuração de API (feitas no computador);
 * - some o WalletConnect.
 * Fora do app nada disso é afetado. */
html.in-app [data-route="plans"],
html.in-app [data-act="goPlans"],
html.in-app #planBtn,
html.in-app #nav [data-route="webhook"],
html.in-app #nav [data-route="docs"],
html.in-app #nav [data-route="logs"],
html.in-app .bp-b.wc { display: none !important; }

/* Tela "disponível no computador" (estilo banco) */
.app-gate { max-width: 420px; margin: 48px auto; text-align: center; padding: 0 16px; }
.app-gate .ag-ic { width: 76px; height: 76px; border-radius: 20px; margin: 0 auto 20px;
  display: grid; place-items: center; background: rgba(124,92,255,.12); border: 1px solid var(--border); }
.app-gate .ag-ic svg { width: 36px; height: 36px; color: var(--brand); }
.app-gate h2 { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.app-gate p { color: var(--text-2); font-size: 14.5px; line-height: 1.6; margin-bottom: 8px; }
.app-gate .ag-url { color: var(--muted); font-size: 12.5px; font-family: 'JetBrains Mono', monospace; margin-top: 14px; }
.app-gate .btn { margin-top: 20px; width: 100%; max-width: 300px; }

/* Celular: tabelas largas (Faturas, Transações…) rolam DENTRO do card, sem estourar a tela */
@media (max-width: 760px) {
  .card:has(.tbl) { overflow-x: auto; max-width: 100%; min-width: 0; -webkit-overflow-scrolling: touch; }
}

/* Login: UM único indicador de foco por campo (sem anel duplicado no input interno) */
html.light .auth-ib input:focus-visible { outline: none; }
html.light .auth-ib:focus-within {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, .14);
}

/* Tema claro: autofill com fundo BRANCO e texto escuro (sem bloco preto no campo) */
html.light .auth-card .auth-ib input:-webkit-autofill,
html.light .auth-card .auth-ib input:-webkit-autofill:hover,
html.light .auth-card .auth-ib input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
  box-shadow: 0 0 0 1000px #ffffff inset;
  -webkit-text-fill-color: #1c2030;
  caret-color: #1c2030;
}

/* ============================================================
   SUPORTE (tickets) — badge no menu + thread de mensagens
   ============================================================ */
.nav-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: #ef4444; color: #fff; font-size: 11px; font-weight: 800;
  line-height: 1; margin-left: auto;
}
.tk-thread {
  display: flex; flex-direction: column; gap: 10px;
  max-height: 60vh; overflow-y: auto; padding: 4px 2px 2px;
}
.tk-msg {
  max-width: 85%; padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--panel);
}
.tk-msg.tk-me  { align-self: flex-end;   background: rgba(124, 92, 255, .10); border-color: rgba(124, 92, 255, .35); }
.tk-msg.tk-them{ align-self: flex-start; background: rgba(16, 185, 129, .08); border-color: rgba(16, 185, 129, .30); }
.tk-meta { font-size: 12px; margin-bottom: 4px; }
.tk-body { line-height: 1.45; word-wrap: break-word; white-space: pre-wrap; }
.pill.muted { background: rgba(148,163,184,.15); color: #94a3b8; }

@media (max-width: 760px) { .tk-msg { max-width: 92%; } }
