/* =========================================================
   MiQuiniela.VIP — Design tokens & base
   Basado en design_handoff_miquiniela_vip/assets/styles.css
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --mq-green-900: #0f3d22;
  --mq-green-800: #135130;
  --mq-green-700: #1a7a3f;
  --mq-green-600: #1f8a47;
  --mq-green-100: #d8ecdf;
  --mq-green-50:  #eef7f1;
  --mq-gold:      #c9a84c;
  --mq-gold-600:  #b8973c;
  --mq-gold-100:  #f6efd9;
  --mq-ink:    #14181b;
  --mq-body:   #3b4248;
  --mq-muted:  #79828a;
  --mq-faint:  #aab2b8;
  --mq-line:   #e7ebee;
  --mq-line-2: #f0f3f5;
  --mq-bg:     #f5f7f8;
  --mq-card:   #ffffff;
  --mq-live:   #e23b3b;
  --mq-win:    #1f8a47;
  --mq-warn:   #d9892b;
  --mq-radius:    16px;
  --mq-radius-sm: 10px;
  --mq-radius-lg: 22px;
  --mq-shadow:    0 1px 2px rgba(20,24,27,.04), 0 6px 18px rgba(20,24,27,.06);
  --mq-shadow-sm: 0 1px 2px rgba(20,24,27,.05);
  --mq-font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { -webkit-tap-highlight-color: transparent; box-sizing: border-box; }

body {
  font-family: var(--mq-font);
  color: var(--mq-ink);
  background: var(--mq-bg);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
  margin: 0;
}

/* ---- Brand logo ---- */
.mq-logo { font-weight: 800; letter-spacing: -0.03em; color: var(--mq-green-700); line-height: 1; text-decoration: none; display: inline-block; }
.mq-logo .vip { color: var(--mq-gold); }
.mq-logo .dot { color: var(--mq-faint); font-weight: 700; }

