/* LineartHP · Gestão Patrimonial — identidade visual
   Cores extraídas da logo: ciano, azul-marinho, magenta, amarelo, verde e vermelho. */

:root {
  --navy: #0f1b2d;
  --navy-2: #16253d;
  --azul: #2e3192;
  --ciano: #12b0ee;
  --magenta: #ec008c;
  --amarelo: #ffd400;
  --verde: #1ba559;
  --vermelho: #e51e26;
  --bg: #f3f5f9;
  --card: #ffffff;
  --texto: #1c2534;
  --texto-2: #64708a;
  --borda: #e3e8f1;
  --sombra: 0 1px 2px rgba(15, 27, 45, .06), 0 4px 14px rgba(15, 27, 45, .05);
  --raio: 14px;
  --raio-sm: 10px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--texto);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
a { color: var(--azul); text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: 1.45rem; font-weight: 700; }
h2 { font-size: 1.1rem; font-weight: 700; }
h3 { font-size: .95rem; font-weight: 600; }
.muted { color: var(--texto-2); }
.small { font-size: .82rem; }
.num { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ---------- Carregamento e login ---------- */
.carregando-inicial {
  height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: var(--navy);
}
.carregando-inicial img { width: min(260px, 60vw); }
.spinner {
  width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.25); border-top-color: var(--ciano);
  animation: girar .8s linear infinite;
}
@keyframes girar { to { transform: rotate(360deg); } }

