:root {
  --navy: #0e2238; --navy-2: #16324f; --navy-3: #234a70;
  --amarelo: #f2b705; --amarelo-2: #ffd24a;
  --fundo: #eef1f4; --papel: #ffffff; --linha: #d5dbe2; --linha-2: #e8ecf0;
  --tinta: #14202c; --tinta-2: #4b5b6b; --tinta-3: #7d8b99;
  --med: #c0392b; --proj: #1f6fb5; --calc: #1e8a5a; --pux: #8a4fbf; --exist: #c0392b;
  --ok: #1e8a5a; --alerta: #b7791f; --erro: #c0392b;
  --num: "Cascadia Mono", Consolas, "SFMono-Regular", Menlo, monospace;
  --raio: 8px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.45 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; color: var(--tinta); background: var(--fundo); }
h2 { font-size: 15px; margin: 0 0 12px; font-weight: 650; letter-spacing: .01em; }
h3 { font-size: 13px; margin: 18px 0 8px; text-transform: uppercase; letter-spacing: .06em; color: var(--tinta-2); }
input, select, button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* marca */
.marca { display: flex; align-items: center; gap: 10px; font-weight: 300; letter-spacing: .08em; font-size: 17px; white-space: nowrap; }
.marca b { color: var(--amarelo); font-weight: 300; }
.marca-icone { width: 28px; height: 28px; background: url("logo.png") center/contain no-repeat; }
.marca.grande { font-size: 26px; justify-content: center; }
.marca.grande .marca-icone { width: 46px; height: 46px; }

