/* GEG Panel — Tarjetas de invitación para líderes */
.of-leader {
  --ldr-gold: #f2c86b;
  --ldr-gold-2: #fff2c4;
  --ldr-ink: #fff;
  --ldr-muted: rgba(235, 238, 248, .68);
  --ldr-line: rgba(255, 255, 255, .09);
  --ldr-panel: rgba(255, 255, 255, .035);
  position: relative; margin: 1.25rem 0; padding: 1.4rem; border-radius: 26px; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(242, 200, 107, .16), transparent 55%),
    radial-gradient(90% 120% at 100% 100%, rgba(129, 140, 248, .14), transparent 60%),
    linear-gradient(160deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015));
  border: 1px solid rgba(242, 200, 107, .28);
  box-shadow: 0 30px 70px -40px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .06);
  color: var(--ldr-ink);
  animation: ldrIn .6s cubic-bezier(.2, .8, .2, 1) both;
}
.of-leader[hidden] { display: none; }
@keyframes ldrIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.ldr-glow { position: absolute; inset: -30% -10% auto auto; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(242, 200, 107, .22), transparent 70%); filter: blur(10px); z-index: -1; animation: ldrFloat 9s ease-in-out infinite; }
@keyframes ldrFloat { 50% { transform: translate(-40px, 30px); } }