.tela-login {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(18,176,238,.25), transparent 60%),
    radial-gradient(700px 500px at 110% 110%, rgba(236,0,140,.18), transparent 60%),
    var(--navy);
}
.login-card {
  width: 100%; max-width: 400px; background: #fff; border-radius: 20px; padding: 32px 28px;
  box-shadow: 0 30px 80px rgba(0,0,0,.35);
}
.login-card .logo { width: 210px; max-width: 80%; margin: 0 auto 18px; }
.login-card h1 { text-align: center; font-size: 1.15rem; margin-bottom: 4px; }
.login-card .sub { text-align: center; margin-bottom: 22px; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--navy); color: #cfd8e8; padding: 22px 14px; display: flex; flex-direction: column; gap: 6px;
  position: sticky; top: 0; height: 100vh;
}
.sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 20px; }
.sidebar .brand img { height: 46px; width: auto; }
.sidebar .brand .marca-texto { font-weight: 800; letter-spacing: .08em; color: #fff; font-size: .95rem; }
.sidebar .brand .marca-texto small { display: block; font-weight: 500; letter-spacing: .02em; color: #8fa0bd; font-size: .72rem; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px;
  color: #cfd8e8; cursor: pointer; border: 0; background: transparent; text-align: left; width: 100%;
  font-weight: 500;
}
.nav-item i { width: 20px; text-align: center; color: #8fa0bd; }
.nav-item:hover { background: var(--navy-2); color: #fff; }
.nav-item.ativo { background: linear-gradient(90deg, rgba(18,176,238,.22), rgba(18,176,238,.05)); color: #fff; box-shadow: inset 3px 0 0 var(--ciano); }
.nav-item.ativo i { color: var(--ciano); }
.sidebar .rodape { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar .rodape .quem { font-size: .82rem; color: #8fa0bd; margin-bottom: 8px; word-break: break-word; }

.principal { min-width: 0; display: flex; flex-direction: column; }
.topo {
  display: flex; align-items: center; gap: 12px; padding: 16px 28px; background: rgba(243,245,249,.9);
  backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--borda);
}
.topo .titulo { min-width: 0; }
.topo .titulo small { display: block; color: var(--texto-2); font-size: .8rem; }
.topo .acoes { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.conteudo { padding: 24px 28px 40px; max-width: 1280px; width: 100%; }
.topo-mobile { display: none; }

.bottom-nav { display: none; }

/* ---------- Componentes base ---------- */
.card {
  background: var(--card); border-radius: var(--raio); box-shadow: var(--sombra); padding: 18px;
  border: 1px solid var(--borda);
}
.card + .card { margin-top: 0; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grid { display: grid; gap: 14px; }
.grid-kpi { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-form { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.grid-form .full { grid-column: 1 / -1; }
.section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.section-head h2 { margin-right: auto; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 10px;
  border: 1px solid transparent; background: var(--azul); color: #fff; font-weight: 600; cursor: pointer;
  white-space: nowrap; transition: transform .05s, background .15s, opacity .15s; min-height: 40px;
}
.btn:hover { background: #262a7d; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-sec { background: #fff; color: var(--texto); border-color: var(--borda); }
.btn-sec:hover { background: #f6f8fc; }
.btn-ciano { background: var(--ciano); }
.btn-ciano:hover { background: #0e9bd3; }
.btn-verde { background: var(--verde); }
.btn-verde:hover { background: #158a48; }
.btn-perigo { background: var(--vermelho); }
.btn-perigo:hover { background: #c9151c; }
.btn-fantasma { background: transparent; color: var(--azul); }
.btn-fantasma:hover { background: #eef1fa; }
.btn-pequeno { padding: 6px 10px; min-height: 32px; font-size: .85rem; border-radius: 8px; }
.btn-bloco { width: 100%; }
.btn-icone { padding: 0; width: 40px; }

.campo { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.campo label { font-size: .82rem; font-weight: 600; color: var(--texto-2); }
.campo .ajuda { font-size: .75rem; color: var(--texto-2); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search],
input[type=date], select, textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--borda); border-radius: 10px; background: #fff;
  outline: none; transition: border-color .15s, box-shadow .15s; min-height: 42px;
}
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--ciano); box-shadow: 0 0 0 3px rgba(18,176,238,.18); }
input[readonly] { background: #f6f8fc; }

.busca {
  position: relative; flex: 1 1 280px; min-width: 0;
}
.busca i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--texto-2); }
.busca input { padding-left: 40px; font-size: 1rem; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--borda); font-size: .83rem;
  cursor: pointer; font-weight: 500; color: var(--texto-2); white-space: nowrap;
}
.chip.ativo { background: var(--navy); color: #fff; border-color: var(--navy); }
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: .75rem; font-weight: 600;
  background: #eef1f7; color: #3a4660; white-space: nowrap;
}
.badge.verde { background: #e3f6ec; color: #13733f; }
.badge.vermelho { background: #fde7e8; color: #b3121a; }
.badge.amarelo { background: #fff6cc; color: #7a5b00; }
.badge.azul { background: #e4e6f7; color: var(--azul); }
.badge.ciano { background: #def4fd; color: #0a7ab0; }
.badge.cinza { background: #eceff4; color: #5b6578; }

.kpi { padding: 16px 18px; }
.kpi .rotulo { font-size: .8rem; color: var(--texto-2); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.kpi .valor { font-size: 1.65rem; font-weight: 800; margin-top: 6px; letter-spacing: -.01em; }
.kpi .detalhe { font-size: .8rem; color: var(--texto-2); margin-top: 4px; }
.kpi .icone {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: #fff; margin-bottom: 10px;
}
.kpi.verde .valor { color: #13733f; }
.kpi.vermelho .valor { color: #b3121a; }

.lista { display: flex; flex-direction: column; }
.item-lista {
  display: flex; gap: 14px; align-items: center; padding: 12px 6px; border-bottom: 1px solid var(--borda);
  cursor: pointer; border-radius: 10px;
}
.item-lista:hover { background: #f7f9fd; }
.item-lista:last-child { border-bottom: 0; }
.miniatura {
  width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: #eef1f7; flex: 0 0 auto;
  display: grid; place-items: center; color: #9aa6bd; font-size: 1.2rem; overflow: hidden;
}
.miniatura img { width: 100%; height: 100%; object-fit: cover; }
.item-lista .principal-txt { min-width: 0; flex: 1; }
.item-lista .nome { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-lista .meta { font-size: .82rem; color: var(--texto-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.tabela-wrap { overflow-x: auto; border-radius: var(--raio); }
table.tabela { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .92rem; }
table.tabela th {
  text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--texto-2);
  padding: 10px 12px; border-bottom: 1px solid var(--borda); background: #fafbfd; position: sticky; top: 0;
}
table.tabela td { padding: 11px 12px; border-bottom: 1px solid var(--borda); vertical-align: middle; }
table.tabela tr:hover td { background: #f8fafd; }
table.tabela tr.clicavel { cursor: pointer; }
table.tabela td.dir, table.tabela th.dir { text-align: right; }

.vazio { text-align: center; padding: 40px 16px; color: var(--texto-2); }
.vazio i { font-size: 2.2rem; color: #c4cde0; margin-bottom: 10px; display: block; }

.abas { display: flex; gap: 4px; border-bottom: 1px solid var(--borda); margin-bottom: 16px; overflow-x: auto; }
.aba {
  padding: 10px 14px; border: 0; background: transparent; cursor: pointer; font-weight: 600; color: var(--texto-2);
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.aba.ativo { color: var(--azul); border-bottom-color: var(--azul); }

.seg { display: inline-flex; background: #eceff5; padding: 4px; border-radius: 10px; gap: 2px; }
.seg button {
  border: 0; background: transparent; padding: 7px 12px; border-radius: 8px; cursor: pointer; font-weight: 600; color: var(--texto-2);
}
.seg button.ativo { background: #fff; color: var(--texto); box-shadow: 0 1px 3px rgba(0,0,0,.1); }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { width: 40px; height: 22px; appearance: none; background: #cfd6e4; border-radius: 99px; position: relative; cursor: pointer; transition: background .15s; min-height: 0; padding: 0; border: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; background: #fff; border-radius: 50%; transition: transform .15s; }
.switch input:checked { background: var(--verde); }
.switch input:checked::after { transform: translateX(18px); }

.progresso { height: 8px; background: #eceff5; border-radius: 99px; overflow: hidden; }
.progresso > span { display: block; height: 100%; background: linear-gradient(90deg, var(--ciano), var(--azul)); border-radius: 99px; }

.galeria { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.galeria .foto { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #eef1f7; }
.galeria .foto img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.galeria .foto .remover {
  position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border-radius: 50%; border: 0;
  background: rgba(15,27,45,.7); color: #fff; cursor: pointer;
}
.galeria .add {
  aspect-ratio: 1; border: 2px dashed #c4cde0; border-radius: 12px; display: grid; place-items: center; align-content: center; gap: 4px;
  color: var(--texto-2); cursor: pointer; background: #fafbfd; text-align: center; font-size: .8rem; padding: 8px;
}
.galeria .add:hover { border-color: var(--ciano); color: var(--azul); }
.galeria .add i { font-size: 1.4rem; }

.ficha-topo { display: grid; grid-template-columns: 260px 1fr; gap: 22px; align-items: start; }
.ficha-capa { width: 100%; aspect-ratio: 4/3; border-radius: var(--raio); object-fit: cover; background: #eef1f7; display: grid; place-items: center; color: #9aa6bd; font-size: 3rem; overflow: hidden; }
.ficha-capa img { width: 100%; height: 100%; object-fit: cover; }
.dl { display: grid; grid-template-columns: 170px 1fr; gap: 10px 16px; margin: 0; }
.dl dt { color: var(--texto-2); font-size: .85rem; }
.dl dd { margin: 0; font-weight: 500; word-break: break-word; }
.valor-var { font-weight: 700; }
.valor-var.pos { color: #13733f; }
.valor-var.neg { color: #b3121a; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 14px 22px; border-left: 2px solid var(--borda); margin-left: 6px; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--ciano); }
.timeline .t-titulo { font-weight: 600; font-size: .92rem; }
.timeline .t-meta { font-size: .78rem; color: var(--texto-2); }

/* ---------- Scanner ---------- */
.scanner-box { position: relative; background: #0b1220; border-radius: var(--raio); overflow: hidden; aspect-ratio: 4/3; max-width: 560px; width: 100%; margin: 0 auto; }
.scanner-box video { width: 100%; height: 100%; object-fit: cover; }
.scanner-box .mira {
  position: absolute; inset: 15% 15%; border: 3px solid var(--ciano); border-radius: 18px;
  box-shadow: 0 0 0 9999px rgba(8,14,26,.45);
}
.scanner-box .linha-scan {
  position: absolute; left: 16%; right: 16%; height: 2px; background: var(--ciano); box-shadow: 0 0 12px var(--ciano);
  animation: varrer 2.2s ease-in-out infinite;
}
@keyframes varrer { 0%,100% { top: 17%; } 50% { top: 83%; } }

/* ---------- Modal, toast, confirm ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(12,20,35,.55); z-index: 100; display: flex; align-items: center; justify-content: center;
  padding: 16px; animation: fade .15s ease-out;
}
@keyframes fade { from { opacity: 0; } }
.modal {
  background: #fff; border-radius: 18px; width: 100%; max-width: 560px; max-height: calc(100vh - 32px); display: flex; flex-direction: column;
  box-shadow: 0 30px 80px rgba(0,0,0,.3); animation: subir .18s ease-out;
}
.modal.grande { max-width: 860px; }
@keyframes subir { from { transform: translateY(12px); opacity: 0; } }
.modal header { padding: 18px 20px; border-bottom: 1px solid var(--borda); display: flex; align-items: center; gap: 10px; }
.modal header h2 { margin-right: auto; }
.modal .corpo { padding: 18px 20px; overflow-y: auto; }
.modal footer { padding: 14px 20px; border-top: 1px solid var(--borda); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.fechar { background: transparent; border: 0; width: 36px; height: 36px; border-radius: 10px; cursor: pointer; color: var(--texto-2); }
.fechar:hover { background: #f1f4f9; }

#toasts { position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; width: min(92vw, 420px); pointer-events: none; }
.toast {
  background: var(--navy); color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.25);
  font-weight: 500; animation: subir .2s ease-out; display: flex; gap: 10px; align-items: center; width: 100%;
}
.toast.erro { background: #8f1016; }
.toast.ok { background: #13733f; }

/* ---------- Dashboard ---------- */
.grafico-box { position: relative; height: 280px; }
.legenda-cons { display: grid; gap: 8px; }
.legenda-cons .linha { display: flex; align-items: center; gap: 8px; font-size: .9rem; }
.legenda-cons .cor { width: 12px; height: 12px; border-radius: 4px; }

/* ---------- Formulários de cadastro ---------- */
.form-cadastro .secao-titulo { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--texto-2); font-weight: 700; margin: 4px 0 -4px; }
.form-acoes { position: sticky; bottom: 0; background: #fff; padding: 14px 0 calc(14px + var(--safe-b)); border-top: 1px solid var(--borda); display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; z-index: 5; }

/* ---------- Impressão de etiquetas ---------- */
#area-impressao { display: none; }
.etiquetas { display: grid; grid-template-columns: repeat(auto-fill, 62mm); gap: 4mm; }
.etiqueta {
  width: 62mm; height: 29mm; border: 1px dashed #bbb; display: flex; align-items: center; gap: 3mm; padding: 2mm 3mm; box-sizing: border-box;
  page-break-inside: avoid; background: #fff; color: #000; font-family: Arial, sans-serif;
}
.etiqueta .qr svg { width: 23mm; height: 23mm; display: block; }
.etiqueta .txt { min-width: 0; }
.etiqueta .txt .num { font-size: 13pt; font-weight: 800; }
.etiqueta .txt .nome { font-size: 7.5pt; line-height: 1.15; max-height: 16mm; overflow: hidden; }
.etiqueta .txt .marca { font-size: 6pt; color: #444; margin-top: 2mm; letter-spacing: .05em; }

@media print {
  @page { margin: 8mm; }
  body > *:not(#area-impressao) { display: none !important; }
  #area-impressao { display: block !important; position: static; }
  #area-impressao h1 { font-size: 13pt; margin: 0 0 4mm; font-family: Arial; }
}

/* ---------- Logo sobre fundos claros (o wordmark é branco) ---------- */
.login-card .logo {
  background: var(--navy); padding: 14px 18px; border-radius: 14px; width: 100%; max-width: 100%; margin-bottom: 20px;
}
.topo-mobile img {
  height: 34px; width: auto; background: var(--navy); padding: 6px 12px; border-radius: 10px;
}

/* ---------- Patrimônios: cartões, seleção e barra de ações ---------- */
.cartoes { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.cartao-pat { transition: transform .12s, box-shadow .15s; }
.cartao-pat:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(15,27,45,.12); }
.cartao-pat.selecionado { outline: 3px solid var(--ciano); outline-offset: -3px; }
.marca-sel {
  position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 50%; background: #fff;
  display: grid; place-items: center; color: #9aa6bd; font-size: 1.25rem; box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.cartao-pat.selecionado .marca-sel { color: var(--ciano); }
.barra-sel {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(18px + var(--safe-b)); z-index: 60;
  width: min(96vw, 900px); background: var(--navy); color: #fff; border-radius: 16px; padding: 12px 14px;
  display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  box-shadow: 0 16px 40px rgba(0,0,0,.35);
}
.barra-sel .btn-sec { background: #fff; }
.toolbar { padding: 14px; }
.filtro { flex: 1 1 150px; min-width: 0; max-width: 240px; }
.toolbar .busca { flex: 1 1 260px; }
.cartao-inv { cursor: pointer; }
.cartao-inv:hover { box-shadow: 0 10px 24px rgba(15,27,45,.12); }
.kpi.card { padding: 12px 14px; }
.kpi.card .valor { font-size: 1.35rem; margin-top: 2px; }
.aviso-box { padding: 12px 14px; border-radius: 12px; background: #fff8e0; color: #6b5200; border: 1px solid #f6e3a0; font-size: .9rem; }
.painel-conf { border: 2px solid var(--ciano); }
.resumo-conf { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.resumo-conf > div { background: #f6f8fc; border-radius: 12px; padding: 10px 12px; }
.resumo-conf b { display: block; font-size: 1.25rem; }
.resumo-conf span { font-size: .78rem; color: var(--texto-2); }
.qr-grande svg { width: 200px; height: 200px; display: block; margin: 0 auto; }
.qr-grande { background: #fff; padding: 12px; border-radius: 14px; border: 1px solid var(--borda); }
.foto-ver img { width: 100%; border-radius: 12px; max-height: 70vh; object-fit: contain; background: #0b1220; }

/* ---------- Responsivo: tablet ---------- */
@media (max-width: 1100px) {
  .ficha-topo { grid-template-columns: 200px 1fr; }
}

/* ---------- Responsivo: celular e tablet pequeno ---------- */
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topo { padding: 12px 16px; }
  .topo-mobile { display: flex; align-items: center; gap: 10px; }
  .topo-mobile img { height: 30px; }
  .topo .titulo h1 { font-size: 1.15rem; }
  .conteudo { padding: 16px 14px calc(96px + var(--safe-b)); }
  .grid-2 { grid-template-columns: 1fr; }
  .ficha-topo { grid-template-columns: 1fr; }
  .ficha-capa { aspect-ratio: 16/10; }
  .bottom-nav {
    display: grid; grid-template-columns: repeat(6, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: var(--navy); padding: 6px 4px calc(6px + var(--safe-b)); box-shadow: 0 -6px 20px rgba(0,0,0,.2);
  }
  .bottom-nav button {
    border: 0; background: transparent; color: #8fa0bd; display: flex; flex-direction: column; align-items: center; gap: 3px;
    font-size: .68rem; font-weight: 600; padding: 6px 0; cursor: pointer; border-radius: 10px; min-width: 0;
  }
  .bottom-nav button i { font-size: 1.1rem; }
  .bottom-nav button.ativo { color: #fff; }
  .bottom-nav button.ativo i { color: var(--ciano); }
  .bottom-nav .destaque i {
    background: linear-gradient(135deg, var(--ciano), var(--azul)); color: #fff !important; width: 42px; height: 42px; border-radius: 14px;
    display: grid; place-items: center; font-size: 1.1rem; margin-top: -18px; box-shadow: 0 6px 16px rgba(18,176,238,.45);
  }
  .bottom-nav .destaque span { margin-top: 0; }
  .overlay { align-items: flex-end; padding: 0; }
  .modal { max-width: none; border-radius: 18px 18px 0 0; max-height: 92vh; }
  .modal.grande { max-width: none; }
  .grid-form { grid-template-columns: 1fr; }
  .dl { grid-template-columns: 130px 1fr; }
  .topo .acoes .btn span.txt-desk { display: none; }
}

@media (max-width: 480px) {
  .kpi .valor { font-size: 1.35rem; }
  .grid-kpi { grid-template-columns: 1fr 1fr; gap: 10px; }
  .galeria { grid-template-columns: repeat(3, 1fr); }
}

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