/* Sitio My Rewards: mismos colores y tipografías de la tienda (base.css y fonts.css son copia de la tienda) */

/* Encabezado */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--bg); box-shadow: 0 1px 0 var(--outline); }
.top-in { max-width: 1120px; margin: 0 auto; padding: 8px 16px; min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; line-height: 1; min-width: 0; }
.brand .logo { width: 40px; height: 40px; border-radius: 9px; flex: none; }
.brand .wm { display: grid; gap: 1px; font-family: var(--display); text-transform: uppercase; }
.brand .wm b { font-weight: 800; font-size: 26px; line-height: 0.86; white-space: nowrap; }
.lang { display: inline-flex; }
.lang button { position: relative; min-width: 44px; height: 44px; padding: 0; border: 0; background: transparent; color: var(--muted); font-weight: 700; font-size: 14px; letter-spacing: 0.04em; }
.lang button + button::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 1px; background: var(--line); }
.lang button[aria-pressed="true"] { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 7px; }

/* Estructura: en teléfono una columna; en tablet/escritorio panel de marca a la izquierda */
.rw-wrap { max-width: 1040px; margin: 0 auto; padding: 16px 16px 40px; min-height: calc(100dvh - 140px); display: grid; gap: 24px; align-items: start; }
.rw-col { width: 100%; max-width: 480px; margin: 0 auto; }
.side { display: none; }
.rw-dash { max-width: 640px; margin: 0 auto; padding: 16px 16px 40px; min-height: calc(100dvh - 140px); }
.rw-dash .card + .card { margin-top: 16px; }

