:root {
  --bg: #0b0f14;
  --bg2: #10161d;
  --card: #141b23;
  --card2: #19222c;
  --line: #233040;
  --text: #e8eef4;
  --muted: #8b9aab;
  --accent: #19d3a2;
  --accent2: #3aa0ff;
  --accent-ink: #04241b;
  --danger: #ff5d6c;
  --warn: #ffb547;
  --ok: #19d3a2;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 'Plus Jakarta Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  min-height: 100vh;
  display: flex; flex-direction: column;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px; }
main.wrap { flex: 1; padding-top: 24px; padding-bottom: 60px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* topbar */
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(11, 15, 20, .85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.logo { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--accent2)); color: var(--accent-ink); font-weight: 800; }
.search { flex: 1; max-width: 560px; display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 0 14px; color: var(--muted); }
.search input { flex: 1; background: none; border: 0; outline: 0; height: 40px; color: var(--text); min-width: 0; }
.search:focus-within { border-color: var(--accent); }
.topnav { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.topnav a.link { padding: 8px 10px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: 14px; }
.topnav a.link:hover { color: var(--text); background: var(--card); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--card2); display: grid; place-items: center; font-weight: 700; overflow: hidden; border: 1px solid var(--line); flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 72px; height: 72px; font-size: 26px; }
.menu { position: relative; }
.menu-pop { position: absolute; right: 0; top: 46px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); min-width: 220px; padding: 6px; display: none; }
.menu.open .menu-pop { display: block; }
.menu-pop a, .menu-pop button { display: flex; gap: 10px; align-items: center; width: 100%; padding: 9px 12px; border-radius: 8px; background: none; border: 0; text-align: left; cursor: pointer; font-size: 14px; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--card2); }
.menu-pop hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }

