/* LegendMC Store */
:root {
  --night: #0E1220;
  --night-2: #0A0D18;
  --surface: #151A2B;
  --raised: #1C2236;
  --raised-2: #232A42;
  --line: #262D45;
  --line-2: #323A57;
  --text: #E8EAF2;
  --muted: #8A90A8;
  --dim: #636A84;
  --gold: #F5B829;
  --gold-deep: #C98A0C;
  --ember: #F08C3A;
  --red: #F0616D;
  --green: #3DCB8B;
  --blue: #6AA6FF;
  --radius: 10px;
  --radius-sm: 7px;
  --ease: cubic-bezier(.23, 1, .32, 1);
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);
  --display: 'Chakra Petch', system-ui, sans-serif;
  --body: 'Onest', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--night);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: '';
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(245, 184, 41, .10), transparent 60%),
    radial-gradient(700px 420px at -10% 10%, rgba(240, 140, 58, .06), transparent 60%);
}
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(245, 184, 41, .35); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }

/* ───────── Barra superior ───────── */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(14, 18, 32, .82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--text); font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: .02em; }
.brand:hover { text-decoration: none; }
.brand img { width: 38px; height: 38px; border-radius: 9px; box-shadow: 0 0 0 1px var(--line-2); }
.brand small { display: block; font-family: var(--body); font-weight: 500; font-size: 11.5px; color: var(--muted); letter-spacing: 0; margin-top: -3px; }
.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a { color: var(--muted); padding: 7px 12px; border-radius: 8px; font-weight: 500; font-size: 14px; transition: color .15s, background-color .15s; }
.nav a:hover { color: var(--text); background: var(--raised); text-decoration: none; }
.nav a.on { color: var(--text); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.user-chip { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 600; font-size: 14px; padding: 4px 10px 4px 4px; border-radius: 9px; background: var(--raised); border: 1px solid var(--line); }
.user-chip:hover { text-decoration: none; border-color: var(--line-2); }
.user-chip img { width: 26px; height: 26px; border-radius: 6px; image-rendering: pixelated; }

/* ───────── Botones ───────── */
.btn {
  --bg: var(--raised); --fg: var(--text); --edge: var(--line-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; min-height: 40px;
  border: 1px solid var(--edge); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--fg);
  font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap;
  box-shadow: 0 2px 0 0 var(--edge);
  transition: transform .12s var(--ease), box-shadow .12s var(--ease), background-color .15s, border-color .15s, opacity .15s;
}
.btn:hover { text-decoration: none; background: var(--raised-2); }
.btn:active { transform: translateY(2px); box-shadow: 0 0 0 0 var(--edge); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.gold { --bg: var(--gold); --fg: #1B1405; --edge: var(--gold-deep); }
.btn.gold:hover { background: #FFC53D; }
.btn.ghost { --bg: transparent; --edge: transparent; box-shadow: none; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--raised); }
.btn.danger { --bg: rgba(240, 97, 109, .12); --fg: #FF9AA3; --edge: rgba(240, 97, 109, .35); box-shadow: none; }
.btn.sm { padding: 6px 11px; min-height: 32px; font-size: 13px; }
.btn.lg { padding: 13px 22px; min-height: 50px; font-size: 16px; }
.btn.block { width: 100%; }
.btn .spin { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.cart-btn { position: relative; }
.cart-count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--gold); color: #1B1405; font-size: 12px; font-weight: 700; display: inline-grid; place-items: center;
}
.cart-count.bump { animation: bump .35s var(--ease); }
@keyframes bump { 40% { transform: scale(1.35); } }

/* ───────── Hero ───────── */
.hero { padding: 56px 0 34px; }
.hero .wrap { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; }
.hero h1 {
  font-family: var(--display); font-weight: 700; font-size: clamp(34px, 5vw, 56px); line-height: 1.02; letter-spacing: -.01em;
  max-width: 14ch;
}
.hero p.lead { color: var(--muted); font-size: 17px; margin-top: 16px; max-width: 46ch; }
.join {
  margin-top: 28px; display: inline-flex; align-items: stretch; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--line-2); background: var(--surface); box-shadow: 0 3px 0 0 var(--line-2);
}
.join .ip { padding: 12px 18px; display: flex; flex-direction: column; justify-content: center; }
.join .ip span { font-size: 12px; color: var(--muted); }
.join .ip strong { font-family: var(--display); font-size: 22px; letter-spacing: .03em; color: var(--gold); line-height: 1.15; }
.join button {
  border: 0; border-left: 1px solid var(--line-2); background: var(--raised); padding: 0 18px; cursor: pointer;
  font-weight: 600; font-size: 14px; color: var(--text); display: flex; align-items: center; gap: 8px; transition: background-color .15s;
}
.join button:hover { background: var(--raised-2); }
.join button:active { background: var(--line); }
.online { display: flex; align-items: center; gap: 8px; margin-top: 14px; color: var(--muted); font-size: 14px; }
.online i { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.online.up i { background: var(--green); box-shadow: 0 0 0 4px rgba(61, 203, 139, .15); }

.hero-art { position: relative; display: grid; place-items: center; }
.hero-art::before {
  content: ''; position: absolute; width: 78%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 184, 41, .32), rgba(240, 140, 58, .08) 55%, transparent 70%);
  filter: blur(10px);
}
.hero-art img { position: relative; width: min(330px, 80%); border-radius: 28px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7), 0 0 0 1px rgba(245, 184, 41, .25); }

