/* ==========================================================================
   Demandas do Marcelo — tema escuro, dourado como destaque
   ========================================================================== */
:root {
  --fundo: #0B0E13;
  --fundo-2: #0E1218;
  --sup: #141922;
  --sup-2: #1B212C;
  --borda: #262D3A;
  --borda-2: #2A3240;
  --linha: #222936;
  --texto: #ECEFF4;
  --claro: #C3CCDA;
  --mudo: #98A2B3;
  --mudo-2: #8C97A8;
  --ouro: #F2B544;
  --ouro-hover: #FFD27A;
  --ouro-fundo: #2A2416;
  --ouro-texto: #1A1405;
  --verde: #4ED19A;
  --verde-fundo: #14271F;
  --verde-texto: #06150E;
  --azul: #5BB6E8;
  --perigo: #F2836B;
  --perigo-fundo: #2C1813;
  --raio: 16px;
  --raio-p: 12px;
  --seguro-baixo: env(safe-area-inset-bottom, 0px);
  --seguro-topo: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fundo);
  color: var(--texto);
  font: 500 15px/1.4 Manrope, system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body.sem-rolagem { overflow: hidden; }
a { color: var(--ouro); text-decoration: none; }
a:hover { color: var(--ouro-hover); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
:focus-visible { outline: 2px solid var(--ouro); outline-offset: 2px; }
input::placeholder, textarea::placeholder { color: var(--mudo-2); }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Tela ---------- */
.tela {
  max-width: 640px;
  margin: 0 auto;
  padding: calc(20px + var(--seguro-topo)) 20px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.tela.com-nav { padding-bottom: calc(96px + var(--seguro-baixo)); }
.tela.com-acao { padding-bottom: calc(110px + var(--seguro-baixo)); }
.tela.com-nav.com-acao { padding-bottom: calc(170px + var(--seguro-baixo)); }
.carregando-tela { min-height: 70vh; display: flex; flex-direction: column; gap: 14px; align-items: center; justify-content: center; color: var(--mudo); padding: 24px; text-align: center; }
.giro { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--borda); border-top-color: var(--ouro); animation: giro .8s linear infinite; }
@keyframes giro { to { transform: rotate(360deg); } }

/* ---------- Tipografia e utilidades ---------- */
.titulo-grande { margin: 0; font: 600 26px/1.15 Sora, sans-serif; letter-spacing: -.02em; }
.titulo-medio { margin: 0; font: 600 22px/1.2 Sora, sans-serif; letter-spacing: -.02em; }
.t12 { font-size: 12px; } .t13 { font-size: 13px; } .t14 { font-size: 14px; } .t15 { font-size: 15px; }
.t16 { font-size: 16px; } .t18 { font-size: 18px; }
.b5 { font-weight: 500; } .b6 { font-weight: 600; } .b7 { font-weight: 700; } .b8 { font-weight: 800; }
.mudo { color: var(--mudo); } .mudo2 { color: var(--mudo-2); display: flex; } .claro { color: var(--claro); }
.verde { color: var(--verde); } .ouro { color: var(--ouro); } .ouro-claro { color: #F2D58E; } .ouro-mudo { color: #C9BE9E; }
.perigo { color: var(--perigo); }
.num12, .num13, .num14, .num15, .num16, .num17, .num22, .num24 { font-family: Sora, sans-serif; font-weight: 600; }
.num12 { font-size: 12px; font-weight: 500; } .num13 { font-size: 13px; } .num14 { font-size: 14px; font-weight: 500; }
.num15 { font-size: 15px; } .num16 { font-size: 16px; } .num17 { font-size: 17px; } .num22 { font-size: 22px; } .num24 { font-size: 24px; }
.numero-gigante { font: 600 48px/1 Sora, sans-serif; letter-spacing: -.03em; }
.rotulo { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--mudo); }
.secao { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ouro); }
.secao .mudo { font-weight: 700; }
.col { display: flex; flex-direction: column; }
.lin { display: flex; align-items: center; }
.lin-wrap { flex-wrap: wrap; }
.lin-entre { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.base { align-items: baseline; }
.flex1 { flex: 1; } .min0 { min-width: 0; } .ml-auto { margin-left: auto; } .mt6 { margin-top: 6px; }
.gap2 { gap: 2px; } .gap3 { gap: 3px; } .gap4 { gap: 4px; } .gap6 { gap: 6px; } .gap8 { gap: 8px; } .gap10 { gap: 10px; }
.gap12 { gap: 12px; } .gap16 { gap: 16px; } .gap18 { gap: 18px; } .gap22 { gap: 22px; }
.grade2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grade3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.corta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.texto-longo { white-space: pre-line; overflow-wrap: anywhere; margin: 0; line-height: 1.5; }
.centro { text-align: center; } .esq { justify-content: flex-start !important; } .texto-esq { text-align: left; }
.pad8 { padding: 8px; } .pad12 { padding: 12px 14px !important; }
.vazio { padding: 24px 16px; text-align: center; color: var(--mudo); font-size: 14px; border: 1px dashed var(--borda); border-radius: var(--raio); }
.divisor-topo { border-top: 1px solid var(--linha); padding-top: 12px; line-height: 1.5; }

/* ---------- Cartões ---------- */
.card {
  background: var(--sup);
  border: 1px solid var(--borda);
  border-radius: var(--raio);
  padding: 16px;
  color: var(--texto);
}
a.card, button.card { display: flex; transition: border-color .15s; width: 100%; }
a.card:hover, button.card:hover { border-color: #3A4352; color: var(--texto); }
.card-verde { background: #11201A; border-color: #24402F; }
.card-ouro { background: #1A1D16; border-color: #3A3320; }
.resumo-mes { border-radius: 22px; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.vazio-card { display: flex; flex-direction: column; gap: 12px; padding: 20px; }
.vazio-card p { margin: 0; }
.barra { height: 8px; border-radius: 4px; background: var(--borda); overflow: hidden; }
.barra-alerta { height: 100%; background: var(--perigo); border-radius: 4px; transition: width .8s var(--suave); }
.card-alerta { border-color: #5A2C22; }
.aviso-alerta { padding: 12px 14px; border-radius: 12px; background: var(--perigo-fundo); border: 1px solid #5A2C22; color: #F7C9BD; }
.aviso-alerta .b8 { color: var(--perigo); }
a.aviso-alerta { display: flex; }
[data-aviso-espaco]:empty { display: none; }
.aviso-alerta > svg { flex-shrink: 0; color: var(--perigo); }
a.aviso-alerta:hover { color: #F7C9BD; }
.barra-ouro { height: 100%; background: var(--ouro); border-radius: 4px; transition: width .8s var(--suave); }
.barra-verde { height: 100%; background: var(--verde); border-radius: 4px; transition: width .3s; }
.link-forte { font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }

/* ---------- Início ---------- */
.topo-inicio { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.avatar {
  width: 44px; height: 44px; border-radius: 22px; flex-shrink: 0;
  background: var(--sup-2); border: 1px solid var(--borda-2);
  display: flex; align-items: center; justify-content: center;
  font: 600 17px Sora, sans-serif; color: var(--ouro);
}
.aviso-demo {
  display: flex; align-items: center; gap: 8px; margin-top: -8px;
  padding: 8px 12px; border-radius: 10px; background: #1A1D16; border: 1px solid #3A3320;
  color: #E8DDBE; font-size: 12px; font-weight: 600;
}
.linha-cat { align-items: center; gap: 14px; padding: 14px 16px; min-height: 70px; }
.cat-icone { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cat-laranja { background: #2A2016; color: #F2994A; }
.cat-azul { background: #142531; color: var(--azul); }
.cat-roxo { background: #261C30; color: #C792EA; }
.cat-verde { background: var(--verde-fundo); color: var(--verde); }
.cat-rosa { background: #2C1820; color: #F28BB0; }
.cat-amarelo { background: #2A2614; color: #E8D25C; }
.cat-ciano { background: #12282A; color: #5CD6CF; }
.cat-lilas { background: #201E33; color: #A9A2F2; }
.pilula-aberta { font: 600 12px Sora, sans-serif; color: var(--ouro); background: var(--ouro-fundo); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.pilula-aberta.zero { color: var(--mudo); background: var(--sup-2); }

/* ---------- Busca, chips, abas, selects ---------- */
.busca {
  display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px;
  background: var(--sup); border: 1px solid var(--borda); border-radius: 14px; color: var(--mudo);
}
.busca:focus-within { border-color: #4A5363; }
.busca input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: var(--texto); font-size: 15px; }
.busca input::-webkit-search-cancel-button { filter: invert(.6); }
.chips-rolagem { display: flex; gap: 8px; overflow-x: auto; margin: 0 -20px; padding: 0 20px; scrollbar-width: none; }
.chips-rolagem::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--borda);
  background: var(--fundo-2); color: var(--claro); font-size: 13px; font-weight: 700;
}
.chip.ativo { background: var(--ouro-fundo); border-color: #5A4A22; color: var(--ouro); }
.chip-mini {
  min-height: 32px; padding: 4px 11px; border-radius: 8px; border: 1px solid var(--borda);
  background: var(--fundo-2); color: var(--claro); font-size: 12px; font-weight: 600;
}
.chip-mini:hover { border-color: #3A4352; }
.abas { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 4px; background: var(--sup); border: 1px solid var(--borda); border-radius: 14px; }
.aba { height: 40px; border: 0; border-radius: 10px; background: transparent; color: #B7C0CD; font-size: 13px; font-weight: 700; white-space: nowrap; }
.aba.ativa { background: var(--ouro); color: var(--ouro-texto); font-weight: 800; }
.aba-n { font-weight: 500; opacity: .75; }
.select-mini { position: relative; display: block; min-width: 0; }
.select-mini select {
  width: 100%; height: 40px; padding: 0 32px 0 12px; border-radius: 10px; border: 1px solid var(--borda);
  background: var(--fundo-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2398A2B3' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
  color: var(--texto); font-size: 13px; font-weight: 600; appearance: none; -webkit-appearance: none; text-overflow: ellipsis;
}
.select-mini.compacto select { height: 36px; width: auto; max-width: 190px; }
.select-mini option { background: var(--sup); }

/* ---------- Cartão de demanda e selos ---------- */
.cartao-demanda { flex-direction: column; gap: 6px; padding: 14px; }
.badge {
  display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 6px; white-space: nowrap; line-height: 1.4;
}
.b-recebida { color: var(--claro); background: #232A36; }
.b-encaminhada { color: var(--ouro); background: var(--ouro-fundo); }
.b-realizada { color: var(--verde); background: var(--verde-fundo); }
.b-encerrada { color: #C7B8E6; background: #231E30; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 16px; border-radius: 12px; border: 1px solid transparent;
  font-size: 14px; font-weight: 700; text-align: center; transition: filter .15s, border-color .15s;
}
.btn:hover:not(:disabled) { filter: brightness(1.08); }
.btn-grande { width: 100%; min-height: 56px; border-radius: 16px; font-size: 17px; font-weight: 800; }
.btn-peq { min-height: 40px; padding: 0 14px; font-size: 13px; }
.btn-pri { background: var(--ouro); color: var(--ouro-texto); font-weight: 800; }
a.btn-pri:hover { color: var(--ouro-texto); }
.btn-sec { background: var(--sup); border-color: var(--borda); color: var(--texto); }
a.btn-sec:hover { color: var(--texto); }
.btn-verde { background: var(--verde); color: var(--verde-texto); font-weight: 800; }
a.btn-verde:hover { color: var(--verde-texto); }
.btn-verde.btn-peq { background: var(--verde-fundo); color: var(--verde); }
.btn-verde-sec { background: var(--verde-fundo); border-color: #2E3A26; color: var(--verde); font-weight: 800; }
.btn-perigo { background: var(--perigo); color: #1E0A05; font-weight: 800; }
.btn-perigo-sec { background: var(--perigo-fundo); border-color: #4A2820; color: var(--perigo); }
.btn-contorno-ouro { background: transparent; border-color: #3A3320; color: #F2D58E; min-height: 42px; font-size: 13px; }
.btn-branco { background: #fff; color: #1F1F1F; font-weight: 800; }
.btn-texto { background: none; border: 0; padding: 8px 4px; min-height: 44px; font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; justify-content: center; }
.btn-texto.ouro { color: var(--ouro); padding: 6px 8px; min-height: 36px; font-size: 13px; }
.btn-texto.sublinhado { color: #B7C0CD; text-decoration: underline; font-weight: 600; font-size: 13px; }
.btn-icone {
  width: 44px; height: 44px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 0; color: var(--texto); border-radius: 12px; margin-left: -10px;
}
.btn-icone.redondo { margin: 0; border-radius: 22px; background: var(--sup); border: 1px solid var(--borda); }
.btn-icone.quadrado { margin: 0; border: 1px solid var(--borda); background: var(--fundo-2); color: var(--claro); }
.btn-icone.peq { width: 36px; height: 36px; margin: 0; color: var(--mudo); }
.btn.carregando { position: relative; color: transparent !important; }
.btn.carregando::after {
  content: ''; position: absolute; width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid rgba(0, 0, 0, .25); border-top-color: currentColor; animation: giro .7s linear infinite;
}
.btn-pri.carregando::after, .btn-verde.carregando::after { border-top-color: var(--ouro-texto); }
.btn-sec.carregando::after { border-color: var(--borda); border-top-color: var(--ouro); }

/* ---------- Barra de ação, navegação, FAB ---------- */
.barra-acao {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  padding: 12px 20px calc(14px + var(--seguro-baixo));
  background: linear-gradient(to top, var(--fundo) 75%, rgba(11, 14, 19, 0));
}
.barra-acao > * { max-width: 600px; margin: 0 auto; display: flex; }
.tela.com-nav ~ .barra-acao { bottom: calc(62px + var(--seguro-baixo)); padding-bottom: 10px; background: var(--fundo); }
.nav-inferior {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 21;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px;
  padding: 6px max(20px, calc(50% - 300px)) calc(8px + var(--seguro-baixo));
  background: var(--fundo); border-top: 1px solid #1E2430;
}
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; min-height: 48px; color: var(--mudo); font-size: 12px; font-weight: 600; }
.nav-item.ativo { color: var(--ouro); font-weight: 700; }
.nav-item:hover { color: var(--texto); }
.fab {
  position: fixed; right: max(20px, calc(50% - 300px)); bottom: calc(80px + var(--seguro-baixo)); z-index: 22;
  height: 56px; padding: 0 22px; border-radius: 18px; background: var(--ouro); color: var(--ouro-texto);
  display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 800; box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
}
.fab:hover { color: var(--ouro-texto); filter: brightness(1.08); }

/* ---------- Topo das telas internas ---------- */
.topo { display: flex; align-items: center; gap: 8px; }
.topo.entre { justify-content: space-between; }

/* ---------- Formulário ---------- */
.campo { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: #B7C0CD; min-width: 0; }
.campo input, .campo textarea, .seletor {
  width: 100%; min-height: 48px; padding: 0 14px; background: var(--sup); border: 1px solid var(--borda);
  border-radius: 12px; color: var(--texto); font-size: 16px; font-weight: 500; outline: none;
}
.campo textarea { padding: 12px 14px; line-height: 1.45; resize: vertical; min-height: 84px; }
.campo input:focus, .campo textarea:focus, .seletor:focus-visible { border-color: var(--ouro); outline: none; }
.campo input[type="date"] { font-family: Sora, sans-serif; font-weight: 600; }
.campo input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(.75); }
.campo.erro input, .campo.erro .seletor, .campo.erro textarea { border-color: var(--perigo); background: var(--perigo-fundo); }
.seletor { display: flex; align-items: center; gap: 10px; text-align: left; font-weight: 600; color: var(--texto); }
.seletor svg { color: var(--mudo); flex-shrink: 0; }
.seletor .ml-auto + svg { margin-left: 0; }
.seletor > span:first-child { flex: 1; }
.grade-rua { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); gap: 8px; }
.opcao-cat {
  min-height: 86px; padding: 10px 6px; overflow-wrap: anywhere; border-radius: 14px; border: 1px solid var(--borda); background: var(--sup);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  color: #C3CCDA; font-size: 13px; font-weight: 700; line-height: 1.2;
}
.opcao-cat.ativa { border: 1.5px solid var(--ouro); background: var(--ouro-fundo); color: var(--ouro); font-weight: 800; }
[data-cats].erro .opcao-cat { border-color: var(--perigo); }
.caixa-foto {
  min-height: 104px; border-radius: 14px; border: 1.5px dashed #3A4352; background: var(--fundo-2);
  color: var(--claro); font-size: 13px; font-weight: 700;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; cursor: pointer; text-align: center; padding: 8px;
}
.caixa-foto > svg { color: var(--ouro); }
.caixa-foto:hover { border-color: #5A6476; }
.caixa-foto.alta { min-height: 140px; }
.caixa-foto.linha { flex-direction: row; min-height: 56px; justify-content: flex-start; padding: 0 14px; }
.caixa-data { justify-content: space-between; min-height: 104px; padding: 14px; border: 1px solid var(--borda); border-radius: 14px; background: var(--sup); }
.caixa-data input { background: transparent; border: 0; padding: 0; min-height: 0; font-size: 17px; }
.miniatura { position: relative; width: 72px; height: 72px; }
.miniatura img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; border: 1px solid var(--borda-2); }
.mini-x { position: absolute; top: -8px; right: -8px; width: 28px; height: 28px; border-radius: 14px; border: 0; background: #000; color: #fff; display: flex; align-items: center; justify-content: center; }
.botao-card { align-items: center; gap: 12px; text-align: left; }
.interruptor { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 14px; border-radius: 12px; background: var(--sup); border: 1px solid var(--borda); font-size: 15px; font-weight: 600; cursor: pointer; }
.interruptor input { width: 22px; height: 22px; accent-color: var(--ouro); flex-shrink: 0; }
.interruptor.destaque { background: #1A1D16; border-color: #3A3320; color: #F2D58E; }
.aviso-verde { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #142019; border: 1px solid #2E3A26; border-radius: 12px; font-size: 13px; color: #C9E9D8; }
.aviso-verde svg { color: var(--verde); flex-shrink: 0; }
.aviso-ouro { padding: 14px; border-radius: 16px; background: #1A1D16; border: 1px solid #3A3320; }
.aviso-ouro > svg, .aviso-ouro .lin > svg { color: var(--ouro); flex-shrink: 0; }
.parecida { padding: 12px; border-radius: 12px; background: #12150F; }
.parecida .badge { vertical-align: 1px; }

/* ---------- Painel inferior ---------- */
#sheet-root { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
#sheet-root.aberto { pointer-events: auto; }
.sheet-fundo { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); animation: aparecer .15s ease-out; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 640px; max-height: 88vh; overflow-y: auto;
  background: var(--fundo-2); border: 1px solid var(--borda); border-bottom: 0; border-radius: 22px 22px 0 0;
  padding: 10px 20px calc(20px + var(--seguro-baixo)); display: flex; flex-direction: column; gap: 14px;
  animation: subir .2s ease-out;
}
@media (min-width: 700px) {
  .sheet { bottom: auto; top: 50%; transform: translateY(-50%); border-radius: 22px; border-bottom: 1px solid var(--borda); animation: aparecer .15s ease-out; }
}
@keyframes subir { from { transform: translateY(40px); opacity: 0; } }
@keyframes aparecer { from { opacity: 0; } }
.sheet-pegador { width: 40px; height: 4px; border-radius: 2px; background: #3A4352; margin: 0 auto 4px; }
.sheet-titulo { margin: 0; font: 600 20px Sora, sans-serif; }
.sheet-texto { margin: 0; color: var(--claro); font-size: 14px; line-height: 1.5; }
.sheet-acoes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 4px; }
.lista-bairros { display: flex; flex-direction: column; margin: 0 -8px; }
.rotulo-lista { margin: 14px 8px 4px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ouro); }
.item-bairro { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent; text-align: left; font-size: 15px; font-weight: 600; }
.item-bairro:hover { background: var(--sup); }
.item-bairro.novo { color: var(--ouro); }
.item-bairro.novo > span:first-child { display: flex; align-items: center; gap: 6px; }
.lista-ligar .card { color: var(--texto); }
.dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0; font-size: 14px; }
.dl dt { color: var(--mudo); } .dl dd { margin: 0; }
.foto-grande { position: relative; min-height: 120px; display: flex; align-items: center; justify-content: center; background: #000; border-radius: 14px; overflow: hidden; }
.foto-grande img { width: 100%; max-height: 58vh; object-fit: contain; display: block; }
.foto-grande.carregando-original img { filter: blur(1px) brightness(.8); }
.foto-status { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 6px 12px; border-radius: 999px; background: rgba(11, 14, 19, .85); color: var(--texto); font-size: 12px; font-weight: 700; }

/* ---------- Detalhe ---------- */
.etapas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 18px 12px; border-radius: 18px; }
.etapa { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; color: #B7C0CD; }
.etapa-bola { width: 30px; height: 30px; border-radius: 15px; border: 2px dashed #4A5363; display: flex; align-items: center; justify-content: center; }
.etapa.feita { color: var(--texto); }
.etapa.feita .etapa-bola { border: 0; background: var(--verde); color: var(--fundo); }
.etapa.feita.atual:not(.final) .etapa-bola { background: var(--ouro); color: var(--ouro-texto); }
.etapa.encerrada .etapa-bola { background: #3A3150; color: #C7B8E6; }
.pad-lista { padding: 6px 16px; }
.pad-lista > .lin-entre { margin-top: 8px; }
.linha-info { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--linha); }
.linha-info.sem-borda { border-bottom: 0; }
.foto { position: relative; height: 140px; border-radius: 14px; border: 1px solid var(--borda-2); background: var(--sup-2); overflow: hidden; padding: 0; display: flex; align-items: center; justify-content: center; color: var(--mudo-2); }
.foto img { width: 100%; height: 100%; object-fit: cover; }
.foto-rotulo { position: absolute; left: 8px; bottom: 8px; font-size: 11px; font-weight: 800; background: rgba(11, 14, 19, .85); color: var(--texto); padding: 3px 7px; border-radius: 6px; text-transform: uppercase; }
.historico { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.historico li { display: flex; gap: 14px; }
.hist-trilho { display: flex; flex-direction: column; align-items: center; width: 12px; }
.hist-ponto { width: 10px; height: 10px; border-radius: 5px; margin-top: 5px; flex-shrink: 0; }
.hist-linha { width: 2px; flex: 1; background: var(--borda); margin: 4px 0; }
.historico li:last-child .hist-linha { background: transparent; }
.hist-corpo { flex: 1; padding-bottom: 18px; min-width: 0; }
.p-verde { background: var(--verde); } .p-ouro { background: var(--ouro); } .p-azul { background: var(--azul); } .p-cinza { background: #98A2B3; }

/* ---------- Relatório ---------- */
.seletor-mes { display: flex; align-items: center; justify-content: space-between; background: var(--sup); border: 1px solid var(--borda); border-radius: 14px; padding: 4px; }
.seletor-mes .btn-icone { margin: 0; }
.mes-select { flex: 1; display: flex; justify-content: center; }
.mes-select select {
  appearance: none; -webkit-appearance: none; background: transparent; border: 0; color: var(--texto);
  font: 600 17px Sora, sans-serif; text-align: center; text-align-last: center; padding: 8px 22px 8px 8px; cursor: pointer;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2398A2B3' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 2px center;
}
.mes-select option { background: var(--sup); color: var(--texto); }
.contagem { font-size: 12px; color: var(--claro); white-space: nowrap; background: var(--ouro-fundo); padding: 3px 9px; border-radius: 999px; }
.contagem b { font: 700 15px Sora, sans-serif; color: var(--ouro); }
.contagem.zero { background: var(--sup-2); color: var(--mudo); }
.contagem.zero b { color: var(--mudo); }
.grupo-zero { padding: 6px 0; border-top: 1px solid var(--linha); }
.chips-linha { display: flex; flex-wrap: wrap; gap: 6px; }
.chips-linha .chip { height: 32px; font-size: 12px; padding: 0 12px; }
.busca-peq { height: 42px; }
.gap14 { gap: 14px; }
.grupo { width: 100%; background: none; border: 0; padding: 4px 0; text-align: left; color: var(--texto); border-radius: 8px; }
button.grupo:hover .t15 { color: var(--ouro); }
.barra-dupla { height: 12px; border-radius: 6px; background: #1E2430; display: flex; overflow: hidden; }
.seg-verde { background: var(--verde); } .seg-ouro { background: var(--ouro); } .seg-cinza { background: #5C5470; }
.legenda { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: #B7C0CD; border-top: 1px solid var(--linha); padding-top: 12px; }
.legenda span { display: flex; align-items: center; gap: 6px; }
.legenda i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.q-verde { background: var(--verde); } .q-ouro { background: var(--ouro); } .q-cinza { background: #5C5470; }
.layout-relatorio { display: flex; flex-direction: column; gap: 22px; }
@media (min-width: 960px) {
  .tela.larga { max-width: 1120px; }
  .layout-relatorio { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; gap: 24px; }
  .coluna-b { position: sticky; top: 20px; }
}

/* ---------- Login ---------- */
.tela-login { min-height: 92vh; justify-content: center; align-items: stretch; max-width: 420px; gap: 18px; }
.tela-login p { margin: 0; }
.logo-grande { width: 72px; height: 72px; border-radius: 20px; margin: 0 auto; background: var(--ouro); color: var(--ouro-texto); display: flex; align-items: center; justify-content: center; font: 700 34px Sora, sans-serif; }
.alternativa summary { cursor: pointer; text-align: center; padding: 8px; }
.alternativa form { margin-top: 10px; }

/* ---------- Aparelhos ---------- */
.codigo-aparelho { align-items: stretch; padding: 20px; }
.codigo-grande { font: 600 38px/1.1 Sora, sans-serif; letter-spacing: .08em; text-align: center; color: var(--ouro); user-select: all; }
.codigo-medio { font: 600 17px Sora, sans-serif; letter-spacing: .06em; color: var(--texto); }
.linha-aparelho { display: flex; align-items: center; gap: 10px; }
.pad-lista > .linha-info:last-child { border-bottom: 0; }
.selo-este { white-space: nowrap; display: inline-block; font-size: 11px; font-weight: 800; color: var(--verde); background: var(--verde-fundo); padding: 2px 7px; border-radius: 6px; margin-left: 4px; }
.giro.peq { width: 16px; height: 16px; border-width: 2px; }
.centro-flex { justify-content: center; }

/* ---------- Aviso (toast) ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(150px + var(--seguro-baixo)); transform: translate(-50%, 20px);
  max-width: min(92vw, 520px); padding: 12px 16px; border-radius: 12px; z-index: 60;
  background: #ECEFF4; color: #0B0E13; font-size: 14px; font-weight: 700; text-align: center;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
}
.toast.mostrar { opacity: 1; transform: translate(-50%, 0); }
.toast.t-erro { background: #F7C9BD; color: #3A0F05; }

/* ==========================================================================
   Animações
   ========================================================================== */
:root {
  --suave: cubic-bezier(.22, 1, .36, 1);     /* desaceleração natural */
  --mola: cubic-bezier(.34, 1.56, .64, 1);   /* leve "quique" */
}

/* Entrada das telas, conforme a direção da navegação */
.tela.entra-frente { animation: entra-frente .34s var(--suave) both; }
.tela.entra-tras { animation: entra-tras .3s var(--suave) both; }
.tela.entra-lado, .tela.entra-inicio { animation: entra-lado .3s var(--suave) both; }
@keyframes entra-frente { from { opacity: 0; transform: translateX(28px); } }
@keyframes entra-tras { from { opacity: 0; transform: translateX(-28px); } }
@keyframes entra-lado { from { opacity: 0; transform: translateY(10px); } }

/* Blocos aparecendo em sequência */
.surge { animation: surge .42s var(--suave) both; animation-delay: calc(var(--i, 0) * 38ms + 40ms); }
@keyframes surge { from { opacity: 0; transform: translateY(12px); } }

/* Toque: tudo que é tocável responde ao dedo */
.btn, a.card, button.card, .chip, .chip-mini, .aba, .opcao-cat, .nav-item, .fab, .btn-icone,
.item-bairro, .caixa-foto, .foto, .interruptor, .seletor, .grupo, .avatar, .btn-texto {
  transition: transform .14s var(--suave), filter .15s, background-color .18s, border-color .18s, color .18s, box-shadow .18s;
}
.btn:active:not(:disabled), .chip:active, .chip-mini:active, .aba:active, .fab:active, .btn-icone:active,
.avatar:active, .btn-texto:active { transform: scale(.95); }
a.card:active, button.card:active, .opcao-cat:active, .caixa-foto:active, .foto:active,
.item-bairro:active, .interruptor:active, .seletor:active, .grupo:active { transform: scale(.982); }
.nav-item:active svg { transform: scale(.85); }
.nav-item svg { transition: transform .2s var(--mola); }
.nav-item.ativo svg { animation: pula .45s var(--mola) .05s both; }
@keyframes pula { 0% { transform: scale(.7); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }

/* Abas e seleção ganham transição de cor */
.chip.ativo, .opcao-cat.ativa { animation: seleciona .32s var(--mola); }
.aba { transition: background-color .22s var(--suave), color .22s; }
@keyframes seleciona { 0% { transform: scale(.94); } 100% { transform: scale(1); } }
.pisca { animation: pisca-anel .5s var(--suave); }
@keyframes pisca-anel { 0% { box-shadow: 0 0 0 0 rgba(242, 181, 68, .55); } 100% { box-shadow: 0 0 0 10px rgba(242, 181, 68, 0); } }

/* Barras que enchem */
.barra-verde, .seg-verde, .seg-ouro, .seg-cinza { transition: width .8s var(--suave); }

/* Campos com erro tremem uma vez */
.treme { animation: treme .42s; }
@keyframes treme { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.campo input, .campo textarea { transition: border-color .18s, background-color .18s, box-shadow .18s; }
.campo input:focus, .campo textarea:focus { box-shadow: 0 0 0 3px rgba(242, 181, 68, .16); }

/* Aviso de demanda parecida desliza para dentro */
.aviso-entra { animation: aviso-entra .45s var(--mola) both; }
@keyframes aviso-entra { from { opacity: 0; transform: translateY(-8px) scale(.97); } }
.aviso-verde { animation: surge .35s var(--suave) both; }

/* Miniatura de foto nova */
.mini-entra { animation: mini-entra .4s var(--mola) both; }
@keyframes mini-entra { from { opacity: 0; transform: scale(.6); } }
.foto img { opacity: 0; transition: opacity .35s; }
.foto img.ok { opacity: 1; }

/* Andamento: a etapa que acabou de mudar pulsa */
.etapa.mudou .etapa-bola { animation: etapa-pop .6s var(--mola) both; }
.etapa.mudou .etapa-bola::after {
  content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid currentColor;
  animation: etapa-anel .8s var(--suave) .1s both;
}
.etapa-bola { position: relative; }
.etapa.feita .etapa-bola::after { color: var(--verde); }
.etapa.feita.atual:not(.final) .etapa-bola::after { color: var(--ouro); }
@keyframes etapa-pop { 0% { transform: scale(.4); } 70% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes etapa-anel { from { opacity: .9; transform: scale(.8); } to { opacity: 0; transform: scale(1.9); } }

/* Painel inferior: sobe ao abrir e desce ao fechar */
.sheet { animation: subir .3s var(--suave); }
#sheet-root.fechando .sheet { animation: descer .19s ease-in both; }
#sheet-root.fechando .sheet-fundo { animation: sumir .19s ease-in both; }
@keyframes descer { to { transform: translateY(60px); opacity: 0; } }
@keyframes sumir { to { opacity: 0; } }
@media (min-width: 700px) {
  .sheet { animation: aparecer-centro .22s var(--suave); }
  #sheet-root.fechando .sheet { animation: sumir .16s ease-in both; }
}
@keyframes aparecer-centro { from { opacity: 0; transform: translateY(calc(-50% + 12px)) scale(.98); } }

/* Aviso (toast) com leve mola */
.toast { transition: opacity .22s, transform .32s var(--mola); }

/* Comemoração: selo com check que se desenha */
.celebra {
  position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center;
  background: rgba(11, 14, 19, .55); pointer-events: none; animation: aparecer .18s ease-out;
}
.celebra.saindo { animation: sumir .25s ease-in both; }
.celebra-caixa {
  display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 28px 34px;
  border-radius: 24px; background: var(--sup); border: 1px solid var(--borda); box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
  animation: celebra-caixa .5s var(--mola) both;
}
@keyframes celebra-caixa { from { opacity: 0; transform: scale(.7); } }
.celebra-check { width: 76px; height: 76px; }
.celebra-circulo { fill: none; stroke-width: 3; stroke-dasharray: 145; stroke-dashoffset: 145; animation: desenha .55s var(--suave) .12s forwards; }
.celebra-traco { fill: none; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: desenha .35s var(--suave) .55s forwards; }
.celebra-verde .celebra-circulo, .celebra-verde .celebra-traco { stroke: var(--verde); }
.celebra-ouro .celebra-circulo, .celebra-ouro .celebra-traco { stroke: var(--ouro); }
.celebra-texto { font: 600 18px Sora, sans-serif; color: var(--texto); animation: surge .4s var(--suave) .45s both; }
@keyframes desenha { to { stroke-dashoffset: 0; } }

/* Carregamento suave */
.carregando-tela { animation: aparecer .3s ease-out .15s both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