/* login — fundo com a socadora, cartão translúcido à esquerda */
.login { --roxo: #6b5ce7; --roxo-2: #5a4bd6; position: relative; min-height: 100vh; overflow: hidden; display: flex; align-items: center;
  padding: 28px clamp(24px, 4vw, 64px); background: #eef0f4; }
.login-foto { position: absolute; top: 0; right: 0; height: 100%; aspect-ratio: 585 / 645; max-width: 100%;
  background: url("fundo_login.jpg") right center / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.55) 18%, #000 38%); mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.55) 18%, #000 38%); }
.login-coluna { position: relative; z-index: 1; width: min(440px, 100%); display: flex; flex-direction: column; gap: 22px; }
.login-faixa { background: rgba(255,255,255,.82); text-align: center; padding: 3px 12px; font-size: 18px; letter-spacing: .04em; color: #4a4f57; font-weight: 400; }
.login-faixa span { color: #8a9099; margin: 0 2px; }
.login-card { background: rgba(255,255,255,.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border-radius: 26px;
  padding: 14px 20px 44px; box-shadow: 0 10px 40px rgba(20,32,44,.08); min-height: 500px; }
.login-abas { display: flex; gap: 12px; margin-bottom: 22px; }
.login-abas button { background: none; border: 0; padding: 8px 12px 6px; font-size: 27px; font-weight: 400; color: #8b919a; cursor: pointer;
  border-bottom: 3px solid transparent; }
.login-abas button.ativa { color: #3d4249; border-bottom-color: var(--roxo); }
.login-abas button:hover { color: #3d4249; }
.login-sub { color: #5e646c; margin: 0 0 14px; font-size: 11.5px; padding-left: 0; }
#form-login, #form-cadastro { display: flex; flex-direction: column; gap: 13px; }
.login-campo { width: 100%; height: 42px; padding: 0 16px; border: 2px solid #e1e4ea; border-radius: 99px; background: rgba(255,255,255,.55);
  font-size: 12px; color: #2b3036; outline: none; transition: border-color .15s, background .15s; }
.login-campo::placeholder { color: #6e747c; }
.login-campo:focus { border-color: var(--roxo); background: #fff; }
.login-senha { position: relative; }
.login-senha .login-campo { padding-right: 46px; }
.olho { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border: 0; cursor: pointer; background: transparent;
  -webkit-mask: var(--olho) center/20px no-repeat; mask: var(--olho) center/20px no-repeat; background-color: #5e646c;
  --olho: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3l18 18'/%3E%3Cpath d='M10.6 10.6a2 2 0 0 0 2.8 2.8'/%3E%3Cpath d='M9.4 5.2A9.8 9.8 0 0 1 12 5c5 0 9 4.5 10 7a13 13 0 0 1-3 4.2M6.3 6.4C4.1 7.8 2.6 10 2 12c1 2.5 5 7 10 7a9.6 9.6 0 0 0 4.4-1'/%3E%3C/svg%3E"); }
.olho.aberto { --olho: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12c1-2.5 5-7 10-7s9 4.5 10 7c-1 2.5-5 7-10 7S3 14.5 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E"); }
.olho:hover { background-color: var(--roxo); }
.login-btn { align-self: center; width: 166px; height: 38px; margin-top: 2px; border: 0; border-radius: 99px; background: var(--roxo); color: #fff;
  font-size: 12px; font-weight: 600; cursor: pointer; box-shadow: 0 4px 10px rgba(107,92,231,.3); transition: background .15s, transform .1s; }
.login-btn:hover { background: var(--roxo-2); }
.login-btn:active { transform: translateY(1px); }
.login-btn:disabled { opacity: .6; cursor: default; }
.login-link { align-self: center; background: none; border: 0; color: #4a4f57; font-size: 11px; cursor: pointer; padding: 4px 8px; margin-top: 4px; }
.login-link:hover { color: var(--roxo); text-decoration: underline; }
.login-msg { min-height: 16px; margin: -4px 4px 0; font-size: 11.5px; color: var(--erro); text-align: center; }
.login-msg:empty { margin: -8px 0 0; min-height: 0; }
.login-msg.ok { color: var(--ok); }
.login-nota { text-align: center; font-size: 11px; color: #6e747c; margin: 0; }
@media (max-width: 760px) { .login-foto { background-position: 70% center; opacity: .45; } .login-coluna { margin: 0 auto; } }
.msg { min-height: 18px; font-size: 12.5px; color: var(--erro); margin: 4px 0 10px; }
.msg.info { color: var(--tinta-2); }

/* topo */
.topo { display: flex; align-items: center; gap: 24px; background: var(--navy); color: #fff; padding: 10px 20px; position: sticky; top: 0; z-index: 5; }
.topo-projeto { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 600; }
.topo-projeto span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topo-acoes { display: flex; align-items: center; gap: 8px; }
.usuario { font-size: 12.5px; opacity: .75; margin: 0 4px 0 10px; }
.topo .btn.fantasma { color: #fff; border-color: rgba(255,255,255,.25); }
.topo .btn.fantasma:hover { background: rgba(255,255,255,.08); }
.pill { font-size: 11.5px; padding: 2px 9px; border-radius: 99px; background: rgba(255,255,255,.12); font-weight: 500; }
.barra .pill, .painel .pill { background: var(--linha-2); color: var(--tinta-2); }

/* abas */
.abas { display: flex; gap: 2px; background: var(--navy-2); padding: 0 16px; position: sticky; top: 52px; z-index: 4; overflow-x: auto; }
.abas button { background: none; border: 0; color: #c9d6e3; padding: 11px 16px 10px; cursor: pointer; border-bottom: 3px solid transparent; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.abas button i { font-style: normal; font-size: 11px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.12); }
.abas button:hover { color: #fff; }
.abas button.ativa { color: #fff; border-bottom-color: var(--amarelo); }
.abas button.ativa i { background: var(--amarelo); color: var(--navy); font-weight: 700; }

main { padding: 18px 20px 40px; }
.painel { background: var(--papel); border: 1px solid var(--linha); border-radius: 10px; padding: 16px 18px; }
.grade-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 16px; }
.grade-2 > * { min-width: 0; }
.campos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.campos .span2 { grid-column: span 2; }
.campos label { font-size: 12px; color: var(--tinta-2); display: flex; flex-direction: column; gap: 4px; }
.campos input, .campos select, .inline select { padding: 7px 10px; border: 1px solid var(--linha); border-radius: 6px; background: #fff; font-size: 13.5px; color: var(--tinta); }
.campos input:focus, .campos select:focus { outline: 2px solid rgba(31,111,181,.25); border-color: var(--proj); }
.campos.compacto { grid-template-columns: 1fr 1fr; margin: 12px 0; }
.linha-acoes { display: flex; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.dica { color: var(--tinta-3); font-size: 12.5px; margin: 0; }

/* botões */
.btn { border: 1px solid var(--linha); background: #fff; padding: 7px 14px; border-radius: 6px; cursor: pointer; font-size: 13px; font-weight: 550; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn:hover { border-color: var(--tinta-3); }
.btn.primario { background: var(--amarelo); border-color: var(--amarelo); color: var(--navy); }
.btn.primario:hover { background: var(--amarelo-2); }
.btn.fantasma { background: transparent; }
.btn.largo { width: 100%; padding: 10px; }
.btn:disabled { opacity: .5; cursor: default; }

/* barra de título */
.barra { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 12px; flex-wrap: wrap; }
.barra-acoes { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--tinta-2); cursor: pointer; }

/* tabelas */
.tabela-rolagem { overflow: auto; max-height: calc(100vh - 210px); border: 1px solid var(--linha); border-radius: 8px; background: #fff; }
.tabela-rolagem.media { max-height: 420px; }
.tabela-rolagem.curta { max-height: 260px; margin-top: 10px; }
table.dados { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13px; }
table.dados th { position: sticky; top: 0; background: #f5f7f9; color: var(--tinta-2); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; text-align: right; padding: 8px 10px; border-bottom: 1px solid var(--linha); white-space: nowrap; z-index: 1; }
table.dados th.esq, table.dados td.esq { text-align: left; }
table.dados td { padding: 0 10px; height: 30px; border-bottom: 1px solid var(--linha-2); text-align: right; font-family: var(--num); font-size: 12.5px; white-space: nowrap; }
table.dados tr:hover td { background: #fafbfc; }
table.dados tr.notavel td { background: #fff8e1; }
table.dados tr.notavel td:first-child { box-shadow: inset 3px 0 0 var(--amarelo); }
table.dados td.edit { padding: 0; }
table.dados td.edit input { width: 100%; height: 29px; border: 0; padding: 0 10px; text-align: right; font-family: var(--num); font-size: 12.5px; background: transparent; }
table.dados td.edit.txt input { text-align: left; font-family: inherit; }
table.dados td.edit input:focus { outline: 2px solid var(--proj); outline-offset: -2px; background: #f2f8ff; }
td.neg { color: var(--erro); }
td.alerta { color: var(--alerta); font-weight: 700; }
td.ok { color: var(--ok); }
.tag { font-family: inherit; font-size: 11px; font-weight: 700; background: var(--amarelo); color: var(--navy); padding: 1px 6px; border-radius: 4px; }

/* alinhamento */
.alinh { display: grid; grid-template-columns: 330px 1fr; gap: 16px; align-items: start; }
.alinh-centro { display: grid; gap: 16px; min-width: 0; grid-template-columns: minmax(0, 1fr); }
.alinh-centro > * { min-width: 0; }
.lateral .campos.compacto { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
.lateral .campos input { min-width: 0; width: 100%; }
.lateral { position: sticky; top: 110px; }
.inline { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--tinta-2); margin-bottom: 10px; }
table.pf { width: 100%; border-collapse: collapse; font-size: 13px; }
table.pf th { font-size: 11px; color: var(--tinta-3); text-transform: uppercase; letter-spacing: .05em; text-align: left; padding: 4px 4px; font-weight: 600; }
table.pf td { padding: 3px 4px; }
table.pf td:first-child { font-weight: 650; width: 54px; }
table.pf input { width: 100%; padding: 5px 8px; border: 1px solid var(--linha); border-radius: 5px; font-family: var(--num); font-size: 12.5px; text-align: right; }
table.pf .sub { font-size: 11px; color: var(--tinta-3); font-family: var(--num); text-align: right; }
.pilha { display: grid; gap: 8px; margin-top: 10px; }
.pilha.duas { grid-template-columns: 1fr 1fr; }
.caixa-resultado { margin-top: 14px; border: 1px solid var(--linha); border-radius: 8px; overflow: hidden; }
.cr-titulo { background: var(--navy); color: #fff; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; padding: 6px 10px; }
.cr-grade { display: grid; grid-template-columns: 1fr auto; font-size: 12.5px; }
.cr-grade div { padding: 5px 10px; border-bottom: 1px solid var(--linha-2); }
.cr-grade div:nth-child(even) { text-align: right; font-family: var(--num); font-weight: 600; }
.cr-grade .destaque { background: #fff8e1; }
.cr-grade .ruim { color: var(--erro); }
.cr-grade .bom { color: var(--ok); }

/* gráficos */
.graf-titulo { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.legenda { display: flex; gap: 14px; font-size: 12px; color: var(--tinta-2); flex-wrap: wrap; }
.legenda span::before { content: ""; display: inline-block; width: 14px; height: 3px; border-radius: 2px; background: var(--c); margin-right: 6px; vertical-align: middle; }
.legenda span.tracejado::before { background: repeating-linear-gradient(90deg, var(--c) 0 4px, transparent 4px 7px); }
.grafico { height: 300px; }
.grafico.baixo { height: 220px; }
.grafico svg { width: 100%; height: 100%; display: block; font-family: "Segoe UI", system-ui, sans-serif; }
.grafico .eixo text { font-size: 11px; fill: var(--tinta-3); }
.grafico .grade line { stroke: var(--linha-2); }
.grafico .zero { stroke: var(--tinta-3); stroke-width: 1; }
.grafico .marca-pn line { stroke: var(--amarelo); stroke-dasharray: 3 3; }
.grafico .marca-pn text { font-size: 10.5px; fill: var(--tinta-2); font-weight: 700; }
.grafico .dica-hover { pointer-events: none; }

/* relatório */
.relatorio { background: #fff; border: 1px solid var(--linha); border-radius: 10px; padding: 28px 32px; max-width: 1100px; }
.rel-cab { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; border-bottom: 2px solid var(--navy); padding-bottom: 12px; margin-bottom: 16px; }
.rel-cab .marca { color: var(--navy); font-size: 18px; }
.rel-cab h1 { font-size: 16px; margin: 0; text-align: center; }
.rel-cab .rel-data { font-size: 12px; color: var(--tinta-2); text-align: right; }
.rel-info { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px 16px; font-size: 12px; margin-bottom: 18px; }
.rel-info b { color: var(--tinta-2); font-weight: 600; margin-right: 4px; }
.relatorio h2 { font-size: 13.5px; background: var(--navy); color: #fff; padding: 6px 10px; margin: 22px 0 0; border-radius: 4px 4px 0 0; }
.relatorio table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.relatorio th, .relatorio td { border: 1px solid #c9d1d9; padding: 3px 6px; text-align: right; font-family: var(--num); }
.relatorio th { background: #eef2f6; font-family: inherit; font-size: 10.5px; text-transform: uppercase; }
.relatorio td.esq, .relatorio th.esq { text-align: left; }
.relatorio tr.notavel td { background: #fff3c4; font-weight: 700; }
.relatorio tr.inteira td { font-weight: 700; }
.colunas-rel { columns: 3; column-gap: 14px; }
.colunas-rel.duas { columns: 2; }
.colunas-rel table { break-inside: auto; }
.rel-rodape { margin-top: 26px; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; font-size: 11.5px; }
.rel-rodape div { border-top: 1px solid var(--tinta); padding-top: 4px; text-align: center; }

/* diálogos */
dialog { border: 0; border-radius: 12px; padding: 22px; width: min(560px, 92vw); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(8,23,42,.55); }
.lista-projetos { max-height: 50vh; overflow: auto; border: 1px solid var(--linha); border-radius: 8px; }
.lista-projetos button { display: flex; justify-content: space-between; width: 100%; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--linha-2); background: #fff; cursor: pointer; text-align: left; }
.lista-projetos button:hover { background: #f5f8fb; }
.lista-projetos small { color: var(--tinta-3); }
.lista-vazia { padding: 18px; color: var(--tinta-3); text-align: center; }
.toast { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 10px 18px; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.25); font-size: 13px; z-index: 50; max-width: 80vw; }
.toast.erro { background: var(--erro); }

@media (max-width: 1100px) { .alinh { grid-template-columns: 1fr; } .lateral { position: static; } }

@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff; }
  .topo, .abas, .barra, .aba:not(#aba-relatorios), #toast { display: none !important; }
  main { padding: 0; }
  #aba-relatorios { display: block !important; }
  .relatorio { border: 0; padding: 0; max-width: none; }
  .relatorio h2 { -webkit-print-color-adjust: exact; print-color-adjust: exact; break-after: avoid; }
  .relatorio th, .relatorio tr.notavel td { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .quebra { break-before: page; }
}

/* administração */
.topo .badge { margin-left: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--amarelo); color: var(--navy); font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; }
.topo .btn.fantasma.ativo { background: rgba(255,255,255,.14); border-color: var(--amarelo); }
.abas.apagada button.ativa { border-bottom-color: transparent; }
.adm { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
.campos.uma { grid-template-columns: 1fr; }
.campos.uma .msg { margin: 0; }
#tab-usuarios td { font-family: inherit; height: 40px; }
#tab-usuarios td.acoes { display: flex; gap: 6px; align-items: center; }
#tab-usuarios select { padding: 4px 8px; border: 1px solid var(--linha); border-radius: 6px; background: #fff; font-size: 12.5px; }
.btn.mini { padding: 3px 10px; font-size: 12px; }
.btn.mini.ok { border-color: var(--ok); color: var(--ok); }
.btn.mini.ok:hover { background: #eaf6f0; }
.btn.mini.perigo { border-color: #e6b3ad; color: var(--erro); }
.btn.mini.perigo:hover { background: #fdf0ee; border-color: var(--erro); }
.tag { font-size: 11.5px; padding: 2px 9px; border-radius: 99px; font-weight: 600; background: var(--linha-2); color: var(--tinta-2); }
.tag.perfil-master { background: var(--navy); color: var(--amarelo); }
.tag.perfil-admin { background: #e3ecf7; color: var(--proj); }
.tag.sit-ativo { background: #e4f4ec; color: var(--ok); }
.tag.sit-pendente { background: #fff1c7; color: #8a6200; }
.tag.sit-bloqueado { background: #fbe6e3; color: var(--erro); }
.voce { font-size: 11px; color: var(--tinta-3); font-weight: 400; }
@media (max-width: 1000px) { .adm { grid-template-columns: 1fr; } }

/* tabela de socadoras com a máquina ao fundo */
.tabela-rolagem.fundo-soc { background:
  linear-gradient(rgba(255,255,255,.62), rgba(255,255,255,.62)),
  url("fundo_socadoras.jpg") center 58% / cover no-repeat #fff; }
.fundo-soc table.dados tr:hover td { background: rgba(255,255,255,.55); }
.fundo-soc table.dados tr.notavel td { background: rgba(255,244,205,.78); }
.fundo-soc table.dados td.edit input { background: transparent; }

/* repositório de projetos */
.abas .aba-repo { margin-left: auto; color: #fff; }
.abas .aba-repo .ico-pasta { width: 16px; height: 14px; background: var(--amarelo); border-radius: 2px 3px 3px 3px; position: relative; }
.abas .aba-repo .ico-pasta::before { content: ""; position: absolute; left: 0; top: -3px; width: 7px; height: 4px; background: var(--amarelo); border-radius: 2px 2px 0 0; }
.abas .aba-repo:not(.ativa) { background: rgba(255,255,255,.06); }
.repo { display: grid; grid-template-columns: 1fr 320px; gap: 16px; align-items: start; }
.repo .tabela-rolagem { max-height: calc(100vh - 250px); }
#tab-repo td { font-family: inherit; height: 42px; }
#tab-repo td.acoes { display: flex; gap: 6px; align-items: center; }
.repo-vazio { padding: 28px 16px !important; height: auto !important; color: var(--tinta-2); white-space: normal !important; }
.busca { padding: 7px 12px; border: 1px solid var(--linha); border-radius: 6px; min-width: 240px; background: #fff; }
.contatos { list-style: none; margin: 0 0 14px; padding: 0; border: 1px solid var(--linha); border-radius: 8px; max-height: 300px; overflow: auto; }
.contatos li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--linha-2); }
.contatos li:last-child { border-bottom: 0; }
.contatos li div { min-width: 0; display: flex; flex-direction: column; }
.contatos li b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.contatos li small { color: var(--tinta-3); overflow: hidden; text-overflow: ellipsis; }
.contatos li.vazio { color: var(--tinta-3); font-size: 13px; }
.envio-status { font-size: 12px; color: var(--alerta); margin: 14px 0 0; padding: 8px 10px; background: #fff8e8; border-radius: 6px; }
.envio-status.ok { color: var(--ok); background: #eaf6f0; }
.msg.ok { color: var(--ok); }
.adm-esq { display: flex; flex-direction: column; gap: 16px; }
#dlg-enviar textarea { padding: 7px 10px; border: 1px solid var(--linha); border-radius: 6px; font: inherit; resize: vertical; }
.env-lista { display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow: auto; padding: 8px 10px; border: 1px solid var(--linha); border-radius: 8px; }
.env-lista .check span { color: var(--tinta-3); }
@media (max-width: 1100px) { .repo { grid-template-columns: 1fr; } }

/* versão TRIAL */
.selo-trial { font-style: normal; margin-left: 10px; font-size: 11px; font-weight: 700; letter-spacing: .1em; color: #fff; background: #6b5ce7; padding: 2px 8px; border-radius: 99px; vertical-align: 2px; }
.topo .pill.trial { border: 0; cursor: pointer; background: var(--amarelo); color: var(--navy); font-weight: 700; }
.topo .pill.trial.travado { background: var(--erro); color: #fff; }
.dlg-trial { padding: 0; width: min(560px, 92vw); overflow: hidden; }
.trial-arte { position: relative; height: 210px; background: linear-gradient(180deg, rgba(14,34,56,.15), rgba(14,34,56,.75)), url("fundo_socadoras.jpg") center 55% / cover; }
.trial-cadeado { position: absolute; left: 50%; top: 50%; width: 92px; height: 92px; transform: translate(-50%, -46%); border-radius: 50%; background: var(--amarelo); box-shadow: 0 10px 30px rgba(0,0,0,.35);
  -webkit-mask: none; }
.trial-cadeado::before { content: ""; position: absolute; inset: 0; background: var(--navy);
  -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%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3Ccircle cx='12' cy='16' r='1.2' fill='black'/%3E%3C/svg%3E") center / 46px 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%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3Ccircle cx='12' cy='16' r='1.2' fill='black'/%3E%3C/svg%3E") center / 46px no-repeat; }
.trial-selo { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); color: #fff; font-weight: 700; letter-spacing: .18em; font-size: 12px; background: rgba(107,92,231,.92); padding: 4px 14px; border-radius: 99px; }
.trial-texto { padding: 20px 26px 24px; text-align: center; }
.trial-texto h2 { font-size: 19px; margin-bottom: 8px; }
.trial-texto p { color: var(--tinta-2); margin: 0 0 12px; }
.trial-email { background: var(--fundo); border-radius: 8px; padding: 10px; }
.trial-email a { font-size: 16px; font-weight: 700; color: var(--proj); }
.linha-acoes.centro { justify-content: center; }
a.btn { text-decoration: none; color: inherit; }
a.btn.primario { color: var(--navy); }
.campos label.check { flex-direction: row; align-items: center; gap: 8px; font-size: 13px; color: var(--tinta); }
.env-lista label.check { justify-content: flex-start; }
#form-smtp > .dica { margin-bottom: 4px; }

/* 0.4 */
.versao-app { font-size: 11px; font-weight: 600; opacity: .65; margin-left: 8px; letter-spacing: .04em; }
#topo-salvo.ok { background: #1f7a4d; color: #fff; }
td.edit.interp input { font-style: italic; color: #8a6d00; }
td.edit.interp { background: #fff8dc; }
.tab-pux th { white-space: normal; line-height: 1.15; vertical-align: bottom; }
#dlg-offline h2 { margin-top: 0; color: var(--erro); }

/* 0.5: coluna "Ponto notável" no relatório; tabelas em colunas cabem na largura da coluna */
.colunas-rel table { table-layout: fixed; }
.colunas-rel th { white-space: normal; line-height: 1.15; vertical-align: bottom; padding: 3px 3px; font-size: 9px; text-transform: none; overflow-wrap: normal; hyphens: manual; }
.colunas-rel td { padding: 2px 4px; font-size: 11px; overflow: hidden; }
.relatorio td.pn { color: #6b4e00; white-space: normal; overflow-wrap: anywhere; }
.tab-pux col.c-est { width: 11%; } .tab-pux col.c-km { width: 15%; } .tab-pux col.c-pn { width: 14%; }
.tab-soc col.c-est { width: 15%; } .tab-soc col.c-km { width: 25%; } .tab-soc col.c-pn { width: 18%; }
.campos label.sentido select { font-weight: 600; }

/* 0.6: corda travada pelo intervalo */
.campos input.travado { background: #eef2f6; color: var(--tinta-2); cursor: not-allowed; font-weight: 600; }
.campos label small.trava { font-size: 10.5px; color: var(--tinta-3); font-weight: 400; }

/* 0.7: deflexão por metro nas espirais */
.relatorio table.tab-defl { margin: 0 0 12px; width: auto; min-width: 70%; }
.tab-defl th { white-space: normal; text-transform: none; font-size: 10px; max-width: 150px; vertical-align: bottom; }
.relatorio table.tab-defl th:not(:first-child), .relatorio table.tab-defl td:not(:first-child) { text-align: center; }

/* online: empresas e minha senha */
.adm-dir { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
#tab-empresas select, #tab-empresas input.emp-lim { padding: 3px 6px; border: 1px solid var(--linha); border-radius: 5px; font-size: 12.5px; }
#tab-empresas input.emp-lim { width: 64px; text-align: right; }
#tab-empresas tr.emp-bloq td { background: #fdecec; }

/* ======== tela de abertura (online): branca, só o logo ======== */
.inicio { min-height: 100vh; display: flex; flex-direction: column; background: #fff; color: var(--navy); }
.inicio-centro { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 24px; }
.inicio-logo { width: min(620px, 86vw); height: auto; }
.inicio-produto { margin: 34px 0 40px; font-size: 15px; letter-spacing: .18em; color: #1257b8; font-weight: 600; }
.inicio-produto span { display: block; margin-top: 8px; letter-spacing: .02em; font-weight: 400; font-size: 16px; color: var(--tinta-2); }
.inicio-cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.inicio-btn { min-width: 170px; padding: 12px 26px; border-radius: 6px; border: 1px solid #1257b8; background: #1257b8; color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; }
.inicio-btn:hover { background: #0d47a1; border-color: #0d47a1; }
.inicio-btn.leve { background: #fff; color: #1257b8; }
.inicio-btn.leve:hover { background: #f1f6fd; }
.inicio-btn:focus-visible, .inicio-rodape a:focus-visible, .login-voltar:focus-visible { outline: 3px solid #2f9cf4; outline-offset: 2px; }
.inicio-rodape { padding: 20px; text-align: center; font-size: 13px; }
.inicio-rodape a { color: var(--tinta-3); text-decoration: none; }
.inicio-rodape a:hover { color: var(--tinta-2); text-decoration: underline; }
@media (prefers-reduced-motion: no-preference) {
  .inicio:not([hidden]) .inicio-centro > * { animation: inicio-surgir .7s ease both; }
  .inicio:not([hidden]) .inicio-produto { animation-delay: .15s; }
  .inicio:not([hidden]) .inicio-cta { animation-delay: .3s; }
}
@keyframes inicio-surgir { from { opacity: 0; } to { opacity: 1; } }
.login-voltar { position: relative; z-index: 1; align-self: flex-start; background: none; border: 0; color: var(--tinta-2); cursor: pointer; padding: 4px 0; font-size: 14px; }
.login-voltar:hover { color: var(--navy); text-decoration: underline; }

/* ===================================================================== celular e tablet (0.9)
   No computador nada muda. Em telas estreitas: uma coluna, topo compacto com os botões rolando de lado,
   tabelas com rolagem só dentro delas, gráficos mais baixos e relatório em uma coluna. */
dialog { max-height: 92dvh; overflow: auto; }
@media (max-width: 900px) {
  .grade-2 { grid-template-columns: minmax(0, 1fr); }
  .relatorio { overflow-x: auto; }
}
@media (max-width: 760px) {
  body { font-size: 15px; }
  /* topo: marca + projeto na 1ª linha, botões numa faixa que rola de lado */
  .topo { position: static; flex-wrap: wrap; gap: 8px 12px; padding: 10px 12px; }
  .topo .marca > span:not(.marca-icone), .versao-app { display: none; }
  .topo-projeto { flex: 1 1 0; font-size: 14px; }
  .topo-acoes { order: 3; width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .topo-acoes::-webkit-scrollbar { display: none; }
  .topo-acoes .btn { flex: 0 0 auto; padding: 9px 14px; }
  .topo-acoes .usuario { flex: 0 0 auto; margin: 0 6px; }
  .abas { top: 0; padding: 0 6px; scrollbar-width: none; }
  .abas::-webkit-scrollbar { display: none; }
  .abas button { padding: 12px 12px 11px; }
  .abas .aba-repo { margin-left: 0; }
  main { padding: 12px 10px 32px; }
  .painel { padding: 14px 12px; border-radius: 8px; }
  /* formulários em uma coluna, campos com 16px (o iPhone não dá zoom ao tocar) */
  .campos, .campos.compacto { grid-template-columns: minmax(0, 1fr); }
  .campos .span2 { grid-column: auto; }
  .campos input, .campos select, .inline select, .busca, #dlg-enviar textarea { font-size: 16px; padding: 10px 12px; }
  .login-campo { font-size: 16px; height: 46px; }
  .btn { padding: 10px 14px; font-size: 14px; }
  .btn.mini { padding: 7px 10px; font-size: 13px; }
  .barra { align-items: stretch; }
  .barra-acoes { width: 100%; }
  .barra-acoes .btn { flex: 1 1 auto; }
  .busca { min-width: 0; width: 100%; }
  /* tabelas: rolam dentro da caixa; células editáveis maiores para o dedo */
  .tabela-rolagem { max-height: 70vh; -webkit-overflow-scrolling: touch; }
  .tabela-rolagem.media { max-height: 60vh; }
  table.dados td { height: 38px; }
  table.dados td.edit input { height: 37px; font-size: 16px; min-width: 84px; }
  table.dados td.edit.txt input { min-width: 150px; }
  /* alinhamento / nivelamento: painel de comandos em cima, gráficos embaixo */
  .lateral { position: static; }
  .pilha.duas { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  table.pf input { font-size: 16px; padding: 8px; }
  .grafico { height: 230px; }
  .grafico.baixo { height: 180px; }
  /* repositório e administração */
  .repo, .adm { grid-template-columns: minmax(0, 1fr); }
  #tab-repo td.acoes, #tab-usuarios td.acoes { gap: 6px; }
  /* relatório na tela (a impressão continua igual) */
  .relatorio { padding: 14px 12px; border-radius: 8px; }
  .rel-cab { grid-template-columns: 1fr; gap: 8px; text-align: left; }
  .rel-cab h1 { text-align: left; font-size: 15px; }
  .rel-cab .rel-data { text-align: left; }
  .rel-info { grid-template-columns: minmax(0, 1fr); }
  .colunas-rel, .colunas-rel.duas { columns: 1; }
  .relatorio table.tab-defl { min-width: 0; width: 100%; }
  .rel-rodape { grid-template-columns: 1fr; gap: 28px; }
  /* janelas e avisos */
  dialog { padding: 18px 16px; width: 94vw; }
  .toast { top: 12px; max-width: 92vw; text-align: center; }
  .linha-acoes .btn { flex: 1 1 auto; }
}
@media print { .relatorio { overflow: visible !important; } }
