:root {
  --bg: #0a0d12;
  --bg2: #0f141b;
  --card: #131a23;
  --card2: #18212c;
  --line: #222d3a;
  --line2: #2c3a4a;
  --txt: #e8eef5;
  --txt2: #9fb0c3;
  --txt3: #6b7d91;
  --lime: #a3e635;
  --lime-d: #84cc16;
  --cyan: #22d3ee;
  --amber: #fbbf24;
  --red: #f87171;
  --violet: #a78bfa;
  --grad: linear-gradient(135deg, var(--lime), var(--cyan));
  --r: 16px;
  --r-sm: 11px;
  --nav-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--txt); }
body {
  font: 15px/1.45 Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  min-height: 100dvh;
  background:
    radial-gradient(1200px 500px at 110% -10%, rgba(34, 211, 238, .08), transparent 60%),
    radial-gradient(900px 400px at -20% -10%, rgba(163, 230, 53, .07), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--cyan); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: 24px; font-weight: 800; }
h2 { font-size: 18px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; }
.hidden { display: none !important; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--txt2); }
.dim { color: var(--txt3); }
.small { font-size: 13px; }
.tiny { font-size: 11.5px; }
.grad-txt { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.col { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 14px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Layout ---------- */
.shell { display: flex; min-height: 100dvh; }
.side {
  display: none; width: 240px; flex-shrink: 0; padding: 22px 14px; border-right: 1px solid var(--line);
  position: sticky; top: 0; height: 100dvh; background: rgba(10, 13, 18, .6); backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; padding: 0 8px 22px; }
.brand img { width: 34px; height: 34px; border-radius: 10px; }
.side a {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; color: var(--txt2); font-weight: 600; margin-bottom: 2px;
}
.side a:hover { background: var(--card); color: var(--txt); }
.side a.on { background: var(--card2); color: var(--txt); box-shadow: inset 3px 0 0 var(--lime); }
.main { flex: 1; min-width: 0; padding: 16px 16px calc(var(--nav-h) + var(--safe-b) + 24px); max-width: 980px; margin: 0 auto; width: 100%; }
.main.com-timer { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 110px); }
.topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 0 18px; padding-top: env(safe-area-inset-top, 0px); }
.topo .sub { color: var(--txt2); font-size: 13px; margin-top: 3px; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; background: var(--grad); color: #0a0d12; display: grid; place-items: center;
  font-weight: 800; font-size: 16px; flex-shrink: 0; border: 0; cursor: pointer;
}
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: grid; grid-template-columns: repeat(5, 1fr); background: rgba(12, 16, 22, .88); backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--txt3); font-size: 11px; font-weight: 600; }
.nav a.on { color: var(--lime); }
.nav a.on svg { filter: drop-shadow(0 0 8px rgba(163, 230, 53, .5)); }
.ico { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.ico.sm { width: 18px; height: 18px; }
.ico.xs { width: 15px; height: 15px; }
@media (min-width: 900px) {
  .side { display: block; }
  .nav { display: none; }
  .main { padding: 28px 32px 60px; }
  .main.com-timer { padding-bottom: 130px; }
  .timer { left: calc(240px + 24px) !important; }
}

/* ---------- Cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.card.pad-sm { padding: 12px; }
.card.hl { border-color: transparent; background: linear-gradient(var(--card), var(--card)) padding-box, var(--grad) border-box; border: 1px solid transparent; }
.card-t { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-t h2, .card-t h3 { display: flex; align-items: center; gap: 8px; }
.sec-t { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--txt3); margin: 22px 2px 10px; }
.stat { background: var(--card2); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.stat .k { font-size: 11.5px; color: var(--txt3); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.stat .v { font-size: 22px; font-weight: 800; margin-top: 3px; font-family: var(--mono); letter-spacing: -.02em; }
.stat .v small { font-size: 12px; color: var(--txt2); font-weight: 500; font-family: Inter, sans-serif; }
.stat .d { font-size: 12px; margin-top: 2px; }
.up { color: var(--lime); } .down { color: var(--red); } .warn { color: var(--amber); }

.pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
  background: var(--card2); border: 1px solid var(--line2); color: var(--txt2); white-space: nowrap;
}
.pill.lime { background: rgba(163, 230, 53, .12); border-color: rgba(163, 230, 53, .35); color: var(--lime); }
.pill.cyan { background: rgba(34, 211, 238, .12); border-color: rgba(34, 211, 238, .35); color: var(--cyan); }
.pill.amber { background: rgba(251, 191, 36, .12); border-color: rgba(251, 191, 36, .35); color: var(--amber); }
.pill.red { background: rgba(248, 113, 113, .12); border-color: rgba(248, 113, 113, .35); color: var(--red); }
.pill.violet { background: rgba(167, 139, 250, .12); border-color: rgba(167, 139, 250, .35); color: var(--violet); }

/* ---------- Botões e campos ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 13px;
  border: 1px solid var(--line2); background: var(--card2); color: var(--txt); font-weight: 700; cursor: pointer; transition: transform .08s, background .15s, opacity .15s;
  user-select: none; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: #1e2936; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn.pri { background: var(--grad); color: #071016; border: 0; box-shadow: 0 6px 24px -8px rgba(163, 230, 53, .55); }
.btn.pri:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--txt2); }
.btn.ghost:hover { background: var(--card2); color: var(--txt); }
.btn.danger { color: var(--red); border-color: rgba(248, 113, 113, .35); background: rgba(248, 113, 113, .06); }
.btn.sm { min-height: 36px; padding: 0 12px; border-radius: 10px; font-size: 13px; }
.btn.lg { min-height: 56px; font-size: 16px; border-radius: 15px; }
.btn.block { width: 100%; }
.btn.icon { width: 42px; min-width: 42px; padding: 0; }
.btn.icon.sm { width: 36px; min-width: 36px; }
label.lbl { display: block; font-size: 12.5px; font-weight: 600; color: var(--txt2); margin: 0 0 6px 2px; }
.inp {
  width: 100%; min-height: 46px; padding: 0 14px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line2); outline: none;
  transition: border-color .15s, box-shadow .15s; font-size: 16px;
}
textarea.inp { padding: 12px 14px; min-height: 80px; resize: vertical; }
.inp:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 211, 238, .15); }
.inp::placeholder { color: var(--txt3); }
.campo { margin-bottom: 14px; }
.senha-box { position: relative; }
.senha-box .inp { padding-right: 52px; }
.olho { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--txt3); display: grid; place-items: center; cursor: pointer; }
.olho:hover, .olho[aria-pressed="true"] { color: var(--cyan); }
.caixa { width: 20px; height: 20px; accent-color: var(--lime); margin: 0; flex-shrink: 0; }
.switch { position: relative; width: 48px; height: 28px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--line2); cursor: pointer; transition: .2s; }
.switch span::after { content: ''; position: absolute; width: 22px; height: 22px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: .2s; }
.switch input:checked + span { background: var(--lime-d); }
.switch input:checked + span::after { transform: translateX(20px); }
.seg { display: flex; background: var(--bg2); border: 1px solid var(--line); border-radius: 13px; padding: 4px; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: 1; min-height: 38px; padding: 0 12px; border-radius: 10px; border: 0; background: transparent; color: var(--txt2); font-weight: 700; cursor: pointer; white-space: nowrap; }
.seg button.on { background: var(--card2); color: var(--txt); box-shadow: 0 1px 0 var(--line2) inset; }

/* ---------- Login ---------- */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.login .box { width: 100%; max-width: 380px; }
.login .logo { width: 72px; height: 72px; border-radius: 20px; margin: 0 auto 18px; display: block; box-shadow: 0 10px 40px -10px rgba(34, 211, 238, .5); }
.login h1 { text-align: center; font-size: 26px; }
.login p.sub { text-align: center; color: var(--txt2); margin: 6px 0 26px; }
.erro { background: rgba(248, 113, 113, .1); border: 1px solid rgba(248, 113, 113, .3); color: #fecaca; padding: 10px 12px; border-radius: 11px; font-size: 13.5px; margin-bottom: 14px; }
.codigo-inp { text-align: center; font-family: var(--mono); font-size: 26px; letter-spacing: .4em; min-height: 58px; }

/* ---------- Dashboard ---------- */
.hero { position: relative; overflow: hidden; }
.hero::after { content: ''; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(163, 230, 53, .18), transparent 65%); pointer-events: none; }
.hero .letra {
  width: 58px; height: 58px; border-radius: 16px; background: var(--grad); color: #071016; display: grid; place-items: center;
  font-size: 28px; font-weight: 800; flex-shrink: 0;
}
.semana-bar { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; margin-top: 12px; }
.semana-bar i { height: 8px; border-radius: 4px; background: var(--line); }
.semana-bar i.feito { background: rgba(163, 230, 53, .45); }
.semana-bar i.atual { background: var(--grad); box-shadow: 0 0 10px rgba(163, 230, 53, .6); }
.semana-bar i.deload { outline: 1px dashed var(--amber); outline-offset: 1px; }
.dias { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.dia { text-align: center; padding: 9px 2px; border-radius: 12px; background: var(--card2); border: 1px solid var(--line); font-size: 11px; color: var(--txt3); }
.dia b { display: block; font-size: 16px; color: var(--txt); margin-top: 2px; }
.dia.hoje { border-color: var(--cyan); }
.dia.ok { background: rgba(163, 230, 53, .12); border-color: rgba(163, 230, 53, .4); }
.dia.ok b { color: var(--lime); }
.heat { display: grid; grid-template-rows: repeat(7, 1fr); grid-auto-flow: column; gap: 3px; }
.heat i { width: 100%; aspect-ratio: 1; border-radius: 3px; background: var(--line); }
.heat i.l1 { background: rgba(163, 230, 53, .3); } .heat i.l2 { background: rgba(163, 230, 53, .6); } .heat i.l3 { background: var(--lime); }
.meta-linha { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.meta-linha:last-child { border-bottom: 0; }
.bar { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--grad); border-radius: 99px; transition: width .4s; }
.bar.amber > i { background: var(--amber); }
.chart-box { position: relative; height: 210px; }
.alerta { display: flex; gap: 10px; padding: 12px 14px; border-radius: 13px; font-size: 13.5px; align-items: flex-start; }
.alerta.ok { background: rgba(163, 230, 53, .08); border: 1px solid rgba(163, 230, 53, .25); }
.alerta.aviso { background: rgba(251, 191, 36, .08); border: 1px solid rgba(251, 191, 36, .3); }
.alerta.alerta { background: rgba(248, 113, 113, .08); border: 1px solid rgba(248, 113, 113, .3); }
.alerta.info { background: rgba(34, 211, 238, .07); border: 1px solid rgba(34, 211, 238, .25); }

/* ---------- Hábitos ---------- */
.habitos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 640px) { .habitos { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.hab {
  display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: var(--card2); border: 1px solid var(--line);
  cursor: pointer; text-align: left; min-height: 62px; transition: background .15s, border-color .15s; width: 100%;
}
.hab .chk { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--line2); display: grid; place-items: center; flex-shrink: 0; transition: .15s; }
.hab.ok { background: rgba(163, 230, 53, .1); border-color: rgba(163, 230, 53, .4); }
.hab.ok .chk { background: var(--lime); border-color: var(--lime); color: #071016; }
.hab .t { font-weight: 700; font-size: 13.5px; }
.hab .s { font-size: 11.5px; color: var(--txt3); }

/* ---------- Treino ---------- */
.treino-lista { display: grid; gap: 10px; }
@media (min-width: 700px) { .treino-lista { grid-template-columns: 1fr 1fr; } }
.treino-item { display: flex; gap: 14px; align-items: center; cursor: pointer; transition: border-color .15s, transform .1s; }
.treino-item:hover { border-color: var(--line2); }
.treino-item:active { transform: scale(.99); }
.treino-item .letra { width: 50px; height: 50px; border-radius: 14px; background: var(--card2); border: 1px solid var(--line2); display: grid; place-items: center; font-size: 22px; font-weight: 800; flex-shrink: 0; }
.treino-item.hoje .letra { background: var(--grad); color: #071016; border: 0; }

.anim { position: relative; background: #fff; overflow: hidden; border-radius: 12px; flex-shrink: 0; }
.anim img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.anim img + img { animation: alterna 1.6s steps(1) infinite; }
.anim.contain img { object-fit: contain; }
@keyframes alterna { 0% { opacity: 0; } 50% { opacity: 1; } }
.anim.parado img + img { animation: none; opacity: 0; }
.thumb { width: 64px; height: 64px; }

.ex { padding: 0; overflow: hidden; transition: border-color .2s; }
.ex.feito { border-color: rgba(163, 230, 53, .45); }
.ex.feito .ex-h { background: rgba(163, 230, 53, .05); }
.ex-h { display: flex; gap: 12px; padding: 12px; align-items: flex-start; cursor: pointer; }
.ex-h .num { font-size: 11px; font-weight: 800; color: var(--txt3); }
.ex-h h3 { font-size: 15px; margin: 2px 0 4px; }
.ex-meta { display: flex; flex-wrap: wrap; gap: 5px; }
.ex-body { padding: 0 12px 12px; }
.ex-ult { font-size: 12.5px; color: var(--txt2); background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin-bottom: 10px; }
.series { display: grid; gap: 7px; }
.serie {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) minmax(0, 1fr) 58px; gap: 7px; align-items: center;
}
.serie .n { font-family: var(--mono); font-weight: 700; color: var(--txt3); text-align: center; font-size: 14px; }
.serie .inp { min-height: 50px; text-align: center; font-family: var(--mono); font-size: 18px; font-weight: 700; padding: 0 6px; }
.serie .inp::placeholder { font-weight: 500; font-size: 15px; }
.serie-cab { display: grid; grid-template-columns: 34px minmax(0, 1fr) minmax(0, 1fr) 58px; gap: 7px; font-size: 11px; color: var(--txt3); font-weight: 700; text-transform: uppercase; text-align: center; letter-spacing: .05em; }
.check {
  height: 50px; border-radius: 12px; border: 2px solid var(--line2); background: var(--bg2); display: grid; place-items: center; cursor: pointer; transition: .15s; color: var(--txt3);
}
.check:active { transform: scale(.94); }
.check.on { background: var(--lime); border-color: var(--lime); color: #071016; box-shadow: 0 0 18px -4px rgba(163, 230, 53, .7); }
.serie.on .inp { border-color: rgba(163, 230, 53, .4); color: var(--lime); }
.ex-acoes { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.prog { height: 4px; background: var(--line); }
.prog > i { display: block; height: 100%; background: var(--grad); transition: width .3s; }
.sessao-top {
  position: sticky; top: 0; z-index: 20; margin: -16px -16px 14px; padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px;
  background: rgba(10, 13, 18, .9); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
}
@media (min-width: 900px) { .sessao-top { margin: -28px -32px 18px; padding: 16px 32px; } }
.relogio { font-family: var(--mono); font-weight: 700; font-size: 15px; color: var(--cyan); }

/* ---------- Timer ---------- */
.timer {
  position: fixed; left: 12px; right: 12px; bottom: calc(var(--nav-h) + var(--safe-b) + 10px); z-index: 45; max-width: 680px; margin: 0 auto;
  background: rgba(19, 26, 35, .96); backdrop-filter: blur(16px); border: 1px solid var(--line2); border-radius: 20px; padding: 12px 14px;
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .7); display: flex; align-items: center; gap: 12px;
}
.timer .ring { width: 62px; height: 62px; flex-shrink: 0; position: relative; }
.timer .ring svg { transform: rotate(-90deg); }
.timer .ring .t { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--mono); font-weight: 700; font-size: 15px; }
.timer.fim { border-color: var(--lime); animation: pulsa 1s infinite; }
@keyframes pulsa { 50% { box-shadow: 0 0 0 6px rgba(163, 230, 53, .25), 0 20px 50px -10px rgba(0, 0, 0, .7); } }

/* ---------- Dieta ---------- */
.refeicao { padding: 0; overflow: hidden; }
.ref-h { display: flex; align-items: center; gap: 12px; padding: 14px; }
.ref-h .hora { font-family: var(--mono); font-weight: 700; font-size: 15px; color: var(--cyan); min-width: 50px; }
.ref-check { width: 40px; height: 40px; border-radius: 12px; border: 2px solid var(--line2); display: grid; place-items: center; cursor: pointer; background: var(--bg2); flex-shrink: 0; color: transparent; }
.refeicao.ok { border-color: rgba(163, 230, 53, .4); }
.refeicao.ok .ref-check { background: var(--lime); border-color: var(--lime); color: #071016; }
.refeicao.ok .ref-nome { text-decoration: line-through; text-decoration-color: var(--txt3); }
.ref-itens { padding: 0 14px 14px 76px; margin: 0; list-style: none; color: var(--txt2); font-size: 13.5px; }
.ref-itens li { padding: 3px 0 3px 14px; position: relative; }
.ref-itens li::before { content: ''; position: absolute; left: 0; top: 11px; width: 5px; height: 5px; border-radius: 50%; background: var(--line2); }
.proxima { box-shadow: inset 3px 0 0 var(--cyan); }
.agua-copos { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.copo { width: 28px; height: 36px; border-radius: 4px 4px 8px 8px; border: 2px solid var(--line2); position: relative; overflow: hidden; }
.copo.cheio { border-color: var(--cyan); background: linear-gradient(transparent 25%, rgba(34, 211, 238, .55) 25%); }
.ring-big { width: 120px; height: 120px; position: relative; flex-shrink: 0; }
.ring-big svg { transform: rotate(-90deg); }
.ring-big .c { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.tabela { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tabela th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--txt3); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tabela td { padding: 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tabela tr:last-child td { border-bottom: 0; }
.scroll-x { overflow-x: auto; margin: 0 -16px; padding: 0 16px; }

/* ---------- Fotos ---------- */
.fotos-cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.foto { aspect-ratio: 3/4; border-radius: 12px; overflow: hidden; background: var(--bg2); border: 1px solid var(--line); position: relative; display: grid; place-items: center; color: var(--txt3); font-size: 12px; }
.foto img { width: 100%; height: 100%; object-fit: cover; }
.foto .tag { position: absolute; left: 6px; bottom: 6px; background: rgba(0, 0, 0, .65); padding: 2px 8px; border-radius: 99px; font-size: 11px; color: #fff; }
.galeria { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
@media (min-width: 640px) { .galeria { grid-template-columns: repeat(5, 1fr); } }

/* ---------- Modal ---------- */
.modal-bg { position: fixed; inset: 0; z-index: 60; background: rgba(3, 5, 8, .7); backdrop-filter: blur(4px); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.modal {
  width: 100%; max-width: 620px; max-height: 92dvh; background: var(--bg2); border: 1px solid var(--line2); border-bottom: 0;
  border-radius: 22px 22px 0 0; display: flex; flex-direction: column; animation: sobe .22s cubic-bezier(.2, .9, .3, 1);
  padding-bottom: var(--safe-b);
}
.modal-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 16px 10px; }
.modal-c { padding: 4px 16px 18px; overflow-y: auto; overscroll-behavior: contain; }
.modal-f { padding: 12px 16px 16px; border-top: 1px solid var(--line); display: flex; gap: 8px; }
@media (min-width: 700px) {
  .modal-bg { align-items: center; padding: 24px; }
  .modal { border-radius: 22px; border-bottom: 1px solid var(--line2); }
}
@keyframes sobe { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.cat-item { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: 12px; cursor: pointer; border: 1px solid transparent; width: 100%; background: none; text-align: left; }
.cat-item:hover { background: var(--card); border-color: var(--line); }
.cat-item .anim { width: 54px; height: 54px; border-radius: 10px; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; padding: 7px 13px; border-radius: 99px; border: 1px solid var(--line2); background: var(--card); color: var(--txt2); font-weight: 600; font-size: 13px; cursor: pointer; }
.chip.on { background: var(--txt); color: var(--bg); border-color: var(--txt); }
.ex-grande { width: 100%; aspect-ratio: 4/3; border-radius: 16px; }
.passos { margin: 0; padding-left: 20px; color: var(--txt2); font-size: 14px; }
.passos li { margin-bottom: 7px; }

/* ---------- Toast / splash ---------- */
.toasts { position: fixed; top: calc(12px + env(safe-area-inset-top, 0px)); left: 0; right: 0; z-index: 80; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { background: var(--card2); border: 1px solid var(--line2); padding: 11px 16px; border-radius: 13px; font-weight: 600; font-size: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); animation: sobe .2s; max-width: 420px; }
.toast.ok { border-color: rgba(163, 230, 53, .5); }
.toast.erro { border-color: rgba(248, 113, 113, .5); }
.splash { min-height: 100dvh; display: grid; place-items: center; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line2); border-top-color: var(--lime); animation: gira .8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }
.vazio { text-align: center; padding: 26px 10px; color: var(--txt3); }
.confete { font-size: 54px; text-align: center; animation: pop .5s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes pop { from { transform: scale(.3); opacity: 0; } }
details.acc { border-top: 1px solid var(--line); }
details.acc summary { cursor: pointer; padding: 12px 0; font-weight: 700; list-style: none; display: flex; justify-content: space-between; align-items: center; }
details.acc summary::-webkit-details-marker { display: none; }
details.acc[open] summary .ico { transform: rotate(180deg); }
.qr { background: #fff; padding: 10px; border-radius: 14px; width: 200px; height: 200px; margin: 0 auto; display: block; }