/* Compras recientes */
.recent { border-block: 1px solid var(--line); background: rgba(21, 26, 43, .6); overflow: hidden; }
.recent .wrap { display: flex; align-items: center; gap: 18px; height: 54px; }
.recent-label { font-size: 13px; color: var(--muted); flex-shrink: 0; }
.recent-track { display: flex; gap: 22px; overflow: hidden; mask-image: linear-gradient(90deg, #000 85%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); }
.recent-item { display: flex; align-items: center; gap: 8px; font-size: 13.5px; white-space: nowrap; }
.recent-item img { width: 22px; height: 22px; border-radius: 5px; image-rendering: pixelated; }
.recent-item b { font-weight: 600; }
.recent-item span { color: var(--muted); }

/* ───────── Catálogo ───────── */
.shop { padding: 34px 0 80px; }
.tabs {
  position: sticky; top: 64px; z-index: 30; background: rgba(14, 18, 32, .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  padding: 12px 0; margin-bottom: 22px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--surface); color: var(--muted); font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap;
  transition: color .15s, border-color .15s, background-color .15s;
}
.tab svg { width: 17px; height: 17px; }
.tab:hover { color: var(--text); border-color: var(--line-2); }
.tab[aria-selected="true"] { color: #1B1405; background: var(--gold); border-color: var(--gold-deep); }

.cat-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.cat-head h2 { font-family: var(--display); font-size: 28px; font-weight: 700; line-height: 1.1; }
.cat-head p { color: var(--muted); margin-top: 4px; max-width: 60ch; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.grid.ranks { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }

.card {
  --accent: var(--gold);
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 3px 0 0 var(--line);
  overflow: hidden; cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
}
.card:hover { border-color: var(--line-2); box-shadow: 0 3px 0 0 var(--line-2); }
.card .band { height: 4px; background: var(--accent); }
.card .body { padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card .icon {
  width: 52px; height: 52px; border-radius: 10px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 14%, var(--raised)); color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.card .icon svg { width: 26px; height: 26px; }
.card .thumb { aspect-ratio: 16 / 9; background: var(--raised); object-fit: cover; width: 100%; }
.card h3 { font-family: var(--display); font-size: 21px; font-weight: 700; line-height: 1.15; }
.card.rank h3 { color: var(--accent); font-size: 26px; letter-spacing: .02em; }
.card .desc { color: var(--muted); font-size: 14px; }
.perks { list-style: none; display: grid; gap: 7px; font-size: 14px; margin-top: 2px; }
.perks li { display: flex; gap: 9px; align-items: flex-start; }
.perks li::before {
  content: ''; flex-shrink: 0; width: 7px; height: 7px; margin-top: 8px; background: var(--accent); transform: rotate(45deg);
}
.card .foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--line); background: rgba(10, 13, 24, .35); }
.price { font-family: var(--display); font-weight: 700; font-size: 22px; line-height: 1; }
.price small { font-family: var(--body); font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 3px; }
.price .from { display: block; font-family: var(--body); font-size: 11.5px; color: var(--muted); font-weight: 500; margin-bottom: 3px; }
.price s { color: var(--dim); font-size: 14px; font-weight: 500; margin-left: 6px; }
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 6px; font-size: 12px; font-weight: 600;
  background: var(--raised); color: var(--muted); border: 1px solid var(--line);
}
.badge.gold { background: rgba(245, 184, 41, .14); color: var(--gold); border-color: rgba(245, 184, 41, .3); }
.badge.green { background: rgba(61, 203, 139, .12); color: var(--green); border-color: rgba(61, 203, 139, .3); }
.badge.red { background: rgba(240, 97, 109, .12); color: #FF8B95; border-color: rgba(240, 97, 109, .3); }
.badge.blue { background: rgba(106, 166, 255, .12); color: var(--blue); border-color: rgba(106, 166, 255, .3); }
.badge.orange { background: rgba(240, 140, 58, .12); color: var(--ember); border-color: rgba(240, 140, 58, .3); }
.card .ribbon { position: absolute; top: 14px; right: 14px; }

.empty { text-align: center; padding: 50px 20px; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--radius); }
.empty strong { display: block; color: var(--text); font-size: 17px; margin-bottom: 4px; }

/* Esqueleto de carga */
.sk { background: linear-gradient(90deg, var(--surface) 25%, var(--raised) 50%, var(--surface) 75%); background-size: 200% 100%; animation: sk 1.3s linear infinite; border-radius: var(--radius); }
@keyframes sk { to { background-position: -200% 0; } }

/* ───────── Panel lateral (carrito) y diálogos ───────── */
.scrim { position: fixed; inset: 0; z-index: 80; background: rgba(5, 7, 14, .62); opacity: 0; transition: opacity .25s var(--ease); }
.scrim.show { opacity: 1; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 90; width: min(440px, 100%);
  background: var(--surface); border-left: 1px solid var(--line-2); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .32s var(--ease);
}
.drawer.show { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-family: var(--display); font-size: 21px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px; display: grid; gap: 16px; align-content: start; }
.drawer-foot { border-top: 1px solid var(--line); padding: 16px 20px 20px; display: grid; gap: 12px; background: var(--night-2); }

.line-item { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; }
.line-item .ic { width: 44px; height: 44px; border-radius: 9px; display: grid; place-items: center; background: var(--raised); color: var(--accent, var(--gold)); }
.line-item .ic svg { width: 22px; height: 22px; }
.line-item .t { font-weight: 600; line-height: 1.25; }
.line-item .o { font-size: 13px; color: var(--muted); }
.line-item .r { text-align: right; }
.line-item .r b { font-family: var(--display); font-size: 16px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 7px; overflow: hidden; margin-top: 6px; }
.qty button { width: 28px; height: 26px; border: 0; background: var(--raised); cursor: pointer; font-weight: 700; color: var(--muted); }
.qty button:hover { color: var(--text); }
.qty span { min-width: 30px; text-align: center; font-size: 13px; font-weight: 600; }
.link-btn { border: 0; background: none; color: var(--muted); font-size: 12.5px; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; padding: 0; }
.link-btn:hover { color: var(--red); }

.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--muted); }
.field .hint { font-size: 12.5px; color: var(--dim); }
.input, select.input, textarea.input {
  width: 100%; padding: 10px 12px; min-height: 42px; border-radius: var(--radius-sm); border: 1px solid var(--line-2);
  background: var(--night-2); color: var(--text); outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea.input { min-height: 96px; resize: vertical; line-height: 1.5; }
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(245, 184, 41, .15); }
.input::placeholder { color: var(--dim); }
.input-row { display: flex; gap: 8px; }
.input-row .input { flex: 1; min-width: 0; }
.msg { font-size: 13px; }
.msg.ok { color: var(--green); }
.msg.err { color: #FF8B95; }

.totals { display: grid; gap: 6px; font-size: 14px; }
.totals div { display: flex; justify-content: space-between; color: var(--muted); }
.totals .big { color: var(--text); font-size: 16px; font-weight: 600; padding-top: 8px; border-top: 1px dashed var(--line-2); margin-top: 4px; }
.totals .big b { font-family: var(--display); font-size: 24px; }
.totals .good { color: var(--green); }

.gateways { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gw {
  position: relative; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-2); background: var(--raised); cursor: pointer; transition: border-color .15s, background-color .15s;
}
.gw input { position: absolute; opacity: 0; pointer-events: none; }
.gw b { font-size: 14px; }
.gw span { font-size: 12px; color: var(--muted); }
.gw:has(input:checked) { border-color: var(--gold); background: rgba(245, 184, 41, .08); }
.gw:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
.gw.off { opacity: .45; cursor: not-allowed; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--gold); width: 16px; height: 16px; flex-shrink: 0; }