.ldr-head { display: flex; justify-content: space-between; gap: 1.2rem; flex-wrap: wrap; align-items: flex-end; }
.ldr-kicker { display: inline-flex; align-items: center; gap: .45rem; margin: 0 0 .35rem; font-size: .72rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--ldr-gold); }
.ldr-kicker span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(135deg, var(--ldr-gold-2), var(--ldr-gold) 55%, #b98a2e); color: #1a1206; font-size: .7rem; box-shadow: 0 0 18px rgba(242, 200, 107, .5); }
.ldr-head h3 { margin: 0; font-size: clamp(1.3rem, 2.6vw, 1.75rem); font-weight: 800; letter-spacing: -.02em; background: linear-gradient(90deg, #fff, var(--ldr-gold-2) 55%, var(--ldr-gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ldr-lead { margin: .45rem 0 0; max-width: 58ch; font-size: .88rem; line-height: 1.55; color: var(--ldr-muted); }
.ldr-stats { display: flex; gap: .5rem; }
.ldr-stats div { min-width: 86px; padding: .65rem .8rem; border-radius: 16px; text-align: center; background: rgba(0, 0, 0, .22); border: 1px solid var(--ldr-line); }
.ldr-stats b { display: block; font-size: 1.4rem; font-weight: 800; color: var(--ldr-gold-2); }
.ldr-stats span { font-size: .66rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ldr-muted); }

.ldr-body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1.4rem; margin-top: 1.3rem; align-items: start; }
.ldr-stage { display: grid; gap: .8rem; justify-items: center; perspective: 1400px; position: sticky; top: 1rem; }
.ldr-card {
  --rx: 0deg; --ry: 0deg; --mx: 50%;
  position: relative; width: 100%; aspect-ratio: 1050 / 600; border-radius: 3.2% / 5.6%; overflow: hidden;
  transform: rotateX(var(--rx)) rotateY(var(--ry)); transform-style: preserve-3d;
  transition: transform .25s ease-out, opacity .2s;
  box-shadow: 0 40px 70px -30px rgba(0, 0, 0, .85), 0 0 0 1px rgba(255, 255, 255, .08), 0 0 60px -20px rgba(242, 200, 107, .45);
}
.ldr-card canvas { display: block; width: 100%; height: 100%; }
.ldr-card.is-flip { transform: rotateY(90deg); opacity: .4; transition: transform .22s ease-in, opacity .22s; }
.ldr-shine { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .22) calc(var(--mx) - 6%), transparent calc(var(--mx) + 10%)); mix-blend-mode: soft-light; }
.ldr-sides { display: inline-flex; padding: .25rem; border-radius: 999px; background: rgba(0, 0, 0, .25); border: 1px solid var(--ldr-line); }
.ldr-sides button { min-width: 96px; height: 34px; border: 0; border-radius: 999px; background: transparent; color: var(--ldr-muted); font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; transition: all .2s; }
.ldr-sides button.is-on { background: linear-gradient(135deg, var(--ldr-gold-2), var(--ldr-gold)); color: #1a1206; }

.ldr-controls { display: grid; gap: .95rem; }
.ldr-field { display: grid; gap: .45rem; }
.ldr-field > span { font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ldr-muted); }
.ldr-field input[type="text"], .ldr-qty input {
  width: 100%; box-sizing: border-box; height: 44px; padding: 0 .9rem; border-radius: 13px; border: 1px solid var(--ldr-line);
  background: rgba(0, 0, 0, .25); color: var(--ldr-ink); font: inherit; font-size: .92rem; outline: none; transition: border-color .2s, box-shadow .2s;
}
.ldr-field input:focus, .ldr-qty input:focus { border-color: rgba(242, 200, 107, .6); box-shadow: 0 0 0 3px rgba(242, 200, 107, .15); }
.ldr-swatches { display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem; }
.ldr-swatch { display: flex; align-items: center; gap: .5rem; padding: .45rem .55rem; border-radius: 13px; border: 1px solid var(--ldr-line); background: var(--ldr-panel); color: var(--ldr-ink); font: inherit; font-size: .76rem; font-weight: 700; cursor: pointer; transition: all .2s; text-align: left; }
.ldr-swatch i { flex: none; width: 26px; height: 26px; border-radius: 9px; background: var(--sw); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.ldr-swatch:hover { border-color: rgba(255, 255, 255, .2); }
.ldr-swatch.is-on { border-color: var(--ldr-gold); box-shadow: 0 0 0 3px rgba(242, 200, 107, .18); }
.ldr-toggles { display: grid; gap: .5rem; }
.ldr-toggle { position: relative; display: flex; align-items: center; gap: .65rem; font-size: .86rem; font-weight: 600; cursor: pointer; }
.ldr-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ldr-toggle i { position: relative; flex: none; width: 42px; height: 24px; border-radius: 99px; background: rgba(255, 255, 255, .14); transition: background .25s; }
.ldr-toggle i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .25s cubic-bezier(.2, .8, .2, 1); box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
.ldr-toggle input:checked + i { background: linear-gradient(135deg, var(--ldr-gold-2), var(--ldr-gold)); }
.ldr-toggle input:checked + i::after { transform: translateX(18px); }
.ldr-toggle input:focus-visible + i { box-shadow: 0 0 0 3px rgba(242, 200, 107, .3); }
.ldr-qty { display: grid; grid-template-columns: repeat(4, 1fr) 1.2fr; gap: .4rem; }
.ldr-chip, .ldr-seg button { height: 44px; border-radius: 13px; border: 1px solid var(--ldr-line); background: var(--ldr-panel); color: var(--ldr-ink); font: inherit; font-size: .9rem; font-weight: 800; cursor: pointer; transition: all .2s; }
.ldr-chip.is-on, .ldr-seg button.is-on { background: linear-gradient(135deg, var(--ldr-gold-2), var(--ldr-gold)); color: #1a1206; border-color: transparent; box-shadow: 0 10px 22px -12px rgba(242, 200, 107, .8); }
.ldr-qty input { text-align: center; font-weight: 800; }
.ldr-seg { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.ldr-sheetinfo { margin: -.3rem 0 0; font-size: .78rem; color: var(--ldr-muted); }

.ldr-actions { display: grid; gap: .5rem; }
.ldr-actions-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.ldr-actions-row .ldr-btn { flex: 1; }
.ldr-btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 46px; padding: 0 1rem; border-radius: 14px; border: 1px solid var(--ldr-line); background: var(--ldr-panel); color: var(--ldr-ink); font: inherit; font-size: .86rem; font-weight: 800; cursor: pointer; transition: transform .15s, box-shadow .2s, background .2s; }
.ldr-btn svg { width: 20px; height: 20px; }
.ldr-btn:hover { background: rgba(255, 255, 255, .08); }
.ldr-btn:active { transform: scale(.98); }
.ldr-btn.is-main { min-height: 56px; font-size: .98rem; color: #1a1206; border: 0; background: linear-gradient(135deg, var(--ldr-gold-2), var(--ldr-gold) 50%, #c9973b); box-shadow: 0 16px 34px -14px rgba(242, 200, 107, .85); position: relative; overflow: hidden; }
.ldr-btn.is-main::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, .45) 50%, transparent 65%); transform: translateX(-100%); animation: ldrSheen 3.2s ease-in-out infinite; }
@keyframes ldrSheen { 0%, 55% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.ldr-btn.is-busy { opacity: .75; cursor: progress; }
.ldr-link { display: grid; gap: .4rem; }
.ldr-link > span { font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ldr-muted); }
.ldr-link > div { display: flex; gap: .4rem; }
.ldr-link input { flex: 1; min-width: 0; height: 40px; padding: 0 .8rem; border-radius: 12px; border: 1px solid var(--ldr-line); background: rgba(0, 0, 0, .25); color: var(--ldr-gold-2); font: inherit; font-size: .8rem; }
.ldr-link button { height: 40px; padding: 0 1rem; border-radius: 12px; border: 1px solid rgba(242, 200, 107, .4); background: rgba(242, 200, 107, .12); color: var(--ldr-gold-2); font: inherit; font-size: .8rem; font-weight: 800; cursor: pointer; }
.ldr-tip { margin: 0; padding: .7rem .85rem; border-radius: 13px; background: rgba(242, 200, 107, .08); border: 1px dashed rgba(242, 200, 107, .3); font-size: .78rem; line-height: 1.5; color: var(--ldr-muted); }

