/* =============================================================
   Alarme de Incêndio — estilos
   Identidade: preto profundo, vermelho de sirene, gradiente de chama.
   ============================================================= */

@font-face { font-family: "Montserrat"; src: url("../fonts/montserrat-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/montserrat-latin-900-normal.woff2") format("woff2"); font-weight: 900; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/montserrat-latin-900-italic.woff2") format("woff2"); font-weight: 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/figtree-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/figtree-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/figtree-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/figtree-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --fundo: #0a0404;
  --fundo-brasa: #1f0705;
  --superficie: #140303;
  --superficie-elevada: #241010;
  --borda-sutil: #5b0000;
  --borda-brasa: #db110f;
  --vermelho-alarme: #e10600;
  --vermelho-profundo: #a80000;
  --vermelho-vivo: #ff4a2e;
  --chama-laranja: #f67f01;
  --chama-amarela: #f8d71a;
  --faisca: #ffab10;
  --texto: #f5f2f1;
  --texto-prata: #dcd6d5;
  --texto-suave: #b3a3a1;
  --texto-sobre-alarme: #ffffff;
  --foco: #f8d71a;
  --status-seguro: #5ec8ff;
  --status-atencao: #f67f01;
  --status-perigo: #ff4a2e;

  --gradiente-incendio: linear-gradient(180deg, #f8d71a 0%, #f67f01 48%, #fb0d0d 100%);
  --gradiente-botao: linear-gradient(180deg, #ff3a0a 0%, #e10600 45%, #a80000 100%);
  --gradiente-fundo: radial-gradient(ellipse 90% 60% at 50% 0%, #3a0501 0%, #1f0705 38%, #0a0404 78%);
  --gradiente-listra: linear-gradient(135deg, #9e0500 0%, #fb6101 60%, #ffab10 100%);

  --brilho-card: 0 0 0 2px #db110f, 0 0 28px rgba(255, 60, 0, .45), inset 0 0 40px rgba(225, 6, 0, .18);
  --brilho-botao: 0 0 0 2px #ff7a4d, 0 0 32px rgba(255, 40, 0, .55), inset 0 2px 0 rgba(255, 228, 153, .55);
  --brilho-botao-hover: 0 0 0 2px #ffab10, 0 0 48px rgba(255, 90, 0, .7), inset 0 2px 0 rgba(255, 228, 153, .7);
  --anel-foco: 0 0 0 3px #0a0404, 0 0 0 6px #f8d71a;
  --sombra-profunda: 0 24px 64px rgba(0, 0, 0, .6);

  --espaco-1: 4px; --espaco-2: 8px; --espaco-3: 12px; --espaco-4: 16px;
  --espaco-5: 24px; --espaco-6: 32px; --espaco-7: 48px; --espaco-8: 64px;
  --raio-sm: 8px; --raio-md: 12px; --raio-botao: 18px; --raio-card: 28px; --raio-pilula: 999px;

  --font-display: Montserrat, "Arial Black", system-ui, sans-serif;
  --font-texto: Figtree, "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  background: var(--fundo) var(--gradiente-fundo) no-repeat fixed;
  color: var(--texto); font: 400 16px/1.5 var(--font-texto);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; line-height: 1.1; }
h1 { font-size: clamp(30px, 6vw, 44px); font-weight: 900; letter-spacing: -.01em; }
h2 { font-size: clamp(24px, 4vw, 32px); font-weight: 800; }
h3 { font-size: 22px; font-weight: 800; }
h4 { font-size: 18px; font-weight: 800; }
p { margin: 0; }
a { color: var(--vermelho-vivo); font-weight: 600; text-underline-offset: 3px; text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--foco); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.suave { color: var(--texto-suave); }
.pequeno { font-size: 14px; }
.centro { text-align: center; }
.pilha > * + * { margin-top: var(--espaco-4); }
.pilha-lg > * + * { margin-top: var(--espaco-5); }
.linha { display: flex; flex-wrap: wrap; gap: var(--espaco-3); align-items: center; }
.entre { justify-content: space-between; }
.oculto, [hidden] { display: none !important; }

/* ---------- Decoração: listras diagonais nos cantos ---------- */
.listras { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.listras i { position: absolute; width: 360px; height: 16px; background: var(--gradiente-listra); transform: rotate(-45deg); opacity: .85; border-radius: 4px; box-shadow: 0 0 24px rgba(255, 90, 0, .5); }
.listras i:nth-child(1) { top: 0; left: -190px; }
.listras i:nth-child(2) { top: 44px; left: -220px; height: 8px; opacity: .5; }
.listras i:nth-child(3) { bottom: 70px; right: -110px; }
.listras i:nth-child(4) { bottom: 120px; right: -150px; height: 8px; opacity: .5; }

/* ---------- Botões ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: var(--espaco-4);
  min-height: 56px; padding: 0 var(--espaco-6); border: 0; border-radius: var(--raio-botao); cursor: pointer;
  font: 800 17px/1 var(--font-display); letter-spacing: .04em; text-transform: uppercase; text-decoration: none !important;
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease, filter .2s ease;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.btn:focus-visible { outline: none; box-shadow: var(--anel-foco); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none !important; filter: grayscale(.4); }
.btn-primario {
  background: var(--gradiente-botao); color: var(--texto-sobre-alarme);
  box-shadow: var(--brilho-botao), 0 6px 0 #5a0000;             /* profundidade 3D */
}
.btn-primario:hover:not(:disabled) { box-shadow: var(--brilho-botao-hover), 0 6px 0 #5a0000; transform: translateY(-1px); }
.btn-primario:active:not(:disabled) { transform: translateY(5px); box-shadow: var(--brilho-botao), 0 1px 0 #5a0000; }
.btn-primario:focus-visible { box-shadow: var(--anel-foco), var(--brilho-botao); }
.btn-secundario { background: rgba(20, 3, 3, .6); color: var(--texto); box-shadow: inset 0 0 0 2px var(--borda-brasa); }
.btn-secundario:hover:not(:disabled) { background: var(--superficie-elevada); box-shadow: inset 0 0 0 2px var(--chama-laranja); }
.btn-fantasma { background: transparent; color: var(--vermelho-vivo); padding: 0 var(--espaco-4); min-height: 44px; }
.btn-fantasma:hover:not(:disabled) { background: var(--superficie-elevada); }
.btn-seguro { background: #0d2a3a; color: #dff4ff; box-shadow: inset 0 0 0 2px var(--status-seguro); }
.btn-seguro:hover:not(:disabled) { background: #123a50; }
.btn-lg { min-height: 72px; font-size: 22px; padding: 0 var(--espaco-6); width: 100%; }
.btn-pq { min-height: 44px; font-size: 14px; padding: 0 var(--espaco-4); border-radius: var(--raio-md); }
.btn-bloco { width: 100%; }
.btn .icone { width: 1.5em; height: 1.5em; flex: none; }
.btn .divisor { width: 2px; align-self: stretch; margin: 16px 0; background: currentColor; opacity: .75; border-radius: 1px; }

/* ---------- Formulários ---------- */
.campo { display: flex; flex-direction: column; gap: var(--espaco-2); }
.campo label { font: 700 13px/1.2 var(--font-texto); letter-spacing: .08em; text-transform: uppercase; color: var(--texto-prata); }
.campo input, .campo select, .campo textarea {
  width: 100%; min-height: 52px; padding: var(--espaco-3) var(--espaco-4);
  background: var(--superficie-elevada); color: var(--texto); border: 1.5px solid var(--borda-sutil); border-radius: var(--raio-md);
  font: 400 17px/1.4 var(--font-texto); transition: border-color .15s ease, box-shadow .15s ease;
}
.campo textarea { min-height: 96px; resize: vertical; }
.campo input::placeholder, .campo textarea::placeholder { color: var(--texto-suave); opacity: 1; }
.campo input:hover, .campo textarea:hover { border-color: var(--borda-brasa); }
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: none; border-color: var(--chama-amarela); box-shadow: 0 0 0 3px rgba(248, 215, 26, .35); }
.campo .ajuda { font-size: 14px; color: var(--texto-suave); }
.campo.erro input { border-color: var(--borda-brasa); }
.campo.erro .ajuda { color: var(--vermelho-vivo); font-weight: 600; }
.caixa-check { display: flex; gap: var(--espaco-3); align-items: flex-start; cursor: pointer; font-size: 15px; }
.caixa-check input { width: 22px; height: 22px; accent-color: var(--vermelho-alarme); margin: 1px 0 0; flex: none; }

/* ---------- Cartões ---------- */
.cartao {
  position: relative; background: linear-gradient(180deg, rgba(36, 8, 6, .85), rgba(20, 3, 3, .92));
  border-radius: var(--raio-card); padding: var(--espaco-5); box-shadow: inset 0 0 0 1px var(--borda-sutil), 0 18px 40px rgba(0, 0, 0, .35);
}
.cartao-destaque { box-shadow: var(--brilho-card), var(--sombra-profunda); }
.cartao-titulo { font: 800 20px/1.2 var(--font-display); margin-bottom: var(--espaco-4); }

/* ---------- Selos de status ---------- */
.selo {
  display: inline-flex; align-items: center; gap: var(--espaco-2); min-height: 28px; padding: 0 var(--espaco-3); white-space: nowrap;
  border-radius: var(--raio-pilula); font: 700 12px/1 var(--font-texto); letter-spacing: .06em; text-transform: uppercase;
  background: var(--superficie-elevada); color: var(--texto-suave); box-shadow: inset 0 0 0 1.5px currentColor;
}
.selo::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.selo-perigo { color: var(--status-perigo); }
.selo-perigo::before { animation: pulso 1s ease-in-out infinite; }
.selo-atencao { color: var(--status-atencao); }
.selo-seguro { color: var(--status-seguro); }

/* ---------- Avisos ---------- */
.aviso { display: flex; gap: var(--espaco-3); align-items: flex-start; padding: var(--espaco-4); border-radius: var(--raio-md); background: var(--superficie-elevada); box-shadow: inset 0 0 0 1.5px var(--borda-sutil); font-size: 15px; }
.aviso strong { display: block; }
.aviso-erro { box-shadow: inset 0 0 0 1.5px var(--borda-brasa); }
.aviso-erro strong { color: var(--vermelho-vivo); }
.aviso-ok { box-shadow: inset 0 0 0 1.5px var(--status-seguro); }
.aviso-ok strong { color: var(--status-seguro); }
.aviso-atencao { box-shadow: inset 0 0 0 1.5px var(--chama-laranja); }
.aviso-atencao strong { color: var(--chama-laranja); }

/* =============================================================
   Sirene 3D
   ============================================================= */
.sirene { position: relative; width: 150px; height: 150px; margin: 0 auto; perspective: 500px; }
.sirene-raios {
  position: absolute; left: 50%; top: 40%; width: 420px; height: 420px; transform: translate(-50%, -50%);
  border-radius: 50%; pointer-events: none;
  background: conic-gradient(from 0deg, transparent 0 20deg, rgba(255, 70, 0, .35) 32deg, transparent 50deg 200deg, rgba(255, 70, 0, .35) 212deg, transparent 230deg);
  -webkit-mask: radial-gradient(circle, #000 0 30%, transparent 70%); mask: radial-gradient(circle, #000 0 30%, transparent 70%);
  animation: giro 1.4s linear infinite;
}
.sirene-halo {
  position: absolute; left: 50%; top: 40%; width: 280px; height: 280px; transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 220, 140, .85) 0%, rgba(255, 70, 0, .55) 16%, rgba(225, 6, 0, 0) 62%);
  animation: piscar 1.4s ease-in-out infinite;
}
.sirene-cupula {
  position: absolute; left: 20px; right: 20px; top: 8px; height: 104px; border-radius: 56px 56px 12px 12px; overflow: hidden;
  background: linear-gradient(90deg, #7a0000 0%, #d40800 22%, #ff4a1a 38%, #e10600 60%, #8a0000 100%);
  box-shadow: inset 0 0 0 2px rgba(255, 130, 90, .55), inset 0 -18px 30px rgba(80, 0, 0, .65), 0 0 40px rgba(255, 40, 0, .6);
}
.sirene-cupula::before { /* reflexo do vidro */
  content: ""; position: absolute; left: 16%; top: 10%; width: 18%; height: 70%; border-radius: 40px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0)); filter: blur(1px);
}
.sirene-cupula::after { /* lâmpada */
  content: ""; position: absolute; left: 50%; top: 56%; width: 40px; height: 40px; transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, #ffe499 30%, rgba(255, 90, 0, .9) 55%, rgba(255, 90, 0, 0) 72%);
  animation: piscar .7s ease-in-out infinite;
}
.sirene-feixe { position: absolute; inset: 0; background: linear-gradient(90deg, transparent 0 30%, rgba(255, 230, 170, .55) 45%, transparent 60%); animation: varrer 1.4s linear infinite; mix-blend-mode: screen; }
.sirene-base {
  position: absolute; left: 6px; right: 6px; top: 106px; height: 38px; border-radius: 12px;
  background: linear-gradient(180deg, #3a3a3a 0%, #121212 45%, #050505 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .22), 0 14px 24px rgba(0, 0, 0, .7);
}
.sirene-base::after { content: ""; position: absolute; left: 10%; right: 10%; bottom: -6px; height: 8px; border-radius: 50%; background: rgba(0, 0, 0, .6); filter: blur(4px); }
.sirene.parada .sirene-raios, .sirene.parada .sirene-feixe { display: none; }
.sirene.parada .sirene-halo { animation: none; opacity: .35; }
.sirene.parada .sirene-cupula::after { animation: none; opacity: .5; }
.sirene-mini { width: 96px; height: 96px; }
.sirene-mini .sirene-raios { width: 240px; height: 240px; }
.sirene-mini .sirene-halo { width: 170px; height: 170px; }
.sirene-mini .sirene-cupula { left: 13px; right: 13px; top: 6px; height: 66px; border-radius: 36px 36px 8px 8px; }
.sirene-mini .sirene-cupula::after { width: 26px; height: 26px; }
.sirene-mini .sirene-base { left: 4px; right: 4px; top: 68px; height: 24px; border-radius: 8px; }

@keyframes giro { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes piscar { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
@keyframes varrer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@keyframes pulso { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@keyframes tremor { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-4px) rotate(-1deg); } 40% { transform: translateX(4px) rotate(1deg); } 60% { transform: translateX(-3px); } 80% { transform: translateX(3px); } }
@keyframes flutuar { 0%, 100% { transform: rotateX(4deg) translateY(0); } 50% { transform: rotateX(4deg) translateY(-6px); } }
@keyframes entrar { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }

/* =============================================================
   Títulos 3D do alerta
   ============================================================= */
.titulo-alerta { display: flex; flex-direction: column; align-items: center; gap: 4px; container-type: inline-size; width: 100%; margin: 0; }
.titulo-alerta .l1 {
  display: inline-flex; align-items: center; gap: .22em; font: 900 min(10.5cqi, 52px)/.95 var(--font-display); text-transform: uppercase; letter-spacing: -.01em;
  background: linear-gradient(180deg, #ffffff 0%, #e9e6e5 45%, #a9a2a1 55%, #f2efee 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 #6b6362) drop-shadow(0 4px 0 #3a3333) drop-shadow(0 8px 10px rgba(0, 0, 0, .6));
}
.titulo-alerta .l1 svg { width: 1.3em; height: 1.14em; flex: none; filter: drop-shadow(0 0 12px rgba(255, 60, 0, .7)); }
.titulo-alerta .l2 {
  display: block; padding: 0 .1em; font: italic 900 min(15.5cqi, 80px)/1.02 var(--font-display); text-transform: uppercase; letter-spacing: -.02em;
  background: var(--gradiente-incendio); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 #b30000) drop-shadow(0 4px 0 #7a0000) drop-shadow(0 6px 0 #4a0000) drop-shadow(0 10px 18px rgba(255, 60, 0, .45));
}

/* =============================================================
   Tela de alerta em tela cheia
   ============================================================= */
.tela-alerta {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; overflow-y: auto;
  padding: calc(110px + env(safe-area-inset-top)) var(--espaco-4) calc(var(--espaco-5) + env(safe-area-inset-bottom));
  background: var(--gradiente-fundo), var(--fundo);
}
.tela-alerta::before { /* pulso vermelho de fundo */
  content: ""; position: fixed; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 30%, rgba(225, 6, 0, .35), transparent 70%); animation: piscar 1.4s ease-in-out infinite;
}
.alerta-palco { perspective: 1200px; width: 100%; max-width: 560px; position: relative; z-index: 1; }
.alerta-card {
  position: relative; text-align: center; border-radius: var(--raio-card);
  background: linear-gradient(180deg, rgba(28, 4, 4, .94), rgba(10, 4, 4, .97));
  box-shadow: var(--brilho-card), var(--sombra-profunda);
  padding: 96px var(--espaco-5) var(--espaco-6);
  transform-style: preserve-3d; animation: entrar .45s ease-out both;
}
.alerta-card .sirene { position: absolute; left: 50%; top: 0; transform: translate(-50%, -64%); }
.alerta-card.ativo .l2 { animation: tremor .6s ease-in-out 3; }
.alerta-msg { margin: var(--espaco-5) auto var(--espaco-6); max-width: 30ch; font: 500 clamp(18px, 4.6vw, 22px)/1.35 var(--font-texto); }
.alerta-rodape { margin-top: var(--espaco-4); font-size: 14px; color: var(--texto-suave); }
.selo-simulado { position: absolute; top: var(--espaco-4); right: var(--espaco-4); }
.alerta-card.confirmado { box-shadow: 0 0 0 2px var(--status-seguro), 0 0 28px rgba(94, 200, 255, .3), var(--sombra-profunda); }
.confirmado-ok { display: flex; flex-direction: column; align-items: center; gap: var(--espaco-3); }
.confirmado-ok .check { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: #0d2a3a; box-shadow: inset 0 0 0 2px var(--status-seguro); color: var(--status-seguro); }
.confirmado-ok strong { font: 800 22px/1.2 var(--font-display); color: var(--status-seguro); text-transform: uppercase; }
.toque-som { position: fixed; left: 50%; bottom: var(--espaco-4); transform: translateX(-50%); z-index: 60; }

@media (min-width: 768px) {
  .alerta-card { padding: 104px var(--espaco-7) var(--espaco-7); }
}

/* =============================================================
   Área do usuário (index.php)
   ============================================================= */
.pagina-usuario { position: relative; z-index: 1; max-width: 520px; margin: 0 auto; padding: calc(var(--espaco-5) + env(safe-area-inset-top)) max(var(--espaco-4), env(safe-area-inset-right)) calc(var(--espaco-7) + env(safe-area-inset-bottom)) max(var(--espaco-4), env(safe-area-inset-left)); }
.topo-usuario { display: flex; align-items: center; justify-content: space-between; gap: var(--espaco-3); margin-bottom: var(--espaco-5); }
.marca { display: inline-flex; align-items: center; gap: var(--espaco-3); font: 900 16px/1 var(--font-display); color: var(--texto); text-transform: uppercase; letter-spacing: .02em; text-decoration: none !important; }
.marca svg { width: 34px; height: 30px; }
.heroi { text-align: center; padding-top: 60px; }
.heroi .sirene { margin-bottom: var(--espaco-5); }
.heroi p { margin-top: var(--espaco-4); font-size: 18px; color: var(--texto-prata); }
.monitor { display: flex; align-items: center; gap: var(--espaco-4); }
.monitor .radar { position: relative; width: 48px; height: 48px; flex: none; border-radius: 50%; background: #0d2a3a; box-shadow: inset 0 0 0 2px var(--status-seguro); }
.monitor .radar::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 0 rgba(94, 200, 255, .6); animation: onda 2s ease-out infinite; }
.monitor .radar svg { position: absolute; left: 12px; top: 12px; width: 24px; height: 24px; color: var(--status-seguro); }
.monitor.desligado .radar { background: #2a1606; box-shadow: inset 0 0 0 2px var(--chama-laranja); }
.monitor.desligado .radar::after { animation: none; }
.monitor.desligado .radar svg { color: var(--chama-laranja); }
@keyframes onda { to { box-shadow: 0 0 0 18px rgba(94, 200, 255, 0); } }
.passos { counter-reset: p; list-style: none; padding: 0; margin: 0; }
.passos li { counter-increment: p; position: relative; padding-left: 40px; margin-top: var(--espaco-3); font-size: 15px; }
.passos svg { width: 18px; height: 18px; vertical-align: -3px; }
.passos li::before { content: counter(p); position: absolute; left: 0; top: -2px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--vermelho-alarme); color: #fff; font: 800 14px/1 var(--font-display); }
.rodape { position: relative; z-index: 1; text-align: center; padding: var(--espaco-5) var(--espaco-4); font-size: 13px; color: var(--texto-suave); }

/* =============================================================
   Painel administrativo
   ============================================================= */
.admin { display: grid; grid-template-columns: 1fr; min-height: 100vh; position: relative; z-index: 1; }
.lateral { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: var(--espaco-3); flex-wrap: wrap; padding: var(--espaco-3) var(--espaco-4); background: rgba(10, 4, 4, .94); border-bottom: 1px solid var(--borda-sutil); backdrop-filter: blur(8px); }
.lateral { padding-top: max(var(--espaco-3), env(safe-area-inset-top)); }
.lateral .marca { flex: 1; }
.menu { display: none; width: 100%; list-style: none; margin: 0; padding: 0 0 var(--espaco-2); }
.menu.aberto { display: block; }
.menu a { display: flex; align-items: center; gap: var(--espaco-3); min-height: 48px; padding: 0 var(--espaco-4); border-radius: var(--raio-md); color: var(--texto-suave); font-weight: 600; text-decoration: none; }
.menu a svg { width: 20px; height: 20px; flex: none; }
.menu a:hover { background: var(--superficie-elevada); color: var(--texto); }
.menu a[aria-current="page"] { color: var(--texto); background: var(--superficie-elevada); box-shadow: inset 3px 0 0 var(--vermelho-alarme); }
.menu-botao { width: 48px; height: 48px; display: grid; place-items: center; border: 0; border-radius: var(--raio-md); background: var(--superficie-elevada); color: var(--texto); cursor: pointer; }
.lateral-rodape { display: none; }
.conteudo { padding: var(--espaco-5) var(--espaco-4) var(--espaco-7); max-width: 1180px; width: 100%; margin: 0 auto; }
.cabecalho-pagina { display: flex; flex-wrap: wrap; gap: var(--espaco-4); align-items: flex-end; justify-content: space-between; margin-bottom: var(--espaco-5); }
.cabecalho-pagina p { margin-top: var(--espaco-2); color: var(--texto-suave); }
.grade { display: grid; gap: var(--espaco-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.grade-2 { display: grid; gap: var(--espaco-5); grid-template-columns: 1fr; }

.metrica { display: flex; flex-direction: column; gap: var(--espaco-2); }
.metrica .rotulo { font: 700 12px/1.2 var(--font-texto); letter-spacing: .08em; text-transform: uppercase; color: var(--texto-suave); }
.metrica .valor { font: 900 clamp(34px, 6vw, 46px)/1 var(--font-display); font-variant-numeric: tabular-nums; }
.metrica .detalhe { font-size: 14px; color: var(--texto-suave); }

.controle-alarme { display: grid; gap: var(--espaco-5); align-items: center; grid-template-columns: 1fr; }
.controle-alarme .estado { display: flex; gap: var(--espaco-5); align-items: center; }
.controle-alarme h2 { text-transform: uppercase; }
.controle-alarme.ativo h2 { color: var(--vermelho-vivo); }
.barra { height: 12px; border-radius: 6px; background: var(--superficie-elevada); overflow: hidden; box-shadow: inset 0 0 0 1px var(--borda-sutil); }
.barra span { display: block; height: 100%; border-radius: 6px; transition: width .5s ease; }
.barra .b-recebido { background: linear-gradient(90deg, #f67f01, #f8d71a); }
.barra .b-confirmado { background: linear-gradient(90deg, #2aa4e8, #5ec8ff); }
.progresso + .progresso { margin-top: var(--espaco-4); }
.progresso .linha { margin-bottom: var(--espaco-2); font-size: 14px; }
.progresso strong { font-family: var(--font-display); }

.tabela-caixa { overflow-x: auto; margin: 0 calc(-1 * var(--espaco-5)); padding: 0 var(--espaco-5); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; font: 700 12px/1.2 var(--font-texto); letter-spacing: .08em; text-transform: uppercase; color: var(--texto-suave); padding: var(--espaco-3); border-bottom: 1px solid var(--borda-sutil); white-space: nowrap; }
td { padding: var(--espaco-3); border-bottom: 1px solid rgba(91, 0, 0, .5); vertical-align: middle; }
tbody tr:hover { background: rgba(36, 16, 16, .6); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.vazio { padding: var(--espaco-6) var(--espaco-4); text-align: center; color: var(--texto-suave); }
.filtros { display: flex; flex-wrap: wrap; gap: var(--espaco-2); }
.filtros a { min-height: 40px; display: inline-flex; align-items: center; padding: 0 var(--espaco-4); border-radius: var(--raio-pilula); color: var(--texto-suave); box-shadow: inset 0 0 0 1.5px var(--borda-sutil); text-decoration: none; font-size: 14px; }
.filtros a[aria-current="true"] { color: var(--texto); box-shadow: inset 0 0 0 1.5px var(--borda-brasa); background: var(--superficie-elevada); }
.busca { display: flex; gap: var(--espaco-2); }
.busca input { flex: 1; min-width: 0; }

/* Modal de confirmação */
dialog { border: 0; padding: 0; background: transparent; color: var(--texto); max-width: min(520px, calc(100vw - 32px)); width: 100%; }
dialog::backdrop { background: rgba(0, 0, 0, .75); backdrop-filter: blur(3px); }
dialog .cartao { padding: var(--espaco-6) var(--espaco-5); }

/* Login */
.tela-login { position: relative; z-index: 1; min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: var(--espaco-5) var(--espaco-4); }
.tela-login .cartao { width: 100%; max-width: 440px; padding: 88px var(--espaco-5) var(--espaco-6); }
.tela-login .sirene { position: absolute; left: 50%; top: 0; transform: translate(-50%, -58%); }

@media (min-width: 768px) {
  .pagina-usuario { padding-top: var(--espaco-6); }
  .grade-2 { grid-template-columns: 1fr 1fr; }
  .controle-alarme { grid-template-columns: 1fr minmax(260px, 340px); }
  .cartao { padding: var(--espaco-6); }
  .tabela-caixa { margin: 0 calc(-1 * var(--espaco-6)); padding: 0 var(--espaco-6); }
}
@media (min-width: 1024px) {
  .admin { grid-template-columns: 260px 1fr; }
  .lateral { position: sticky; top: 0; height: 100vh; flex-direction: column; align-items: stretch; flex-wrap: nowrap; padding: var(--espaco-5) var(--espaco-4); border-bottom: 0; border-right: 1px solid var(--borda-sutil); }
  .lateral .marca { flex: none; margin-bottom: var(--espaco-5); }
  .menu, .menu.aberto { display: block; flex: 1; }
  .menu li + li { margin-top: var(--espaco-1); }
  .menu-botao { display: none; }
  .lateral-rodape { display: block; font-size: 14px; color: var(--texto-suave); }
  .conteudo { padding: var(--espaco-6) var(--espaco-6) var(--espaco-8); }
}

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

/* Telas muito estreitas (celulares pequenos, 320px) */
@media (max-width: 360px) {
  .btn { padding: 0 var(--espaco-4); font-size: 15px; gap: var(--espaco-3); }
  .btn-lg { font-size: 19px; min-height: 64px; }
  .marca { font-size: 14px; }
  .topo-usuario .selo { font-size: 11px; padding: 0 var(--espaco-2); }
  .cartao { padding: var(--espaco-4); border-radius: 22px; }
  .alerta-card { padding: 84px var(--espaco-4) var(--espaco-5); }
  .monitor { gap: var(--espaco-3); }
}
#ajuda-texto ol li + li { margin-top: 6px; }
#ajuda-notif .pilha > * + * { margin-top: var(--espaco-3); }
#ajuda-texto strong { display: inline; }
