/* Genesis Play: espaço profundo, vidro e degradê ciano → roxo (mesma arte do app). */
:root {
  --bg: #050613;
  --bg-2: #0b0d24;
  --panel: rgba(18, 22, 48, 0.78);
  --panel-solid: #12162f;
  --line: rgba(129, 140, 248, 0.28);
  --text: #f4f6ff;
  --muted: #a3abc9;
  --faint: #6f7799;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --violet: #8b5cf6;
  --magenta: #a855f7;
  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --grad: linear-gradient(90deg, var(--cyan), var(--blue) 45%, var(--magenta));
  --radius: 18px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(ellipse at 70% 0%, rgba(139, 92, 246, 0.22), transparent 55%),
    radial-gradient(ellipse at 0% 100%, rgba(34, 211, 238, 0.14), transparent 50%),
    url('assets/genesis-space-ambient.webp') center / cover fixed,
    var(--bg);
  background-blend-mode: normal, normal, soft-light, normal;
  overflow-x: hidden;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 6, 19, 0.55), rgba(5, 6, 19, 0.88));
  pointer-events: none;
  z-index: -1;
}
a { color: #b9a6ff; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #c4b5fd; outline-offset: 3px; }
[hidden] { display: none !important; }

/* ---------- topo ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(16px, 4vw, 48px);
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand img { width: 46px; height: 46px; object-fit: contain; filter: drop-shadow(0 6px 18px rgba(139, 92, 246, 0.5)); }
.brand strong { font-size: 19px; letter-spacing: 0.04em; }
.brand span { display: block; font-size: 11px; letter-spacing: 0.32em; color: #9aa6ff; margin-top: 2px; }
.topbar nav { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- herói ---------- */
.hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(18px, 4vw, 48px) clamp(16px, 4vw, 48px) 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 470px);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.24em;
  color: #9ec5ff;
  text-transform: uppercase;
}
.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.2), 0 0 14px var(--cyan); }
.hero-logo { display: block; width: min(260px, 60vw); margin: 0 0 14px -8px; filter: drop-shadow(0 18px 40px rgba(59, 130, 246, 0.35)); }
.hero h1 { font-size: clamp(42px, 6vw, 82px); line-height: 1.02; letter-spacing: -0.045em; margin: 6px 0 22px; }
.hero h1 em {
  font-style: normal;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p { color: #c3c9e6; font-size: 17px; line-height: 1.7; max-width: 560px; margin: 0; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.pills span { padding: 9px 13px; border-radius: 10px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.12); font-size: 12px; color: #cfd5f3; }

/* ---------- cartões ---------- */
.card {
  background: linear-gradient(160deg, rgba(26, 30, 66, 0.86), rgba(12, 14, 34, 0.9));
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: clamp(22px, 3vw, 34px);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
}
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.card-kicker { font-size: 11px; font-weight: 800; letter-spacing: 0.18em; color: #b39dff; text-transform: uppercase; }
.card h2 { font-size: 26px; letter-spacing: -0.03em; margin: 8px 0 6px; }
.card h3 { font-size: 18px; margin: 0 0 4px; }
.card p.help { color: var(--muted); font-size: 13px; line-height: 1.55; margin: 4px 0 0; }
.diamond { width: 22px; height: 22px; transform: rotate(45deg); border: 2px solid #a78bfa; border-radius: 4px; box-shadow: 0 0 16px rgba(167, 139, 250, 0.7); margin: 6px 6px 0 0; flex: none; }

label.field { display: block; margin-top: 18px; }
label.field > span { display: block; font-size: 11px; font-weight: 800; letter-spacing: 0.14em; color: #cdd3f0; text-transform: uppercase; margin-bottom: 8px; }
input, select, textarea {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 255, 0.28);
  background: rgba(6, 8, 24, 0.75);
  color: var(--text);
  outline: 0;
  font-size: 15px;
}
textarea { height: auto; min-height: 80px; padding: 12px 16px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #a78bfa; box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25); }
input.code-input { font-size: 22px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 800; text-align: center; font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; }
input.key-input { font-size: 20px; letter-spacing: 0.4em; text-align: center; font-weight: 700; font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 750;
  font-size: 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); background: rgba(255, 255, 255, 0.1); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-primary {
  width: 100%;
  min-height: 58px;
  margin-top: 26px;
  justify-content: space-between;
  padding: 0 24px;
  font-size: 16px;
  color: #0b0d24;
  border: 0;
  background: var(--grad);
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.45);
}
.btn-primary:hover { background: var(--grad); box-shadow: 0 16px 48px rgba(139, 92, 246, 0.55); }
.btn-grad { color: #0b0d24; border: 0; background: var(--grad); }
.btn-grad:hover { background: var(--grad); }
.btn-danger { color: #fecaca; border-color: rgba(248, 113, 113, 0.4); background: rgba(248, 113, 113, 0.08); }
.btn-small { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 10px; }

.message { min-height: 20px; margin-top: 14px; font-size: 13px; font-weight: 600; color: #c4b5fd; }
.message.error { color: #fca5a5; }
.message.ok { color: #6ee7b7; }
.footnote, .card .footnote { color: var(--faint); font-size: 12px; line-height: 1.55; margin-top: 16px; }

/* ---------- painel do código ---------- */
.dashboard { max-width: 1180px; margin: 0 auto; padding: 8px clamp(16px, 4vw, 48px) 64px; display: grid; gap: 22px; }
.summary { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 22px; }
.genesis-code { white-space: nowrap; font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; font-size: clamp(22px, 2.5vw, 34px); font-weight: 800; letter-spacing: 0.08em; margin: 10px 0 4px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: 0.06em; }
.badge::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.badge.trial { color: var(--warn); background: rgba(251, 191, 36, 0.12); }
.badge.active { color: var(--ok); background: rgba(52, 211, 153, 0.12); }
.badge.expired { color: var(--bad); background: rgba(248, 113, 113, 0.12); }
.big-number { font-size: 40px; font-weight: 800; letter-spacing: -0.03em; margin-top: 10px; }
.big-number small { font-size: 15px; color: var(--muted); font-weight: 600; }

.items { display: grid; gap: 12px; margin-top: 18px; }
.item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(6, 8, 24, 0.55);
  border: 1px solid rgba(148, 163, 255, 0.16);
}
.item .icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 18px; background: linear-gradient(135deg, rgba(34, 211, 238, 0.2), rgba(168, 85, 247, 0.25)); flex: none; }
.item .info { flex: 1; min-width: 0; }
.item .info strong { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .info span { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.empty { color: var(--faint); font-size: 14px; padding: 18px; text-align: center; border: 1px dashed rgba(148, 163, 255, 0.22); border-radius: 14px; }

.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.tab { padding: 10px 14px; border-radius: 10px; border: 1px solid rgba(148, 163, 255, 0.22); background: transparent; color: var(--muted); font-weight: 700; font-size: 13px; }
.tab[aria-selected='true'] { color: #0b0d24; background: var(--grad); border-color: transparent; }

/* ---------- passos (como funciona) ---------- */
.steps { max-width: 1180px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px) 72px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step .num { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; color: #0b0d24; background: var(--grad); }
.step h3 { margin: 16px 0 8px; font-size: 18px; }
.step p { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 0; }

/* ---------- compatibilidade ---------- */
.platforms { width: min(1180px, 100%); margin: 0 auto; padding: 0 clamp(18px, 3vw, 32px); }
.platforms-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.platforms-heading h2 { margin: 5px 0 0; font-size: clamp(20px, 2.2vw, 26px); letter-spacing: -0.03em; }
.platforms-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.platforms-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.platform-item { min-width: 0; min-height: 118px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 10px 8px; border: 1px solid rgba(148, 163, 255, 0.14); border-radius: 16px; background: rgba(6, 8, 24, 0.45); text-align: center; }
.platform-item strong { color: #f4f5ff; font-size: 14px; letter-spacing: .01em; }
.platform-logo { width: 58px; height: 48px; display: grid; place-items: center; color: #d9defb; }
.platform-logo svg { display: block; width: 48px; height: 48px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.platform-web { color: #55d7f2; }
.platform-roku { width: 96px; color: #8e45c7; }
.platform-roku svg { width: 92px; height: 42px; overflow: visible; }
.platform-roku text { fill: currentColor; stroke: none; font: 900 43px/1 Arial, sans-serif; letter-spacing: -3px; }
.platform-android { color: #3ddc84; }
.platform-android svg { width: 48px; height: 48px; stroke: none; }
.platform-samsung { width: 120px; color: #eef2ff; }
.platform-samsung img { display: block; width: 112px; height: 38px; object-fit: contain; filter: brightness(0) invert(1); }
.platform-lg { width: 58px; }
.platform-lg img { display: block; width: 44px; height: 44px; object-fit: contain; }
.platform-ios { color: #d8d9e0; }
.platform-ios svg { fill: currentColor; stroke: none; }
.platform-status { display: inline-flex; align-items: center; gap: 6px; min-height: 18px; font-size: 10px; font-weight: 750; white-space: nowrap; }
.platform-status::before { content: ''; width: 6px; height: 6px; flex: none; border-radius: 50%; background: currentColor; }
.is-live .platform-status { color: #6ee7b7; }
.is-coming .platform-status { color: #b9a6ff; }

/* ---------- diálogo ---------- */
dialog { border: 0; padding: 0; background: transparent; color: var(--text); width: min(560px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(3, 4, 14, 0.75); backdrop-filter: blur(4px); }
.dialog-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; flex-wrap: wrap; }

/* ---------- tabela admin ---------- */
.table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 14px; }
.table th { text-align: left; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); padding: 10px 12px; border-bottom: 1px solid rgba(148, 163, 255, 0.18); }
.table td { padding: 12px; border-bottom: 1px solid rgba(148, 163, 255, 0.1); vertical-align: middle; }
.table td.mono { font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; font-weight: 700; letter-spacing: 0.04em; }
.table-wrap { overflow-x: auto; }

footer { text-align: center; color: var(--faint); font-size: 12px; padding: 0 16px 28px; letter-spacing: 0.12em; }

/* Atalho de atendimento Telegram, disponível em todas as páginas. */
.telegram-contact { position: fixed; z-index: 10000; right: max(20px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom)); display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 18px; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; background: #229ED9; color: #fff; box-shadow: 0 8px 28px rgba(0,0,0,.38), 0 0 22px rgba(34,158,217,.24); font-size: 14px; font-weight: 750; letter-spacing: 0; text-decoration: none; transition: transform .16s ease, background .16s ease, box-shadow .16s ease; }
.telegram-contact:hover { transform: translateY(-2px); background: #168ac2; box-shadow: 0 11px 32px rgba(0,0,0,.42), 0 0 26px rgba(34,158,217,.36); }
.telegram-contact:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.telegram-contact svg { display: block; flex: none; width: 23px; height: 23px; fill: currentColor; }
@media (max-width: 560px) { .telegram-contact { right: max(14px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom)); min-height: 46px; padding: 0 15px; font-size: 13px; } }

/* A tela inicial ocupa o espaço disponível do monitor sem criar uma página maior que a viewport. */
@media (min-width: 1000px) and (min-height: 640px) {
  body:has(#login-view:not([hidden])) { min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto; }
  body:has(#login-view:not([hidden])) .topbar { padding-block: clamp(6px, 1.1vh, 14px); }
  #login-view { width: 100%; min-height: 0; display: flex; flex-direction: column; justify-content: space-evenly; gap: clamp(10px, 1.7vh, 22px); padding: 0 16px; }
  .hero { width: 100%; padding: clamp(4px, 1vh, 12px) clamp(16px, 3vw, 48px); gap: clamp(24px, 4vw, 64px); }
  .hero-logo { width: clamp(88px, min(9vw, 12vh), 145px); margin-bottom: clamp(2px, .5vh, 7px); }
  .hero h1 { font-size: clamp(38px, min(3.7vw, 6vh), 58px); margin: 4px 0 clamp(7px, 1vh, 12px); }
  .hero p { font-size: clamp(14px, .95vw, 16px); line-height: 1.5; }
  .pills { gap: 8px; margin-top: clamp(12px, 1.8vh, 22px); }
  .pills span { padding: 7px 10px; font-size: 11px; }
  #login-form { padding: clamp(14px, 1.4vw, 21px); }
  #login-form .card h2 { font-size: clamp(20px, 1.6vw, 23px); }
  #login-form .card-head { gap: 8px; }
  #login-form label.field { margin-top: clamp(9px, 1.2vh, 15px); }
  #login-form input { height: clamp(42px, 5.2vh, 50px); }
  #login-form .btn-primary { min-height: clamp(46px, 6vh, 54px); margin-top: clamp(12px, 1.6vh, 20px); }
  #login-form .footnote { font-size: 10px; line-height: 1.35; margin-top: 8px; }
  #login-form .message:empty { display: none; margin: 0; }
  .steps { width: 100%; padding: 0 clamp(16px, 3.2vw, 48px); gap: clamp(12px, 1.4vw, 20px); }
  .step.card { padding: clamp(12px, 1.2vw, 18px); border-radius: 18px; }
  .step .num { width: 32px; height: 32px; border-radius: 10px; }
  .step h3 { margin: 10px 0 5px; font-size: 16px; }
  .step p { font-size: 12px; line-height: 1.45; }
  .platforms { padding-inline: clamp(16px, 3.2vw, 48px); }
  .platforms-heading { margin-bottom: 10px; }
  .platform-item { min-height: clamp(88px, 11vh, 108px); gap: 3px; padding: 7px; }
  .platform-logo, .platform-logo svg { height: 38px; }
  .platform-logo svg { width: 38px; }
  .platform-roku { width: 84px; }
  .platform-roku svg { width: 84px; height: 36px; }
  .platform-roku text { font-size: 38px; }
  .platform-samsung { width: 110px; }
  .platform-samsung img { width: 108px; height: 34px; }
  .platform-lg img { width: 38px; height: 38px; }
  .platform-status { font-size: 9px; min-height: 14px; }
  footer { padding: 2px 16px clamp(6px, .8vh, 10px); font-size: 9px; }
}

@media (min-width: 1000px) and (max-height: 850px) {
  #login-view { gap: 8px; }
  .hero-logo { width: clamp(82px, 9vh, 120px); }
  .hero h1 { font-size: clamp(36px, min(3.4vw, 5.4vh), 48px); }
  #login-form { padding: 12px 16px; }
  #login-form .card-head p.help { display: none; }
  #login-form label.field { margin-top: 7px; }
  #login-form label.field > span { margin-bottom: 5px; }
  #login-form input { height: 38px; }
  #login-form .btn-primary { min-height: 42px; margin-top: 9px; }
  #login-form .footnote { font-size: 9px; line-height: 1.25; margin-top: 6px; }
  .steps { gap: 10px; }
  .step.card { padding: 9px 14px; }
  .step .num { width: 26px; height: 26px; border-radius: 8px; }
  .step h3 { margin: 6px 0 4px; font-size: 14px; }
  .step p { font-size: 10px; line-height: 1.35; }
  .platforms-heading { margin-bottom: 6px; }
  .platform-item { min-height: 68px; gap: 2px; padding: 5px; }
  .platform-logo, .platform-logo svg { height: 26px; }
  .platform-logo svg { width: 28px; }
  .platform-roku { width: 64px; }
  .platform-roku svg { width: 64px; height: 26px; }
  .platform-roku text { font-size: 28px; }
  .platform-samsung { width: 86px; }
  .platform-samsung img { width: 100px; height: 30px; }
  .platform-lg img { width: 26px; height: 26px; }
  .platform-item strong { font-size: 12px; }
  .platform-status { font-size: 8px; min-height: 12px; }
}

/* ---------- páginas públicas de privacidade e termos ---------- */
.legal-page { width: min(920px, calc(100% - 32px)); margin: 28px auto 72px; }
.legal-page .legal-card { padding: clamp(22px, 5vw, 52px); }
.legal-page h1 { margin: 8px 0 10px; font-size: clamp(32px, 6vw, 48px); letter-spacing: -0.04em; }
.legal-page .legal-updated { color: var(--muted); font-size: 13px; margin: 0 0 28px; }
.legal-page h2 { margin: 30px 0 8px; font-size: 20px; color: #dcd5ff; }
.legal-page p, .legal-page li { color: #c3c9e6; font-size: 15px; line-height: 1.75; }
.legal-page ul { padding-left: 22px; }
.legal-page .legal-callout { padding: 16px 18px; border-radius: 12px; border: 1px solid rgba(168, 85, 247, 0.4); background: rgba(124, 58, 237, 0.1); color: var(--text); }
.legal-page .legal-back { display: inline-flex; margin: 0 0 18px; }
.legal-page a { overflow-wrap: anywhere; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero-logo { margin: 0 auto 14px; }
  .hero p { margin: 0 auto; }
  .pills { justify-content: center; }
  .summary, .steps { grid-template-columns: 1fr; }
  .platforms-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .row { grid-template-columns: 1fr; }
  .item { flex-wrap: wrap; }
  .item .actions { width: 100%; justify-content: flex-start; }
  .topbar nav .btn { padding: 0 12px; }
  .platforms-heading { align-items: flex-start; flex-direction: column; gap: 6px; }
  .platforms-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .platform-item { min-height: 124px; }
}

/* ---------- preços, pacotes e parceiro ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 14px; align-items: end; }
.pricing-grid .btn { min-height: 52px; }
.table .actions { display: flex; gap: 8px; justify-content: flex-end; }
.price-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 16px; }
.price-list div { padding: 12px; border-radius: 12px; background: rgba(6, 8, 24, 0.55); border: 1px solid rgba(148, 163, 255, 0.16); text-align: center; }
.price-list strong { display: block; font-size: 18px; margin-top: 4px; }
.price-list span { font-size: 12px; color: var(--muted); }
.voucher-box { font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; font-size: 15px; letter-spacing: 0.06em; line-height: 1.9; max-height: 240px; overflow: auto; padding: 14px 16px; border-radius: 12px; background: rgba(6, 8, 24, 0.75); border: 1px solid rgba(148, 163, 255, 0.22); white-space: pre; }
@media (max-width: 980px) {
  .pricing-grid { grid-template-columns: 1fr 1fr; }
  .price-list { grid-template-columns: 1fr 1fr; }
}

/* Tabelas largas rolam dentro do cartão, sem alargar a página. */
.dashboard > *, .summary > *, .hero > * { min-width: 0; }
.table td.mono { white-space: nowrap; }

/* ---------- portal administrativo ---------- */
.admin-shell { max-width: 1400px; margin: 0 auto; padding: 8px clamp(12px, 3vw, 36px) 48px; display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 24px; align-items: start; }
.side-menu { position: sticky; top: 16px; display: grid; gap: 6px; padding: 14px; border-radius: 18px; background: rgba(12, 14, 34, 0.82); border: 1px solid var(--line); }
.side-menu button { text-align: left; padding: 12px 14px; border-radius: 12px; border: 0; background: transparent; color: var(--muted); font-weight: 700; font-size: 14px; }
.side-menu button:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.side-menu button[aria-current='page'] { color: #0b0d24; background: var(--grad); }
.side-menu .who { font-size: 12px; color: var(--faint); padding: 4px 6px 10px; border-bottom: 1px solid rgba(148, 163, 255, 0.16); margin-bottom: 6px; }
.admin-main { display: grid; gap: 22px; min-width: 0; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat { padding: 18px; border-radius: 16px; background: linear-gradient(160deg, rgba(26, 30, 66, 0.86), rgba(12, 14, 34, 0.9)); border: 1px solid var(--line); }
.stat span { font-size: 11px; font-weight: 800; letter-spacing: 0.14em; color: #b39dff; text-transform: uppercase; }
.stat strong { display: block; font-size: clamp(20px, 2.1vw, 30px); overflow-wrap: anywhere; margin-top: 8px; letter-spacing: -0.02em; }
.stat small { color: var(--muted); font-size: 12px; }
.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.filters .field { margin-top: 0; min-width: 180px; flex: 1; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: rgba(139, 92, 246, 0.08); }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
dialog.wide { width: min(980px, calc(100vw - 24px)); }
dialog .card { max-height: calc(100vh - 40px); overflow: auto; }
.section-title { margin: 22px 0 8px; font-size: 16px; }
@media (max-width: 980px) {
  .admin-shell { grid-template-columns: 1fr; }
  .side-menu { position: static; grid-template-columns: repeat(3, 1fr); }
  .side-menu .who { grid-column: 1 / -1; }
  .stats { grid-template-columns: 1fr 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
}

/* Mostrar/ocultar senha */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 52px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); display: grid; place-items: center; }
.pw-toggle:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.pw-toggle svg { width: 22px; height: 22px; }

/* ---- Painel do parceiro (0.3.0) ---- */
.pp { gap: 18px; }
.pp-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.pp-title { margin: 6px 0 0; font-size: clamp(30px, 4vw, 44px); letter-spacing: -0.04em; }
.pp-stats { display: flex; gap: 12px; flex-wrap: wrap; }
.pp-stat { min-width: 150px; padding: 14px 18px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.pp-stat span { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 800; }
.pp-stat strong { font-size: 30px; line-height: 1.1; background: linear-gradient(110deg, var(--cyan), var(--blue) 45%, var(--magenta)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pp-stat small { color: var(--faint); font-size: 12px; }
.pp-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pp-step { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(148, 163, 255, 0.16); color: var(--muted); font-size: 14px; line-height: 1.45; }
.pp-step b { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #0b0d24; background: linear-gradient(135deg, var(--cyan), var(--magenta)); font-size: 13px; }
.pp-step strong { color: var(--text); }
.pp-codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.pp-code { padding: 16px; border-radius: 16px; background: rgba(9, 12, 34, 0.7); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; cursor: pointer; transition: border-color .2s, transform .2s; }
.pp-code:hover, .pp-code:focus-visible { border-color: #a78bfa; transform: translateY(-2px); outline: none; }
.pp-code-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pp-code-num { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 22px; font-weight: 800; letter-spacing: 0.04em; }
.pp-type { font-size: 11px; font-weight: 900; letter-spacing: 0.12em; padding: 4px 9px; border-radius: 999px; color: #0b0d24; background: linear-gradient(110deg, var(--cyan), var(--magenta)); }
.pp-code-name { color: var(--text); font-weight: 700; min-height: 1em; }
.pp-code-url { color: var(--faint); font-size: 12px; word-break: break-all; }
.pp-code-foot { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 13px; }
.pp-types { display: flex; gap: 10px; margin: -4px 0 16px; }
.pp-types label { flex: 1; cursor: pointer; position: relative; min-width: 0; }
#code-dialog .card { overflow-x: hidden; }
.pp-types input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; padding: 0; left: 0; top: 0; }
.pp-types span { display: block; text-align: center; padding: 12px; border-radius: 12px; border: 1px solid var(--line); font-weight: 900; letter-spacing: 0.1em; color: var(--muted); }
.pp-types input:checked + span { color: #0b0d24; background: linear-gradient(110deg, var(--cyan), var(--blue) 45%, var(--magenta)); border-color: transparent; }
.pp-types input:focus-visible + span { outline: 3px solid #a78bfa; outline-offset: 2px; }
.pp-more { margin: 4px 0 12px; color: var(--muted); }
.pp-more summary { cursor: pointer; font-size: 13px; margin-bottom: 10px; }
@media (max-width: 760px) { .pp-steps { grid-template-columns: 1fr; } .pp-stat { min-width: 0; flex: 1; } }
.disclaimer { max-width: 1100px; margin: 10px auto 0; padding: 16px 22px; border-radius: 16px; border: 1px solid rgba(168, 85, 247, 0.35); background: rgba(124, 58, 237, 0.08); color: var(--muted); font-size: 13px; line-height: 1.6; text-align: center; }
.disclaimer strong { color: var(--text); display: block; margin-bottom: 4px; }

/* 0.4.1: tipo da lista explícito (IPTV x P2P) */
.type-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.type-card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; padding: 14px; border-radius: 14px; }
.type-card strong { font-size: 15px; color: var(--text, #fff); }
.type-card small { font-size: 12px; font-weight: 500; line-height: 1.35; color: var(--muted); }
.type-card[aria-selected='true'] { background: rgba(99, 102, 241, 0.16); border: 2px solid #8b5cf6; box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.18); color: var(--muted); }
.type-card[aria-selected='true'] small { color: #c7d2fe; }
.type-badge, .item .info .type-badge { display: inline; padding: 0; margin: 0; background: none; font-size: inherit; font-weight: 800; letter-spacing: .04em; }
.type-iptv, .item .info .type-iptv { color: #22d3ee; }
.type-p2p, .item .info .type-p2p { color: #c084fc; }
@media (max-width: 520px) { .type-pick { grid-template-columns: 1fr; } }

/* 0.4.5: menu do topo (Home / Sou parceiro) nas duas páginas */
.navlink { display: inline-flex; align-items: center; height: 38px; padding: 0 16px; border-radius: 10px; border: 1px solid rgba(148, 163, 255, 0.22); color: var(--muted); font-weight: 700; font-size: 14px; text-decoration: none; }
.navlink:hover { color: var(--text, #fff); border-color: rgba(148, 163, 255, 0.5); }
.navlink.active { color: #0b0d24; background: var(--grad); border-color: transparent; }
.topbar nav { align-items: center; }

/* 0.4.6: pacotes de créditos na página do parceiro (promoção em destaque) */
.pkg-section { max-width: 1180px; margin: 28px auto 0; padding: 0 20px; }
.pkg-section h2 { margin: 6px 0 6px; }
.pkg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-top: 14px; }
.pkg { position: relative; padding: 16px; border-radius: 14px; border: 1px solid rgba(148, 163, 255, 0.22); background: rgba(12, 16, 40, 0.7); }
.pkg strong { display: block; font-size: 17px; }
.pkg-price { margin-top: 8px; font-size: 22px; font-weight: 800; color: #5ee7ff; }
.pkg-price small { font-size: 12px; font-weight: 500; color: var(--muted); }
.pkg-total { margin-top: 4px; font-size: 13px; color: var(--muted); }
.pkg-off { margin-top: 8px; display: inline-block; font-size: 12px; font-weight: 700; color: #c084fc; }
.pkg.promo { border: 2px solid #a855f7; box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.2), 0 10px 30px rgba(139, 92, 246, 0.35); background: linear-gradient(160deg, rgba(34, 211, 238, 0.16), rgba(168, 85, 247, 0.2)); }
.pkg-badge { position: absolute; top: -11px; right: 12px; padding: 3px 10px; border-radius: 999px; background: var(--grad); color: #0b0d24; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; }
.pkg-perks { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.pkg-perks li { padding: 12px 14px 12px 40px; position: relative; border-radius: 12px; border: 1px solid rgba(148, 163, 255, 0.18); background: rgba(12, 16, 40, 0.6); font-size: 14px; line-height: 1.45; color: var(--muted); }
.pkg-perks li strong { color: var(--text, #fff); }
.pkg-perks li::before { content: '✓'; position: absolute; left: 14px; top: 11px; font-weight: 800; color: #5ee7ff; }
.pp .pkg-section, #panel-view .pkg-section { padding-bottom: 30px; }

/* 0.5.0: pagamento da licença (cartão pela rampa ou USDT direto) */
.pay-buttons { display: flex; gap: 6px; justify-content: center; margin-top: 10px; flex-wrap: wrap; }
.pay-box { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin: 12px 0; }
.pay-box img { background: #fff; padding: 8px; border-radius: 12px; }
.pay-data { display: grid; grid-template-columns: auto; gap: 6px; min-width: 0; flex: 1; }
.pay-data span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 6px; }
.pay-data strong { font-size: 24px; color: #5ee7ff; }
.pay-data code { font-size: 13px; word-break: break-all; }
.pkg-buy { margin-top: 12px; width: 100%; }
.price-list .pay-buttons { border: 0; background: none; padding: 0; box-shadow: none; }

/* 0.5.3: plano/pacote selecionável + barra de pagamento */
.price-list .plan { cursor: pointer; font: inherit; color: inherit; padding: 14px 12px; border-radius: 12px; background: rgba(6, 8, 24, 0.55); border: 1px solid rgba(148, 163, 255, 0.16); text-align: center; display: flex; flex-direction: column; gap: 4px; }
.price-list .plan span { font-size: 13px; color: var(--muted); }
.price-list .plan strong { font-size: 22px; }
.price-list .plan:hover, .pkg:hover { border-color: rgba(148, 163, 255, 0.5); }
.price-list .plan.selected, .pkg.selected { border: 2px solid #22d3ee; box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.35); background: linear-gradient(160deg, rgba(34, 211, 238, 0.14), rgba(168, 85, 247, 0.18)); }
.pkg { cursor: pointer; font: inherit; color: inherit; text-align: left; }
.pay-bar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 16px; padding: 14px 16px; border-radius: 14px; border: 1px solid rgba(148, 163, 255, 0.22); background: rgba(12, 16, 40, 0.7); }
.pay-bar-info { font-weight: 700; }
.pay-bar-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
