/* ===================================================================================
   LapidusCore — sistema interno. Identidade: pedra polida + tinta (azul-petróleo) + lápis-lazúli.
   Títulos e valores em Lora (serifa de leitura), interface em Inter. Fontes locais (a CSP não aceita CDN).
   =================================================================================== */
@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url("/static/fonts/inter-400.woff") format("woff"); }
@font-face { font-family: "Inter"; font-weight: 500; font-style: normal; font-display: swap; src: url("/static/fonts/inter-500.woff") format("woff"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap; src: url("/static/fonts/inter-600.woff") format("woff"); }
@font-face { font-family: "Inter"; font-weight: 700; font-style: normal; font-display: swap; src: url("/static/fonts/inter-700.woff") format("woff"); }
@font-face { font-family: "Lora"; font-weight: 400 700; font-style: normal; font-display: swap; src: url("/static/fonts/lora-var.woff") format("woff"); }

:root {
  --tinta: #0d1f2b;            /* menu lateral */
  --tinta-2: #14303f;
  --lapis: #1c6db3;            /* ação principal */
  --lapis-esc: #14507f;
  --lapis-claro: #e6f0f8;
  --bronze: #b98f4a;           /* detalhe de marcenaria: só no item ativo e no destaque */
  --pedra: #eceff0;            /* fundo da página */
  --pedra-2: #f5f6f7;
  --linha: #dde2e6;
  --linha-forte: #c5cdd3;
  --texto: #15232d;
  --texto-suave: #5a6a76;
  --branco: #ffffff;
  --erro: #b3261e;
  --erro-fundo: #fdecea;
  --ok: #1b7a4d;
  --ok-fundo: #e5f3ec;
  --aviso: #8a5a00;
  --aviso-fundo: #fff3d4;
  --sombra: 0 1px 0 rgba(13, 31, 43, .04), 0 10px 26px -14px rgba(13, 31, 43, .22);
  --sombra-alta: 0 18px 44px -18px rgba(13, 31, 43, .38);
  --raio: 12px;
  --fonte: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --serifa: "Lora", Georgia, "Times New Roman", serif;
  /* nomes antigos, usados por outros arquivos CSS */
  --azul: var(--lapis); --azul-escuro: var(--tinta-2); --azul-hover: var(--lapis-esc);
  --grafite: #20313d; --borda: var(--linha-forte); --fundo: var(--pedra);
  font-family: var(--fonte);
  font-size: 15px;
  color: var(--texto);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--pedra); line-height: 1.55; font-feature-settings: "kern", "liga"; -webkit-font-smoothing: antialiased; }