.modal {
  position: fixed; z-index: 95; left: 50%; top: 50%; width: min(560px, calc(100% - 28px)); max-height: calc(100vh - 40px); overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: 0 40px 80px -20px rgba(0, 0, 0, .7);
  transform: translate(-50%, -48%) scale(.97); opacity: 0; transition: transform .25s var(--ease), opacity .2s var(--ease);
}
.modal.show { transform: translate(-50%, -50%); opacity: 1; }
.modal-head { display: flex; gap: 14px; align-items: center; padding: 20px 22px 0; }
.modal-head h2 { font-family: var(--display); font-size: 26px; line-height: 1.1; }
.modal-body { padding: 16px 22px 22px; display: grid; gap: 16px; }
.modal .x { margin-left: auto; align-self: flex-start; }
.options { display: grid; gap: 8px; }
.opt {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-2); background: var(--raised); cursor: pointer; transition: border-color .15s, background-color .15s;
}
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt b { font-weight: 600; }
.opt span { font-family: var(--display); font-weight: 700; }
.opt:has(input:checked) { border-color: var(--gold); background: rgba(245, 184, 41, .08); }
.opt:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ───────── Avisos ───────── */
.toasts { position: fixed; z-index: 120; bottom: 20px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; width: min(420px, calc(100% - 28px)); }
.toast {
  padding: 12px 16px; border-radius: 10px; background: var(--raised-2); border: 1px solid var(--line-2); box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .6);
  font-size: 14px; display: flex; gap: 10px; align-items: center; animation: toast-in .3s var(--ease);
}
.toast.ok { border-color: rgba(61, 203, 139, .4); }
.toast.err { border-color: rgba(240, 97, 109, .45); }
.toast.out { animation: toast-out .2s var(--ease) forwards; }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } }
@keyframes toast-out { to { transform: translateY(6px); opacity: 0; } }

