/* =====================================================================
   Zela — estilo do app do colaborador. Mobile-first, modo escuro,
   respeita prefers-reduced-motion. Sem fontes externas (CSP).
   ===================================================================== */
:root {
  --noite: #0F1B2D; --noite-2: #16263D; --noite-3: #1F3352;
  --laranja: #FF7A1A; --laranja-esc: #E5630A; --laranja-claro: #FFF1E6;
  --verde: #1DB980; --verde-claro: #E3F7EF;
  --vermelho: #E5383B; --vermelho-claro: #FDECEC;
  --amarelo: #FFC21A; --azul: #2E8BFF; --azul-claro: #E8F2FF;
  --fundo: #F3F5F9; --superficie: #FFFFFF; --superficie-2: #F7F9FC;
  --texto: #0F1B2D; --texto-2: #5B6B82; --borda: #E2E7EF;
  --sombra: 0 1px 2px rgba(15,27,45,.06), 0 8px 24px rgba(15,27,45,.08);
  --raio: 18px; --raio-p: 12px;
  --fonte: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  --mola: cubic-bezier(.34, 1.56, .64, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fundo: #0A1320; --superficie: #13223A; --superficie-2: #182A45;
    --texto: #E8EDF5; --texto-2: #9AA8BD; --borda: #24385A;
    --laranja-claro: #3A2614; --verde-claro: #12352A; --vermelho-claro: #3A1A1D; --azul-claro: #14294A;
    --sombra: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.3);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; background: var(--fundo); color: var(--texto);
  font: 16px/1.45 var(--fonte); -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
#app { max-width: 520px; margin: 0 auto; min-height: 100dvh; outline: none; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }
p { margin: 0 0 .75em; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
.ico { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 2;
       stroke-linecap: round; stroke-linejoin: round; vertical-align: -.25em; }
.suave { color: var(--texto-2); }
.pequeno { font-size: .875rem; }
.centro { text-align: center; }
.mono { font-family: var(--mono); letter-spacing: .02em; }
.quebra { white-space: pre-wrap; overflow-wrap: anywhere; }
.oculto { display: none !important; }
.txt-risco { color: var(--vermelho); font-weight: 700; }
small { font-size: .8rem; }
:focus-visible { outline: 3px solid var(--laranja); outline-offset: 2px; border-radius: 6px; }

/* ---------- telas ---------- */
.tela { padding: 16px 16px calc(110px + env(safe-area-inset-bottom)); animation: tela-entra .35s ease backwards; }
.tela.novo { padding-bottom: 0; }
.tela.centro { min-height: 80dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; }
@keyframes tela-entra { from { opacity: 0; transform: translateY(8px); } }

.cartao { background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--raio);
          padding: 18px; box-shadow: var(--sombra); margin-bottom: 14px; }
.cartao h2 { display: flex; align-items: center; gap: 8px; }

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border: 0; border-radius: 14px; cursor: pointer;
  background: var(--laranja); color: #fff; font-weight: 700; text-decoration: none;
  box-shadow: 0 6px 16px rgba(255,122,26,.35); transition: transform .15s var(--mola), box-shadow .2s, opacity .2s;
}
.btn:active:not(:disabled) { transform: scale(.96); }
.btn:disabled { opacity: .45; box-shadow: none; cursor: not-allowed; }
.btn.grande { width: 100%; min-height: 54px; font-size: 1.05rem; }
.btn.sec { background: var(--superficie-2); color: var(--texto); border: 1px solid var(--borda); box-shadow: none; }
.btn.claro { background: #fff; color: var(--noite); }
.btn.mini { min-height: 36px; padding: 0 12px; font-size: .85rem; border-radius: 10px; white-space: nowrap; }
.btn.carregando { color: transparent; position: relative; pointer-events: none; }
.btn.carregando::after { content: ""; position: absolute; width: 22px; height: 22px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.4); border-top-color: #fff; animation: girar .7s linear infinite; }
.link { background: none; border: 0; padding: 10px 4px; color: var(--laranja-esc); font-weight: 600; cursor: pointer;
        display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
@media (prefers-color-scheme: dark) { .link { color: var(--laranja); } }
.icone-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 50%; flex: none;
  border: 1px solid var(--borda); background: var(--superficie); cursor: pointer; text-decoration: none; transition: transform .15s var(--mola); }
.icone-btn:active { transform: scale(.9); }
.icone-btn.primario { background: var(--laranja); color: #fff; border: 0; }

/* ---------- campos ---------- */
.campo { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.rotulo { font-weight: 600; font-size: .9rem; }
.dica { color: var(--texto-2); font-size: .78rem; }
input:not([type=checkbox]):not([type=range]):not([type=file]), textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: var(--raio-p);
  border: 1.5px solid var(--borda); background: var(--superficie-2); transition: border-color .2s, box-shadow .2s;
}
textarea { resize: vertical; min-height: 120px; line-height: 1.45; }
input:focus, textarea:focus { outline: none; border-color: var(--laranja); box-shadow: 0 0 0 4px rgba(255,122,26,.18); }
input.pin { font-size: 1.5rem; letter-spacing: .5em; text-align: center; font-family: var(--mono); }
.duas { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; font-weight: 600; }
.check input { width: 22px; height: 22px; accent-color: var(--laranja); flex: none; margin-top: 2px; }
.erro { color: var(--vermelho); font-weight: 600; min-height: 1.2em; margin: 8px 0 0; text-align: center; }
.erro:empty { display: none; }
.campo-ico { position: relative; }
.campo-ico > .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--texto-2); }
.campo-ico input { padding-left: 44px !important; }