a { color: var(--lapis); }
:focus-visible { outline: 3px solid rgba(28, 109, 179, .4); outline-offset: 2px; }
::selection { background: #cfe3f3; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
h1, h2, h3 { font-family: var(--serifa); font-weight: 600; letter-spacing: -.01em; }

/* ---------- botões e campos ---------- */
.botao {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border: 1px solid transparent; border-radius: 9px; padding: .62rem 1.15rem; font: inherit; font-weight: 600; font-size: .94rem;
  cursor: pointer; background: linear-gradient(180deg, #2178c4, var(--lapis)); color: #fff; min-height: 42px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .18) inset, 0 1px 2px rgba(13, 31, 43, .22);
  transition: background .15s ease, box-shadow .15s ease, transform .05s ease;
}
.botao:hover { background: linear-gradient(180deg, var(--lapis), var(--lapis-esc)); }
.botao:active { transform: translateY(1px); }
.botao[disabled] { opacity: .6; cursor: progress; }
.botao-largo { width: 100%; }
.botao-secundario { background: var(--branco); color: var(--texto); border-color: var(--linha-forte); box-shadow: 0 1px 1px rgba(13, 31, 43, .06); }
.botao-secundario:hover { background: var(--pedra-2); border-color: #aab4bb; }

.campo { margin-bottom: 1.1rem; }
.campo label { display: block; font-weight: 600; margin-bottom: .35rem; color: var(--grafite); font-size: .88rem; }
.campo input, select, .campo textarea {
  width: 100%; padding: .62rem .8rem; font: inherit; color: var(--texto);
  border: 1px solid var(--linha-forte); border-radius: 9px; background: var(--branco); min-height: 42px;
  box-shadow: 0 1px 1px rgba(13, 31, 43, .04) inset; transition: border-color .15s, box-shadow .15s;
}
.campo input:focus, select:focus, .campo textarea:focus { border-color: var(--lapis); box-shadow: 0 0 0 3px rgba(28, 109, 179, .16); outline: none; }
.campo textarea { resize: vertical; min-height: 110px; }
.campo-senha { position: relative; }
.campo-senha input { padding-right: 5.2rem; }
.mostrar-senha { position: absolute; right: .4rem; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--lapis); font: inherit; font-weight: 600; cursor: pointer; padding: .5rem .6rem; border-radius: 6px; }
.mostrar-senha:hover { background: var(--lapis-claro); }

.alerta { padding: .75rem 1rem; border-radius: 10px; margin-bottom: 1.1rem; font-size: .92rem; background: var(--erro-fundo); color: var(--erro); border: 1px solid #f1c3bf; }

/* ---------- login ---------- */
.login-pagina { min-height: 100vh; display: grid; place-items: center; padding: 1.25rem; background: radial-gradient(1200px 600px at 15% -10%, #1f5f8f 0%, transparent 60%), linear-gradient(160deg, #0a1923 0%, #12303f 60%, #1b4a66 130%); }
.login-cartao { width: 100%; max-width: 420px; background: var(--branco); border-radius: 18px; box-shadow: var(--sombra-alta); padding: 2.1rem 1.9rem 1.75rem; border-top: 3px solid var(--bronze); }
.login-logo { display: block; width: 260px; max-width: 90%; height: auto; margin: 0 auto 1rem; box-sizing: border-box; }
.login-cartao h1 { font-size: 1.45rem; text-align: center; margin: 0 0 .25rem; color: var(--tinta); }
.login-sub { text-align: center; color: var(--texto-suave); margin: 0 0 1.5rem; font-size: .93rem; }
.login-rodape { text-align: center; color: var(--texto-suave); font-size: .85rem; margin: 1.25rem 0 0; }

/* ---------- estrutura: menu lateral por seções ---------- */
.app { display: grid; grid-template-columns: 272px minmax(0, 1fr); min-height: 100vh; }
.lateral {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 1rem;
  padding: 1.1rem .9rem 1rem; color: #cbd8e2;
  background: linear-gradient(180deg, #0f2331 0%, var(--tinta) 55%, #0a1822 100%);
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .18) transparent;
}
.lateral-marca { display: block; text-decoration: none; }
.lateral-marca img { display: block; width: 100%; height: auto; }
.lateral-novo {
  display: flex; align-items: center; justify-content: center; gap: .6rem; padding: .78rem 1rem; border-radius: 11px;
  background: linear-gradient(180deg, #2a86d6 0%, var(--lapis) 100%); color: #fff; font-weight: 700; font-size: .98rem; text-decoration: none;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 8px 18px -8px rgba(28, 109, 179, .9); transition: filter .15s, transform .05s;
}
.lateral-novo:hover { filter: brightness(1.08); }
.lateral-novo:active { transform: translateY(1px); }
.lateral-novo[aria-current="page"] { box-shadow: 0 0 0 2px var(--bronze), 0 8px 18px -8px rgba(28, 109, 179, .9); }
.lateral-nav { display: flex; flex-direction: column; flex: 0 0 auto; gap: .15rem; }
.menu { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.menu-grupo { margin-top: 1rem; }
.menu-grupo-fim { margin-top: .9rem; padding-top: .7rem; border-top: 1px solid rgba(255, 255, 255, .09); }
.menu-titulo { margin: 0 0 .35rem .8rem; font-size: .76rem; font-weight: 600; letter-spacing: .02em; color: #7f96a7; }
.menu a {
  position: relative; display: flex; align-items: center; gap: .7rem; padding: .56rem .8rem; border-radius: 9px;
  color: #cbd8e2; text-decoration: none; font-weight: 500; font-size: .93rem; transition: background .12s, color .12s;
}
.menu a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.menu a[aria-current="page"] { background: rgba(255, 255, 255, .11); color: #fff; font-weight: 600; }
.menu a[aria-current="page"]::before { content: ""; position: absolute; left: -.9rem; top: 22%; bottom: 22%; width: 4px; border-radius: 0 4px 4px 0; background: var(--bronze); }
.menu .ic { width: 19px; height: 19px; flex: none; stroke-width: 1.7; opacity: .85; }
.menu a[aria-current="page"] .ic { opacity: 1; color: #f0d9a8; }
.lateral-novo .ic { width: 19px; height: 19px; stroke-width: 1.9; }

.lateral-usuario { margin-top: auto; display: flex; align-items: center; gap: .65rem; padding: .7rem .6rem .1rem; border-top: 1px solid rgba(255, 255, 255, .09); }
.avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #2a86d6, #14507f); color: #fff; font-weight: 700; font-family: var(--serifa); font-size: 1.05rem; }
.usuario-dados { min-width: 0; display: grid; line-height: 1.25; }
.usuario-dados strong { color: #fff; font-size: .88rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usuario-dados span { font-size: .78rem; color: #a9bccb; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usuario-dados small { font-size: .72rem; color: #7f96a7; }
.lateral-usuario form { margin-left: auto; }
.sair { background: none; border: 0; padding: .45rem; border-radius: 8px; color: #a9bccb; cursor: pointer; display: grid; }
.sair:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.sair .ic { width: 19px; height: 19px; stroke-width: 1.7; }

.barra-topo, .cortina { display: none; }

.conteudo { padding: 2.1rem clamp(1rem, 3.2vw, 3rem) 3rem; min-width: 0; max-width: 1500px; }
.conteudo h1 { margin: 0 0 .3rem; font-size: 2rem; line-height: 1.15; color: var(--tinta); }
.conteudo h2 { color: var(--tinta); }
.conteudo .sub { color: var(--texto-suave); margin: 0 0 1.6rem; max-width: 62ch; }
.conteudo > p > a:first-child { font-size: .9rem; text-decoration: none; }

.cartoes { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.cartao { background: var(--branco); border: 1px solid var(--linha); border-radius: var(--raio); padding: 1.15rem 1.3rem; box-shadow: var(--sombra); }
.cartao h2 { margin: 0 0 .3rem; font-size: 1.12rem; }
.cartao p { margin: 0; color: var(--texto-suave); font-size: .92rem; }
.cartao.desativado { background: var(--pedra-2); border-style: dashed; box-shadow: none; }
.selo { display: inline-block; margin-top: .6rem; padding: .15rem .6rem; border-radius: 999px; background: #e8edf1; color: var(--texto-suave); font-size: .74rem; font-weight: 600; }

/* ---------- erro ---------- */
.erro-pagina { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 1.5rem; }
.erro-pagina h1 { font-size: 4.5rem; margin: 0; color: var(--tinta-2); }

/* ---------- celular: o menu vira gaveta ---------- */
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .barra-topo { display: flex; align-items: center; gap: .8rem; position: sticky; top: 0; z-index: 30; padding: .55rem .9rem; background: var(--tinta); box-shadow: 0 2px 10px rgba(0, 0, 0, .25); }
  .barra-marca { display: block; }
  .barra-marca img { display: block; height: 30px; width: auto; }
  .menu-botao { background: none; border: 1px solid rgba(255, 255, 255, .25); color: #fff; border-radius: 9px; padding: .4rem; display: grid; cursor: pointer; }
  .menu-botao .ic { width: 22px; height: 22px; }
  .lateral { position: fixed; z-index: 50; left: 0; top: 0; bottom: 0; width: min(310px, 86vw); transform: translateX(-102%); transition: transform .22s ease; box-shadow: var(--sombra-alta); }
  .menu-aberto .lateral { transform: none; }
  .cortina { position: fixed; inset: 0; z-index: 40; background: rgba(5, 15, 22, .55); }
  .menu-aberto .cortina { display: block; }
  .menu-aberto .cortina[hidden] { display: none; }
  .conteudo h1 { font-size: 1.65rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

.alerta-ok { background: var(--ok-fundo); color: var(--ok); border-color: #b7dfc9; }
.alerta-aviso { background: var(--aviso-fundo); color: var(--aviso); border-color: #efd68b; }
.campo .erro-campo { display: block; margin-top: .3rem; color: var(--erro); font-size: .85rem; }
.campo input[aria-invalid="true"], .campo textarea[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--erro); }
.armadilha { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.botao-verde { background: linear-gradient(180deg, #23a169, #1b8a58); }
.botao-verde:hover { background: #16724a; }
.botao-escuro { background: linear-gradient(180deg, #1d3d52, var(--tinta)); }
.botao-escuro:hover { background: var(--tinta); }
a.botao { text-decoration: none; }

/* ---------- conta e licença ---------- */
.cartoes-info { margin-bottom: 1.5rem; }
.cartao.info { display: flex; align-items: center; gap: 1rem; }
.info-icone { width: 46px; height: 46px; padding: 11px; border-radius: 12px; flex: none; }
.ic-ok { background: var(--ok-fundo); color: var(--ok); }
.ic-erro { background: var(--erro-fundo); color: var(--erro); }
.ic-aviso { background: var(--aviso-fundo); color: var(--aviso); }
.ic-roxo { background: #efe9fb; color: #6d3fc0; }
.ic-azul-s { width: 22px; height: 22px; padding: 0; background: none; color: var(--lapis); vertical-align: -4px; margin-right: .25rem; }
.info-rotulo { margin: 0; color: var(--texto-suave); font-size: .78rem; font-weight: 600; }
.info-valor { margin: .1rem 0 0; font-family: var(--serifa); font-size: 1.3rem; font-weight: 600; color: var(--tinta); }
.info-valor.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .95rem; font-weight: 500; }
.info-nota { margin: .4rem 0 0; color: var(--texto-suave); font-size: .82rem; }
.txt-ok { color: var(--ok); } .txt-erro { color: var(--erro); }
.cartao.fatura { padding: 0; overflow: hidden; }
.cartao.fatura h2 { margin: 0; padding: 1.1rem 1.5rem; background: var(--pedra-2); border-bottom: 1px solid var(--linha); font-size: 1.15rem; }
.fatura-corpo { display: flex; flex-wrap: wrap; gap: 2rem; align-items: center; justify-content: space-between; padding: 1.75rem 1.5rem; }
.fatura-corpo h3 { margin: 0 0 .5rem; font-size: 1.3rem; color: var(--tinta); }
.fatura-corpo > div:first-child { max-width: 28rem; }
.fatura-corpo p { color: var(--texto-suave); font-size: .92rem; margin: 0; }
.fatura-preco { min-width: 230px; display: grid; gap: .6rem; }
.fatura-preco .preco { font-family: var(--serifa); font-size: 2.3rem; font-weight: 600; color: var(--tinta); margin: 0; }

/* ---------- módulos: listas, tabelas e formulários ---------- */
.so-leitor { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.topo-modulo { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: .4rem; }
.topo-modulo .sub { margin-bottom: .6rem; }
.topo-modulo .rotulo { display: none; }
.topo-modulo .botao { width: auto; }
.busca { display: flex; gap: .6rem; margin: 1rem 0; max-width: 520px; }
.busca input { flex: 1; min-width: 0; padding: .62rem .85rem; font: inherit; border: 1px solid var(--linha-forte); border-radius: 9px; min-height: 42px; background: var(--branco); }
.busca input:focus { border-color: var(--lapis); box-shadow: 0 0 0 3px rgba(28, 109, 179, .16); outline: none; }
.tabela-rolagem { overflow-x: auto; background: var(--branco); border: 1px solid var(--linha); border-radius: var(--raio); box-shadow: var(--sombra); }
.tabela { width: 100%; border-collapse: collapse; font-size: .92rem; font-variant-numeric: tabular-nums; }
.tabela th, .tabela td { text-align: left; padding: .72rem 1rem; border-bottom: 1px solid #e8ecef; vertical-align: middle; }
.tabela th { background: var(--pedra-2); color: #3d4f5c; font-size: .8rem; font-weight: 600; border-bottom: 1px solid var(--linha-forte); white-space: nowrap; }
.tabela tbody tr { transition: background .1s; }
.tabela tbody tr:hover { background: #f4f8fb; }
.tabela tbody tr:last-child td { border-bottom: 0; }
.tabela .vazio { text-align: center; color: var(--texto-suave); padding: 2.2rem; }
.tabela .acoes { white-space: nowrap; }
.tabela .acoes > * { margin-right: .9rem; }
.tabela td a { font-weight: 500; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.em-linha { display: inline; }
.link-botao { background: none; border: 0; padding: 0; font: inherit; color: var(--lapis); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.perigo, .link-botao.perigo { color: var(--erro); }
.nivel { font-weight: 600; font-size: .82rem; }
.nivel-administrador { color: #a3322a; }
.nivel-avancado { color: var(--lapis); }
.paginacao { display: flex; gap: 1rem; align-items: center; justify-content: center; margin: 1rem 0; }
.formulario { max-width: 600px; padding: 1.6rem; }
.formulario .botao { width: auto; display: inline-flex; text-decoration: none; margin-right: .5rem; }
.grupo { border: 1px solid var(--linha); border-radius: 10px; padding: 1rem 1rem .2rem; margin: 0 0 1.1rem; background: var(--pedra-2); }
.grupo legend { font-weight: 600; padding: 0 .4rem; color: var(--grafite); font-size: .9rem; }
.dica { color: var(--texto-suave); font-size: .88rem; margin: 0 0 .8rem; }
.botao-perigo { background: linear-gradient(180deg, #c93a31, var(--erro)); }
.botao-perigo:hover { background: #8f1f19; }
.busca-larga { max-width: none; flex-wrap: wrap; align-items: stretch; }
.busca-larga input { min-width: 14rem; }
.busca-larga select { width: auto; min-width: 11rem; }
.busca-larga .botao { width: auto; text-decoration: none; }
.linha-campos { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.linha-campos.tres { grid-template-columns: repeat(3, 1fr); }
.formulario [hidden] { display: none; }
@media (max-width: 560px) { .linha-campos, .linha-campos.tres { grid-template-columns: 1fr; } }
.tabela .num, .tabela th.num { text-align: right; white-space: nowrap; }
.suave { color: var(--texto-suave); }

/* ---------- orçamentos ---------- */
.cartao + .cartao { margin-top: 1rem; }
section.cartao { padding: 1.3rem 1.5rem; }
section.cartao > h2 { margin-bottom: .75rem; }
.acoes-form { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-top: .4rem; }
.acoes-form .botao { width: auto; text-decoration: none; }
a.botao.perigo { color: var(--erro); }
.status { display: inline-flex; align-items: center; padding: .14rem .65rem; border-radius: 999px; font-size: .78rem; font-weight: 600; background: #eaeef1; color: var(--grafite); }
.st-aguardando { background: var(--aviso-fundo); color: var(--aviso); }
.st-producao { background: #e1eefa; color: #174f7d; }
.st-corte { background: #f1e6fb; color: #5b2a86; }
.st-final { background: var(--ok-fundo); color: var(--ok); }
.bloco { border: 1px solid var(--linha-forte); border-radius: 12px; margin: 0 0 1rem; overflow: hidden; background: var(--branco); scroll-margin-top: 1rem; }
.bloco:target { box-shadow: 0 0 0 3px rgba(185, 143, 74, .55), var(--sombra); }
.bloco-topo { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .7rem 1rem; background: linear-gradient(180deg, #1b3a4e, var(--tinta-2)); color: #fff; flex-wrap: wrap; font-size: .95rem; }
.bloco-topo > span { display: inline-flex; align-items: center; gap: .9rem; }
.bloco-servico .bloco-topo { background: linear-gradient(180deg, #2a6a60, #1f544c); }
.bloco-erro .bloco-topo { background: var(--erro); }
.bloco-topo .txt-ok { color: #fff; font-family: var(--serifa); font-size: 1.1rem; }
.bloco-topo .link-botao { color: #cfe3f3; }
.bloco-corpo { display: grid; grid-template-columns: auto minmax(0, 1fr); }
.bloco-foto { display: block; width: 170px; height: 128px; margin: .8rem 0 .8rem .9rem; object-fit: cover; border-radius: 8px; border: 1px solid var(--linha); background: var(--pedra-2); }
@media (max-width: 640px) { .bloco-corpo { grid-template-columns: 1fr; } .bloco-foto { width: calc(100% - 1.8rem); height: 180px; margin: .8rem .9rem 0; } }
.tabela-fina { font-size: .88rem; }
.tabela-fina th { text-transform: none; letter-spacing: 0; }
.total-geral { text-align: right; font-size: 1rem; margin: 1.1rem 0 0; color: var(--texto-suave); }
.total-geral strong { font-family: var(--serifa); font-size: 1.8rem; color: var(--tinta); margin-left: .4rem; }
.campo input[readonly] { background: #eef1f3; color: var(--texto-suave); }
.projetos-novos { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

/* ---------- estoque ---------- */
.acoes-topo { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.retalho { color: #1e8449; }
.tabela td.quebra { overflow-wrap: anywhere; max-width: 18rem; }
.acoes-pilha a { display: block; white-space: nowrap; margin: .1rem 0; }

/* ---------- produção: mapa de corte em SVG (cores por classe; a CSP não aceita style inline) ---------- */
.mapa-svg { width: 100%; height: auto; max-height: 70vh; display: block; background: #ecf0f1; border-radius: var(--raio); }
.mapa-chapa { fill: #bdc3c7; stroke: #7f8c8d; stroke-width: 1; vector-effect: non-scaling-stroke; }
.mapa-corte { fill: #ecf0f1; }
.mapa-peca { fill: #1c6db3; fill-opacity: .86; stroke: #fff; stroke-width: 1; vector-effect: non-scaling-stroke; }
.mapa-peca.destaque { fill: #2ecc71; fill-opacity: .95; }
.mapa-texto { fill: #fff; font-weight: 700; pointer-events: none; }
.chapa-cartao { margin-top: 1rem; }
.chapa-cartao h2 { margin-bottom: .75rem; }
.eficiencia { list-style: none; margin: .5rem 0 0; padding: 0; display: flex; gap: .5rem; flex-wrap: wrap; }
.eficiencia li { background: #d9f0e3; color: #17643a; border: 1px solid #8fd1ae; border-radius: 6px; padding: .2rem .6rem; font-size: .85rem; }
tr[data-destacar] { cursor: pointer; }
tr[data-destacar].destaque { background: #d5f5e3; }
.alerta-texto { color: #c0392b; }
.sub-bloco { margin: 1rem 0 .4rem; font-size: 1rem; }

/* ---------- financeiro ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .85rem; margin: 1rem 0; }
.kpi { background: var(--branco); border: 1px solid var(--linha); border-radius: var(--raio); padding: 1rem 1.15rem; display: flex; flex-direction: column; gap: .25rem; box-shadow: var(--sombra); }
.kpi-rotulo { color: var(--texto-suave); font-size: .82rem; font-weight: 500; }
.kpi strong { font-family: var(--serifa); font-size: 1.55rem; font-weight: 600; color: var(--tinta); font-variant-numeric: lining-nums; }
.neg { color: #b3261e !important; }
.pos { color: #1b7a4d; }
.abas { display: flex; gap: .25rem; flex-wrap: wrap; border-bottom: 1px solid var(--linha-forte); margin: 1rem 0; }
.abas a { padding: .6rem 1rem; text-decoration: none; color: var(--texto-suave); border-bottom: 3px solid transparent; font-weight: 600; font-size: .92rem; }
.abas a:hover { color: var(--tinta); }
.abas a[aria-current="page"] { color: var(--tinta); border-bottom-color: var(--bronze); }
.grafico { width: 100%; height: auto; display: block; }
.g-receita { fill: #1c6db3; } .g-custo { fill: #d9742f; }
.g-grade { stroke: #e3e7ea; stroke-width: 1; } .g-base, .g-zero { stroke: #7f8c8d; stroke-width: 1; }
.g-texto { fill: #5a6a76; font-size: 11px; }
.g-linha { fill: none; stroke: #14303f; stroke-width: 2; stroke-linejoin: round; }
.g-ponto { fill: #14303f; stroke: #fff; stroke-width: 2; }
.g-alvo { fill: transparent; }
.g-alvo:hover { fill: rgba(28, 109, 179, .08); }
.legenda { list-style: none; display: flex; gap: 1rem; margin: .25rem 0 .5rem; padding: 0; color: var(--texto-suave); font-size: .9rem; }
.legenda li { display: flex; align-items: center; gap: .4rem; }
.amostra { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.amostra-receita { background: #1c6db3; } .amostra-custo { background: #d9742f; }
.tabela-dados { margin-top: .75rem; } .tabela-dados summary { cursor: pointer; color: var(--lapis); }
.dre-grupo { border-bottom: 1px solid var(--linha); }
.dre-grupo summary, .dre-linha { display: flex; justify-content: space-between; gap: 1rem; padding: .65rem .25rem; cursor: pointer; font-variant-numeric: tabular-nums; }
.dre-linha { cursor: default; border-bottom: 1px solid #eef0f2; }
.dre-grupo ul { list-style: none; margin: 0 0 .5rem; padding: 0 0 0 1.25rem; color: var(--texto-suave); font-size: .92rem; }
.dre-grupo li { display: flex; justify-content: space-between; gap: 1rem; padding: .25rem 0; }
.dre-final { font-size: 1.1rem; font-weight: 700; background: var(--pedra-2); }

/* ---------- chamados ---------- */
.st-chamado-aberto { background: var(--erro-fundo); color: var(--erro); }
.texto-livre { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 .75rem; color: var(--texto); }
.anexos { list-style: none; display: flex; gap: .5rem; flex-wrap: wrap; padding: 0; margin: .5rem 0 0; }
.anexos img { width: 140px; height: 100px; object-fit: cover; border: 1px solid var(--linha-forte); border-radius: 8px; display: block; }

/* ---------- produção: plano de corte ---------- */
.entrada-qtd { width: 4.5rem; padding: .25rem .4rem; }
.lista-simples { list-style: none; padding: 0; margin: 0 0 1rem; }
.lista-simples li { margin: .3rem 0; }
.linha-check { display: block; margin-bottom: .8rem; font-weight: 600; }
form.cartao > .botao[type="submit"] { margin-top: 1rem; }
.ok-texto { color: #1e8449; }
.fotos-os { display: flex; gap: .75rem; flex-wrap: wrap; }
.fotos-os img { width: 260px; max-width: 100%; height: 190px; object-fit: contain; background: #fff; border: 1px solid var(--linha-forte); border-radius: 8px; }

/* ---------- painel inicial ---------- */
.painel-topo { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.painel-numeros { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .9rem; margin: 1.2rem 0 1.8rem; }
.numero { display: block; text-decoration: none; color: inherit; background: var(--branco); border: 1px solid var(--linha); border-radius: var(--raio); padding: 1.1rem 1.25rem; box-shadow: var(--sombra); transition: transform .12s, box-shadow .12s, border-color .12s; }
a.numero:hover { transform: translateY(-2px); box-shadow: var(--sombra-alta); border-color: var(--linha-forte); }
.numero b { display: block; font-family: var(--serifa); font-size: 2.6rem; font-weight: 600; line-height: 1; color: var(--tinta); font-variant-numeric: lining-nums; }
.numero span { display: block; margin-top: .45rem; color: var(--texto-suave); font-size: .88rem; }
.numero.destaque { border-top: 3px solid var(--bronze); }
.atalhos { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .9rem; }
.atalho, .atalho-emp { display: flex; gap: .9rem; align-items: flex-start; text-decoration: none; color: inherit; background: var(--branco); border: 1px solid var(--linha); border-radius: var(--raio); padding: 1rem 1.15rem; box-shadow: var(--sombra); transition: border-color .12s, transform .12s; }
.atalho:hover, .atalho-emp:hover { border-color: var(--lapis); transform: translateY(-1px); }
.atalho .ic, .atalho svg { flex: none; width: 38px; height: 38px; padding: 8px; border-radius: 10px; background: var(--lapis-claro); color: var(--lapis); stroke-width: 1.7; }
.atalho strong { display: block; font-size: .98rem; color: var(--tinta); }
.atalho-emp span { display: block; font-size: .86rem; color: var(--texto-suave); margin-top: .1rem; }
.painel-h2 { font-size: 1.2rem; margin: 1.6rem 0 .8rem; }

/* ---------- novo projeto: escolha do tipo ---------- */
.tipos-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.1rem; margin-top: 1.2rem; }
.tipo-cartao { display: flex; flex-direction: column; text-decoration: none; color: inherit; background: var(--branco); border: 1px solid var(--linha); border-radius: 14px; overflow: hidden; box-shadow: var(--sombra); transition: transform .14s, box-shadow .14s, border-color .14s; }
.tipo-cartao:hover { transform: translateY(-3px); box-shadow: var(--sombra-alta); border-color: var(--lapis); }
.tipo-desenho { display: block; background: linear-gradient(180deg, #f3f6f8, #e7edf1); border-bottom: 1px solid var(--linha); padding: 1rem 1rem .6rem; }
.tipo-desenho svg { display: block; width: 100%; height: 130px; }
.tipo-desenho .d-linha { fill: none; stroke: #1c6db3; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.tipo-desenho .d-pedra { fill: #fff; stroke: #14303f; stroke-width: 2; stroke-linejoin: round; }
.tipo-desenho .d-lado { fill: #cfd8de; stroke: #14303f; stroke-width: 2; stroke-linejoin: round; }
.tipo-desenho .d-topo { fill: #e9eef1; stroke: #14303f; stroke-width: 2; stroke-linejoin: round; }
.tipo-desenho .d-vazio { fill: #98a8b3; stroke: #14303f; stroke-width: 2; stroke-linejoin: round; }
.tipo-desenho .d-cota { stroke: #b98f4a; stroke-width: 1.5; fill: none; stroke-dasharray: 4 3; }
.tipo-texto { padding: 1rem 1.2rem 1.2rem; }
.tipo-texto h2 { margin: 0 0 .3rem; font-size: 1.2rem; }
.tipo-texto p { margin: 0; font-size: .9rem; color: var(--texto-suave); }
.tipo-texto .vai { display: inline-flex; align-items: center; gap: .35rem; margin-top: .8rem; font-weight: 600; font-size: .9rem; color: var(--lapis); }
.tipo-texto .vai .ic { width: 16px; height: 16px; }

/* ---------- editor de projetos: menu principal recolhido (botão "Menu" da barra do editor) ---------- */
@media (min-width: 901px) {
  .app.menu-oculto { grid-template-columns: minmax(0, 1fr); }
  .app.menu-oculto .lateral { display: none; }
}

/* ---------- placa escura do logo: o cinza prateado do "LAPIDUS" e o azul do "CORE" aparecem no fundo azul-petróleo, não no branco ---------- */
.lateral-marca, .barra-marca, .login-logo, .topo-logo img {
  background:
    radial-gradient(130px 70px at 22% 45%, rgba(46, 134, 193, .38), transparent 70%),
    linear-gradient(160deg, #0a1722 0%, #11293a 55%, #17394f 100%);
  border: 1px solid rgba(147, 197, 253, .22);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 6px 16px -8px rgba(0, 0, 0, .55);
}
.lateral-marca { padding: .55rem .7rem; }
.barra-marca { padding: .25rem .5rem; border-radius: 8px; }
.login-logo { padding: .75rem 1rem; }
.topo-logo img { padding: .3rem .7rem; box-sizing: content-box; }

/* tela "Preços dos acabamentos" */
.pr-acab td { vertical-align: middle; }
.pr-ico { width: 4.2rem; color: var(--lapis, #1f3a4d); }
.pr-perfil { width: 3.4rem; height: auto; display: block; }
.pr-acab input[type="text"] { text-align: right; }
.pr-acab label { cursor: pointer; }
.barra-fixa-salvar { position: sticky; bottom: 0; padding: .7rem 0; background: linear-gradient(transparent, var(--fundo, #fff) 40%); }

.avisos-preco { list-style: none; margin: .5rem 0; padding: 0; display: flex; flex-direction: column; gap: .45rem; }
.avisos-preco li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem .8rem; }
.preco-rapido { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: 0; }
.preco-rapido select, .preco-rapido input[type="text"] { padding: .3rem .5rem; font-size: .85rem; width: auto; }
.preco-rapido input[type="text"] { width: 6.5rem; text-align: right; }

/* área da empresa */
.atalhos-empresa { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin: 1rem 0 1.4rem; }
.atalho-emp { display: flex; align-items: center; gap: .8rem; text-decoration: none; color: inherit; }
.atalho-emp:hover { box-shadow: 0 0 0 2px var(--lapis, #2a6fb0); }
.atalho-emp div { display: flex; flex-direction: column; }
.atalho-emp span { color: var(--suave, #5b6b78); font-size: .88rem; }
.dados-empresa { display: grid; gap: .7rem; margin: 0 0 1rem; }
.dados-empresa dt { font-size: .8rem; color: var(--suave, #5b6b78); }
.dados-empresa dd { margin: 0; font-weight: 600; }
.termos-empresa { white-space: pre-line; overflow-wrap: anywhere; font-size: .9rem; }

/* edição da empresa */
.topo-cartao { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; }
.logo-empresa img, .logo-atual img { background: #fff; border: 1px solid var(--linha, #d9e0e6); border-radius: 8px; padding: .3rem; max-width: 220px; object-fit: contain; }
.logo-atual { display: flex; align-items: center; gap: 1rem; margin: .3rem 0 .6rem; }
.marcar { display: inline-flex; align-items: center; gap: .4rem; font-weight: 400; }
.campo-largo { flex: 2 1 16rem; }
.form-empresa textarea { width: 100%; font: inherit; padding: .6rem .7rem; border: 1px solid var(--linha, #cfd8df); border-radius: 10px; resize: vertical; }
.modelos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .8rem; margin: .8rem 0 1.2rem; }
.modelo-opcao { display: flex; flex-direction: column; gap: .45rem; cursor: pointer; padding: .55rem; border: 2px solid var(--linha, #d9e0e6); border-radius: 12px; background: #fff; }
.modelo-opcao input { position: absolute; opacity: 0; pointer-events: none; }
.modelo-opcao:has(input:checked) { border-color: var(--lapis, #2a6fb0); box-shadow: 0 0 0 3px rgba(42,111,176,.18); }
.modelo-opcao:has(input:focus-visible) { outline: 2px solid var(--lapis, #2a6fb0); outline-offset: 2px; }
.modelo-nome { font-size: .85rem; font-weight: 600; text-align: center; }
.modelo-mini { position: relative; display: block; height: 96px; background: #fff; border: 1px solid #dde3e8; border-radius: 6px; overflow: hidden; padding: 8px; }
.modelo-mini i { display: block; height: 14px; margin-bottom: 8px; border-radius: 2px; }
.modelo-mini b { display: block; height: 5px; background: #cfd6dc; margin-bottom: 5px; border-radius: 2px; }
.modelo-mini b.curta { width: 55%; }
.modelo-mini em { position: absolute; right: 8px; bottom: 8px; width: 38%; height: 12px; border-radius: 2px; }
.mm-padrao i { background: #2c3e50; } .mm-padrao em { background: #27ae60; }
.mm-moderno i { background: #27ae60; border-radius: 6px; } .mm-moderno em { background: #e6f5ec; border: 1px solid #27ae60; }
.mm-minimalista i { background: none; border-bottom: 1px solid #111; border-radius: 0; } .mm-minimalista em { background: none; border-top: 2px solid #111; border-radius: 0; }
.mm-classico { background: #fbf6ea; } .mm-classico i { background: #7b1e2b; border-bottom: 3px solid #b8914a; } .mm-classico em { background: #b8914a; }
.mm-executivo { background: #f1f3f5; } .mm-executivo i { background: #343a40; } .mm-executivo em { background: #343a40; }
.mm-pedra { background: #f3efe8; } .mm-pedra i { background: linear-gradient(90deg, #8d8578, #c9c2b4 60%, #a39a8a); } .mm-pedra em { background: #8d8578; }
.fotos-qtd { display: inline-flex; gap: .4rem; margin: .4rem 0; }
.fotos-qtd label { position: relative; }
.fotos-qtd input { position: absolute; opacity: 0; }
.fotos-qtd span { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border: 2px solid var(--linha, #d9e0e6); border-radius: 10px; background: #fff; font-weight: 700; cursor: pointer; }
.fotos-qtd input:checked + span { background: var(--lapis, #2a6fb0); border-color: var(--lapis, #2a6fb0); color: #fff; }
.fotos-qtd input:focus-visible + span { outline: 2px solid var(--lapis, #2a6fb0); outline-offset: 2px; }

/* fotos do projeto na OS */
.galeria { padding: .7rem .8rem; border-top: 1px solid var(--linha, #e1e7ec); }
.galeria-minis { display: flex; gap: .6rem; overflow-x: auto; padding-bottom: .2rem; }
.galeria-mini { flex: none; display: flex; flex-direction: column; gap: .2rem; align-items: center; padding: .25rem; border: 2px solid var(--linha, #d9e0e6); border-radius: 10px; background: #fff; cursor: zoom-in; font: inherit; font-size: .72rem; color: var(--suave, #5b6b78); }
.galeria-mini img { width: 120px; height: 80px; object-fit: cover; border-radius: 6px; display: block; background: #eef1f4; }
.galeria-mini:hover { border-color: var(--lapis, #2a6fb0); }
.galeria-mini.ativa { border-color: var(--lapis, #2a6fb0); box-shadow: 0 0 0 3px rgba(42,111,176,.18); cursor: zoom-out; }
.galeria-grande { margin: .7rem 0 0; }
.galeria-grande[hidden] { display: none; }
.galeria-grande img { display: block; width: 100%; max-height: 520px; object-fit: contain; border-radius: 10px; background: #eef1f4; cursor: zoom-out; }
.galeria-grande figcaption { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-top: .4rem; font-size: .85rem; color: var(--suave, #5b6b78); }
/* aviso recolhível */
.aviso-precos > summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.aviso-precos > summary::-webkit-details-marker { display: none; }
.aviso-precos > summary::before { content: ""; width: .55rem; height: .55rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; flex: none; }
.aviso-precos[open] > summary::before { transform: rotate(45deg); }
.aviso-precos > summary small { opacity: .75; }
.aviso-qtd { display: inline-grid; place-items: center; min-width: 1.4rem; height: 1.4rem; padding: 0 .35rem; border-radius: 999px; background: rgba(0,0,0,.12); font-weight: 700; font-size: .8rem; }

/* ---- relatórios (listas de orçamentos, produção, preços…): visual unificado ---- */
.busca-larga, .busca { padding: .6rem; background: var(--branco); border: 1px solid var(--linha); border-radius: var(--raio); box-shadow: var(--sombra); }
.tabela-rolagem { border-radius: 14px; }
.tabela thead th { background: linear-gradient(180deg, #f6f8fa, #edf1f4); color: #34495a; font-size: .78rem; letter-spacing: .01em; padding: .8rem 1rem; }
.tabela tbody tr { border-left: 3px solid transparent; }
.tabela tbody tr:hover { background: #f3f8fc; box-shadow: inset 3px 0 0 var(--lapis); }
.tabela td:first-child a { font-weight: 700; text-decoration: none; }
.tabela td:first-child a:hover { text-decoration: underline; }
.tabela .acoes { display: table-cell; }
.tabela .acoes > a, .tabela .acoes-pilha > a {
  display: inline-flex; align-items: center; margin: .12rem .3rem .12rem 0; padding: .28rem .75rem; border: 1px solid var(--linha-forte);
  border-radius: 999px; background: #fff; color: var(--lapis); font-size: .82rem; font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: background .12s, border-color .12s, color .12s;
}
.tabela .acoes > a:hover { background: var(--lapis); border-color: var(--lapis); color: #fff; }
.tabela .acoes > a.perigo { color: #b3261e; border-color: #efc4c0; }
.tabela .acoes > a.perigo:hover { background: #b3261e; border-color: #b3261e; color: #fff; }
.status::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; margin-right: .4rem; opacity: .8; }
.paginacao { display: flex; justify-content: center; align-items: center; gap: 1rem; margin: 1rem 0; }
.paginacao a { padding: .35rem .9rem; border: 1px solid var(--linha-forte); border-radius: 999px; background: #fff; text-decoration: none; font-weight: 600; }
.paginacao a:hover { background: var(--lapis); color: #fff; border-color: var(--lapis); }
.form-empresa .linha-campos { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0 1rem; }
.form-empresa .campo-largo { grid-column: span 2; }
@media (max-width: 640px) { .form-empresa .campo-largo { grid-column: auto; } }

/* edição da empresa: duas colunas com pré-visualização */
.empresa-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.empresa-layout .previa { position: sticky; top: 1rem; background: var(--branco); border: 1px solid var(--linha); border-radius: 14px; box-shadow: var(--sombra); padding: 1rem; }
.previa-topo { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .4rem; }
.previa-topo h2 { margin: 0; }
.previa-nome { font-size: .85rem; font-weight: 700; color: var(--lapis); }
.previa-moldura { position: relative; overflow: hidden; margin-top: .6rem; border: 1px solid var(--linha); border-radius: 10px; background: #e9ecef; min-height: 180px; }
.previa-folha { transform-origin: top left; width: 820px; pointer-events: none; }
.previa-folha > .dica { padding: 1rem; width: 100%; box-sizing: border-box; }
.previa-folha .folha { margin: 0; box-shadow: none; max-width: none; }
@media (max-width: 1100px) { .empresa-layout { grid-template-columns: minmax(0, 1fr); } .empresa-layout .previa { position: static; order: -1; } }
/* campos de escolha (rádio/caixa) não herdam o estilo dos campos de texto */
.form-empresa input[type="checkbox"], .form-empresa input[type="radio"] { width: auto; min-height: 0; padding: 0; margin: 0; box-shadow: none; }
.marcar { display: inline-flex; align-items: center; gap: .45rem; font-weight: 400; font-size: .9rem; cursor: pointer; }
.marcar input { width: 1rem !important; height: 1rem; accent-color: var(--lapis); }
.rotulo-campo { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .35rem; }
.logo-linha { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.logo-caixa { width: 150px; height: 84px; display: grid; place-items: center; background: repeating-conic-gradient(#f2f4f6 0 25%, #fff 0 50%) 0 0 / 14px 14px; border: 1px dashed var(--linha-forte); border-radius: 10px; overflow: hidden; color: var(--texto-suave); font-size: .85rem; }
.logo-caixa img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.logo-acoes { display: flex; flex-direction: column; gap: .4rem; min-width: 0; flex: 1; }
.logo-acoes input[type="file"] { width: 100%; min-height: 0; padding: .35rem; border: 1px solid var(--linha-forte); border-radius: 8px; background: #fff; font-size: .85rem; }
.form-empresa .modelos { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.mapa-marca { fill: rgba(135, 206, 250, .5); stroke: #fff; stroke-width: 1.4; stroke-dasharray: 5 3; vector-effect: non-scaling-stroke; pointer-events: none; }
.mapa-marca-txt { fill: #fff; font-weight: 600; paint-order: stroke; stroke: rgba(10, 50, 90, .8); stroke-width: 2.5px; stroke-linejoin: round; pointer-events: none; }

/* Janela de confirmação (static/js/confirmar.js) */
.lc-modal { border: 0; border-radius: 16px; padding: 1.4rem 1.5rem 1.2rem; width: min(440px, calc(100vw - 2rem)); color: var(--texto); background: var(--branco, #fff); box-shadow: 0 30px 80px -20px rgba(8, 24, 38, .55); }
.lc-modal::backdrop { background: rgba(13, 31, 43, .55); backdrop-filter: blur(2px); }
.lc-modal[open] { display: grid; grid-template-columns: auto 1fr; gap: .2rem 1rem; animation: lc-modal-entra .16s ease-out; }
.lc-modal-icone { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--lapis-claro, #e8f2fa); color: var(--lapis, #1c6db3); }
.lc-modal-icone.perigo { background: var(--erro-fundo, #fdecec); color: var(--erro, #c0392b); }
.lc-modal-corpo h2 { margin: .1rem 0 .35rem; font-size: 1.15rem; line-height: 1.25; }
.lc-modal-corpo p { margin: 0; color: var(--texto-suave, #52626e); line-height: 1.45; }
.lc-modal-acoes { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1.1rem; flex-wrap: wrap; }
.botao-perigo { background: linear-gradient(180deg, #d9534f, #c0392b); border-color: #a5281b; color: #fff; }
.botao-perigo:hover { background: linear-gradient(180deg, #cf4743, #a5281b); }
@keyframes lc-modal-entra { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .lc-modal[open] { animation: none; } }
@media (max-width: 420px) { .lc-modal[open] { grid-template-columns: 1fr; } .lc-modal-acoes .botao { flex: 1; } }

/* Botão "Tutorial desta tela" e a janela com o vídeo (static/js/tutorial.js) */
.lateral-videos { display: flex; align-items: center; gap: .65rem; margin: 0 0 .5rem; padding: .55rem .8rem; font-weight: 600; font-size: .92rem; color: #dbe6ee; text-decoration: none; border-radius: 10px; margin-top: auto; }
.lateral-videos + .lateral-usuario { margin-top: 0; }
.lateral-videos:hover { background: rgba(255, 255, 255, .09); color: #fff; }
.lateral-videos[aria-current="page"] { background: rgba(255, 255, 255, .11); color: #fff; }
.lateral-videos .ic { width: 19px; height: 19px; flex: none; stroke-width: 1.7; }
.lateral-videos:focus-visible { outline: 2px solid var(--bronze, #c89b3c); outline-offset: 2px; }
/* "Tutorial desta tela": item do menu lateral (não flutua sobre os botões das telas) */
.lateral-tutorial { width: 100%; background: none; border: 0; font-family: inherit; text-align: left; cursor: pointer; }
.lateral-tutorial + .lateral-videos { margin-top: 0; }
.barra-tutorial { margin-left: auto; }
.tut-modal { border: 0; border-radius: 16px; padding: 0; width: min(860px, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); color: var(--texto); background: var(--branco, #fff); box-shadow: 0 30px 80px -20px rgba(8, 24, 38, .55); overflow: auto; }
.tut-modal::backdrop { background: rgba(13, 31, 43, .6); backdrop-filter: blur(2px); }
.tut-modal[open] { display: flex; flex-direction: column; gap: .8rem; padding: 1.1rem 1.3rem 1.2rem; }
.tut-modal header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.tut-modal h2 { margin: 0 0 .2rem; font-size: 1.2rem; }
.tut-modal header p { margin: 0; color: var(--texto-suave); }
.tut-modal .tut-video, .tut-modal .tut-sem-video { width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; }
.tut-modal .tut-video { background: #0b1c27; max-height: 48vh; object-fit: contain; }
.tut-modal .tut-sem-video { display: flex; align-items: center; justify-content: center; gap: .8rem; padding: 1rem; text-align: center; color: var(--texto-suave); background: var(--pedra-2); border: 2px dashed var(--linha-forte); }
.tut-modal .tut-passos { margin: 0; padding-left: 1.3rem; display: flex; flex-direction: column; gap: .3rem; line-height: 1.4; font-size: .92rem; }
.tut-modal footer { display: flex; justify-content: flex-end; gap: .6rem; flex-wrap: wrap; }
.tut-modal footer .botao { display: inline-flex; align-items: center; gap: .45rem; width: auto; text-decoration: none; }

.proximos-passos h2 { margin: 0 0 .25rem; font-size: 1.1rem; }
.proximos-passos p { margin: 0 0 .75rem; }

/* painel: atalhos, primeiros passos, últimas OS */
.atalho span { font-size: .88rem; color: var(--texto-suave); line-height: 1.4; }
.atalho strong { display: block; color: var(--texto); font-size: .98rem; margin-bottom: .1rem; }
.atalho svg { flex: none; width: 38px; height: 38px; padding: 8px; border-radius: 10px; background: var(--lapis-claro); color: var(--lapis); }
.painel-titulo { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-top: 1.6rem; }
.painel-titulo a { font-size: .88rem; }
.primeiros-passos { margin: 0 0 1.8rem; border-left: 4px solid var(--bronze); }
.primeiros-passos h2 { margin: 0 0 .25rem; }
.primeiros-passos > p { margin: 0 0 1rem; color: var(--texto-suave); }
.primeiros-passos ol { list-style: none; counter-reset: passo; margin: 0; padding: 0; display: grid; gap: .6rem; }
.primeiros-passos li { counter-increment: passo; }
.primeiros-passos li a { display: flex; flex-direction: column; gap: .1rem; padding: .7rem .9rem .7rem 3rem; position: relative; border: 1px solid var(--linha); border-radius: 10px; text-decoration: none; color: var(--texto); }
.primeiros-passos li a::before { content: counter(passo); position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 50%; background: var(--lapis); color: #fff; display: grid; place-items: center; font-size: .82rem; font-weight: 700; }
.primeiros-passos li a:hover { border-color: var(--lapis); background: var(--lapis-claro); }
.primeiros-passos li span { color: var(--texto-suave); font-size: .86rem; }

.codigos-rec { list-style: none; margin: 1rem 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; }
.codigos-rec code, .cartao code { background: var(--pedra-2); border: 1px solid var(--linha); border-radius: 6px; padding: .3rem .55rem; font-size: .95rem; letter-spacing: .04em; }
.qr-2fa { width: 200px; max-width: 100%; padding: .6rem; background: #fff; border: 1px solid var(--linha); border-radius: 10px; margin: 1rem 0; }
.qr-2fa svg { display: block; width: 100%; height: auto; } .qr-2fa path { fill: #000; }

/* explicação dos níveis de acesso (tela de Usuários) */
.niveis-info { margin: 2rem 0 1rem; }
.niveis-info h2 { font-size: 1.25rem; margin: 0 0 .3rem; }
.niveis-cartoes { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin: 1rem 0 1.2rem; }
.nivel-cartao { background: var(--branco); border: 1px solid var(--linha); border-radius: var(--raio); padding: .9rem 1rem; }
.nivel-cartao h3 { margin: 0 0 .45rem; font-size: 1rem; }
.nivel-cartao p { margin: 0; font-size: .88rem; line-height: 1.5; color: var(--texto-suave); }
.nivel-cartao.destaque { border-color: var(--lapis); box-shadow: 0 0 0 2px rgba(28,109,179,.25); }
.tabela-niveis th[scope="row"] { font-weight: 400; background: none; white-space: normal; min-width: 14rem; }
.tabela-niveis th[scope="row"] small { display: block; color: var(--texto-suave); font-size: .8rem; line-height: 1.4; margin-top: .15rem; }
.tabela .centro { text-align: center; }
.tabela-niveis .sim { color: #1b7a43; font-weight: 700; }
.tabela-niveis .nao { color: #9aa8b3; }
.tabela-niveis .destaque { background: #eaf3fb; }
.niveis-detalhe { margin-top: 1.4rem; }
.niveis-detalhe > summary { cursor: pointer; font-weight: 600; color: var(--lapis); }
.niveis-detalhe .niveis-info { margin-top: 1rem; }

/* usuários ativos/desativados e log de atividades */
.linha-inativa td { color: #7a8892; background: #f6f8f9; }
.selo-ok { background: #e3f4ea; color: #1b6b3a; }
.selo-inativo { background: #eceff1; color: #5b6a74; }
.log-filtros { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); align-items: end; background: var(--branco); border: 1px solid var(--linha); border-radius: var(--raio); padding: 1rem; margin-bottom: 1rem; }
.log-filtros .campo { margin: 0; }
.log-filtros .acoes-filtro { display: flex; gap: .6rem; flex-wrap: wrap; }
.log-os { color: var(--lapis); font-variant-numeric: tabular-nums; }
.tabela .quando { white-space: nowrap; color: var(--texto-suave); }

/* Amostra da pedra do projeto (quadradinho com a textura + nome) e botão "Editar cores" no orçamento */
.amostra-pedra { display: flex; align-items: center; gap: .5rem; margin: 0; padding: .45rem 1rem; font-size: .9rem; background: var(--pedra-2, #f2f4f5); }
.amostra-pedra img, .amostra-pedra i { width: 22px; height: 22px; flex: none; border-radius: 4px; border: 1px solid var(--linha-forte, #c9d3da); object-fit: cover; }
.amostra-pedra i { background: linear-gradient(135deg, #8c959b, #4b5358); }
.botao-pequeno { padding: .3rem .65rem; font-size: .82rem; width: auto; }
.bloco-topo .botao-pequeno { color: #fff; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .45); }
.bloco-topo .botao-pequeno:hover { background: rgba(255, 255, 255, .22); }
@media (max-width: 600px) { .bloco-topo > span { flex-wrap: wrap; gap: .5rem; } .bloco-topo .botao-pequeno { padding: .5rem .8rem; } }
.botao[hidden] { display: none; }

.opcionais { margin-top: .8rem; padding: .7rem .9rem; border: 1px dashed var(--borda, #c9c4bb); border-radius: 8px; }
.opcionais h4 { margin: 0 0 .5rem; font-size: 1rem; }
.opcionais h4 small { font-weight: 400; color: #6b665e; margin-left: .4rem; }
.opcionais-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.opcionais-lista li { display: grid; grid-template-columns: 1fr auto auto; gap: .8rem; align-items: center; }
.opcionais-lista .opcional-incluido { font-weight: 600; }
@media (max-width: 640px) { .opcionais-lista li { grid-template-columns: 1fr auto; } .opcionais-lista li form { grid-column: 1 / -1; } }
