/* Fontes hospedadas no sistema (licença OFL, arquivos em /static/fontes): sem depender do Google Fonts */
@font-face { font-family: 'Gloock'; font-style: normal; font-weight: 400; font-display: swap; src: url('/static/fontes/gloock-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 400; font-display: swap; src: url('/static/fontes/hanken-grotesk-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 500; font-display: swap; src: url('/static/fontes/hanken-grotesk-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 600; font-display: swap; src: url('/static/fontes/hanken-grotesk-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 700; font-display: swap; src: url('/static/fontes/hanken-grotesk-latin-700-normal.woff2') format('woff2'); }

/* GV Vistorias — linha visual A (azul-marinho e latão) */
:root {
  --fundo: #E9EDF1;
  --cartao: #FFFFFF;
  --marca: #10223A;
  --latao: #D9B47A;
  --texto: #10223A;
  --texto2: #4F5F74;
  --borda: #E3E8EE;
  --link: #2F5FB3;
  --suave: #EEF1F4;
  --vidro: rgba(255,255,255,0.72);
  --hero-texto2: #C9D3DF;
  --aviso-fundo: #FFF4DE; --aviso-borda: #F1D49A;
  --erro-fundo: #FDECEB; --erro-borda: #F3B8B4;
  --ok-fundo: #E6F5EE; --ok-borda: #A9DCC2;
  --sombra: 0 10px 30px rgba(16,34,58,0.05);
  --r-campo: 12px; --r-cartao: 20px; --r-modal: 28px;
  color-scheme: light;
}
/* Tema escuro: só quando a pessoa escolhe no botão (data-theme="dark"). O padrão é sempre claro. */
:root[data-theme="dark"] {
  /* Escuro neutro (grafite), não azul: mais contraste, com o latão como destaque */
  --fundo: #0D1626; --cartao: #14203A; --marca: #D9B47A; --texto: #EEF0F3; --texto2: #A9B1BC; --borda: #26395A;
  --link: #E2C28E; --suave: #1D2C47; --vidro: rgba(27,30,34,0.86); --hero-texto2: #B8C0CA;
  --aviso-fundo: #3A2F17; --aviso-borda: #6B5523; --erro-fundo: #3A1D1B; --erro-borda: #74302B;
  --ok-fundo: #15322A; --ok-borda: #24704F; --sombra: none; color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fundo); color: var(--texto); font: 15px/1.5 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif; }
a { color: var(--link); text-decoration: none; }
a:hover { opacity: .85; }
h1, h2, h3, .serif { font-family: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif; font-weight: 400; letter-spacing: 0; margin: 0; }
h1 { font-size: clamp(34px, 5vw, 54px); line-height: 1.04; }
h2 { font-size: clamp(24px, 3vw, 30px); line-height: 1.15; }
h3 { font-size: 21px; line-height: 1.2; }
p { margin: 0; }
.muted { color: var(--texto2); }
.peq { font-size: 13px; }
.forte { font-weight: 600; }
.nowrap { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 3px solid var(--latao); outline-offset: 2px; }

.pagina { padding: 20px 28px 56px; }
.miolo { max-width: 1320px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
@media (max-width: 700px) { .pagina { padding: 12px 16px 40px; } }

/* Cabeçalho — igual à linha A: uma linha, marca à esquerda, menu no meio, conta à direita */
.topo { position: sticky; top: 12px; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 12px 10px 20px; border-radius: 22px; background: var(--vidro); border: 1px solid rgba(16,34,58,0.06); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.logo { display: flex; align-items: center; gap: 10px; white-space: nowrap; color: var(--texto); font-family: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 21px; }
/* Menu: a aba ativa é uma pílula branca que desliza até a seção (posicionada pelo gv.js) */
.nav { position: relative; display: flex; flex-wrap: wrap; gap: 4px; background: rgba(16,34,58,0.05); padding: 4px; border-radius: 14px; }
.nav a { position: relative; z-index: 1; min-height: 38px; display: flex; align-items: center; gap: 7px; padding: 0 16px; border-radius: 11px; font-size: 15px; color: var(--texto2); transition: color .25s; }
.nav a:hover { color: var(--texto); opacity: 1; }
.nav a.ativo { color: var(--texto); font-weight: 600; }
.nav:not(.com-marcador) a.ativo { background: var(--cartao); box-shadow: 0 1px 3px rgba(16,34,58,0.08); }
.nav-marcador { position: absolute; z-index: 0; top: 4px; left: 0; height: calc(100% - 8px); border-radius: 11px; background: var(--cartao); box-shadow: 0 1px 3px rgba(16,34,58,0.12); pointer-events: none; }
/* Portal da imobiliária: aba ativa azul-marinho (visual da versão anterior à linha A) */
.nav[data-menu="portal"] { background: var(--suave); }
.nav[data-menu="portal"] a { font-weight: 500; }
.nav[data-menu="portal"] a.ativo { color: #fff; }
.nav[data-menu="portal"]:not(.com-marcador) a.ativo { background: #10223A; box-shadow: none; }
.nav[data-menu="portal"] .nav-marcador { background: #10223A; box-shadow: 0 4px 12px rgba(16,34,58,.25); }
:root[data-theme="dark"] .nav[data-menu="portal"] a.ativo { color: #0D1626; }
:root[data-theme="dark"] .nav[data-menu="portal"] .nav-marcador, :root[data-theme="dark"] .nav[data-menu="portal"]:not(.com-marcador) a.ativo { background: #D9B47A; }
.nav-marcador.anima { transition: transform .35s cubic-bezier(.3,.8,.3,1), width .35s cubic-bezier(.3,.8,.3,1); }
:root[data-theme="dark"] .nav { background: rgba(255,255,255,0.06); }
:root[data-theme="dark"] .nav-marcador, :root[data-theme="dark"] .nav:not(.com-marcador) a.ativo { background: #26395A; box-shadow: none; }
@media (prefers-reduced-motion: reduce) { .nav-marcador.anima { transition: none; } }
.conta { display: flex; align-items: center; gap: 10px; color: var(--texto2); font-size: 14px; }
.avatar { width: 38px; height: 38px; border-radius: 19px; background: var(--latao); color: #10223A; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
/* Menu da conta (nome + avatar abre: conta, tema, sair) */
.menu-conta { position: relative; }
.menu-conta > summary { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer; color: var(--texto2); font-size: 14px; border-radius: 22px; padding: 2px 2px 2px 8px; }
.menu-conta > summary::-webkit-details-marker { display: none; }
.menu-conta > summary:hover { background: var(--suave); }
.menu-conta .painel { position: absolute; right: 0; top: 50px; min-width: 230px; background: var(--cartao); border: 1px solid var(--borda); border-radius: 18px; box-shadow: 0 20px 50px rgba(0,0,0,.15); padding: 8px; z-index: 40; display: flex; flex-direction: column; gap: 2px; }
.menu-conta .painel a, .menu-conta .painel button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 12px; border-radius: 12px; border: 0; background: none; font: inherit; font-size: 15px; color: var(--texto); cursor: pointer; text-align: left; }
.menu-conta .painel a:hover, .menu-conta .painel button:hover { background: var(--suave); opacity: 1; }
@media (max-width: 1100px) { .nav { order: 3; width: 100%; overflow-x: auto; flex-wrap: nowrap; } .nav a { white-space: nowrap; } }

/* Cabeçalho de página: título grande, frase curta e ações à direita */
.cab-pagina { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.cab-pagina h1 { font-size: clamp(36px, 4.5vw, 52px); }
.cab-pagina p { margin-top: 8px; color: var(--texto2); font-size: 15px; }
.cab-pagina .acoes { display: flex; gap: 10px; flex-wrap: wrap; }
.voltar { font-size: 15px; }

/* Botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 14px; font: 600 15px/1 inherit; font-family: inherit;
  white-space: nowrap; border: 1px solid var(--marca); background: var(--marca); color: #fff; cursor: pointer; }
:where(:root[data-theme="dark"]) .btn { background: #2B4F86; border-color: #2B4F86; color: #FFFFFF; }
.btn.latao { background: var(--latao); border-color: var(--latao); color: #10223A; }
.btn.leve { background: var(--suave); border-color: var(--suave); color: var(--texto); }
.btn.contorno { background: transparent; color: var(--texto); border-color: var(--borda); }
.btn.branco { background: var(--cartao); color: var(--texto); border-color: rgba(16,34,58,0.1); }
.btn.perigo { background: #D6453D; border-color: #D6453D; color: #fff; }
.btn.peq { min-height: 38px; padding: 0 14px; font-size: 14px; border-radius: 11px; }
.btn.bloco { width: 100%; }
.btn[disabled], .btn.desligado { opacity: .45; cursor: not-allowed; pointer-events: none; }
.icone-btn { width: 40px; height: 40px; border: 0; border-radius: 12px; background: var(--suave); color: var(--texto); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--link); cursor: pointer; font-weight: 600; }

/* Cartões */
.cartao { background: var(--cartao); border: 1px solid var(--borda); border-radius: 26px; box-shadow: var(--sombra); padding: 26px; }
.cartao.sem-pad { padding: 0; }
.cartao-cab { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.sem-pad .cartao-cab { padding: 24px 26px 0; }
.grade { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.lado { grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); align-items: start; }
@media (max-width: 1000px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .lado, .g3 { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .g2, .g4 { grid-template-columns: 1fr; } .cartao { padding: 20px; border-radius: 22px; } }

/* Hero */
.hero { position: relative; overflow: hidden; border-radius: 34px; background: #10223A; color: #fff; padding: 44px; }
.hero p { color: var(--hero-texto2); font-size: 17px; margin-top: 12px; }
.hero .planta { position: absolute; right: -40px; top: -30px; pointer-events: none; }
.hero > * { position: relative; }
@media (max-width: 640px) { .hero { padding: 28px 22px; border-radius: 26px; } .hero .planta { opacity: .5; } }
.tipos { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; margin-top: 28px; }
@media (max-width: 900px) { .tipos { grid-template-columns: 1fr; } }
.tipo-card { display: flex; flex-direction: column; gap: 12px; min-height: 180px; padding: 24px; border-radius: 26px; background: linear-gradient(180deg, #1D3352, #182B46); border: 1px solid rgba(255,255,255,.12); box-shadow: inset 0 1px 0 rgba(255,255,255,.08); color: #fff; transition: transform .2s, box-shadow .2s; }
.tipo-card:hover { opacity: 1; transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 12px 24px rgba(0,0,0,.18); }
.tipo-card.destaque { background: #D9B47A; border-color: #D9B47A; color: #10223A; }
.tipo-card .ic { width: 52px; height: 52px; border-radius: 16px; background: rgba(217,180,122,.16); display: flex; align-items: center; justify-content: center; }
.tipo-card.destaque .ic { background: #10223A; }
.tipo-card .t { font-family: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 28px; line-height: 1.1; }
.tipo-card .d { font-size: 15px; opacity: .85; }

/* Início do portal: botões de pedido soltos na página (sem o quadro azul) */
.pedir { display: flex; flex-direction: column; gap: 18px; }
.pedir h1 { font-size: clamp(32px, 4vw, 44px); }
.pedir p { margin-top: 6px; }
.tipos2 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
@media (max-width: 900px) { .tipos2 { grid-template-columns: 1fr; } }
.tipo2 { display: flex; flex-direction: column; gap: 10px; min-height: 180px; padding: 24px; border-radius: 26px; background: var(--cartao); border: 1px solid var(--borda); box-shadow: var(--sombra); color: var(--texto); transition: transform .2s, box-shadow .2s, border-color .2s; }
.tipo2:hover { opacity: 1; transform: translateY(-2px); border-color: var(--latao); box-shadow: 0 14px 30px rgba(16,34,58,.12); }
.t2-ic { width: 52px; height: 52px; border-radius: 16px; background: #10223A; color: #D9B47A; display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.t2-t { font-family: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 28px; line-height: 1.1; }
.t2-d { font-size: 15px; color: var(--texto2); }
.tipo2.destaque { background: #D9B47A; border-color: #D9B47A; color: #10223A; }
.tipo2.destaque .t2-d { color: rgba(16,34,58,.78); }
.tipo2.destaque:hover { border-color: #C9A266; }
:root[data-theme="dark"] .t2-ic { background: rgba(217,180,122,.14); }
:root[data-theme="dark"] .tipo2.destaque .t2-ic { background: #0D1626; }
@media (max-width: 900px) { .tipo2 { min-height: 0; } }

/* Histórico do início: caixa com rolagem própria (a página não cresce sem fim) */
.caixa-rolagem { max-height: 480px; overflow: auto; overscroll-behavior: contain; border-top: 1px solid var(--borda); }
.caixa-rolagem thead th { position: sticky; top: 0; z-index: 1; background: var(--cartao); box-shadow: 0 1px 0 var(--borda); }
.caixa-rolagem:focus-visible { outline: 3px solid var(--latao); outline-offset: -3px; }

/* Linha de vistoria: tipo no nome, status e ações na outra ponta */
.lista-ped { display: flex; flex-direction: column; }
.linha-ped { display: flex; align-items: center; gap: 14px; padding: 14px 26px; border-top: 1px solid var(--borda); }
.linha-ped:hover { background: var(--suave); }
.lp-info { flex: 1; min-width: 0; color: inherit; display: flex; flex-direction: column; gap: 2px; }
.lp-tit { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-tipo { font-weight: 700; }
.lp-inicial { color: #0E8A5C; } .lp-final { color: var(--texto); } .lp-conferencia { color: #2F5FB3; }
:root[data-theme="dark"] .lp-inicial { color: #5CC897; } :root[data-theme="dark"] .lp-conferencia { color: #8DB2F2; }
.lp-sep { color: var(--texto2); margin: 0 6px; }
.lp-sub { font-size: 13px; color: var(--texto2); }
.lp-fim { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.lp-abrir { background: transparent; }
.lp-grupo { padding: 18px 26px 8px; font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--texto2); border-top: 1px solid var(--borda); }
.lp-mais { display: block; padding: 12px 26px 16px; border-top: 1px solid var(--borda); font-weight: 600; font-size: 14px; }
.lp-grupo.primeiro { border-top: 0; padding-top: 22px; }
@media (max-width: 640px) {
  .linha-ped { flex-wrap: wrap; padding: 14px 18px; }
  .lp-tit { white-space: normal; }
  .lp-fim { width: 100%; justify-content: flex-end; }
  .lp-grupo { padding-left: 18px; padding-right: 18px; }
}
.pilula { display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 20px; border-radius: 23px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); color: #fff; }

/* Faixas de aviso */
.faixa { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 14px 20px; border-radius: 20px; background: var(--aviso-fundo); border: 1px solid var(--aviso-borda); }
.faixa.erro { background: var(--erro-fundo); border-color: var(--erro-borda); }
.faixa.ok { background: var(--ok-fundo); border-color: var(--ok-borda); }
.faixa .txt { flex: 1; min-width: 220px; }
.faixa .bola { width: 34px; height: 34px; border-radius: 17px; background: #F2A516; color: #10223A; display: flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0; }
.faixa.erro .bola { background: #D6453D; color: #fff; }
.faixa.ok .bola { background: #1F9D61; color: #fff; }

/* Selos de status */
.selo { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 13px; border-radius: 15px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.selo::before { content: ''; width: 7px; height: 7px; border-radius: 4px; background: currentColor; opacity: .85; }
.etiqueta { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 13px; font-size: 12px; font-weight: 700; background: var(--suave); color: var(--texto2); }

/* Tabelas */
.tabela { width: 100%; border-collapse: collapse; }
.rolagem { overflow-x: auto; }
.tabela th { text-align: left; font-size: 13px; font-weight: 600; color: var(--texto2); padding: 12px 14px; border-top: 1px solid var(--borda); white-space: nowrap; }
.tabela td { padding: 14px; border-top: 1px solid var(--borda); vertical-align: middle; }
.tabela th:first-child, .tabela td:first-child { padding-left: 26px; }
.tabela th:last-child, .tabela td:last-child { padding-right: 26px; }
.tabela .num { text-align: right; white-space: nowrap; }
.tabela tr.clicavel:hover td { background: var(--suave); }
.vazio { padding: 28px 26px; color: var(--texto2); }

/* Formulários */
.campo { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.campo label, .rotulo { font-size: 13px; font-weight: 600; }
.campo .ajuda { font-size: 13px; color: var(--texto2); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=tel], input[type=url], input[type=datetime-local], input[type=month], select, textarea {
  min-height: 46px; width: 100%; padding: 0 14px; border-radius: var(--r-campo); border: 1px solid var(--borda); background: var(--cartao); color: var(--texto); font: inherit; }
textarea { padding: 12px 14px; min-height: 96px; resize: vertical; }
input[readonly] { background: var(--suave); font-weight: 700; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--latao); outline-offset: 0; border-color: var(--latao); }
.form-grade { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.c1 { grid-column: span 1; } .c2 { grid-column: span 2; } .c3 { grid-column: span 3; } .c4 { grid-column: span 4; } .c6 { grid-column: span 6; }
@media (max-width: 700px) { .form-grade { grid-template-columns: repeat(2, minmax(0,1fr)); } .c1 { grid-column: span 1; } .c2, .c3, .c4, .c6 { grid-column: span 2; } }
.passo { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.passo .n { width: 34px; height: 34px; border-radius: 17px; background: var(--marca); color: #fff; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
:root[data-theme="dark"] .passo .n { background: var(--latao); color: #10223A; }
.opcoes { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.opcao { position: relative; display: block; cursor: pointer; }
.opcao input { position: absolute; opacity: 0; }
.opcao span { display: flex; flex-direction: column; gap: 2px; min-height: 64px; justify-content: center; padding: 12px 16px; border-radius: 16px; border: 1px solid var(--borda); background: var(--cartao); }
.opcao input:checked + span { border: 2px solid var(--marca); background: var(--suave); padding: 11px 15px; }
:root[data-theme="dark"] .opcao input:checked + span { border-color: var(--latao); }
.opcao input:focus-visible + span { outline: 3px solid var(--latao); }
.pessoa { border: 1px dashed var(--borda); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.resumo { position: sticky; top: 100px; }
.resumo .valor { font-family: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 44px; line-height: 1; }
.linhas-def { display: flex; flex-direction: column; gap: 10px; }
.linhas-def > div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--borda); }
.linhas-def > div > :first-child { color: var(--texto2); }
.linhas-def > div > :last-child { text-align: right; font-weight: 600; }

/* Linha do tempo */
.tempo { list-style: none; margin: 0; padding: 0; }
.tempo li { position: relative; padding: 0 0 22px 34px; }
.tempo li::before { content: ''; position: absolute; left: 8px; top: 22px; bottom: 0; width: 2px; background: var(--borda); }
.tempo li:last-child::before { display: none; }
.tempo .pt { position: absolute; left: 0; top: 3px; width: 18px; height: 18px; border-radius: 9px; background: #1F9D61; border: 3px solid var(--cartao); box-shadow: 0 0 0 1px #1F9D61; }
.tempo li.futuro .pt { background: var(--cartao); box-shadow: 0 0 0 2px var(--borda); }
.tempo li.futuro .tt { color: var(--texto2); }
.tempo .tt { font-weight: 600; }

/* Indicadores */
.kpi { display: flex; flex-direction: column; gap: 6px; }
.kpi .v { font-family: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 34px; line-height: 1.05; }
.kpi .l { color: var(--texto2); font-size: 14px; }
.barras { display: flex; gap: 8px; flex-wrap: wrap; }
.etapa-box { flex: 1 1 130px; padding: 14px 16px; border-radius: 16px; background: var(--suave); display: flex; flex-direction: column; gap: 2px; border-left: 5px solid; }
.etapa-box .n { font-family: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 28px; }

/* Mensagens */
.msgs { display: flex; flex-direction: column; gap: 12px; }
.msg { padding: 12px 14px; border-radius: 16px; background: var(--suave); max-width: 92%; }
.msg.minha { align-self: flex-end; background: #10223A; color: #fff; }
.msg .quem { font-size: 12px; opacity: .75; margin-bottom: 2px; }

/* Login */
.login { display: flex; flex-wrap: wrap; padding: 20px; min-height: 100vh; }
.login .lado-marca { position: relative; overflow: hidden; flex: 1 1 480px; background: #10223A; color: #fff; border-radius: 34px; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; min-height: 520px; }
.login .lado-form { flex: 1 1 400px; display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.login form { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 18px; }
@media (max-width: 700px) { .login { padding: 12px; } .login .lado-marca { min-height: 260px; padding: 28px; border-radius: 26px; } }

/* App do vistoriador (celular) */
.app { max-width: 560px; margin: 0 auto; padding: 0 16px 100px; }
.app-topo { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 0; background: var(--fundo); }
.app-card { background: var(--cartao); border: 1px solid var(--borda); border-radius: 22px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.app-lista { display: flex; flex-direction: column; gap: 12px; }
.estados { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.estados label { position: relative; }
.estados input { position: absolute; opacity: 0; }
.estados span { display: flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 12px; border: 1px solid var(--borda); font-size: 14px; font-weight: 600; cursor: pointer; }
.estados input:checked + span { color: #fff; border-color: transparent; }
.estados input:focus-visible + span { outline: 3px solid var(--latao); }
.estados input[value=novo]:checked + span { background: #1F9D61; }
.estados input[value=bom]:checked + span { background: #2F6FED; }
.estados input[value=regular]:checked + span { background: #F2A516; color: #10223A; }
.estados input[value=ruim]:checked + span { background: #D6453D; }
.estados input[value=retirada]:checked + span, .estados input[value=devolucao]:checked + span { background: #10223A; }
@media (max-width: 700px) { .nao-mobile { display: none; } }
.fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; }
.fotos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; display: block; }
.barra-fixa { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--vidro); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--borda); }
.barra-fixa .dentro { max-width: 560px; margin: 0 auto; display: flex; gap: 10px; }
details.comodo { background: var(--cartao); border: 1px solid var(--borda); border-radius: 22px; }
details.comodo > summary { list-style: none; cursor: pointer; padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 56px; }
details.comodo > summary::-webkit-details-marker { display: none; }
details.comodo[open] > summary { border-bottom: 1px solid var(--borda); }
details.comodo .corpo { padding: 16px 18px; display: flex; flex-direction: column; gap: 16px; }
.item { display: flex; flex-direction: column; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid var(--borda); }
.item:last-child { border-bottom: 0; }
.ordena { display: flex; gap: 6px; }
.ordena button { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--borda); background: var(--cartao); color: var(--texto); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.ordena button:disabled { opacity: .35; cursor: not-allowed; }
.alerta-lista { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }

/* Laudo (impressão) */
.laudo { max-width: 860px; margin: 0 auto; background: #fff; color: #10223A; padding: 48px; }
.laudo h1 { font-size: 34px; }
.laudo .cab { display: flex; justify-content: space-between; gap: 20px; border-bottom: 3px solid #D9B47A; padding-bottom: 18px; margin-bottom: 24px; }
.laudo table { width: 100%; border-collapse: collapse; margin: 8px 0 20px; }
.laudo th, .laudo td { border: 1px solid #E3E8EE; padding: 8px 10px; text-align: left; font-size: 14px; vertical-align: top; }
.laudo th { background: #F4F6F8; }
.laudo .fotos img { aspect-ratio: 4/3; }
.laudo section { margin-bottom: 26px; break-inside: avoid-page; }
@media print {
  body { background: #fff; }
  .nao-imprimir { display: none !important; }
  .laudo { padding: 0; }
}

/* ---------- Tema escuro: superfícies que eram azul fixo ---------- */
:root[data-theme="dark"] .hero, :root[data-theme="dark"] .login .lado-marca { background: #14203A; border: 1px solid #26395A; }
:root[data-theme="dark"] .tipo-card { background: #1A2A46; border-color: #2F4468; box-shadow: none; }
:root[data-theme="dark"] .tipo-card.destaque { background: #D9B47A; border-color: #D9B47A; }
:root[data-theme="dark"] .tipo-card .ic { background: rgba(217,180,122,.14); }
:root[data-theme="dark"] .tipo-card.destaque .ic { background: #0D1626; }
:root[data-theme="dark"] .msg.minha { background: #D9B47A; color: #0D1626; }
:root[data-theme="dark"] .etiqueta { background: #26395A; color: #D5DAE0; }

/* ---------- Selo de status com ícone ---------- */
.selo svg { flex-shrink: 0; }
.selo.com-icone::before { display: none; }

/* ---------- Tipo de vistoria bem visível ---------- */
.tipo { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 8px; font-size: 13px; font-weight: 700; white-space: nowrap; letter-spacing: .01em; }
.tipo-inicial { background: #F6E9D3; color: #6B4A12; border: 1px solid #E8CC9A; }
.tipo-final { background: #10223A; color: #fff; border: 1px solid #10223A; }
.tipo-conferencia { background: transparent; color: var(--texto); border: 1.5px dashed #8A97A8; }
:root[data-theme="dark"] .tipo-inicial { background: #3A2F17; color: #F0D29E; border-color: #6B5523; }
:root[data-theme="dark"] .tipo-final { background: #EEF0F3; color: #0D1626; border-color: #EEF0F3; }

/* ---------- Linhas inteiras clicáveis ---------- */
tr[data-href] { cursor: pointer; }
tr[data-href]:hover td { background: var(--suave); }

/* ---------- Botão de arquivo/foto ---------- */
.arquivo { position: relative; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 16px; border-radius: 14px; border: 1.5px dashed var(--borda); background: var(--suave); color: var(--texto); font-weight: 600; cursor: pointer; }
.arquivo:hover { border-color: var(--latao); }
.arquivo input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.arquivo .ic { width: 34px; height: 34px; border-radius: 10px; background: #10223A; color: #D9B47A; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.arquivo .qtd { margin-left: auto; font-size: 13px; color: var(--texto2); font-weight: 500; }
.arquivo.tem { border-style: solid; border-color: #1F9D61; }
.arquivo.tem .qtd { color: #1F9D61; font-weight: 700; }
/* Campo de foto: o clique abre a perguntinha (tirar foto ou galeria), não o campo escondido */
.arquivo.arq-foto input[type=file] { pointer-events: none; }
/* Cômodo já no limite de fotos: o botão fica apagado e não abre a câmera */
.arquivo.desligado { opacity: .55; cursor: not-allowed; border-style: solid; }
.arquivo.desligado:hover { border-color: var(--borda); background: var(--suave); }
.esc-foto { position: fixed; inset: 0; z-index: 220; display: flex; align-items: flex-end; justify-content: center; background: rgba(8, 16, 28, .55); }
/* A caixa é superfície, então usa a cor de cartão. Com --pick-bg (cor de destaque) ficava texto escuro em fundo escuro: sumia. */
.esc-caixa { width: 100%; max-width: 460px; display: flex; flex-direction: column; gap: 10px; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; background: var(--cartao, #fff); color: var(--texto, #10223A); box-shadow: 0 -8px 30px rgba(8, 16, 28, .25); }
.esc-caixa > strong { font-size: 18px; color: var(--texto, #10223A); }
.esc-op { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 0 16px; border: 2px solid var(--borda, #E3E8EE); border-radius: 14px; background: var(--suave, #EEF1F4); color: var(--texto, #10223A); font-size: 17px; font-weight: 600; text-align: left; cursor: pointer; }
.esc-op:hover, .esc-op:focus-visible { background: rgba(217, 180, 122, .18); outline: none; border-color: #D9B47A; }
.esc-op .ic { display: inline-flex; align-items: center; color: var(--marca, #D9B47A); }
.esc-cancelar { min-height: 52px; font-size: 16px; }
@media (min-width: 680px) { .esc-foto { align-items: center; } .esc-caixa { border-radius: 18px; } }

/* ---------- Estrelas da avaliação (preenche as anteriores) ---------- */
.estrelas { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.estrelas input { position: absolute; opacity: 0; width: 1px; }
.estrelas label { font-size: 36px; line-height: 1; color: #CBD2DA; cursor: pointer; padding: 2px; transition: color .15s, transform .15s; }
.estrelas label:hover, .estrelas label:hover ~ label, .estrelas input:checked ~ label { color: #E9A913; }
.estrelas label:hover { transform: scale(1.12); }
.estrelas input:focus-visible + label { outline: 3px solid var(--latao); border-radius: 6px; }
:root[data-theme="dark"] .estrelas label { color: #444B54; }
:root[data-theme="dark"] .estrelas label:hover, :root[data-theme="dark"] .estrelas label:hover ~ label, :root[data-theme="dark"] .estrelas input:checked ~ label { color: #F2B92B; }

/* ---------- Abas e chips ---------- */
.abas { display: inline-flex; gap: 4px; background: var(--suave); padding: 4px; border-radius: 14px; }
.abas a { min-height: 38px; display: inline-flex; align-items: center; padding: 0 16px; border-radius: 11px; color: var(--texto2); font-weight: 600; }
.abas a.ativo { background: var(--cartao); color: var(--texto); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; }
.chip span { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 74px; min-height: 52px; padding: 6px 12px; border-radius: 14px; border: 1px solid var(--borda); background: var(--cartao); cursor: pointer; font-weight: 600; line-height: 1.2; }
.chip span small { font-weight: 500; color: var(--texto2); font-size: 12px; }
.chip input:checked + span { background: #10223A; border-color: #10223A; color: #fff; }
.chip input:checked + span small { color: #C9D3DF; }
.chip input:focus-visible + span { outline: 3px solid var(--latao); }
.chip input:disabled + span { opacity: .4; cursor: not-allowed; text-decoration: line-through; }
:root[data-theme="dark"] .chip input:checked + span { background: #D9B47A; border-color: #D9B47A; color: #0D1626; }
:root[data-theme="dark"] .chip input:checked + span small { color: #3A2F17; }

/* ---------- Calendário ---------- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--borda); border-left: 1px solid var(--borda); }
.cal > div { border-right: 1px solid var(--borda); border-bottom: 1px solid var(--borda); min-height: 110px; padding: 8px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal .cab-dia { min-height: 0; font-size: 12px; font-weight: 700; color: var(--texto2); text-transform: uppercase; letter-spacing: .04em; background: var(--suave); }
.cal .fora { background: var(--suave); opacity: .55; }
.cal .num-dia { font-weight: 700; font-size: 14px; width: 28px; height: 28px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; }
.cal .hoje .num-dia { background: #D6453D; color: #fff; }
.cal .hoje { background: color-mix(in srgb, var(--latao) 12%, var(--cartao)); }
.evento { display: block; font-size: 12px; padding: 4px 7px; border-radius: 8px; background: var(--suave); color: var(--texto); border-left: 4px solid; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.semana { display: grid; grid-template-columns: repeat(7, minmax(140px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.semana .dia { background: var(--suave); border-radius: 18px; padding: 12px; display: flex; flex-direction: column; gap: 8px; min-height: 220px; }
.semana .dia.hoje { outline: 2px solid #D6453D; background: var(--cartao); }
.marca-hoje { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 11px; background: #D6453D; color: #fff; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
@media (max-width: 700px) { .cal > div { min-height: 64px; padding: 4px; } .cal .evento { font-size: 0; height: 8px; padding: 0; } }

/* ---------- Notificações (admin) ---------- */
.notif { position: relative; }
.notif > summary { list-style: none; cursor: pointer; }
.notif > summary::-webkit-details-marker { display: none; }
.notif .contador { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #D6453D; color: #fff; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; border: 2px solid var(--cartao); }
.notif .painel { position: absolute; right: 0; top: 48px; width: min(380px, 86vw); background: var(--cartao); border: 1px solid var(--borda); border-radius: 20px; box-shadow: 0 20px 50px rgba(0,0,0,.18); padding: 10px; z-index: 40; display: flex; flex-direction: column; gap: 6px; }
.notif .painel a { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; color: var(--texto); }
.notif .painel a:hover { background: var(--suave); opacity: 1; }
.notif .ponto { width: 10px; height: 10px; border-radius: 5px; flex-shrink: 0; }

/* ---------- Cartões com ícone (indicadores) ---------- */
.kpi .ico { width: 40px; height: 40px; border-radius: 20px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.atribuir { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.atribuir .item-a { border: 1px solid var(--borda); border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--cartao); }
.vist-botoes { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Passos (medidores) e contador ---------- */
.passos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; background: var(--suave); padding: 4px; border-radius: 14px; }
.passos a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 11px; color: var(--texto2); font-weight: 600; font-size: 14px; }
.passos a.ativo { background: var(--cartao); color: var(--texto); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.passos a small { font-size: 11px; font-weight: 600; }
.passos a.feito small { color: #1F9D61; }
.contador-qtd { display: flex; align-items: center; border: 1px solid var(--borda); border-radius: 14px; overflow: hidden; width: fit-content; }
.contador-qtd button { width: 52px; height: 52px; border: 0; background: var(--suave); color: var(--texto); font-size: 22px; font-weight: 700; cursor: pointer; }
.contador-qtd input { width: 64px; min-height: 52px; border: 0; border-radius: 0; text-align: center; font-size: 20px; font-weight: 700; }

/* ---------- App do vistoriador (início) ---------- */
.sync { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 15px; background: var(--ok-fundo); color: #1F9D61; font-size: 13px; font-weight: 600; }
.sync.off { background: var(--aviso-fundo); color: #B07A0B; }
.kpis-app { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 700px) { .kpis-app { grid-template-columns: repeat(4, 1fr); } }
.kpis-app .cartao { padding: 16px; border-radius: 20px; }
.kpis-app .kpi .v { font-size: 30px; }
.cartao-vist { background: var(--cartao); border: 1px solid var(--borda); border-radius: 22px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.cartao-vist .linha-info { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; color: var(--texto2); font-size: 14px; }
.cartao-vist .linha-info span { display: inline-flex; align-items: center; gap: 5px; }
.btn-novo { position: relative; }
:root[data-theme="dark"] .logo svg rect, :root[data-theme="dark"] .app-topo svg rect { fill: #D9B47A; }
:root[data-theme="dark"] .logo svg path { stroke: #0D1626; }
:root[data-theme="dark"] .kpi .ico { filter: saturate(1.2) brightness(.9); }

/* ---------- Gráficos ---------- */
.grafico .barra .valor { opacity: 0; transition: opacity .15s; pointer-events: none; }
.grafico .barra:hover .valor, .grafico .barra.ativa .valor { opacity: 1; }
.grafico .barra:hover path { opacity: 1 !important; }
.grafico .barra a { cursor: pointer; }
.barra-h { display: grid; grid-template-columns: minmax(120px, 1.2fr) 3fr auto; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--borda); color: inherit; }
.barra-h:hover { background: var(--suave); opacity: 1; }
.barra-h .trilho { height: 14px; background: var(--suave); border-radius: 4px; overflow: hidden; }
.barra-h .trilho span { display: block; height: 100%; background: var(--marca); border-radius: 0 4px 4px 0; }
.tendencia { font-size: 12px; font-weight: 700; }
.tendencia.subindo { color: #1F9D61; } .tendencia.caindo { color: #D6453D; } .tendencia.estavel { color: var(--texto2); }

/* ---------- Página do pedido (linha A) ---------- */
.pedido-grade { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(0, 1.45fr); gap: 20px; align-items: start; }
@media (max-width: 1000px) { .pedido-grade { grid-template-columns: 1fr; } }
.quadros { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.quadro { background: var(--cartao); border: 1px solid var(--borda); border-radius: 18px; padding: 14px 18px; display: flex; flex-direction: column; gap: 4px; }
.quadro > span { font-size: 13px; color: var(--texto2); }
.quadro > strong { font-size: 16px; font-weight: 600; }
.docs { display: flex; flex-direction: column; }
.doc { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--borda); }
.doc:first-child { border-top: 0; }
.doc .ic { color: var(--texto2); display: flex; }
.msg-bloco { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.msg-bloco.minha { align-items: flex-end; }
.msg-bloco .quem { font-size: 12px; color: var(--texto2); }
.msg-bloco .msg { max-width: 80%; }
.enviar-msg { display: flex; gap: 10px; margin-top: 16px; }
.tempo li.proximo .pt { box-shadow: 0 0 0 2px #7A4FD6; background: var(--cartao); }
.tempo li.proximo .tt { color: var(--texto); }

/* ---------- Busca + pílulas de filtro (linha A) ---------- */
.filtros { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.filtros .busca { flex: 1 1 320px; display: flex; align-items: center; background: var(--cartao); border-radius: 14px; border: 1px solid var(--borda); padding: 0 6px 0 14px; }
.filtros .busca input { border: 0; min-height: 48px; background: transparent; padding: 0; }
.filtros .busca input:focus { outline: none; }
.filtros .busca:focus-within { outline: 2px solid var(--latao); }
.pilulas { display: flex; flex-wrap: wrap; gap: 8px; }
.pilula-filtro { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 20px; background: var(--cartao); color: var(--texto); font-size: 14px; border: 1px solid var(--borda); }
.pilula-filtro.ativo { background: #10223A; color: #fff; border-color: #10223A; }
.pilula-filtro .ponto { width: 10px; height: 10px; border-radius: 5px; }
.pilula-filtro .qtd { font-size: 12px; opacity: .7; }
:root[data-theme="dark"] .pilula-filtro.ativo { background: #D9B47A; color: #0D1626; border-color: #D9B47A; }
/* Chips de informação do imóvel */
.chips-info { display: flex; flex-wrap: wrap; gap: 8px; }
.chips-info span { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 17px; background: var(--cartao); font-size: 14px; border: 1px solid var(--borda); }
/* Ciclo da locação */
.ciclo { list-style: none; margin: 0; padding: 0; }
.ciclo li { position: relative; padding: 0 0 22px 34px; }
.ciclo li::before { content: ''; position: absolute; left: 8px; top: 20px; bottom: 0; width: 2px; background: var(--borda); }
.ciclo li:last-child::before { display: none; }
.ciclo .pt { position: absolute; left: 0; top: 2px; width: 18px; height: 18px; border-radius: 9px; }
.ciclo .corpo { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.ciclo .tt { font-size: 17px; font-weight: 600; }
.ciclo li.futuro .tt { color: var(--texto2); }

/* ---------- Agenda (linha A) ---------- */
.agenda-grade { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
@media (max-width: 1000px) { .agenda-grade { grid-template-columns: 1fr; } }
.legenda { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--texto2); }
.legenda > span { display: inline-flex; align-items: center; gap: 6px; }
.legenda .q { width: 10px; height: 10px; border-radius: 3px; }
.cal-a { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.cal-a .cab { font-size: 13px; color: var(--texto2); text-align: center; padding-bottom: 2px; }
.cal-a .dia { min-height: 104px; border-radius: 14px; background: var(--cartao); padding: 8px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal-a .dia.fora { background: transparent; }
.cal-a .dia.fora .n { opacity: .35; }
.cal-a .dia .n { font-size: 14px; font-weight: 600; }
.cal-a .dia.hoje { box-shadow: inset 0 0 0 2px #10223A; }
.cal-a .dia.hoje .n { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 13px; background: #10223A; color: #fff; }
:root[data-theme="dark"] .cal-a .dia.hoje { box-shadow: inset 0 0 0 2px #D9B47A; }
:root[data-theme="dark"] .cal-a .dia.hoje .n { background: #D9B47A; color: #0D1626; }
.cal-a .ev { display: block; font-size: 12px; font-weight: 600; padding: 4px 7px; border-radius: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 700px) { .cal-a { gap: 4px; } .cal-a .dia { min-height: 56px; padding: 4px; } .cal-a .ev { font-size: 0; height: 8px; padding: 0; } }
.proxima { display: flex; gap: 12px; align-items: center; color: inherit; }
.data-badge { width: 52px; height: 56px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; line-height: 1.1; }
.data-badge span { font-size: 11px; text-transform: uppercase; }
.data-badge strong { font-size: 20px; }

/* ---------- Faixa da fatura (financeiro do portal, linha A) ---------- */
.faixa-fatura { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: stretch; background: #10223A; color: #fff; border-radius: 30px; padding: 32px 36px; }
.faixa-fatura .principal { display: flex; flex-direction: column; gap: 6px; flex: 1 1 380px; }
.faixa-fatura .rot { color: #C9D3DF; font-size: 15px; }
.faixa-fatura .valor { font-family: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: clamp(42px, 5vw, 58px); line-height: 1.05; }
.faixa-fatura .lado-pendente { flex: 0 1 300px; display: flex; flex-direction: column; gap: 6px; background: rgba(255,255,255,0.08); border-radius: 20px; padding: 20px 22px; }
.btn.vidro { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.12); color: #fff; }
:root[data-theme="dark"] .faixa-fatura { background: #14203A; border: 1px solid #26395A; }

/* ---------- Atendimento (linha A) ---------- */
.chamado { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border-radius: 18px; background: var(--cartao); border: 1px solid var(--borda); color: inherit; }
.chamado:hover { opacity: 1; border-color: var(--latao); }
.chamado.ativo { background: var(--suave); border-color: transparent; }
/* Chave liga/desliga (permissão de financeiro na conta) */
.chave-onoff { display: inline-flex; align-items: center; gap: 10px; background: none; border: 0; padding: 0; font: inherit; font-size: 14px; color: var(--texto); cursor: pointer; }
.chave-onoff .trilho { position: relative; width: 44px; height: 26px; border-radius: 13px; background: #C9D1DA; transition: background .2s; flex-shrink: 0; }
.chave-onoff .trilho::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 10px; background: #fff; transition: transform .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.chave-onoff.ligada .trilho { background: #10223A; }
.chave-onoff.ligada .trilho::after { transform: translateX(18px); }
:root[data-theme="dark"] .chave-onoff.ligada .trilho { background: #D9B47A; }

/* ---------- Avisos ao vivo (vistoria concluída) ---------- */
.avisos-vivos { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; flex-direction: column; gap: 10px; max-width: min(360px, calc(100vw - 40px)); }
.aviso-vivo { display: flex; flex-direction: column; gap: 2px; background: var(--cartao); border: 1px solid var(--borda); border-left: 5px solid #7A4FD6; border-radius: 16px; padding: 14px 16px; box-shadow: 0 20px 50px rgba(0,0,0,.18); animation: entraAviso .3s ease-out; }
@keyframes entraAviso { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .aviso-vivo { animation: none; } }

/* ---------- Revisão do laudo pela IA ---------- */
.ia-painel { margin-top: 18px; padding: 18px; border-radius: 18px; background: var(--suave); display: flex; flex-direction: column; gap: 12px; }
.ia-cab { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: flex-start; }
.ia-tabela { background: var(--cartao); border-radius: 14px; }
.ia-tabela td { vertical-align: top; }
.ia-antes { color: var(--texto2); text-decoration: line-through; text-decoration-color: rgba(214,69,61,.6); }
.ia-depois { font-weight: 600; color: var(--texto); }

/* ---------- Pasta do pedido (anexos) ---------- */
.pasta { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.pasta-item { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pasta-prev { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: var(--suave); border: 1px solid var(--borda); font-weight: 800; color: var(--texto2); }
.pasta-prev img { width: 100%; height: 100%; object-fit: cover; }
.pasta-nome { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ======================================================================
   Portal da imobiliária: mais contraste, menu no topo ou na lateral,
   cor da imobiliária e boas-vindas
   ====================================================================== */
body.portal { --borda-forte: #CDD5DF; }
:root[data-theme="dark"] body.portal { --borda-forte: #34496B; }
body.portal .miolo { gap: 30px; }
body.portal .cartao { border-color: var(--borda-forte); }
body.portal .tabela th { color: var(--texto); font-weight: 700; border-bottom: 2px solid var(--borda-forte); }
body.portal .tabela td { border-bottom-color: var(--borda-forte); }
/* Botões secundários e abas: visíveis, com contorno e texto forte */
body.portal .btn.leve, body.portal .btn.contorno, body.portal .btn.branco { background: var(--cartao); border: 1.5px solid #10223A; color: #10223A; }
body.portal .btn.leve:hover, body.portal .btn.contorno:hover, body.portal .btn.branco:hover { background: #10223A; color: #fff; opacity: 1; }
:root[data-theme="dark"] body.portal .btn.leve, :root[data-theme="dark"] body.portal .btn.contorno, :root[data-theme="dark"] body.portal .btn.branco { border-color: #D9B47A; color: #EEF0F3; }
body.portal .abas { background: var(--cartao); border: 1.5px solid var(--borda-forte); padding: 5px; gap: 6px; }
body.portal .abas a { color: var(--texto); font-weight: 600; }
body.portal .abas a:hover { background: var(--suave); opacity: 1; }
body.portal .abas a.ativo { background: #10223A; color: #fff; box-shadow: 0 4px 12px rgba(16,34,58,.22); }
:root[data-theme="dark"] body.portal .abas a.ativo { background: #D9B47A; color: #0D1626; }
body.portal .tipos2 { gap: 24px; }
body.portal .pedir { gap: 22px; }
/* Faixa da fatura que pode ser ocultada */
.faixa .fechar-faixa { background: none; border: 0; font-size: 22px; line-height: 1; padding: 4px 8px; color: var(--texto2); cursor: pointer; border-radius: 10px; }
.faixa .fechar-faixa:hover { background: rgba(0,0,0,.06); color: var(--texto); }
.faixa-reabrir { align-self: flex-start; background: none; border: 0; padding: 0; color: var(--link); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }

/* Identidade: imobiliária + "Portal por GV Vistorias" */
.logo-portal { gap: 12px; }
.logo-imob { width: 38px; height: 38px; border-radius: 10px; object-fit: contain; background: #fff; border: 1px solid var(--borda); flex-shrink: 0; }
.logo-txt { display: flex; flex-direction: column; line-height: 1.15; font-family: 'Hanken Grotesk', Arial, sans-serif; font-size: 16px; font-weight: 700; }
.por-gv { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 500; color: var(--texto2); white-space: nowrap; }
.por-gv strong { color: var(--texto); font-weight: 700; }

/* Boas-vindas depois do login: some sozinha, sem travar o trabalho */
.boas-vindas { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(16,34,58,.38); backdrop-filter: blur(3px); animation: bvFundo .4s ease-out; cursor: pointer; }
.boas-vindas.saindo { animation: bvSai .45s ease-in forwards; }
.bv-cartao { cursor: default; background: var(--cartao); border-radius: 30px; padding: 36px 40px 30px; max-width: 480px; width: 100%; text-align: center; box-shadow: 0 30px 80px rgba(0,0,0,.25); display: flex; flex-direction: column; align-items: center; gap: 8px; animation: bvEntra .6s cubic-bezier(.2,.9,.3,1.15); }
body.portal-marca .bv-cartao { box-shadow: inset 0 5px 0 var(--imob), 0 30px 80px rgba(0,0,0,.25); }
.bv-logos { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.bv-logos .logo-imob, .bv-logos .avatar { width: 52px; height: 52px; border-radius: 14px; font-size: 18px; }
.bv-logos > * { animation: bvLogo .7s .15s both cubic-bezier(.2,.9,.3,1.2); }
.bv-logos > :last-child { animation-delay: .3s; }
.bv-x { font-size: 22px; color: var(--texto2); }
.bv-ola { color: var(--texto2); font-size: 15px; }
.bv-tit { font-size: clamp(24px, 4vw, 30px); line-height: 1.15; }
.bv-txt { color: var(--texto2); margin-bottom: 14px; }
@keyframes bvFundo { from { opacity: 0; } to { opacity: 1; } }
@keyframes bvSai { to { opacity: 0; visibility: hidden; } }
@keyframes bvEntra { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes bvLogo { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .boas-vindas, .bv-cartao, .bv-logos > *, .boas-vindas.saindo { animation: none; } }
.tabela .linha-mes td { background: var(--suave); font-weight: 700; font-size: 14px; padding-top: 10px; padding-bottom: 10px; }
.previa-marca { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px; background: var(--cartao); border: 1px solid var(--borda); box-shadow: inset 0 4px 0 var(--imob); }
.previa-marca .logo-txt { flex: 1; }
.previa-aba { background: var(--imob); color: #fff; font-weight: 600; font-size: 14px; padding: 8px 14px; border-radius: 11px; }


/* ======================================================================
   Portal: cores em variáveis. --p = principal, --d = destaque.
   Sem identidade da imobiliária: azul-marinho e latão da GV.
   Com identidade: as duas cores dela em todo o portal; a GV fica no selo.
   ====================================================================== */
body.portal { --p: #10223A; --p-txt: #FFFFFF; --d: #D9B47A; --d-txt: #10223A; }
:root[data-theme="dark"] body.portal { --p: #2B4F86; --p-txt: #FFFFFF; }
body.portal.portal-marca, :root[data-theme="dark"] body.portal.portal-marca { --p: var(--imob); --p-txt: var(--imob-txt); --d: var(--imob2); --d-txt: var(--imob2-txt); }
:root body.portal .btn:not(.latao):not(.leve):not(.contorno):not(.branco):not(.perigo):not(.vidro) { background: var(--p); border-color: var(--p); color: var(--p-txt); }
:root body.portal .btn.latao, :root body.portal .tipo2.destaque { background: var(--d); border-color: var(--d); color: var(--d-txt); }
:root body.portal .tipo2.destaque .t2-d { color: var(--d-txt); opacity: .85; }
:root body.portal .tipo2:hover { border-color: var(--d); }
:root body.portal .t2-ic, :root body.portal .tipo2.destaque .t2-ic { background: var(--p); color: var(--d); }
:root body.portal .btn.leve, :root body.portal .btn.contorno, :root body.portal .btn.branco { background: var(--cartao); border: 1.5px solid var(--p); color: var(--texto); }
:root body.portal .btn.leve:hover, :root body.portal .btn.contorno:hover, :root body.portal .btn.branco:hover { background: var(--p); color: var(--p-txt); }
:root body.portal .nav[data-menu="portal"] .nav-marcador,
:root body.portal .nav[data-menu="portal"]:not(.com-marcador) a.ativo,
:root body.portal .nav-lateral a.ativo,
:root body.portal .abas a.ativo { background: var(--p); color: var(--p-txt); }
:root body.portal .nav[data-menu="portal"] a.ativo { color: var(--p-txt); }
:root body.portal .avatar { background: var(--d); color: var(--d-txt); }
:root body.portal.portal-marca .topo { box-shadow: inset 0 4px 0 var(--p); }
:root body.portal.portal-marca .cartao-cab a.forte { color: var(--p); }
:root[data-theme="dark"] body.portal.portal-marca .cartao-cab a.forte { color: var(--d); }
body.portal .bv-cartao { box-shadow: inset 0 5px 0 var(--p), 0 30px 80px rgba(0,0,0,.25); }

/* ---------- Menu lateral padrão (fixo à esquerda, recolhível) ---------- */
body.menu-lateral .lateral { position: fixed; left: 0; top: 0; bottom: 0; z-index: 30; width: 252px; display: flex; flex-direction: column; gap: 6px; padding: 16px 12px; background: var(--cartao); border-right: 1px solid var(--borda-forte); overflow-y: auto; overflow-x: hidden; transition: width .2s ease; }
body.menu-lateral.portal-marca .lateral { box-shadow: inset 4px 0 0 var(--p); }
body.menu-lateral .pagina { margin-left: 252px; transition: margin-left .2s ease; }
.lateral-topo { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 4px 10px; border-bottom: 1px solid var(--borda-forte); margin-bottom: 8px; }
.lateral-marca { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; color: var(--texto); }
.lateral-marca .logo-imob, .lateral-marca .avatar { width: 38px; height: 38px; flex-shrink: 0; }
.lateral-marca .rot { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.lateral-marca .rot strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lateral .btn-recolher { width: 32px; height: 32px; flex-shrink: 0; }
.lateral .lateral-nova { margin: 6px 2px 10px; justify-content: flex-start; padding: 0 14px; }
.nav-lateral { display: flex; flex-direction: column; gap: 2px; }
.nav-lateral a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 14px; border-radius: 10px; color: var(--texto); font-weight: 500; white-space: nowrap; }
.nav-lateral a svg { flex-shrink: 0; }
.nav-lateral a:hover { background: var(--suave); opacity: 1; }
.lateral-pe { margin-top: auto; display: flex; flex-direction: column; gap: 6px; padding-top: 12px; border-top: 1px solid var(--borda-forte); }
.lateral-pe a, .lateral-pe .pe-linha { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 10px; border-radius: 10px; color: var(--texto); white-space: nowrap; }
.lateral-pe a:hover { background: var(--suave); opacity: 1; }
.lateral-pe .avatar { width: 30px; height: 30px; font-size: 12px; }
.lateral .por-gv { padding: 4px 10px 0; }
/* Recolhido: só ícones */
body.menu-lateral.lateral-recolhida .lateral { width: 76px; }
body.menu-lateral.lateral-recolhida .pagina { margin-left: 76px; }
body.lateral-recolhida .lateral .rot, body.lateral-recolhida .lateral .por-gv { display: none; }
body.lateral-recolhida .lateral-topo { flex-direction: column; padding-bottom: 8px; }
body.lateral-recolhida .lateral .lateral-nova { justify-content: center; padding: 0; }
body.lateral-recolhida .nav-lateral a, body.lateral-recolhida .lateral-pe a, body.lateral-recolhida .lateral-pe .pe-linha { justify-content: center; padding: 0; }
body.lateral-recolhida .lateral-pe .pe-linha { flex-direction: column; min-height: 0; gap: 4px; }
body.lateral-recolhida .btn-recolher svg { transform: rotate(180deg); }
@media (max-width: 900px) {
  body.menu-lateral .lateral, body.menu-lateral.lateral-recolhida .lateral { position: static; width: auto; border-right: 0; border-bottom: 1px solid var(--borda-forte); box-shadow: none; }
  body.menu-lateral .pagina, body.menu-lateral.lateral-recolhida .pagina { margin-left: 0; }
  body.menu-lateral .nav-lateral { flex-direction: row; overflow-x: auto; }
  body.menu-lateral .lateral .rot, body.menu-lateral .lateral .por-gv { display: flex; }
  body.menu-lateral .btn-recolher { display: none; }
  body.menu-lateral .lateral-pe { flex-direction: row; flex-wrap: wrap; }
}

/* ---------- Configurações ---------- */
.papel { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 16px; background: var(--suave); }
.papel span { color: var(--texto2); font-size: 14px; }
.cor-input { height: 48px; padding: 4px; cursor: pointer; }
.estrelas-fixas { font-size: 30px; letter-spacing: 4px; color: #CBD2DA; }
.estrelas-fixas .cheia { color: #E9A913; }
/* Prévia do portal com a identidade */
.previa-portal { --p-txt: #fff; --d-txt: #10223A; border: 1px solid var(--borda-forte); border-radius: 20px; overflow: hidden; background: var(--fundo); box-shadow: inset 0 4px 0 var(--p); }
.pp-topo { display: flex; align-items: center; gap: 10px; padding: 16px; background: var(--cartao); }
.pp-logo { width: 40px; height: 40px; border-radius: 10px; background: var(--d); color: var(--d-txt); display: flex; align-items: center; justify-content: center; font-weight: 800; overflow: hidden; flex-shrink: 0; }
.pp-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.pp-nome { flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.pp-nome small { color: var(--texto2); font-size: 11px; }
.pp-nova { background: var(--d); color: var(--d-txt); font-weight: 700; font-size: 13px; padding: 8px 12px; border-radius: 10px; }
.pp-menu { display: flex; gap: 6px; padding: 0 16px 14px; background: var(--cartao); font-size: 13px; }
.pp-menu span { padding: 6px 12px; border-radius: 9px; color: var(--texto2); }
.pp-menu span.ativo { background: var(--p); color: var(--p-txt); font-weight: 700; }
.pp-corpo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 16px; }
.pp-cartao { background: var(--cartao); border: 1px solid var(--borda); border-radius: 14px; padding: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.pp-cartao.destaque { background: var(--d); color: var(--d-txt); border-color: var(--d); }
.pp-ic { width: 22px; height: 22px; border-radius: 6px; background: var(--p); }
.pp-botao { grid-column: 1 / -1; justify-self: start; background: var(--p); color: var(--p-txt); font-weight: 700; padding: 10px 16px; border-radius: 12px; font-size: 14px; }

/* ---------- Resumo do dia (Início) ---------- */
.saudacao { font-size: 15px; color: var(--texto2); margin-bottom: 2px; }
.resumo-dia { display: flex; flex-wrap: wrap; gap: 10px; }
.resumo-dia a { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 14px; background: var(--cartao); border: 1px solid var(--borda-forte); color: var(--texto); font-size: 14px; }
.resumo-dia a:hover { border-color: var(--p); opacity: 1; }
.resumo-dia b { min-width: 30px; height: 30px; padding: 0 8px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; }
.bv-resumo { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 4px 0 14px; }
.bv-resumo span { background: var(--suave); border-radius: 10px; padding: 6px 10px; font-size: 13px; }
.bv-resumo b { font-size: 15px; }
:root body.portal .lateral-pe a.ativo { background: var(--p); color: var(--p-txt); }

/* Saudação do Início: em destaque */
.saudacao-bloco { display: flex; flex-direction: column; gap: 2px; margin-bottom: 14px; padding-left: 14px; border-left: 4px solid var(--d, #D9B47A); }
:root body.portal .saudacao { font-size: clamp(22px, 2.6vw, 28px); font-weight: 700; color: var(--texto); line-height: 1.2; margin: 0; }
.saudacao-data { font-size: 14px; color: var(--texto2); }

/* ---------- Financeiro do portal: pagar o mês, recibos ---------- */
:root body.portal.portal-marca .fin-hero { background: var(--p); color: var(--p-txt); }
:root body.portal.portal-marca .fin-hero p { color: inherit; opacity: .88; }
.pagar-mes { margin-top: 20px; }
.pagar-mes > summary { list-style: none; display: inline-flex; cursor: pointer; }
.pagar-mes > summary::-webkit-details-marker { display: none; }
.pagar-mes[open] > summary { margin-bottom: 14px; }
.pagar-mes form { background: var(--cartao); color: var(--texto); border-radius: 18px; padding: 18px; }
.recibos { display: flex; flex-direction: column; }
.recibo-linha { display: flex; align-items: center; gap: 14px; padding: 14px 26px; border-top: 1px solid var(--borda-forte, var(--borda)); }
.recibo-ic { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--suave); color: var(--texto2); }
.recibo-ic.st-confirmado { background: #E6F5EE; color: #1F7A4D; }
.recibo-ic.st-em_analise { background: #EFE8FB; color: #6A3FC4; }
.recibo-ic.st-recusado { background: #FDECEB; color: #B53A33; }
:root[data-theme="dark"] .recibo-ic.st-confirmado { background: #15322A; color: #6FD3A4; }
:root[data-theme="dark"] .recibo-ic.st-em_analise { background: #2A2140; color: #B9A1F0; }
:root[data-theme="dark"] .recibo-ic.st-recusado { background: #3A1D1B; color: #F09A92; }
.recibo-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.recibo-valor { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; font-size: 13px; }
.recibo-valor strong { font-size: 17px; }
@media (max-width: 640px) { .recibo-linha { flex-wrap: wrap; padding: 14px 18px; } .recibo-valor { align-items: flex-start; text-align: left; width: 100%; } }
/* Recibo (página) */
.recibo { max-width: 860px; }
.recibo-cab { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; padding-bottom: 16px; border-bottom: 2px solid var(--texto); }
.recibo-marca { display: flex; align-items: center; gap: 10px; }
.recibo-partes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 18px; }
.recibo-partes > div { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 16px; background: var(--suave); }
.recibo-partes > div > span:first-child { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--texto2); }
.recibo tfoot td { border-top: 2px solid var(--texto); border-bottom: 0; }

/* ---------- Painel de Vistorias ---------- */
.painel-vist { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.painel-vist a { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 18px; background: var(--cartao); border: 1px solid var(--borda-forte, var(--borda)); color: var(--texto); position: relative; overflow: hidden; }
.painel-vist a::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--cor, var(--borda)); }
.painel-vist a:hover { border-color: var(--cor); opacity: 1; }
.painel-vist a.ativo { box-shadow: 0 0 0 2px var(--cor) inset; }
.painel-vist strong { font-size: 30px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.painel-vist span { font-size: 13px; color: var(--texto2); }

/* ---------- Leitura de documento pela IA (nova vistoria) ---------- */
.ler-doc { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; padding: 18px 20px; border-radius: 20px; border: 1.5px dashed var(--borda-forte, var(--borda)); background: var(--cartao); }
.ler-doc .txt { flex: 1 1 280px; display: flex; flex-direction: column; gap: 2px; }
.ler-doc .ia-selo { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: #6A3FC4; background: #EFE8FB; padding: 3px 10px; border-radius: 10px; align-self: flex-start; }
:root[data-theme="dark"] .ler-doc .ia-selo { background: #2A2140; color: #B9A1F0; }
.campo-ia input, .campo-ia select, .campo-ia textarea { box-shadow: 0 0 0 2px #B9A1F0; }
.hero .pagar-mes form p, .hero .pagar-mes form label { color: var(--texto); opacity: 1; }
.hero .pagar-mes form { box-shadow: 0 10px 30px rgba(0,0,0,.18); }

/* Vistorias: topo enxuto */
.vist-topo { display: flex; flex-direction: column; gap: 12px; }
.vist-chips a.ativo { border-color: var(--cor); box-shadow: 0 0 0 1.5px var(--cor) inset; font-weight: 700; }
.vist-filtros { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.vist-filtros select { width: auto; }

.vist-limpar { font-size: 14px; font-weight: 600; }

/* ======================================================================
   Campos com o visual do site (lista de opções, calendário e arquivo).
   O navegador só mostra o campo original escondido; quem aparece é o gv.js.
   ====================================================================== */
:root { --pick-bg: #10223A; --pick-txt: #FFFFFF; }
:root[data-theme="dark"] { --pick-bg: #D9B47A; --pick-txt: #0D1626; }
body.portal { --pick-bg: var(--p); --pick-txt: var(--p-txt); }
.sel, .dt { position: relative; min-width: 0; }
.sel-nativo, .dt-nativo { position: absolute; left: 0; bottom: 0; width: 100%; height: 1px; opacity: 0; pointer-events: none; }
.sel-btn, .dt-btn { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 46px; padding: 0 14px; border-radius: var(--r-campo); border: 1px solid var(--borda); background: var(--cartao); color: var(--texto); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.dt-btn { justify-content: flex-start; }
.sel-btn:hover, .dt-btn:hover { border-color: var(--latao); }
.sel-btn[aria-expanded=true], .dt-btn[aria-expanded=true] { border-color: var(--latao); box-shadow: 0 0 0 3px rgba(217,180,122,.28); }
.sel-btn span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sel-btn svg { flex-shrink: 0; color: var(--texto2); transition: transform .2s; }
.sel-btn[aria-expanded=true] svg { transform: rotate(180deg); }
.dt-btn svg { flex-shrink: 0; color: var(--texto2); }
.dt-vazio { color: var(--texto2); }
.sel.desligado, .dt.desligado { opacity: .55; }
.sel.desligado .sel-btn, .dt.desligado .dt-btn { cursor: not-allowed; }
.vist-filtros .sel { width: auto; min-width: 160px; }

.pick { position: fixed; z-index: 90; background: var(--cartao); border: 1px solid var(--borda-forte, var(--borda)); border-radius: 16px; box-shadow: 0 18px 44px rgba(16,34,58,.2); animation: pickEntra .14s ease-out; }
:root[data-theme="dark"] .pick { box-shadow: 0 18px 44px rgba(0,0,0,.5); }
@keyframes pickEntra { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .pick { animation: none; } }
.sel-lista { list-style: none; margin: 0; padding: 6px; max-height: 288px; overflow: auto; overscroll-behavior: contain; outline: none; }
.sel-lista li { padding: 10px 14px; border-radius: 10px; cursor: pointer; font-size: 15px; white-space: nowrap; }
.sel-lista li:hover, .sel-lista li.foco { background: var(--suave); }
.sel-lista li[aria-selected=true] { background: var(--pick-bg); color: var(--pick-txt); font-weight: 600; }
.sel-lista li[aria-disabled=true] { opacity: .4; cursor: not-allowed; }

.dt-pop { width: 296px; padding: 14px; }
.dt-cab { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.dt-cab strong { font-size: 15px; }
.dt-nav { width: 32px; height: 32px; border: 0; border-radius: 10px; background: var(--suave); color: var(--texto); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.dt-nav:hover { background: var(--pick-bg); color: var(--pick-txt); }
.dt-grade { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dt-sem { text-align: center; font-size: 12px; font-weight: 700; color: var(--texto2); padding: 4px 0 6px; }
.dt-dia { height: 36px; border: 1px solid transparent; border-radius: 10px; background: none; color: var(--texto); font: inherit; font-size: 14px; cursor: pointer; }
.dt-dia:hover:not(:disabled) { background: var(--suave); }
.dt-dia.hoje { border-color: var(--latao); font-weight: 700; }
.dt-dia.sel, .dt-dia.sel:hover { background: var(--pick-bg); border-color: var(--pick-bg); color: var(--pick-txt); font-weight: 700; }
.dt-dia:disabled { opacity: .3; cursor: not-allowed; }
.dt-pe { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--borda); }
.dt-pe .linkbtn:disabled { opacity: .4; cursor: not-allowed; }

/* Botão de arquivo: mesmo desenho em todo o sistema */
.arquivo .ic { background: var(--pick-bg); color: var(--pick-txt); }
.arquivo:hover, .arquivo.arrastando { border-color: var(--latao); background: var(--cartao); }
.arquivo:focus-within { outline: 3px solid var(--latao); outline-offset: 2px; }
.arquivo .qtd { max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ======================================================================
   Início do portal: quadro azul com os três botões (desenho da versão anterior)
   ====================================================================== */
body.portal { --hero-bg: #10223A; --hero-fg: #FFFFFF; }
:root[data-theme="dark"] body.portal { --hero-bg: #14203A; --hero-fg: #EEF0F3; }
body.portal.portal-marca, :root[data-theme="dark"] body.portal.portal-marca { --hero-bg: var(--p); --hero-fg: var(--p-txt); }
:root body.portal .hero { background: var(--hero-bg); color: var(--hero-fg); }
:root body.portal .hero p { color: inherit; opacity: .82; }
:root body.portal .hero .saudacao-bloco { border-left: 0; padding-left: 0; margin-bottom: 14px; }
:root body.portal .hero .saudacao { font-size: 15px; font-weight: 500; color: inherit; opacity: .85; }
:root body.portal .hero .saudacao-data { color: inherit; opacity: .65; }
:root body.portal .tipo-card { background: color-mix(in srgb, var(--hero-fg) 8%, var(--hero-bg)); border-color: color-mix(in srgb, var(--hero-fg) 16%, transparent); color: var(--hero-fg); }
:root body.portal .tipo-card .ic { background: color-mix(in srgb, var(--d) 18%, transparent); color: var(--d); }
:root body.portal .tipo-card.destaque { background: var(--d); border-color: var(--d); color: var(--d-txt); }
:root body.portal .tipo-card.destaque .ic { background: var(--hero-bg); color: var(--d); }
.tipo-card:focus-visible { outline: 3px solid var(--latao); outline-offset: 3px; }

/* Histórico do início: lupa que abre o campo de busca */
.cab-acoes { display: flex; align-items: center; gap: 14px; }
.busca-hist { display: flex; align-items: center; gap: 8px; }
.busca-hist .lupa { border: 1px solid var(--borda-forte, var(--borda)); background: var(--cartao); }
.busca-hist .lupa:hover, .busca-hist.aberta .lupa { background: var(--pick-bg); color: var(--pick-txt); border-color: var(--pick-bg); }
.busca-hist input[type=search] { width: 0; min-height: 40px; padding: 0; border: 0 solid var(--borda-forte, var(--borda)); border-radius: var(--r-campo); background: var(--cartao); color: var(--texto); font: inherit; opacity: 0; transition: width .25s ease, opacity .2s, padding .25s; }
.busca-hist.aberta input[type=search] { width: min(300px, 52vw); padding: 0 14px; border-width: 1px; opacity: 1; }
.busca-hist input[type=search]:focus { outline: 2px solid var(--latao); border-color: var(--latao); }
.caixa-rolagem .sem-resultado td { padding: 22px 26px; color: var(--texto2); }
@media (max-width: 560px) { .cab-acoes { width: 100%; justify-content: space-between; } }

/* Botão do menu: leva o menu do topo para a lateral e de volta */
.menu-troca { margin: 0; display: inline-flex; }
.menu-troca button { border: 0; font: inherit; }
.lateral-pe .menu-troca { display: flex; }
.lateral-pe .menu-troca button { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 10px; border-radius: 10px; background: none; color: var(--texto); cursor: pointer; white-space: nowrap; }
.lateral-pe .menu-troca button:hover { background: var(--suave); }
body.lateral-recolhida .lateral-pe .menu-troca button { justify-content: center; padding: 0; }

/* ======================================================================
   Portal: mais respiro. Espaços maiores, linhas mais leves, menos caixas.
   ====================================================================== */
body.portal .pagina { padding: 32px 56px 80px; }
body.portal .miolo { gap: 44px; max-width: 1240px; }
@media (max-width: 900px) { body.portal .pagina { padding: 20px 20px 56px; } body.portal .miolo { gap: 32px; } }
body.portal .cartao { padding: 36px; border-color: var(--borda); box-shadow: 0 1px 2px rgba(16,34,58,.04), 0 12px 32px rgba(16,34,58,.04); }
body.portal .cartao.sem-pad { padding: 0; }
body.portal .sem-pad .cartao-cab { padding: 32px 36px 0; margin-bottom: 22px; }
body.portal .cartao-cab { margin-bottom: 24px; }
body.portal .grade { gap: 32px; }
body.portal .form-grade { gap: 24px 22px; }
body.portal .campo { gap: 8px; }
body.portal .passo { margin-bottom: 26px; }
body.portal h1 { line-height: 1.1; }
body.portal h1 + p, body.portal h1 + .muted { margin-top: 14px; }

/* Quadro azul do início */
body.portal .hero { padding: 64px 56px 56px; border-radius: 36px; }
body.portal .hero .saudacao-bloco { margin-bottom: 28px; gap: 6px; }
body.portal .hero h1 + p { margin-top: 16px; font-size: 18px; }
body.portal .hero .tipos { gap: 28px; margin-top: 52px; }
body.portal .tipo-card { padding: 32px; gap: 16px; min-height: 210px; border-radius: 28px; }
body.portal .tipo-card .ic { margin-bottom: 8px; }
body.portal .tipo-card .d { line-height: 1.55; }
@media (max-width: 900px) { body.portal .hero { padding: 36px 24px; } body.portal .hero .tipos { gap: 16px; margin-top: 32px; } }

/* Avisos e resumo do dia: mais leves */
body.portal .faixa { padding: 20px 26px; gap: 18px; }
body.portal .resumo-dia { gap: 12px 28px; }
body.portal .resumo-dia a { padding: 0; border: 0; background: none; gap: 10px; color: var(--texto2); font-size: 15px; }
body.portal .resumo-dia a:hover { color: var(--texto); }
body.portal .resumo-dia b { min-width: 34px; height: 34px; border-radius: 11px; }
body.portal .vist-chips a { padding: 6px 16px 6px 6px; border: 1px solid var(--borda); background: var(--cartao); border-radius: 999px; }
body.portal .vist-topo { gap: 22px; }
body.portal .vist-filtros { gap: 12px; }

/* Tabelas: linhas altas, sem divisória pesada */
body.portal .tabela th { font-weight: 600; font-size: 12.5px; letter-spacing: .03em; text-transform: uppercase; color: var(--texto2); border-bottom: 0; padding: 14px 16px; }
body.portal .tabela td { padding: 22px 16px; border-bottom-color: var(--borda); }
body.portal .tabela th:first-child, body.portal .tabela td:first-child { padding-left: 36px; }
body.portal .tabela th:last-child, body.portal .tabela td:last-child { padding-right: 36px; }
body.portal .tabela .linha-mes td { padding: 14px 36px; }
body.portal .caixa-rolagem { max-height: 560px; }

/* Menu */
body.portal .topo { padding: 12px 20px; gap: 24px; }
body.portal .nav a { padding: 0 20px; }
body.menu-lateral .lateral { padding: 22px 16px; gap: 10px; }
.nav-lateral { gap: 6px; }
.nav-lateral a { min-height: 48px; }
.lateral .lateral-nova { margin: 10px 2px 18px; }
.lateral-topo { padding-bottom: 18px; margin-bottom: 14px; }
.lateral-pe { gap: 8px; padding-top: 18px; }
@media (max-width: 1180px) {
  body.portal .pagina { padding: 28px 32px 64px; }
  body.portal .hero { padding: 44px 36px; }
  body.portal .hero .tipos { grid-template-columns: 1fr; gap: 18px; margin-top: 36px; }
  body.portal .tipo-card { min-height: 0; padding: 26px 28px; }
  body.portal .tipo-card .ic { margin-bottom: 0; }
}

/* Ajuste: respiro na medida (referência: protótipo da linha A, mais compacto) */
body.portal .pagina { padding: 20px 28px 56px; }
body.portal .miolo { gap: 28px; max-width: 1320px; }
body.portal .cartao { padding: 28px; }
body.portal .sem-pad .cartao-cab { padding: 22px 28px 0; margin-bottom: 14px; }
body.portal .grade { gap: 24px; }
body.portal .form-grade { gap: 18px 16px; }
body.portal .hero { padding: 40px 44px; border-radius: 34px; }
body.portal .hero .saudacao-bloco { margin-bottom: 14px; gap: 0; }
body.portal .hero .saudacao-data { display: none; }
body.portal .hero h1 { font-size: clamp(32px, 3.6vw, 46px); }
body.portal .hero h1 + p { margin-top: 10px; font-size: 16px; }
body.portal .hero .tipos { gap: 16px; margin-top: 24px; }
body.portal .tipo-card { padding: 22px 24px; gap: 8px; min-height: 0; border-radius: 24px; }
body.portal .tipo-card .ic { width: 46px; height: 46px; border-radius: 14px; margin-bottom: 4px; }
body.portal .tipo-card .t { font-size: 25px; }
body.portal .tipo-card .d { font-size: 14.5px; line-height: 1.45; }
body.portal .faixa { padding: 14px 20px; }
body.portal .resumo-dia { gap: 8px 22px; }
body.portal .resumo-dia a { font-size: 14px; }
body.portal .resumo-dia b { min-width: 30px; height: 30px; }
body.portal .tabela th { padding: 12px 14px; }
body.portal .tabela td { padding: 15px 14px; }
body.portal .tabela th:first-child, body.portal .tabela td:first-child { padding-left: 28px; }
body.portal .tabela th:last-child, body.portal .tabela td:last-child { padding-right: 28px; }
body.portal .tabela .linha-mes td { padding: 10px 28px; }
body.portal .caixa-rolagem { max-height: 440px; }
body.menu-lateral .lateral { padding: 16px 12px; gap: 6px; }
.nav-lateral { gap: 2px; }
.nav-lateral a { min-height: 44px; }
.lateral .lateral-nova { margin: 6px 2px 10px; }
.lateral-topo { padding-bottom: 10px; margin-bottom: 8px; }
.lateral-pe { gap: 6px; padding-top: 12px; }
@media (max-width: 1180px) {
  body.portal .pagina { padding: 16px 20px 48px; }
  body.portal .hero { padding: 28px 24px; }
  body.portal .hero .tipos { margin-top: 20px; gap: 12px; }
  body.portal .tipo-card { padding: 18px 20px; }
}

/* ---------- Botão dourado: aro colorido que gira ao passar o mouse ---------- */
@property --ang { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
body.portal .btn.latao { position: relative; }
body.portal .btn.latao::after { content: ''; position: absolute; inset: -4px; padding: 3px; border-radius: 18px; pointer-events: none; opacity: 0; transition: opacity .2s;
  background: conic-gradient(from var(--ang), var(--p), var(--d), #FFFFFF, var(--p));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
body.portal .btn.latao:hover::after, body.portal .btn.latao:focus-visible::after { opacity: 1; animation: giraAro 2.4s linear infinite; }
@keyframes giraAro { to { --ang: 360deg; } }
@media (prefers-reduced-motion: reduce) { body.portal .btn.latao:hover::after, body.portal .btn.latao:focus-visible::after { animation: none; } }

/* Coluna de código e ícones da linha (laudo e pasta de mídia) */
.tabela td.codigo { width: 1%; white-space: nowrap; font-weight: 700; font-variant-numeric: tabular-nums; }
.tabela td.codigo a { color: var(--texto); }
.acoes-linha { display: inline-flex; gap: 8px; align-items: center; justify-content: flex-end; }
.acoes-linha .icone-btn { border: 1px solid var(--borda); background: var(--cartao); }
.acoes-linha a.icone-btn:hover { background: var(--pick-bg); color: var(--pick-txt); border-color: var(--pick-bg); opacity: 1; }
.icone-btn.desligado { opacity: .35; cursor: not-allowed; }
/* Campo de busca com lupa */
.busca-campo { position: relative; display: block; flex: 1 1 220px; min-width: 180px; }
.busca-campo > svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--texto2); pointer-events: none; }
.busca-campo input { padding-left: 42px; width: 100%; }
.vist-filtros input[type=search] { min-height: 46px; padding-right: 14px; border-radius: var(--r-campo); border: 1px solid var(--borda); background: var(--cartao); color: var(--texto); font: inherit; }
.campo .busca-campo { flex: none; }

/* Botão fixo de WhatsApp da GV */
.whats-btn { position: fixed; right: 24px; bottom: 24px; z-index: 40; display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 20px 0 16px; border-radius: 999px; background: #1FA855; color: #fff; font-weight: 600; box-shadow: 0 10px 28px rgba(16,34,58,.28); transition: transform .2s, box-shadow .2s; }
.whats-btn:hover { opacity: 1; transform: translateY(-2px); box-shadow: 0 14px 32px rgba(16,34,58,.34); }
@media (max-width: 700px) { .whats-btn { right: 16px; bottom: 16px; padding: 0; width: 52px; justify-content: center; } .whats-btn span { display: none; } }
@media print { .whats-btn { display: none; } }
.opcoes .opcao strong { font-weight: 700; }

/* Documentos do pedido */
.docs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.doc-linha { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--borda); }
.doc-linha:first-child { border-top: 0; padding-top: 0; }
.doc-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--pick-bg); color: var(--pick-txt); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.doc-linha.vazio .doc-ic { background: var(--suave); color: var(--texto2); }
.doc-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.doc-txt strong { font-weight: 600; overflow-wrap: anywhere; }
.doc-acoes { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 560px) { .doc-linha { flex-wrap: wrap; } .doc-acoes { width: 100%; justify-content: flex-start; padding-left: 54px; } }

/* ======================================================================
   Financeiro: quadro azul com a fatura e o painel ao lado (modelo AFinanceiro)
   ====================================================================== */
.fin-topo { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.fin-topo .muted { margin-top: 8px; }
.fin-acoes { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.fin-filtro { display: flex; gap: 8px; align-items: center; margin: 0; }
.fin-filtro .sel { min-width: 150px; }
.fin-destaque { display: flex; flex-wrap: wrap; gap: 28px; align-items: stretch; padding: 36px 40px; }
.fin-principal { flex: 2 1 360px; display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.fin-rot, .fin-sub { color: inherit; opacity: .8; font-size: 15px; }
.fin-valor { font-size: clamp(42px, 5vw, 58px); line-height: 1.05; }
.fin-botoes { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.fin-lado { flex: 1 1 250px; display: flex; flex-direction: column; gap: 10px; justify-content: center; padding: 22px 24px; border-radius: 22px; background: color-mix(in srgb, var(--hero-fg, #fff) 9%, transparent); }
.fin-lado-rot { font-size: 14px; opacity: .8; }
.fin-lado-valor { font-size: 28px; font-weight: 700; }
.fin-lado-linhas { display: flex; flex-direction: column; gap: 8px; }
.fin-lado-linhas > div { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.fin-selo { align-self: flex-start; display: inline-flex; align-items: center; height: 30px; padding: 0 14px; border-radius: 15px; font-size: 13px; font-weight: 700; background: #F2A516; color: #10223A; }
.fin-selo.urgente { background: #D6453D; color: #fff; }
.fin-selo.ok { background: #1F9D61; color: #fff; }
.fin-colunas { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 24px; align-items: start; }
@media (max-width: 1100px) { .fin-colunas { grid-template-columns: 1fr; } }
.fin-lista { list-style: none; margin: 0; padding: 0 0 4px; }
.fin-lista li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 28px; border-top: 1px solid var(--borda); }
.fin-lista li.ativa { background: var(--suave); }
.fin-fat-info { display: flex; flex-direction: column; gap: 2px; color: var(--texto); min-width: 0; }
.fin-fat-lado { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.fin-fat-lado .icone-btn { border: 1px solid var(--borda); background: var(--cartao); }

/* Janelas (dialog) */
.gv-dialog { border: 0; border-radius: 28px; padding: 28px; width: min(640px, calc(100% - 32px)); max-height: calc(100vh - 48px); background: var(--cartao); color: var(--texto); box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.gv-dialog::backdrop { background: rgba(16,34,58,.5); backdrop-filter: blur(3px); }
.gv-dialog[open] { animation: bvEntra .3s cubic-bezier(.2,.9,.3,1.1); }
.dlg-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.dlg-cab h2 { font-size: 26px; }
.dlg-cab .icone-btn { font-size: 22px; line-height: 1; }
.dlg-pe { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.recibo-itens { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--borda); max-height: 280px; overflow: auto; }
.recibo-itens li { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--borda); }
.ri-cod { font-weight: 700; white-space: nowrap; }
.ri-end { color: var(--texto2); min-width: 0; overflow-wrap: anywhere; }
.recibo-total { display: flex; justify-content: space-between; align-items: center; padding: 16px 0 0; font-weight: 600; }
.recibo-total strong { font-family: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif; font-weight: 400; font-size: 30px; }

/* Recibo */
.recibo-doc { display: flex; flex-direction: column; gap: 18px; }
.recibo-cab { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; padding-bottom: 18px; border-bottom: 2px solid var(--texto); }
.recibo-marca { display: flex; align-items: center; gap: 12px; }
.recibo-marca > div { display: flex; flex-direction: column; line-height: 1.25; }
.recibo-marca svg { width: 44px; height: 44px; }
.recibo-num { text-align: right; display: flex; flex-direction: column; }
.recibo-num h2 { font-size: 28px; }
.recibo-partes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.recibo-partes > div { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.recibo-partes > div > span:first-child { color: var(--texto2); font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; }
@media (max-width: 640px) { .recibo-partes { grid-template-columns: 1fr; } }
.recibo-tit { font-size: 18px; margin-top: 4px; }
.recibo-ass { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin-top: 8px; padding-top: 8px; }
.recibo-ass img { filter: none; }
:root[data-theme="dark"] .recibo-ass img { background: #fff; border-radius: 10px; padding: 4px 8px; }
.recibo-botoes { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.gv-dialog-recibo { width: min(720px, calc(100% - 32px)); }
@media print { .gv-dialog::backdrop { display: none; } }

/* Vistorias: cada mês é um bloco com título próprio, longe da linha de colunas */
.vist-mes { display: flex; flex-direction: column; gap: 14px; }
.vist-mes + .vist-mes { margin-top: 8px; }
.vist-mes-tit { font-size: 26px; padding: 0 4px; }
.vist-mes-tit .muted { font-family: 'Hanken Grotesk', Arial, sans-serif; font-size: 15px; }
.tabela-vist { table-layout: fixed; }
.tabela-vist th:nth-child(1) { width: 92px; } .tabela-vist th:nth-child(3) { width: 96px; } .tabela-vist th:nth-child(4) { width: 15%; }
.tabela-vist th:nth-child(5) { width: 13%; } .tabela-vist th:nth-child(6) { width: 140px; } .tabela-vist th:nth-child(7) { width: 270px; }

/* Meses recolhíveis */
details.vist-mes > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-radius: 12px; user-select: none; }
details.vist-mes > summary::-webkit-details-marker { display: none; }
details.vist-mes > summary:hover { background: color-mix(in srgb, var(--texto) 5%, transparent); }
details.vist-mes > summary svg { transition: transform .2s; flex-shrink: 0; }
details.vist-mes:not([open]) > summary svg { transform: rotate(-90deg); }
details.vist-mes > summary h2 { font-size: 26px; }
details.vist-mes[open] > summary { margin-bottom: 8px; }
.vist-recolher { display: flex; justify-content: flex-end; margin-bottom: -22px; }
.recibo-comp { margin-top: 14px; }

/* Cartões da tela inicial: aro colorido que gira ao passar o mouse, junto com a animação de subir */
body.portal .tipo-card { position: relative; }
body.portal .tipo-card::after { content: ''; position: absolute; inset: -3px; padding: 3px; border-radius: 27px; pointer-events: none; opacity: 0; transition: opacity .2s;
  background: conic-gradient(from var(--ang), var(--d), #FFFFFF, var(--p), var(--d));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
body.portal .tipo-card:hover::after, body.portal .tipo-card:focus-visible::after { opacity: 1; animation: giraAro 2.4s linear infinite; }
@media (prefers-reduced-motion: reduce) { body.portal .tipo-card:hover::after, body.portal .tipo-card:focus-visible::after { animation: none; } }
.gv-dialog-recibo .recibo-itens { max-height: 190px; }
/* Código da vistoria antes do nome do imóvel */
.cod { font-weight: 700; font-variant-numeric: tabular-nums; margin-right: 6px; }
.lp-tit .cod { margin-right: 8px; }

/* Admin, tela inicial: seção principal de atribuição */
.atrib-destaque { border: 2px solid var(--borda-forte, var(--borda)); }
.atrib-destaque .cartao-cab h2 { font-size: clamp(28px, 3vw, 36px); }
.atrib-contador { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 20px; background: var(--suave); color: var(--texto2); font-weight: 600; }
.atrib-contador strong { font-size: 22px; color: var(--texto); }
.atrib-contador.tem { background: #FDECEB; color: #B53A33; }
.atrib-contador.tem strong { color: #D6453D; }
:root[data-theme="dark"] .atrib-contador.tem { background: #3A1D1B; color: #F09A92; }
.tabela-atrib td { vertical-align: top; }
.atrib-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; min-width: 440px; margin: 0; }
.atrib-form .sel { flex: 1 1 150px; }
.atrib-form .dt { flex: 1 1 140px; }
.atrib-form .sel:nth-of-type(3) { flex: 0 1 110px; }
.atrib-vazio { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 40px 24px 48px; }
.atrib-vazio-ic { width: 56px; height: 56px; border-radius: 28px; background: #E6F5EE; color: #1F9D61; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 8px; }
:root[data-theme="dark"] .atrib-vazio-ic { background: #15322A; color: #6FD3A4; }
.atrib-vazio strong { font-size: 20px; }

/* Admin: filtros e tabela de vistorias */
.adm-filtros { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px 16px; align-items: end; padding: 22px; }
.adm-f-busca { grid-column: span 2; }
.adm-f-sem { display: flex; gap: 8px; align-items: center; min-height: 46px; }
.adm-f-acoes { display: flex; gap: 14px; align-items: center; min-height: 46px; }
.adm-filtros .busca-campo { flex: none; }
.tabela-admin-vist .acoes-linha { gap: 6px; }
.acoes-linha .icone-btn.sem-link { opacity: .45; }
.acoes-linha .icone-btn.sem-link:hover { opacity: 1; }
.dropbox-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-top: 16px; }
@media (max-width: 700px) { .adm-f-busca { grid-column: auto; } }
.adm-filtros input[type=search] { min-height: 46px; border-radius: var(--r-campo); border: 1px solid var(--borda); background: var(--cartao); color: var(--texto); font: inherit; }

/* Financeiro do admin: categorias, baixa e cobrança */
.cat-lista { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cat-lista li { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cat-lista li.inativa .cat-ren input { opacity: .55; text-decoration: line-through; }
.cat-ren { display: flex; gap: 6px; flex: 1; min-width: 0; margin: 0; }
.cat-ren input { flex: 1; min-width: 0; min-height: 40px; }
.cat-nova { display: flex; gap: 8px; margin: 0; }
.cat-nova input { flex: 1; min-width: 0; }
.bx-nota { margin-top: 14px; border: 1px dashed var(--borda); border-radius: 16px; padding: 12px 16px; }
.bx-nota summary { cursor: pointer; font-weight: 600; }
#dlg-baixa { width: min(720px, calc(100% - 32px)); }
#cobrar-texto { min-height: 240px; }

/* Cadastro (admin) */
.cad-filtros { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 0; flex: 1 1 360px; }
.cad-filtros .busca-campo { flex: 1 1 260px; }
.cad-filtros .busca-campo input { min-height: 46px; border-radius: var(--r-campo); border: 1px solid var(--borda); background: var(--cartao); color: var(--texto); font: inherit; }
.tabela tr.inativo td { opacity: .6; }
.user-perfil { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; align-items: center; margin: 0; }
.user-perfil .sel { min-width: 190px; }
.remun .chips { margin-top: 6px; }
.remun .chip span { align-items: flex-start; text-align: left; min-width: 170px; }

/* Clientes: lista em cartões e ficha */
.cli-barra { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; }
.cli-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.cli-card { display: flex; flex-direction: column; gap: 16px; padding: 22px; border-radius: 24px; background: var(--cartao); border: 1px solid var(--borda); box-shadow: var(--sombra); color: var(--texto); transition: transform .2s, border-color .2s; }
.cli-card:hover { opacity: 1; transform: translateY(-2px); border-color: var(--latao); }
.cli-topo { display: flex; align-items: center; gap: 12px; }
.cli-topo .avatar, .cli-topo .logo-imob { width: 46px; height: 46px; flex-shrink: 0; font-size: 16px; }
.cli-nome { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.cli-nome strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cli-nums { display: flex; gap: 18px; flex-wrap: wrap; }
.cli-nums span { display: flex; flex-direction: column; line-height: 1.2; }
.cli-nums b { font-size: 17px; }
.cli-nums small { color: var(--texto2); font-size: 12.5px; }
.cli-selos { display: flex; flex-wrap: wrap; gap: 6px; min-height: 26px; }
.cli-cab { display: flex; align-items: center; gap: 16px; }
.abas .qtd { margin-left: 6px; font-size: 12px; padding: 1px 8px; border-radius: 10px; background: var(--suave); }
.tempo-lista { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--borda); display: flex; flex-direction: column; gap: 12px; }
.tempo-lista li { display: flex; gap: 14px; position: relative; }
.tempo-lista li::before { content: ''; position: absolute; left: -21px; top: 7px; width: 10px; height: 10px; border-radius: 5px; background: var(--latao); }
.tempo-data { width: 92px; flex-shrink: 0; color: var(--texto2); font-size: 14px; }
.nota-form { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; margin-top: 18px; }
.estrelas-radio { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; flex: 0 0 auto; min-width: 0; position: relative; }
.estrelas-radio legend { position: static; padding: 0; white-space: nowrap; }
.estrelas-linha { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.estrelas-radio input { position: absolute; opacity: 0; }
.estrelas-radio label { font-size: 30px; line-height: 1; color: #CBD2DA; cursor: pointer; }
.estrelas-radio input:checked ~ label, .estrelas-radio label:hover, .estrelas-radio label:hover ~ label { color: #E9A913; }
.estrelas-radio input:focus-visible + label { outline: 3px solid var(--latao); border-radius: 6px; }
.tipos-pct { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 8px 0; }
.paginacao { display: flex; gap: 14px; align-items: center; justify-content: center; padding: 18px; }

/* Convite semanal para avaliar no Google e rodapé do portal */
.convite-google { gap: 14px; }
.convite-google .fechar-faixa { font-size: 22px; }
.rodape-portal { text-align: center; padding: 8px 0 0; color: var(--texto2); font-size: 14px; }

/* Dashboard: uma cor por significado, igual em todas as abas (comissão em cinza-azulado, nunca vermelho) */
:root { --g-vist: #1F9D61; --g-rec: #2F6FED; --g-com: #6C7A92; --g-ant: #B7C0CC; --g-t1: #10223A; --g-t2: #D9B47A; --g-t3: #2A9DB0; --g-t4: #7A4FD6; --g-t5: #E39B4A; --g-out: #B7C0CC; }
:root[data-theme="dark"] { --g-vist: #3DC283; --g-rec: #6C9CFF; --g-com: #9AA9C2; --g-ant: #566277; --g-t1: #8FB0E8; --g-t2: #D9B47A; --g-t3: #4CC1D4; --g-t4: #A98BF0; --g-t5: #F0B06A; --g-out: #566277; }
.legenda-g { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: 13.5px; color: var(--texto2); }
.legenda-g i, .rosca-leg i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 7px; vertical-align: -1px; }
.rosca-g { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; }
.rosca-leg { list-style: none; margin: 0; padding: 0; flex: 1 1 220px; display: flex; flex-direction: column; gap: 8px; }
.rosca-leg li { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; font-size: 14.5px; }
.rosca-leg li > i { grid-column: 1; margin: 0; }
.rosca-leg small { color: var(--texto2); min-width: 44px; text-align: right; }
.hbarras { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.hbarras li { display: grid; grid-template-columns: minmax(110px, 190px) 1fr auto; gap: 12px; align-items: center; font-size: 14.5px; }
.hb-trilho { height: 14px; border-radius: 7px; background: var(--suave); overflow: hidden; }
.hb-barra { display: block; height: 100%; border-radius: 7px; }
.hb-val { font-weight: 700; min-width: 70px; text-align: right; }
.dash-filtros { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0; }
.dash-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.dash-chips a { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--borda); background: var(--cartao); color: var(--texto); font-size: 14px; font-weight: 600; }
.dash-chips a.ativo { background: var(--pick-bg, #10223A); color: var(--pick-txt, #fff); border-color: var(--pick-bg, #10223A); }
.dash-chips a.futuro { opacity: .4; pointer-events: none; }
.destaque-cresc { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; padding: 28px 32px; border-radius: 28px; background: var(--hero-bg, #10223A); color: var(--hero-fg, #fff); }
.destaque-cresc .num { font-family: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: clamp(34px, 4vw, 48px); line-height: 1.05; }
.destaque-cresc .sub { opacity: .8; font-size: 14.5px; }
.var-pos { color: #1F9D61; font-weight: 700; } .var-neg { color: #D6453D; font-weight: 700; } .var-zero { color: var(--texto2); font-weight: 700; }
.destaque-cresc .var-pos { color: #7BE0AB; } .destaque-cresc .var-neg { color: #FF9C94; }

/* IA: campos preenchidos automaticamente ficam marcados e a tela de uso */
.campo-ia > label::after { content: ' · preenchido automaticamente'; font-weight: 500; font-size: 12px; color: #6A3FC4; }
:root[data-theme="dark"] .campo-ia > label::after { color: #B9A1F0; }
.ler-boleto-res { margin: 0; padding: 10px 14px; font-size: 14px; }
.ia-lista { margin: 0 0 12px; padding-left: 18px; display: flex; flex-direction: column; gap: 10px; }

/* ======================================================================
   Painel do administrador (MUDANCAS-ADMIN-2, Bloco 1)
   O admin usa body.portal + body.admin: mesmas variáveis e mesmo modo noturno do portal.
   Espaços e raios ficam nestas variáveis (um lugar só).
   ====================================================================== */
:root { --espaco-bloco: 32px; --espaco-cartao: 28px; --raio-bloco: 26px; --altura-quadro: 340px; --largura-lado: 320px; }

/* Menu lateral do admin */
body.admin .marca-gv { background: var(--marinho, #10223A); color: var(--latao); width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
:root body.portal.admin .marca-gv { background: var(--hero-bg); color: var(--d); }
body.admin .lateral-marca .rot small { font-size: 12px; }
.nav-grupo { margin: 14px 0 4px; padding: 0 14px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--texto2); }
.barra-sup { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-bottom: -22px; position: relative; z-index: 25; }
.abrir-lateral, .lateral-veu { display: none; }
body.admin .lateral-pe .pe-linha { min-height: 44px; }

/* Bloco azul-marinho no topo de cada tela (o gv.js marca o bloco do título) */
body.admin .hero, body.admin .bloco-marinho { background: var(--hero-bg); color: var(--hero-fg); border-radius: var(--raio-bloco); padding: 28px 34px; border: 0; }
body.admin .bloco-marinho h1 { font-size: clamp(28px, 3.4vw, 38px); color: inherit; }
body.admin .bloco-marinho p, body.admin .bloco-marinho .muted { color: inherit; opacity: .78; }
body.admin .bloco-marinho .btn { background: var(--d); border-color: var(--d); color: var(--d-txt); }
body.admin .bloco-marinho .abas { background: transparent; }
body.admin .bloco-marinho .abas a { color: inherit; opacity: .85; }
:root body.portal.admin .bloco-marinho .abas a.ativo { background: var(--d); color: var(--d-txt); opacity: 1; }
body.admin .bloco-marinho a:not(.btn):not(.ativo) { color: inherit; }
body.admin .miolo { gap: var(--espaco-bloco); }
body.admin .cartao { padding: var(--espaco-cartao); box-shadow: 0 1px 2px rgba(16,34,58,.04), 0 12px 32px rgba(16,34,58,.04); }
body.admin .cartao.sem-pad { padding: 0; }
body.admin .sem-pad .cartao-cab { padding: 26px 28px 0; margin-bottom: 18px; }

/* Tela Hoje */
.hoje-topo { display: flex; flex-direction: column; gap: 20px; }
.hoje-topo-cab { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.hoje-topo h1 { color: inherit; }
.hoje-data { opacity: .75; margin-bottom: 4px; font-size: 14px; }
.hoje-busca { display: flex; gap: 8px; min-width: min(380px, 100%); }
.hoje-busca input { background: color-mix(in srgb, var(--hero-fg) 10%, transparent); border-color: color-mix(in srgb, var(--hero-fg) 22%, transparent); color: var(--hero-fg); }
.hoje-busca input::placeholder { color: var(--hero-fg); opacity: .6; }
:root body.portal.admin .hoje-topo .resumo-dia { gap: 10px 26px; }
:root body.portal.admin .hoje-topo .resumo-dia a { color: var(--hero-fg); opacity: .92; font-size: 14.5px; }
:root body.portal.admin .hoje-topo .resumo-dia a:hover { opacity: 1; }
.hoje-grade { display: grid; grid-template-columns: minmax(0, 1fr) var(--largura-lado); gap: var(--espaco-bloco); align-items: start; }
.hoje-main { display: flex; flex-direction: column; gap: var(--espaco-bloco); min-width: 0; }
.hoje-lado { position: sticky; top: 20px; }
body.admin .caixa-rolagem.hist-fixo { max-height: var(--altura-quadro); }
.agenda-mini { list-style: none; margin: 0; padding: 0 12px; max-height: 360px; overflow: auto; overscroll-behavior: contain; }
.agenda-mini a { display: grid; grid-template-columns: 54px auto 1fr; gap: 8px; align-items: center; padding: 11px 12px; border-radius: 12px; color: var(--texto); font-size: 14px; }
.agenda-mini a:hover { background: var(--suave); opacity: 1; }
.agenda-mini .hora { font-weight: 700; }
.agenda-mini .muted { text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agenda-mini-pe { padding: 14px 28px 22px; }
@media (max-width: 1100px) { .hoje-grade { grid-template-columns: minmax(0, 1fr); } .hoje-lado { position: static; } }

/* Celular: o menu lateral vira gaveta */
@media (max-width: 900px) {
  body.admin.menu-lateral .lateral, body.admin.menu-lateral.lateral-recolhida .lateral { position: fixed; top: 0; bottom: 0; left: 0; width: min(300px, 84vw); z-index: 60; border: 0; border-right: 1px solid var(--borda-forte); transform: translateX(-105%); transition: transform .25s ease; box-shadow: 0 0 60px rgba(0,0,0,.3); }
  body.admin.lateral-aberta .lateral { transform: none; }
  body.admin.menu-lateral .nav-lateral { flex-direction: column; overflow-x: visible; }
  body.admin.menu-lateral .lateral-pe { flex-direction: column; flex-wrap: nowrap; }
  body.admin.menu-lateral .lateral-topo { flex-direction: row; }
  .abrir-lateral { display: inline-flex; position: fixed; top: 12px; left: 12px; z-index: 25; background: var(--cartao); border: 1px solid var(--borda-forte); }
  .lateral-veu { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(8,16,30,.5); }
  .barra-sup { padding-left: 52px; margin-bottom: -10px; }
  body.admin .hero, body.admin .bloco-marinho { padding: 22px 20px; }
}
@media (prefers-reduced-motion: reduce) { body.admin.menu-lateral .lateral { transition: none; } }

/* Boas-vindas do administrador (1x por dia): calma, sem pressa, com saída a qualquer momento */
.bv-adm { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 20px; background: color-mix(in srgb, var(--hero-bg, #10223A) 88%, transparent); backdrop-filter: blur(6px); animation: bvFundo .6s ease-out; }
.bv-adm.saindo { animation: bvSai .4s ease-in forwards; }
.bv-adm-cartao { position: relative; width: 100%; max-width: 560px; background: var(--cartao); color: var(--texto); border-radius: 32px; padding: 52px 44px 40px; text-align: center; box-shadow: 0 30px 80px rgba(0,0,0,.35), inset 0 5px 0 var(--d, var(--latao)); animation: bvEntra .8s cubic-bezier(.2,.8,.2,1); }
.bv-adm-cartao section { display: flex; flex-direction: column; align-items: center; gap: 14px; animation: bvPasso .5s ease-out; }
.bv-adm-pular-tudo { position: absolute; top: 16px; right: 18px; border: 0; background: none; color: var(--texto2); font: inherit; font-size: 14px; cursor: pointer; padding: 8px 10px; border-radius: 10px; }
.bv-adm-pular-tudo:hover { background: var(--suave); }
.bv-adm-ola { color: var(--texto2); font-size: 18px; }
.bv-adm-ola strong { color: var(--texto); }
.bv-adm-cartao h2 { font-size: clamp(28px, 5vw, 38px); line-height: 1.1; }
.bv-adm-verso { margin: 6px 0; padding: 18px 22px; border-radius: 20px; background: var(--suave); }
.bv-adm-verso blockquote { margin: 0 0 8px; font-family: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 20px; line-height: 1.4; }
.bv-adm-verso figcaption { color: var(--texto2); font-weight: 600; font-size: 14px; letter-spacing: .02em; }
.bv-adm-txt { color: var(--texto2); }
.bv-adm-pergunta { font-weight: 700; font-size: 18px; margin-top: 4px; }
.bv-adm-botoes { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 6px; }
.bv-adm-botoes .btn { min-width: 130px; }
.bv-adm-relogio { position: relative; width: 168px; height: 168px; margin: 8px 0; }
.bv-adm-relogio svg { transform: rotate(-90deg); }
.bv-adm-relogio circle { fill: none; stroke-width: 6; }
.bv-adm-relogio .trilho { stroke: var(--suave); }
.bv-adm-relogio .fio { stroke: var(--d, var(--latao)); stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.bv-adm-relogio .tempo { position: absolute; inset: 0; display: grid; place-items: center; font-family: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 38px; }
.bv-adm-amem { font-size: clamp(40px, 8vw, 58px) !important; }
@keyframes bvPasso { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (max-width: 560px) { .bv-adm-cartao { padding: 48px 22px 30px; border-radius: 26px; } }
@media (prefers-reduced-motion: reduce) { .bv-adm, .bv-adm-cartao, .bv-adm-cartao section, .bv-adm.saindo { animation: none; } .bv-adm-relogio .fio { transition: none; } }

/* Admin, tela Hoje: proporções novas (filas em cartões, busca em pílula) */
:root { --largura-lado: 300px; --espaco-bloco: 24px; --espaco-cartao: 24px; --raio-bloco: 22px; }
body.admin .hoje-topo { padding: 24px 28px; gap: 16px; }
body.admin .hoje-topo h1 { font-size: clamp(28px, 3vw, 34px); }
.hoje-busca { align-items: center; gap: 4px; min-width: min(400px, 100%); padding: 5px 5px 5px 14px; border-radius: 999px; background: color-mix(in srgb, var(--hero-fg) 10%, transparent); border: 1px solid color-mix(in srgb, var(--hero-fg) 20%, transparent); }
.hoje-busca:focus-within { border-color: var(--latao); box-shadow: 0 0 0 3px color-mix(in srgb, var(--latao) 30%, transparent); }
.hoje-busca .busca-ic { display: inline-flex; color: var(--hero-fg); opacity: .7; }
.hoje-busca input[type=search] { flex: 1; min-width: 0; min-height: 36px; padding: 0 8px; border: 0; border-radius: 0; background: transparent; color: var(--hero-fg); font: inherit; font-size: 14.5px; -webkit-appearance: none; appearance: none; }
.hoje-busca input[type=search]:focus { outline: 0; }
.hoje-busca input[type=search]::-webkit-search-cancel-button { display: none; }
.hoje-busca .btn { border-radius: 999px; padding: 0 20px; min-height: 38px; }
body.admin .sem-pad .cartao-cab { padding: 22px 24px 0; margin-bottom: 14px; }
body.admin .bloco-fila .cartao-cab h2, body.admin #historico .cartao-cab h2, body.admin .hoje-lado .cartao-cab h2 { font-size: clamp(21px, 2.2vw, 25px); }
body.admin .bloco-fila .cartao-cab .muted { margin-top: 4px; font-size: 14px; }
.atrib-contador { height: 34px; padding: 0 14px; font-size: 14px; }
.atrib-contador strong { font-size: 18px; }
.fila { list-style: none; margin: 0; padding: 0 12px 12px; display: flex; flex-direction: column; }
.fila-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 16px 12px; border-top: 1px solid var(--borda); }
.fila-item:first-child { border-top: 0; }
.fila-info { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.fila-info p { margin: 0; }
.fila-tit { color: var(--texto); font-weight: 700; font-size: 16px; line-height: 1.3; }
.fila-acoes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fila-acoes form { margin: 0; }
.fila-atrib .atrib-form { flex: 0 1 auto; flex-wrap: nowrap; min-width: 0; gap: 8px; }
.fila-atrib .atrib-form .sel { flex: 0 0 160px; }
.fila-atrib .atrib-form .dt { flex: 0 0 150px; }
.fila-atrib .atrib-form .sel:nth-of-type(2) { flex: 0 0 100px; }
@media (max-width: 1280px) { .fila-atrib .atrib-form { flex-wrap: wrap; } }
.atrib-vazio { padding: 28px 24px 36px; }
.hist-fixo td:nth-child(2), .hist-fixo th:nth-child(2) { min-width: 230px; }

/* Bloco 8: comportamento geral */
/* Botões sobre fundo azul-marinho: hover, foco e clique acendem em latão com texto escuro */
:root:root:root body .bloco-marinho .btn:is(:hover, :focus-visible, :active),
:root:root:root body .hero .btn:is(:hover, :focus-visible, :active),
:root:root:root body .faixa-fatura .btn:is(:hover, :focus-visible, :active),
:root:root:root body .destaque-cresc .btn:is(:hover, :focus-visible, :active),
:root:root:root body .lado-marca .btn:is(:hover, :focus-visible, :active) { background: #D9B47A; border-color: #D9B47A; color: #10223A; opacity: 1; }
:root:root:root body .bloco-marinho .btn:focus-visible, :root body .hero .btn:focus-visible, :root body .faixa-fatura .btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
:root:root:root body .bloco-marinho .abas a:is(:hover, :focus-visible, :active) { background: #D9B47A; color: #10223A; opacity: 1; }
.btn { transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .15s ease; }
/* Faixas azuis de cabeçalho mais grossas (teste) */
body.admin .hero, body.admin .bloco-marinho { padding: 38px 34px; }
@media (max-width: 760px) { body.admin .hero, body.admin .bloco-marinho { padding: 30px 20px; } }
/* Abas: maiores, traço mais grosso, alvo de clique de 44 px */
.abas { padding: 5px; border: 2px solid var(--borda); }
.abas a { min-height: 44px; padding: 0 20px; font-size: 15px; font-weight: 700; border: 2px solid transparent; }
.abas a.ativo { border-color: currentColor; }
body.portal .abas a { min-height: 44px; }
/* Resumo: ícone antes de títulos e linhas, destaque por tipo de bloco */
.rot-ic, .tit-ic { display: inline-flex; align-items: center; gap: 8px; }
.rot-ic svg { flex-shrink: 0; opacity: .75; }
.linhas-def > div > .rot-ic { display: inline-flex; }
.tit-ic { gap: 10px; }
.ic-chip { width: 36px; height: 36px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--suave); color: #10223A; flex-shrink: 0; }
:root[data-theme="dark"] .ic-chip { color: #D9B47A; }
.cartao.dest-azul { box-shadow: var(--sombra), inset 5px 0 0 #2B4F86; }
.cartao.dest-verde { box-shadow: var(--sombra), inset 5px 0 0 #1F9D61; }
.cartao.dest-vermelho { box-shadow: var(--sombra), inset 5px 0 0 #D6453D; }
.cartao.dest-latao { box-shadow: var(--sombra), inset 5px 0 0 #D9B47A; }
.dest-verde .rot-ic svg { color: #1F9D61; opacity: 1; }
.dest-vermelho .rot-ic svg { color: #D6453D; opacity: 1; }
.dest-azul .rot-ic svg { color: #2B4F86; opacity: 1; }
.dest-latao .ic-chip { background: #D9B47A; color: #10223A; }
.abas { flex-wrap: wrap; max-width: 100%; }
@media (max-width: 760px) { .abas a { padding: 0 14px; } }
/* Grades: cartão com tabela não estica a página no celular */
.grade > *, .fin-topo > * { min-width: 0; }
.rolagem { position: relative; max-width: 100%; overflow-x: auto; }

/* Etapa 1: tipografia (respiro nas letras, numerais alinhados) */
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-variant-numeric: lining-nums; }
h1, h2, h3, .serif, .logo, .tipo-card .t, .t2-t { letter-spacing: .015em; }
.resumo .valor, .kpi .v, .etapa-box .n, .faixa-fatura .valor, .recibo-total strong, .destaque-cresc .num, .bv-adm-relogio .tempo { letter-spacing: .02em; word-spacing: .12em; font-variant-numeric: lining-nums tabular-nums; }
.num, td.num, th.num, .tabela td, .contador, .qtd { font-variant-numeric: lining-nums tabular-nums; }

/* Etapa 1b: menu do topo (admin) em 3 zonas, sem sobreposição: marca | itens principais + "Mais" | conta */
.topo-admin { flex-wrap: nowrap; justify-content: flex-start; gap: 16px; }
.topo-admin .logo { flex: 0 0 auto; }
.topo-admin .logo span { white-space: nowrap; }
.topo-admin .nav-centro { flex: 1 1 0; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 6px; }
.topo-admin .nav { flex: 0 1 auto; min-width: 0; flex-wrap: nowrap; }
.topo-admin .nav a, .nav-mais > summary { white-space: nowrap; padding: 0 12px; font-size: 14.5px; }
.topo-admin .conta { flex: 0 0 auto; gap: 8px; }
.topo-admin .conta .menu-conta > summary { white-space: nowrap; }
.nav-mais { position: relative; z-index: 2; flex: 0 0 auto; }
.nav-mais > summary { list-style: none; min-height: 38px; display: flex; align-items: center; gap: 6px; border-radius: 11px; color: var(--texto2); cursor: pointer; background: rgba(16,34,58,0.05); }
.nav-mais > summary::-webkit-details-marker { display: none; }
.nav-mais > summary:hover, .nav-mais[open] > summary { color: var(--texto); background: var(--cartao); }
.nav-mais > summary.ativo { color: var(--texto); font-weight: 600; background: var(--cartao); box-shadow: 0 1px 3px rgba(16,34,58,0.08); }
.nav-mais > summary:focus-visible, .nav-mais .painel a:focus-visible { outline: 2px solid var(--latao); outline-offset: 1px; }
.nav-mais[open] > summary svg { transform: rotate(180deg); }
:root[data-theme="dark"] .nav-mais > summary { background: rgba(255,255,255,0.06); }
.nav-mais > summary > span:first-child { max-width: 135px; overflow: hidden; text-overflow: ellipsis; }
.ponto-mais { width: 8px; height: 8px; border-radius: 50%; background: #D6453D; flex-shrink: 0; }
.nav-mais .painel { position: absolute; right: 0; top: 48px; min-width: 230px; background: var(--cartao); border: 1px solid var(--borda); border-radius: 12px; box-shadow: 0 20px 50px rgba(0,0,0,.15); padding: 8px; z-index: 40; display: flex; flex-direction: column; gap: 2px; }
.nav-mais .painel.duas { display: grid; grid-template-columns: repeat(2, minmax(190px, 1fr)); min-width: 400px; }
.nav-mais .painel a, .mm-lista a { min-height: 44px; display: flex; align-items: center; gap: 10px; padding: 0 12px; border-radius: 10px; color: var(--texto); white-space: nowrap; }
.nav-mais .painel a:hover, .mm-lista a:hover { background: var(--suave); opacity: 1; }
.nav-mais .painel a.ativo, .mm-lista a.ativo { background: var(--suave); font-weight: 600; }
.nav-mais .painel a svg, .mm-lista a svg { flex-shrink: 0; color: var(--texto2); }
.nav-mais .painel a span:not(.contador), .mm-lista a span:not(.contador) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.nav-mais .contador, .mm-lista .contador { position: static; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: #D6453D; color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.topo-admin .hamb, .topo-admin .menu-mobile { display: none; }
/* Telas médias: o nome da seção aberta em "Mais" some do botão (fica só "Mais" marcado) para não empurrar o menu para fora do quadro */
@media (max-width: 1700px) { .nav-mais .mais-ativo { display: none; } }
@media (max-width: 1450px) {
  .topo-admin { gap: 10px; }
  .topo-admin .nav a, .nav-mais > summary { padding: 0 9px; font-size: 14px; }
  .nav-mais > summary > span:first-child { max-width: 100px; }
}
@media (max-width: 1360px) {
  .topo-admin .nav-centro { display: none; }
  .topo-admin .logo { margin-right: auto; }
  .topo-admin .hamb { display: inline-flex; }
  .topo-admin .menu-mobile:not([hidden]) { display: block; position: absolute; left: 0; right: 0; top: calc(100% + 8px); background: var(--cartao); border: 1px solid var(--borda); border-radius: 12px; box-shadow: 0 20px 50px rgba(0,0,0,.18); padding: 8px; z-index: 40; max-height: calc(100vh - 110px); overflow-y: auto; }
  .mm-lista { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; }
}
@media (max-width: 700px) {
  .topo-admin { padding: 8px 10px 8px 14px; gap: 8px; }
  .topo-admin .menu-mobile:not([hidden]) { position: fixed; inset: 0; top: 0; border-radius: 0; border: 0; box-shadow: none; max-height: none; padding: 76px 14px 20px; z-index: 30; }
  .topo-admin { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--cartao); }
  .topo-admin .conta, .topo-admin .logo { position: relative; z-index: 31; }
  .topo-admin .conta { gap: 6px; }
  .topo-admin .conta .menu-troca, .topo-admin .conta > [data-tema] { display: none; }
  .topo-admin .logo { min-width: 0; }
  .mm-lista { grid-template-columns: 1fr; }
  .mm-lista a { min-height: 52px; font-size: 16px; }
}
.topo-admin .logo .etiqueta { display: none; }

/* Etapa 1: menu lateral com rolagem própria e rodapé sempre visível */
body.menu-lateral .lateral { overflow: hidden; }
body.menu-lateral .nav-lateral { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; }
body.menu-lateral .lateral-pe { flex-shrink: 0; margin-top: 0; }

/* Etapa 2: tela Hoje em largura total, blocos com cor e ícone */
.hoje-grade { grid-template-columns: minmax(0, 1fr); }
.bloco-tit { display: flex; align-items: center; gap: 14px; min-width: 0; }
.bloco-ic { width: 48px; height: 48px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--bloco-cor-fundo); color: var(--bloco-cor); }
body.admin .bloco-fila .cartao-cab h2 { font-size: clamp(25px, 2.6vw, 30px); }
.bloco-atrib { --bloco-cor: #B7791F; --bloco-cor-fundo: #FDF1D8; box-shadow: var(--sombra), inset 6px 0 0 #F2A516; }
.bloco-revisao { --bloco-cor: #6B3FC4; --bloco-cor-fundo: #EEE8FB; box-shadow: var(--sombra), inset 6px 0 0 #7A4FD6; }
:root[data-theme="dark"] .bloco-atrib { --bloco-cor: #F2C46B; --bloco-cor-fundo: #3B2F14; }
:root[data-theme="dark"] .bloco-revisao { --bloco-cor: #B9A0F0; --bloco-cor-fundo: #2B2250; }
.bloco-atrib .atrib-contador.tem { background: #FDF1D8; color: #8A5A0B; }
.bloco-atrib .atrib-contador.tem strong { color: #B7791F; }
.bloco-revisao .atrib-contador.tem { background: #EEE8FB; color: #55309F; }
.bloco-revisao .atrib-contador.tem strong { color: #6B3FC4; }
/* Histórico: largura total, sem corte lateral, ações sempre visíveis */
body.admin .caixa-rolagem.hist-fixo { overflow-x: hidden; }
.hist-fixo table { table-layout: auto; }
.hist-fixo td:last-child, .hist-fixo th:last-child { white-space: nowrap; width: 1%; }
@media (max-width: 1400px) { .hist-fixo th:nth-child(6), .hist-fixo td:nth-child(6) { display: none; } }
@media (max-width: 1200px) { .hist-fixo th:nth-child(3), .hist-fixo td:nth-child(3) { display: none; } }
@media (max-width: 900px) { .hist-fixo th:nth-child(4), .hist-fixo td:nth-child(4), .hist-fixo th:nth-child(5), .hist-fixo td:nth-child(5) { display: none; } }
/* Boas-vindas: cartão maior e versículo confortável */
.bv-adm-cartao { max-width: 720px; padding: 60px 56px 48px; }
.bv-adm-cartao h2 { font-size: clamp(32px, 5vw, 46px); }
.bv-adm-verso { padding: 26px 30px; }
.bv-adm-verso blockquote { font-size: clamp(21px, 3vw, 27px); line-height: 1.45; }
.bv-adm-verso figcaption { font-size: 15px; }
@media (max-width: 560px) { .bv-adm-cartao { padding: 48px 22px 30px; } }
.hist-fixo td, .hist-fixo th { padding-left: 9px; padding-right: 9px; }
.hist-fixo th:first-child, .hist-fixo td:first-child { padding-left: 22px; }
.hist-fixo th:last-child, .hist-fixo td:last-child { padding-right: 18px; }
.hist-fixo td:nth-child(2), .hist-fixo th:nth-child(2) { min-width: 180px; }
@media (max-width: 1500px) { .hist-fixo th:nth-child(6), .hist-fixo td:nth-child(6) { display: none; } }
@media (max-width: 1320px) { .hist-fixo th:nth-child(3), .hist-fixo td:nth-child(3) { display: none; } }

/* Etapa 3: página do pedido */
input[type=url] { min-height: 46px; width: 100%; padding: 0 14px; border-radius: var(--r-campo); border: 1px solid var(--borda); background: var(--cartao); color: var(--texto); font: inherit; }
.barra-pedido { position: sticky; top: 12px; z-index: 18; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 20px; background: var(--vidro); border: 1px solid var(--borda); box-shadow: 0 8px 24px rgba(16,34,58,.08); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
body.menu-lateral .barra-pedido { top: 8px; }
.barra-pedido .btn { min-height: 40px; padding: 0 14px; }
.barra-pedido .btn.desligado { opacity: .5; cursor: not-allowed; }
.barra-mais { position: relative; margin-left: auto; }
.barra-mais > summary { list-style: none; }
.barra-mais > summary::-webkit-details-marker { display: none; }
.barra-mais .painel { position: absolute; right: 0; top: 46px; min-width: 200px; background: var(--cartao); border: 1px solid var(--borda); border-radius: 16px; box-shadow: 0 20px 50px rgba(0,0,0,.15); padding: 6px; z-index: 40; display: flex; flex-direction: column; gap: 2px; }
.barra-mais .painel a, .barra-mais .painel button { display: flex; align-items: center; min-height: 42px; padding: 0 12px; border-radius: 10px; border: 0; background: none; font: inherit; color: var(--texto); cursor: pointer; text-align: left; }
.barra-mais .painel a:hover, .barra-mais .painel button:hover { background: var(--suave); opacity: 1; }
.pedido-baixo { align-items: stretch; }
.pedido-baixo > .cartao { display: flex; flex-direction: column; }
.pedido-baixo .msgs { max-height: 340px; overflow: auto; overscroll-behavior: contain; }
/* Pessoas: "papel: nome" alinhado, contato em texto menor */
.pessoas-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.pessoas-lista li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 14px; padding: 11px 0; border-top: 1px solid var(--borda); align-items: start; }
.pessoas-lista li:first-child { border-top: 0; padding-top: 0; }
.pessoas-lista .papel { color: var(--texto2); font-size: 14px; padding-top: 2px; }
.pessoas-lista li > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) { .pessoas-lista li { grid-template-columns: 1fr; gap: 2px; } }
/* Conferência compacta por cômodo */
.conf-contadores { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-bottom: 16px; }
.conf-cont { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 4px 12px; padding: 14px 16px; border-radius: 18px; border: 1px solid var(--borda); background: var(--suave); }
.conf-cont strong { font-family: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 28px; font-weight: 400; line-height: 1; }
.conf-cont > span:last-child { font-size: 14px; color: var(--texto2); }
.conf-ic { width: 38px; height: 38px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: #fff; }
.conf-cont.grave { background: #FDECEB; border-color: #F3C3BF; } .conf-cont.grave strong, .conf-cont.grave .conf-ic { color: #D6453D; }
.conf-cont.ambar { background: #FDF1D8; border-color: #F0D9A0; } .conf-cont.ambar strong, .conf-cont.ambar .conf-ic { color: #B7791F; }
.conf-cont.ok { background: #E6F5EC; border-color: #BFE3CE; } .conf-cont.ok strong, .conf-cont.ok .conf-ic { color: #1F9D61; }
:root[data-theme="dark"] .conf-cont.grave { background: #3A1D1B; border-color: #6B2F2A; } :root[data-theme="dark"] .conf-cont.ambar { background: #3B2F14; border-color: #6B5522; } :root[data-theme="dark"] .conf-cont.ok { background: #15322A; border-color: #24704F; } :root[data-theme="dark"] .conf-ic { background: rgba(255,255,255,.08); }
.conf-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; align-items: start; }
.conf-comodo { border: 1px solid var(--borda); border-radius: 16px; background: var(--cartao); overflow: hidden; box-shadow: inset 5px 0 0 #F2A516; }
.conf-comodo.grave { box-shadow: inset 5px 0 0 #D6453D; }
.conf-comodo > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: center; padding: 12px 14px 12px 20px; }
.conf-comodo > summary::-webkit-details-marker { display: none; }
.conf-nome { font-weight: 700; }
.conf-res { grid-column: 1; }
.conf-seta { grid-row: 1 / span 2; grid-column: 2; transition: transform .2s; color: var(--texto2); display: inline-flex; }
.conf-comodo[open] .conf-seta { transform: rotate(180deg); }
.conf-lista { list-style: none; margin: 0; padding: 4px 14px 12px 20px; max-height: 190px; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 6px; font-size: 14px; border-top: 1px solid var(--borda); }
.conf-lista li { padding-top: 6px; }
.conf-lista li.grave { color: #D6453D; }
.conferencia:not(.cartao) { margin-top: 4px; }

/* Revisão do laudo: texto do vistoriador (vermelho) x texto final da GV */
.rev-chip { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; vertical-align: middle; }
.rev-chip.vist { background: #FDECEB; color: #B53A33; }
.rev-chip.gv { background: #E6F5EC; color: #1B7F50; }
:root[data-theme="dark"] .rev-chip.vist { background: #3A1D1B; color: #F09A92; }
:root[data-theme="dark"] .rev-chip.gv { background: #15322A; color: #7FD0A5; }
.rev-legenda { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.rev-comodos { display: flex; flex-direction: column; gap: 20px; }
.rev-fotos { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 8px; }
.rev-fotos img { height: 84px; width: 112px; object-fit: cover; border-radius: 10px; border: 1px solid var(--borda); }
.rev-campo { padding: 14px 0; border-top: 1px solid var(--borda); }
.rev-campo-cab { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 10px; }
.rev-estado { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.rev-estado::before { content: ''; width: 10px; height: 10px; border-radius: 5px; background: var(--c); }
.rev-alerta { font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.rev-alerta.grave { background: #FDECEB; color: #B53A33; } .rev-alerta.ambar { background: #FDF1D8; color: #8A5A0B; }
.rev-par { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 14px; align-items: start; }
@media (max-width: 900px) { .rev-par { grid-template-columns: 1fr; } }
.rev-rot { display: block; font-size: 12.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--texto2); margin-bottom: 6px; }
.rev-orig { padding: 12px 14px; border-radius: 14px; background: var(--suave); }
.rev-orig p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.rev-orig.alterado { background: #FDECEB; border: 1px solid #F3C3BF; }
.rev-orig.alterado p, .rev-orig.alterado .rev-rot { color: #B53A33; }
:root[data-theme="dark"] .rev-orig.alterado { background: #3A1D1B; border-color: #6B2F2A; }
:root[data-theme="dark"] .rev-orig.alterado p, :root[data-theme="dark"] .rev-orig.alterado .rev-rot { color: #F09A92; }
.rev-final textarea { min-height: 64px; }
.rev-campo.corrigido .rev-final textarea { border-color: #1F9D61; }
.rev-sug { margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: #EEE8FB; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.rev-sug p { margin: 0; overflow-wrap: anywhere; } .rev-sug .rev-rot { color: #55309F; margin: 0; }
:root[data-theme="dark"] .rev-sug { background: #2B2250; } :root[data-theme="dark"] .rev-sug .rev-rot { color: #B9A0F0; }
.rev-barra { position: sticky; bottom: 12px; z-index: 18; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; margin-top: 20px; border-radius: 20px; background: var(--vidro); border: 1px solid var(--borda); box-shadow: 0 -8px 24px rgba(16,34,58,.08); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.rev-antes { color: #B53A33; white-space: pre-wrap; overflow-wrap: anywhere; }
.rev-qtd { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; font-size: 13px; font-weight: 600; color: var(--texto2); }
.rev-qtd input { width: 84px; min-height: 38px; padding: 0 10px; text-align: center; }
.rev-fotos { gap: 10px; }
.rev-fotos img { height: 130px; width: 180px; }
.rev-fotos a { flex-shrink: 0; }

/* Foto em tela cheia dentro do app */
.foto-zoom { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; background: rgba(8,16,28,.92); animation: fzEntra .18s ease-out; }
@keyframes fzEntra { from { opacity: 0; } to { opacity: 1; } }
.foto-zoom[hidden] { display: none; }
.foto-zoom-aberta { overflow: hidden; }
.fz-palco { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 56px 72px 64px; overflow: auto; }
.fz-palco img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; cursor: zoom-in; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.foto-zoom.ampliada .fz-palco { align-items: flex-start; justify-content: flex-start; }
.foto-zoom.ampliada .fz-palco img { max-width: none; max-height: none; width: 180%; cursor: zoom-out; }
.fz-fechar, .fz-nav { position: absolute; border: 0; background: rgba(255,255,255,.14); color: #fff; cursor: pointer; border-radius: 999px; font-size: 30px; line-height: 1; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; z-index: 2; }
.fz-fechar:hover, .fz-nav:hover, .fz-fechar:focus-visible, .fz-nav:focus-visible { background: #D9B47A; color: #10223A; outline: 0; }
.fz-fechar { top: 14px; right: 14px; }
.fz-nav { top: 50%; transform: translateY(-50%); }
.fz-ant { left: 14px; } .fz-prox { right: 14px; }
.foto-zoom.so-uma .fz-nav { display: none; }
.fz-leg { position: absolute; left: 0; right: 0; bottom: 16px; text-align: center; color: #E6ECF3; font-size: 14px; pointer-events: none; }
@media (max-width: 700px) { .fz-palco { padding: 56px 10px 60px; } .fz-nav { top: auto; bottom: 10px; transform: none; } }

/* Sino: marcar aviso como lido ao passar o mouse */
.notif-item { display: flex; align-items: center; gap: 4px; }
.notif-item a { flex: 1; min-width: 0; }
.notif-ok { flex: 0 0 auto; width: 30px; height: 30px; margin-right: 6px; border: 0; border-radius: 50%; background: var(--suave); color: var(--texto2); font-size: 15px; font-weight: 700; cursor: pointer; opacity: 0; transition: opacity .15s, background .15s; }
.notif-item:hover .notif-ok, .notif-item:focus-within .notif-ok, .notif-ok:focus-visible { opacity: 1; }
.notif-ok:hover { background: #2E9E5B; color: #fff; }
@media (hover: none) { .notif-ok { opacity: 1; } }

/* Menu do topo (admin): destaque em azul-marinho na página atual e azul clarinho ao passar o mouse */
.topo-admin .nav a { transition: color .2s, background-color .2s; }
.topo-admin .nav a:not(.ativo):hover { color: #10223A; background: #DDE8F8; }
.topo-admin .nav a.ativo { color: #fff; font-weight: 600; }
.topo-admin .nav .nav-marcador, .topo-admin .nav:not(.com-marcador) a.ativo { background: #10223A; box-shadow: 0 4px 12px rgba(16,34,58,.28); }
.nav-mais > summary:hover, .nav-mais[open] > summary { color: #10223A; background: #DDE8F8; }
.nav-mais > summary.ativo { color: #fff; background: #10223A; box-shadow: 0 4px 12px rgba(16,34,58,.28); }
.nav-mais > summary.ativo:hover, .nav-mais[open] > summary.ativo { color: #fff; background: #1B3558; }
.nav-mais .painel a:hover, .mm-lista a:hover { background: #E4EDFA; }
.nav-mais .painel a.ativo, .mm-lista a.ativo { background: #10223A; color: #fff; }
.nav-mais .painel a.ativo svg, .mm-lista a.ativo svg { color: #D9B47A; }
:root[data-theme="dark"] .topo-admin .nav a:not(.ativo):hover, :root[data-theme="dark"] .nav-mais > summary:hover, :root[data-theme="dark"] .nav-mais[open] > summary:not(.ativo) { color: #fff; background: rgba(130,170,255,.2); }
:root[data-theme="dark"] .topo-admin .nav a.ativo, :root[data-theme="dark"] .nav-mais > summary.ativo, :root[data-theme="dark"] .nav-mais .painel a.ativo, :root[data-theme="dark"] .mm-lista a.ativo { color: #0D1626; }
:root[data-theme="dark"] .topo-admin .nav .nav-marcador, :root[data-theme="dark"] .topo-admin .nav:not(.com-marcador) a.ativo, :root[data-theme="dark"] .nav-mais > summary.ativo, :root[data-theme="dark"] .nav-mais .painel a.ativo, :root[data-theme="dark"] .mm-lista a.ativo { background: #D9B47A; box-shadow: none; }
:root[data-theme="dark"] .nav-mais .painel a.ativo svg, :root[data-theme="dark"] .mm-lista a.ativo svg { color: #0D1626; }

/* Etapa 4: lista por mês (padrão de listas longas) */
.lm-barra { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 0 26px 14px; }
.lm-nav { display: flex; align-items: center; gap: 8px; min-width: 0; }
.lm-nav .icone-btn { font-size: 18px; font-weight: 700; line-height: 1; color: var(--texto); }
.lm-nav .icone-btn.desligado { opacity: .35; cursor: default; }
.lm-nav select, .lm-nav .sel { min-width: 230px; }
.lm-acoes { display: flex; flex-wrap: wrap; gap: 8px; }
.lm-grupo { border-top: 1px solid var(--borda); }
.lm-grupo > summary { list-style: none; display: flex; align-items: center; gap: 14px; padding: 14px 26px; cursor: pointer; background: var(--suave); min-height: 52px; }
.lm-grupo > summary::-webkit-details-marker { display: none; }
.lm-grupo > summary::before { content: '▸'; color: var(--texto2); transition: transform .2s; }
.lm-grupo[open] > summary::before { transform: rotate(90deg); }
.lm-grupo.unico > summary { cursor: default; }
.lm-grupo.unico > summary::before { display: none; }
.lm-nome { flex: 1; min-width: 0; font-size: 16px; font-weight: 700; color: var(--texto); }
.lm-cont { color: var(--texto2); font-size: 14px; white-space: nowrap; }
.lm-valor { font-weight: 700; color: var(--texto); white-space: nowrap; font-variant-numeric: lining-nums tabular-nums; }
.lm-vazio { display: flex; align-items: center; justify-content: center; gap: 8px; }
.hist-fixo .lm-grupo > summary { position: sticky; top: 0; z-index: 2; }
@media (max-width: 700px) { .lm-barra, .lm-grupo > summary { padding-left: 16px; padding-right: 16px; } .lm-nav select, .lm-nav .sel { min-width: 0; } }

/* Tela Hoje: "Hoje" com a data ao lado e a saudação maior embaixo */
.hoje-tit { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
body.admin .hoje-topo .hoje-tit h1 { font-size: clamp(20px, 2vw, 24px); margin: 0; }
body.admin .hoje-topo .hoje-tit .hoje-data { margin: 0; font-size: 15px; opacity: .8; }
body.admin .hoje-topo .hoje-saudacao { margin: 8px 0 0; font-family: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: clamp(32px, 3.6vw, 44px); line-height: 1.12; letter-spacing: .015em; color: inherit; }

/* Abas com contador legível (aba ativa azul: contador em latão) e estrelas em amarelo */
.abas a .qtd { background: #E3E9F0; color: #10223A; font-weight: 700; min-width: 24px; text-align: center; }
.abas a.ativo .qtd, body.portal .abas a.ativo .qtd { background: #D9B47A; color: #10223A; }
:root[data-theme="dark"] .abas a:not(.ativo) .qtd { background: rgba(255,255,255,.14); color: #fff; }
.estrela-amarela, .etiqueta .estrela-amarela { color: #F2A516; font-size: 1.1em; line-height: 1; }

/* Etapa 5: Novo cliente grande e centralizado, chips Ativo/Inativo fortes, ranking */
.cli-novo { display: flex; justify-content: center; margin: 4px 0 20px; }
.btn.grande { min-height: 58px; padding: 0 40px; font-size: 18px; border-radius: 16px; gap: 10px; display: inline-flex; align-items: center; box-shadow: 0 8px 20px rgba(217,180,122,.4); }
.chip-status { display: inline-flex; align-items: center; gap: 5px; padding: 3px 11px 3px 8px; border-radius: 999px; font-size: 13px; font-weight: 700; line-height: 1.4; white-space: nowrap; }
.chip-status.on { background: #1F9D61; color: #fff; }
.chip-status.off { background: #3B4A5E; color: #fff; border: 1px solid #1E2A3A; }
.cli-card { position: relative; }
.cli-pos { position: absolute; top: 14px; right: 16px; min-width: 34px; padding: 3px 9px; border-radius: 999px; background: #10223A; color: #fff; font-size: 13px; font-weight: 700; text-align: center; }
:root[data-theme="dark"] .cli-pos { background: #D9B47A; color: #0D1626; }
.cli-selos { align-items: center; }

.ind-lista { max-height: 200px; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 12px; padding: 10px 12px; border: 1px solid var(--borda); border-radius: 12px; background: var(--cartao); }
.ind-item { display: flex; align-items: center; gap: 8px; min-height: 36px; cursor: pointer; }
.ind-item input { width: 18px; height: 18px; }

.semaforo-opcoes { display: flex; flex-wrap: wrap; gap: 10px; }
.sem-op { cursor: pointer; }
.sem-op input { position: absolute; opacity: 0; pointer-events: none; }
.sem-op > span { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 14px; border: 2px solid var(--borda); font-weight: 700; background: var(--cartao); }
.sem-bom > span span { color: #1F9D61; } .sem-atencao > span span { color: #F2A516; } .sem-ruim > span span { color: #D6453D; }
.sem-bom input:checked + span { background: #1F9D61; border-color: #1F9D61; color: #fff; }
.sem-atencao input:checked + span { background: #F2A516; border-color: #F2A516; color: #10223A; }
.sem-ruim input:checked + span { background: #D6453D; border-color: #D6453D; color: #fff; }
.sem-op input:checked + span span { color: inherit; }
.sem-op input:focus-visible + span { outline: 3px solid var(--latao); outline-offset: 2px; }

/* Exportar da lista por mês */
.lm-export { position: relative; }
.lm-export > summary { list-style: none; cursor: pointer; }
.lm-export > summary::-webkit-details-marker { display: none; }
.lm-export-painel { position: absolute; right: 0; top: calc(100% + 6px); min-width: 250px; z-index: 30; background: var(--cartao); border: 1px solid var(--borda); border-radius: 12px; box-shadow: 0 20px 50px rgba(0,0,0,.15); padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.lm-export-painel p { padding: 2px 8px 8px; }
.lm-export-painel a { display: flex; align-items: center; min-height: 42px; padding: 0 12px; border-radius: 10px; color: var(--texto); font-weight: 600; }
.lm-export-painel a:hover { background: #DDE8F8; opacity: 1; }
.lm-marca { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin: -4px 0; cursor: pointer; }
.lm-marca input { width: 20px; height: 20px; cursor: pointer; }

/* Tela Hoje: mais respiro; "Hoje" na mesma letra da data; saudação branca em destaque */
body.admin .hoje-topo { padding: 34px 38px 36px; gap: 34px; }
body.admin .hoje-topo .hoje-tit { gap: 10px; align-items: baseline; }
body.admin .hoje-topo .hoje-tit h1 { font-family: inherit; font-size: 15px; font-weight: 600; letter-spacing: 0; margin: 0; color: inherit; opacity: .8; }
body.admin .hoje-topo .hoje-tit .hoje-data { font-size: 15px; font-weight: 600; opacity: .8; }
body.admin .hoje-topo .hoje-saudacao { margin: 18px 0 0; color: #fff; opacity: 1; font-size: clamp(34px, 3.8vw, 46px); }
body.admin .hoje-topo .resumo-dia { gap: 14px 34px; padding-top: 6px; }

/* Menu lateral recolhido: sem barra de rolagem visível, itens centralizados e "Sair" só com ícone */
body.lateral-recolhida .nav-lateral { scrollbar-width: none; -ms-overflow-style: none; align-items: center; }
body.lateral-recolhida .nav-lateral::-webkit-scrollbar { display: none; width: 0; }
body.lateral-recolhida .nav-lateral a { width: 52px; min-width: 0; }
body.lateral-recolhida .lateral-pe { align-items: center; }
body.lateral-recolhida .lateral-pe form[action="/sair"] button { font-size: 0; width: 44px; height: 44px; padding: 0; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--suave); color: var(--texto); }
body.lateral-recolhida .lateral-pe form[action="/sair"] button::before { content: ''; width: 20px; height: 20px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 4h4v16h-4M10 8l-4 4 4 4M6 12h11'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 4h4v16h-4M10 8l-4 4 4 4M6 12h11'/%3E%3C/svg%3E") center / contain no-repeat; }
body.lateral-recolhida .lateral-pe .pe-linha { width: 100%; align-items: center; }

/* Menu lateral: topo e botão "Atribuir" nunca encolhem (no recolhido o botão de recolher sobrepunha o "+") */
body.menu-lateral .lateral-topo, body.menu-lateral .lateral-nova { flex-shrink: 0; }
body.lateral-recolhida .lateral-topo { align-items: center; gap: 8px; height: auto; padding-bottom: 12px; margin-bottom: 4px; }
body.lateral-recolhida .lateral-marca { justify-content: center; }

/* Histórico de vistorias (tela Hoje): cabem 5 linhas de uma vez */
body.admin .caixa-rolagem.hist-fixo { max-height: 505px; }

/* ---------- Gráficos renovados (Etapa 6): valores visíveis, tendência, animação, tela cheia ---------- */
.grafico { position: relative; }
.grafico.com-barra { padding-top: 44px; }
.grafico .barra .valor, .grafico .valor { opacity: 1; pointer-events: none; }
.g-barra { position: absolute; top: 0; right: 0; display: flex; gap: 6px; z-index: 2; }
.g-btn { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 1.5px solid var(--borda); background: var(--cartao); color: var(--texto2); border-radius: 10px; cursor: pointer; padding: 0; }
.g-btn:hover, .g-btn:focus-visible { background: #DDE8F8; color: #10223A; border-color: #9DB6DC; }
:root[data-theme="dark"] .g-btn:hover, :root[data-theme="dark"] .g-btn:focus-visible { background: #1E3354; color: #fff; border-color: #3C5A8A; }

.legenda-g .tracejado { display: inline-block; width: 22px; height: 0; border-top: 2.5px dashed var(--texto); border-radius: 0; background: none; vertical-align: middle; margin-right: 7px; }
.grafico .l-alvo { cursor: pointer; }
.grafico .l-alvo:hover { stroke: var(--texto); stroke-width: 2.5; fill: rgba(255,255,255,.35); }

@keyframes g-sobe { from { transform: scaleY(0); } }
@keyframes g-surge { from { opacity: 0; } }
@keyframes g-traco { from { stroke-dashoffset: 1; } }
@keyframes g-rosca { from { stroke-dasharray: 0 440; } }
.grafico .b-anim { transform-box: fill-box; transform-origin: bottom; animation: g-sobe .75s cubic-bezier(.22,.8,.3,1) both; }
.grafico .valor { animation: g-surge .5s ease both; }
.grafico .l-anim { stroke-dasharray: 1; animation: g-traco 1.1s ease-out both; }
.grafico .l-ponto { animation: g-surge .4s ease both; }
.grafico .g-tend { animation: g-surge .8s .7s ease both; }
.grafico .r-fatia { animation: g-rosca 1s cubic-bezier(.22,.8,.3,1) both; }
.grafico .hb-barra { transform-origin: left; animation: g-lado .8s cubic-bezier(.22,.8,.3,1) both; }
@keyframes g-lado { from { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .grafico *, .grafico { animation: none !important; } }

.grafico-vazio { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; min-height: 190px; padding: 24px 16px; border: 2px dashed var(--borda); border-radius: 18px; color: var(--texto2); }
.grafico-vazio svg { color: var(--texto2); opacity: .8; }
.grafico-vazio strong { color: var(--texto); font-size: 16px; }
.grafico-vazio span { max-width: 360px; font-size: 14px; line-height: 1.45; }

.g-dica { position: fixed; z-index: 9500; transform: translate(-50%, calc(-100% - 14px)); display: flex; flex-direction: column; gap: 2px; padding: 9px 14px; border-radius: 10px; background: #10223A; color: #fff; font-size: 13.5px; line-height: 1.3; box-shadow: 0 8px 22px rgba(16,34,58,.35); pointer-events: none; white-space: nowrap; }
.g-dica i { position: absolute; left: 10px; top: -5px; width: 24px; height: 5px; border-radius: 3px 3px 0 0; }
.g-dica b { font-size: 14px; }
.g-dica::after { content: ""; position: absolute; left: calc(50% + var(--seta, 0px)); bottom: -6px; margin-left: -6px; border: 6px solid transparent; border-bottom: 0; border-top-color: #10223A; }

.g-tela { position: fixed; inset: 0; z-index: 9000; background: var(--cartao); display: flex; flex-direction: column; padding: 22px clamp(16px, 4vw, 48px); overflow: auto; }
.g-tela-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.g-tela-cab h2 { font-size: clamp(22px, 3vw, 30px); margin: 0; }
.g-tela-cab p { margin: 4px 0 0; }
.g-tela-acoes { display: flex; gap: 8px; }
.g-tela-acoes .g-btn { width: 44px; height: 44px; }
.g-tela-corpo { flex: 1; width: 100%; max-width: 1500px; margin: 0 auto; display: flex; align-items: center; justify-content: center; }
.g-tela-corpo .grafico { width: 100%; padding-top: 0; }
.g-tela-corpo .grafico svg:not(.g-ico) { max-height: calc(100vh - 230px); }
.g-tela-corpo .rosca-g { justify-content: center; gap: 48px; }
.g-tela-corpo .rosca-g svg { width: min(52vh, 440px); height: auto; }
.g-tela-corpo .rosca-leg { font-size: 17px; max-width: 520px; }
body.g-aberto { overflow: hidden; }

.rosca-g { position: relative; }
.rosca-g svg { flex-shrink: 0; max-width: 100%; }
.alterna-abas { margin-bottom: 14px; }
.abas button { min-height: 44px; display: inline-flex; align-items: center; padding: 0 20px; border-radius: 11px; color: var(--texto2); font: inherit; font-size: 15px; font-weight: 700; border: 2px solid transparent; background: none; cursor: pointer; }
.abas button.ativo { background: var(--cartao); color: var(--texto); border-color: currentColor; box-shadow: 0 1px 3px rgba(0,0,0,.1); }

/* Dashboard: abas maiores e alerta do topo com ícone e cor próprios */
body.admin .fin-topo + .abas, body.admin .abas[aria-label="Seções do dashboard"] { padding: 6px; }
.abas[aria-label="Seções do dashboard"] a { min-height: 52px; padding: 0 28px; font-size: 17px; }
.alertas-dash { display: flex; flex-direction: column; gap: 10px; }
.alerta-dash { display: flex; align-items: center; gap: 16px; padding: 16px 22px; border-radius: 18px; background: #FFF1DC; border: 2px solid #E9A913; border-left-width: 8px; color: #5A3B00; font-weight: 600; font-size: 16px; }
.alerta-dash .ico { width: 44px; height: 44px; border-radius: 14px; background: #E9A913; color: #3B2600; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.alerta-dash .ico svg { transform: scaleY(-1); }
.alerta-dash .txt { flex: 1; min-width: 200px; }
.alerta-dash .ir { font-size: 14px; font-weight: 700; white-space: nowrap; text-decoration: underline; }
.alerta-dash.erro { background: #FDE9E7; border-color: #D6453D; color: #6B1610; }
.alerta-dash.erro .ico { background: #D6453D; color: #fff; }
.alerta-dash:hover { filter: brightness(.97); }
:root[data-theme="dark"] .alerta-dash { background: #3A2A0B; border-color: #C98F10; color: #FFE2A8; }
:root[data-theme="dark"] .alerta-dash.erro { background: #3F1714; border-color: #D6453D; color: #FFD0CB; }

@media print { .g-barra { display: none !important; } }
@media (max-width: 700px) { .grafico.com-barra { padding-top: 46px; } .g-tela { padding: 14px; } }

/* Gráficos: acabamento elegante e legenda da rosca em linhas limpas */
.rosca-leg { gap: 4px; min-width: 240px; }
.rosca-leg li { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto 52px; gap: 12px; align-items: center; padding: 10px 14px; border-radius: 12px; background: var(--suave); font-size: 15px; }
.rosca-leg li > i { grid-column: 1; width: 14px; height: 14px; margin: 0; border-radius: 5px; }
.rosca-leg li > a, .rosca-leg li > span { grid-column: 2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; color: var(--texto); font-weight: 600; }
.rosca-leg li > b { grid-column: 3; text-align: right; }
.rosca-leg li > small { grid-column: 4; min-width: 0; text-align: right; font-weight: 700; color: var(--texto2); }
.rosca-g { gap: 28px; justify-content: center; }
.rosca-g > svg { filter: drop-shadow(0 6px 14px rgba(16,34,58,.12)); }
.grafico figcaption.legenda-g { justify-content: center; margin-top: 12px; }
.cartao .grafico.com-barra { padding-top: 40px; }

/* Rosca interativa */
.rosca-g .r-fatia { cursor: pointer; transition: stroke-width .2s, opacity .2s; outline: none; }
.rosca-g .r-fatia:focus-visible { stroke-width: 26; }
.rosca-g.r-tem-sel .r-fatia { opacity: .35; }
.rosca-g.r-tem-sel .r-fatia.sel { opacity: 1; stroke-width: 29; }
.rosca-leg li { cursor: pointer; border: 2px solid transparent; transition: background .15s, border-color .15s, opacity .15s; grid-template-columns: 14px minmax(0, 1fr) auto 52px 24px; }
.rosca-leg li:hover { background: #DDE8F8; }
:root[data-theme="dark"] .rosca-leg li:hover { background: #1E3354; }
.rosca-g.r-tem-sel .rosca-leg li:not(.sel) { opacity: .5; }
.rosca-leg li.sel { background: #fff; border-color: #10223A; box-shadow: 0 2px 8px rgba(16,34,58,.15); }
:root[data-theme="dark"] .rosca-leg li.sel { background: #14203A; border-color: #8FB0E8; }
.rosca-leg li:focus-visible { outline: 3px solid #D9B47A; outline-offset: 1px; }
.rosca-leg .leg-ir { grid-column: 5; text-align: center; font-weight: 800; color: var(--texto2); text-decoration: none; padding: 2px 4px; border-radius: 6px; }
.rosca-leg a.leg-ir:hover { background: var(--borda); color: var(--texto); }

/* Valores com contorno do cartão para não se perderem sobre a linha de tendência */
.grafico .valor { paint-order: stroke; stroke: var(--cartao); stroke-width: 3.5px; stroke-linejoin: round; }

/* Gráficos: redesenho pelo guia de visualização (paleta validada, marcas finas, grade discreta) */
:root { --g-vist: #2A78D6; --g-rec: #2A78D6; --g-com: #EB6834; --g-t1: #2A78D6; --g-t2: #EB6834; --g-t3: #1BAF7A; --g-t4: #EDA100; --g-t5: #E87BA4; --g-ant: #B9C2CE; --g-out: #B9C2CE; }
:root[data-theme="dark"] { --g-vist: #3987E5; --g-rec: #3987E5; --g-com: #D95926; --g-t1: #3987E5; --g-t2: #D95926; --g-t3: #199E70; --g-t4: #C98500; --g-t5: #D55181; --g-ant: #566277; --g-out: #566277; }
.g-grade { stroke: var(--borda); stroke-width: 1; opacity: .8; }
.g-eixo { fill: var(--texto2); }
.g-faixa { fill: transparent; }
.grafico .barra .b-anim { transition: opacity .15s; }
.grafico-colunas:has(.barra:hover) .barra:not(:hover) .b-anim { opacity: .5; }
.grafico-colunas .barra:hover .g-faixa { fill: var(--suave); opacity: .7; }
.g-dica .g-pt { position: static; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; }
.g-dica span { display: flex; align-items: center; }
.rosca-g.r-tem-sel .r-fatia.sel { stroke-width: 23; }
.rosca-g .r-fatia:focus-visible { stroke-width: 21; }
.grafico .l-alvo { fill: transparent; stroke: none; cursor: pointer; }
.grafico .l-alvo:hover { stroke: var(--texto); stroke-width: 1.5; fill: transparent; }

/* ---------- Agenda do admin: mês/semana/dia e cadeado (Etapa 7) ---------- */
.agenda-topo { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: flex-end; }
.agenda-ctrl { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.agenda-fil select { min-width: 220px; }
.agenda-nav { display: inline-flex; gap: 6px; align-items: center; }
.agenda-nav .btn { min-width: 44px; justify-content: center; }
.ag-ped { display: block; margin-bottom: 6px; padding: 8px 10px; border-radius: 12px; background: var(--suave); color: inherit; border-left: 4px solid var(--borda); font-size: 13.5px; line-height: 1.35; }
.ag-ped small { display: block; color: var(--texto2); font-size: 12.5px; }
.ag-ped:hover { background: #DDE8F8; }
.ag-cel { vertical-align: top; min-width: 130px; }
.ag-cel.folga { background: repeating-linear-gradient(45deg, var(--suave), var(--suave) 6px, transparent 6px, transparent 12px); }
.ag-livre { color: #1F9D61; font-weight: 600; font-size: 13px; }
.ag-trav { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 10px; background: #FDE9E7; color: #8F2A24; font-weight: 700; font-size: 13px; }
.ag-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.ag-mes-cab, .ag-mes-grade { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.ag-mes-cab span { padding: 12px 10px; font-weight: 700; color: var(--texto2); font-size: 13px; text-align: center; border-bottom: 1px solid var(--borda); }
.ag-dia { min-height: 118px; padding: 8px; border-right: 1px solid var(--borda); border-bottom: 1px solid var(--borda); display: flex; flex-direction: column; gap: 4px; color: inherit; overflow: hidden; }
.ag-dia:nth-child(7n) { border-right: 0; }
.ag-dia:hover { background: var(--suave); }
.ag-dia.fora { opacity: .45; }
.ag-dia.hoje .ag-num { background: #10223A; color: #fff; }
.ag-num { width: 28px; height: 28px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.ag-chip { font-size: 12px; padding: 3px 7px; border-radius: 8px; background: var(--suave); border-left: 3px solid var(--borda); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-mais { font-size: 12px; font-weight: 700; color: var(--texto2); }
.cad-barra { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.cad-sem { font-weight: 700; padding: 0 10px; }
.cad-modos { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.cad-modos button { min-height: 40px; padding: 0 16px; border-radius: 12px; border: 2px solid var(--borda); background: var(--cartao); color: var(--texto2); font: inherit; font-weight: 700; cursor: pointer; }
.cad-modos button.ativo { border-color: #10223A; color: #10223A; background: #DDE8F8; }
.cad-grade { width: 100%; border-collapse: separate; border-spacing: 6px; min-width: 640px; }
.cad-grade th { font-size: 13px; color: var(--texto2); font-weight: 700; text-align: center; padding: 4px; }
.cad-grade th small { display: block; font-weight: 500; }
.cad-grade th.hoje { color: #D6453D; }
.cad-cel { width: 100%; min-height: 48px; border-radius: 12px; border: 2px solid var(--borda); background: var(--cartao); color: var(--texto); font: inherit; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; }
.cad-cel:hover:not(:disabled) { background: #DDE8F8; border-color: #9DB6DC; }
.cad-cel.est-livre { color: #1F7A4D; }
.cad-cel.est-travado { background: #FDE9E7; border-color: #E8A29D; color: #8F2A24; }
.cad-cel.est-ocupado { background: #E8EEF8; border-color: #C4D2EA; color: #38527F; cursor: not-allowed; }
.cad-cel.est-fora, .cad-cel.est-passado { background: var(--suave); border-style: dashed; cursor: not-allowed; opacity: .55; }
.cad-cel.marcado { outline: 3px solid #10223A; outline-offset: -3px; background: #DDE8F8; }
.cad-cel.inicio { outline-color: #D9B47A; }
.cad-acoes { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.cad-acoes [data-cad-contador] { flex: 1 1 180px; font-weight: 600; }
.cad-acoes input[type="text"] { flex: 1 1 200px; max-width: 280px; }
@media (max-width: 700px) { .ag-dia { min-height: 84px; padding: 4px; } .ag-chip { display: none; } }

/* Financeiro › A pagar: correções visuais (Etapa 7) */
.fin-pagar .grade.lado { grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); align-items: start; }
.fin-pagar .grade.lado > * { min-width: 0; }
.fin-pagar aside { max-width: 100%; }
.fin-pagar .cartao-cab { flex-wrap: wrap; gap: 12px; }
.abas.filtro-cat { display: flex; flex-wrap: wrap; width: 100%; max-width: 100%; gap: 6px; }
.abas.filtro-cat a { min-height: 40px; padding: 0 16px; }
.kpi-acento { border-top: 0; box-shadow: inset 0 5px 0 0 var(--acento); }
.vazio-cartao { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 40px 20px; color: var(--texto2); }
.vazio-cartao strong { color: var(--texto); font-size: 18px; }
.vazio-cartao span { max-width: 360px; }
.vazio-cartao .btn { margin-top: 8px; }
.fin-pagar .campo input, .fin-pagar .campo select { min-height: 48px; }
@media (max-width: 1000px) { .fin-pagar .grade.lado { grid-template-columns: minmax(0, 1fr); } }
/* Financeiro: abas sobre o azul-marinho sempre legíveis (aba ativa e hover em latão com texto escuro) */
:root:root:root body .bloco-marinho .fin-abas a { color: #fff; opacity: 1; background: transparent; border-color: rgba(255,255,255,.28); }
:root:root:root body .bloco-marinho .fin-abas a:is(:hover, :focus-visible, :active) { background: rgba(217,180,122,.85); color: #10223A; border-color: #D9B47A; }
:root:root:root body .bloco-marinho .fin-abas a.ativo { background: #D9B47A; color: #10223A; border-color: #D9B47A; box-shadow: 0 4px 12px rgba(0,0,0,.25); }
/* Financeiro: blocos de status com cor e ícone próprios (conferir roxo, cobrar vermelho, aguardando âmbar, pago verde) */
:root:root body .cartao.bloco-st { border-left: 6px solid var(--st-cor); }
.bloco-st .cartao-cab h2 { display: flex; align-items: center; gap: 10px; }
.bloco-st .st-ic { width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--st-fundo); color: var(--st-cor); flex-shrink: 0; }
.bloco-st .cartao-cab .etiqueta { background: var(--st-fundo); color: var(--st-cor); }
.st-conferir { --st-cor: #6A3FC4; --st-fundo: #EFE8FB; }
.st-cobrar { --st-cor: #B53A33; --st-fundo: #FDECEB; }
.st-aguardando { --st-cor: #A16207; --st-fundo: #FDF3DC; }
.st-pago { --st-cor: #1F7A4D; --st-fundo: #E6F5EE; }
:root[data-theme="dark"] .st-conferir { --st-cor: #B9A1F0; --st-fundo: #2A2140; }
:root[data-theme="dark"] .st-cobrar { --st-cor: #F09A92; --st-fundo: #3A1D1B; }
:root[data-theme="dark"] .st-aguardando { --st-cor: #F2C46B; --st-fundo: #3A2E14; }
:root[data-theme="dark"] .st-pago { --st-cor: #6FD3A4; --st-fundo: #15322A; }
:root:root body .cartao.faixa-cobranca { border-left: 6px solid #B53A33; }

/* Etapa 9a: ranking numerado na rosca, entrada escalonada dos cartões, lista de receita com rolagem */
.rosca-leg .leg-pos { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin-right: 8px; border-radius: 11px; background: var(--cartao); color: var(--texto2); font-style: normal; font-size: 12px; font-weight: 800; }
.g-receita-lista { max-height: 300px; overflow-y: auto; padding-right: 6px; }
@keyframes g-cartao-entra { from { opacity: 0; transform: translateY(10px); } }
body.admin .grade > .cartao, body.admin .grade > .kpi { animation: g-cartao-entra .5s cubic-bezier(.22,.8,.3,1) both; }
body.admin .grade > :nth-child(2) { animation-delay: .06s; }
body.admin .grade > :nth-child(3) { animation-delay: .12s; }
body.admin .grade > :nth-child(4) { animation-delay: .18s; }
body.admin .grade > :nth-child(n+5) { animation-delay: .24s; }
@media (prefers-reduced-motion: reduce) { body.admin .grade > .cartao, body.admin .grade > .kpi { animation: none; } }
.dash-chips a .chip-n { opacity: .75; font-weight: 500; }

/* Etapa F1: Financeiro só visual */
.fin-acoes { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px 12px; align-items: center; }
.fin-lancar { min-height: 52px; padding: 0 26px; font-size: 16px; gap: 10px; }
.fin-mes-nav { display: flex; gap: 8px; align-items: center; }
.fin-mes-nav strong { font-size: 16px; min-width: 140px; text-align: center; }
.fin-abas { display: flex; flex-wrap: wrap; max-width: 100%; }
.fin-abas a { min-height: 48px; padding: 0 16px; font-size: 16px; gap: 8px; }
.fin-abas .ab-ic { display: inline-flex; flex-shrink: 0; }
.fin-abas .ab-ic svg { display: block; }
.fin-sub td { background: var(--suave); font-size: 14px; }

/* Etapa F1 (refeita pelo modelo do protótipo): cartões, faixa escura, listas */
.fin-cartoes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1280px) { .fin-cartoes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .fin-cartoes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fin-cartao { display: flex; flex-direction: column; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.fin-cartao strong { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.15; margin-top: 10px; }
.fin-ic { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; }
.fin-ic-azul { background: #E3ECF8; color: #1F4E8C; }
.fin-ic-ambar { background: #FDF0D2; color: #A16207; }
.fin-ic-verde { background: #E1F4EA; color: #1F7A4D; }
.fin-ic-celeste { background: #E4F3FA; color: #1B7FA6; }
.fin-ic-vermelho { background: #FCE6E4; color: #B53A33; }
:root[data-theme="dark"] .fin-ic-azul { background: #1B2B45; color: #8DB4EA; }
:root[data-theme="dark"] .fin-ic-ambar { background: #3A2E14; color: #F2C46B; }
:root[data-theme="dark"] .fin-ic-verde { background: #15322A; color: #6FD3A4; }
:root[data-theme="dark"] .fin-ic-celeste { background: #12303B; color: #7CCBEA; }
:root[data-theme="dark"] .fin-ic-vermelho { background: #3A1D1B; color: #F09A92; }
.fin-faixa { display: flex; flex-direction: column; gap: 6px; padding: 32px 36px; border-radius: 22px; background: #10223A; color: #F4EFE6; border: 1px solid rgba(217, 180, 122, .35); }
.fin-faixa strong { font-family: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: clamp(44px, 7vw, 76px); line-height: 1.05; font-weight: 400; color: #fff; }
.fin-faixa span { font-size: 16px; opacity: .85; }
.fin-faixa .fin-faixa-sub { font-size: 17px; opacity: 1; color: #D9B47A; font-weight: 600; }
.fin-clientes { max-height: 640px; }
.fin-prog { height: 6px; width: 100%; max-width: 260px; margin: 8px 0 0; border-radius: 3px; background: var(--borda); overflow: hidden; }
.fin-prog i { display: block; height: 100%; background: #1F9D61; border-radius: 3px; }
.fin-ambar { color: #A16207; } .fin-verde { color: #1F7A4D; } .fin-verm { color: #B53A33; }
:root[data-theme="dark"] .fin-ambar { color: #F2C46B; } :root[data-theme="dark"] .fin-verde { color: #6FD3A4; } :root[data-theme="dark"] .fin-verm { color: #F09A92; }
.fin-meses { display: flex; flex-direction: column; border-top: 1px solid var(--borda); }
.fin-mes-item { border-bottom: 1px solid var(--borda); }
.fin-mes-item:last-child { border-bottom: 0; }
.fin-mes-linha { display: grid; grid-template-columns: minmax(110px, 1.2fr) minmax(90px, 1fr) minmax(110px, 1fr) minmax(120px, 1fr) 20px; gap: 12px; align-items: center; width: 100%; padding: 14px 26px; border: 0; border-radius: 0; background: transparent; color: var(--texto); font: inherit; text-align: left; cursor: pointer; }
.fin-mes-linha::after { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); justify-self: end; margin-top: -4px; opacity: .55; transition: transform .15s; }
.fin-mes-linha[aria-expanded="true"]::after { transform: rotate(-135deg); margin-top: 4px; }
.fin-mes-linha { outline: 0; }
.fin-mes-linha:hover { background: var(--suave); }
.fin-mes-linha:focus-visible { background: var(--suave); box-shadow: inset 0 0 0 2px var(--borda); }
.fin-mes-linha[aria-expanded="true"] { background: var(--suave); box-shadow: inset 4px 0 0 #D9B47A; }
.fin-mes-linha > span:nth-child(4) { text-align: right; }
.fin-mes-det { padding: 4px 26px 20px; background: var(--cartao); border-top: 1px solid var(--borda); }
.fin-mes-det .tabela, .fin-mes-det .tabela tr, .fin-mes-det .tabela td, .fin-mes-det .tabela th { background: transparent; }
.fin-mes-det .tabela tfoot td { border-top: 2px solid var(--borda); padding-top: 12px; }
.fin-mes-rodape { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; margin-top: 14px; }
@media (max-width: 640px) { .fin-mes-linha { grid-template-columns: 1fr 1fr 20px; padding: 14px 18px; } .fin-mes-linha > span:nth-child(4) { text-align: left; } .fin-mes-det { padding: 4px 14px 18px; } }
.fin-manuais, .fin-recibos { max-height: 460px; }
.fin-linha { display: flex; align-items: center; gap: 14px; padding: 14px 26px; border-top: 1px solid var(--borda); }
.fin-manuais .fin-linha:first-child { border-top: 0; }
.fin-seta { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; }
.fin-seta.ent { background: #E1F4EA; color: #1F7A4D; }
.fin-seta.sai { background: #FCE6E4; color: #B53A33; }
:root[data-theme="dark"] .fin-seta.ent { background: #15322A; color: #6FD3A4; }
:root[data-theme="dark"] .fin-seta.sai { background: #3A1D1B; color: #F09A92; }
.fin-linha-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fin-linha-info a { display: inline-flex; align-items: center; gap: 4px; }
.fin-linha > strong { white-space: nowrap; }
.fin-linha-fim { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; white-space: nowrap; }
.fin-linha-fim a { font-size: 13px; font-weight: 700; }

/* Etapa F2: janela Lançar dado manual */
.manual-abas { display: inline-flex; margin: 4px 0 14px; }
.manual-abas label { cursor: pointer; }
.manual-abas input { position: absolute; opacity: 0; }
.manual-abas span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: 11px; font-weight: 700; color: var(--texto2); border: 2px solid transparent; }
.manual-abas input:checked + span { background: var(--cartao); color: var(--texto); border-color: currentColor; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.manual-abas input:focus-visible + span { outline: 3px solid var(--latao); }
.manual-cats { border: 0; padding: 0; margin: 0; }
.manual-cats[hidden] { display: none; }

/* Etapa F2: miniaturas das fotos na ficha do cliente */
.miniaturas { display: inline-flex; gap: 4px; align-items: center; }
.miniaturas img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; border: 1px solid var(--borda); background: var(--suave); }

/* Etapa F3: histórico do time e lista de lançamentos manuais */
.tabela-time td.num, .tabela-time th.num { font-size: 13px; padding-left: 8px; padding-right: 8px; }
.tabela-time td.time-pago { color: #1F7A4D; font-weight: 700; }
.tabela-time td.time-aberto { color: #8A5A00; font-weight: 700; background: color-mix(in srgb, #F2A516 14%, transparent); }

/* Tabela de vistorias do admin: colunas de largura fixa e alinhadas (cabeçalho = linhas) */
.tabela-admin-vist { table-layout: fixed; width: 100%; }
.tabela-admin-vist th, .tabela-admin-vist td { overflow-wrap: anywhere; vertical-align: middle; }
.tabela-admin-vist .c-sel { width: 52px; }
.tabela-admin-vist .c-cod { width: 80px; }
.tabela-admin-vist .c-cli { width: 10%; }
.tabela-admin-vist .c-fotos { width: 160px; }
.tabela-admin-vist .c-tipo { width: 124px; }
.tabela-admin-vist .c-data { width: 100px; }
.tabela-admin-vist .c-vist { width: 160px; }
.tabela-admin-vist .c-status { width: 150px; }
.tabela-admin-vist .c-acoes { width: 262px; }
body.admin table.tabela.tabela-admin-vist th:first-child, body.admin table.tabela.tabela-admin-vist td:first-child { padding-left: 26px; }
body.admin table.tabela.tabela-admin-vist th:last-child, body.admin table.tabela.tabela-admin-vist td:last-child { padding-left: 12px; padding-right: 26px; }
.tabela-admin-vist td.num .acoes-linha { justify-content: flex-end; flex-wrap: nowrap; }
@media (max-width: 1100px) { .tabela-admin-vist { table-layout: auto; min-width: 900px; } }
body.admin table.tabela.tabela-admin-vist th, body.admin table.tabela.tabela-admin-vist td { padding-left: 12px; padding-right: 12px; }
body.admin table.tabela.tabela-admin-vist th:first-child, body.admin table.tabela.tabela-admin-vist td:first-child { padding-left: 26px; }
body.admin table.tabela.tabela-admin-vist th:last-child, body.admin table.tabela.tabela-admin-vist td:last-child { padding-left: 12px; padding-right: 26px; }

/* Etapa F4: DRE */
.tabela-dre td.dre-sub { padding-left: 44px; color: var(--texto2); }
.tabela-dre tr.dre-total td { background: var(--suave); font-weight: 800; }
.nf-ajuste summary { list-style: none; cursor: pointer; display: inline-flex; }
.nf-ajuste summary::-webkit-details-marker { display: none; }
.nf-ajuste[open] form { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; min-width: 200px; }
.nf-ajuste input { height: 38px; }
.chip-btn { border: 1.5px solid var(--borda); background: var(--cartao); color: var(--texto); border-radius: 999px; padding: 6px 14px; font-weight: 600; cursor: pointer; }
.chip-btn.inativo { opacity: .55; }
details.dre-antiga { margin-top: 16px; padding: 18px 26px; }
details.dre-antiga > summary { cursor: pointer; }
details.dre-antiga[open] > summary { margin-bottom: 16px; }

/* App do vistoriador: resumo do imóvel, cômodo geral com IA e duplicar cômodo */
.imovel-resumo { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.imovel-resumo div { background: var(--suave); border-radius: 14px; padding: 10px 6px; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.imovel-resumo strong { font-family: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif; font-weight: 400; font-size: 24px; line-height: 1.1; }
.imovel-resumo span { color: var(--texto2); font-size: 12.5px; }
.item.item-ia { border-left: 4px solid #6A3FC4; padding-left: 12px; border-radius: 2px; }.ia-status { color: var(--texto2); margin-top: 6px; }
.duplicar-comodo { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; border-top: 1px solid var(--borda); margin-top: 14px; padding-top: 14px; }
.duplicar-comodo label { flex-basis: 100%; }

/* App do vistoriador sem internet: faixa fixa com o estado da fila */
.faixa-offline { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 60; display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 12px 14px; border-radius: 14px; background: #1F9D61; color: #fff; font-size: 14px; font-weight: 600; box-shadow: 0 8px 24px rgba(16, 34, 58, .28); }
.faixa-offline.aviso { background: #F2A516; color: #10223A; }
.faixa-offline button { flex: none; min-height: 40px; padding: 0 14px; border-radius: 10px; border: 0; background: rgba(16, 34, 58, .92); color: #fff; font-weight: 700; font-size: 14px; cursor: pointer; }
.faixa-offline[hidden] { display: none; }

/* App do vistoriador: abas, agenda, listas e selo de vistoria criada no app */
.abas-app { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--cartao, #fff); border-top: 1px solid var(--borda); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 20px rgba(16, 34, 58, .08); }
.abas-app a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; min-height: 52px; color: var(--texto2); font-size: 11.5px; font-weight: 600; text-decoration: none; border-radius: 12px; }
.abas-app a.ativa { color: #10223A; background: #F3E7CF; }
:root[data-tema="escuro"] .abas-app a.ativa, [data-theme="dark"] .abas-app a.ativa { color: #F3E7CF; background: rgba(217, 180, 122, .16); }
.aba-badge { position: absolute; top: 2px; right: calc(50% - 22px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #D6453D; color: #fff; font-style: normal; font-size: 11px; line-height: 18px; text-align: center; }
.aba-badge[hidden] { display: none; }
body:has(.abas-app) .faixa-offline { bottom: calc(84px + env(safe-area-inset-bottom)); }
.selo-app { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 10px; background: #6A3FC4; color: #fff; font-size: 11px; font-weight: 700; vertical-align: middle; white-space: nowrap; }
.chips-app { display: flex; gap: 8px; align-items: center; overflow-x: auto; padding-bottom: 4px; }
.chip-app { flex: none; padding: 8px 14px; border-radius: 18px; background: var(--suave); color: var(--texto); font-weight: 600; font-size: 14px; text-decoration: none; }
.chip-app.ativo { background: #10223A; color: #fff; }
.cal-app { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-cab { color: var(--texto2); font-size: 12px; font-weight: 700; }
.cal-dia { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 42px; border-radius: 10px; color: var(--texto); text-decoration: none; font-size: 14px; }
.cal-dia.tem { background: #F3E7CF; color: #10223A; }
.cal-dia.tem i { font-style: normal; font-size: 10.5px; font-weight: 700; color: #fff; background: #10223A; border-radius: 8px; padding: 0 6px; margin-top: 1px; }
.cal-dia.hoje b { outline: 2px solid #D9B47A; outline-offset: 3px; border-radius: 6px; }
.linha-hist { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--borda); }
.linha-hist:last-child { border-bottom: 0; }
.recebida { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--ok-fundo); color: #1F9D61; font-size: 14px; font-weight: 600; }
.fila-item { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--borda); font-size: 14px; }
.fila-item:last-child { border-bottom: 0; }

/* Fila do vistoriador: nome da imobiliária em destaque, estrela de prioridade e ordem manual */
.chips-vist { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bolha-tipo { height: 34px; padding: 0 16px; border-radius: 999px; font-size: 15px; }
.bolha-imob { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; background: #0D5F3D; color: #fff; font-size: 15px; font-weight: 700; line-height: 1.3; }
:root[data-tema="escuro"] .bolha-imob, [data-theme="dark"] .bolha-imob { background: #2E9E6B; color: #07251A; }
.estrela-fila { width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: var(--suave); color: #B6BEC9; font-size: 21px; line-height: 1; cursor: pointer; }
.estrela-fila.on { background: #FFF4DE; color: #F2A516; }
.mover-fila { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mover-fila form { display: contents; }
.mover-fila .btn { flex: 1 1 110px; }
.mover-fila .btn[disabled] { opacity: .45; cursor: not-allowed; }

/* Etapas da vistoria: contraste para não virar uma parede branca */
.tit-etapa { display: flex; align-items: center; gap: 10px; font-size: 24px; }
.tit-etapa::before { content: ""; flex: 0 0 auto; width: 6px; align-self: stretch; min-height: 26px; border-radius: 3px; background: #D9B47A; }
.app-card.etapa { border: 1px solid var(--borda); border-left: 4px solid #D9B47A; background: var(--cartao); box-shadow: 0 2px 10px rgba(16, 34, 58, .05); }
.app-card.etapa + .app-card.etapa { margin-top: 12px; }
.recolhe > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 48px; padding: 10px 12px; border-radius: 12px; background: var(--suave); font-size: 17px; font-weight: 700; cursor: pointer; list-style: none; }
.recolhe > summary::-webkit-details-marker { display: none; }
.recolhe > summary::after { content: "▾"; margin-left: auto; font-size: 14px; color: var(--texto2); }
.recolhe[open] > summary::after { content: "▴"; }
.recolhe > summary + * { margin-top: 12px; }
/* Preparo da vistoria (pedido, imóvel, mobiliado e chaves): um menu só, que recolhe depois de iniciar */
.preparo { margin-top: 16px; border: 1px solid var(--borda); border-radius: 22px; background: var(--cartao); overflow: hidden; }
.preparo > summary { display: flex; flex-direction: column; gap: 3px; min-height: 60px; padding: 14px 44px 14px 16px; position: relative; cursor: pointer; list-style: none; }
.preparo > summary::-webkit-details-marker { display: none; }
.preparo > summary::after { content: "▾"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 15px; color: var(--texto2); }
.preparo[open] > summary::after { content: "▴"; }
.preparo[open] > summary { border-bottom: 1px solid var(--borda); }
.preparo-tit { font-size: 18px; font-weight: 800; }
.preparo-corpo { padding: 0 14px 16px; }
.resp-ok { padding: 2px 10px; border-radius: 999px; background: var(--ok-fundo, #E6F5EE); color: #1F9D61; font-size: 13px; font-weight: 700; }
.grade-imovel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grade-imovel > button { grid-column: 1 / -1; }
.grade-clima { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 560px) { .grade-imovel { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grade-clima { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Foto de capa da vistoria */
.capa-foto { display: block; width: 100%; max-height: 260px; object-fit: cover; border-radius: 14px; }
.capa-laudo { margin: 0 0 20px; }
.capa-laudo img { display: block; width: 100%; max-height: 380px; object-fit: cover; border-radius: 12px; }

/* Avisos da GV no app do vistoriador */
.aviso-gv { margin-bottom: 10px; padding: 14px; border-radius: 16px; background: #F0EBFB; border: 1px solid #D8CCF3; display: flex; flex-direction: column; gap: 8px; }
.aviso-gv.devolucao { background: #FFF4DE; border-color: #F1D49A; }
.aviso-gv p { margin: 0; overflow-wrap: anywhere; }
.aviso-gv-pe { display: flex; justify-content: space-between; align-items: center; gap: 10px; }

/* IA descreve a foto */
.foto-ia { position: absolute; left: 4px; bottom: 4px; padding: 3px 8px; border: 0; border-radius: 10px; background: rgba(106, 63, 196, .92); color: #fff; font-size: 12px; font-weight: 700; cursor: pointer; }
.foto-ia:disabled { opacity: .6; }

/* Miniaturas das fotos escolhidas e botão de tirar no zoom */
.previa-fotos { margin-top: 8px; }
.previa-aviso { margin: 0 0 6px; font-size: 13px; color: #B07A0B; font-weight: 600; }
.previa-tira { display: flex; flex-wrap: wrap; gap: 8px; }
.mini-foto { position: relative; display: block; width: 68px; height: 68px; border-radius: 12px; overflow: hidden; border: 2px solid #D9B47A; }
.mini-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mini-foto button { position: absolute; top: 2px; right: 2px; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: rgba(16, 34, 58, .88); color: #fff; font-size: 16px; line-height: 1; cursor: pointer; }
.fz-remover { position: absolute; left: 14px; top: 14px; z-index: 2; min-height: 48px; padding: 0 18px; border: 0; border-radius: 999px; background: #D6453D; color: #fff; font-size: 15px; font-weight: 700; cursor: pointer; }
.fz-remover[hidden] { display: none; }
/* Marcar a foto (rabisco, seta, círculo) */
.mini-rab { top: auto !important; bottom: 2px; display: flex; align-items: center; justify-content: center; background: rgba(13, 95, 61, .92) !important; }
/* Mesmo lápis na foto já salva (grade de fotos do cômodo): alvo maior, porque é tocado com o dedo */
.fotos .mini-rab, .rev-fotos .mini-rab { position: absolute; right: 4px; bottom: 4px; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; color: #fff; cursor: pointer; }
.fotos .mini-rab:disabled, .rev-fotos .mini-rab:disabled { opacity: .6; }
.fz-marcar { position: absolute; left: 14px; top: 14px; z-index: 2; min-height: 48px; padding: 0 18px; border: 0; border-radius: 999px; background: #0D5F3D; color: #fff; font-size: 15px; font-weight: 700; cursor: pointer; }
.fz-marcar[hidden] { display: none; }
.fz-marcar:not([hidden]) ~ .fz-remover { top: 70px; }
.rabisco { position: fixed; inset: 0; z-index: 210; display: flex; flex-direction: column; background: #0A1220; color: #fff; }
.rab-topo { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; font-size: 16px; }
.rab-x { width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; }
.rab-palco { flex: 1 1 auto; min-height: 42vh; display: flex; align-items: center; justify-content: center; padding: 0 8px; }
.rab-palco canvas { max-width: 100%; max-height: 100%; touch-action: none; border-radius: 8px; background: #000; cursor: crosshair; }
.rab-barra { flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; max-height: 45vh; overflow: auto; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .06); }
.rab-grupo { display: flex; gap: 6px; align-items: center; }
.rab-fer { min-height: 44px; padding: 0 14px; border: 2px solid rgba(255, 255, 255, .28); border-radius: 999px; background: transparent; color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; }
.rab-fer.ativo { background: #fff; color: #0A1220; border-color: #fff; }
.rab-cor { width: 34px; height: 34px; padding: 0; border: 2px solid rgba(255, 255, 255, .35); border-radius: 50%; background: var(--c); cursor: pointer; }
.rab-cor.ativo { border-color: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .35); }
.rab-barra .btn.contorno { min-height: 44px; border-color: rgba(255, 255, 255, .35); color: #fff; background: transparent; }
.rab-salvar { min-height: 48px; }
@media (max-width: 600px) {
  .fz-palco { padding: 72px 8px 72px; }
  .fz-nav { width: 40px; height: 40px; font-size: 24px; }
  .fz-ant { left: 6px; } .fz-prox { right: 6px; }
}

/* App do vistoriador: a tela nunca passa da largura do celular (evita o balanço lateral ao rolar) */
.app { overflow-x: clip; }
.app-topo { gap: 8px; }
.app-topo > span:last-child { flex: 0 1 auto; min-width: 0; gap: 6px !important; }
.app-topo .logo { flex: 0 1 auto; min-width: 0; }
.app-topo .logo > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-topo .sync { padding: 0 10px; white-space: nowrap; }
/* Painel: caixas de seleção no padrão do sistema (quadrado arredondado, latão quando marcado) */
body.admin input[type=checkbox] { -webkit-appearance: none; appearance: none; flex: none; width: 20px; height: 20px; margin: 0; padding: 0; border: 1.5px solid var(--texto2); border-radius: 6px; background: var(--cartao) center / 14px no-repeat; cursor: pointer; vertical-align: middle; transition: background-color .15s, border-color .15s, box-shadow .15s; }
body.admin input[type=checkbox]:hover { border-color: var(--latao); }
body.admin input[type=checkbox]:checked { background-color: var(--latao); border-color: var(--latao); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2.5 7.5l3 3 6-6.5' fill='none' stroke='%2310223A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
body.admin input[type=checkbox]:indeterminate { background-color: var(--latao); border-color: var(--latao); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3 7h8' stroke='%2310223A' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }
body.admin input[type=checkbox]:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(217,180,122,.45); }
body.admin input[type=checkbox]:disabled { opacity: .4; cursor: not-allowed; }
body.admin .lm-marca input { width: 20px; height: 20px; }
/* Barra da lista por mês: botões com a mesma altura, alinhados à direita e sem desencontro ao quebrar linha */
.lm-acoes { align-items: center; justify-content: flex-end; margin-left: auto; }
.lm-acoes > .btn, .lm-acoes .lm-export > summary { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; height: 38px; min-height: 38px; padding: 0 14px; margin: 0; font: inherit; font-size: 14px; font-weight: 600; line-height: 1; white-space: nowrap; }
@media (max-width: 700px) { .lm-acoes { width: 100%; margin-left: 0; justify-content: stretch; } .lm-acoes > .btn, .lm-acoes > .lm-export { flex: 1 1 0; } .lm-acoes .lm-export > summary { width: 100%; } .lm-export-painel { right: 0; left: auto; } }

/* Lista de vistorias: as colunas fixas somavam a largura toda e o Imóvel ficava com 0 px; com largura mínima a tabela rola em vez de espremer */
@media (min-width: 1101px) and (max-width: 1700px) { .tabela-admin-vist { min-width: 1200px; } }

/* Histórico de pagamentos do cliente: cabem cerca de 10 linhas; o resto rola dentro do quadro (padrão do site) */
.caixa-rolagem.hist-10 { max-height: 600px; }

/* Comprovantes: botão emitir, engrenagem da assinatura e assinatura no recibo */
.faixa .faixa-link { margin-left: auto; flex: none; white-space: nowrap; }
.comp-linha { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.cartao-cab .cab-acoes { display: flex; align-items: center; gap: 10px; }
.engrenagem-btn { display: inline-flex; align-items: center; gap: 6px; }
.engrenagem-btn[aria-expanded=true] { background: var(--suave); border-color: var(--latao); }
.assinatura-painel { padding: 18px 26px 22px; border-top: 1px solid var(--borda); border-bottom: 1px solid var(--borda); background: var(--cartao); }
.assinatura-form { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 22px; align-items: start; }
.assinatura-previa { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; background: #fff; border: 1px solid var(--borda); border-radius: 14px; padding: 14px 16px; color: #10223A; }
.assinatura-campos { display: flex; flex-direction: column; gap: 12px; max-width: 460px; }
.assinatura-botoes { display: flex; gap: 8px; flex-wrap: wrap; }
.recibo-ass-img { max-width: 220px; max-height: 90px; width: auto; height: auto; object-fit: contain; }
.recibo-ass-nome { margin-top: 2px; }
@media (max-width: 760px) { .assinatura-form { grid-template-columns: 1fr; } .assinatura-painel { padding: 16px; } }

/* Financeiro: clicar no mês abre o seletor de mês e ano */
.fin-mes-pick { position: relative; }
.fin-mes-pick > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 10px; border-radius: 11px; }
.fin-mes-pick > summary::-webkit-details-marker { display: none; }
.fin-mes-pick > summary { background: var(--latao); color: #10223A; padding: 0 14px; }
.fin-mes-pick > summary strong { color: #10223A; min-width: 0; }
.fin-mes-pick > summary:hover, .fin-mes-pick[open] > summary { background: #E4C28D; }
.fin-mes-pick > summary .fin-mes-seta { color: #10223A; font-size: 12px; }
.fin-mes-painel { position: absolute; left: 50%; transform: translateX(-50%); top: calc(100% + 8px); z-index: 40; width: 264px; background: var(--cartao); border: 1px solid var(--borda); border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.15); padding: 12px; }
.fin-mes-ano { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.fin-mes-ano strong { font-size: 17px; min-width: 0; }
.fin-mes-ano .icone-btn { font-size: 16px; line-height: 1; color: var(--texto); }
.fin-mes-grade { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.fin-mes-grade a { display: flex; align-items: center; justify-content: center; min-height: 42px; border-radius: 10px; color: var(--texto); font-weight: 600; border: 1px solid transparent; }
.fin-mes-grade a:hover, .fin-mes-grade a:focus-visible { background: var(--suave); opacity: 1; }
.fin-mes-grade a.ativo { background: var(--latao); color: #10223A; }
@media (max-width: 640px) { .fin-mes-painel { left: auto; right: 0; transform: none; } }

/* Cartão sem margem interna: a barra de botões ganha folga em cima (antes encostava na borda do cartão) */
.cartao.sem-pad > .lista-mes > .lm-barra { padding-top: 16px; }

/* Painel "Colunas" (lista de Vistorias) */
.lm-colunas-painel { min-width: 280px; gap: 6px; }
.lm-col-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.lm-col-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 42px; padding: 0 6px 0 10px; border-radius: 10px; }
.lm-col-item:hover { background: var(--suave); }
.lm-col-item label { display: flex; align-items: center; gap: 10px; flex: 1; min-height: 42px; cursor: pointer; font-weight: 600; color: var(--texto); }
.lm-col-fixa { min-height: 36px; font-size: 13px; }
.lm-col-setas { display: inline-flex; gap: 4px; }
.lm-col-setas .icone-btn { width: 30px; height: 30px; font-size: 15px; line-height: 1; color: var(--texto); }
.lm-col-botoes { display: flex; gap: 8px; padding-top: 6px; border-top: 1px solid var(--borda); margin-top: 4px; }
.lm-col-botoes .btn { flex: 1; }
.lm-col-botoes .btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ---------- Financeiro › detalhamento do mês (fin-mes.ejs) ---------- */
.fm-pagina .fin-cartoes.fm-cartoes { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 6px; }
.fm-pagina .fin-cartao { border-radius: 26px; padding: 22px; }
.fm-pagina .fin-ic { border-radius: 50%; width: 46px; height: 46px; }
.fm-pagina .fin-cartao strong { font-weight: 600; margin-top: 14px; }
.fm-quadros { margin-top: 16px; align-items: stretch; }
.fm-quadro { border-radius: 26px; padding: 22px 24px; }
.fm-quadro h2 { font-size: 18px; font-weight: 600; margin-bottom: 10px; }
.fm-tab-rolagem { max-height: 330px; overflow-y: auto; }
.fm-tab { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.fm-tab th { text-align: left; font-size: 13px; font-weight: 400; color: var(--texto2); padding: 4px 0 8px; position: sticky; top: 0; background: var(--cartao); }
.fm-tab td { padding: 7px 0; font-weight: 500; }
.fm-tab .num { text-align: right; padding-left: 14px; white-space: nowrap; }
.fm-ok { color: #1F7A4D; } .fm-parte { color: #A16207; }
:root[data-theme="dark"] .fm-ok { color: #6FD3A4; } :root[data-theme="dark"] .fm-parte { color: #F2C46B; }
.fm-lista-cab { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 30px 0 14px; }
.fm-lista-cab h2 { font-size: 22px; font-weight: 600; margin: 0; }
.fm-chips { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--borda); border-radius: 999px; background: var(--cartao); }
.fm-chips a { padding: 8px 16px; border-radius: 999px; color: var(--texto2); font-weight: 600; font-size: 14px; }
.fm-chips a.ativo { background: #10223A; color: #fff; }
:root[data-theme="dark"] .fm-chips a.ativo { background: #D9B47A; color: #0D1626; }
.fm-lista { max-height: 620px; border-radius: 26px; background: var(--cartao); border: 1px solid var(--borda); padding: 6px 0; }
.fm-linha { display: grid; grid-template-columns: 90px minmax(160px, 1.3fr) minmax(120px, 1fr) minmax(110px, .8fr) 110px 110px; gap: 14px; align-items: center; padding: 14px 24px; border-bottom: 1px solid var(--borda); }
.fm-linha:last-child { border-bottom: 0; }
.fm-linha:hover { background: var(--suave); }
.fm-cod { font-weight: 600; } .fm-cli { color: var(--texto); font-weight: 500; }
.fm-vist, .fm-tipo { color: var(--texto2); }
.fm-valor { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 1100px) { .fm-pagina .fin-cartoes.fm-cartoes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) {
  .fm-linha { grid-template-columns: 1fr auto; row-gap: 4px; padding: 14px 18px; }
  .fm-cod { grid-column: 1; } .fm-valor { grid-column: 2; grid-row: 1; }
  .fm-cli { grid-column: 1 / -1; } .fm-vist, .fm-tipo { grid-column: 1; } .fm-selo { grid-column: 2; grid-row: 3 / span 2; justify-self: end; }
}

/* ---------- Financeiro › "Ver tudo" do cliente: cantos redondos, botões em pílula, fonte mais leve (fin-cliente.ejs) ---------- */
.fc-pagina { font-weight: 500; }
.fc-pagina strong { font-weight: 600; }
.fc-topo { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); gap: 16px; margin-top: 8px; }
.fc-hero { display: flex; flex-direction: column; gap: 4px; padding: 26px 30px 28px; border-radius: 28px; color: #fff; background: radial-gradient(120% 140% at 0% 0%, #1B3552 0%, #10223A 55%, #0A1626 100%); box-shadow: 0 14px 34px rgba(16,34,58,.22); }
.fc-rot { font-size: 15px; font-weight: 500; opacity: .85; }
.fc-valor { font-size: clamp(34px, 5vw, 50px); line-height: 1.1; font-weight: 600; letter-spacing: -.01em; margin: 4px 0 2px; }
.fc-sub { font-size: 15px; opacity: .85; }
.fc-hero-acoes { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.fc-pill { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 50px; padding: 0 24px; border-radius: 999px; border: 1.5px solid transparent; font: 600 15px/1 inherit; font-family: inherit; cursor: pointer; text-decoration: none; transition: background-color .15s, color .15s, border-color .15s, transform .15s, box-shadow .15s; }
.fc-pill:hover { transform: translateY(-1px); opacity: 1; }
.fc-pill.ouro { background: var(--latao); border-color: var(--latao); color: #10223A; box-shadow: 0 6px 16px rgba(217,180,122,.35); }
.fc-pill.ouro:hover { background: #E4C28D; border-color: #E4C28D; }
.fc-pill.vidro { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.28); color: #fff; }
.fc-pill.vidro:hover { background: rgba(255,255,255,.2); }
.fc-pill.claro { background: var(--cartao); border-color: var(--borda); color: var(--texto); }
.fc-pill.claro:hover { background: var(--suave); }
.fc-pill.mini { min-height: 38px; padding: 0 18px; font-size: 14px; box-shadow: none; }
.fc-pill[disabled] { opacity: .45; cursor: not-allowed; pointer-events: none; }
.fc-resumo { display: flex; flex-direction: column; gap: 6px; padding: 24px 28px; border-radius: 28px; background: var(--cartao); border: 1px solid var(--borda); box-shadow: 0 8px 24px rgba(16,34,58,.06); }
.fc-resumo .fc-rot { color: var(--texto2); opacity: 1; }
.fc-valor2 { font-size: clamp(28px, 3.4vw, 38px); line-height: 1.15; font-weight: 600; }
.fc-pago { font-size: 16px; color: var(--texto2); } .fc-pago strong { color: #1F7A4D; }
:root[data-theme="dark"] .fc-pago strong { color: #6FD3A4; }
.fc-nota { font-size: 14px; color: var(--texto2); }
.fc-sec-cab { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin: 34px 0 12px; }
.fc-sec-cab h2 { font-family: inherit; font-size: 22px; font-weight: 600; margin: 0; }
.fc-sec-cab p { margin: 4px 0 0; font-size: 14px; }
.fc-sec-acoes { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.fc-todas { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
.fc-lista { border-radius: 26px; background: var(--cartao); border: 1px solid var(--borda); box-shadow: 0 6px 20px rgba(16,34,58,.05); overflow: hidden; }
.fc-lista.fc-rolagem { max-height: 590px; overflow-y: auto; }
.fc-vazio { margin: 0; padding: 30px 24px; text-align: center; color: var(--texto2); }
.fc-item { display: grid; grid-template-columns: 30px 92px minmax(0, 1fr) auto 110px 112px; gap: 14px; align-items: center; padding: 14px 22px; border-bottom: 1px solid var(--borda); }
.fc-item-pago { grid-template-columns: 92px minmax(0, 1fr) auto 110px; }
.fc-item:last-child, .fc-recibo:last-child { border-bottom: 0; }
.fc-item:hover, .fc-recibo:hover { background: var(--suave); }
.fc-cod { font-weight: 600; color: var(--texto); }
.fc-desc { color: var(--texto2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-selo { display: inline-flex; align-items: center; gap: 8px; }
.fc-val { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fc-chk { display: inline-flex; }
.fc-recibo { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto auto; gap: 16px; align-items: center; padding: 16px 22px; border-bottom: 1px solid var(--borda); }
.fc-ic { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 50%; background: #E1F4EA; color: #1F7A4D; }
.fc-ic.fc-ic-azul { background: #E3ECF8; color: #1F4E8C; }
.fc-rec-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fc-rec-acoes { display: inline-flex; gap: 8px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.gv-dialog .btn, .gv-dialog .dlg-pe .btn { border-radius: 999px; }
.gv-dialog .recibo-itens, .gv-dialog .recibo-itens + .recibo-total { border-radius: 18px; }
@media (max-width: 900px) {
  .fc-topo { grid-template-columns: 1fr; }
  .fc-item { grid-template-columns: 28px 1fr auto; row-gap: 6px; padding: 14px 16px; }
  .fc-item .fc-cod { grid-column: 2; } .fc-item .fc-val { grid-column: 3; grid-row: 1; }
  .fc-item .fc-desc { grid-column: 2 / -1; white-space: normal; } .fc-item .fc-selo { grid-column: 2; } .fc-item .fc-pill { grid-column: 3; justify-self: end; }
  .fc-item-pago { grid-template-columns: 1fr auto; } .fc-item-pago .fc-cod { grid-column: 1; } .fc-item-pago .fc-desc { grid-column: 1 / -1; } .fc-item-pago .fc-selo { grid-column: 1; } .fc-item-pago .fc-val { grid-column: 2; }
  .fc-recibo { grid-template-columns: 46px 1fr auto; row-gap: 10px; padding: 14px 16px; } .fc-rec-acoes { grid-column: 1 / -1; justify-content: flex-start; }
}

/* Quadro azul do "Hoje": todas as letras em branco para ler melhor */
:root:root:root body.admin .hoje-topo, :root:root:root body.admin .hoje-topo h1, :root:root:root body.admin .hoje-topo .hoje-data, :root:root:root body.admin .hoje-topo .hoje-saudacao,
:root:root:root body.admin .hoje-topo .resumo-dia a, :root:root:root body.admin .hoje-topo p, :root:root:root body.admin .hoje-topo .muted { color: #fff; opacity: 1; }

/* Retirar da cobrança, faltas e cancelamentos */
.fc-item { grid-template-columns: 30px 92px minmax(0, 1fr) auto 110px auto; }
.fc-acoes-linha { display: inline-flex; align-items: center; gap: 8px; justify-content: flex-end; }
.fc-x { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--borda); background: var(--cartao); color: var(--texto2); cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; }
.fc-x:hover, .fc-x:focus-visible { background: #FCE6E4; color: #B53A33; border-color: #E9B3AE; }
.fc-ic.fc-ic-cinza { background: var(--suave); color: var(--texto2); }
.fc-motivo { font-size: 14px; color: var(--texto); }
.fc-retirar-rot { margin: 0 0 14px; padding: 12px 16px; border-radius: 16px; background: var(--suave); font-weight: 600; }
.oc-form > summary { list-style: none; cursor: pointer; }
.oc-form > summary::-webkit-details-marker { display: none; }
.oc-campos { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.oc-lista { border-top: 1px solid var(--borda); }
.oc-item { display: grid; grid-template-columns: 44px minmax(0, 1fr) minmax(170px, auto); gap: 16px; align-items: start; padding: 16px 24px; border-bottom: 1px solid var(--borda); }
.oc-item:last-child { border-bottom: 0; }
.oc-ic { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: #FDF0D2; color: #A16207; }
.oc-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.oc-taxa { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; text-align: right; }
.oc-acoes { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; margin-top: 4px; }
@media (max-width: 760px) { .oc-item { grid-template-columns: 44px 1fr; } .oc-taxa { grid-column: 1 / -1; align-items: flex-start; text-align: left; } .oc-acoes { justify-content: flex-start; } }

/* Letras sem serifa (Hanken Grotesk) em todo o sistema: títulos e números em peso 600, espaçamento normal */
h1, h2, h3, .serif { font-weight: 600; letter-spacing: -0.005em; }
.logo, .tipo-card .t, .t2-t, .etapa-box .n, .bv-adm-verso blockquote, .bv-adm-relogio .tempo, .conf-cont strong, .imovel-resumo strong,
.hoje-saudacao, body.admin .hoje-topo .hoje-saudacao { font-weight: 600; letter-spacing: -0.005em; }
.resumo .valor, .kpi .v, .faixa-fatura .valor, .destaque-cresc .num, .recibo-total strong, .fin-faixa strong { font-weight: 600; letter-spacing: -0.01em; word-spacing: normal; }
.bv-adm-verso blockquote { font-weight: 500; }
body.admin .hoje-topo .hoje-saudacao { letter-spacing: -0.01em; }

/* Abas do Financeiro pausadas (em construção) */
.fin-abas a.pausada { opacity: .6; }
.fin-abas a.pausada:hover { opacity: 1; }
.fin-abas .ab-obra { margin-left: 2px; padding: 2px 8px; border-radius: 999px; background: rgba(217,180,122,.28); color: #8A5A12; font-size: 11px; font-weight: 600; white-space: nowrap; }
:root[data-theme="dark"] .fin-abas .ab-obra { color: #F2C46B; }
.fin-obras { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 48px 28px; border-radius: 28px; margin-top: 16px; }
.fin-obras h2 { font-size: 24px; margin: 6px 0 0; }
.fin-obras p { max-width: 520px; margin: 0 0 8px; }
.fin-obras-ic { display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 72px; border-radius: 50%; background: #FDF0D2; color: #A16207; }

/* Listas dentro dos quadros do Hoje: mesmo respiro lateral do título (antes as linhas colavam na borda) */
.cartao.sem-pad > .fila, .bloco-fila > .fila { padding: 0 28px 16px; }
.cartao.sem-pad > .fila > .fila-item, .bloco-fila > .fila > .fila-item { padding: 18px 0; border-top: 1px solid var(--borda); border-bottom: 0; }
.cartao.sem-pad > .fila > .fila-item:first-child, .bloco-fila > .fila > .fila-item:first-child { border-top: 0; }
.cartao.sem-pad > .atrib-vazio, .bloco-fila > .atrib-vazio { margin: 0 28px 24px; }
@media (max-width: 700px) { .cartao.sem-pad > .fila, .bloco-fila > .fila { padding: 0 18px 12px; } }

/* Histórico de pedidos pagos: a regra geral de .fc-item (6 colunas) escondia o endereço; esta linha tem 5 */
.fc-item.fc-item-pago { grid-template-columns: 92px minmax(0, 1fr) auto 110px auto; }
.fc-desc-link { color: var(--texto2); }
.fc-desc-link:hover { color: var(--texto); text-decoration: underline; opacity: 1; }
@media (max-width: 900px) { .fc-item.fc-item-pago { grid-template-columns: 1fr auto; } .fc-item-pago .fc-pill { grid-column: 1 / -1; justify-self: start; } }

/* ---------- Financeiro › Resumo simplificado (fin-resumo.ejs) ---------- */
.rs-hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; align-items: center; margin-top: 8px; padding: 30px 36px; border-radius: 30px; color: #fff; background: radial-gradient(120% 140% at 0% 0%, #1B3552 0%, #10223A 55%, #0A1626 100%); box-shadow: 0 14px 34px rgba(16,34,58,.22); }
.rs-hero-esq { display: flex; flex-direction: column; gap: 4px; }
.rs-rot { font-size: 15px; font-weight: 500; opacity: .85; }
.rs-valor { font-size: clamp(38px, 5.6vw, 60px); line-height: 1.08; font-weight: 600; letter-spacing: -.01em; }
.rs-sub { font-size: 15px; color: #E4C28D; font-weight: 500; }
.rs-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 22px; margin: 0; padding-left: 28px; border-left: 1px solid rgba(255,255,255,.18); }
.rs-nums dt { font-size: 13px; opacity: .75; font-weight: 500; }
.rs-nums dd { margin: 4px 0 0; font-size: clamp(17px, 1.7vw, 22px); font-weight: 600; font-variant-numeric: tabular-nums; }
.rs-nums .rs-atraso { color: #FFB4AD; }
.rs-cli { display: grid; grid-template-columns: minmax(180px, 1.3fr) minmax(120px, 1fr) minmax(110px, auto) auto; gap: 22px; align-items: center; padding: 18px 28px; border-bottom: 1px solid var(--borda); }
.rs-cli:last-child { border-bottom: 0; }
.rs-cli:hover { background: var(--suave); }
.rs-cli-nome { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rs-cli-nome a { color: var(--texto); font-weight: 600; font-size: 16px; }
.rs-cli-sit { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.rs-prog { margin: 0; }
.rs-mais { margin-top: 16px; border: 1px solid var(--borda); border-radius: 24px; background: var(--cartao); overflow: hidden; }
.rs-mais > summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 28px; cursor: pointer; list-style: none; font-weight: 600; font-size: 17px; }
.rs-mais > summary::-webkit-details-marker { display: none; }
.rs-mais > summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--texto2); border-bottom: 2px solid var(--texto2); transform: rotate(45deg); margin: -4px 4px 0 8px; transition: transform .15s; flex-shrink: 0; }
.rs-mais[open] > summary::after { transform: rotate(-135deg); margin-top: 4px; }
.rs-mais > summary > span:first-child { flex: 1; }
.rs-mais[open] > summary { border-bottom: 1px solid var(--borda); }
.rs-mais .fin-meses { border-top: 0; }
.rs-mais-corpo { padding: 16px 28px 22px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.rs-mais-corpo .fin-manuais { align-self: stretch; }
/* Abas do Financeiro: só as ativas; o resto fica em "Em breve" */
.fin-abas .abas-breve { position: relative; margin-left: auto; }
.fin-abas .abas-breve > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 16px; border-radius: 11px; color: var(--texto2); font-weight: 500; font-size: 15px; }
.fin-abas .abas-breve > summary::-webkit-details-marker { display: none; }
.fin-abas .abas-breve > summary::after { content: "▾"; font-size: 12px; }
.fin-abas .abas-breve .painel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 270px; padding: 8px; display: flex; flex-direction: column; gap: 2px; background: var(--cartao); border: 1px solid var(--borda); border-radius: 18px; box-shadow: 0 20px 50px rgba(0,0,0,.15); }
.fin-abas .abas-breve .painel a { min-height: 44px; padding: 0 12px; border-radius: 12px; font-size: 15px; opacity: .85; }
.fin-abas .abas-breve .painel a:hover { background: var(--suave); opacity: 1; }
.fin-planilha { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--borda); border-radius: 12px; background: transparent; color: var(--texto); }
@media (max-width: 900px) {
  .rs-hero { grid-template-columns: 1fr; padding: 24px; } .rs-nums { padding-left: 0; border-left: 0; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.18); }
  .rs-cli { grid-template-columns: 1fr auto; row-gap: 10px; padding: 16px 18px; } .rs-prog { grid-column: 1 / -1; grid-row: 2; } .rs-cli-sit { align-items: flex-start; text-align: left; }
}

/* Barra de crédito da IA: quanto do limite do mês já foi gasto */
.barra-saldo { height: 8px; border-radius: 999px; background: var(--suave, rgba(0,0,0,.08)); overflow: hidden; margin: 0 0 10px; }
.barra-saldo > span { display: block; height: 100%; border-radius: 999px; transition: width .3s ease; }

/* ---------- App do vistoriador: legibilidade no celular ---------- */
/* O app é usado em pé, no sol, com uma mão. Então a letra é maior que a do site e nada pode sair da tela. */
.app { font-size: 16px; }
.app .btn { font-size: 16px; min-height: 50px; }
.app .btn.bloco { font-size: 17px; min-height: 54px; }
.app .btn.peq { font-size: 15px; min-height: 42px; }
.app .muted.peq, .app .peq { font-size: 14px; }
.app label, .app input, .app textarea, .app select { font-size: 16px; } /* 16px também evita o zoom automático do iPhone ao focar o campo */

/* Nada de texto comprido estourando a tela: quebra onde precisar e o número encolhe em vez de vazar. */
.app, .app * { min-width: 0; }
.app h1, .app h2, .app h3, .app p, .app td, .app th, .app .forte, .app .selo, .app .chip { overflow-wrap: anywhere; }
.app .valor-grande, .app .num-grande { font-size: clamp(22px, 7vw, 34px); line-height: 1.1; overflow-wrap: anywhere; }
.app .linha-dado { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; flex-wrap: wrap; }
.app .linha-dado > :last-child { text-align: right; overflow-wrap: anywhere; }

/* Tamanho da letra escolhido pelo vistoriador em Ajustes (fica guardado no próprio celular). */
:root[data-fonte="g"] .app { font-size: 18px; }
:root[data-fonte="g"] .app .btn { font-size: 18px; min-height: 54px; }
:root[data-fonte="g"] .app .btn.bloco { font-size: 19px; min-height: 58px; }
:root[data-fonte="g"] .app .btn.peq { font-size: 16px; min-height: 46px; }
:root[data-fonte="g"] .app .muted.peq, :root[data-fonte="g"] .app .peq { font-size: 16px; }
:root[data-fonte="g"] .app label, :root[data-fonte="g"] .app input, :root[data-fonte="g"] .app textarea, :root[data-fonte="g"] .app select { font-size: 18px; }
:root[data-fonte="g"] .app h1 { font-size: 28px; }
:root[data-fonte="gg"] .app { font-size: 20px; }
:root[data-fonte="gg"] .app .btn { font-size: 20px; min-height: 58px; }
:root[data-fonte="gg"] .app .btn.bloco { font-size: 21px; min-height: 62px; }
:root[data-fonte="gg"] .app .btn.peq { font-size: 18px; min-height: 50px; }
:root[data-fonte="gg"] .app .muted.peq, :root[data-fonte="gg"] .app .peq { font-size: 18px; }
:root[data-fonte="gg"] .app label, :root[data-fonte="gg"] .app input, :root[data-fonte="gg"] .app textarea, :root[data-fonte="gg"] .app select { font-size: 20px; }
:root[data-fonte="gg"] .app h1 { font-size: 26px; }
:root[data-fonte="gg"] .abas-app span { font-size: 12px; }

/* Botões de escolha do tamanho, na tela de Ajustes */
.fonte-ops { display: flex; gap: 10px; flex-wrap: wrap; }
.fonte-ops button { flex: 1 1 90px; min-height: 60px; border: 2px solid var(--borda); border-radius: 14px; background: var(--cartao); color: var(--texto); font-family: inherit; font-weight: 700; cursor: pointer; }
.fonte-ops button[aria-pressed="true"] { border-color: var(--latao, #D9B47A); background: rgba(217, 180, 122, .18); }
