/* ONYX — tema oficial (paleta aprovada em 2026-11-23) */
:root {
  --fundo: #0B0714;
  --superficie: #1A0F2B;
  --superficie-2: #221239;
  --primaria: #621188;
  --primaria-clara: #9333C4;
  --primaria-profunda: #29014D;
  --texto: #F2EAF4;
  --texto-secundario: #DAC3D5;
  --alerta: #C0392B;
  --borda: rgba(218, 195, 213, 0.14);
  --sombra: 0 12px 32px rgba(0, 0, 0, 0.45);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--texto);
  background:
    radial-gradient(900px 480px at 50% -120px, rgba(98, 17, 136, 0.35), transparent 65%),
    var(--fundo);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .marca, .preco { font-family: "Manrope", "Inter", system-ui, sans-serif; }
a { color: var(--texto-secundario); }

/* ---------- topo ---------- */
.topo {
  background: rgba(11, 7, 20, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(90deg, var(--primaria-profunda), var(--primaria-clara), var(--primaria-profunda)) 1;
  padding: 14px 20px; display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 8px;
  position: sticky; top: 0; z-index: 10;
}
.topo .marca {
  font-size: 24px; font-weight: 800; letter-spacing: 3px; color: #fff;
  text-decoration: none;
}
.topo .marca::first-letter { color: var(--primaria-clara); }
.topo nav a {
  margin-left: 6px; text-decoration: none; font-size: 14px; font-weight: 600;
  padding: 7px 12px; border-radius: 999px;
}
.topo nav a:hover { background: var(--superficie-2); color: #fff; }

.conteudo { max-width: 1120px; margin: 0 auto; padding: 28px 16px 56px; }

/* ---------- componentes ---------- */
.card {
  background: linear-gradient(180deg, var(--superficie-2), var(--superficie));
  border: 1px solid var(--borda);
  border-radius: 16px; padding: 22px; margin-bottom: 16px;
  box-shadow: var(--sombra);
}
h1 { font-size: 32px; font-weight: 800; margin: 0 0 12px; }
h2 { font-size: 21px; font-weight: 800; margin: 0 0 10px; }
button, .botao {
  background: linear-gradient(135deg, var(--primaria-clara), var(--primaria));
  color: #fff; border: 0; border-radius: 10px;
  padding: 12px 20px; cursor: pointer; font-size: 15px; font-weight: 700;
  text-decoration: none; display: inline-block; text-align: center;
  transition: transform 0.15s ease, filter 0.15s ease;
  box-shadow: 0 6px 18px rgba(98, 17, 136, 0.45);
}
button:hover, .botao:hover { filter: brightness(1.15); transform: translateY(-1px); }
button.perigo { background: var(--alerta); box-shadow: none; }
button.secundario { background: var(--primaria-profunda); box-shadow: none; }
input, select, textarea {
  width: 100%; padding: 11px 12px; margin: 6px 0 12px; border-radius: 10px;
  border: 1px solid var(--borda); background: rgba(11, 7, 20, 0.7);
  color: var(--texto); font-size: 15px; font-family: inherit;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--primaria-clara); outline-offset: 0; border-color: transparent;
}
label { font-size: 13px; font-weight: 600; color: var(--texto-secundario); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 8px; border-bottom: 1px solid var(--borda); text-align: left; }
th { color: var(--texto-secundario); font-size: 12px; text-transform: uppercase; letter-spacing: 0.6px; }
tr:hover td { background: rgba(147, 51, 196, 0.06); }
.erro { background: var(--alerta); color: #fff; padding: 12px; border-radius: 10px; margin-bottom: 12px; font-weight: 600; }
.grade { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.preco { font-size: 30px; font-weight: 800; }
.qr { background: #fff; padding: 12px; border-radius: 12px; display: inline-block; }
.qr img { width: 240px; height: 240px; }
code { word-break: break-all; }
.acoes form { display: inline; }
.acoes button { padding: 6px 10px; font-size: 13px; margin: 2px 0; box-shadow: none; }

/* ---------- vitrine (página de compra) ---------- */
.hero { text-align: center; padding: 26px 8px 8px; }
.hero h1 { font-size: clamp(30px, 6vw, 46px); line-height: 1.15; margin-bottom: 10px; }
.hero h1 .destaque-texto {
  background: linear-gradient(90deg, var(--primaria-clara), var(--texto-secundario));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { color: var(--texto-secundario); font-size: 17px; max-width: 560px; margin: 0 auto 18px; }
.vantagens { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.vantagens span {
  border: 1px solid var(--borda); border-radius: 999px; padding: 6px 14px;
  font-size: 13px; font-weight: 600; color: var(--texto-secundario);
  background: rgba(26, 15, 43, 0.7);
}
.planos {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px; align-items: stretch; margin-top: 26px;
}
.plano {
  position: relative; display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--superficie-2), var(--superficie));
  border: 1px solid var(--borda); border-radius: 18px; padding: 26px 22px;
  box-shadow: var(--sombra);
}
.plano.destaque {
  border: 1.5px solid var(--primaria-clara);
  box-shadow: 0 16px 40px rgba(98, 17, 136, 0.5);
}
.selo {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(90deg, var(--primaria-clara), var(--primaria));
  color: #fff; font-size: 11px; font-weight: 800; letter-spacing: 1.2px;
  padding: 5px 14px; border-radius: 999px; white-space: nowrap;
}
.plano h2 { text-align: center; font-size: 19px; letter-spacing: 0.4px; }
.plano .preco { text-align: center; font-size: 42px; margin: 6px 0 2px; }
.plano .preco small { font-size: 15px; font-weight: 600; color: var(--texto-secundario); }
.plano .periodo { text-align: center; color: var(--texto-secundario); font-size: 13px; margin: 0 0 16px; }
.plano ul { list-style: none; padding: 0; margin: 0 0 18px; }
.plano ul li { padding: 7px 0 7px 26px; position: relative; font-size: 14.5px; border-bottom: 1px dashed rgba(218, 195, 213, 0.12); }
.plano ul li:last-child { border-bottom: 0; }
.plano ul li::before { content: "✓"; position: absolute; left: 2px; color: var(--primaria-clara); font-weight: 800; }
.plano form { margin-top: auto; }
.plano form button { width: 100%; padding: 14px; font-size: 16px; }
.passos { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 38px; }
.passo {
  border: 1px solid var(--borda); border-radius: 16px; padding: 20px;
  background: rgba(26, 15, 43, 0.55);
}
.passo .numero {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primaria-clara), var(--primaria));
  font-weight: 800; font-size: 15px; margin-bottom: 10px;
}
.passo h3 { margin: 0 0 6px; font-size: 16px; font-family: "Manrope", "Inter", sans-serif; }
.passo p { margin: 0; color: var(--texto-secundario); font-size: 14px; }

/* ---------- rodapé ---------- */
.rodape {
  border-top: 1px solid var(--borda); margin-top: 24px;
  padding: 22px 16px 30px; text-align: center;
  color: var(--texto-secundario); font-size: 13px;
}
.rodape .marca-rodape { font-family: "Manrope", sans-serif; font-weight: 800; letter-spacing: 2px; color: var(--texto); }

@media (max-width: 560px) {
  .conteudo { padding: 20px 12px 44px; }
  h1 { font-size: 26px; }
  .topo { justify-content: center; text-align: center; }
  .topo nav { width: 100%; text-align: center; }
  .plano .preco { font-size: 36px; }
}

/* ---------- layout do painel (sidebar) ---------- */
.layout-painel {
  display: grid; grid-template-columns: 250px minmax(0, 1fr);
  min-height: 100vh; align-items: start;
}
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column;
  padding: 22px 14px 18px;
  background: linear-gradient(180deg, #170B2B, var(--fundo) 72%);
  border-right: 1px solid var(--borda);
}
.sidebar-marca {
  font-family: "Manrope", "Inter", sans-serif;
  font-size: 22px; font-weight: 800; letter-spacing: 3px; color: #fff;
  text-decoration: none; padding: 2px 10px 18px;
}
.sidebar-marca::first-letter { color: var(--primaria-clara); }
.menu { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.menu-secao {
  font-size: 11px; font-weight: 700; letter-spacing: 1.6px;
  text-transform: uppercase; color: var(--texto-secundario); opacity: 0.75;
  padding: 16px 10px 6px;
}
.menu-secao:first-child { padding-top: 0; }
.menu-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 10px; position: relative;
  color: var(--texto-secundario); text-decoration: none;
  font-size: 14.5px; font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
}
.menu-item svg { width: 20px; height: 20px; flex: none; }
.menu-item:hover { background: rgba(147, 51, 196, 0.12); color: #fff; }
.menu-item.ativo {
  background: linear-gradient(90deg, rgba(147, 51, 196, 0.35), rgba(98, 17, 136, 0.16));
  color: #fff;
}
.menu-item.ativo::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px;
  width: 3px; border-radius: 3px; background: var(--primaria-clara);
}
.sidebar-rodape {
  border-top: 1px solid var(--borda); margin-top: 18px; padding-top: 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.usuario-chip { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.avatar-inicial {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primaria-clara), var(--primaria));
  font-family: "Manrope", sans-serif; font-weight: 800; font-size: 16px; color: #fff;
}
.usuario-info { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.usuario-info strong { font-size: 14px; color: var(--texto); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.usuario-info small { font-size: 12px; color: var(--texto-secundario); }
.sair-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 10px;
  color: var(--texto-secundario); text-decoration: none;
  font-size: 14px; font-weight: 600;
}
.sair-link svg { width: 19px; height: 19px; flex: none; }
.sair-link:hover { background: rgba(192, 57, 43, 0.16); color: #fff; }
.painel-principal {
  width: 100%; max-width: 1240px; margin: 0 auto;
  padding: 28px 30px 56px; min-width: 0;
}

/* ---------- hero e estatísticas dos dashboards ---------- */
.hero-card {
  background:
    radial-gradient(560px 260px at 88% -30%, rgba(218, 195, 213, 0.22), transparent 60%),
    linear-gradient(120deg, var(--primaria-profunda), var(--primaria) 58%, var(--primaria-clara) 135%);
  border-radius: 18px; padding: 28px; margin-bottom: 20px;
  box-shadow: var(--sombra);
  display: flex; justify-content: space-between; align-items: center;
  gap: 24px; flex-wrap: wrap;
}
.hero-texto { min-width: min(480px, 100%); }
.hero-eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--texto-secundario);
}
.hero-card h1 { color: #fff; margin: 6px 0 8px; font-size: clamp(26px, 4vw, 34px); }
.hero-card p { color: rgba(242, 234, 244, 0.88); margin: 0; max-width: 560px; }
.hero-acoes { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.botao.claro { background: #fff; color: var(--primaria-profunda); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28); }
.botao.contorno {
  background: transparent; color: #fff; box-shadow: none;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
}
.hero-saldo {
  background: rgba(11, 7, 20, 0.35); border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 14px; padding: 16px 22px; min-width: 190px;
  display: flex; flex-direction: column; gap: 1px;
}
.hero-saldo-rotulo {
  font-size: 11.5px; font-weight: 700; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--texto-secundario);
}
.hero-saldo-valor {
  font-family: "Manrope", sans-serif; font-weight: 800;
  font-size: 40px; line-height: 1.1; color: #fff;
}
.hero-saldo-detalhe { font-size: 12.5px; color: rgba(242, 234, 244, 0.8); }
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}
.stat-card {
  display: flex; gap: 14px; align-items: flex-start;
  background: linear-gradient(180deg, var(--superficie-2), var(--superficie));
  border: 1px solid var(--borda); border-radius: 16px;
  padding: 18px; box-shadow: var(--sombra);
}
.stat-icone {
  width: 46px; height: 46px; border-radius: 12px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primaria-clara), var(--primaria));
  color: #fff; box-shadow: 0 6px 16px rgba(98, 17, 136, 0.4);
}
.stat-icone svg { width: 23px; height: 23px; }
.stat-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.stat-rotulo {
  font-size: 11.5px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--texto-secundario);
}
.stat-valor {
  font-family: "Manrope", sans-serif; font-weight: 800;
  font-size: 25px; line-height: 1.2; color: var(--texto);
}
.stat-detalhe { font-size: 12.5px; color: var(--texto-secundario); opacity: 0.85; }