.of-cmty-cardtag { display: inline-flex; align-items: center; gap: .3rem; width: fit-content; margin-top: .2rem; padding: .12rem .5rem; border-radius: 99px; font-size: .64rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #1a1206; background: linear-gradient(135deg, #fff2c4, #f2c86b); }
.of-cmty-cardtag::before { content: "★"; font-size: .6rem; }

[data-of-theme="light"] .of-leader {
  --ldr-ink: #14131a; --ldr-muted: rgba(30, 28, 40, .66); --ldr-line: rgba(20, 20, 40, .1); --ldr-panel: rgba(255, 255, 255, .7); --ldr-gold: #b8862a; --ldr-gold-2: #d9a948;
  background: radial-gradient(120% 120% at 0% 0%, rgba(217, 169, 72, .16), transparent 55%), linear-gradient(160deg, #fff, #faf6ee);
  border-color: rgba(184, 134, 42, .3);
}
[data-of-theme="light"] .ldr-head h3 { background: linear-gradient(90deg, #14131a, #8a6216); -webkit-background-clip: text; background-clip: text; }
[data-of-theme="light"] .ldr-stats div, [data-of-theme="light"] .ldr-field input[type="text"], [data-of-theme="light"] .ldr-qty input, [data-of-theme="light"] .ldr-link input, [data-of-theme="light"] .ldr-sides { background: rgba(255, 255, 255, .85); }
[data-of-theme="light"] .ldr-stats b { color: #8a6216; }
[data-of-theme="light"] .ldr-link input, [data-of-theme="light"] .ldr-link button { color: #8a6216; }

@media (max-width: 900px) {
  .ldr-body { grid-template-columns: 1fr; }
  .ldr-stage { position: static; }
}
@media (max-width: 560px) {
  .of-leader { padding: 1rem; border-radius: 22px; }
  .ldr-stats { width: 100%; }
  .ldr-stats div { flex: 1; min-width: 0; }
  .ldr-swatches { grid-template-columns: 1fr; }
  .ldr-qty { grid-template-columns: repeat(4, 1fr); }
  .ldr-qty input { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  .of-leader, .ldr-glow, .ldr-btn.is-main::after { animation: none; }
  .ldr-card { transition: none; }
}
