/* S Máxima · app de condomínio (protótipo) — mobile-first 390x844 */
:root {
  --fundo: #0f0f10;
  --fundo-2: #17181a;
  --sup: #1b1c1f;
  --sup-2: #232428;
  --sup-3: #2c2e33;
  --sup-grad: linear-gradient(180deg, #222327 0%, #1a1b1e 100%);
  --borda: rgba(255, 255, 255, .07);
  --borda-2: rgba(255, 255, 255, .13);
  --brilho: inset 0 1px 0 rgba(255, 255, 255, .05);
  --laranja: #ff7a00;
  --laranja-claro: #ff9a3d;
  --laranja-suave: rgba(255, 122, 0, .14);
  --prata: #c9ced6;
  --texto: #f5f5f6;
  --texto-2: #b4b7be;
  --texto-3: #959aa3;
  --verde: #2fd47a;
  --verde-suave: rgba(47, 212, 122, .14);
  --vermelho: #ff5a5f;
  --vermelho-suave: rgba(255, 90, 95, .14);
  --azul: #6cb2ff;
  --azul-suave: rgba(108, 178, 255, .13);
  --f-titulo: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --f-texto: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --raio: 18px;
  --raio-p: 12px;
  --topo-h: 60px;
  --abas-h: 66px;
  --faixa-h: 22px;
  --sombra: 0 10px 30px rgba(0, 0, 0, .55);
  --seg-baixo: env(safe-area-inset-bottom, 0px);
  --seg-cima: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
html { -webkit-text-size-adjust: 100%; background: #0a0a0b; }
body {
  font-family: var(--f-texto); font-size: 15px; line-height: 1.45; color: var(--texto);
  background: radial-gradient(1200px 600px at 50% -10%, #1d1a17 0%, #0a0a0b 60%);
  -webkit-font-smoothing: antialiased; overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
svg { display: block; flex: none; }
p svg, .mini svg, .tag svg, h4 svg { display: inline-block; vertical-align: -2px; margin-right: 2px; }
.lgpd svg, .card-ico svg { display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--laranja); outline-offset: 2px; }

/* ---------- moldura do app ---------- */
.app {
  position: relative; height: 100dvh; max-width: 480px; margin: 0 auto;
  background: var(--fundo); overflow: hidden; display: flex; flex-direction: column;
}
@media (min-width: 560px) {
  .app { height: min(100dvh - 32px, 900px); margin-top: 16px; border-radius: 34px;
         border: 1px solid var(--borda-2); box-shadow: 0 30px 80px rgba(0,0,0,.6); max-width: 410px; }
}

.demo-faixa {
  height: calc(var(--faixa-h) + var(--seg-cima)); padding-top: var(--seg-cima);
  display: flex; align-items: center; justify-content: center; flex: none;
  font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600;
  color: #1b0c00; background: repeating-linear-gradient(135deg, var(--laranja) 0 14px, #ff8c1f 14px 28px);
}

/* ---------- topo ---------- */
.topo {
  height: var(--topo-h); flex: none; display: flex; align-items: center; gap: 10px;
  padding: 0 12px 0 16px; border-bottom: 1px solid var(--borda);
  background: linear-gradient(180deg, #141416, var(--fundo));
}
.topo-logo { width: 40px; height: 28px; object-fit: contain; border-radius: 6px; }
.imovel-btn {
  flex: 1; min-width: 0; min-height: 44px; display: flex; flex-direction: column; align-items: flex-start;
  justify-content: center; background: none; border: 0; padding: 2px 6px; border-radius: 10px; text-align: left;
}
.imovel-btn:active { background: var(--sup); }
.imovel-nome { font-family: var(--f-titulo); font-size: 19px; font-weight: 700; letter-spacing: .02em; line-height: 1.05;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.imovel-unid { display: flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--texto-2); }
.icone-btn {
  position: relative; width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 12px; border: 1px solid var(--borda); background: var(--sup);
}
.icone-btn .ponto { position: absolute; top: 9px; right: 10px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--laranja); box-shadow: 0 0 0 2px var(--sup); }
.icone-btn .ponto.off { display: none; }

/* ---------- área das telas ---------- */
.tela {
  flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; outline: none;
  padding: 18px 16px calc(var(--abas-h) + var(--seg-baixo) + 24px);
  overscroll-behavior: contain;
}
.tela.sem-abas { padding-bottom: calc(24px + var(--seg-baixo)); }
.entra { animation: entra .32s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes entra { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- abas ---------- */
.abas {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 30;
  height: calc(var(--abas-h) + var(--seg-baixo)); padding-bottom: var(--seg-baixo);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(17, 17, 19, .94); box-shadow: 0 -8px 24px rgba(0,0,0,.45); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--borda);
}
.abas a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: var(--texto-3); font-size: 10.5px; min-height: 44px; }
.abas a b { font-weight: 600; }
.abas a.ativa { color: var(--laranja); }
.abas a.ativa svg { filter: drop-shadow(0 0 6px rgba(255,122,0,.55)); }
.abas a.ativa::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--laranja); }
.aba-badge { position: absolute; top: 7px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: var(--laranja); color: #160900; font-style: normal; font-size: 10px; font-weight: 700; display: grid; place-items: center; }
.aba-badge.off { display: none; }

/* ---------- tipografia / blocos ---------- */
.ola { font-size: 13px; color: var(--texto-2); }
.titulo-g { font-family: var(--f-titulo); font-size: 30px; font-weight: 700; line-height: 1.02; letter-spacing: .01em; margin-top: 2px; }
.titulo-g em { font-style: normal; color: var(--laranja); }
.secao { margin-top: 24px; }
.secao-tit { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.secao-tit h2 { font-family: var(--f-titulo); font-size: 15px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--texto-2); }
.secao-tit a, .link { color: var(--laranja); font-size: 13px; font-weight: 600; background: none; border: 0; padding: 8px 0; min-height: 44px; }
.cab-pagina { display: flex; align-items: center; gap: 8px; margin: -6px 0 14px -8px; }
.cab-pagina h1 { font-family: var(--f-titulo); font-size: 26px; font-weight: 700; letter-spacing: .01em; }
.voltar { width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; border-radius: 12px; color: var(--texto); }
.voltar:active { background: var(--sup); }
.sub { color: var(--texto-2); font-size: 13.5px; }
.mini { font-size: 12px; color: var(--texto-3); }

.card {
  position: relative; background: var(--sup-grad); border: 1px solid var(--borda); border-radius: var(--raio);
  padding: 16px; overflow: hidden; box-shadow: var(--brilho), 0 6px 18px rgba(0,0,0,.28);
}
.card + .card { margin-top: 10px; }
a.card, button.card { display: block; width: 100%; text-align: left; transition: transform .15s, border-color .15s; }
a.card:active, button.card:active { transform: scale(.985); }
.card-linha { display: flex; gap: 12px; align-items: center; }
.card-ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: none;
  background: var(--sup-3); color: var(--texto); }
.card-ico.lar { background: var(--laranja-suave); color: var(--laranja); }
.card-ico.ver { background: var(--verde-suave); color: var(--verde); }
.card-ico.azu { background: var(--azul-suave); color: var(--azul); }
.card-ico.verm { background: var(--vermelho-suave); color: var(--vermelho); }
.card-txt { flex: 1; min-width: 0; }
.card-txt h3 { font-size: 15px; font-weight: 600; line-height: 1.25; }
.card-txt p { font-size: 13px; color: var(--texto-2); margin-top: 2px; }
.seta { color: var(--texto-3); }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; letter-spacing: .03em;
  padding: 3px 8px; border-radius: 999px; background: var(--sup-3); color: var(--texto-2); white-space: nowrap; }
.tag.lar { background: var(--laranja-suave); color: var(--laranja-claro); }
.tag.ver { background: var(--verde-suave); color: var(--verde); }
.tag.verm { background: var(--vermelho-suave); color: var(--vermelho); }
.tag.azu { background: var(--azul-suave); color: var(--azul); }

/* cartão destaque: visita no portão */
.card-visita {
  border-color: rgba(255, 122, 0, .55);
  background: radial-gradient(120% 140% at 0% 0%, rgba(255,122,0,.22), rgba(255,122,0,.04) 55%), var(--sup-grad);
  box-shadow: 0 0 0 1px rgba(255,122,0,.15), 0 12px 30px rgba(255,122,0,.12);
}
.card-visita .vivo { position: absolute; top: 14px; right: 14px; }
.card-visita .acoes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.pulso { position: relative; }
.pulso::after { content: ""; position: absolute; inset: -4px; border-radius: 18px; border: 2px solid var(--laranja); opacity: 0;
  animation: pulso 1.8s ease-out infinite; }
@keyframes pulso { 0% { opacity: .8; transform: scale(.9); } 100% { opacity: 0; transform: scale(1.25); } }

.vivo-selo { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em;
  color: #fff; background: rgba(230, 30, 40, .9); padding: 3px 8px; border-radius: 6px; }
.vivo-selo i { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: pisca 1s steps(2) infinite; }
@keyframes pisca { 50% { opacity: .2; } }

/* atalhos */
.atalhos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.atalho { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 12px 4px 10px; min-height: 84px;
  border-radius: 16px; background: var(--sup); border: 1px solid var(--borda); font-size: 11.5px; font-weight: 500; color: var(--texto-2); text-align: center; }
.atalho span:first-child { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--sup-3); color: var(--laranja); }
.atalhos.seis { grid-template-columns: repeat(3, 1fr); gap: 10px; }
.atalhos.seis .atalho { min-height: 96px; padding: 16px 6px 12px; gap: 9px; border-radius: 18px; background: var(--sup-grad);
  box-shadow: var(--brilho), 0 6px 18px rgba(0,0,0,.28); color: var(--texto); font-size: 12.5px; font-weight: 600; line-height: 1.2; justify-content: center; }
.atalhos.seis .atalho span:first-child { width: auto; height: auto; background: none; color: var(--laranja);
  filter: drop-shadow(0 0 8px rgba(255,122,0,.35)); }
.atalho:active { transform: scale(.96); }

.emerg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.emerg a { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 12px; border-radius: 14px;
  background: var(--sup); border: 1px solid var(--borda); font-size: 12.5px; line-height: 1.2; }
.emerg a span:first-child { color: var(--verde); }
.emerg a b { display: block; font-size: 13px; }
.emerg a small { color: var(--texto-3); }

/* ---------- botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px;
  border-radius: 14px; border: 1px solid var(--borda-2); background: var(--sup-2); font-weight: 600; font-size: 15px; transition: transform .12s, filter .12s; }
.btn:active { transform: scale(.97); }
.btn.pri { background: linear-gradient(180deg, #ff8a1c, var(--laranja)); border-color: transparent; color: #170900;
  box-shadow: 0 8px 22px rgba(255,122,0,.28); }
.btn.ok { background: linear-gradient(180deg, #3ee08a, #22b866); border-color: transparent; color: #04170b; box-shadow: 0 8px 22px rgba(47,212,122,.25); }
.btn.perigo { background: var(--vermelho-suave); border-color: rgba(255,90,95,.35); color: #ffb3b5; }
.btn.fant { background: transparent; }
.btn.bloco { width: 100%; }
.btn.g { min-height: 60px; font-size: 17px; border-radius: 18px; }
.btn.p { min-height: 44px; font-size: 13.5px; padding: 0 12px; border-radius: 12px; }
.btn[disabled] { opacity: 1; pointer-events: none; background: var(--sup-3); border-color: var(--borda); color: var(--texto-3); box-shadow: none; }

/* ---------- segmentado ---------- */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; gap: 4px; background: var(--sup);
  border: 1px solid var(--borda); border-radius: 14px; margin-bottom: 14px; }
