/* Cola Aí — tema Copa do Mundo 2026: gramado, troféu e noite de estádio.
   Redesign 2.0: tipografia Archivo, chips em card, anel de progresso, especiais em destaque. */
:root {
  --bg: #070f1d;          /* azul noite de estádio */
  --bg2: #0b1830;
  --card: #111f36;
  --card2: #16294a;
  --line: #21375c;
  --line-soft: #ffffff14;
  --text: #eef4fb;
  --muted: #8ea5c6;
  --muted2: #6c84a8;
  --green: #23c86e;       /* gramado */
  --green-dark: #109a52;
  --green-ink: #06301a;
  --gold: #f0c44c;        /* troféu */
  --gold-dark: #c79a18;
  --gold-ink: #3a2c05;
  --red: #f0686b;
  --radius: 16px;
  --radius-sm: 11px;
  --nav-h: 64px;
  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  background-image:
    radial-gradient(1200px 520px at 82% -12%, #15356322, transparent),
    radial-gradient(960px 440px at 8% 112%, #0e44282a, transparent);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}
#app { display: flex; flex-direction: column; min-height: 100dvh; }
main { flex: 1; width: 100%; max-width: 880px; margin: 0 auto; padding: 16px 14px calc(var(--nav-h) + 28px); }

/* ───── topo ───── */
#topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 16px;
  background: #0a1730ee;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img#brand-logo { height: 38px; width: auto; display: block; border-radius: 9px; }
@media (max-width: 380px) { .brand img#brand-logo { height: 32px; } }
#nav { display: flex; gap: 2px; }
#nav a {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px;
  min-width: 58px; padding: 7px 8px; border-radius: 13px;
  color: var(--muted2); text-decoration: none; line-height: 1;
  transition: color .15s, background .15s;
}
#nav a .nic { width: 22px; height: 22px; }
#nav a span { font-size: .62rem; font-weight: 600; letter-spacing: .2px; }
#nav a.active { color: var(--green); background: #23c86e1a; }
#nav a.active .nic { stroke-width: 2.4; }
#nav a b {
  position: absolute; top: 1px; right: 7px; min-width: 16px; height: 16px; border-radius: 8px;
  background: var(--red); color: #2a0a0a; font-size: .6rem; font-weight: 800; line-height: 16px; text-align: center; padding: 0 4px;
}
@media (max-width: 640px) {
  #nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    justify-content: space-around; padding: 6px 4px calc(7px + env(safe-area-inset-bottom));
    background: #0a1424f2; backdrop-filter: blur(10px); border-top: 1px solid var(--line);
  }
}

/* ───── componentes ───── */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin: 12px 0;
  box-shadow: 0 1px 2px #0006, 0 8px 24px #00000038;
}
.ic { vertical-align: -4px; flex-shrink: 0; }
h1.page .ic { vertical-align: -3px; margin-right: 6px; color: var(--green); }
.card h2 { margin: 0 0 10px; font-size: 1.08rem; font-weight: 800; letter-spacing: -.2px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--green); color: var(--green-ink); border: 0; border-radius: 12px;
  padding: 12px 18px; font-family: var(--font); font-weight: 800; font-size: .95rem; cursor: pointer;
  text-decoration: none; letter-spacing: -.1px; transition: transform .12s, filter .12s;
  box-shadow: 0 6px 18px #23c86e30;
}
.btn.ghost, .btn.danger, .btn.small { box-shadow: none; }
.btn.gold { box-shadow: 0 6px 18px #f0c44c2e; }
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: scale(.97); }
.btn.gold { background: var(--gold); color: var(--gold-ink); }
.btn.ghost { background: #ffffff08; color: var(--text); border: 1px solid var(--line); }
.btn.danger { background: transparent; color: var(--red); border: 1px solid #f0686b66; }
.btn.small { padding: 8px 13px; font-size: .82rem; border-radius: 10px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
input[type="text"], input[type="search"], input[type="datetime-local"], input[type="number"], textarea, select {
  width: 100%; background: var(--bg2); color: var(--text); font-family: var(--font);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 13px; font-size: 1rem;
}
input::placeholder, textarea::placeholder { color: var(--muted2); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px #23c86e22; }
label.field { display: block; margin: 12px 0; font-size: .82rem; font-weight: 600; color: var(--muted); }
label.field > * { margin-top: 6px; }
.muted { color: var(--muted); font-size: .85rem; }
.row { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.center { text-align: center; }
h1.page { font-size: 1.42rem; font-weight: 800; letter-spacing: -.5px; margin: 10px 2px 6px; }

/* progresso */
.progress { height: 9px; background: #ffffff12; border-radius: 99px; overflow: hidden; }
.progress > i {
  display: block; height: 100%; border-radius: 99px; background: var(--green); transition: width .4s;
}
.progress.done > i { background: var(--gold); }
.pct { font-weight: 800; color: var(--green); font-size: .9rem; }
.pct.full { color: var(--gold); }

/* anel de progresso (hero do álbum) */
.album-hero { display: flex; align-items: center; gap: 18px; }
.ring-wrap { flex-shrink: 0; }
.ring-stats { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; }
.ring-stat { display: flex; align-items: center; gap: 9px; font-size: .92rem; }
.ring-stat .dot { width: 9px; height: 9px; border-radius: 99px; flex-shrink: 0; }
.ring-stat b { font-weight: 800; font-size: 1.02rem; }
.ring-stat span { color: var(--muted); }

/* grade de figurinhas */
.section-card { margin: 12px 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); }
.section-card.special { border-color: #d9a82659; background: linear-gradient(180deg, #1a1605, #111f36 60%); }
.section-head {
  display: flex; align-items: center; gap: 11px; padding: 13px 14px; cursor: pointer; user-select: none;
}
.section-head .flag {
  width: 32px; height: 23px; border-radius: 4px; object-fit: cover; flex-shrink: 0;
  box-shadow: 0 0 0 1px #ffffff26; background: var(--bg2);
}
.section-head .flag-special {
  width: 32px; height: 23px; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center;
  background: #2b2310; color: var(--gold); box-shadow: 0 0 0 1px #d9a82655; font-size: 1rem; font-style: normal;
}
.section-head .info { flex: 1; min-width: 0; }
.section-head .info b { display: block; font-size: .96rem; font-weight: 800; letter-spacing: -.2px; }
.section-head .info small { color: var(--muted); font-size: .76rem; }
.section-head .mini { width: 52px; height: 6px; border-radius: 99px; background: #ffffff14; overflow: hidden; flex-shrink: 0; }
.section-head .mini > i { display: block; height: 100%; transition: width .3s, background .3s; }
.section-head .mini.p0 > i { background: #f06b6b; }
.section-head .mini.p1 > i { background: #f0944c; }
.section-head .mini.p2 > i { background: #f0c44c; }
.section-head .mini.p3 > i { background: #5ee79b; }
.section-head .mini.p4 > i { background: var(--green); }
.section-head .pct-num { font-weight: 800; font-size: .88rem; min-width: 36px; text-align: right; flex-shrink: 0; }
.section-head .pct-num.p0 { color: #f06b6b; }
.section-head .pct-num.p1 { color: #f0944c; }
.section-head .pct-num.p2 { color: #f0c44c; }
.section-head .pct-num.p3 { color: #5ee79b; }
.section-head .pct-num.p4 { color: var(--green); }
.section-head .missing { font-size: .72rem; color: var(--muted); flex-shrink: 0; }
.section-head .missing b { color: #f06b6b; font-weight: 800; }
.section-head .pct-100 {
  font-weight: 900; font-size: 1.15rem; color: var(--green-ink); background: var(--green);
  padding: 4px 10px; border-radius: 99px; letter-spacing: -.5px; flex-shrink: 0;
}
.section-card.completed { border-color: var(--green); box-shadow: 0 0 0 1px #23c86e55, 0 0 18px #23c86e22; background: linear-gradient(180deg, #0e3b24 0%, #111f36 60%); }
.section-card.completed .section-head .info b { color: #c8f5dc; }
.section-card.completed.special { border-color: var(--gold); box-shadow: 0 0 0 1px #f0c44c66, 0 0 18px #f0c44c33; }
.section-head .chev { color: var(--muted2); font-size: .8rem; transition: transform .2s; }
.sticker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; padding: 2px 12px 14px; }
.stk {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 4px;
  min-height: 56px; border-radius: var(--radius-sm); cursor: pointer; user-select: none; padding: 8px 9px;
  background: #ffffff05; border: 1.5px dashed #35507c; transition: transform .1s;
}
.stk:active { transform: scale(.94); }
.stk .stk-code { font-weight: 800; font-size: .92rem; letter-spacing: .2px; color: #738aae; line-height: 1; }
.stk .stk-name { font-size: .66rem; font-weight: 500; color: #7891b6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stk.owned { background: #13294a; border: 1px solid #23c86e5c; }
.stk.owned .stk-code { color: #eaf4ff; }
.stk.owned .stk-name { color: #aebfdc; }
.stk .ck { position: absolute; top: 6px; right: 7px; color: var(--green); font-size: .82rem; font-weight: 900; }
.stk.foil { border-style: dashed; border-color: #d9a82670; }
.stk.foil .stk-code { color: #d9a826; }
.stk.foil.owned { background: linear-gradient(150deg, #2b2310, #1c2c1e); border: 1px solid #d9a826; }
.stk.foil.owned .stk-code { color: var(--gold); }
.stk.foil .ck { color: var(--gold); }
.stk .qty {
  position: absolute; top: -7px; left: -5px; min-width: 18px; height: 18px; border-radius: 99px;
  background: var(--gold); color: var(--gold-ink); font-size: .64rem; font-weight: 800; line-height: 18px; text-align: center; padding: 0 5px;
  box-shadow: 0 1px 4px #0006;
}
.stk.flash { animation: pop .35s; }
@keyframes pop { 50% { transform: scale(1.16); } }

/* filtros rápidos */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 2px 0 4px; }
.fchip {
  font-size: .82rem; font-weight: 700; padding: 7px 14px; border-radius: 99px;
  border: 1px solid var(--line); color: var(--muted); background: #ffffff05; cursor: pointer; user-select: none;
}
.fchip.gold { border-color: #d9a82666; color: var(--gold); }
.fchip.active { background: #0e3b24; border-color: var(--green); color: #5ee79b; }
.fchip.gold.active { background: #2b2310; border-color: var(--gold); color: var(--gold); }

/* lista de resultados de busca / matching */
.result {
  display: flex; align-items: center; gap: 11px; padding: 11px 12px;
  border-bottom: 1px solid var(--line-soft);
}
.result:last-child { border-bottom: 0; }
.result .flag, .result img.flag { width: 26px; height: 19px; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1px #ffffff22; flex-shrink: 0; }
.result .flag-special { width: 26px; height: 19px; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; background: #2b2310; color: var(--gold); font-size: .85rem; flex-shrink: 0; }
.result .code { font-weight: 800; min-width: 62px; letter-spacing: .2px; }
.result .who { flex: 1; min-width: 0; }
.result .who small { color: var(--muted); display: block; font-size: .76rem; }
.chip {
  display: inline-block; background: #ffffff08; border: 1px solid var(--line);
  border-radius: 8px; padding: 4px 9px; margin: 2px; font-size: .78rem; font-weight: 700;
}
.chip.have { border-color: #23c86e66; color: #9be8bb; }
.chip.need { border-color: #d9a82666; color: #ffe9a8; }

/* contador +/- */
.counter { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.counter button { width: 40px; height: 40px; border: 0; background: var(--card2); color: var(--text); font-size: 1.3rem; font-weight: 700; cursor: pointer; font-family: var(--font); }
.counter button:active { background: var(--green-dark); }
.counter b { min-width: 38px; text-align: center; font-weight: 800; }

/* slider de raio */
input[type="range"] { width: 100%; accent-color: var(--green); }

/* login */
.hero { text-align: center; padding: 40px 16px 10px; }
.hero .logo { font-size: 3.4rem; }
.hero h1 { font-size: 1.8rem; font-weight: 800; letter-spacing: -.6px; margin: 10px 0 6px; }
.hero h1 em { color: var(--gold); font-style: normal; }
.hero p { color: var(--muted); max-width: 440px; margin: 8px auto; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin: 20px 0; }
.features .card { margin: 0; font-size: .84rem; color: var(--muted); }
.features .card b { display: block; color: var(--text); margin-bottom: 5px; font-size: .92rem; font-weight: 800; }

/* mapa */
#map, .map-box { width: 100%; height: 280px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg2); }

/* notificações */
.notif { display: flex; gap: 11px; padding: 13px; border-bottom: 1px solid var(--line-soft); align-items: flex-start; }
.notif:last-child { border-bottom: 0; }
.notif.unread { background: #14283f; }
.notif .ico { font-size: 1.35rem; }
.notif small { color: var(--muted); display: block; margin-top: 3px; font-size: .76rem; }

/* rodapé */
#footer { padding: 16px 14px calc(var(--nav-h) + 12px); text-align: center; }
@media (min-width: 641px) { #footer { padding-bottom: 16px; } main { padding-bottom: 28px; } }
.foot-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px;
  max-width: 640px; margin: 0 auto 16px; text-align: left;
  padding-top: 16px; border-top: 1px solid var(--line-soft);
}
.foot-col { display: flex; flex-direction: column; gap: 7px; }
.foot-col b { font-size: .72rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 2px; }
.foot-col a { color: var(--muted2); text-decoration: none; font-size: .8rem; }
.foot-col a:hover { color: var(--text); }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-col:last-child { grid-column: 1 / -1; } }
#ad-slot {
  min-height: 60px; margin: 0 auto 12px; max-width: 728px;
  display: flex; align-items: center; justify-content: center;
  background: #ffffff05; border: 1px dashed var(--line); border-radius: 12px;
  color: var(--muted2); font-size: .76rem; padding: 8px;
}
.arandu { font-size: .76rem; color: var(--muted2); }
.arandu a { color: var(--gold); text-decoration: none; font-weight: 700; }
.arandu-banner { display: block; margin: 0 auto 10px; max-width: 728px; }
.arandu-banner img { width: 100%; height: auto; display: block; border-radius: 12px; }

/* banner próprio (promoção de parceiro dentro do conteúdo) */
.promo {
  display: flex; align-items: center; gap: 12px; margin: 12px 0; padding: 12px 14px;
  background: #ffffff06; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--text);
}
.promo .promo-logo { width: 46px; height: 46px; border-radius: 11px; object-fit: cover; background: var(--card2); flex-shrink: 0; }
.promo .promo-body { flex: 1; min-width: 0; }
.promo .promo-body b { font-weight: 800; display: block; }
.promo .promo-body small { color: var(--muted); font-size: .78rem; }
.promo .promo-tag { font-size: .62rem; font-weight: 800; color: var(--muted2); text-transform: uppercase; letter-spacing: .5px; }

/* toast */
#toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 20px); transform: translateX(-50%);
  display: flex; align-items: center; gap: 4px;
  background: #0c3a22; color: #d9ffe8; border: 1px solid var(--green);
  border-radius: 13px; padding: 11px 16px; z-index: 99; font-size: .9rem; font-weight: 700;
  max-width: 92vw; box-shadow: 0 10px 30px #000a;
}
#toast.err { background: #3a1614; border-color: var(--red); color: #ffdad7; }
#toast button {
  margin-left: 8px; background: var(--gold); color: var(--gold-ink); border: 0; border-radius: 9px;
  padding: 5px 13px; font-weight: 800; cursor: pointer; font-size: .82rem; font-family: var(--font);
}

/* badge: indicação de ações pendentes / offline (sempre visível) */
#offline-badge {
  position: fixed; left: 12px; right: 12px; top: 8px; z-index: 95;
  background: #2b2310; color: var(--gold); border: 1px solid var(--gold-dark);
  padding: 8px 14px; font-size: .82rem; font-weight: 700; text-align: center;
  border-radius: 12px; box-shadow: 0 4px 14px #0008; pointer-events: none;
}
#offline-badge.off { background: #3a1614; color: #ffdad7; border-color: var(--red); }

/* painel de opções da figurinha (action sheet) */
.sheet-overlay { position: fixed; inset: 0; background: #020610a0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; backdrop-filter: blur(2px); }
.sheet {
  width: 100%; max-width: 480px; background: var(--card); border: 1px solid var(--line); border-bottom: 0;
  border-radius: 22px 22px 0 0; padding: 12px 18px calc(18px + env(safe-area-inset-bottom));
  animation: slideup .2s ease-out;
}
@keyframes slideup { from { transform: translateY(50px); opacity: .5; } }
.sheet-grip { width: 40px; height: 4px; border-radius: 99px; background: #ffffff2e; margin: 0 auto 14px; }
.sheet .flag, .sheet img.flag { width: 30px; height: 22px; border-radius: 4px; object-fit: cover; box-shadow: 0 0 0 1px #ffffff22; }
.sheet .flag-special { width: 30px; height: 22px; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; background: #2b2310; color: var(--gold); }

.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--card2); object-fit: cover; flex-shrink: 0; }
details.box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 15px; margin: 12px 0; }
details.box summary { cursor: pointer; font-weight: 800; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .74rem; color: var(--muted); margin: 10px 2px; }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: 5px; }
.empty { text-align: center; color: var(--muted); padding: 32px 12px; }
.empty .big { font-size: 2.4rem; }

/* Lendas (Extra Stickers): 4 variações de raridade por craque */
.leg-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.leg-slot {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 9px 4px; border-radius: var(--radius-sm); cursor: pointer; font-family: var(--font);
  background: #ffffff04; border: 1.5px dashed color-mix(in srgb, var(--vc) 45%, transparent); color: var(--muted2);
  transition: transform .1s;
}
.leg-slot:active { transform: scale(.94); }
.leg-slot b { font-size: .95rem; font-weight: 800; color: var(--vc); opacity: .55; }
.leg-slot small { font-size: .6rem; }
.leg-slot.on { background: color-mix(in srgb, var(--vc) 16%, #0d1830); border: 1px solid var(--vc); color: var(--text); }
.leg-slot.on b { opacity: 1; }
.leg-slot .lck { position: absolute; top: 3px; right: 5px; font-size: .68rem; color: var(--vc); }
.leg-slot .qty {
  position: absolute; top: -7px; left: -5px; min-width: 18px; height: 18px; border-radius: 99px;
  background: var(--gold); color: var(--gold-ink); font-size: .64rem; font-weight: 800; line-height: 18px; text-align: center; padding: 0 5px;
}
