/* Cofre — visual claro, fosco, com cartões pastel e ícones 3D. */
:root {
  --bg: #F4F2EE;
  --bg-quente: #F3EEE8;
  --vidro: rgba(255, 255, 255, .78);
  --vidro-forte: rgba(255, 255, 255, .82);
  --borda: rgba(255, 255, 255, .9);
  --linha: rgba(43, 58, 85, .08);
  --tinta: #1C2230;
  --tinta2: #5D6676;
  --tinta3: #969DAA;
  --marinho: #1F2A3A;
  --marinho2: #2A3850;
  --petroleo: #2F9461;
  --petroleo-claro: #DDF1E6;
  --menta: #E2F3E8;
  --gelo: #E3EEFA;
  --lavanda: #FBF1DC;
  --pessego: #FCE6DA;
  --verde: #2E9D78;
  --vermelho: #D9534F;
  --ambar: #D99A2B;
  --raio: 26px;
  --sombra: 0 1px 0 rgba(255,255,255,.9) inset, 0 18px 40px -18px rgba(36, 50, 74, .22), 0 2px 6px rgba(36, 50, 74, .05);
  --sombra-leve: 0 10px 24px -14px rgba(36, 50, 74, .25);
  --ease: cubic-bezier(.22, 1, .36, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { background: var(--bg); color: var(--tinta); font-family: 'Nunito', system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
body { min-height: 100dvh; overflow-x: hidden; touch-action: manipulation; overscroll-behavior-x: none; }
input, select, textarea { font-size: 16px; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select { font: inherit; color: var(--tinta); }
[hidden] { display: none !important; }
img { display: block; }

/* Fundo: luz suave de estúdio, sem bolhas neon */
.fundo { position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(900px 600px at 10% 0%, rgba(255,255,255,.9), transparent 60%),
    radial-gradient(700px 500px at 100% 100%, rgba(226,243,232,.7), transparent 60%),
    #F4F2EE; }

/* Ícones 3D */
.i3d { width: 1.4em; height: 1.4em; object-fit: contain; display: inline-block; vertical-align: -.35em; }
.tile { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; flex: none;
  background: linear-gradient(145deg, rgba(255,255,255,.95), rgba(255,255,255,.55));
  box-shadow: 0 1px 0 #fff inset, 0 8px 18px -10px rgba(36,50,74,.35); }
.tile img { width: 72%; height: 72%; object-fit: contain; filter: drop-shadow(0 4px 4px rgba(36,50,74,.18)); transition: transform .5s var(--ease); }
.tile.p { width: 40px; height: 40px; border-radius: 12px; }
.tile.g { width: 64px; height: 64px; border-radius: 20px; }
*:hover > .tile img, .tile:hover img { transform: translateY(-2px) rotate(-4deg) scale(1.06); }
.flutua { animation: flutua 5s ease-in-out infinite; }
@keyframes flutua { 50% { transform: translateY(-6px); } }

/* Layout */
.app { position: relative; z-index: 1; display: grid; grid-template-columns: 250px 1fr; gap: 22px; min-height: 100dvh; padding: 18px; }
.sidebar { position: sticky; top: 18px; height: calc(100dvh - 36px); border-radius: 30px; padding: 26px 16px 18px; display: flex; flex-direction: column; gap: 26px;
  background: rgba(255,255,255,.85); border: 1px solid #fff; color: var(--tinta); box-shadow: var(--sombra); backdrop-filter: blur(18px); }
.nav { display: flex; flex-direction: column; gap: 6px; }
.nav button { display: flex; align-items: center; gap: 14px; padding: 13px 16px; border-radius: 16px; color: var(--tinta); font-weight: 700; font-size: 16px; transition: background .35s var(--ease), color .3s; text-align: left; }
.nav button svg { width: 22px; height: 22px; flex: none; color: var(--tinta2); transition: color .3s; }
.nav button:hover { background: rgba(28,34,48,.04); }
.nav button.ativo { background: var(--petroleo-claro); color: var(--tinta); }
.nav button.ativo svg { color: var(--petroleo); }
.nav .nav-fab { background: var(--petroleo); color: #fff; margin: 4px 0; box-shadow: 0 12px 22px -12px rgba(47,148,97,.9); }
.nav .nav-fab svg { color: #fff; }
.nav .nav-fab:hover { background: #2a8657; }
.sidebar-nivel { margin-top: auto; }
.premio { border-radius: 22px; padding: 18px 16px 0; background: var(--menta); display: grid; gap: 8px; overflow: hidden; }
.premio b { font-size: 16px; font-weight: 900; } .premio .v { font-size: 18px; color: var(--tinta2); font-weight: 800; }
.premio small { font-size: 12.5px; color: var(--tinta2); font-weight: 700; }
.premio img { width: 110px; margin: 4px auto -6px; filter: drop-shadow(0 10px 10px rgba(36,50,74,.18)); }
.xp-mini { width: 100%; height: 10px; border-radius: 6px; background: rgba(255,255,255,.8); overflow: hidden; }
.xp-mini i { display: block; height: 100%; width: 0; border-radius: 6px; background: var(--petroleo); transition: width 1.4s var(--ease); }
.main { padding: 10px 6px 120px; max-width: 1240px; width: 100%; min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 22px; }
.topbar h1 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 900; letter-spacing: -.02em; color: var(--tinta); }
.mes-sel { display: inline-flex; align-items: center; gap: 2px; margin-top: 2px; padding: 4px; border-radius: 14px; background: var(--vidro); border: 1px solid var(--borda); }
.mes-sel span { font-size: 14px; font-weight: 700; color: var(--tinta2); text-transform: capitalize; padding: 0 8px; min-width: 120px; text-align: center; }
.mes-sel button { width: 28px; height: 28px; border-radius: 10px; color: var(--tinta2); font-size: 18px; line-height: 1; }
.mes-sel button:hover { background: #fff; }
.top-acoes { display: flex; gap: 10px; align-items: center; }
.icone-btn { position: relative; width: 48px; height: 48px; border-radius: 50%; background: var(--vidro-forte); border: 1px solid var(--borda); display: grid; place-items: center; box-shadow: var(--sombra-leve); transition: transform .3s var(--ease); }
.icone-btn img { width: 26px; height: 26px; object-fit: contain; }
.icone-btn:hover { transform: translateY(-2px); }
.icone-btn:active { transform: scale(.94); }
.icone-btn em { position: absolute; top: -2px; right: -2px; min-width: 20px; height: 20px; border-radius: 10px; background: var(--vermelho); color: #fff; font-style: normal; font-size: 11px; font-weight: 800; display: grid; place-items: center; padding: 0 5px; border: 2px solid #fff; }
.xp-chip { display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 16px 0 8px; border-radius: 26px; background: var(--vidro-forte); border: 1px solid var(--borda); font-size: 14px; font-weight: 800; box-shadow: var(--sombra-leve); }
.xp-chip img { width: 30px; height: 30px; object-fit: contain; }
.xp-chip small { color: var(--tinta3); font-weight: 700; }

/* Cartões */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(12, 1fr); }
.card { background: var(--vidro); border: 1px solid var(--borda); border-radius: var(--raio); padding: 22px; backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2); box-shadow: var(--sombra); position: relative; overflow: hidden; opacity: 0; transform: translateY(16px); animation: entra .8s var(--ease) forwards; min-width: 0; }
.grid > .card:nth-child(2) { animation-delay: .05s; } .grid > .card:nth-child(3) { animation-delay: .1s; } .grid > .card:nth-child(4) { animation-delay: .15s; }
.grid > .card:nth-child(5) { animation-delay: .2s; } .grid > .card:nth-child(6) { animation-delay: .25s; } .grid > .card:nth-child(7) { animation-delay: .3s; } .grid > .card:nth-child(n+8) { animation-delay: .35s; }
@keyframes entra { to { opacity: 1; transform: none; } }
.c12 { grid-column: span 12; } .c8 { grid-column: span 8; } .c7 { grid-column: span 7; } .c6 { grid-column: span 6; } .c5 { grid-column: span 5; } .c4 { grid-column: span 4; } .c3 { grid-column: span 3; }
.card h2 { font-size: 17px; font-weight: 800; color: var(--tinta); margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card h2 small { font-weight: 700; font-size: 12.5px; color: var(--tinta3); }
.pilula { font-size: 12.5px; font-weight: 800; color: var(--tinta2); padding: 6px 12px; border-radius: 12px; background: rgba(255,255,255,.75); border: 1px solid var(--borda); box-shadow: var(--sombra-leve); }
.rotulo { font-size: 13px; color: var(--tinta2); font-weight: 700; }
.grande { font-size: clamp(32px, 4.4vw, 46px); font-weight: 900; letter-spacing: -.03em; line-height: 1.05; }
.medio { font-size: 22px; font-weight: 900; }
.pos { color: var(--verde); } .neg { color: var(--vermelho); } .alerta { color: var(--ambar); }
.mut { color: var(--tinta2); font-size: 14.5px; line-height: 1.55; }

/* Banner de boas-vindas */
.banner { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; padding: 0; min-height: 260px;
  background: linear-gradient(100deg, #E2F3E8 0%, #F1F6EF 45%, #F4F0E9 70%); }
.banner-txt { padding: 30px 32px; display: grid; gap: 14px; position: relative; z-index: 1; }
.banner-txt h2 { font-size: clamp(24px, 2.8vw, 32px); line-height: 1.15; font-weight: 900; margin: 0; display: block; letter-spacing: -.02em; }
.banner-ilu { align-self: end; height: 100%; position: relative; min-height: 250px; }
.banner-ilu img { position: absolute; right: 0; bottom: 0; height: 100%; width: 100%; object-fit: cover; object-position: 70% 60%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 28%); mask-image: linear-gradient(90deg, transparent 0%, #000 28%); }

/* Cartões de número (pastel) */
.stat { display: grid; grid-template-columns: 84px 1fr; overflow: hidden; align-items: center; gap: 14px; padding: 18px 20px; }
.stat > img { width: 84px; height: 84px; object-fit: contain; filter: drop-shadow(0 10px 10px rgba(36,50,74,.18)); transition: transform .6s var(--ease); }
.stat:hover > img { transform: translateY(-4px) rotate(-6deg) scale(1.05); }
.stat > div:last-child { display: grid; gap: 2px; min-width: 0; }
.stat span { font-size: 14.5px; font-weight: 700; color: var(--tinta); }
.stat b { font-size: clamp(22px, 2.3vw, 30px); font-weight: 900; letter-spacing: -.02em; white-space: nowrap; }
.stat small { font-size: 12.5px; font-weight: 700; color: var(--tinta2); }
.stat.menta { background: var(--menta); } .stat.gelo { background: var(--gelo); }
.stat.lavanda { background: var(--lavanda); } .stat.pessego { background: var(--pessego); }
.tile.menta { background: var(--menta); } .tile.gelo { background: var(--gelo); } .tile.lavanda { background: var(--lavanda); } .tile.pessego { background: var(--pessego); }

/* Medidor de saúde */
.saude { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.gauge { width: 100%; max-width: 230px; }
.gauge path { transition: stroke-dashoffset 1.8s var(--ease); }
.gauge-num { font-size: 42px; font-weight: 900; margin-top: -60px; letter-spacing: -.03em; }
.selo { display: inline-flex; padding: 5px 12px; border-radius: 12px; font-size: 12.5px; font-weight: 800; }

/* Rosca */
.rosca-wrap { display: grid; grid-template-columns: 180px 1fr; gap: 22px; align-items: center; }
.rosca { width: 180px; height: 180px; position: relative; }
.rosca svg { width: 100%; height: 100%; transform: rotate(-90deg); filter: drop-shadow(0 10px 14px rgba(36,50,74,.15)); }
.rosca circle.fatia { transition: stroke-dasharray 1.4s var(--ease), stroke-width .3s var(--ease); cursor: pointer; }
.rosca circle.fatia:hover { stroke-width: 34; }
.rosca-centro { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; pointer-events: none; }
.rosca-centro b { font-size: 19px; font-weight: 900; display: block; }
.rosca-centro span { font-size: 12px; color: var(--tinta2); font-weight: 700; }
.legenda { display: grid; gap: 10px; font-size: 14px; }
.legenda div { display: grid; grid-template-columns: 12px 1fr auto; gap: 10px; align-items: center; font-weight: 700; color: var(--tinta2); }
.legenda i { width: 12px; height: 12px; border-radius: 50%; }
.legenda b { color: var(--tinta); }

/* Barras por categoria */
.barras { display: grid; gap: 16px; }
.barra-linha { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: center; }
.barra-topo { display: flex; justify-content: space-between; font-size: 14px; font-weight: 800; gap: 8px; margin-bottom: 7px; }
.barra-topo span:last-child { color: var(--tinta2); white-space: nowrap; font-weight: 700; }
.barra { height: 12px; border-radius: 8px; background: rgba(36,50,74,.07); position: relative; box-shadow: inset 0 1px 2px rgba(36,50,74,.08); }
.barra > i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 8px; transition: width 1.4s var(--ease); box-shadow: 0 1px 0 rgba(255,255,255,.5) inset; }
.barra .teto { position: absolute; top: -4px; bottom: -4px; width: 3px; background: var(--marinho); border-radius: 2px; opacity: .55; }
.barra.estourou > i { animation: avisa 2.6s ease-in-out infinite; }
@keyframes avisa { 50% { filter: brightness(1.12); } }

/* Fluxo */
.fluxo { display: grid; grid-template-columns: 1fr 80px 1.4fr; align-items: stretch; min-height: 320px; }
.fluxo-fonte { border-radius: 22px; background: linear-gradient(160deg, var(--marinho2), var(--marinho)); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 10px; padding: 22px; color: #fff; box-shadow: var(--sombra-leve); }
.fluxo-fonte b { font-size: 26px; font-weight: 900; }
.fluxo svg { width: 100%; height: 100%; }
.fluxo svg path { opacity: 0; transition: opacity 1.2s var(--ease); }
.fluxo svg.vivo path { opacity: .55; }
.fluxo-destinos { display: flex; flex-direction: column; gap: 8px; }
.fluxo-destinos div { border-radius: 16px; padding: 10px 14px; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; font-weight: 800; min-height: 40px; color: var(--tinta); transform-origin: left; transform: scaleX(0); transition: transform 1s var(--ease); box-shadow: var(--sombra-leve); }
.fluxo-destinos.vivo div { transform: none; }

/* Histórico */
.hist { display: flex; align-items: flex-end; gap: 14px; height: 210px; padding-top: 10px; }
.hist-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.hist-barras { display: flex; gap: 5px; align-items: flex-end; height: 100%; width: 100%; justify-content: center; }
.hist-barras i { width: 42%; max-width: 24px; border-radius: 10px 10px 6px 6px; height: 0; transition: height 1.3s var(--ease); box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 6px 12px -6px rgba(36,50,74,.35); }
.hist-col span { font-size: 12.5px; color: var(--tinta2); font-weight: 700; text-transform: capitalize; }

/* Projeção */
.proj svg { width: 100%; height: 250px; overflow: visible; }
.proj .linha { fill: none; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.proj .desenha { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: desenha 2.4s var(--ease) forwards; }
@keyframes desenha { to { stroke-dashoffset: 0; } }
.proj .area { opacity: 0; animation: aparece 1.4s .8s forwards; }
@keyframes aparece { to { opacity: 1; } }
.proj text { fill: var(--tinta3); font-size: 12px; font-weight: 700; font-family: inherit; }

/* Linha do tempo */
.timeline { position: relative; display: grid; gap: 16px; padding-left: 40px; }
.timeline::before { content: ''; position: absolute; left: 15px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: rgba(43,58,85,.15); }
.etapa { position: relative; background: rgba(255,255,255,.6); border: 1px solid var(--borda); border-radius: 20px; padding: 16px 18px; opacity: 0; transform: translateX(-10px); animation: entra .8s var(--ease) forwards; box-shadow: var(--sombra-leve); }
.etapa::before { content: attr(data-n); position: absolute; left: -40px; top: 14px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 900; background: #fff; color: var(--marinho); box-shadow: var(--sombra-leve); }
.etapa.feita::before { content: '✓'; background: var(--verde); color: #fff; }
.etapa.agora { background: var(--petroleo-claro); border-color: rgba(47,116,128,.25); }
.etapa.agora::before { background: var(--petroleo); color: #fff; }
.etapa h3 { font-size: 16px; font-weight: 800; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.etapa h3 small { font-size: 12.5px; color: var(--petroleo); font-weight: 800; }
.etapa p { color: var(--tinta2); font-size: 14px; margin-top: 6px; line-height: 1.5; }
.etapa .barra { margin-top: 12px; height: 9px; }
.corte { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--linha); }
.corte:last-child { border-bottom: 0; }
.corte b { font-size: 14.5px; font-weight: 800; } .corte p { font-size: 13px; color: var(--tinta2); margin-top: 2px; line-height: 1.4; }
.corte .valor { font-weight: 900; color: var(--verde); white-space: nowrap; }

/* Jornada */
.nivel-card { display: grid; gap: 12px; }
.nivel-topo { display: flex; align-items: center; gap: 14px; }
.nivel-topo b { font-size: 18px; font-weight: 900; display: block; }
.nivel-topo span { font-size: 13px; color: var(--tinta2); font-weight: 600; }
.xp-barra { height: 12px; border-radius: 8px; background: rgba(36,50,74,.08); overflow: hidden; box-shadow: inset 0 1px 2px rgba(36,50,74,.08); }
.xp-barra i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #6CC3BE, #F2C46D); border-radius: 8px; transition: width 1.5s var(--ease); }
.missoes { display: grid; gap: 10px; }
.missao { display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 20px; background: rgba(255,255,255,.6); border: 1px solid var(--borda); transition: transform .35s var(--ease), box-shadow .35s; box-shadow: var(--sombra-leve); }
.missao:hover { transform: translateY(-2px); }
.missao b { font-size: 14.5px; font-weight: 800; } .missao p { font-size: 12.5px; color: var(--tinta2); margin-top: 3px; }
.missao .barra { height: 7px; margin-top: 8px; }
.missao .xp { font-size: 13px; font-weight: 900; color: var(--ambar); white-space: nowrap; text-align: right; }
.missao.ok { background: rgba(211,236,230,.75); }
.missao.ok .xp { color: var(--verde); }
.medalhas { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.medalha { text-align: center; padding: 18px 10px; border-radius: 22px; background: rgba(255,255,255,.6); border: 1px solid var(--borda); transition: transform .4s var(--ease); display: grid; justify-items: center; gap: 4px; box-shadow: var(--sombra-leve); }
.medalha:hover { transform: translateY(-4px); }
.medalha img { width: 58px; height: 58px; object-fit: contain; margin-bottom: 6px; filter: drop-shadow(0 6px 6px rgba(36,50,74,.2)); }
.medalha b { font-size: 13px; font-weight: 800; } .medalha span { font-size: 11.5px; color: var(--tinta3); font-weight: 600; }
.medalha.bloq img { filter: grayscale(1); opacity: .35; }
.medalha.bloq b { color: var(--tinta3); }
.ofensiva { display: flex; gap: 6px; justify-content: space-between; }
.ofensiva div { flex: 1; text-align: center; font-size: 11.5px; color: var(--tinta3); font-weight: 700; }
.ofensiva i { display: grid; place-items: center; height: 44px; border-radius: 14px; background: rgba(36,50,74,.06); margin-bottom: 5px; font-style: normal; color: var(--tinta3); }
.ofensiva i img { width: 28px; height: 28px; object-fit: contain; }
.ofensiva .on i { background: var(--pessego); box-shadow: var(--sombra-leve); }

/* Lista */
.lista { display: grid; gap: 2px; }
.item { display: grid; grid-template-columns: 44px 1fr auto auto; gap: 12px; align-items: center; padding: 9px 6px; border-radius: 16px; transition: background .25s; }
.item:hover { background: rgba(255,255,255,.6); }
.item b { font-size: 14.5px; font-weight: 800; } .item p { font-size: 12.5px; color: var(--tinta3); font-weight: 600; }
.item .v { font-weight: 900; }
.item .apagar, .apagar { opacity: .4; font-size: 13px; padding: 6px; border-radius: 10px; }
.item .apagar:hover, .apagar:hover { opacity: 1; background: rgba(217,83,79,.1); }
.vazio { text-align: center; padding: 24px 10px; color: var(--tinta2); font-weight: 600; display: grid; justify-items: center; gap: 10px; }
.vazio img { width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(0 8px 8px rgba(36,50,74,.18)); }

/* Botões e campos */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 22px; border-radius: 18px; font-weight: 800; font-size: 15px; background: var(--petroleo); color: #fff; transition: transform .25s var(--ease), box-shadow .25s, background .25s; box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 12px 22px -12px rgba(47,116,128,.9); }
.btn:hover { background: #2a6873; transform: translateY(-1px); } .btn:active { transform: scale(.97); }
.btn img { width: 20px; height: 20px; object-fit: contain; }
.btn.sec { background: rgba(255,255,255,.85); color: var(--tinta); border: 1px solid var(--borda); box-shadow: var(--sombra-leve); }
.btn.sec:hover { background: #fff; }
.btn.verde { background: var(--verde); box-shadow: 0 12px 22px -12px rgba(46,157,120,.9); }
.btn.mini { padding: 7px 13px; font-size: 12.5px; border-radius: 12px; }
.btn.cheio { width: 100%; }
.botoes { display: flex; gap: 10px; flex-wrap: wrap; }
.campo { display: grid; gap: 8px; margin-bottom: 16px; }
.campo label { font-size: 13px; font-weight: 800; color: var(--tinta2); }
.campo input, .campo select { background: rgba(255,255,255,.8); border: 1px solid rgba(43,58,85,.1); border-radius: 16px; padding: 14px 16px; font-size: 16px; font-weight: 700; outline: none; transition: border-color .2s, box-shadow .2s; width: 100%; }
.campo input:focus { border-color: var(--petroleo); box-shadow: 0 0 0 4px rgba(47,116,128,.15); }
.valor-gigante { text-align: center; margin: 4px 0 18px; padding: 14px; border-radius: 22px; background: rgba(255,255,255,.7); box-shadow: inset 0 2px 6px rgba(36,50,74,.06); }
.valor-gigante input { background: none; border: 0; outline: none; text-align: center; font-size: clamp(38px, 9vw, 52px); font-weight: 900; letter-spacing: -.03em; width: 100%; }
.valor-gigante small { color: var(--tinta3); font-size: 13px; font-weight: 700; }
.chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin-bottom: 18px; }
.chip { padding: 12px 6px 10px; border-radius: 18px; background: rgba(255,255,255,.65); border: 1.5px solid transparent; font-size: 12.5px; font-weight: 800; display: grid; gap: 6px; justify-items: center; transition: all .3s var(--ease); color: var(--tinta2); }
.chip img { width: 40px; height: 40px; object-fit: contain; filter: drop-shadow(0 4px 4px rgba(36,50,74,.15)); transition: transform .4s var(--ease); }
.chip:hover img { transform: translateY(-3px) rotate(-5deg); }
.chip.sel { background: #fff; border-color: var(--petroleo); color: var(--tinta); transform: translateY(-2px); box-shadow: var(--sombra-leve); }
.chip .pend { font-size: 10.5px; color: var(--ambar); font-style: normal; }
.abas { display: inline-flex; gap: 4px; padding: 4px; border-radius: 16px; background: rgba(36,50,74,.06); margin-bottom: 16px; flex-wrap: wrap; }
.abas button { padding: 8px 16px; border-radius: 12px; font-size: 13.5px; font-weight: 800; color: var(--tinta2); transition: all .3s var(--ease); }
.abas button.ativo { background: #fff; color: var(--tinta); box-shadow: var(--sombra-leve); }

/* Planilha */
.planilha-wrap { overflow: auto; border-radius: 18px; border: 1px solid rgba(43,58,85,.1); max-height: 62vh; background: #fff; }
.planilha { border-collapse: collapse; width: 100%; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.planilha th, .planilha td { border: 1px solid #E4E9EF; padding: 9px 11px; white-space: nowrap; text-align: left; }
.planilha thead th { background: #F2F5F8; color: var(--tinta3); font-weight: 700; position: sticky; top: 0; text-align: center; font-size: 11.5px; }
.planilha td.n { background: #F7F9FB; color: var(--tinta3); text-align: center; width: 38px; font-size: 11.5px; }
.planilha tr.cab td { font-weight: 800; background: #EAF3F2; }
.planilha td.num { text-align: right; }
.planilha td.f { color: var(--petroleo); cursor: pointer; }
.planilha td.f:hover { background: #F0F8F7; }
.planilha tr.tot td { font-weight: 900; background: #F4F8EF; }
.planilha .i3d { width: 22px; height: 22px; margin-right: 6px; }
.formula-barra { display: flex; gap: 10px; align-items: center; background: #fff; border: 1px solid rgba(43,58,85,.1); border-radius: 14px; padding: 9px 14px; margin-bottom: 10px; font-size: 13px; font-family: ui-monospace, Menlo, monospace; color: var(--tinta2); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.formula-barra b { color: var(--petroleo); font-style: italic; }

/* Gaveta e modal */
.gaveta, .modal { position: fixed; inset: 0; z-index: 50; }
.gaveta-fundo, .modal-fundo { position: absolute; inset: 0; background: rgba(36,50,74,.28); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: aparece .35s forwards; opacity: 0; }
.gaveta-corpo { position: absolute; right: 12px; top: 12px; bottom: 12px; width: min(400px, calc(100% - 24px)); background: rgba(246,248,250,.96); border-radius: 28px; padding: 24px; display: flex; flex-direction: column; gap: 14px; animation: desliza .5s var(--ease); overflow-y: auto; box-shadow: 0 30px 60px -20px rgba(36,50,74,.4); }
@keyframes desliza { from { transform: translateX(110%); } }
.gaveta-topo { display: flex; justify-content: space-between; align-items: center; }
.gaveta-topo h3 { font-size: 20px; font-weight: 900; }
.lembrete { display: grid; grid-template-columns: 48px 1fr; gap: 12px; align-items: center; padding: 12px; border-radius: 20px; background: #fff; margin-bottom: 10px; cursor: pointer; transition: transform .3s var(--ease); animation: entra .6s var(--ease) both; box-shadow: var(--sombra-leve); }
.lembrete:hover { transform: translateX(-4px); }
.lembrete b { font-size: 14.5px; font-weight: 800; } .lembrete p { font-size: 13px; color: var(--tinta2); margin-top: 3px; }
.modal-corpo { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(540px, calc(100% - 24px)); max-height: calc(100dvh - 32px); overflow-y: auto; background: rgba(246,248,250,.97); border-radius: 32px; padding: 26px; animation: sobe .55s var(--ease); box-shadow: 0 40px 80px -30px rgba(36,50,74,.5); }
@keyframes sobe { from { opacity: 0; transform: translate(-50%, -44%) scale(.97); } }
.modal-corpo h3 { font-size: 22px; font-weight: 900; margin-bottom: 4px; }

/* Toasts e confete */
.toasts { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 80; display: grid; gap: 8px; pointer-events: none; width: min(420px, calc(100% - 32px)); }
.toast { background: rgba(255,255,255,.95); border: 1px solid var(--borda); backdrop-filter: blur(14px); padding: 10px 16px 10px 10px; border-radius: 20px; font-size: 14px; font-weight: 700; display: flex; gap: 10px; align-items: center; box-shadow: 0 20px 40px -18px rgba(36,50,74,.45); animation: toastIn .6s var(--ease), toastOut .45s 3.1s forwards; }
.toast img { width: 34px; height: 34px; object-fit: contain; flex: none; }
.toast b { color: var(--petroleo); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-18px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px); } }
.confete { position: fixed; inset: 0; pointer-events: none; z-index: 90; width: 100%; height: 100%; }
.pop { animation: pop .6s var(--ease); }
@keyframes pop { 40% { transform: scale(1.06); } }

/* Boas-vindas */
.onboarding { position: relative; z-index: 2; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.ob-caixa { width: min(500px, 100%); text-align: center; background: var(--vidro); border: 1px solid var(--borda); border-radius: 34px; padding: 30px 26px; box-shadow: var(--sombra); backdrop-filter: blur(18px); }
.ob-caixa .ilu { width: 100%; max-height: 210px; object-fit: cover; border-radius: 24px; margin-bottom: 20px; }
.ob-caixa h1 { font-size: clamp(26px, 6vw, 34px); font-weight: 900; letter-spacing: -.02em; line-height: 1.1; margin-bottom: 8px; }
.ob-caixa > p { color: var(--tinta2); margin-bottom: 22px; line-height: 1.5; font-weight: 600; }
.ob-passos { display: flex; gap: 6px; justify-content: center; margin-bottom: 22px; }
.ob-passos i { width: 26px; height: 6px; border-radius: 4px; background: rgba(36,50,74,.12); transition: all .5s var(--ease); }
.ob-passos i.on { background: var(--petroleo); width: 42px; }
.ob-form { text-align: left; animation: entra .7s var(--ease) both; opacity: 0; transform: translateY(14px); }
.metas-op { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.metas-op button { padding: 14px 8px; border-radius: 20px; background: rgba(255,255,255,.7); border: 1.5px solid transparent; font-weight: 800; font-size: 12.5px; display: grid; gap: 6px; justify-items: center; transition: all .3s var(--ease); color: var(--tinta2); }
.metas-op button img { width: 44px; height: 44px; object-fit: contain; }
.metas-op button.sel { border-color: var(--petroleo); background: #fff; color: var(--tinta); transform: translateY(-2px); box-shadow: var(--sombra-leve); }

.so-mobile { display: none !important; }

/* Peças novas do mock */
.missoes-linha { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.missao-mini { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; }
.missao-mini b { font-size: 14px; font-weight: 700; display: block; margin-bottom: 8px; }
.missao-mini .barra { height: 9px; }
.missao-mini > span { font-size: 13px; font-weight: 800; color: var(--tinta2); align-self: end; }
.etapa-corpo { display: flex; gap: 14px; align-items: flex-start; }
.plano-ilu { display: grid; place-items: center; }
.plano-ilu img { width: 180px; height: 180px; object-fit: contain; filter: drop-shadow(0 18px 18px rgba(36,50,74,.2)); }
.fluxo-fonte .grande-ico { width: 56px; height: 56px; }
.fluxo-fonte { background: linear-gradient(160deg, #3AA571, #2F9461); }
.item .tile.p img { width: 70%; height: 70%; }
.stat-like { background: rgba(255,255,255,.78); }

.btn.mini { white-space: nowrap; }
.compacto .apagar { display: none; }
.compacto .item { grid-template-columns: 40px 1fr auto; }
@media (min-width: 1181px) {
  .grid > .c4 .rosca-wrap { grid-template-columns: 1fr; justify-items: center; }
  .grid > .c4 .legenda { width: 100%; grid-template-columns: 1fr 1fr; column-gap: 16px; }
}

/* Marca PouPei */
.logo { display: flex; align-items: center; gap: 10px; }
.logo-simbolo { width: 54px; height: 54px; object-fit: contain; filter: drop-shadow(0 8px 10px rgba(47,148,97,.28)); animation: flutua 5s ease-in-out infinite; transition: transform .5s var(--ease); }
.logo:hover .logo-simbolo { transform: rotate(-8deg) scale(1.06); }
.logo-txt { display: flex; flex-direction: column; font-size: 30px; font-weight: 900; letter-spacing: -.035em; line-height: .95; color: var(--tinta); }
.logo-txt b { color: var(--petroleo); font-weight: 900; }
.logo-txt small { font-size: 11.5px; font-weight: 700; letter-spacing: .01em; color: var(--tinta3); margin-top: 5px; }
.marca.logo { padding: 0 6px; font-size: inherit; }
.logo-mini .logo-simbolo { width: 40px; height: 40px; }
.logo-mini .logo-txt { font-size: 23px; }
.ob-logo { justify-content: center; margin-bottom: 16px; }
.ob-logo .logo-simbolo { width: 64px; height: 64px; }
.ob-logo .logo-txt { font-size: 36px; }
.ob-logo .logo-txt small { text-align: left; }

/* Ícones vivos (mudam com os números) */
.ico-vivo { position: relative; width: 84px; height: 84px; display: grid; place-items: center; overflow: hidden; border-radius: 18px; }
.ico-vivo img { filter: drop-shadow(0 8px 8px rgba(36,50,74,.18)); }
.ico-vivo .maco { position: absolute; width: calc(62px * var(--esc)); height: calc(62px * var(--esc)); object-fit: contain;
  bottom: calc(4px + var(--i) * 7px); left: calc(50% - 31px * var(--esc) + var(--i) * 3px); z-index: calc(10 - var(--i));
  animation: cai .9s var(--ease) both, balanca 4s ease-in-out infinite; animation-delay: calc(var(--i) * .12s), calc(1s + var(--i) * .4s); }
@keyframes cai { from { opacity: 0; transform: translateY(-26px) rotate(-8deg); } }
@keyframes balanca { 50% { transform: translateY(-3px) rotate(-2deg); } }
.ico-vivo .carteira { width: calc(72px * var(--esc)); height: calc(72px * var(--esc)); object-fit: contain; animation: cai .9s var(--ease) both, respira 3.6s ease-in-out 1s infinite; }
@keyframes respira { 50% { transform: scale(1.05); } }
.ico-vivo.pesada .carteira { animation: cai .9s var(--ease) both, pesa 2.4s ease-in-out 1s infinite; }
@keyframes pesa { 50% { transform: translateY(2px) scaleY(.95); } }
.ico-vivo.estoura .carteira { animation: cai .9s var(--ease) both, treme 1.8s ease-in-out 1s infinite; }
@keyframes treme { 0%, 80%, 100% { transform: none; } 84% { transform: translateX(-3px) rotate(-4deg); } 88% { transform: translateX(3px) rotate(4deg); } 92% { transform: translateX(-2px); } }
.pilhas { display: flex; align-items: flex-end; justify-content: center; gap: 2px; padding-bottom: 6px; }
.pilha { display: flex; flex-direction: column-reverse; align-items: center; }
.moeda { display: block; width: 26px; height: 10px; margin-top: -4px; border-radius: 50%; position: relative;
  background: radial-gradient(ellipse at 50% 35%, #FFF1B8 0%, #F7CF57 45%, #E3A92E 100%);
  box-shadow: 0 3px 0 #C08A1E, 0 5px 6px rgba(120,80,10,.25); animation: moedaCai .7s cubic-bezier(.3,1.4,.5,1) both; animation-delay: var(--d); }
.moeda::after { content: ''; position: absolute; inset: 2px 7px; border-radius: 50%; border: 1px solid rgba(192,138,30,.35); }
@keyframes moedaCai { from { opacity: 0; transform: translateY(-40px); } }
.pilha:nth-child(2) { margin-bottom: -2px; } .pilha:nth-child(3) { margin-bottom: 3px; }
.vazio-moedas .cinza { width: 64px; height: 64px; filter: grayscale(1) opacity(.35); }
.ico-vivo.seq .cal { width: 70px; height: 70px; object-fit: contain; animation: cai .9s var(--ease) both; }
.chamas { position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%); display: flex; }
.chamas img { width: 20px; height: 20px; margin-left: -5px; animation: chama 1.6s ease-in-out infinite; animation-delay: calc(var(--i) * .15s); transform-origin: bottom; }
@keyframes chama { 50% { transform: scaleY(1.15) translateY(-1px); } }
.dica-cartao { font-size: 12.5px; margin: -6px 0 10px; }
@media (max-width: 560px) {
  .stat > .ico-vivo { position: absolute; right: 8px; top: 8px; width: 84px; height: 84px; transform: scale(.72); transform-origin: top right; }
}

.conta { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 12px; border-radius: 18px; background: #fff; margin-bottom: 18px; box-shadow: var(--sombra-leve); }
.conta small { display: block; font-size: 12px; color: var(--tinta3); font-weight: 700; } .conta b { font-size: 14px; word-break: break-all; }
.conta a { text-decoration: none; }

.convite { display: grid; grid-template-columns: 72px 1fr auto; gap: 18px; align-items: center; background: linear-gradient(100deg, var(--gelo), rgba(255,255,255,.8)); }
.convite-ilu img { width: 72px; height: 72px; object-fit: contain; }
.convite b { font-size: 17px; font-weight: 900; }
/* Tela de assinatura */
.paywall { width: min(980px, 100%); display: grid; grid-template-columns: .95fr 1.05fr; background: rgba(255,255,255,.85); border: 1px solid #fff; border-radius: 34px; overflow: hidden; box-shadow: var(--sombra); }
.pw-ilu { background: linear-gradient(160deg, var(--menta), #F4F2EE); display: grid; place-items: center; padding: 30px; }
.pw-ilu img { width: 100%; max-width: 380px; mix-blend-mode: multiply; }
.pw-corpo { padding: 34px 34px 28px; display: grid; gap: 14px; align-content: start; }
.pw-corpo h1 { font-size: clamp(26px, 3.2vw, 34px); font-weight: 900; letter-spacing: -.02em; line-height: 1.1; }
.pw-lista { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin: 4px 0; }
.pw-lista li { display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: center; }
.pw-lista b { font-size: 14px; font-weight: 800; display: block; } .pw-lista span { font-size: 12.5px; color: var(--tinta2); line-height: 1.35; display: block; }
.pw-preco { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-radius: 22px; background: var(--menta); }
.pw-preco b { font-size: 32px; font-weight: 900; letter-spacing: -.02em; } .pw-preco span { color: var(--tinta2); font-weight: 700; margin-left: 6px; }
.pw-preco em { font-style: normal; font-weight: 900; color: #fff; background: var(--petroleo); padding: 7px 12px; border-radius: 12px; font-size: 13px; }
.pw-mini { font-size: 12.5px; color: var(--tinta2); text-align: center; } .pw-mini a { color: var(--petroleo); font-weight: 800; }
@media (max-width: 760px) {
  .paywall { grid-template-columns: 1fr; } .pw-ilu { padding: 18px; max-height: 220px; } .pw-ilu img { max-width: 200px; }
  .pw-corpo { padding: 22px 20px; } .pw-lista { grid-template-columns: 1fr; }
  .convite { grid-template-columns: 52px 1fr; } .convite .botoes { grid-column: 1 / -1; } .convite-ilu img { width: 52px; height: 52px; }
}

/* Seletor de dia (1 a 31) */
.dias { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.dias button { aspect-ratio: 1; border-radius: 12px; background: rgba(255,255,255,.75); font-weight: 800; font-size: 14px; color: var(--tinta2); transition: all .25s var(--ease); box-shadow: inset 0 0 0 1px rgba(28,34,48,.06); }
.dias button:hover { background: #fff; color: var(--tinta); }
.dias button.sel { background: var(--petroleo); color: #fff; box-shadow: 0 8px 16px -8px rgba(47,148,97,.9); transform: scale(1.06); }

/* Nível ao lado do nome */
.nome-linha { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.nivel-chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px; border-radius: 22px; background: var(--vidro-forte); border: 1px solid var(--borda); box-shadow: var(--sombra-leve); transition: transform .3s var(--ease); }
.nivel-chip:hover { transform: translateY(-2px); }
.nivel-chip > img { width: 34px; height: 34px; object-fit: contain; }
.nc-txt { display: grid; text-align: left; line-height: 1.1; min-width: 92px; }
.nc-txt b { font-size: 13.5px; font-weight: 900; } .nc-txt small { font-size: 11px; color: var(--tinta2); font-weight: 700; }
.nc-barra { display: block; height: 5px; border-radius: 4px; background: rgba(28,34,48,.08); margin-top: 4px; overflow: hidden; }
.nc-barra em { display: block; height: 100%; background: linear-gradient(90deg, #6CC3BE, #F2C46D); border-radius: 4px; }
.nc-fogo { display: inline-flex; align-items: center; gap: 2px; font-weight: 900; font-size: 13px; padding-left: 8px; border-left: 1px solid var(--linha); }
.nc-fogo img { width: 20px; height: 20px; object-fit: contain; }
/* Treinador (próximo passo) */
.treinador { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 14px 18px; background: linear-gradient(100deg, var(--menta), rgba(255,255,255,.85)); }
.tr-porco { width: 64px; height: 64px; object-fit: contain; animation: flutua 4s ease-in-out infinite; filter: drop-shadow(0 8px 8px rgba(47,148,97,.25)); }
.tr-bolha { position: relative; background: #fff; border-radius: 18px; padding: 10px 14px; box-shadow: var(--sombra-leve); min-height: 62px; }
.tr-bolha::before { content: ''; position: absolute; left: -7px; top: 22px; width: 14px; height: 14px; background: #fff; transform: rotate(45deg); border-radius: 3px; }
.tr-bolha small { display: block; font-size: 11px; font-weight: 800; color: var(--petroleo); text-transform: uppercase; letter-spacing: .05em; }
.tr-bolha b { display: block; font-size: 14.5px; font-weight: 900; margin-top: 2px; }
.tr-bolha b span { display: block; font-weight: 600; color: var(--tinta2); font-size: 13px; margin-top: 2px; }
.tr-bolha.troca { animation: troca .55s var(--ease); }
@keyframes troca { from { opacity: 0; transform: translateY(8px); } }
@media (max-width: 560px) {
  .treinador { grid-template-columns: 52px 1fr; } .tr-porco { width: 52px; height: 52px; } .treinador .btn { grid-column: 1 / -1; }
  .nivel-chip > img { width: 28px; height: 28px; } .nc-txt { min-width: 80px; }
}

/* Responsivo */
@media (max-width: 1180px) {
  .c8, .c7, .c6, .c5, .c4 { grid-column: span 12; }
  .c3 { grid-column: span 6; }
  .missoes-linha { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; padding: 0; gap: 0; }
  .sidebar { position: fixed; top: auto; bottom: 10px; left: 10px; right: 10px; height: auto; padding: 8px 8px calc(8px + env(safe-area-inset-bottom) / 2); flex-direction: row; border-radius: 26px; z-index: 40; }
  .marca, .perfil, .sidebar-nivel, .so-desktop { display: none !important; }
  .so-mobile { display: grid !important; }
  .nav { flex-direction: row; width: 100%; justify-content: space-around; align-items: center; }
  .nav button { flex-direction: column; gap: 4px; padding: 7px 8px; font-size: 11px; border-radius: 14px; }
  .nav button.ativo { box-shadow: none; }
  .nav .nav-fab { width: 56px; height: 56px; border-radius: 50%; margin: -30px 0 0; padding: 0; justify-content: center; box-shadow: 0 12px 24px -8px rgba(47,116,128,.8), 0 0 0 5px var(--bg); }
  .nav .nav-fab b { display: none; }
  .nav .nav-fab svg { width: 26px; height: 26px; }
  .main { padding: 18px 16px 120px; }
  .banner { grid-template-columns: 1fr; }
  .banner-ilu { min-height: 190px; order: -1; }
  .banner-ilu img { -webkit-mask-image: linear-gradient(0deg, transparent 0%, #000 30%); mask-image: linear-gradient(0deg, transparent 0%, #000 30%); object-position: 70% 40%; }
  .banner-txt { padding: 6px 22px 24px; }
}
@media (max-width: 560px) {
  .stat { grid-template-columns: 1fr; gap: 6px; padding: 16px; position: relative; }
  .stat > img { position: absolute; right: 8px; top: 10px; width: 62px; height: 62px; }
  .stat > div:last-child { padding-top: 56px; }
  .topbar { flex-wrap: wrap; }
  .top-acoes { order: -1; width: 100%; justify-content: flex-end; }
  .logo-mini { margin-right: auto; display: flex !important; }
  .xp-chip { display: none; }
  .xp-chip img { width: 24px; height: 24px; }
  .icone-btn { width: 44px; height: 44px; }
  .grid { gap: 14px; }
  .c3 { grid-column: span 6; }
  .stat { padding: 16px; }
  .stat .tile { width: 46px; height: 46px; }
  .rosca-wrap { grid-template-columns: 1fr; justify-items: center; }
  .legenda { width: 100%; }
  .fluxo { grid-template-columns: 96px 36px 1fr; min-height: 300px; }
  .fluxo-fonte { padding: 12px; } .fluxo-fonte b { font-size: 16px; }
  .fluxo-destinos div { font-size: 12px; padding: 8px 10px; }
  .card { padding: 18px; border-radius: 22px; }
  .card.banner { padding: 0; }
  .banner-ilu { min-height: 170px; }
  .banner-txt .botoes .btn { flex: 1; padding: 13px 10px; white-space: nowrap; font-size: 14px; }
  .metas-op { grid-template-columns: repeat(2, 1fr); }
  .missoes-linha { grid-template-columns: 1fr; gap: 16px; }
  .plano-ilu { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