/* ───────── Páginas simples (cuenta, pago) ───────── */
.page { padding: 40px 0 80px; }
.page-title { font-family: var(--display); font-size: 34px; font-weight: 700; line-height: 1.1; }
.page-sub { color: var(--muted); margin-top: 6px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 3px 0 0 var(--line); }
.panel-pad { padding: 22px; }
.panel h3 { font-family: var(--display); font-size: 19px; font-weight: 700; margin-bottom: 12px; }
.auth-box { width: min(420px, 100%); margin: 30px auto 0; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 10px; background: var(--night-2); border: 1px solid var(--line); margin-bottom: 18px; }
.seg button { border: 0; padding: 9px; border-radius: 7px; background: none; color: var(--muted); font-weight: 600; cursor: pointer; transition: color .15s, background-color .15s; }
.seg button[aria-selected="true"] { background: var(--raised-2); color: var(--text); }
.stack { display: grid; gap: 14px; }
.note { font-size: 13px; color: var(--muted); padding: 12px 14px; border-radius: 9px; background: var(--night-2); border: 1px solid var(--line); }
.note code, code.k { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; background: var(--raised); padding: 2px 6px; border-radius: 5px; color: var(--gold); }

.account-grid { display: grid; grid-template-columns: 280px 1fr; gap: 22px; margin-top: 26px; align-items: start; }
.profile { padding: 22px; text-align: center; }
.profile img { width: 96px; height: 96px; margin: 0 auto 12px; image-rendering: pixelated; border-radius: 12px; }
.profile h2 { font-family: var(--display); font-size: 24px; }
.stats-mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.stats-mini div { background: var(--night-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 4px; }
.stats-mini b { display: block; font-family: var(--display); font-size: 18px; }
.stats-mini span { font-size: 11.5px; color: var(--muted); }
.side-nav { display: grid; gap: 2px; margin-top: 16px; text-align: left; }
.side-nav button { border: 0; background: none; text-align: left; padding: 9px 12px; border-radius: 8px; color: var(--muted); font-weight: 600; cursor: pointer; transition: color .15s, background-color .15s; }
.side-nav button:hover { color: var(--text); background: var(--raised); }
.side-nav button[aria-selected="true"] { color: var(--text); background: var(--raised-2); }

.rows { display: grid; }
.row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row .t { font-weight: 600; }
.row .s { font-size: 13px; color: var(--muted); }
.gift-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 15px; letter-spacing: .04em; color: var(--gold); }