/* ---------- tabelas roláveis (mobile) ---------- */
.tabela-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  max-width: 100%;
}
.tabela-wrap table { min-width: 560px; }

/* ---------- links para clientes (dashboard) ---------- */
.links-clientes .link-linha {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 0; border-bottom: 1px dashed rgba(218, 195, 213, 0.12);
}
.links-clientes .link-linha:last-of-type { border-bottom: 0; }
.link-rotulo { font-weight: 700; font-size: 14px; min-width: 150px; }
.link-url {
  flex: 1; min-width: 200px; font-size: 13.5px; color: var(--texto-secundario);
  background: rgba(11, 7, 20, 0.55); border: 1px solid var(--borda);
  border-radius: 8px; padding: 8px 10px;
}
.link-linha button { padding: 9px 14px; }
.link-nota { color: var(--texto-secundario); font-size: 13.5px; margin-bottom: 0; }

/* ---------- responsivo (tablet e celular) ---------- */
body { overflow-x: hidden; }

@media (max-width: 1024px) {
  .painel-principal { padding: 24px 20px 48px; }
  .stats { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
  .planos { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}

@media (max-width: 860px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grade { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
  .menu-item { min-height: 44px; }
  .topo nav a { padding: 10px 12px; display: inline-block; }
}

@media (max-width: 560px) {
  input, select, textarea { font-size: 16px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat-card { padding: 13px; gap: 10px; }
  .stat-icone { width: 38px; height: 38px; border-radius: 10px; }
  .stat-icone svg { width: 19px; height: 19px; }
  .stat-valor { font-size: 20px; }
  .hero-card { padding: 20px 16px; }
  .hero-card h1 { font-size: clamp(23px, 7vw, 28px); }
  .hero-acoes { flex-direction: column; }
  .hero-acoes .botao { width: 100%; }
  .hero-saldo-valor { font-size: 32px; }
  .card { padding: 16px; }
  .acoes button { padding: 10px 12px; }
  .planos { grid-template-columns: minmax(0, 1fr); }
  .passos { grid-template-columns: minmax(0, 1fr); }
  .qr img { max-width: 100%; height: auto; }
  .link-rotulo { min-width: 0; width: 100%; }
  .link-url { min-width: 0; }
}

@media (max-width: 860px) {
  .layout-painel { grid-template-columns: 1fr; }
  .sidebar {
    position: static; height: auto; overflow: visible;
    padding: 14px 12px 10px;
    border-right: 0; border-bottom: 1px solid var(--borda);
  }
  .sidebar-marca { padding-bottom: 8px; }
  .menu {
    flex-direction: row; overflow-x: auto; gap: 6px;
    padding-bottom: 6px; -webkit-overflow-scrolling: touch;
  }
  .menu-secao { display: none; }
  .menu-item { white-space: nowrap; flex: none; }
  .menu-item.ativo::before { display: none; }
  .sidebar-rodape {
    flex-direction: row; align-items: center; justify-content: space-between;
    margin-top: 8px; padding-top: 10px;
  }
  .painel-principal { padding: 20px 14px 44px; }
  .hero-card { padding: 22px; }
  .hero-saldo { width: 100%; }
}