.side { position: relative; overflow: hidden; border-radius: 24px; padding: 40px 36px; background: radial-gradient(120% 90% at 0% 0%, #1E3170 0%, var(--surface) 55%, var(--bg) 100%); box-shadow: var(--sh-1); }
.side::after { content: ""; position: absolute; right: -60px; bottom: -60px; width: 220px; height: 220px; border-radius: 50%; border: 28px solid var(--chip); }
.side img { width: 72px; height: 72px; border-radius: 16px; }
.side-k { margin-top: 28px; font-family: var(--display); font-weight: 800; font-size: 64px; line-height: 0.9; text-transform: uppercase; color: var(--btn); }
.side-t { margin-top: 16px; font-size: 22px; font-weight: 800; line-height: 1.25; color: var(--ink); text-wrap: balance; }
.side-p { margin-top: 10px; color: var(--muted); font-size: 16px; line-height: 1.55; max-width: 34ch; }
.side-f { margin-top: 40px; font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: 0.04em; color: var(--btn); }

.back { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.card { margin-top: 8px; background: var(--surface); border: 1px solid var(--outline); border-radius: 14px; padding: 20px; min-width: 0; }
.card h1 { font-size: 26px; font-weight: 800; line-height: 1.2; letter-spacing: -0.01em; color: var(--ink); text-wrap: balance; }
.card h2 { font-size: 17px; font-weight: 700; line-height: 1.3; }
.card section > h2:first-child { margin-top: 16px; }
.kicker { color: var(--btn); font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: 0.06em; text-transform: uppercase; }
.lead, .muted { color: var(--muted); margin-top: 8px; text-wrap: pretty; }
.sm { font-size: 14px; }
.panel { margin-top: 20px; padding: 16px; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); }

/* Pestañas Entrar / Crear cuenta */
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 20px; padding: 4px; background: var(--bg); border-radius: 14px; }
.tabs button { min-height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-weight: 700; }
.tabs button[aria-selected="true"] { background: var(--chip); color: var(--ink); }

/* Campos */
.fl { display: block; margin-top: 16px; font-weight: 600; font-size: 15px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
input[type="email"], input[type="password"], input[type="text"], input[type="tel"] { width: 100%; min-height: 48px; margin-top: 6px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); font-size: 16px; }
input:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
#cCode { letter-spacing: 0.4em; font-size: 22px; font-weight: 700; text-align: center; }
.pw { position: relative; }
.pw input { padding-right: 88px; }
.eye { position: absolute; right: 4px; top: 10px; min-height: 40px; padding: 0 12px; border: 0; background: transparent; color: var(--btn); font-weight: 700; font-size: 14px; }
.rules { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; font-size: 13px; color: var(--muted); }
.rules li { display: flex; align-items: center; gap: 6px; }
.rules li::before { content: ""; flex: none; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--line); }
.rules li.on { color: var(--ink); }
.rules li.on::before { border-color: var(--btn); background: var(--btn) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230A1330' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 10px no-repeat; }
.check { display: flex; align-items: flex-start; gap: 12px; margin-top: 16px; font-size: 15px; line-height: 1.45; cursor: pointer; }
.check.sm { font-size: 14px; color: var(--muted); }
.check input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--btn); }
.check a { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.captcha:not(:empty) { margin-top: 16px; min-height: 65px; }

/* Avisos */
.note { margin-top: 16px; padding: 12px 14px; border-radius: 12px; font-weight: 600; font-size: 15px; }
.note.bad { background: rgba(255, 154, 143, 0.12); color: var(--bad); }
.note.ok { background: rgba(255, 201, 51, 0.12); color: var(--btn); }

/* Botones */
.btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 48px; margin-top: 20px; padding: 0 18px; border: 0; border-radius: 10px; background: var(--btn); color: var(--btn-ink); font-weight: 700; font-size: 16px; text-decoration: none; transition: transform 160ms var(--ease-out), opacity 160ms; }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); margin-top: 12px; }
.link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 8px; padding: 0; border: 0; background: transparent; color: var(--ink); font-weight: 600; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; }
.alt { margin-top: 8px; }
.or { display: flex; align-items: center; gap: 12px; margin-top: 12px; color: var(--muted); font-size: 14px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.alt-btn { margin-top: 12px; background: var(--bg); color: var(--ink); border: 1.5px solid var(--line); font-weight: 700; font-size: 16px; }
.alt-btn svg { width: 20px; height: 20px; flex: none; }
.help { display: inline-flex; align-items: center; min-height: 44px; margin-top: 16px; color: var(--muted); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }

/* Panel: tu cuenta */
.acc-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--outline); }
.acc-row .link { margin-top: 0; }
.acc-l { color: var(--muted); font-size: 14px; font-weight: 600; }
.acc-v { font-weight: 700; overflow-wrap: anywhere; }
.acc-form { padding: 4px 0 16px; border-bottom: 1px solid var(--outline); }
.acc-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.acc-btns .btn { margin-top: 16px; }
.danger { color: var(--bad); }
.danger-btn { background: var(--bad); color: #2A0B07; }

.foot { padding: 20px 16px 28px; text-align: center; color: var(--muted); font-size: 13px; border-top: 1px solid var(--outline); }
[hidden] { display: none !important; }

@media (max-width: 339px) { .brand .wm b { font-size: 21px; } .two, .rules { grid-template-columns: 1fr; } }
@media (min-width: 760px) {
  .brand .wm b { font-size: 30px; }
  .rw-wrap { padding-top: 32px; }
  .card { padding: 24px; }
}
@media (min-width: 960px) {
  .rw-wrap { grid-template-columns: minmax(0, 1fr) 460px; gap: 40px; }
  .side { display: block; position: sticky; top: 96px; margin-top: 52px; }
  .rw-col { margin: 0; }
  .rw-col .card > h1, .rw-col .card > .lead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }   /* el panel de marca ya los muestra */
  .rw-col .card > .tabs, .rw-col .card section[data-view="auth"] .tabs { margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }

/* Panel: link de registro, red y afiliados */
.link-box input { font-size: 15px; color: var(--btn); font-weight: 700; }
.levels { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.levels li { display: grid; grid-template-columns: 72px 1fr 40px; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; }
.levels li b { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.levels li.on, .levels li.on b { color: var(--ink); }
.lv-bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.lv-bar i { display: block; height: 100%; min-width: 2px; border-radius: inherit; background: var(--btn); }
.affs { list-style: none; margin: 12px 0 0; padding: 0; }
.affs li { display: grid; gap: 2px; padding: 12px 0; border-bottom: 1px solid var(--outline); }
.affs li span { color: var(--muted); font-size: 14px; }
.affs li.empty { color: var(--muted); border: 0; }
.acc-btns:has(> [hidden]) { grid-template-columns: 1fr; }

/* ── Panel con pestañas, planes, pagos, banners, ganancias, administrador y sitios públicos ── */
.dtabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 8px -16px 0; padding: 4px 16px; position: sticky; top: calc(env(safe-area-inset-top, 0px) + 64px); z-index: 10; background: var(--bg); }
.dtabs::-webkit-scrollbar { display: none; }
.dtabs a { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 12px; color: var(--muted); font-weight: 700; font-size: 15px; text-decoration: none; }
.dtabs a[aria-current] { background: var(--chip); color: var(--ink); }
@media (hover: hover) { .dtabs a:hover { color: var(--ink); } }
.tag { display: inline-flex; align-items: center; width: max-content; padding: 3px 9px; border-radius: 999px; background: var(--bg); color: var(--muted); font-size: 12px; font-weight: 700; }
.tag.on { background: rgba(255, 201, 51, 0.14); color: var(--btn); }
.tag.bad { background: rgba(255, 154, 143, 0.14); color: var(--bad); }
.grp { font-size: 16px; font-weight: 800; margin-top: 24px; }
select, textarea, input[type="number"], input[type="search"], input[type="url"] { width: 100%; min-height: 48px; margin-top: 6px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); font-size: 16px; }
textarea { resize: vertical; min-height: 88px; font: inherit; }
.hint { color: var(--muted); font-size: 14px; margin-top: 6px; }
code { font-family: ui-monospace, Consolas, monospace; font-size: 13px; overflow-wrap: anywhere; color: var(--ink); }

/* Ventana de pago */
dialog#payDlg { width: min(520px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 20px; background: var(--surface); color: var(--ink); box-shadow: var(--sh-2); }
dialog#payDlg::backdrop { background: rgba(4, 9, 24, 0.7); }
/* Pago: "esperando" con un punto que late, y el respaldo de pegar el hash plegado */
.spin { display: inline-block; width: 9px; height: 9px; margin-right: 6px; border-radius: 50%; background: currentColor; vertical-align: middle; animation: rw-pulse 1.2s ease-in-out infinite; }
@keyframes rw-pulse { 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .spin { animation: none; } }
.pay-manual { margin-top: 16px; }
.pay-manual summary { cursor: pointer; font-weight: 600; color: var(--muted); }
/* Formas de pago (una debajo de otra) y recibo */
.pay-ways { display: grid; gap: 10px; margin-top: 8px; }
.pay-ways .btn { width: 100%; margin: 0; }
.pay-qr { width: 208px; max-width: 70%; margin: 12px auto 8px; padding: 10px; background: #fff; border-radius: 12px; line-height: 0; }
.pay-qr svg { width: 100%; height: auto; display: block; }
.receipt { display: grid; gap: 10px; margin: 16px 0 0; padding: 14px; border-radius: 14px; background: var(--bg); }
.receipt div { display: grid; gap: 2px; }
.receipt dt { color: var(--muted); font-size: 13px; }
.receipt dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.receipt dd .link { display: inline-block; margin: 6px 0 0; }
.btn.sm-btn { width: auto; min-height: 40px; margin: 0 0 6px; padding: 0 16px; font-size: 14px; }   /* botón pequeño dentro de una fila */
/* Compra de la tienda: líneas con foto y resumen del total */
.lines li { align-items: center; }
.lines img { flex: none; width: 56px; height: 75px; object-fit: cover; border-radius: 8px; }
.lines li > div { flex: 1; }
.sum { display: grid; gap: 8px; margin-top: 16px; padding: 14px; border-radius: 14px; background: var(--bg); }
.sum div { display: flex; justify-content: space-between; gap: 12px; }
.sum .off { color: var(--btn); }
.sum .tot { padding-top: 8px; border-top: 1px solid var(--outline); font-weight: 800; font-size: 18px; }
.shop-row { flex-wrap: wrap; justify-content: flex-end; }
.shop-row label:not(.check) { display: grid; gap: 2px; font-size: 12px; color: var(--muted); }
.shop-row input[type=number] { width: 92px; }
.dlg-in { padding: 24px 20px; overflow-y: auto; }
.dlg-in h2 { font-size: 22px; font-weight: 800; }
.copy-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; padding: 8px 12px; border-radius: 12px; background: var(--bg); }
.copy-row .link { margin: 0; flex: none; }
.pay-amt { font-size: 22px; color: var(--btn); }
#txid { font-family: ui-monospace, Consolas, monospace; font-size: 14px; }

/* Banners y productos */
.items { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 12px; }
.item { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 12px; border-radius: 16px; background: var(--bg); }
.item img { width: 96px; height: 96px; object-fit: cover; border-radius: 12px; background: var(--chip); }
.item-info { display: grid; gap: 4px; align-content: start; min-width: 0; }
.item-info .price { color: var(--btn); font-weight: 700; }
.item-info .dest { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-act { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0 18px; }
.item-act .link { margin: 0; }
.item.ask { grid-template-columns: 1fr; }
.item-form { margin-top: 16px; padding: 16px; border-radius: 16px; background: var(--bg); }
.item-form h3 { font-size: 18px; font-weight: 800; }
.item-form input, .item-form select { background: var(--surface); }
.img-pick { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.img-pick img { width: 110px; height: 110px; object-fit: cover; border-radius: 12px; }
.img-pick .btn { width: auto; margin: 0; padding: 0 18px; cursor: pointer; }

/* Listas (pedidos, retiros, comisiones, usuarios) */
.rows { list-style: none; margin: 12px 0 0; padding: 0; }
.rows li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--outline); }
.rows li > div { display: grid; gap: 3px; min-width: 0; }
.rows li .r { justify-items: end; text-align: right; align-content: start; }
.rows li.empty { color: var(--muted); border: 0; }
.rows .link { margin: 0; min-height: 32px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); margin-top: 14px; border: 1px solid var(--outline); border-radius: 12px; overflow: hidden; }
.stats > div { display: grid; gap: 4px; padding: 14px 16px; box-shadow: 0 0 0 0.5px var(--outline); }
.card:has(> .stats:only-child) { padding: 0; border: 0; background: none; }   /* el resumen del administrador ya es su propio marco */
.stats span { color: var(--muted); font-size: 13px; font-weight: 600; }
.stats b { font-size: 20px; font-variant-numeric: tabular-nums; }
.row-form { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.row-form input { min-height: 40px; margin: 0; padding: 6px 10px; font-size: 14px; }
.row-form input[type="number"] { width: 100px; }
.row-form .check { margin: 0; }
.adm #aBody { margin-top: 0; }

/* Sitio público de cada usuario */
.pub { max-width: 1120px; margin: 0 auto; padding: 24px 16px 48px; min-height: calc(100dvh - 140px); }
.pub h1 { font-family: var(--display); font-weight: 800; font-size: clamp(36px, 8vw, 60px); line-height: 1; text-transform: uppercase; margin-top: 6px; }
.pub .dtabs { position: static; margin-top: 16px; }
.pgrid { display: grid; gap: 14px; margin-top: 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pcard { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 16px; background: var(--surface); color: var(--ink); text-decoration: none; box-shadow: var(--sh-1); }
.pshot { aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--bg); }
.pshot img { width: 100%; height: 100%; object-fit: cover; }
.pname { font-weight: 700; line-height: 1.3; }
.pcard .price { color: var(--btn); font-weight: 800; }
.pcard .btn { margin-top: auto; min-height: 44px; font-size: 15px; }
@media (min-width: 760px) { .pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .dtabs { margin: 8px 0 0; padding: 4px 0; } }
@media (min-width: 1024px) { .pgrid { grid-template-columns: repeat(5, minmax(0, 1fr)); } .rw-dash { max-width: 760px; } }
@media (max-width: 759px) { .adm .rows li { flex-direction: column; } .adm .rows li .r { justify-items: start; text-align: left; } .adm .row-form { width: 100%; } .adm .row-form input { flex: 1; } }

/* ── App del panel y del administrador: menú lateral en computadora, barra inferior en celular ──
   Una sola superficie por bloque (sin tarjetas dentro de tarjetas). El amarillo marca solo la acción principal
   y la sección activa; el dinero que entra va en verde y el que sale en rojo. */
.app-body { --nav-w: 248px; }
.app-wait { padding: 24px max(16px, env(safe-area-inset-left, 0px)); }
.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.snav { display: none; }
.app-main { min-width: 0; padding: 0 max(16px, env(safe-area-inset-right, 0px)) calc(88px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.abar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; display: flex; align-items: center; gap: 12px; min-height: 60px; margin: 0 calc(-1 * max(16px, env(safe-area-inset-left, 0px))); padding: 8px max(16px, env(safe-area-inset-left, 0px)); background: var(--bg); border-bottom: 1px solid var(--outline); }
.abar-logo .logo { width: 32px; height: 32px; border-radius: 8px; }
.abar-t { flex: 1; min-width: 0; font-size: 20px; font-weight: 800; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.abar-r { display: flex; align-items: center; gap: 8px; }
.who { display: none; color: var(--muted); font-size: 14px; font-weight: 600; max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.abar .lang button { min-width: 38px; height: 38px; font-size: 13px; }

/* Franja de resumen: cifras de la cuenta en una sola banda */
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 16px 0 0; border: 1px solid var(--outline); border-radius: 14px; overflow: hidden; background: var(--outline); }
.kpi { display: grid; align-content: start; gap: 2px; padding: 14px 16px; background: var(--surface); min-width: 0; }
.kpi dt { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.kpi dd { margin: 0; font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi span { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi.big dd { font-size: 22px; color: var(--btn); }
.kpi.bad dd { color: var(--bad); }
.kpi.dim dd { color: var(--muted); font-weight: 600; font-size: 16px; }
.kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }

.panels { padding-top: 16px; }
.panels section { display: grid; gap: 16px; align-content: start; }
.panels section > .card, .panels section > div > .card { margin-top: 0; }
.card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.tlink { display: inline-flex; align-items: center; min-height: 32px; padding: 0; border: 0; background: none; color: var(--focus); font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; }
.tlink:hover { text-decoration: underline; text-underline-offset: 3px; }
.sec-p { margin: 0; max-width: 70ch; }
.empty, .empty-st .muted { color: var(--muted); }
.empty-st { display: grid; gap: 4px; justify-items: start; margin-top: 12px; }
.empty-st .btn { width: auto; margin-top: 12px; }
.narrow { max-width: 720px; }

/* Inicio: planes con su barra de días */
.plist { list-style: none; margin: 8px 0 0; padding: 0; }
.prow { display: grid; gap: 8px; padding: 14px 0; border-bottom: 1px solid var(--outline); }
.prow:last-child { border-bottom: 0; padding-bottom: 0; }
.prow-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.prow-h b { font-size: 16px; }
.prow-d { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.prow.done .prow-d { color: var(--bad); }
.prow-f { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.meter { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: inherit; background: var(--btn); }

/* Movimientos de dinero (Inicio y Ganancias) */
.act { list-style: none; margin: 8px 0 0; padding: 0; }
.act-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--outline); }
.act-row:last-child { border-bottom: 0; }
.act-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.act-row.g-com .act-dot { background: var(--btn); }
.act-row.g-bal .act-dot { background: var(--focus); }
.act-row.g-wd .act-dot { background: var(--bad); }
.act-txt { display: grid; gap: 2px; min-width: 0; }
.act-txt b { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-txt span { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-r { display: grid; justify-items: end; gap: 2px; }
.amt { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.amt.pos { color: var(--pos); }
.amt.neg { color: var(--ink); }
.act-row.off .amt { color: var(--muted); text-decoration: line-through; }
.act .empty { padding: 12px 0; }

/* Control segmentado (acciones y filtros) */
.seg { display: flex; gap: 2px; margin-top: 14px; padding: 3px; border-radius: 10px; background: var(--bg); overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: 1 0 auto; min-height: 36px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 14px; font-weight: 600; white-space: nowrap; }
.seg button[aria-selected="true"] { background: var(--surface-2); color: var(--ink); box-shadow: 0 0 0 1px var(--outline); }
.sub-form { margin-top: 20px; padding-top: 4px; border-top: 1px solid var(--outline); }
.inline-f { display: flex; gap: 8px; align-items: stretch; }
.inline-f input { flex: 1; min-width: 0; }
.inline-f .btn { width: auto; margin: 6px 0 0; flex: none; }

/* Tablas (planes, compras); en celular cada fila se vuelve un bloque con sus etiquetas */
.tbl-wrap { margin-top: 12px; overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th { padding: 0 12px 10px; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; text-align: left; border-bottom: 1px solid var(--outline); white-space: nowrap; }
.tbl td { padding: 14px 12px; border-bottom: 1px solid var(--outline); vertical-align: middle; }
.tbl th:first-child, .tbl td:first-child { padding-left: 0; }
.tbl th:last-child, .tbl td:last-child { padding-right: 0; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .num { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.tbl .acts { text-align: right; white-space: nowrap; }
.tbl .acts .tlink + .tlink { margin-left: 14px; }
.tbl tr.mine td { background: linear-gradient(var(--surface-2), var(--surface-2)); }
.tbl tr.mine td:first-child { box-shadow: inset 3px 0 0 var(--btn); padding-left: 12px; }
.btn.tbtn { width: auto; min-height: 38px; margin: 0; padding: 0 16px; font-size: 14px; }

/* Barra inferior y hoja "Más" (celular) */
.bnav { position: fixed; inset: auto 0 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px max(8px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px)); background: var(--surface); border-top: 1px solid var(--outline); }
.bnav a, .bnav button { display: grid; justify-items: center; gap: 2px; min-height: 52px; padding: 6px 2px 0; border: 0; background: none; color: var(--muted); font-size: 11px; font-weight: 600; text-decoration: none; }
.bnav [aria-current], .bnav button[data-on] { color: var(--btn); }
.sheet { width: 100%; max-width: 100%; margin: auto 0 0; padding: 8px 0 calc(16px + env(safe-area-inset-bottom, 0px)); border: 0; border-radius: 16px 16px 0 0; background: var(--surface); color: var(--ink); }
.sheet::backdrop { background: rgba(4, 9, 24, 0.6); }
.sheet-list { display: grid; padding: 0 max(8px, env(safe-area-inset-left, 0px)); }
.sheet-list a, .snav-list a, .snav-foot a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 14px; border-radius: 10px; color: var(--ink); font-weight: 600; font-size: 15px; text-decoration: none; }
.sheet-list a[aria-current] { background: var(--surface-2); color: var(--btn); }

@media (min-width: 640px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi:last-child:nth-child(odd) { grid-column: auto; }
  .who { display: block; }
}
@media (max-width: 639px) {
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; }
  .tbl tr { padding: 12px 0; border-bottom: 1px solid var(--outline); }
  .tbl tr:last-child { border-bottom: 0; }
  .tbl td { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border: 0; }
  .tbl td[data-l]::before { content: attr(data-l); color: var(--muted); font-size: 13px; font-weight: 400; }
  body:not([data-tab="home"]) .kpis { display: none; }   /* en celular el resumen va solo en Inicio */
  .tbl .acts { justify-content: flex-end; padding-top: 8px; }
  .tbl tr.mine td { background: none; }
  .tbl tr.mine td:first-child { box-shadow: none; padding-left: 0; }
  .tbl tr.mine { box-shadow: inset 3px 0 0 var(--btn); padding-left: 12px; }
}
@media (min-width: 1024px) {
  .app { display: grid; grid-template-columns: var(--nav-w) minmax(0, 1fr); min-height: 100dvh; }
  .snav { position: sticky; top: env(safe-area-inset-top, 0px); display: flex; flex-direction: column; gap: 20px; height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); padding: 18px 12px 18px max(12px, env(safe-area-inset-left, 0px)); border-right: 1px solid var(--outline); background: var(--surface); overflow-y: auto; }
  .snav .brand { padding: 0 8px; }
  .snav .brand .logo { width: 36px; height: 36px; }
  .snav .brand .wm b { font-size: 22px; }
  .snav-list { display: grid; gap: 2px; }
  .snav-list a { color: var(--muted); }
  .snav-list a:hover, .snav-foot a:hover { background: var(--surface-2); color: var(--ink); }
  .snav-list a[aria-current] { background: var(--surface-2); color: var(--ink); box-shadow: inset 3px 0 0 var(--btn); }
  .snav-foot { margin-top: auto; display: grid; gap: 2px; padding-top: 12px; border-top: 1px solid var(--outline); }
  .snav-foot a { color: var(--muted); font-size: 14px; min-height: 40px; }
  .app-main { padding: 0 32px 48px; }
  .abar { margin: 0 -32px; padding: 12px 32px; min-height: 68px; }
  .abar-logo { display: none; }
  .abar-t { font-size: 22px; }
  .kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: 24px; }
  .panels { padding-top: 24px; max-width: 1280px; }
  .panels section.cols { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .panels section.cols > .span { grid-column: 1 / -1; }
  .bnav, .sheet { display: none; }
  #bannersSec .items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1400px) { .panels section#earnSec { grid-template-columns: minmax(360px, 5fr) 7fr; } }

/* Administrador en celular: el menú lateral se vuelve una franja de secciones con desplazamiento lateral */
@media (max-width: 1023px) {
  .snav.strip-m { display: block; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 25; padding: 6px max(12px, env(safe-area-inset-left, 0px)); background: var(--surface); border-bottom: 1px solid var(--outline); }
  .snav.strip-m .brand, .snav.strip-m .snav-foot { display: none; }
  .snav.strip-m .snav-list { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
  .snav.strip-m .snav-list::-webkit-scrollbar { display: none; }
  .snav.strip-m .snav-list a { flex: none; min-height: 40px; padding: 0 12px; color: var(--muted); font-size: 14px; }
  .snav.strip-m .snav-list a[aria-current] { background: var(--surface-2); color: var(--ink); }
  .adm .app-main { padding-bottom: 32px; }
  .adm .abar { position: static; }
}

/* Publicidad: banners básicos y paquetes */
.slots { max-height: 420px; overflow-y: auto; }
.slots li { align-items: center; }
.slots li.off b { color: var(--muted); }
.slots li:last-child { border-bottom: 0; }
.slots .tbtn { flex: none; white-space: nowrap; }
.bad-t { color: var(--bad); }
.prod { display: grid; gap: 20px; }
.prod h2 { margin: 0; }
.prod-price { margin: 8px 0 0; font-size: 34px; font-weight: 800; font-variant-numeric: tabular-nums; }
.prod-price span { color: var(--muted); font-size: 15px; font-weight: 600; }
.ticks { list-style: none; display: grid; gap: 10px; margin: 16px 0 0; padding: 0; }
.ticks li { position: relative; padding-left: 26px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 12px; height: 7px; border: solid var(--pos); border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.ref-box { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--outline); }
.ref-box p { margin: 0 0 4px; }
.buybox { padding: 16px; border: 1px solid var(--outline); border-radius: 12px; background: var(--surface-2); align-self: start; }
.buybox .fl { margin-top: 0; }
.stepper { display: grid; grid-template-columns: 48px 1fr 48px; gap: 8px; }
.stepper button { min-height: 48px; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--ink); font-size: 22px; font-weight: 600; }
.stepper input { text-align: center; font-weight: 700; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.buy-total { display: flex; justify-content: space-between; align-items: baseline; margin: 16px 0 0; }
.buy-total span { color: var(--muted); }
.buy-total b { font-size: 22px; font-variant-numeric: tabular-nums; }
.buybox .btn { margin-top: 12px; }
@media (min-width: 900px) { .prod { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; } }
.packs { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: 16px 0 0; padding: 0; }
.pack { display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid var(--outline); border-radius: 12px; background: var(--surface-2); }
.pack.mine { border-color: var(--btn); }
.pack-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pack-price { margin: 0; font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pack-price span { color: var(--muted); font-size: 14px; font-weight: 600; }
.pack-l { flex: 1; list-style: none; display: grid; gap: 6px; margin: 0; padding: 0; color: var(--muted); font-size: 14px; }
.pack-l .pos { color: var(--pos); font-weight: 600; }
.pack .btn.tbtn { width: 100%; }
/* Pestañas de "Planes": Mi Website muestra solo la tabla de planes de sitio que pinta plans.js
   (1.ª tarjeta = planes de banners de la empresa, que no se ofrecen aquí; 2.ª = planes de sitio) */
.seg.ptabs { margin-top: 0; }
body[data-ptab="ads"] #plansSec { display: none; }
body[data-ptab="banner"] #plansSec { display: none; }
body[data-ptab="web"] #plansSec > div.card:nth-of-type(1) { display: none; }

/* Global Rewards System */
.gl-cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-color: var(--btn); }
.gl-cta > div { display: grid; gap: 4px; min-width: 0; }
.gl-cta .btn.tbtn { flex: none; }
.pos-t { color: var(--pos); }
.rows li > .slots2 { display: flex; gap: 6px; flex: none; align-self: center; }
.gl-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gl-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gl-line { margin: 16px 0 0; font-weight: 600; }
@media (max-width: 560px) { .gl-stats { grid-template-columns: 1fr; } }
.slots2 i { width: 22px; height: 22px; border: 1px solid var(--line); border-radius: 6px; }
.slots2 i.on { background: var(--btn); border-color: var(--btn); }
@media (max-width: 560px) { .gl-cta { flex-direction: column; align-items: stretch; } }

/* Banderas del idioma (dibujadas en SVG para que se vean en todos los sistemas, también en Windows) */
.lang button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 8px; }
.lang button::after { content: ""; order: -1; width: 18px; height: 12px; border-radius: 2px; background: center / cover no-repeat; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15); }
.lang button[aria-pressed="false"]::after { opacity: 0.6; }
.lang button[data-lang="es"]::after { background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 20'><rect width='10' height='20' fill='%23006847'/><rect x='10' width='10' height='20' fill='%23fff'/><rect x='20' width='10' height='20' fill='%23ce1126'/><circle cx='15' cy='10' r='2.6' fill='%238c5a2b'/></svg>"); }
.lang button[data-lang="en"]::after { background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 20'><rect width='30' height='20' fill='%23b22234'/><rect y='1.538' width='30' height='1.538' fill='%23fff'/><rect y='4.614' width='30' height='1.538' fill='%23fff'/><rect y='7.690' width='30' height='1.538' fill='%23fff'/><rect y='10.766' width='30' height='1.538' fill='%23fff'/><rect y='13.842' width='30' height='1.538' fill='%23fff'/><rect y='16.918' width='30' height='1.538' fill='%23fff'/><rect width='13' height='10.77' fill='%233c3b6e'/></svg>"); }
.lang button[data-lang="pt"]::after { background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 20'><rect width='30' height='20' fill='%23009c3b'/><path d='M15 2.5 27 10 15 17.5 3 10z' fill='%23ffdf00'/><circle cx='15' cy='10' r='4.2' fill='%23002776'/></svg>"); }
@media (max-width: 420px) { .abar .lang button { padding: 0 5px; gap: 4px; } .abar .lang button::after { width: 16px; height: 11px; } }

/* Impuestos */
.tax-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 700px) { .tax-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
#taxYear, #aTaxYear { width: auto; min-width: 110px; }
/* Imprimir el reporte de impuestos: solo la tarjeta del reporte */
@media print {
  body[data-tab="tax"] .snav, body[data-tab="tax"] .abar, body[data-tab="tax"] .kpis, body[data-tab="tax"] .bnav, body[data-tab="tax"] .no-print { display: none !important; }
  body[data-tab="tax"] .tax-report { border: 0; }
}
.note.tax-warn { margin-top: 14px; font-weight: 500; background: var(--surface-2); color: var(--muted); border: 1px solid var(--outline); font-size: 13px; line-height: 1.5; }

/* Presentación: explicación del negocio en 3 idiomas */
.pres-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.pres-bar .seg { margin: 0; flex: 1 1 260px; }
.pres { line-height: 1.6; }
.pres-top h2 { font-size: 26px; margin: 0 0 4px; }
.pres-sec { padding-top: 22px; margin-top: 22px; border-top: 1px solid var(--outline); }
.pres-sec h3 { font-size: 19px; margin: 0 0 10px; color: var(--btn); }
.pres-sec p { margin: 0 0 10px; }
.pres-box { background: var(--surface-2); border: 1px solid var(--outline); border-radius: 14px; padding: 14px 16px; margin: 12px 0; }
.pres-box h4 { margin: 0 0 8px; font-size: 16px; }
.pres-two { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.pres-two .pres-box { margin: 0; }
.pres-steps { counter-reset: st; list-style: none; padding: 0; margin: 0; }
.pres-steps li { counter-increment: st; position: relative; padding: 0 0 10px 38px; }
.pres-steps li::before { content: counter(st); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--btn); color: #0A1330; font-weight: 700; font-size: 14px; display: grid; place-items: center; }
.pres-plain { margin: 0; padding-left: 18px; }
.pres-plain li { margin: 4px 0; }
.pres-ex { font-weight: 600; margin-top: 8px; }
.pres-total td { font-weight: 700; border-top: 2px solid var(--outline); }
.pres-disc { font-style: italic; }
.pres-tbl td, .pres-tbl th { white-space: normal; }
.pres-draw { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; margin: 14px 0 16px; text-align: center; }
.pd-pos { border: 2px solid var(--btn); border-radius: 14px; padding: 10px 14px; }
.pd-slots { display: flex; gap: 8px; margin-top: 8px; }
.pd-slots span { border: 1px dashed var(--muted); border-radius: 10px; padding: 8px 10px; font-size: 13px; }
.pd-arrow { font-size: 26px; color: var(--btn); display: flex; flex-direction: column; align-items: center; }
.pd-arrow small { font-size: 12px; color: var(--muted); }
.pd-pay { background: var(--btn); color: #0A1330; border-radius: 14px; padding: 12px 14px; font-weight: 700; max-width: 220px; }
.pres-faq { border-bottom: 1px solid var(--outline); padding: 10px 0; }
.pres-faq summary { cursor: pointer; font-weight: 600; }
.pres-faq p { margin: 8px 0 0; color: var(--muted); }
@media print {
  body[data-tab="pres"] .snav, body[data-tab="pres"] .abar, body[data-tab="pres"] .kpis, body[data-tab="pres"] .bnav, body[data-tab="pres"] .no-print { display: none !important; }
  body[data-tab="pres"], body[data-tab="pres"] .pres, body[data-tab="pres"] .pres * { background: #fff !important; color: #111 !important; border-color: #bbb !important; box-shadow: none !important; }
  body[data-tab="pres"] .pres { border: 0; padding: 0; }
  body[data-tab="pres"] .pres-box h4, body[data-tab="pres"] tr, body[data-tab="pres"] .pres-draw { break-inside: avoid; }
}

/* Saldo de recompra */
.note.hold-note { background: var(--surface-2); color: var(--muted); border: 1px solid var(--outline); font-size: 13px; }

/* Pagar con TRX y pestaña Precios */
.seg.pay-coin { margin: 4px 0 10px; }
.pr-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 14px 0; }
.pr-tile { background: var(--surface-2); border: 1px solid var(--outline); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.pr-tile span { color: var(--muted); font-size: 13px; }
.pr-tile b { font-size: 26px; color: var(--btn); }
.pr-tile small { color: var(--muted); }
.pr-res { font-size: 20px; font-weight: 700; margin: 12px 0 4px; }