.status-hero { text-align: center; padding: 40px 24px; }
.status-icon { width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 20px; display: grid; place-items: center; }
.status-icon svg { width: 36px; height: 36px; }
.status-icon.ok { background: rgba(61, 203, 139, .14); color: var(--green); }
.status-icon.wait { background: rgba(245, 184, 41, .14); color: var(--gold); }
.status-icon.bad { background: rgba(240, 97, 109, .14); color: var(--red); }
.status-hero h1 { font-family: var(--display); font-size: 30px; }
.status-hero p { color: var(--muted); margin-top: 8px; max-width: 48ch; margin-inline: auto; }

.footer { border-top: 1px solid var(--line); padding: 28px 0 36px; color: var(--dim); font-size: 13px; }
.footer .wrap { display: flex; gap: 20px; justify-content: space-between; flex-wrap: wrap; }
.footer a { color: var(--muted); }

@media (max-width: 860px) {
  .hero { padding-top: 34px; }
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .nav { display: none; }
  .account-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .wrap { width: calc(100% - 28px); }
  .brand small { display: none; }
  .join { display: flex; }
  .join .ip { flex: 1; }
  .gateways { grid-template-columns: 1fr; }
  .top-actions .hide-sm { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ───────── Panel de administración ───────── */
.admin { display: grid; grid-template-columns: 220px 1fr; min-height: calc(100vh - 64px); }
.admin-side { border-right: 1px solid var(--line); padding: 18px 12px; position: sticky; top: 64px; height: calc(100vh - 64px); overflow-y: auto; background: rgba(10, 13, 24, .4); }
.admin-side button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; text-align: left; padding: 9px 12px; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: 14px; cursor: pointer; transition: color .15s, background-color .15s; }
.admin-side button:hover { color: var(--text); background: var(--raised); }
.admin-side button[aria-selected="true"] { color: var(--text); background: var(--raised-2); }
.admin-side button .n { margin-left: auto; font-size: 12px; background: var(--gold); color: #1B1405; border-radius: 9px; padding: 0 7px; font-weight: 700; }
.admin-main { padding: 26px 30px 60px; min-width: 0; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.admin-head h1 { font-family: var(--display); font-size: 28px; line-height: 1.1; }
.admin-head p { color: var(--muted); font-size: 14px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { padding: 16px 18px; }
.kpi span { font-size: 13px; color: var(--muted); }
.kpi b { display: block; font-family: var(--display); font-size: 26px; line-height: 1.2; margin-top: 2px; }
.kpi small { color: var(--dim); font-size: 12.5px; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding-top: 6px; }
.bars div { flex: 1; background: var(--gold); border-radius: 3px 3px 0 0; min-height: 2px; opacity: .85; transition: opacity .15s; }
.bars div:hover { opacity: 1; }
.bars div.zero { background: var(--line-2); }
.two { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; align-items: start; }
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12.5px; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: rgba(28, 34, 54, .6); }
table.t .num { text-align: right; font-variant-numeric: tabular-nums; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .input { width: auto; min-width: 220px; }
.pills { display: inline-flex; gap: 4px; padding: 3px; border-radius: 9px; background: var(--night-2); border: 1px solid var(--line); }
.pills button { border: 0; background: none; color: var(--muted); padding: 6px 11px; border-radius: 6px; font-weight: 600; font-size: 13px; cursor: pointer; }
.pills button[aria-selected="true"] { background: var(--raised-2); color: var(--text); }
.cat-block { margin-bottom: 18px; }
.cat-block-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.cat-block-head h3 { margin: 0; font-size: 18px; }
.cat-block-head .actions { margin-left: auto; display: flex; gap: 6px; }
.prod-row { display: grid; grid-template-columns: 34px 1fr auto auto; gap: 12px; align-items: center; padding: 11px 18px; border-bottom: 1px solid var(--line); cursor: pointer; }
.prod-row:last-child { border-bottom: 0; }
.prod-row:hover { background: rgba(28, 34, 54, .5); }
.prod-row .dot { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: var(--raised); color: var(--accent, var(--gold)); }
.prod-row .dot svg { width: 18px; height: 18px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
.opt-rows { display: grid; gap: 8px; }
.opt-row { display: grid; grid-template-columns: 1.4fr .8fr .7fr auto; gap: 8px; align-items: start; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--night-2); }
.opt-row textarea { grid-column: 1 / -1; min-height: 56px; }
.switch { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; cursor: pointer; }
.switch input { appearance: none; -webkit-appearance: none; width: 36px; height: 20px; border-radius: 10px; background: var(--line-2); position: relative; cursor: pointer; transition: background-color .2s var(--ease); flex-shrink: 0; }
.switch input::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); }
.switch input:checked { background: var(--gold); }
.switch input:checked::after { transform: translateX(16px); }
.modal.wide { width: min(780px, calc(100% - 28px)); }
.icon-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.icon-pick label { width: 38px; height: 38px; border-radius: 8px; display: grid; place-items: center; border: 1px solid var(--line-2); background: var(--raised); cursor: pointer; color: var(--muted); }
.icon-pick input { position: absolute; opacity: 0; pointer-events: none; }
.icon-pick label:has(input:checked) { border-color: var(--gold); color: var(--gold); }
.icon-pick svg { width: 18px; height: 18px; }
.help { font-size: 12.5px; color: var(--dim); line-height: 1.5; }
.help code { font-family: ui-monospace, monospace; color: var(--muted); }
@media (max-width: 960px) {
  .admin { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; display: flex; overflow-x: auto; gap: 4px; padding: 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .admin-side button { width: auto; white-space: nowrap; }
  .admin-main { padding: 20px 14px 50px; }
  .two, .form-grid { grid-template-columns: 1fr; }
}

/* Íconos dentro de botones y chips */
.btn svg, .join button svg, .link-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn.sm svg { width: 15px; height: 15px; }
.form-grid { align-items: start; }
.cat-block-head svg, .modal-head .icon svg { width: 20px; height: 20px; }
.modal-head .icon svg { width: 26px; height: 26px; }

/* Ordenar productos arrastrando */
.prod-list { min-height: 52px; transition: background-color .15s; }
.prod-list.drop-here { background: rgba(245, 184, 41, .05); box-shadow: inset 0 0 0 1px rgba(245, 184, 41, .35); }
.prod-list .prod-empty { padding: 14px 18px; display: none; }
.prod-list:not(:has(.prod-row)) .prod-empty { display: block; }
.prod-row { grid-template-columns: 16px 34px 1fr auto auto; }
.prod-row .grip { color: var(--dim); font-size: 14px; letter-spacing: -2px; cursor: grab; user-select: none; }
.prod-row:hover .grip { color: var(--muted); }
.prod-row.dragging { opacity: .35; }
.prod-row[draggable="true"]:active { cursor: grabbing; }

/* Descuento global */
.sale-bar { border-block: 1px solid rgba(240, 97, 109, .35); background: linear-gradient(90deg, rgba(240, 97, 109, .14), rgba(245, 184, 41, .08)); }
.sale-bar .wrap { display: flex; align-items: center; gap: 16px; padding: 14px 0; }
.sale-pct { font-family: var(--display); font-size: 30px; line-height: 1; color: #FF8B95; flex-shrink: 0; }
.sale-copy { display: grid; gap: 2px; }
.sale-copy strong { font-size: 16px; }
.sale-copy span { font-size: 13px; color: var(--muted); }
.sale-left { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--text); padding: 6px 10px; border-radius: 8px; background: var(--raised); border: 1px solid var(--line-2); white-space: nowrap; }
.price .sale-tag { margin-left: 8px; vertical-align: middle; font-family: var(--body); }
.opt-old { color: var(--dim); font-weight: 500; font-size: 13px; margin-right: 8px; font-family: var(--body); }
@media (max-width: 520px) { .sale-bar .wrap { flex-wrap: wrap; } .sale-left { margin-left: 0; } }