/* botões e formulários */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 11px; border: 1px solid var(--line); background: var(--card2); font-weight: 700; cursor: pointer; transition: .15s; white-space: nowrap; }
.btn:hover { border-color: #33465b; }
.btn.primary { background: linear-gradient(135deg, var(--accent), #12b88c); border-color: transparent; color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { background: transparent; color: var(--danger); border-color: rgba(255, 93, 108, .4); }
.btn.ghost { background: transparent; }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
label.f { display: block; margin-bottom: 14px; }
label.f > span { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.input, select.input, textarea.input { width: 100%; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; outline: 0; }
.input:focus { border-color: var(--accent); }
textarea.input { min-height: 120px; resize: vertical; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 140px; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input { margin-top: 4px; accent-color: var(--accent); }

/* cards e layout */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.section { margin: 36px 0; }
.section-h { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-h h2 { margin: 0; font-size: 20px; letter-spacing: -.01em; }
.section-h a { color: var(--accent); font-weight: 600; font-size: 14px; }
h1 { font-size: 28px; letter-spacing: -.02em; margin: 0 0 6px; }
.page-h { margin-bottom: 22px; }

/* hero */
.hero { text-align: center; padding: 56px 16px 40px; position: relative; }
.hero::before { content: ''; position: absolute; inset: -24px 0 0; background: radial-gradient(600px 260px at 50% 20%, rgba(25, 211, 162, .16), transparent 70%), radial-gradient(500px 220px at 70% 40%, rgba(58, 160, 255, .12), transparent 70%); z-index: -1; }
.hero h1 { font-size: clamp(32px, 6vw, 56px); line-height: 1.05; margin-bottom: 14px; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); font-size: 17px; margin: 0 auto 24px; max-width: 560px; }
.hero .search { margin: 0 auto; max-width: 560px; height: 52px; }
.trust { display: flex; justify-content: center; flex-wrap: wrap; gap: 18px; margin-top: 22px; color: var(--muted); font-size: 13px; }
.trust span { display: flex; align-items: center; gap: 6px; }
.trust .ico { color: var(--accent); width: 16px; height: 16px; }

/* categorias */
.cats { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.cat { display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; font-weight: 600; font-size: 14px; transition: .15s; }
.cat:hover { border-color: var(--accent); transform: translateY(-1px); }
.cat .cico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: rgba(25, 211, 162, .1); color: var(--accent); flex: none; }
.cat .cico.games { background: rgba(58, 160, 255, .12); color: var(--accent2); }
.cat .cico.servicos { background: rgba(255, 181, 71, .12); color: var(--warn); }
.cat small { display: block; color: var(--muted); font-weight: 500; }

/* produto card */
.pcard { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; transition: .15s; }
.pcard:hover { border-color: #34485e; transform: translateY(-2px); }
.pcard .thumb { aspect-ratio: 4/3; background: var(--card2); position: relative; overflow: hidden; }
.pcard .thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .ph { position: absolute; inset: 0; display: grid; place-items: center; color: #3b4c5f; }
.thumb .ph .ico { width: 44px; height: 44px; stroke-width: 1.5; }
.badge { position: absolute; top: 8px; left: 8px; background: rgba(11, 15, 20, .8); color: var(--accent); font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; display: flex; align-items: center; gap: 4px; }
.badge .ico { width: 12px; height: 12px; }
.pcard .body { padding: 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pcard .t { font-weight: 600; font-size: 14px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 38px; }
.pcard .seller { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.price { font-weight: 800; font-size: 17px; }
.price s, .pcard s { color: var(--muted); font-weight: 500; font-size: 12px; margin-left: 6px; }
.stars { color: #ffc94d; font-size: 12px; letter-spacing: 1px; }
.hscroll { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 220px); gap: 14px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.hscroll > * { scroll-snap-align: start; }
.hscroll::-webkit-scrollbar { height: 6px; }
.hscroll::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }

/* top vendedores */
.sellers { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.seller-card { display: flex; align-items: center; gap: 12px; padding: 14px; }
.rank { font-weight: 800; color: var(--accent); width: 28px; }

/* página de produto */
.pgrid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: start; }
.pgal { border-radius: var(--radius); overflow: hidden; background: var(--card2); aspect-ratio: 4/3; position: relative; border: 1px solid var(--line); }
.pgal img { width: 100%; height: 100%; object-fit: cover; }
.buybox { position: sticky; top: 84px; }
.variants { display: grid; gap: 8px; margin: 14px 0; }
.variant { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: var(--bg2); }
.variant.sel { border-color: var(--accent); background: rgba(25, 211, 162, .06); }
.variant.off { opacity: .45; cursor: not-allowed; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.qty button { width: 38px; height: 40px; background: var(--card2); border: 0; cursor: pointer; font-size: 18px; }
.qty input { width: 54px; text-align: center; height: 40px; border: 0; background: var(--bg2); outline: 0; }
.desc { white-space: pre-wrap; word-wrap: break-word; }
.protect { display: flex; gap: 10px; padding: 12px; background: rgba(25, 211, 162, .07); border: 1px solid rgba(25, 211, 162, .25); border-radius: 10px; font-size: 13px; margin-top: 14px; }
.protect .ico { color: var(--accent); margin-top: 2px; }
.review { padding: 12px 0; border-top: 1px solid var(--line); }

/* tabelas / listas */
.list { display: grid; gap: 10px; }
.li { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.li .mini { width: 56px; height: 56px; border-radius: 10px; overflow: hidden; background: var(--card2); flex: none; display: grid; place-items: center; color: #3b4c5f; }
.li .mini img { width: 100%; height: 100%; object-fit: cover; }
.li .grow { flex: 1; min-width: 0; }
.li .grow .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--card2); border: 1px solid var(--line); white-space: nowrap; }
.status.ok { color: var(--ok); border-color: rgba(25, 211, 162, .35); }
.status.warn { color: var(--warn); border-color: rgba(255, 181, 71, .35); }
.status.bad { color: var(--danger); border-color: rgba(255, 93, 108, .35); }
.status.info { color: var(--accent2); border-color: rgba(58, 160, 255, .35); }
.tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.tabs a, .tabs button { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--muted); font-weight: 600; font-size: 14px; cursor: pointer; }
.tabs .on { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); margin-bottom: 20px; }
.stat { padding: 16px; }
.stat b { display: block; font-size: 22px; margin-top: 4px; }
.empty { text-align: center; padding: 50px 16px; color: var(--muted); }
.empty .ico { width: 42px; height: 42px; margin: 0 auto 10px; stroke-width: 1.5; }

/* pedido + chat */
.ogrid { display: grid; grid-template-columns: 1fr 380px; gap: 20px; align-items: start; }
.timeline { display: flex; gap: 6px; margin: 14px 0; }
.timeline div { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.timeline div.on { background: linear-gradient(90deg, var(--accent), var(--accent2)); }
.chat { display: flex; flex-direction: column; height: 520px; padding: 0; }
.chat-h { padding: 14px 16px; border-bottom: 1px solid var(--line); font-weight: 700; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 82%; padding: 9px 12px; border-radius: 12px; background: var(--card2); font-size: 14px; white-space: pre-wrap; word-wrap: break-word; }
.msg.me { align-self: flex-end; background: rgba(25, 211, 162, .14); }
.msg.sys { align-self: center; background: transparent; border: 1px dashed var(--line); color: var(--muted); font-size: 12px; text-align: center; max-width: 95%; }
.msg .who { font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.chat-f { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat-f input { flex: 1; }
.delivery { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; white-space: pre-wrap; word-break: break-all; }
.rate { display: flex; gap: 4px; font-size: 28px; }
.rate button { background: none; border: 0; cursor: pointer; color: #3b4c5f; padding: 0; }
.rate button.on { color: #ffc94d; }

/* passos */
.steps { display: grid; gap: 14px; }
.step { display: flex; gap: 16px; }
.step .n { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(25, 211, 162, .12); color: var(--accent); font-weight: 800; flex: none; }
.step h3 { margin: 6px 0 4px; font-size: 17px; }
.step p { margin: 0; color: var(--muted); }

/* auth */
.auth { max-width: 420px; margin: 30px auto; }
.auth h1 { text-align: center; }

/* modal & toast */
.modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal[hidden] { display: none; }
.modal .card { width: 100%; max-width: 480px; max-height: 90vh; overflow: auto; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--card2); border: 1px solid var(--line); padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: .2s; z-index: 60; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%); }
.toast.err { border-color: var(--danger); }
.chip { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--card2); border: 1px solid var(--line); font-size: 12px; color: var(--text); }
.notice { padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(255, 181, 71, .35); background: rgba(255, 181, 71, .07); font-size: 14px; margin-bottom: 16px; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; margin: 60px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* footer */
.footer { border-top: 1px solid var(--line); background: var(--bg2); padding: 30px 0; margin-top: auto; }
.footer-in { display: flex; gap: 30px; flex-wrap: wrap; justify-content: space-between; }
.footer-links { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.footer-links a:hover { color: var(--text); }

@media (max-width: 900px) {
  .pgrid, .ogrid { grid-template-columns: 1fr; }
  .buybox { position: static; }
}
@media (max-width: 640px) {
  .topbar-in { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; }
  .topbar .search { order: 3; flex-basis: 100%; max-width: none; }
  .brand-name { display: none; }
  .footer .brand-name { display: inline; }
  .topnav a.link.hide-sm { display: none; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .hscroll { grid-auto-columns: 46%; }
  .li { flex-wrap: wrap; }
  h1 { font-size: 24px; }
}

/* estoque de entrega automática */
.stockbox { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin: 12px 0; background: var(--card); }
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.modes .variant { cursor: pointer; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; }
@media (max-width: 640px) { .modes { grid-template-columns: 1fr; } }

/* pagamento Pix */
.paybox { margin-top: 16px; border: 1px solid rgba(25, 211, 162, .3); border-radius: 12px; padding: 16px; background: rgba(25, 211, 162, .04); }
.pix { display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-start; }
.pixqr { width: 210px; height: 210px; background: #fff; border-radius: 12px; padding: 8px; display: grid; place-items: center; flex: none; color: #333; }
.pixqr img { width: 100%; height: 100%; image-rendering: pixelated; }