.seg button { min-height: 40px; border: 0; background: none; border-radius: 10px; color: var(--texto-2); font-weight: 600; font-size: 13px; }
.seg button.on { background: var(--sup-3); color: var(--texto); box-shadow: 0 2px 8px rgba(0,0,0,.3); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips.quebra { flex-wrap: wrap; }
.chip { flex: none; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--borda-2); background: var(--sup);
  color: var(--texto-2); font-weight: 500; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.chip.on { background: var(--laranja-suave); border-color: rgba(255,122,0,.6); color: var(--laranja-claro); }

/* ---------- formulários ---------- */
.campo { display: block; margin-bottom: 12px; }
.campo > span { display: block; font-size: 12.5px; color: var(--texto-2); margin-bottom: 6px; font-weight: 500; }
.campo input, .campo select, .campo textarea { width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--borda-2); background: var(--sup-2); outline: none; font-size: 15px; }
.campo textarea { min-height: 90px; resize: vertical; }
.campo input:focus, .campo select:focus, .campo textarea:focus { border-color: var(--laranja); }
.dupla { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 14px; background: var(--sup-2); border: 1px solid var(--borda); margin-bottom: 10px; font-size: 13.5px; }
.check input { width: 22px; height: 22px; accent-color: var(--laranja); flex: none; margin: 1px 0 0; }