/* ---------- avisos ---------- */
.aviso { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--raio-p);
         background: var(--superficie-2); margin: 10px 0; font-size: .92rem; }
.aviso > .ico { margin-top: 2px; }
.aviso.info { background: var(--azul-claro); }
.aviso.info > .ico { color: var(--azul); }
.aviso.perigo { background: var(--vermelho-claro); color: var(--texto); border: 1px solid rgba(229,56,59,.35); }
.aviso.perigo > .ico { color: var(--vermelho); }

/* ---------- chips ---------- */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 99px; font-size: .75rem;
        font-weight: 700; white-space: nowrap; background: var(--superficie-2); border: 1px solid var(--borda); }
.st-aberto { background: var(--laranja-claro); color: var(--laranja-esc); border-color: transparent; }
.st-andamento { background: var(--azul-claro); color: var(--azul); border-color: transparent; }
.st-aguardando { background: #FFF6DB; color: #9A6B00; border-color: transparent; }
.st-concluido { background: var(--verde); color: #fff; border-color: transparent; animation: pulsar 2s ease-in-out infinite; }
.st-fechado { background: var(--verde-claro); color: #12895F; border-color: transparent; }
.st-cancelado { color: var(--texto-2); }
.chip.risco { background: var(--vermelho); color: #fff; border-color: transparent; }
.chip .ico { width: 1em; height: 1em; }
@media (prefers-color-scheme: dark) {
  .st-aberto { color: #FFB27A; } .st-aguardando { background: #3A3010; color: #FFD15C; } .st-fechado { color: #5FE0B0; }
}
@keyframes pulsar { 50% { box-shadow: 0 0 0 6px rgba(29,185,128,.18); } }

/* ---------- mascote ---------- */
.mascote { width: 72px; height: auto; aspect-ratio: 200 / 220; flex: none; overflow: visible; }
.mascote.m-pequeno { width: 54px; }
.mascote.m-media { width: 80px; }
.mascote.m-grande { width: 140px; }
.mascote .m-corpo, .mascote .m-capacete { animation: flutuar 3.2s ease-in-out infinite; transform-origin: 100px 200px; }
.mascote .m-braco { transform-origin: 146px 150px; }
.mascote.humor-oi .m-braco { animation: acenar 1.6s ease-in-out 2; }
.mascote .m-olho { animation: piscar 4.5s infinite; transform-origin: center; transform-box: fill-box; }
.mascote.pular .m-corpo, .mascote.pular .m-capacete { animation: pular .7s var(--mola) 3; }
@keyframes flutuar { 50% { transform: translateY(-4px); } }
@keyframes acenar { 25% { transform: rotate(-18deg); } 75% { transform: rotate(10deg); } }
@keyframes piscar { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
@keyframes pular { 40% { transform: translateY(-18px) scale(1.04); } }

.fala { display: flex; align-items: center; gap: 12px; margin: 6px 0 16px; }
.balao { position: relative; margin: 0; background: var(--superficie); border: 1px solid var(--borda); border-radius: 16px;
         padding: 12px 14px; font-weight: 600; box-shadow: var(--sombra); animation: balao .5s var(--mola) both .15s; }
.balao::before { content: ""; position: absolute; left: -7px; top: 50%; width: 12px; height: 12px; background: inherit;
                 border-left: 1px solid var(--borda); border-bottom: 1px solid var(--borda); transform: translateY(-50%) rotate(45deg); }
.fala.compacta .balao { font-size: .9rem; font-weight: 500; }
@keyframes balao { from { opacity: 0; transform: scale(.8) translateX(-10px); } }

/* ---------- entrar ---------- */
.entrar { padding-top: 24px; }
.entrar-hero { text-align: center; display: flex; flex-direction: column; align-items: center; margin-bottom: 18px; }
.marca-tag { color: var(--laranja-esc); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; margin: 8px 0 0; }
.marca { font-size: 3.2rem; font-weight: 900; margin: 0; letter-spacing: -.04em;
         background: linear-gradient(120deg, var(--laranja), #FFB547); -webkit-background-clip: text; background-clip: text; color: transparent; }
.entrar-slogan { color: var(--texto-2); max-width: 22em; }
.segmento { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--superficie-2); border-radius: 14px;
            padding: 4px; margin-bottom: 18px; border: 1px solid var(--borda); }
.segmento:empty { display: none; }
.segmento button { border: 0; background: none; min-height: 42px; border-radius: 11px; font-weight: 700; color: var(--texto-2); cursor: pointer; transition: background .2s, color .2s; }
.segmento button.ativo { background: var(--superficie); color: var(--texto); box-shadow: var(--sombra); }
.entrar-form form { display: flex; flex-direction: column; }
.entrar-form .link { align-self: center; margin-top: 8px; }
.rodape-seg { display: flex; gap: 6px; justify-content: center; align-items: center; color: var(--texto-2); font-size: .8rem; text-align: center; }
.tremer { animation: tremer .45s; }
@keyframes tremer { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.cabeca-simples { display: flex; align-items: center; gap: 12px; margin: 8px 0 16px; }
.cabeca-simples h1 { margin: 0; }
.texto-legal ul { padding-left: 1.2em; } .texto-legal li { margin-bottom: 6px; }

/* ---------- início ---------- */
.topo { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 10px; }
.topo-ola { font-size: 1.5rem; font-weight: 800; margin: 0; }
.topo-nivel { margin: 0; color: var(--texto-2); display: flex; align-items: center; gap: 6px; font-size: .9rem; }
.topo-nivel .ico { color: var(--amarelo); }
.avatar { width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; flex: none;
          background: linear-gradient(135deg, var(--noite-3), var(--noite)); color: #fff; font-weight: 800; font-size: 1.1rem; }
.cta { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 22px; text-decoration: none; color: #fff; margin-bottom: 14px;
       background: linear-gradient(135deg, var(--laranja) 0%, #FF9A3D 100%); box-shadow: 0 12px 28px rgba(255,122,26,.38);
       position: relative; overflow: hidden; transition: transform .2s var(--mola); }
.cta::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
              transform: translateX(-100%); animation: brilho 3.5s ease-in-out infinite 1s; }
.cta:active { transform: scale(.97); }
.cta b { display: block; font-size: 1.2rem; } .cta small { opacity: .92; }
.cta-ico { width: 54px; height: 54px; border-radius: 16px; background: rgba(255,255,255,.22); display: grid; place-items: center; flex: none; }
.cta-ico .ico { width: 28px; height: 28px; }
.cta-seta { margin-left: auto; }
@keyframes brilho { 0% { transform: translateX(-100%); } 40%, 100% { transform: translateX(100%); } }

.placar-topo { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 10px; }
.placar-nivel { display: block; font-size: 1.15rem; }
.placar-pts { text-align: right; } .placar-pts b { font-size: 1.8rem; color: var(--laranja); display: block; line-height: 1; }
.barra { height: 10px; border-radius: 99px; background: var(--superficie-2); border: 1px solid var(--borda); overflow: hidden; margin-bottom: 8px; }
.barra i { display: block; height: 100%; width: var(--p); background: linear-gradient(90deg, var(--laranja), var(--amarelo)); border-radius: inherit;
           animation: encher 1.2s cubic-bezier(.2,.8,.2,1) both .3s; }
@keyframes encher { from { width: 0; } }
.conquistas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.conquista { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; border-radius: 14px; cursor: pointer;
             border: 1px dashed var(--borda); background: none; color: var(--texto-2); text-align: center; line-height: 1.15; }
.conquista small { font-size: .7rem; font-weight: 600; }
.conquista-ico { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--superficie-2); }
.conquista.ganha { border-style: solid; border-color: transparent; background: var(--laranja-claro); color: var(--texto); }
.conquista.ganha .conquista-ico { background: linear-gradient(135deg, var(--amarelo), var(--laranja)); color: #fff; box-shadow: 0 4px 12px rgba(255,122,26,.4); }

.secao-cab { display: flex; justify-content: space-between; align-items: center; margin: 22px 0 10px; }
.secao-cab h2 { margin: 0; }
.subtitulo { color: var(--texto-2); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; margin: 18px 0 8px; }
.lista { display: flex; flex-direction: column; gap: 10px; }
.chamado { display: flex; gap: 12px; align-items: center; padding: 14px; text-decoration: none; background: var(--superficie);
           border: 1px solid var(--borda); border-radius: var(--raio); box-shadow: var(--sombra); position: relative; overflow: hidden;
           transition: transform .15s var(--mola); animation: tela-entra .4s ease both; }
.chamado::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--cor); }
.chamado:active { transform: scale(.98); }
.lista .chamado:nth-child(2) { animation-delay: .05s; } .lista .chamado:nth-child(3) { animation-delay: .1s; }
.lista .chamado:nth-child(4) { animation-delay: .15s; } .lista .chamado:nth-child(n+5) { animation-delay: .2s; }
.chamado-ico { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex: none;
               background: color-mix(in srgb, var(--cor) 18%, transparent); color: var(--cor); }
.chamado-corpo { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chamado-titulo { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chamado-meta { font-size: .8rem; color: var(--texto-2); }
.chamado-lado { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.vazio { text-align: center; padding: 28px 16px; border: 2px dashed var(--borda); border-radius: var(--raio); color: var(--texto-2); }
.vazio > .ico { width: 40px; height: 40px; color: var(--laranja); }

/* ---------- folha (bottom sheet) ---------- */
.folha-fundo { position: fixed; inset: 0; background: rgba(5,10,20,.55); z-index: 50; display: flex; align-items: flex-end; justify-content: center;
               animation: aparecer .2s ease both; backdrop-filter: blur(2px); }
.folha-fundo.sair { animation: sumir .2s ease both; }
.folha { width: 100%; max-width: 520px; max-height: 88dvh; overflow: auto; background: var(--superficie); border-radius: 24px 24px 0 0;
         padding: 10px 18px calc(22px + env(safe-area-inset-bottom)); animation: subir .3s cubic-bezier(.2,.9,.3,1.1) both; }
.folha-fundo.sair .folha { animation: descer .2s ease both; }
.folha-alca { width: 44px; height: 5px; border-radius: 99px; background: var(--borda); margin: 0 auto 14px; }
.folha-titulo { font-size: 1.1rem; }
@keyframes aparecer { from { opacity: 0; } } @keyframes sumir { to { opacity: 0; } }
@keyframes subir { from { transform: translateY(100%); } } @keyframes descer { to { transform: translateY(100%); } }
.lista-itens { display: flex; flex-direction: column; }
.item { display: flex; align-items: center; gap: 12px; padding: 14px 6px; border: 0; border-bottom: 1px solid var(--borda); background: none;
        text-align: left; cursor: pointer; font-weight: 600; }
.item.perigo { color: var(--vermelho); border-bottom: 0; }
.perfil-cab { display: flex; gap: 12px; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--borda); }
.perfil-cab > div:last-child { display: flex; flex-direction: column; }
.dica-ios { display: flex; gap: 10px; padding: 12px 6px; color: var(--texto-2); font-size: .9rem; margin: 0; border-bottom: 1px solid var(--borda); }
.pilha { display: flex; flex-direction: column; gap: 12px; }
.ampliada { width: 100%; border-radius: 14px; }

/* ---------- toasts ---------- */
.toasts { position: fixed; left: 0; right: 0; top: calc(12px + env(safe-area-inset-top)); z-index: 80; display: flex; flex-direction: column;
          align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { display: flex; gap: 10px; align-items: center; max-width: 480px; padding: 12px 16px; border-radius: 14px; background: var(--noite); color: #fff;
         box-shadow: 0 12px 30px rgba(0,0,0,.25); font-weight: 600; font-size: .92rem; animation: toast-in .35s var(--mola) both; }
.toast.ok .ico { color: var(--verde); } .toast.erro { background: var(--vermelho); } .toast.info .ico { color: var(--amarelo); }
.toast.sair { animation: toast-out .4s ease both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-16px) scale(.95); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-16px); } }
.offline { position: sticky; top: 0; z-index: 60; display: flex; gap: 8px; align-items: center; justify-content: center; padding: 8px 12px;
           background: var(--amarelo); color: var(--noite); font-weight: 700; font-size: .85rem; }

/* ---------- confete ---------- */
.confete { position: fixed; inset: 0; pointer-events: none; z-index: 90; overflow: hidden; }
.confete i { position: absolute; top: -20px; left: var(--x); width: 9px; height: 14px; background: var(--c); border-radius: 2px;
             animation: cair var(--t) cubic-bezier(.25,.6,.4,1) var(--d) both; }
.confete i:nth-child(3n) { border-radius: 50%; width: 10px; height: 10px; }
@keyframes cair { to { transform: translate(var(--dx), 105vh) rotate(var(--r)); opacity: .9; } }

/* ---------- novo chamado ---------- */
.novo-cab { display: flex; gap: 12px; align-items: center; margin: 0 -16px 16px; padding: 10px 16px; position: sticky; top: 0; z-index: 10;
            background: color-mix(in srgb, var(--fundo) 88%, transparent); backdrop-filter: blur(10px); }
.novo-cab-meio { flex: 1; min-width: 0; }
.novo-titulo { font-size: 1.25rem; margin: 6px 0 0; }
.detalhe .novo-titulo { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 0; }
.passos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.passos i { height: 5px; border-radius: 99px; background: var(--borda); position: relative; overflow: hidden; }
.passos i::after { content: ""; position: absolute; inset: 0; background: var(--laranja); transform: scaleX(0); transform-origin: left; transition: transform .45s cubic-bezier(.2,.8,.2,1); }
.passos i.feito::after { transform: scaleX(1); }
.passo { display: flex; flex-direction: column; gap: 12px; }
.entra-dir { animation: entra-dir .35s cubic-bezier(.2,.8,.2,1) backwards; }
.entra-esq { animation: entra-esq .35s cubic-bezier(.2,.8,.2,1) backwards; }
@keyframes entra-dir { from { opacity: 0; transform: translateX(40px); } }
@keyframes entra-esq { from { opacity: 0; transform: translateX(-40px); } }
/* Rodapé do passo: fica no fluxo, logo abaixo do conteúdo, e gruda no fim da
   tela quando o conteúdo é maior (sticky). Nunca cobre o que está acima. */
.rodape-fixo { position: sticky; bottom: 0; z-index: 20; margin: 4px -16px 0; padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
               background: linear-gradient(color-mix(in srgb, var(--fundo) 0%, transparent), var(--fundo) 18px); display: flex; justify-content: center; }
.rodape-fixo > * { width: 100%; max-width: 488px; }
.surgir { animation: surgir .4s var(--mola) backwards; }
@keyframes surgir { from { opacity: 0; transform: scale(.9); } }

.fotos-grade { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.foto { position: relative; aspect-ratio: 1; border-radius: var(--raio); overflow: hidden; background: var(--superficie-2); border: 1px solid var(--borda); }
.foto img { width: 100%; height: 100%; object-fit: cover; }
.foto.processando { display: grid; place-items: center; }
.foto-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; cursor: pointer; font-weight: 700;
            border: 2px dashed var(--laranja); background: var(--laranja-claro); color: var(--laranja-esc); }
.foto-add .ico { width: 36px; height: 36px; animation: flutuar 2.4s ease-in-out infinite; }
.fotos-grade .foto-add:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.foto-x { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(15,27,45,.7);
          color: #fff; display: grid; place-items: center; cursor: pointer; }
.giro { width: 34px; height: 34px; border-radius: 50%; border: 3.5px solid var(--borda); border-top-color: var(--laranja); animation: girar .8s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }

.busca { display: flex; flex-direction: column; gap: 10px; }
.sugestoes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sugestoes button { width: 100%; display: flex; gap: 10px; align-items: center; text-align: left; padding: 12px 14px; border-radius: var(--raio-p);
                    border: 1px solid var(--borda); background: var(--superficie); cursor: pointer; animation: surgir .25s ease both; }
.sugestoes .ico { color: var(--laranja); }
.novo-local button { border-style: dashed; }
.locais-prontos { display: flex; flex-direction: column; gap: 12px; }
.rotulo-grupo { display: block; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .72rem; margin-bottom: 6px; }
.chips-locais { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-local { cursor: pointer; padding: 9px 12px; font-size: .85rem; font-weight: 600; background: var(--superficie); white-space: normal; text-align: left; }
.chip-local .ico { color: var(--laranja); }
.local-escolhido { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: var(--raio); background: var(--laranja-claro);
                   border: 1.5px solid var(--laranja); }
.local-escolhido > .ico { color: var(--laranja); width: 28px; height: 28px; }
.local-escolhido > div { flex: 1; display: flex; flex-direction: column; }
.dup h3 { display: flex; gap: 8px; align-items: center; }
.dup-item { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--borda); }
.dup-item > div { display: flex; flex-direction: column; min-width: 0; }

.atalhos { display: flex; flex-wrap: wrap; gap: 6px; }
.atalho { cursor: pointer; padding: 8px 12px; font-size: .82rem; font-weight: 600; background: var(--superficie); transition: transform .15s var(--mola); }
.atalho:active { transform: scale(.92); }
.contador { align-self: flex-end; }
.cat-sugerida { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--raio);
                background: color-mix(in srgb, var(--cor) 12%, var(--superficie)); border: 1.5px solid color-mix(in srgb, var(--cor) 50%, transparent); }
.cat-sugerida > div { flex: 1; display: flex; flex-direction: column; }
.cats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cat { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px; border-radius: var(--raio-p); cursor: pointer;
       border: 1.5px solid var(--borda); background: var(--superficie); text-align: left; }
.cat small { color: var(--texto-2); font-size: .72rem; line-height: 1.25; }
.cat.ativa { border-color: var(--cor); background: color-mix(in srgb, var(--cor) 12%, var(--superficie)); }

.revisao-fotos { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 12px; }
.revisao-fotos img { width: 88px; height: 88px; object-fit: cover; border-radius: 12px; flex: none; }
dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; }
dt { color: var(--texto-2); font-size: .85rem; } dd { margin: 0; font-weight: 600; }

/* ---------- sucesso: ticket saindo da impressora ---------- */
.sucesso { text-align: center; display: flex; flex-direction: column; align-items: center; padding-top: 28px; }
.impressora { width: 100%; max-width: 340px; margin: 16px 0; padding-top: 12px; position: relative; overflow: hidden; }
.impressora::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 14px; border-radius: 8px; background: var(--noite); z-index: 1; }
.ticket { background: var(--superficie); border: 1px solid var(--borda); border-top: 0; border-radius: 0 0 16px 16px; padding: 20px 18px 18px;
          margin: 0 10px; box-shadow: var(--sombra); animation: imprimir 1.3s cubic-bezier(.3,.7,.3,1) both .2s; text-align: left; }
.ticket > small { color: var(--texto-2); text-transform: uppercase; letter-spacing: .1em; }
.protocolo { display: block; font-size: 1.6rem; color: var(--laranja); margin: 2px 0 10px; }
.ticket-linha { border-top: 2px dashed var(--borda); margin: 6px 0 14px; }
@keyframes imprimir { from { transform: translateY(-105%); } }
.conquista-nova { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: 16px; background: var(--laranja-claro);
                  text-align: left; margin-bottom: 14px; animation-delay: 1.4s; }
.conquista-nova > div { display: flex; flex-direction: column; }
.conquista-nova .conquista-ico { background: linear-gradient(135deg, var(--amarelo), var(--laranja)); color: #fff; }
.acoes { width: 100%; display: flex; flex-direction: column; gap: 10px; }

/* ---------- detalhe ---------- */
.resumo { position: relative; overflow: hidden; }
.resumo::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--cor); }
.resumo-topo { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.resumo-topo > div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.resumo-topo small { display: flex; gap: 4px; align-items: center; }
.etapas { list-style: none; padding: 0; margin: 16px 0 12px; display: grid; grid-template-columns: repeat(4, 1fr); position: relative; }
.etapas li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; position: relative; font-size: .75rem; font-weight: 600; color: var(--texto-2); }
.etapas li small { font-size: .65rem; font-weight: 400; }
.etapas li i { width: 18px; height: 18px; border-radius: 50%; background: var(--superficie); border: 3px solid var(--borda); z-index: 1; transition: all .4s; }
.etapas li:not(:first-child)::before { content: ""; position: absolute; top: 8px; right: 50%; width: 100%; height: 3px; background: var(--borda); }
.etapas li.feito { color: var(--texto); }
.etapas li.feito i { background: var(--verde); border-color: var(--verde); box-shadow: 0 0 0 4px var(--verde-claro); }
.etapas li.feito::before { background: var(--verde) !important; }
.miniaturas { display: flex; gap: 8px; overflow-x: auto; margin-top: 10px; padding-bottom: 4px; }
.miniatura { border: 0; padding: 0; background: none; cursor: pointer; display: flex; flex-direction: column; gap: 4px; align-items: center; flex: none; }
.miniatura img { width: 84px; height: 84px; object-fit: cover; border-radius: 12px; }
.miniatura small { color: var(--texto-2); }

.comparador { position: relative; aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; user-select: none; touch-action: pan-y; --pos: 50%; }
.comparador img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cmp-depois { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--pos)); }
.cmp-linha { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; background: #fff; transform: translateX(-50%);
             box-shadow: 0 0 10px rgba(0,0,0,.4); pointer-events: none; }
.cmp-linha span { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 44px; height: 44px; border-radius: 50%;
                  background: #fff; color: var(--noite); display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(0,0,0,.3); }
.cmp-linha .ico { width: 16px; height: 16px; margin: 0 -2px; }
.cmp-rot { position: absolute; top: 10px; padding: 4px 10px; border-radius: 99px; background: rgba(15,27,45,.7); color: #fff; font-size: .75rem; font-weight: 700; pointer-events: none; }
.cmp-rot.esq { left: 10px; } .cmp-rot.dir { right: 10px; background: var(--verde); }
.comparador input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.comparador:has(input:focus-visible) { outline: 3px solid var(--laranja); outline-offset: 2px; }

.avaliar { text-align: center; border: 2px solid var(--verde); background: linear-gradient(180deg, var(--verde-claro), var(--superficie) 60%); }
.avaliar h2 { justify-content: center; }
.avaliar textarea { min-height: 70px; margin: 8px 0 12px; }
.estrelas { display: flex; justify-content: center; gap: 6px; }
.estrela { background: none; border: 0; padding: 4px; cursor: pointer; color: var(--borda); transition: transform .2s var(--mola), color .2s; }
.estrela .ico { width: 40px; height: 40px; fill: currentColor; stroke-width: 1.5; }
.estrela.on { color: var(--amarelo); animation: estrela .4s var(--mola); }
.estrela:active { transform: scale(.85); }
.estrelas.fixas { justify-content: flex-start; } .estrelas.fixas .ico { width: 26px; height: 26px; }
.rotulo-nota { font-weight: 700; min-height: 1.4em; margin: 6px 0 0; }
@keyframes estrela { 50% { transform: scale(1.3) rotate(-10deg); } }

.mensagens { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.msg { max-width: 85%; padding: 10px 12px; border-radius: 16px; background: var(--superficie-2); border: 1px solid var(--borda); }
.msg p { margin: 2px 0 0; }
.msg small { color: var(--texto-2); font-size: .72rem; }
.msg.colaborador { align-self: flex-end; background: var(--laranja-claro); border-color: transparent; border-bottom-right-radius: 4px; }
.msg.equipe { align-self: flex-start; border-bottom-left-radius: 4px; }
.compositor { display: flex; gap: 8px; align-items: flex-end; }
.compositor textarea { min-height: 46px; resize: none; }
.historico summary { cursor: pointer; font-weight: 700; display: flex; align-items: center; gap: 8px; list-style: none; }
.historico summary::-webkit-details-marker { display: none; }
.historico[open] summary { margin-bottom: 10px; }
.linha-tempo { list-style: none; padding: 0 0 0 18px; margin: 0; border-left: 2px solid var(--borda); }
.linha-tempo li { position: relative; padding: 0 0 14px 6px; display: flex; flex-direction: column; }
.linha-tempo li::before { content: ""; position: absolute; left: -25px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--laranja); border: 2px solid var(--superficie); }
.hash { font-family: var(--mono); font-size: .7rem; color: var(--texto-2); }

/* ---------- leitor de QR ---------- */
.leitor { position: fixed; inset: 0; z-index: 70; background: #000; display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
          gap: 14px; padding: 24px 16px calc(28px + env(safe-area-inset-bottom)); color: #fff; font-weight: 600; }
.leitor video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.leitor > :not(video) { position: relative; }
.leitor-mira { position: absolute !important; top: 50%; left: 50%; width: 240px; height: 240px; transform: translate(-50%, -60%); border-radius: 24px;
               box-shadow: 0 0 0 100vmax rgba(0,0,0,.5); border: 3px solid var(--laranja); animation: mira 1.6s ease-in-out infinite; }
@keyframes mira { 50% { transform: translate(-50%, -60%) scale(1.04); } }

@media (min-width: 560px) {
  body { background: radial-gradient(1200px 600px at 50% -10%, color-mix(in srgb, var(--laranja) 10%, var(--fundo)), var(--fundo)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------- jornada / fases (gamificação) ---------- */
button.topo-nivel { background: none; border: 0; padding: 2px 0; cursor: pointer; font: inherit; }
.medalha { display: inline-grid; place-items: center; border-radius: 50%; flex: none; color: #fff;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--c) 55%, #fff), var(--c) 60%, color-mix(in srgb, var(--c) 70%, #000));
  box-shadow: 0 4px 10px color-mix(in srgb, var(--c) 40%, transparent), inset 0 -3px 0 rgba(0,0,0,.15); }
.medalha .ico { width: 52%; height: 52%; }
.medalha.apagada { filter: grayscale(1); opacity: .45; box-shadow: none; }
.placar-topo { align-items: center; }
.placar-nivel-box { display: flex; gap: 12px; align-items: center; }
.placar-nivel-box > div { display: flex; flex-direction: column; }
.btn-subir { display: inline-flex; align-items: center; gap: 5px; border: 1.5px solid var(--laranja); color: var(--laranja-esc); background: var(--laranja-claro);
  border-radius: 99px; padding: 7px 12px; font-weight: 700; font-size: .8rem; cursor: pointer; white-space: nowrap; }
.jornada h3 { margin: 18px 0 10px; }
.escada { list-style: none; margin: 0; padding: 0; position: relative; }
.escada::before { content: ""; position: absolute; left: 20px; top: 22px; bottom: 22px; width: 3px; background: var(--borda); border-radius: 3px; }
.degrau { display: flex; gap: 12px; padding: 8px 0; position: relative; }
.degrau-txt { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.degrau-topo { display: flex; justify-content: space-between; gap: 8px; }
.degrau-pts { font-size: .78rem; font-weight: 700; color: var(--texto-2); white-space: nowrap; }
.degrau small { color: var(--texto-2); font-size: .8rem; }
.degrau.futuro b { color: var(--texto-2); }
.degrau.atual { background: var(--laranja-claro); margin: 4px -10px; padding: 10px; border-radius: 16px; border: 1.5px solid var(--laranja); }
.degrau .barra { margin: 6px 0 2px; }
.degrau-falta { color: var(--laranja-esc) !important; font-weight: 700; }
.degrau-ok { color: #12895F !important; font-weight: 600; display: flex; gap: 4px; align-items: center; }
.regras { list-style: none; margin: 0; padding: 0; }
.regras li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--borda); font-size: .9rem; }
.regras li > .ico { color: var(--laranja); margin-top: 2px; }
.regras li > span { flex: 1; }
.regras li > b { color: var(--laranja-esc); white-space: nowrap; }
.lista-conq { grid-template-columns: 1fr 1fr; }
.lista-conq .conquista { flex-direction: row; text-align: left; align-items: center; cursor: default; padding: 8px; }
.lista-conq .conquista > span:last-child { display: flex; flex-direction: column; line-height: 1.2; }
.lista-conq .conquista b { font-size: .8rem; color: var(--texto); }
.lista-conq .conquista small { font-size: .7rem; font-weight: 500; }
.subiu { align-items: center; text-align: center; padding-top: 6px; }
.subiu h2 { margin: 0; font-size: 1.5rem; }
.subiu p { margin: 0; }
.subiu .medalha { animation: surgir .6s var(--mola) backwards .15s; }

/* ---------- tema dourado: fase "Cultura de Dono" ---------- */
body.tema-dono { --laranja: #D4A017; --laranja-esc: #9A7400; --laranja-claro: #FFF6D6; --amarelo: #F2C230; }
@media (prefers-color-scheme: dark) { body.tema-dono { --laranja-claro: #3A3010; --laranja-esc: #F2C230; } }
body.tema-dono .cta { background: linear-gradient(135deg, #B8860B 0%, #E6B422 45%, #F7D774 100%); box-shadow: 0 12px 28px rgba(212,160,23,.4); }
body.tema-dono .btn { box-shadow: 0 6px 16px rgba(212,160,23,.35); }
body.tema-dono .marca, body.tema-dono .topo-ola { background: linear-gradient(120deg, #B8860B, #F2C230); -webkit-background-clip: text; background-clip: text; color: transparent; }
body.tema-dono .placar { border-color: #E6B422; box-shadow: 0 0 0 3px rgba(230,180,34,.18), var(--sombra); }