/* ---- Buttons ---- */
.btn-mq { background: var(--mq-green-700); border: 1px solid var(--mq-green-700); color: #fff; font-weight: 600; border-radius: var(--mq-radius-sm); transition: background .15s ease, transform .08s ease; }
.btn-mq:hover { background: var(--mq-green-800); color: #fff; }
.btn-mq:active { transform: translateY(1px); }
.btn-mq:disabled { opacity: .55; }

.btn-mq-outline { background: #fff; border: 1.5px solid var(--mq-green-700); color: var(--mq-green-700); font-weight: 600; border-radius: var(--mq-radius-sm); }
.btn-mq-outline:hover { background: var(--mq-green-50); color: var(--mq-green-800); }

.btn-gold { background: var(--mq-gold); border: 1px solid var(--mq-gold); color: #3a3210; font-weight: 700; border-radius: var(--mq-radius-sm); }
.btn-gold:hover { background: var(--mq-gold-600); color: #3a3210; }

/* ---- VIP pill ---- */
.vip-pill { display: inline-flex; align-items: center; gap: 4px; background: var(--mq-gold-100); color: var(--mq-gold-600); font-weight: 700; font-size: .68rem; letter-spacing: .04em; padding: 3px 8px; border-radius: 999px; text-transform: uppercase; }

/* ---- Chips / badges ---- */
.mq-chip { display: inline-flex; align-items: center; gap: 5px; font-size: .72rem; font-weight: 600; white-space: nowrap; padding: 3px 9px; border-radius: 999px; background: var(--mq-line-2); color: var(--mq-body); }
.mq-chip-green { background: var(--mq-green-50); color: var(--mq-green-700); }
.mq-chip-gold  { background: var(--mq-gold-100); color: var(--mq-gold-600); }

.pts-badge { display: inline-flex; align-items: center; gap: 4px; background: var(--mq-green-700); color: #fff; font-weight: 700; font-size: .74rem; white-space: nowrap; padding: 3px 9px; border-radius: 999px; }
.pts-badge.zero { background: var(--mq-line); color: var(--mq-muted); }

.saved-badge { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; color: var(--mq-green-700); font-weight: 700; font-size: .82rem; }

.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mq-live); box-shadow: 0 0 0 0 rgba(226,59,59,.5); animation: mq-pulse 1.4s infinite; }
@keyframes mq-pulse { 0% { box-shadow: 0 0 0 0 rgba(226,59,59,.5); } 70% { box-shadow: 0 0 0 6px rgba(226,59,59,0); } 100% { box-shadow: 0 0 0 0 rgba(226,59,59,0); } }

.flag { font-size: 1.4rem; line-height: 1; }
.team-code { font-weight: 700; letter-spacing: .02em; }

/* ---- Score input ---- */
.score-input { width: 46px; height: 46px; text-align: center; font-weight: 800; font-size: 1.25rem; border: 1.5px solid var(--mq-line); border-radius: 12px; color: var(--mq-ink); background: #fff; transition: border-color .15s ease, box-shadow .15s ease; }
.score-input:focus { outline: none; border-color: var(--mq-green-600); box-shadow: 0 0 0 3px var(--mq-green-50); }
.score-input:disabled { background: var(--mq-line-2); color: var(--mq-muted); border-color: var(--mq-line-2); }
input[type="number"].score-input::-webkit-inner-spin-button,
input[type="number"].score-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"].score-input { -moz-appearance: textfield; }

/* ---- Section label ---- */
.section-label { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--mq-muted); }

/* ---- Toast ---- */
.mq-toast-wrap { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 10px; z-index: 9999; max-width: calc(100% - 32px); }
.mq-toast { display: flex; align-items: center; gap: 10px; background: var(--mq-ink); color: #fff; padding: 11px 14px; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.22); font-size: .88rem; font-weight: 500; transform: translateY(8px); opacity: 0; transition: transform .25s ease, opacity .25s ease; }
.mq-toast.show { transform: translateY(0); opacity: 1; }
.mq-toast .tico { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; flex: none; }
.mq-toast.ok  .tico { background: var(--mq-green-600); }
.mq-toast.err .tico { background: var(--mq-live); }

/* ---- Skeleton ---- */
.skel { background: linear-gradient(100deg, var(--mq-line-2) 30%, #e4e9ec 50%, var(--mq-line-2) 70%); background-size: 200% 100%; animation: mq-shimmer 1.3s infinite linear; border-radius: 8px; }
@keyframes mq-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* =========================================================
   APP SHELL — mobile-first; device bezel on desktop
   ========================================================= */
.device { width: 100%; }
.app-shell { display: flex; flex-direction: column; background: var(--mq-bg); height: 100vh; height: 100dvh; width: 100%; overflow: hidden; position: relative; }
@media (min-width: 480px) {
  body.framed { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 26px 0; background: #e7ebee; }
  .device { width: 392px; background: #14181b; border-radius: 46px; padding: 13px; flex: none; box-shadow: 0 36px 70px -24px rgba(20,24,27,.5), 0 0 0 1px rgba(0,0,0,.18); position: relative; }
  .app-shell { height: 788px; border-radius: 34px; }
  .device::after { content: ""; position: absolute; top: 21px; left: 50%; transform: translateX(-50%); width: 116px; height: 26px; background: #14181b; border-radius: 0 0 16px 16px; z-index: 30; pointer-events: none; }
}

/* ---- Top bar ---- */
.topbar { flex: none; background: #fff; border-bottom: 1px solid var(--mq-line); padding: 14px 16px 12px; padding-top: max(14px, env(safe-area-inset-top)); }
@media (min-width: 480px) { .topbar { padding-top: 30px; } }
.topbar .tb-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.topbar .tb-sub { font-size: .76rem; color: var(--mq-muted); margin-top: 2px; }

.icon-btn { width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--mq-line); background: #fff; color: var(--mq-body); display: grid; place-items: center; font-size: 1.1rem; text-decoration: none; transition: background .15s ease; }
.icon-btn:hover { background: var(--mq-line-2); color: var(--mq-ink); }

.group-switch { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; background: var(--mq-green-50); border: 1px solid var(--mq-green-100); padding: 6px 11px; border-radius: 999px; font-weight: 700; font-size: .82rem; color: var(--mq-green-700); }
.group-switch .ava { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--mq-green-700); color: #fff; font-size: .72rem; }

/* ---- Phase tabs ---- */
.phase-tabs { flex: none; display: flex; gap: 4px; overflow-x: auto; background: #fff; padding: 0 12px; border-bottom: 1px solid var(--mq-line); scrollbar-width: none; }
.phase-tabs::-webkit-scrollbar { display: none; }
.ptab { flex: none; font-size: .85rem; font-weight: 600; color: var(--mq-muted); padding: 12px 13px 11px; white-space: nowrap; border: none; background: none; border-bottom: 2.5px solid transparent; cursor: pointer; position: relative; }
.ptab:hover { color: var(--mq-body); }
.ptab.active { color: var(--mq-green-700); border-bottom-color: var(--mq-green-700); }
.ptab .tcount { font-size: .66rem; background: var(--mq-line-2); color: var(--mq-muted); border-radius: 999px; padding: 1px 6px; margin-left: 5px; }
.ptab.active .tcount { background: var(--mq-green-50); color: var(--mq-green-700); }

/* ---- Main scroll area ---- */
.app-main { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.app-main::-webkit-scrollbar { width: 0; }
.app-pad { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.day-label { font-size: .76rem; font-weight: 700; color: var(--mq-muted); margin: 4px 2px 0; }

/* ---- Bottom nav ---- */
.bottom-nav { flex: none; display: flex; background: #fff; border-top: 1px solid var(--mq-line); padding-bottom: env(safe-area-inset-bottom); }
.bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 0 10px; text-decoration: none; color: var(--mq-faint); font-size: .66rem; font-weight: 600; }
.bottom-nav a i { font-size: 1.25rem; }
.bottom-nav a.active { color: var(--mq-green-700); }

/* =========================================================
   MATCH CARD — Bold Center
   ========================================================= */
.match-card { background: #fff; border-radius: var(--mq-radius); overflow: hidden; box-shadow: var(--mq-shadow); border: 1px solid var(--mq-line); }
.mc-hd { background: linear-gradient(120deg, var(--mq-green-800), var(--mq-green-700)); color: #fff; padding: 9px 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mc-hd .grp { font-size: .76rem; font-weight: 700; letter-spacing: .01em; display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.mc-hd .when { font-size: .71rem; opacity: .9; font-weight: 500; white-space: nowrap; }
.mc-hd.live { background: linear-gradient(120deg, #c0302f, #e23b3b); }
.mc-hd.done { background: linear-gradient(120deg, var(--mq-green-900), var(--mq-green-700)); }
.mc-mid { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 16px 12px 12px; gap: 6px; }
.mc-side { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0; }
.mc-side .flag { font-size: 2.15rem; line-height: 1; }
.mc-side .team-code { font-size: 1.06rem; }
.mc-side small { font-size: .67rem; color: var(--mq-muted); max-width: 92px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-center { display: flex; align-items: center; gap: 7px; }
.mc-center .dash { color: var(--mq-faint); font-weight: 800; font-size: 1.2rem; }
.mc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 14px 13px; min-height: 30px; }
.mc-foot .mq-chip, .mc-foot .saved-badge, .mc-foot .btn { flex: none; }
.mc-stad { font-size: .69rem; color: var(--mq-muted); display: flex; align-items: center; gap: 5px; min-width: 0; flex: 1; }
.mc-stad span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; flex: 1 1 auto; min-width: 0; }
.match-card.is-done { border-color: var(--mq-green-100); }
.match-card.is-done .score-input { border-color: var(--mq-green-100); color: var(--mq-green-700); }

/* Skeleton cards */
.empty-state { text-align: center; padding: 48px 28px; color: var(--mq-muted); }
.empty-state .ico { font-size: 2.4rem; opacity: .5; }
.empty-state h6 { color: var(--mq-body); font-weight: 700; margin: 12px 0 4px; }
.empty-state p { font-size: .85rem; margin: 0; }
.skel-card { background: #fff; border: 1px solid var(--mq-line); border-radius: var(--mq-radius); overflow: hidden; }
.skel-card .sk-hd { height: 34px; }
.skel-card .sk-body { padding: 16px 14px; display: flex; align-items: center; justify-content: space-between; }

/* =========================================================
   DASHBOARD
   ========================================================= */
.greet { font-size: 1.32rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.greet .nm { color: var(--mq-green-700); }

.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qa-btn { display: flex; flex-direction: column; gap: 7px; align-items: flex-start; padding: 13px 14px; border-radius: var(--mq-radius); border: 1px solid var(--mq-line); background: #fff; text-decoration: none; color: var(--mq-ink); box-shadow: var(--mq-shadow-sm); transition: transform .1s ease, box-shadow .15s ease; cursor: pointer; text-align: left; width: 100%; }
.qa-btn:hover { transform: translateY(-2px); box-shadow: var(--mq-shadow); color: var(--mq-ink); }
.qa-btn .qa-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 1.2rem; }
.qa-btn .qa-ico.green { background: var(--mq-green-50); color: var(--mq-green-700); }
.qa-btn .qa-ico.gold  { background: var(--mq-gold-100); color: var(--mq-gold-600); }
.qa-btn .qa-t { font-weight: 700; font-size: .92rem; line-height: 1.2; }
.qa-btn .qa-s { font-size: .73rem; color: var(--mq-muted); display: block; line-height: 1.25; }

.group-card { background: #fff; border: 1px solid var(--mq-line); border-radius: var(--mq-radius); overflow: hidden; box-shadow: var(--mq-shadow-sm); text-decoration: none; color: inherit; display: block; transition: transform .1s ease, box-shadow .15s ease; }
.group-card:hover { transform: translateY(-2px); box-shadow: var(--mq-shadow); color: inherit; }
.gc-top { display: flex; align-items: center; gap: 11px; padding: 13px 14px 12px; }
.gc-ava { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 1.05rem; flex: none; }
.gc-name { font-weight: 700; font-size: 1rem; line-height: 1.15; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.gc-meta { font-size: .74rem; color: var(--mq-muted); margin-top: 2px; }
.gc-chev { margin-left: auto; color: var(--mq-faint); font-size: 1.1rem; }
.gc-stats { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 0 14px 13px; }
.gc-pos { display: flex; flex-direction: column; }
.gc-pos .rank { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.gc-pos .rank small { font-size: .8rem; color: var(--mq-muted); font-weight: 600; }
.gc-pos .lbl { font-size: .68rem; color: var(--mq-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-top: 3px; }
.gc-delta { font-size: .72rem; font-weight: 700; display: inline-flex; align-items: center; gap: 2px; }
.gc-delta.up { color: var(--mq-win); }
.gc-delta.down { color: var(--mq-live); }
.gc-delta.flat { color: var(--mq-faint); }
.gc-pts { text-align: right; }
.gc-pts .v { font-size: 1.2rem; font-weight: 800; color: var(--mq-green-700); line-height: 1; }
.gc-pts .l { font-size: .68rem; color: var(--mq-muted); font-weight: 600; }
.gc-next { display: flex; align-items: center; gap: 9px; padding: 10px 14px; background: var(--mq-green-50); border-top: 1px solid var(--mq-green-100); font-size: .8rem; }
.gc-next > div { min-width: 0; }
.gc-next .nlbl { font-size: .66rem; font-weight: 700; color: var(--mq-green-700); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; line-height: 1.35; }
.gc-next .nmatch { font-weight: 700; line-height: 1.2; }
.gc-next .ntime { margin-left: auto; font-size: .73rem; color: var(--mq-green-700); font-weight: 600; }

/* ---- Modals ---- */
.modal-content { border: none; border-radius: var(--mq-radius-lg); overflow: hidden; }
.modal-header { border-bottom: 1px solid var(--mq-line); }
.modal-title { font-weight: 800; letter-spacing: -.02em; }
.form-label-mq { font-size: .8rem; font-weight: 700; color: var(--mq-body); margin-bottom: 5px; }
.form-control-mq { border: 1.5px solid var(--mq-line); border-radius: 11px; padding: 11px 13px; font-weight: 500; width: 100%; font-family: var(--mq-font); }
.form-control-mq:focus { outline: none; border-color: var(--mq-green-600); box-shadow: 0 0 0 3px var(--mq-green-50); }
.code-input { letter-spacing: .35em; text-transform: uppercase; font-weight: 800; text-align: center; font-size: 1.2rem; }

/* =========================================================
   LANDING
   ========================================================= */
.landing-bar { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; padding-top: max(14px, env(safe-area-inset-top)); position: sticky; top: 0; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); z-index: 20; border-bottom: 1px solid var(--mq-line); }
@media (min-width: 480px) { .landing-bar { padding-top: 30px; } }
.hero { background: radial-gradient(120% 90% at 80% -10%, var(--mq-green-700) 0%, var(--mq-green-900) 60%, #0b2e1a 100%); color: #fff; padding: 30px 20px 26px; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle at 12% 88%, rgba(201,168,76,.18), transparent 38%); pointer-events: none; }
.hero .eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background: rgba(255,255,255,.12); padding: 5px 11px; border-radius: 999px; border: 1px solid rgba(255,255,255,.16); white-space: nowrap; }
.hero h1 { font-size: 2.15rem; font-weight: 900; letter-spacing: -.035em; line-height: 1.04; margin: 16px 0 10px; }
.hero h1 .gold { color: var(--mq-gold); }
.hero p.sub { font-size: .96rem; color: rgba(255,255,255,.82); margin-bottom: 20px; line-height: 1.45; }
.hero .cta-row { display: flex; flex-direction: column; gap: 10px; }
.btn-hero { background: var(--mq-gold); color: #2c2608; font-weight: 800; border: none; border-radius: 13px; padding: 14px; font-size: 1rem; box-shadow: 0 8px 22px -8px rgba(201,168,76,.6); display: block; text-align: center; text-decoration: none; }
.btn-hero:hover { background: #d8b75a; color: #2c2608; }
.btn-hero-ghost { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.28); border-radius: 13px; padding: 13px; font-weight: 700; font-size: .95rem; display: block; text-align: center; text-decoration: none; }
.btn-hero-ghost:hover { background: rgba(255,255,255,.08); color: #fff; }
.hero-mock { margin-top: 24px; background: #fff; border-radius: 16px; box-shadow: 0 24px 50px -18px rgba(0,0,0,.5); overflow: hidden; transform: rotate(-1.4deg); }
.hero-trust { display: flex; align-items: center; gap: 14px; margin-top: 22px; font-size: .78rem; color: rgba(255,255,255,.72); }
.hero-trust .av { display: flex; }
.hero-trust .av span { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--mq-green-800); margin-left: -7px; display: grid; place-items: center; font-size: .82rem; }
.sec { padding: 28px 20px; }
.sec-eyebrow { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--mq-green-700); }
.sec h2 { font-size: 1.5rem; font-weight: 800; letter-spacing: -.03em; margin: 6px 0 0; }
.sec .lead { color: var(--mq-muted); font-size: .9rem; margin-top: 6px; }
.step { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; }
.step + .step { border-top: 1px solid var(--mq-line); }
.step .num { width: 38px; height: 38px; border-radius: 12px; background: var(--mq-green-50); color: var(--mq-green-700); font-weight: 800; display: grid; place-items: center; flex: none; font-size: 1.05rem; }
.step h6 { font-weight: 700; margin: 2px 0 3px; font-size: 1rem; }
.step p { font-size: .85rem; color: var(--mq-muted); margin: 0; line-height: 1.4; }
.feat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.feat { background: #fff; border: 1px solid var(--mq-line); border-radius: var(--mq-radius); padding: 15px; box-shadow: var(--mq-shadow-sm); }
.feat .fico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 1.2rem; background: var(--mq-green-50); color: var(--mq-green-700); margin-bottom: 10px; }
.feat.gold .fico { background: var(--mq-gold-100); color: var(--mq-gold-600); }
.feat h6 { font-weight: 700; font-size: .94rem; margin: 0 0 4px; }
.feat p { font-size: .8rem; color: var(--mq-muted); margin: 0; line-height: 1.38; }
.cta-band { margin: 8px 20px 0; background: linear-gradient(120deg, var(--mq-green-800), var(--mq-green-700)); border-radius: var(--mq-radius-lg); padding: 26px 22px; text-align: center; color: #fff; }
.cta-band h3 { font-weight: 800; font-size: 1.3rem; letter-spacing: -.02em; }
.cta-band p { color: rgba(255,255,255,.8); font-size: .88rem; margin: 6px 0 16px; }
.landing-footer { padding: 26px 20px 30px; padding-bottom: max(30px, env(safe-area-inset-bottom)); border-top: 1px solid var(--mq-line); background: #fff; }
.landing-footer .flinks { display: flex; flex-wrap: wrap; gap: 14px 18px; margin: 14px 0; font-size: .82rem; }
.landing-footer .flinks a { color: var(--mq-body); text-decoration: none; }
.landing-footer .flinks a:hover { color: var(--mq-green-700); }
.landing-footer .copy { font-size: .76rem; color: var(--mq-faint); }

/* =========================================================
   AUTH
   ========================================================= */
.auth-hero { background: linear-gradient(150deg, var(--mq-green-800), var(--mq-green-900)); color: #fff; padding: 30px 22px 56px; padding-top: max(30px, env(safe-area-inset-top)); position: relative; }
@media (min-width: 480px) { .auth-hero { padding-top: 40px; } }
.auth-hero .back { color: rgba(255,255,255,.8); text-decoration: none; font-size: .85rem; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.auth-hero h1 { font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; margin: 18px 0 4px; }
.auth-hero p { color: rgba(255,255,255,.78); font-size: .88rem; margin: 0; }
.auth-card { background: #fff; border-radius: var(--mq-radius-lg); box-shadow: var(--mq-shadow); margin: -36px 18px 0; padding: 18px; position: relative; z-index: 2; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--mq-line-2); border-radius: 12px; padding: 4px; margin-bottom: 18px; }
.seg button { border: none; background: none; font-weight: 700; font-size: .9rem; color: var(--mq-muted); padding: 9px; border-radius: 9px; transition: all .15s ease; font-family: var(--mq-font); }
.seg button.active { background: #fff; color: var(--mq-green-700); box-shadow: var(--mq-shadow-sm); }
.field { margin-bottom: 14px; }
.field label { font-size: .8rem; font-weight: 700; color: var(--mq-body); margin-bottom: 6px; display: block; }
.input-wrap { position: relative; }
.input-wrap i.lead-ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--mq-faint); font-size: 1rem; pointer-events: none; }
.input-wrap .form-control-mq { padding-left: 40px; }
.input-wrap .toggle-pw { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); border: none; background: none; color: var(--mq-faint); font-size: 1rem; cursor: pointer; padding: 0; }
.auth-meta { display: flex; align-items: center; justify-content: space-between; font-size: .8rem; margin-bottom: 16px; }
.auth-meta a { color: var(--mq-green-700); font-weight: 600; text-decoration: none; }
.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--mq-faint); font-size: .78rem; margin: 18px 0; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--mq-line); }
.btn-social { width: 100%; border: 1.5px solid var(--mq-line); background: #fff; border-radius: 11px; padding: 11px; font-weight: 600; font-size: .9rem; color: var(--mq-body); display: flex; align-items: center; justify-content: center; gap: 9px; font-family: var(--mq-font); cursor: pointer; }
.btn-social:hover { background: var(--mq-line-2); }
.auth-terms { font-size: .74rem; color: var(--mq-muted); text-align: center; margin-top: 14px; line-height: 1.4; }
.auth-terms a { color: var(--mq-green-700); }

/* =========================================================
   RANKING
   ========================================================= */
.rank-hero { background: linear-gradient(135deg, var(--mq-green-800), var(--mq-green-700)); color: #fff; padding: 16px 16px 64px; }
.rank-hero .title { font-size: 1.15rem; font-weight: 800; letter-spacing: -.02em; display: flex; align-items: center; gap: 8px; }
.rank-hero .sub { font-size: .78rem; color: rgba(255,255,255,.78); margin-top: 2px; }
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 8px; max-width: 320px; margin: 14px auto 0; }
.pod { text-align: center; }
.pod .pava { width: 46px; height: 46px; border-radius: 50%; margin: 0 auto 6px; display: grid; place-items: center; font-weight: 800; color: #fff; border: 2.5px solid rgba(255,255,255,.5); position: relative; }
.pod.first .pava { width: 56px; height: 56px; border-color: var(--mq-gold); }
.pod .crown { position: absolute; top: -16px; left: 50%; transform: translateX(-50%); font-size: 1.1rem; }
.pod .pname { font-size: .78rem; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pod .ppts { font-size: .72rem; color: rgba(255,255,255,.8); font-weight: 600; }
.pod .bar { margin-top: 8px; border-radius: 10px 10px 0 0; background: rgba(255,255,255,.16); display: grid; place-items: start center; padding-top: 8px; font-weight: 800; color: rgba(255,255,255,.9); }
.pod.first .bar { background: var(--mq-gold); color: #2c2608; height: 64px; }
.pod.second .bar { height: 46px; }
.pod.third .bar { height: 34px; }
.rank-list { background: #fff; border-radius: var(--mq-radius-lg) var(--mq-radius-lg) 0 0; margin-top: -44px; position: relative; z-index: 2; box-shadow: var(--mq-shadow); overflow: hidden; }
.rank-list-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 8px; }
.rank-row { border: none; background: none; width: 100%; text-align: left; display: grid; grid-template-columns: 26px 38px 1fr auto 18px; align-items: center; gap: 10px; padding: 11px 16px; border-top: 1px solid var(--mq-line-2); cursor: pointer; font-family: var(--mq-font); }
.rank-row:first-of-type { border-top: none; }
.rank-row .pos { font-weight: 800; font-size: .95rem; color: var(--mq-muted); text-align: center; }
.rank-row.top .pos { color: var(--mq-gold-600); }
.rank-row .rava { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; font-size: .85rem; }
.rank-row .rname { font-weight: 700; font-size: .92rem; line-height: 1.1; display: flex; align-items: center; gap: 6px; }
.rank-row .rmeta { font-size: .72rem; color: var(--mq-muted); margin-top: 1px; display: flex; align-items: center; gap: 5px; }
.rank-row .rpts { text-align: right; }
.rank-row .rpts b { font-size: 1.02rem; font-weight: 800; }
.rank-row .rpts span { display: block; font-size: .64rem; color: var(--mq-muted); font-weight: 600; }
.rank-row .chev { color: var(--mq-faint); transition: transform .2s ease; }
.rank-row.open .chev { transform: rotate(180deg); }
.rank-row.me { background: var(--mq-green-50); box-shadow: inset 3px 0 0 var(--mq-green-700); }
.tag-me { background: var(--mq-green-700); color: #fff; font-size: .6rem; font-weight: 700; padding: 1px 6px; border-radius: 999px; letter-spacing: .02em; }
.delta { display: inline-flex; align-items: center; font-size: .72rem; font-weight: 700; }
.delta.up { color: var(--mq-win); }
.delta.down { color: var(--mq-live); }
.delta.flat { color: var(--mq-faint); }
.row-detail { display: none; padding: 4px 16px 14px 70px; background: var(--mq-bg); border-top: 1px solid var(--mq-line-2); }
.row-detail.open { display: block; }
.phase-pts { display: flex; flex-wrap: wrap; gap: 7px; }
.phase-pts .pp { background: #fff; border: 1px solid var(--mq-line); border-radius: 9px; padding: 6px 10px; font-size: .72rem; }
.phase-pts .pp b { color: var(--mq-green-700); }

/* =========================================================
   GROUP SETTINGS
   ========================================================= */
.set-card { background: #fff; border: 1px solid var(--mq-line); border-radius: var(--mq-radius); overflow: hidden; box-shadow: var(--mq-shadow-sm); }
.set-card .sc-head { padding: 13px 15px 6px; }
.set-card .sc-title { font-weight: 700; font-size: .98rem; display: flex; align-items: center; gap: 8px; }
.set-card .sc-sub { font-size: .76rem; color: var(--mq-muted); margin-top: 2px; }
.set-row { display: flex; align-items: center; gap: 12px; padding: 12px 15px; border-top: 1px solid var(--mq-line-2); }
.set-row .sr-txt { flex: 1; min-width: 0; }
.set-row .sr-txt .t { font-weight: 600; font-size: .9rem; }
.set-row .sr-txt .d { font-size: .73rem; color: var(--mq-muted); margin-top: 1px; }
.stepper { display: flex; align-items: center; border: 1.5px solid var(--mq-line); border-radius: 11px; overflow: hidden; flex: none; }
.stepper button { width: 36px; height: 40px; border: none; background: #fff; font-size: 1.25rem; line-height: 1; color: var(--mq-green-700); font-weight: 700; display: grid; place-items: center; font-family: var(--mq-font); cursor: pointer; }
.stepper button:hover { background: var(--mq-green-50); }
.stepper button:disabled { color: var(--mq-faint); }
.stepper .val { width: 46px; text-align: center; font-weight: 800; font-size: 1.05rem; border: none; border-left: 1.5px solid var(--mq-line); border-right: 1.5px solid var(--mq-line); height: 40px; pointer-events: none; background: #fff; color: var(--mq-ink); }
.pts-suffix { font-size: .7rem; color: var(--mq-muted); font-weight: 600; }
.invite-box { display: flex; align-items: center; gap: 10px; background: var(--mq-green-50); border: 1px dashed var(--mq-green-100); border-radius: 12px; padding: 11px 13px; margin: 4px 15px 13px; }
.invite-box .code { font-weight: 800; letter-spacing: .12em; color: var(--mq-green-700); font-size: 1.05rem; flex: 1; }
.invite-link { display: flex; align-items: center; gap: 8px; margin: 0 15px 13px; }
.invite-link input { flex: 1; border: 1.5px solid var(--mq-line); border-radius: 11px; padding: 10px 12px; font-size: .82rem; color: var(--mq-body); background: var(--mq-line-2); }
.share-row { display: flex; gap: 8px; padding: 0 15px 14px; }
.share-row .sbtn { flex: 1; border: 1px solid var(--mq-line); background: #fff; border-radius: 11px; padding: 9px; font-size: .8rem; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--mq-body); cursor: pointer; font-family: var(--mq-font); }
.share-row .sbtn:hover { background: var(--mq-line-2); }
.member-row { display: flex; align-items: center; gap: 11px; padding: 11px 15px; border-top: 1px solid var(--mq-line-2); }
.member-row .mava { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: .82rem; flex: none; }
.member-row .mname { font-weight: 600; font-size: .9rem; display: flex; align-items: center; gap: 7px; }
.member-row .mmeta { font-size: .72rem; color: var(--mq-muted); }
.role-badge { font-size: .62rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em; }
.role-badge.admin { background: var(--mq-gold-100); color: var(--mq-gold-600); }
.role-badge.pending { background: #fdeaea; color: var(--mq-live); }
.role-badge.member { background: var(--mq-line-2); color: var(--mq-body); }
.member-x { margin-left: auto; border: none; background: none; color: var(--mq-faint); font-size: 1.1rem; cursor: pointer; }
.member-x:hover { color: var(--mq-live); }
.save-bar { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--mq-line); padding: 12px 15px; padding-bottom: max(12px, env(safe-area-inset-bottom)); }

/* =========================================================
   STATS
   ========================================================= */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.stat-card { background: #fff; border: 1px solid var(--mq-line); border-radius: var(--mq-radius); padding: 14px; box-shadow: var(--mq-shadow-sm); }
.stat-card .si { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 1rem; margin-bottom: 9px; }
.stat-card .si.green { background: var(--mq-green-50); color: var(--mq-green-700); }
.stat-card .si.gold  { background: var(--mq-gold-100); color: var(--mq-gold-600); }
.stat-card .si.blue  { background: #e7f0f7; color: #2a6f97; }
.stat-card .si.red   { background: #fdeaea; color: var(--mq-live); }
.stat-card .big { font-size: 1.7rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.stat-card .big small { font-size: .9rem; color: var(--mq-muted); font-weight: 700; }
.stat-card .lbl { font-size: .76rem; color: var(--mq-muted); margin-top: 3px; font-weight: 500; }
.stat-card .trend { font-size: .7rem; font-weight: 700; margin-top: 6px; display: inline-flex; align-items: center; gap: 3px; }
.chart-card { background: #fff; border: 1px solid var(--mq-line); border-radius: var(--mq-radius); padding: 15px; box-shadow: var(--mq-shadow-sm); }
.chart-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 4px; }
.chart-head .ct { font-weight: 700; font-size: .98rem; }
.chart-head .cs { font-size: .76rem; color: var(--mq-muted); }
.legend { display: flex; gap: 14px; font-size: .73rem; color: var(--mq-body); margin-top: 10px; }
.legend .lg { display: inline-flex; align-items: center; gap: 6px; }
.legend .dotc { width: 10px; height: 10px; border-radius: 3px; }
.bar-row { display: grid; grid-template-columns: 64px 1fr 38px; align-items: center; gap: 10px; padding: 7px 0; }
.bar-row .bl { font-size: .8rem; font-weight: 600; }
.bar-track { height: 9px; background: var(--mq-line-2); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--mq-green-600), var(--mq-green-700)); }
.bar-row .bv { font-size: .8rem; font-weight: 800; color: var(--mq-green-700); text-align: right; }
.acc-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; }
.acc-row + .acc-row { border-top: 1px solid var(--mq-line-2); }
.acc-row .ad { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.acc-row .at { flex: 1; font-size: .84rem; font-weight: 600; }
.acc-row .av { font-size: .84rem; font-weight: 800; }

/* =========================================================
   EXPLORE (quinielas públicas)
   ========================================================= */
.explore-card { background: #fff; border: 1px solid var(--mq-line); border-radius: var(--mq-radius); overflow: hidden; box-shadow: var(--mq-shadow-sm); }
.sport-selector { display: flex; gap: 8px; overflow-x: auto; padding: 0 0 4px; scrollbar-width: none; }
.sport-selector::-webkit-scrollbar { display: none; }
.sport-btn { flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 14px; border-radius: 13px; border: 1.5px solid var(--mq-line); background: #fff; font-size: .72rem; font-weight: 700; color: var(--mq-muted); cursor: pointer; font-family: var(--mq-font); transition: all .15s; }
.sport-btn .sport-ico { font-size: 1.5rem; line-height: 1; }
.sport-btn.active, .sport-btn:hover { border-color: var(--mq-green-600); color: var(--mq-green-700); background: var(--mq-green-50); }

/* ---- Pending approval badge ---- */
.pending-badge { display: inline-flex; align-items: center; gap: 4px; background: #fff3cd; color: #856404; font-size: .68rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