.alternar { position: relative; width: 50px; height: 30px; flex: none; }
.alternar input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.alternar i { position: absolute; inset: 0; border-radius: 15px; background: var(--sup-3); border: 1px solid var(--borda-2); transition: background .2s; }
.alternar i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #d7dbe2; transition: transform .2s; }
.alternar input:checked + i { background: var(--laranja); border-color: transparent; }
.alternar input:checked + i::after { transform: translateX(20px); background: #fff; }

/* ---------- listas ---------- */
.lista { background: var(--sup); border: 1px solid var(--borda); border-radius: var(--raio); overflow: hidden; }
.lista > * { display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 60px; width: 100%; background: none; border: 0; text-align: left; }
.lista > * + * { border-top: 1px solid var(--borda); }
.lista > a:active, .lista > button:active { background: var(--sup-2); }

/* ---------- linha do tempo ---------- */
.tempo { position: relative; margin: 6px 0 0; padding: 0; list-style: none; }
.tempo li { position: relative; padding: 0 0 18px 34px; }
.tempo li::before { content: ""; position: absolute; left: 10px; top: 22px; bottom: 0; width: 2px; background: var(--borda-2); }
.tempo li:last-child::before { display: none; }
.tempo .bol { position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--sup-3); border: 2px solid var(--borda-2); }
.tempo li.feito .bol { background: var(--verde); border-color: var(--verde); color: #04170b; }
.tempo li.agora .bol { background: var(--laranja); border-color: var(--laranja); color: #170900; box-shadow: 0 0 0 5px var(--laranja-suave); }
.tempo li.feito::before { background: var(--verde); }
.tempo h4 { margin: 0; font-size: 14px; font-weight: 600; }
.tempo p { margin: 1px 0 0; font-size: 12.5px; color: var(--texto-2); }

.codigo { display: flex; gap: 8px; justify-content: center; margin: 6px 0 4px; }
.codigo span { width: 50px; height: 62px; display: grid; place-items: center; border-radius: 12px; background: var(--sup-2);
  border: 1px solid var(--borda-2); font-family: var(--f-titulo); font-size: 34px; font-weight: 700; color: var(--laranja); }

.foto-falsa { height: 120px; border-radius: 12px; background:
  linear-gradient(135deg, rgba(255,255,255,.04) 25%, transparent 25% 50%, rgba(255,255,255,.04) 50% 75%, transparent 75%) 0 0/18px 18px, var(--sup-3);
  display: grid; place-items: center; color: var(--texto-3); font-size: 12px; border: 1px dashed var(--borda-2); }

/* ---------- câmera ---------- */
.cam { position: relative; border-radius: 18px; overflow: hidden; background: #000; aspect-ratio: 16 / 10.5; border: 1px solid var(--borda-2); }
.cam canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.cam-hud { position: absolute; inset: 0; pointer-events: none; padding: 10px 12px; display: flex; flex-direction: column; justify-content: space-between;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 11px; color: rgba(255,255,255,.92); text-shadow: 0 1px 2px #000; }
.cam-hud .l1, .cam-hud .l2 { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cam-hud .rec { font-family: var(--f-texto); }
.cam-aberto { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(4, 30, 15, .35);
  animation: aparece .3s ease both; }
.cam-aberto div { display: flex; align-items: center; gap: 8px; background: rgba(10, 40, 22, .92); border: 1px solid rgba(47,212,122,.6);
  color: #b9ffd6; padding: 10px 16px; border-radius: 999px; font-weight: 700; font-size: 14px; }
@keyframes aparece { from { opacity: 0; transform: scale(.95); } to { opacity: 1; transform: none; } }

.visit-info { display: flex; align-items: center; gap: 12px; margin: 14px 0 12px; }
.avatar { width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; font-family: var(--f-titulo); font-weight: 700; font-size: 22px;
  background: linear-gradient(135deg, #34363c, #222327); color: var(--prata); flex: none; border: 1px solid var(--borda-2); }
.avatar.p { width: 40px; height: 40px; border-radius: 12px; font-size: 17px; }
.acoes-portao { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.acoes-portao .btn.ok { grid-column: 1 / -1; }
.lgpd { display: flex; gap: 8px; align-items: flex-start; margin-top: 14px; font-size: 12px; color: var(--texto-3); line-height: 1.4; }
.lgpd span:first-child { color: var(--texto-2); margin-top: 1px; }

.resultado { text-align: center; padding: 18px 8px 4px; }
.resultado .grande-ico { width: 72px; height: 72px; margin: 0 auto 12px; border-radius: 24px; display: grid; place-items: center; background: var(--verde-suave); color: var(--verde); }
.resultado h2 { font-family: var(--f-titulo); font-size: 26px; font-weight: 700; }

/* mosaico */
.mosaico { display: grid; gap: 6px; }
.mosaico.q4 { grid-template-columns: 1fr 1fr; }
.mosaico .cam { border-radius: 12px; }
.mosaico.q4 .cam-hud { font-size: 9px; padding: 6px 8px; }
.cam-hud span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mosaico.q4 .vivo-selo { font-size: 0; gap: 0; padding: 5px; border-radius: 50%; }
.mosaico.q4 .vivo-selo i { width: 6px; height: 6px; }

/* ---------- QR ---------- */
.qr-box { display: grid; place-items: center; padding: 18px; border-radius: 18px; background: #fff; width: 220px; margin: 4px auto 12px; }
.qr-box canvas { width: 184px; height: 184px; image-rendering: pixelated; }

/* ---------- calendário ---------- */
.cal { background: var(--sup); border: 1px solid var(--borda); border-radius: var(--raio); padding: 12px; }
.cal-cab { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-cab b { font-family: var(--f-titulo); font-size: 19px; letter-spacing: .02em; }
.cal-grade { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-grade .dsem { font-size: 11px; color: var(--texto-3); padding: 4px 0; font-weight: 600; }
.cal-grade button { aspect-ratio: 1; min-height: 40px; border-radius: 12px; border: 1px solid transparent; background: var(--sup-2);
  font-weight: 600; font-size: 14px; position: relative; padding: 0; }
.cal-grade button.ocup { background: transparent; border: 1px dashed rgba(201,206,214,.22); color: var(--texto-3); text-decoration: line-through; }
.cal-grade button.minha { background: var(--laranja-suave); border-color: rgba(255,122,0,.6); color: var(--laranja-claro); }
.cal-grade button.sel { background: var(--laranja); color: #170900; }
.cal-grade button.hoje::after { content: ""; position: absolute; bottom: 5px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; }
.cal-grade button[disabled] { opacity: .28; }
.legenda { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; font-size: 11.5px; color: var(--texto-2); }
.legenda i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.regras { list-style: none; margin: 0; padding: 0; }
.regras li { display: flex; gap: 10px; padding: 8px 0; font-size: 13.5px; color: var(--texto-2); }
.regras li span:first-child { color: var(--laranja); margin-top: 1px; }
.horarios { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.horarios button { min-height: 48px; border-radius: 12px; border: 1px solid var(--borda-2); background: var(--sup-2); font-size: 13px; font-weight: 600; }
.horarios button.on { border-color: var(--laranja); background: var(--laranja-suave); color: var(--laranja-claro); }
.horarios button[disabled] { opacity: .35; text-decoration: line-through; }

/* ---------- boleto ---------- */
.boleto { background: radial-gradient(120% 120% at 100% 0%, rgba(255,122,0,.14), transparent 55%), linear-gradient(140deg, #26272b, #18191c 60%); border: 1px solid var(--borda-2); }
.boleto .valor { font-family: var(--f-titulo); font-size: 40px; font-weight: 700; line-height: 1; margin: 8px 0 2px; }
.boleto .linha-dig { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; color: var(--texto-2); word-break: break-all;
  background: rgba(0,0,0,.25); border-radius: 10px; padding: 10px; margin-top: 12px; }

/* ---------- comunicado ---------- */
.comu-corpo { font-size: 14.5px; line-height: 1.6; color: #e4e5e8; }
.comu-corpo p + p { margin-top: 10px; }
.lido { display: flex; align-items: center; gap: 8px; color: var(--verde); font-weight: 600; font-size: 14px; justify-content: center; min-height: 48px; }

/* ---------- facial ---------- */
.face-quadro { position: relative; aspect-ratio: 3 / 3.6; max-width: 280px; margin: 0 auto; border-radius: 26px; overflow: hidden;
  background: radial-gradient(70% 60% at 50% 45%, #2a2b30, #0c0c0e); border: 1px solid var(--borda-2); }
.face-quadro svg.oval { position: absolute; inset: 0; width: 100%; height: 100%; }
.face-quadro .varre { position: absolute; left: 12%; right: 12%; height: 3px; top: 14%; border-radius: 3px;
  background: linear-gradient(90deg, transparent, var(--laranja), transparent); box-shadow: 0 0 18px var(--laranja); animation: varre 2s ease-in-out infinite alternate; }
@keyframes varre { to { top: 84%; } }
.face-quadro .msg { position: absolute; left: 0; right: 0; bottom: 12px; text-align: center; font-size: 13px; font-weight: 600; }
.passos { display: flex; gap: 6px; margin-bottom: 14px; }
.passos i { flex: 1; height: 4px; border-radius: 4px; background: var(--sup-3); }
.passos i.on { background: var(--laranja); }

/* ---------- login ---------- */
.login { min-height: 100%; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 26px 8px 8px; }
.login img { width: 150px; height: auto; -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent 100%); mask-image: radial-gradient(closest-side, #000 72%, transparent 100%); filter: drop-shadow(0 10px 30px rgba(255,122,0,.25)); }
.login h1 { font-family: var(--f-titulo); font-size: 30px; font-weight: 700; margin-top: 18px; }
.login .sub { margin-top: 6px; max-width: 290px; }
.bio { width: 104px; height: 104px; border-radius: 34px; margin: 30px auto 14px; display: grid; place-items: center;
  border: 1px solid rgba(255,122,0,.5); background: radial-gradient(circle, rgba(255,122,0,.18), rgba(255,122,0,.03)); color: var(--laranja); }
.bio.lendo { animation: bio 1s ease-in-out infinite; }
.bio.ok { color: var(--verde); border-color: rgba(47,212,122,.6); background: radial-gradient(circle, rgba(47,212,122,.2), transparent); }
@keyframes bio { 50% { box-shadow: 0 0 0 10px rgba(255,122,0,.08), 0 0 40px rgba(255,122,0,.35); } }
.login .rodape { margin-top: auto; padding-top: 24px; font-size: 11.5px; color: var(--texto-3); }

/* ---------- folha (bottom sheet), push, toast ---------- */
.veu { position: absolute; inset: 0; z-index: 40; background: rgba(0,0,0,.68); animation: aparece .2s ease both; }
.folha { position: absolute; left: 0; right: 0; bottom: 0; z-index: 41; max-height: 86%; overflow-y: auto;
  background: #1a1b1e; border-top: 1px solid var(--borda-2); border-radius: 24px 24px 0 0; box-shadow: 0 -12px 40px rgba(0,0,0,.6);
  padding: 10px 16px calc(20px + var(--seg-baixo)); animation: sobe .3s cubic-bezier(.2,.8,.2,1) both; }
.folha::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--borda-2); margin: 0 auto 14px; }
.folha h2 { font-family: var(--f-titulo); font-size: 22px; font-weight: 700; margin-bottom: 4px; }
@keyframes sobe { from { transform: translateY(100%); } to { transform: none; } }
.opcao { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 12px; margin-top: 8px; border-radius: 14px;
  border: 1px solid var(--borda); background: var(--sup-2); text-align: left; }
.opcao.on { border-color: var(--laranja); background: var(--laranja-suave); }

.push { position: absolute; top: calc(var(--faixa-h) + var(--seg-cima) + 8px); left: 10px; right: 10px; z-index: 50;
  display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 18px; text-align: left; width: auto;
  background: rgba(32, 33, 37, .97); border: 1px solid rgba(255,122,0,.45); box-shadow: var(--sombra);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); animation: desce .45s cubic-bezier(.2,.9,.2,1.1) both; }
.push img { width: 40px; height: 40px; border-radius: 10px; object-fit: contain; background: #000; flex: none; }
.push b { display: block; font-size: 14px; }
.push small { display: block; font-size: 12.5px; color: var(--texto-2); }
.push .quando { font-size: 11px; color: var(--texto-3); align-self: flex-start; }
@keyframes desce { from { transform: translateY(-130%); opacity: 0; } to { transform: none; opacity: 1; } }

.toast { position: absolute; left: 50%; bottom: calc(var(--abas-h) + var(--seg-baixo) + 14px); z-index: 60;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
  background: #2a2b30; color: var(--texto); border: 1px solid rgba(255,122,0,.5); font-weight: 600; font-size: 13.5px; padding: 11px 16px; border-radius: 14px;
  max-width: calc(100% - 32px); width: max-content; box-shadow: var(--sombra); text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* portão abrindo (cartão de resultado) */
.portao-anim { width: 150px; height: 92px; margin: 4px auto 14px; position: relative; overflow: hidden;
  border-bottom: 3px solid var(--verde); border-left: 5px solid #44464d; border-right: 5px solid #44464d; border-radius: 4px 4px 0 0; }
.portao-anim .f { position: absolute; top: 8px; bottom: 0; width: 50%;
  background: repeating-linear-gradient(90deg, transparent 0 10px, rgba(201,206,214,.75) 10px 13px);
  border-top: 3px solid rgba(201,206,214,.75); transition: transform 1.1s cubic-bezier(.6,0,.2,1), opacity 1.1s; }
.portao-anim .f.e { left: 0; }
.portao-anim .f.d { right: 0; }
.portao-anim::after { content: ""; position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -16px 0 0 -20px; border-radius: 50%;
  background: var(--verde) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2304170b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/22px no-repeat;
  transform: scale(0); transition: transform .4s .8s cubic-bezier(.3,1.6,.5,1); box-shadow: 0 0 24px rgba(47,212,122,.5); }
.portao-anim.abre .f.e { transform: translateX(-88%); opacity: .5; }
.portao-anim.abre .f.d { transform: translateX(88%); opacity: .5; }
.portao-anim.abre::after { transform: scale(1); }

.vazio { text-align: center; padding: 28px 12px; color: var(--texto-3); font-size: 13.5px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .pulso::after { display: none; }
  .face-quadro .varre { top: 50%; }
}

/* ---------- cadastros da unidade (v4) ---------- */
.atalhos.cinco { grid-template-columns: repeat(5, 1fr); gap: 6px; }
.atalhos.cinco .atalho { padding: 12px 2px 10px; font-size: 11px; line-height: 1.2; }
.lista > .cad-linha { align-items: flex-start; }
.cad-linha .avatar, .cad-linha .card-ico, .cad-linha .seta { margin-top: 2px; }
.cad-linha .seta { align-self: center; }
.cad-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cad-tags .tag { white-space: normal; }
.cad-portaria { display: flex; align-items: center; gap: 5px; margin-top: 7px; font-size: 11.5px; line-height: 1.3; color: var(--texto-3); }
.cad-portaria svg { flex: none; }
.cad-vencido { opacity: .55; }
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.placa { display: inline-block; font-family: var(--f-titulo); font-size: 17px; font-weight: 700; letter-spacing: .08em; line-height: 1.1;
  background: #f2f4f8; color: #111214; border-radius: 5px; padding: 1px 8px 2px; border-top: 5px solid #1f4fbf; }
.cad-foto { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cad-foto .avatar { color: var(--texto-3); }
.cad-foto label.btn { position: relative; cursor: pointer; }
.cad-nota { display: block; margin-top: 6px; }
.so-leitor { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); pointer-events: none; }
.chips.dias { gap: 6px; }
.chips.dias .chip { min-width: 46px; padding: 0 8px; justify-content: center; }
.campo.erro > span { color: var(--vermelho); }
.campo.erro input, .campo.erro textarea, .campo.erro .chip { border-color: var(--vermelho); }
#cadFacial .opcao { margin-top: 0; }
#cadFacial .btn.p { flex: none; }

/* roteiro de teste e sugestão */
.roteiro { border-color: rgba(255,122,0,.35); }
.roteiro-passos { list-style: none; margin: 10px 0 8px; padding: 0; display: grid; gap: 6px; }
.roteiro-passos a, .roteiro-passos button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 8px 10px;
  border-radius: 12px; background: var(--sup-2); border: 1px solid var(--borda); text-align: left; font-size: 13.5px; font-weight: 500; }
.roteiro-passos b { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; flex: none;
  background: var(--laranja-suave); color: var(--laranja); font-size: 12.5px; }
.roteiro-passos span { flex: 1; min-width: 0; }
.roteiro-passos svg { color: var(--texto-3); }
.sugerir { border-color: rgba(255,122,0,.35); }

/* ---------- tema escuro premium (v5): destaque da home ---------- */
.hero { position: relative; display: grid; place-items: center; margin: -6px 0 2px; }
.hero::before { content: ""; position: absolute; left: 50%; top: 50%; width: 260px; height: 200px; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(255,122,0,.30), rgba(255,122,0,.08) 55%, transparent 100%); pointer-events: none; }
.hero-escudo { position: relative; width: 132px; height: auto;
  -webkit-mask-image: radial-gradient(closest-side, #000 74%, transparent 100%); mask-image: radial-gradient(closest-side, #000 74%, transparent 100%);
  mix-blend-mode: lighten; filter: drop-shadow(0 8px 26px rgba(255,122,0,.35)); }
.protegido { display: flex; align-items: center; gap: 14px; padding: 16px 18px; margin-top: 4px;
  border-color: rgba(255,122,0,.22);
  background: radial-gradient(120% 160% at 0% 0%, rgba(255,122,0,.12), transparent 60%), var(--sup-grad); }
.prot-ico { color: var(--laranja); flex: none; filter: drop-shadow(0 0 10px rgba(255,122,0,.45)); }
.protegido h3 { font-size: 18px; font-weight: 700; line-height: 1.2; }
.protegido h3 em { font-style: normal; color: var(--laranja); display: block; }
.protegido p { font-size: 13px; color: var(--texto-2); margin-top: 4px; }
.secao-tit h2 { color: var(--texto-2); }
.lista { background: var(--sup-grad); box-shadow: var(--brilho); }
.login img { mix-blend-mode: lighten; filter: drop-shadow(0 10px 34px rgba(255,122,0,.35)); }
.login { background: radial-gradient(260px 220px at 50% 90px, rgba(255,122,0,.16), transparent 70%); }

/* =================================================================== sistema (fase 1) */
html.grande { font-size: 118%; }
html.grande body { font-size: 17.5px; }
html.grande .card-txt h3 { font-size: 17px; }
html.grande .card-txt p, html.grande .sub { font-size: 15px; }
html.grande .campo input, html.grande .campo select, html.grande .campo textarea { font-size: 17px; min-height: 54px; }
.abas.n4 { grid-template-columns: repeat(4, 1fr); }
.abas.n5 { grid-template-columns: repeat(5, 1fr); }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpi { background: var(--sup-grad); border: 1px solid var(--borda); border-radius: 16px; padding: 14px; box-shadow: var(--brilho); text-align: left; width: 100%; }
.kpi b { display: block; font-family: var(--f-titulo); font-size: 34px; line-height: 1; color: var(--texto); }
.kpi span { display: block; font-size: 12.5px; color: var(--texto-2); margin-top: 6px; }
.kpi.lar b { color: var(--laranja); }
.kpi.ver b { color: var(--verde); }
.busca-g { position: relative; }
.busca-g input { width: 100%; min-height: 60px; font-size: 19px; padding: 14px 16px 14px 50px; border-radius: 16px;
  border: 1px solid var(--borda-2); background: var(--sup-2); outline: none; }
.busca-g input:focus { border-color: var(--laranja); }
.busca-g > span { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--texto-3); }
.portaria-acoes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.portaria-acoes .btn { min-height: 76px; flex-direction: column; gap: 6px; font-size: 15px; border-radius: 18px; }
.resultado-val { border-width: 2px; }
.resultado-val.ok { border-color: rgba(47,212,122,.7); background: radial-gradient(120% 140% at 0% 0%, rgba(47,212,122,.18), transparent 60%), var(--sup-grad); }
.resultado-val.nao { border-color: rgba(255,90,95,.7); background: radial-gradient(120% 140% at 0% 0%, rgba(255,90,95,.18), transparent 60%), var(--sup-grad); }
.resultado-val h3 { font-family: var(--f-titulo); font-size: 28px; line-height: 1.05; }
.cod-g { font-family: var(--f-titulo); font-size: 34px; font-weight: 700; letter-spacing: .14em; color: var(--laranja); text-align: center; }
.qr-img { display: block; width: 220px; height: 220px; margin: 6px auto 10px; background: #fff; border-radius: 16px; padding: 10px; }
.miniatura { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; flex: none; background: var(--sup-3); }
.linha-acoes { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.linha-acoes .btn { flex: 1 1 auto; }
.item-txt { flex: 1; min-width: 0; }
.item-txt h3 { font-size: 15px; font-weight: 600; line-height: 1.25; }
.item-txt p { font-size: 13px; color: var(--texto-2); margin-top: 2px; overflow-wrap: anywhere; }
.lista > .item { align-items: flex-start; flex-wrap: wrap; }
.aviso-banner { padding: 10px 12px; border-radius: 12px; background: var(--azul-suave); color: #cfe5ff; font-size: 13px; margin-bottom: 12px; }
.aviso-banner.lar { background: var(--laranja-suave); color: var(--laranja-claro); }
.aviso-banner.verm { background: var(--vermelho-suave); color: #ffc9ca; }
.consent { font-size: 13.5px; line-height: 1.55; color: var(--texto-2); background: var(--sup-2); border: 1px solid var(--borda); border-radius: 14px; padding: 14px; }
.consent ul { margin: 8px 0 0; padding-left: 18px; }
.consent li + li { margin-top: 4px; }
.video-qr { width: 100%; border-radius: 16px; background: #000; aspect-ratio: 1; object-fit: cover; }
.topo-papel { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--laranja); }
.tabela-mini { width: 100%; border-collapse: collapse; font-size: 13px; }
.tabela-mini td, .tabela-mini th { padding: 8px 6px; border-bottom: 1px solid var(--borda); text-align: left; vertical-align: top; }
.tabela-mini th { color: var(--texto-3); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; }
.marca-rodape { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 28px; color: var(--texto-3); font-size: 11.5px; }
.marca-rodape img { width: 26px; height: 18px; object-fit: contain; }
.app.publico .tela { padding-bottom: 24px; }
pre.mono { white-space: pre-wrap; word-break: break-all; font-size: 11px; color: var(--texto-3); margin: 6px 0 0; }
