/* ===== Cores (claro por padrão; escuro pelo sistema ou por Ajustes) ===== */
:root {
  --bg: #f3f4f7;
  --card: #ffffff;
  --card-2: #f8f9fb;
  --text: #1c2330;
  --muted: #6b7380;
  --line: #e4e7ec;
  --accent: #5b5bd6;
  --accent-2: #7474ea;
  --accent-ink: #ffffff;
  --accent-soft: #eeeefd;
  --side: #ffffff;
  --side-text: #475569;
  --side-strong: #0f172a;
  --side-hover: #f1f5f9;
  --side-line: #e4e7ec;
  --ok: #15803d; --ok-soft: #e6f6ec;
  --bad: #c42b2b; --bad-soft: #fdecec;
  --info: #0e7490; --info-soft: #e0f4f8;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 4px 14px rgba(16,24,40,.05);
  --shadow-lg: 0 24px 60px rgba(16,24,40,.22), 0 4px 14px rgba(16,24,40,.08);
  --ease: cubic-bezier(.2,.8,.2,1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1318; --card: #181d25; --card-2: #1e242d; --text: #e7eaef; --muted: #98a1ad; --line: #29303a;
    --accent-soft: #26264f; --side: #0a0d11; --side-text: #c4cad4; --side-strong: #ffffff; --side-hover: rgba(255,255,255,.06); --side-line: rgba(255,255,255,.08); --ok: #4ade80; --ok-soft: #12301d; --bad: #f87171; --bad-soft: #3a1717;
    --info: #67d4e8; --info-soft: #0f2e36; --shadow: 0 1px 2px rgba(0,0,0,.3); --shadow-lg: 0 24px 60px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1318; --card: #181d25; --card-2: #1e242d; --text: #e7eaef; --muted: #98a1ad; --line: #29303a;
  --accent-soft: #26264f; --side: #0a0d11; --side-text: #c4cad4; --side-strong: #ffffff; --side-hover: rgba(255,255,255,.06); --side-line: rgba(255,255,255,.08); --ok: #4ade80; --ok-soft: #12301d; --bad: #f87171; --bad-soft: #3a1717;
  --info: #67d4e8; --info-soft: #0f2e36; --shadow: 0 1px 2px rgba(0,0,0,.3); --shadow-lg: 0 24px 60px rgba(0,0,0,.6);
  color-scheme: dark;
}

/* ===== Base ===== */
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 15px/1.5 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased;
}
/* Escala um pouco menor no PC (no celular fica como está) */
@media (min-width: 821px) {
  html { font-size: 14.4px; }
  body { font-size: 14px; }
}
a { color: var(--accent); text-decoration: none; }
h1 { font-size: 1.45rem; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 1.05rem; margin: 0 0 .8rem; }
h3 { font-size: .95rem; margin: 0 0 .5rem; }
.carregando { padding: 3rem; text-align: center; color: var(--muted); }
.carregando::before {
  content: ""; display: block; width: 28px; height: 28px; margin: 0 auto .75rem; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--accent); animation: girar .8s linear infinite;
}

/* ===== Animações ===== */
@keyframes girar { to { transform: rotate(360deg); } }
@keyframes subir { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes aparecer { from { opacity: 0; } to { opacity: 1; } }
@keyframes surgir { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes folha { from { transform: translateY(100%); } to { transform: none; } }
@keyframes tremer { 0%,100% { transform: none; } 20%,60% { transform: translateX(-5px); } 40%,80% { transform: translateX(5px); } }
.main > * { animation: subir .4s var(--ease) both; }
.main > *:nth-child(2) { animation-delay: .04s; }
.main > *:nth-child(3) { animation-delay: .08s; }
.main > *:nth-child(4) { animation-delay: .12s; }
.main > *:nth-child(5) { animation-delay: .16s; }
.main > *:nth-child(n+6) { animation-delay: .2s; }
.tab tbody tr { animation: subir .35s var(--ease) both; }
.tab tbody tr:nth-child(2) { animation-delay: .03s; } .tab tbody tr:nth-child(3) { animation-delay: .06s; }
.tab tbody tr:nth-child(4) { animation-delay: .09s; } .tab tbody tr:nth-child(5) { animation-delay: .12s; }
.tab tbody tr:nth-child(n+6) { animation-delay: .15s; }
.tremer { animation: tremer .4s; border-color: var(--bad) !important; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}

/* ===== Estrutura ===== */
.layout { display: flex; min-height: 100vh; }
.side {
  width: 236px; background: var(--side); color: var(--side-text); padding: 1.1rem .8rem; border-right: 1px solid var(--side-line);
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: .2rem; flex-shrink: 0;
}
.marca { display: flex; align-items: center; gap: .65rem; padding: .25rem .5rem 1.2rem; color: var(--side-strong); font-weight: 650; line-height: 1.25; }
.marca img { width: 36px; height: 36px; object-fit: contain; background: #fff; border-radius: 9px; padding: 3px; }
.marca .ico, .login .marca-l .ico {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent-2), var(--accent)); box-shadow: 0 4px 12px rgba(91,91,214,.35);
}
.nav a {
  position: relative; display: flex; align-items: center; gap: .7rem; padding: .62rem .75rem; border-radius: 10px;
  color: var(--side-text); font-weight: 500; transition: background .2s, color .2s, transform .2s var(--ease);
}
.nav a:hover { background: var(--side-hover); color: var(--side-strong); transform: translateX(2px); }
.nav a.ativo { background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: #fff; box-shadow: 0 6px 16px rgba(91,91,214,.3); }
.nav svg { width: 19px; height: 19px; flex-shrink: 0; }
.side .rodape { margin-top: auto; font-size: .85rem; padding: .75rem .5rem 0; border-top: 1px solid var(--side-line); }
.side .rodape button { background: none; border: 0; color: var(--side-text); padding: .3rem 0; cursor: pointer; font: inherit; text-decoration: underline; }
/* Marca Mais Luz */
:root { --ml-mais: #f2b200; --ml-luz: #252a8c; }
.escuro { --ml-luz: #8e9bff; }
.ml-marca { display: inline-flex; align-items: center; gap: .55rem; line-height: 1; }
.ml-marca img { width: 42px; height: 42px; object-fit: contain; flex-shrink: 0; filter: drop-shadow(0 2px 6px rgba(242,178,0,.25)); }
.ml-txt { display: flex; flex-direction: column; gap: .28rem; }
.ml-txt b { font-family: Rockwell, "Rockwell Extra Bold", "Roboto Slab", Georgia, serif; font-weight: 800; font-size: 1.32rem; letter-spacing: .01em; white-space: nowrap; }
.ml-mais { color: var(--ml-mais); } .ml-luz { color: var(--ml-luz); }
.ml-txt small { font-size: .56rem; letter-spacing: .42em; color: var(--muted); font-weight: 600; padding-top: .28rem; border-top: 1.5px solid var(--line); }
.ml-marca.grande img { width: 64px; height: 64px; }
.ml-marca.grande .ml-txt b { font-size: 1.9rem; }
.ml-marca.grande .ml-txt small { font-size: .72rem; }
.marca .ml-marca { transition: transform .25s var(--ease); }
.marca .ml-marca img { width: 42px; height: 42px; background: none; padding: 0; border-radius: 0; }
.marca:hover .ml-marca { transform: translateX(2px); }
.main { flex: 1; min-width: 0; padding: 1.75rem 2.25rem 3rem; max-width: 1600px; }
.topo { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.topo .acoes { margin-left: auto; display: flex; gap: .5rem; flex-wrap: wrap; }
.voltar {
  display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; padding: .45rem 1.1rem .45rem .75rem; margin-bottom: .9rem;
  border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--text); box-shadow: var(--shadow);
  font-size: 1rem; font-weight: 600; transition: color .2s, border-color .2s, background .2s, transform .15s var(--ease);
}
.voltar svg { width: 20px; height: 20px; flex-shrink: 0; }
.voltar:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.voltar:active { transform: scale(.97); }

.tabbar { display: none; }
@media (max-width: 820px) {
  .side { display: none; }
  .main { padding: 1rem 1rem calc(5.75rem + env(safe-area-inset-bottom)); }
  .tabbar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
    background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: .55rem 0 .5rem; color: var(--muted); font-size: .7rem; font-weight: 500; transition: color .2s; }
  .tabbar a svg { width: 22px; height: 22px; transition: transform .25s var(--ease); }
  .tabbar a.ativo { color: var(--accent); }
  .tabbar a.ativo svg { transform: translateY(-2px) scale(1.08); }
  .topo .acoes { margin-left: 0; width: 100%; }
  .topo .acoes .btn { flex: 1; }
}

/* ===== Componentes ===== */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.2rem 1.3rem; margin-bottom: 1rem; }
.card.p0 { padding: 0; overflow-x: auto; overflow-y: hidden; }
.grid { display: grid; gap: 1rem; }
.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)); }
@media (max-width: 820px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 520px) { .g2, .g3 { grid-template-columns: 1fr; } }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: var(--shadow);
  transition: transform .25s var(--ease), box-shadow .25s; position: relative; overflow: hidden;
}
.stat::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(var(--accent-2), var(--accent)); }
.stat:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(16,24,40,.08); }
.stat .v { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat .l { color: var(--muted); font-size: .85rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card); color: var(--text); padding: .55rem 1rem;
  font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; min-height: 42px;
  transition: transform .15s var(--ease), box-shadow .2s, border-color .2s, background .2s, filter .2s;
}
.btn:hover { border-color: var(--muted); box-shadow: 0 4px 12px rgba(16,24,40,.08); transform: translateY(-1px); }
.btn:active { transform: scale(.97); }
.btn.pri { background: linear-gradient(135deg, var(--accent-2), var(--accent)); border-color: transparent; color: var(--accent-ink); box-shadow: 0 4px 14px rgba(91,91,214,.3); }
.btn.pri:hover { filter: brightness(1.04); box-shadow: 0 8px 20px rgba(91,91,214,.38); }
.btn.perigo { color: var(--bad); }
.btn.perigo:hover { background: var(--bad-soft); border-color: var(--bad); }
.btn.peq { padding: .3rem .65rem; min-height: 34px; font-size: .85rem; }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn svg { width: 17px; height: 17px; }
.btn-ico {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 10px; border: 0; cursor: pointer; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); transition: transform .15s var(--ease), background .2s;
}
.btn-ico:hover { background: var(--accent); color: #fff; transform: rotate(90deg); }
.btn-ico svg { width: 20px; height: 20px; }

label.campo { display: flex; flex-direction: column; gap: .35rem; font-size: .85rem; font-weight: 600; color: var(--muted); min-width: 0; }
label.campo small { font-weight: 400; }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--card); border: 1.5px solid var(--line); border-radius: 10px;
  padding: .55rem .75rem; width: 100%; min-height: 44px; transition: border-color .2s, box-shadow .2s, background .2s;
}
select {
  appearance: none; -webkit-appearance: none; padding-right: 2.2rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a93a0' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .7rem center; background-size: 16px;
}
textarea { min-height: 90px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
input[readonly]:not(.dp-vis) { background: var(--card-2); }
.form { display: grid; gap: .95rem; }
.secao { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin: .6rem 0 -.2rem; border-top: 1px solid var(--line); padding-top: .9rem; }
.check { display: flex; gap: .55rem; align-items: center; font-weight: 500; cursor: pointer; }
.check input { width: 18px; height: 18px; min-height: 0; accent-color: var(--accent); }
.com-botao { display: flex; gap: .5rem; align-items: center; }
.sufixo { position: relative; }
.sufixo input { padding-right: 2.6rem; text-align: right; }
.ocup-dica { grid-column: 2 / -1; margin: auto 0 .4rem; }
@media (max-width: 520px) { .ocup-dica { grid-column: auto; margin: 0; } }
.resid-r { font-size: .82rem; font-weight: 600; color: var(--accent); min-height: 1.1em; }
.sufixo span { position: absolute; right: .8rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 500; pointer-events: none; }
input[type=search] { padding-left: 2.4rem; background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a93a0' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.3-4.3'/%3E%3C/svg%3E") no-repeat .8rem center / 17px; }

/* Segmento (tema) */
.segmento { display: inline-flex; background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: 4px; gap: 4px; flex-wrap: wrap; }
.segmento button { border: 0; background: none; font: inherit; font-weight: 600; color: var(--muted); padding: .45rem 1rem; border-radius: 9px; cursor: pointer; transition: background .2s, color .2s, box-shadow .2s; }
.segmento button.ativo { background: var(--card); color: var(--accent); box-shadow: var(--shadow); }

/* Tabelas */
table.tab { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tab th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: .7rem 1rem; border-bottom: 1px solid var(--line); background: var(--card-2); white-space: nowrap; }
.tab td { padding: .8rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; transition: background .15s; }
.tab tr:last-child td { border-bottom: 0; }
.tab tr.click { cursor: pointer; }
.tab tr.click:hover td { background: var(--accent-soft); }
.num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mut { color: var(--muted); }
.peq-t { font-size: .82rem; }
@media (max-width: 680px) {
  table.tab.resp thead { display: none; }
  table.tab.resp tr { display: block; padding: .8rem 1rem; border-bottom: 1px solid var(--line); }
  table.tab.resp td { display: flex; justify-content: space-between; gap: 1rem; padding: .15rem 0; border: 0; text-align: right; }
  table.tab.resp td::before { content: attr(data-l); color: var(--muted); font-size: .8rem; text-align: left; }
  table.tab.resp td.tit { display: block; font-weight: 600; font-size: 1rem; text-align: left; padding-bottom: .35rem; }
  table.tab.resp td.tit .mut { font-weight: 400; }
  table.tab.resp td.tit::before { content: none; }
  /* Lixeira: no canto de cima à direita do cartão */
  table.tab.resp tr:has(.lixo-l) { position: relative; }
  table.tab.resp tr:has(.lixo-l) td.tit { padding-right: 3rem; }
  table.tab.resp td.col-del { position: absolute; top: .6rem; right: .7rem; padding: 0; width: auto !important; }
  table.tab.resp td.col-del::before { content: none; }
}
/* Busca de CNPJ no cadastro de cliente */
.cnpj-busca { position: relative; }
.cnpj-busca input { padding-right: 2.6rem; }
.cnpj-lupa {
  position: absolute; right: .3rem; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; padding: 0; border: 0; border-radius: 8px;
  background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center;
}
.cnpj-lupa:hover { color: var(--accent); background: var(--accent-soft); }
.cnpj-lupa:disabled { opacity: .5; cursor: default; }
.cnpj-lupa svg { width: 18px; height: 18px; }
.cnpj-msg { display: block; margin-top: -.4rem; font-size: .84rem; font-weight: 500; color: var(--muted); }
.cnpj-msg:empty { display: none; }
.cnpj-msg.ok { color: var(--ok); }
.cnpj-msg.ruim { color: var(--bad); }
.cnpj-msg.busy::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: .4rem; vertical-align: -1px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: girar .8s linear infinite; }
/* Lixeira vermelha para excluir direto da lista */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tab td.col-del, .tab th.col-del { width: 1%; text-align: right; padding-left: .25rem; }
.lixo-l {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--bad) 30%, transparent);
  background: var(--bad-soft); color: var(--bad); cursor: pointer; display: inline-grid; place-items: center;
  transition: background .15s, color .15s, transform .15s var(--ease);
}
.lixo-l svg { width: 18px; height: 18px; }
.lixo-l:hover { background: var(--bad); color: #fff; }
.lixo-l:active { transform: scale(.92); }

.tag { display: inline-block; padding: .15rem .6rem; border-radius: 99px; font-size: .74rem; font-weight: 700; background: var(--card-2); color: var(--muted); }
.tag.orcamento { background: var(--info-soft); color: var(--info); }
.tag.aprovada, .tag.em_andamento { background: var(--accent-soft); color: var(--accent); }
.tag.concluida { background: var(--ok-soft); color: var(--ok); }
.tag.perdida { background: var(--bad-soft); color: var(--bad); }

.vazio { text-align: center; color: var(--muted); padding: 2.25rem 1rem; }
.vazio .btn { margin-top: .8rem; }
.info-l { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1rem; font-size: .92rem; margin: 0; }
.info-l dt { color: var(--muted); }
.info-l dd { margin: 0; }
.obra-dados { position: relative; }
.obra-foto { float: right; width: 96px; height: 96px; object-fit: cover; border-radius: 12px; margin: 0 0 .5rem 1rem; box-shadow: var(--shadow); }

/* Orçamento */
.periodos { display: grid; grid-template-columns: repeat(3, 1fr); gap: .55rem; }
.periodos label {
  border: 2px solid var(--line); border-radius: 12px; padding: .65rem .75rem; cursor: pointer; display: flex; flex-direction: column; gap: .1rem;
  transition: border-color .2s, background .2s, transform .2s var(--ease);
}
.periodos label:hover { transform: translateY(-2px); }
.periodos label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.periodos input { position: absolute; opacity: 0; pointer-events: none; }
.periodos .t { font-size: .8rem; color: var(--muted); font-weight: 600; }
.periodos .v { font-weight: 700; font-variant-numeric: tabular-nums; }
.calc { background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: .85rem 1rem; display: grid; gap: .3rem; font-size: .92rem; }
.calc div { display: flex; justify-content: space-between; gap: 1rem; }
.calc div span:last-child { font-variant-numeric: tabular-nums; }
.calc .tot { border-top: 1px solid var(--line); padding-top: .45rem; margin-top: .2rem; font-weight: 700; font-size: 1.05rem; color: var(--accent); }
.calc .neg span:last-child { color: var(--muted); }
.resumo-tot { display: flex; justify-content: flex-end; gap: 2rem; padding: .9rem 1.1rem; border-top: 1px solid var(--line); flex-wrap: wrap; background: var(--card-2); }
.resumo-tot div { text-align: right; }
.resumo-tot .l { color: var(--muted); font-size: .8rem; }
.resumo-tot .v { font-weight: 700; font-size: 1.15rem; font-variant-numeric: tabular-nums; }

/* ===== Pop-up (modal) ===== */
.modal {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 5vh 1rem; overflow-y: auto;
  background: rgba(15,19,26,.5); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: aparecer .2s ease both;
}
.modal[hidden] { display: none; }
.modal .caixa { background: var(--card); border-radius: 18px; width: 100%; max-width: 620px; box-shadow: var(--shadow-lg); animation: surgir .32s var(--ease) both; overflow: hidden; }
.modal .caixa.larga { max-width: 900px; }
.modal.saindo { animation: aparecer .18s ease reverse both; }
.modal.saindo .caixa { animation: surgir .18s ease reverse both; }
.modal .cab { display: flex; align-items: center; padding: 1.25rem 1.5rem .5rem; }
.modal .cab h2 { margin: 0; font-size: 1.6rem; font-weight: 650; color: var(--accent); letter-spacing: -.01em; }
.modal .cab button {
  margin-left: auto; width: 38px; height: 38px; border-radius: 10px; border: 0; background: none; color: var(--muted); cursor: pointer;
  display: grid; place-items: center; transition: background .2s, color .2s, transform .25s var(--ease);
}
.modal .cab button:hover { background: var(--accent-soft); color: var(--accent); transform: rotate(90deg); }
.modal .cab button svg { width: 22px; height: 22px; }
.modal .caixa > form, .modal .caixa > div:not(.cab) { padding: .75rem 1.5rem 0; }
.modal .rod {
  display: flex; gap: .5rem; justify-content: flex-end; flex-wrap: wrap;
  margin: 1.25rem -1.5rem 0; padding: .9rem 1.5rem; background: var(--card-2); border-top: 1px solid var(--line);
}
@media (max-width: 520px) {
  .modal { padding: 0; align-items: flex-end; }
  .modal .caixa { border-radius: 20px 20px 0 0; max-height: 96vh; overflow-y: auto; animation-name: folha; }
  .modal.saindo .caixa { animation: folha .2s ease reverse both; }
  .modal .cab { position: sticky; top: 0; background: var(--card); z-index: 2; padding: 1rem 1.1rem .4rem; }
  .modal .cab h2 { font-size: 1.3rem; }
  .modal .caixa > form, .modal .caixa > div:not(.cab) { padding: .5rem 1.1rem 0; }
  .modal .rod { position: sticky; bottom: 0; margin: 1.25rem -1.1rem 0; padding: .8rem 1.1rem calc(.8rem + env(safe-area-inset-bottom)); }
  .modal .rod .btn { flex: 1; }
}

/* Abas */
.abas { position: relative; display: flex; background: var(--card-2); border-radius: 12px; padding: 0 .25rem; overflow-x: auto; scrollbar-width: none; margin-bottom: .4rem; }
.abas::-webkit-scrollbar { display: none; }
.abas button {
  border: 0; background: none; font: inherit; font-size: 1rem; color: var(--muted); padding: .8rem 1.3rem; cursor: pointer; white-space: nowrap;
  transition: color .2s;
}
.abas button:hover { color: var(--text); }
.abas button.ativa { color: var(--accent); font-weight: 600; }
.abas-ind { position: absolute; left: 0; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); transition: transform .3s var(--ease), width .3s var(--ease); }
.aba { display: grid; gap: .95rem; animation: subir .3s var(--ease) both; }
.aba[hidden] { display: none; }
.grupo { display: flex; align-items: center; gap: .8rem; color: var(--muted); font-weight: 650; font-size: 1rem; margin-top: .4rem; }
.grupo::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.contador { text-align: right; font-size: .82rem; color: var(--muted); margin-top: -.6rem; }
.dias-loc { margin-top: -.4rem; min-height: 1.2em; font-size: .85rem; }
.dias-loc span { display: inline-block; background: var(--accent-soft); color: var(--accent); padding: .15rem .65rem; border-radius: 99px; font-weight: 600; animation: pop .25s var(--ease) both; }
.dias-loc span.erro { background: var(--bad-soft); color: var(--bad); }
.dica { background: var(--info-soft); color: var(--info); padding: .65rem .85rem; border-radius: 10px; font-size: .88rem; }

/* Formulário com rótulo ao lado (como no pop-up de obra) */
@media (min-width: 700px) {
  .form.h label.campo { display: grid; grid-template-columns: 112px minmax(0,1fr); align-items: center; gap: .75rem; font-size: .95rem; font-weight: 500; color: var(--text); }
  .form.h label.campo > span:first-child { text-align: right; }
  .form.h label.campo:has(textarea) { align-items: start; }
  .form.h label.campo:has(textarea) > span:first-child { padding-top: .6rem; }
  .form.h .grid label.campo { grid-template-columns: auto minmax(0,1fr); }
  .form.h .grid label.campo > span:first-child { min-width: 0; }
  .form.h .grid.g3 > label.campo:nth-child(3n+1) { grid-template-columns: 112px minmax(0,1fr); }
  .form.h .grid.g2 > label.campo:nth-child(2n+1) { grid-template-columns: 112px minmax(0,1fr); }
  .form.h .contador { margin-left: 124px; }
  .form.h .dias-loc { margin-left: 124px; }
  .form.h .dica { margin-left: 124px; }
}

.dur-n { width: 64px; flex-shrink: 0; text-align: center; }
.dur-un { flex: 1; min-width: 118px; }
@media (min-width: 700px) { .periodo-l { grid-template-columns: 1fr 1.25fr 1fr; } }

/* Foto da obra */
.obra-topo { display: grid; grid-template-columns: minmax(0,1fr) 140px; gap: 1.25rem; align-items: start; }
.foto-obra {
  position: relative; width: 140px; height: 140px; border-radius: 14px; overflow: hidden; cursor: pointer; display: block;
  background: var(--card-2); border: 2px dashed var(--line); transition: border-color .2s, transform .2s var(--ease);
}
.foto-obra:hover { border-color: var(--accent); transform: scale(1.02); }
.foto-obra img { width: 100%; height: 100%; object-fit: cover; display: block; animation: aparecer .3s both; }
.foto-vazia { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; color: var(--muted); }
.foto-vazia svg { width: 38px; height: 38px; }
.foto-vazia small { font-size: .78rem; font-weight: 600; }
.foto-vazia[hidden], .foto-obra img[hidden] { display: none; }
.foto-tirar { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 1rem; line-height: 1; cursor: pointer; }
.foto-tirar[hidden] { display: none; }
@media (max-width: 699px) {
  .obra-topo { grid-template-columns: 1fr; }
  .foto-obra { order: -1; width: 100%; height: 140px; }
}

/* ===== Calendário ===== */
.dp-campo { position: relative; }
.dp-vis { cursor: text; padding-right: 2.9rem; font-variant-numeric: tabular-nums; }
.dp-ico {
  position: absolute; right: .3rem; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; padding: 0; border: 0; border-radius: 10px;
  background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; transition: color .2s, background .2s;
}
.dp-ico:hover { background: var(--accent-soft); }
.dp-ico svg { width: 18px; height: 18px; display: block; }
.dp-campo.aberto .dp-vis { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.dp-campo.aberto .dp-ico, .dp-campo:hover .dp-ico { color: var(--accent); }
.dp-pop {
  position: fixed; z-index: 80; width: 300px; background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-lg); overflow: hidden; animation: pop .22s var(--ease) both; user-select: none;
}
.dp-pop.saindo { animation: pop .16s ease reverse both; }
.dp-pop.folha { left: 0 !important; right: 0; bottom: 0; top: auto !important; width: auto; border-radius: 20px 20px 0 0; animation-name: folha; padding-bottom: env(safe-area-inset-bottom); }
.dp-cab { display: flex; align-items: center; gap: .4rem; padding: .6rem; background: linear-gradient(135deg, var(--accent-2), var(--accent)); }
.dp-nav {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(255,255,255,.95); color: var(--accent);
  display: grid; place-items: center; cursor: pointer; transition: transform .2s var(--ease);
}
.dp-nav:hover { transform: scale(1.1); }
.dp-cab select { flex: 1; min-height: 36px; padding: .3rem 2rem .3rem .6rem; font-size: .95rem; font-weight: 600; border: 0; border-radius: 8px; background-color: #fff; color: #1c2330; }
.dp-sem, .dp-dias { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; padding: 0 .5rem; }
.dp-sem { padding-top: .55rem; padding-bottom: .3rem; }
.dp-sem span { text-align: center; font-size: .78rem; font-weight: 700; color: var(--text); }
.dp-dias { padding-bottom: .5rem; }
.dp-dias button {
  aspect-ratio: 1.15; border: 0; border-radius: 6px; font: inherit; font-size: .92rem; font-weight: 600; cursor: pointer; padding: 0 .4rem 0 0;
  text-align: right; color: #fff; background: color-mix(in srgb, var(--accent) 78%, #000 0%);
  transition: transform .15s var(--ease), background .15s, box-shadow .15s; animation: aparecer .25s both;
}
.dp-dias button:hover { transform: scale(1.1); background: var(--accent); box-shadow: 0 4px 10px rgba(91,91,214,.35); z-index: 1; }
.dp-dias button.hoje { background: var(--card); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.dp-dias button.sel { background: #3c3ca8; color: #fff; box-shadow: 0 0 0 2px var(--accent); }
.dp-rod { display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding: .35rem .5rem; }
.dp-rod button { border: 0; background: none; font: inherit; font-weight: 600; color: var(--accent); padding: .4rem .6rem; border-radius: 8px; cursor: pointer; }
.dp-rod button:first-child { color: var(--muted); }
.dp-rod button:hover { background: var(--accent-soft); }
/* Calendário mais compacto no PC */
@media (min-width: 821px) {
  .dp-pop { width: 248px; border-radius: 12px; }
  .dp-cab { padding: .45rem; gap: .3rem; }
  .dp-nav { width: 26px; height: 26px; }
  .dp-nav svg { width: 15px; height: 15px; }
  .dp-cab select { min-height: 30px; font-size: .85rem; padding: .2rem 1.6rem .2rem .5rem; background-position: right .4rem center; }
  .dp-sem, .dp-dias { gap: 2px; padding: 0 .4rem; }
  .dp-sem { padding-top: .4rem; padding-bottom: .2rem; }
  .dp-sem span { font-size: .7rem; }
  .dp-dias { padding-bottom: .4rem; }
  .dp-dias button { font-size: .8rem; padding-right: .3rem; }
  .dp-rod { padding: .2rem .4rem; }
  .dp-rod button { font-size: .85rem; padding: .3rem .5rem; }
}

/* ===== Botão modo claro / escuro ===== */
.tema-sw {
  margin-top: auto; margin-bottom: .6rem; display: flex; align-items: center; gap: .6rem; width: 100%;
  padding: .6rem .75rem; border-radius: 10px; border: 1px solid var(--side-line); background: none; color: var(--side-text);
  font: inherit; font-weight: 500; cursor: pointer; transition: background .2s, color .2s;
}
.tema-sw:hover { background: var(--side-hover); color: var(--side-strong); }
.tema-sw + .rodape { margin-top: 0; }
.tema-txt { flex: 1; text-align: left; }
.tema-ic { position: relative; width: 19px; height: 19px; flex-shrink: 0; }
.tema-ic svg { position: absolute; inset: 0; width: 19px; height: 19px; transition: transform .45s var(--ease), opacity .3s; }
.tema-ic .lua { opacity: 0; transform: rotate(-90deg) scale(.5); }
.escuro .tema-ic .sol { opacity: 0; transform: rotate(90deg) scale(.5); }
.escuro .tema-ic .lua { opacity: 1; transform: none; }
.tema-trilho { width: 36px; height: 20px; border-radius: 99px; background: var(--line); position: relative; flex-shrink: 0; transition: background .25s; }
.tema-trilho span { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .3s var(--ease); }
.escuro .tema-trilho { background: var(--accent); }
.escuro .tema-trilho span { transform: translateX(16px); }
.tema-flut { display: none; }
@media (max-width: 820px) {
  .tema-flut {
    display: grid; place-items: center; position: fixed; top: calc(.7rem + env(safe-area-inset-top)); right: .8rem; z-index: 25;
    width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--text);
    box-shadow: var(--shadow); cursor: pointer; transition: transform .2s var(--ease);
  }
  .tema-flut:active { transform: scale(.9); }
  .main .topo:first-child, .main > .voltar + .topo { padding-right: 3rem; }
  .main > .voltar { margin-right: 3rem; }
}
body, .card, .side, .stat, .kpi, .tabbar, input, .sel-btn { transition: background-color .3s, border-color .3s, color .3s; }

/* ===== Início ===== */
@keyframes encher { from { transform: scaleX(0); } to { transform: none; } }
@keyframes crescer { from { transform: scaleY(0); } to { transform: none; } }
.sel-ano + .sel-btn, .acoes .sel { width: auto; min-width: 100px; }
.logo-m { display: none; }
.ola { min-width: 0; }
.ola h1 { font-size: 1.85rem; }
/* Grade do painel: PC = 3 colunas; tablet = 2; celular = 1 */
.dash { display: grid; gap: 1rem; grid-template-columns: repeat(3, minmax(0,1fr)); align-items: start;
  grid-template-areas: "kpi kpi kpi" "graf graf pend" "eq eq eq" "res res cus" "res res prop"; }
.dash > * { margin: 0; min-width: 0; }
.d-kpi { grid-area: kpi; } .d-graf { grid-area: graf; } .d-pend { grid-area: pend; } .d-cus { grid-area: cus; }
.d-eq { grid-area: eq; } .d-res { grid-area: res; } .d-prop { grid-area: prop; }
.d-graf, .d-pend { align-self: stretch; }
.dash > .card { animation: subir .45s var(--ease) both; }
.d-graf { animation-delay: .05s !important; } .d-pend { animation-delay: .1s !important; } .d-eq { animation-delay: .15s !important; }
.d-cus { animation-delay: .18s !important; } .d-res { animation-delay: .2s !important; } .d-prop { animation-delay: .24s !important; }
.card-cab { display: flex; align-items: center; gap: .75rem; margin-bottom: .9rem; flex-wrap: wrap; }
.card-cab h2 { margin: 0; }
.card-cab > div > h2 { margin-bottom: .1rem; }
.card-cab.pad { padding: 1rem 1.15rem .2rem; margin-bottom: .5rem; }
.card-cab > .link, .card-cab > .btn, .card-cab > .mut { margin-left: auto; }
.card-cab .link { font-size: .85rem; font-weight: 650; color: var(--accent); }
.d-graf { display: flex; flex-direction: column; }
.d-graf .graf { flex: 1; height: auto; min-height: 210px; }
.d-prop .btn.peq { padding: .35rem .5rem; }

/* Resumo: uma faixa só com os 4 números */
.resumo { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; animation: subir .4s var(--ease) both; }
.rk { display: flex; flex-direction: column; gap: .2rem; padding: 1.1rem 1.3rem; min-width: 0; }
.rk + .rk { border-left: 1px solid var(--line); }
.rk .l { display: flex; align-items: center; gap: .45rem; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; color: var(--muted); }
.rk .l::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex-shrink: 0; }
.rk .v { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk .s { font-size: .8rem; color: var(--muted); }
.rk-rec .l::before { background: var(--accent); }
.rk.pos .l::before { background: var(--ok); } .rk.pos .v { color: var(--ok); }
.rk.neg .l::before { background: var(--bad); } .rk.neg .v { color: var(--bad); }
.rk-par .l::before { background: #e0a100; }
.rk-info .l::before { background: var(--info); } .rk-ok .l::before { background: var(--ok); } .rk-cinza .l::before { background: var(--muted); }
.resumo.solto { margin-bottom: 1rem; }

/* ===== Listas (Clientes, Equipamentos, Obras) ===== */
.chip-f.azul i { background: var(--accent); }
.cli { display: flex; align-items: center; gap: .75rem; }
.av { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--accent-2), var(--accent)); }
.lk { color: var(--text); text-decoration: none; border-bottom: 1px dashed var(--line); }
.lk:hover { color: var(--accent); border-color: var(--accent); }
tr.apagado td { opacity: .55; }
.tab-obras .mini-barra { max-width: 160px; margin: .3rem 0 .15rem; }
.tab-obras td:not(.tit), .tab-eqs td.num { white-space: nowrap; }
.tab-cli td, .tab-eqs td, .tab-obras td { vertical-align: middle; }
.tit-obra { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }

/* Anel de conformidade (Início e Calibração) */
.anel { --c: var(--ok); --fundo: var(--card); position: relative; width: 58px; height: 58px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--line) 0); }
.anel::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--fundo); transition: background .2s; }
.anel b { position: relative; font-size: .95rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.anel.aviso { --c: #e0a100; } .anel.ruim { --c: var(--bad); }

/* Precisa de atenção */
.d-pend { display: flex; flex-direction: column; }
.pend-conf { display: flex; align-items: center; gap: .9rem; padding: .7rem .75rem; margin: -.2rem 0 .7rem; border-radius: 12px; background: var(--card-2); color: var(--text); transition: background .2s; }
.pend-conf .anel { --fundo: var(--card-2); }
.pend-conf:hover { background: var(--accent-soft); }
.pend-conf:hover .anel { --fundo: var(--accent-soft); }
.pend-conf > span:last-child { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.pend { list-style: none; margin: 0; padding: 0; display: grid; gap: .2rem; }
.pend-i { display: flex; align-items: center; gap: .75rem; padding: .5rem .55rem; border-radius: 10px; color: var(--text); transition: background .15s, transform .2s var(--ease); }
.pend-i:hover { background: var(--card-2); transform: translateX(2px); }
.pend-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; background: var(--card-2); color: var(--muted); }
.pend-ico svg { width: 18px; height: 18px; }
.pend-i.ruim .pend-ico { background: var(--bad-soft); color: var(--bad); }
.pend-i.aviso .pend-ico { background: color-mix(in srgb, #e0a100 16%, transparent); color: #a15c00; }
.pend-i.info .pend-ico { background: var(--info-soft); color: var(--info); }
.escuro .pend-i.aviso .pend-ico { color: #f5c451; }
.pend-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.pend-t b { font-weight: 650; font-size: .92rem; }
.pend-s { color: var(--muted); } .pend-s svg { width: 16px; height: 16px; display: block; }
.pend-ok { padding: .8rem; border-radius: 10px; background: var(--ok-soft); color: var(--ok); font-weight: 600; }

/* Para onde vão os custos */
.cus-barra { display: flex; gap: 2px; height: 12px; border-radius: 99px; overflow: hidden; margin-bottom: .8rem; background: var(--line); }
.cus-barra span { display: block; height: 100%; min-width: 3px; transform-origin: left; animation: encher .9s var(--ease) both; }
.cus-lista { list-style: none; margin: 0; padding: 0; }
.cus-lista li { display: grid; grid-template-columns: 10px 1fr auto 2.6rem; align-items: center; gap: .6rem; padding: .4rem 0; font-size: .88rem; border-bottom: 1px dashed var(--line); }
.cus-lista li:last-child { border-bottom: 0; }
.cus-lista i { width: 10px; height: 10px; border-radius: 3px; }
.cus-lista b { font-weight: 600; font-variant-numeric: tabular-nums; }
.cus-lista small { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.cc0 { background: #6366f1; } .cc1 { background: #0ea5e9; } .cc2 { background: #14b8a6; } .cc3 { background: #f59e0b; } .cc4 { background: #ef4444; } .cc5 { background: #a855f7; }

/* Obras e equipamentos */
.lp-chips { display: flex; gap: .5rem; flex-wrap: wrap; padding: .1rem 1.15rem .6rem; }
.lp-c { font-size: .8rem; padding: .3rem .75rem; border-radius: 99px; background: var(--card-2); color: var(--muted); }
.lp-c b { font-variant-numeric: tabular-nums; }
.lp-c.pos b { color: var(--ok); } .lp-c.neg b { color: var(--bad); }
.barra-l { display: flex; align-items: center; gap: .5rem; }
.barra-l .mini-barra { margin: 0; flex: none; width: 64px; }
.barra-l > span:last-child { font-size: .8rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.tab-eq td { vertical-align: middle; }
.tab-eq td:not(.tit) { white-space: nowrap; }
.tab-eq td.tit { min-width: 200px; }

/* Tablet / PC pequeno */
@media (max-width: 1180px) {
  .dash { grid-template-columns: repeat(2, minmax(0,1fr)); grid-template-areas: "kpi kpi" "graf graf" "pend cus" "eq eq" "res res" "prop prop"; }
}
@media (max-width: 1000px) {
  .resumo { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .rk:nth-child(3) { border-left: 0; }
  .rk:nth-child(n+3) { border-top: 1px solid var(--line); }
}
/* Celular */
@media (max-width: 820px) {
  .topo-painel { align-items: center; }
  .logo-m { display: block; width: 44px; height: 44px; object-fit: contain; flex-shrink: 0; }
  .topo-painel .ola { flex: 1; padding-right: 3rem; }
  .topo-painel .ola h1 { font-size: 1.5rem; margin: 0; }
  .topo-painel .acoes { display: grid; grid-template-columns: 92px minmax(0,1fr) minmax(0,1fr); gap: .5rem; }
  .topo-painel .acoes .sel, .topo-painel .acoes .sel-btn { min-width: 0; width: 100%; }
  .topo-painel .acoes .btn { padding-left: .5rem; padding-right: .5rem; justify-content: center; }
  .topo-painel .acoes .btn svg { flex-shrink: 0; width: 18px; height: 18px; }
  .main .topo.topo-painel { padding-right: 0; }
  .tab-d .st-col { display: none; }
  .tab-d td { padding: .7rem .9rem; }
  .tab-d .so-m { display: inline-block; margin-top: .3rem; }
  .dash { grid-template-columns: minmax(0,1fr); gap: .75rem; grid-template-areas: "kpi" "pend" "graf" "cus" "eq" "res" "prop"; }
  .rk { padding: .8rem .9rem; }
  .rk .v { font-size: 1.2rem; }
  .rk .l { font-size: .66rem; letter-spacing: .03em; }
  .rk .s { font-size: .74rem; }
  .d-graf .graf { min-height: 150px; height: 150px; gap: 3px; }
  .card-cab .legenda { margin-left: 0; width: 100%; }
}
@media (max-width: 360px) { .rk .v { font-size: 1.05rem; } }
.so-m { display: none; }
.legenda { margin-left: auto; display: flex; gap: .9rem; font-size: .8rem; color: var(--muted); flex-wrap: wrap; }
.legenda i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; }
.lg-r { background: var(--accent); } .lg-p { background: var(--ok); } .lg-n { background: var(--bad); }
.graf { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; height: 200px; }
.graf-m { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.graf-b { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; border-bottom: 1px solid var(--line); }
.graf-b span { width: 40%; max-width: 18px; min-height: 2px; border-radius: 5px 5px 1px 1px; transform-origin: bottom; animation: crescer .8s var(--ease) both; animation-delay: calc(var(--i) * 40ms); }
.b-r { background: linear-gradient(var(--accent-2), var(--accent)); }
.b-p { background: var(--ok); } .b-p.n { background: var(--bad); }
.graf-l { font-size: .72rem; color: var(--muted); }
.txt-ok { color: var(--ok); }
.res-obra dd { text-align: right; font-variant-numeric: tabular-nums; }

/* Ordem de cotação */
.cot-barra { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.cot-atalhos { display: flex; gap: .4rem; flex-wrap: wrap; }
.cot-barra input[type=search] { max-width: 260px; }
.cot-lista { max-height: 340px; overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--line); border-radius: 12px; padding: .3rem; position: relative; }
/* position: relative prende a caixinha invisível dentro do item (sem isso ela esticava a janela inteira) */
.cot-i { position: relative; display: flex; align-items: center; gap: .75rem; padding: .55rem .6rem; border-radius: 9px; cursor: pointer; transition: background .15s; }
.cot-i[hidden] { display: none; }
.cot-i:hover { background: var(--accent-soft); }
.cot-i input { position: absolute; opacity: 0; pointer-events: none; }
.cot-check { width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--line); flex-shrink: 0; display: grid; place-items: center; transition: all .2s var(--ease); }
.cot-i input:checked + .cot-check { background: var(--accent); border-color: var(--accent); }
.cot-i input:checked + .cot-check::after { content: ""; width: 5px; height: 10px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-1px, -1px); }
.cot-i input:focus-visible + .cot-check { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.cot-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cot-cont { font-size: .88rem; color: var(--muted); margin-top: -.4rem; }

/* ===== Responsáveis do cliente ===== */
.resp-lista { display: grid; gap: .6rem; }
.respo { display: flex; gap: .75rem; align-items: center; padding: .7rem; border: 1px solid var(--line); border-radius: 12px; background: var(--card-2); animation: subir .3s var(--ease) both; }
.resp-av { width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--accent-2), var(--accent)); }
.resp-campos { flex: 1; min-width: 0; display: grid; grid-template-columns: 1.2fr 1fr 1fr 1.3fr; gap: .5rem; }
.resp-campos input { min-height: 38px; padding: .4rem .6rem; }
.resp-tirar { flex-shrink: 0; width: 36px; height: 36px; border-radius: 10px; border: 0; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; transition: background .2s, color .2s; }
.resp-tirar:hover { background: var(--bad-soft); color: var(--bad); }
.resp-tirar svg { width: 17px; height: 17px; }
@media (max-width: 760px) { .resp-campos { grid-template-columns: 1fr 1fr; } .respo { align-items: flex-start; } }
@media (max-width: 420px) { .resp-campos { grid-template-columns: 1fr; } .resp-av { display: none; } }

/* ===== Calibração ===== */
.filtros { margin-bottom: 1rem; }
.cal-topo { display: grid; grid-template-columns: minmax(0,2fr) minmax(290px,1fr); gap: 1rem; margin-bottom: 1rem; }
.cal-topo > .card { margin: 0; }
.cal-venc .card-cab { margin-bottom: .5rem; }
/* Gráfico de vencimentos: cada barra é um botão que filtra a lista */
.venc-graf { display: flex; align-items: stretch; gap: 4px; height: 170px; }
.vb { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; padding: 4px 0 3px;
  border: 0; background: none; border-radius: 10px; cursor: pointer; font: inherit; color: var(--text); transition: background .15s, box-shadow .15s; }
.vb:not(:disabled):hover { background: var(--accent-soft); }
.vb:disabled { cursor: default; }
.vb .bb { width: 70%; max-width: 30px; min-height: 3px; border-radius: 6px 6px 2px 2px; background: linear-gradient(var(--accent-2), var(--accent));
  transform-origin: bottom; animation: crescer .7s var(--ease) both; animation-delay: calc(var(--i, 0) * 35ms); }
.vb:disabled .bb { background: var(--line); }
.vb .bv { font-size: .8rem; font-weight: 700; min-height: 1.15em; }
.vb .bl { display: flex; flex-direction: column; align-items: center; line-height: 1.1; font-size: .72rem; color: var(--muted); text-transform: capitalize; }
.vb .bl small { font-size: .6rem; opacity: .8; }
.vb.atual .bl { color: var(--accent); font-weight: 700; }
.vb.atraso .bb { background: linear-gradient(#f87171, var(--bad)); }
.vb.atraso .bl { color: var(--bad); font-weight: 600; }
.vb.on { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); }
.vb.atraso.on { background: var(--bad-soft); box-shadow: inset 0 0 0 1.5px var(--bad); }
.vb-sep { width: 1px; flex-shrink: 0; background: var(--line); margin: 1rem 2px 1.5rem; }
/* Conformidade */
.cal-conf { display: flex; flex-direction: column; gap: .9rem; }
.cc-top { display: flex; align-items: center; gap: 1rem; }
.cc-top h2 { margin: 0 0 .1rem; }
.cal-conf .anel { width: 74px; height: 74px; }
.cal-conf .anel::before { inset: 7px; }
.cal-conf .anel b { font-size: 1.15rem; }
.cc-nums { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .5rem; }
.cc-nums div { display: flex; flex-direction: column; padding: .55rem .7rem; border-radius: 10px; background: var(--card-2); min-width: 0; }
.cc-nums b { font-size: 1.3rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.cc-nums span { font-size: .74rem; color: var(--muted); font-weight: 600; }
.cc-nums .ok b { color: var(--ok); } .cc-nums .ruim b { color: var(--bad); } .cc-nums .info b { color: var(--info); }
.cc-aviso { display: flex; align-items: center; gap: .5rem; margin-top: auto; padding: .55rem .75rem; border-radius: 10px; font-size: .86rem; font-weight: 600; background: var(--bad-soft); color: var(--bad); }
.cc-aviso svg { width: 17px; height: 17px; flex-shrink: 0; }
.cc-aviso.leve { background: color-mix(in srgb, #e0a100 15%, transparent); color: #a15c00; }
.escuro .cc-aviso.leve { color: #f5c451; }
.cc-aviso.ok { background: var(--ok-soft); color: var(--ok); }
/* Filtro por status */
.chips-f { display: flex; gap: .45rem; flex-wrap: wrap; margin-bottom: 1rem; }
.chip-f { display: inline-flex; align-items: center; gap: .45rem; padding: .42rem .8rem; border-radius: 99px; border: 1.5px solid var(--line); background: var(--card);
  color: var(--text); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .18s, border-color .18s, color .18s; }
.chip-f b { color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.chip-f i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.chip-f.ok i { background: var(--ok); } .chip-f.aviso i { background: #e0a100; } .chip-f.ruim i { background: var(--bad); }
.chip-f.ruim2 i { background: #a855f7; } .chip-f.info i { background: var(--info); }
.chip-f:hover { border-color: var(--accent); }
.chip-f.zero { opacity: .5; }
.chip-f.on { background: var(--accent); border-color: var(--accent); color: #fff; opacity: 1; }
.chip-f.on b { color: #fff; }
.chip-f.on i { box-shadow: 0 0 0 2px #fff; }
/* Lista */
.lista-barra { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .9rem 1.1rem; border-bottom: 1px solid var(--line); }
.lista-barra h2 { display: flex; align-items: center; gap: .5rem; margin: 0 auto 0 0; }
.busca { position: relative; display: flex; align-items: center; flex: 1 1 220px; max-width: 320px; }
.busca svg { position: absolute; left: .75rem; width: 17px; height: 17px; color: var(--muted); pointer-events: none; }
.busca input { padding-left: 2.3rem; }
.barra-sel { display: flex; gap: .5rem; flex-wrap: wrap; }
.barra-sel .sel { width: 170px; }
.f-ativos { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; padding: .7rem 1.1rem 0; }
.f-at { display: inline-flex; gap: .4rem; align-items: center; border: 0; border-radius: 99px; padding: .3rem .75rem; background: var(--accent-soft); color: var(--accent); font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; }
.f-at:hover { filter: brightness(.95); }
.link-b { border: 0; background: none; color: var(--muted); font: inherit; font-size: .82rem; cursor: pointer; text-decoration: underline; }
@media (max-width: 1100px) { .cal-topo { grid-template-columns: 1fr; } }
@media (max-width: 820px) {
  .venc-graf { height: 140px; gap: 1px; }
  .vb .bl { font-size: .6rem; } .vb .bv { font-size: .7rem; }
  .vb-sep { margin-left: 1px; margin-right: 1px; }
  .chips-f { flex-wrap: nowrap; overflow-x: auto; margin: 0 -1rem 1rem; padding: 0 1rem .2rem; scrollbar-width: none; }
  .chips-f::-webkit-scrollbar { display: none; }
  .lista-barra { padding: .8rem .9rem; }
  .busca { max-width: none; flex-basis: 100%; }
  .barra-sel { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); }
  .barra-sel .sel { width: auto; }
  .cc-nums b { font-size: 1.1rem; }
}
@media (max-width: 480px) { .barra-sel { grid-template-columns: 1fr 1fr; } .barra-sel .sel:last-child { grid-column: 1 / -1; } }
.eq-nome { font-weight: 600; }
.txt-ruim { color: var(--bad); font-weight: 600; }
.cen { text-align: center !important; }
.lib { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-weight: 800; font-size: .85rem; }
.lib.sim { background: var(--ok-soft); color: var(--ok); }
.lib.nao { background: var(--bad-soft); color: var(--bad); }
.tab-cal td { vertical-align: middle; }
.tab-cal td:not(.tit) { white-space: nowrap; }
.tab-cal td.tit { min-width: 220px; }
.tab-cal td:last-child { white-space: normal; min-width: 130px; }
.cal-cab { display: flex; align-items: center; gap: 1rem; justify-content: space-between; padding: .8rem 1rem; background: var(--card-2); border-radius: 12px; }
.cal-acoes { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.pill { border: 1.5px solid var(--line); background: var(--card); color: var(--text); border-radius: 99px; padding: .35rem .85rem; font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; transition: all .2s var(--ease); }
.pill:hover { border-color: var(--accent); color: var(--accent); }
.pill.ativo { background: var(--accent); border-color: var(--accent); color: #fff; }
.cal-resumo { display: flex; flex-direction: column; gap: .75rem; }
.hist { display: grid; gap: 0; border-left: 2px solid var(--line); margin-left: .5rem; }
.hist-i { position: relative; display: flex; gap: .9rem; align-items: flex-start; padding: .2rem 0 .9rem 1.1rem; animation: subir .3s var(--ease) both; }
.hist-i::before { content: ""; position: absolute; left: -7px; top: .35rem; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--card); }
.hist-d { font-weight: 700; min-width: 86px; font-variant-numeric: tabular-nums; }
.hist-c { flex: 1; min-width: 0; }
.aviso-cal { display: flex; align-items: center; gap: .75rem; padding: .85rem 1.1rem; margin-bottom: 1rem; border-radius: var(--radius); background: var(--bad-soft); color: var(--bad); border: 1px solid color-mix(in srgb, var(--bad) 25%, transparent); transition: transform .2s var(--ease); }
.aviso-cal:hover { transform: translateY(-2px); }
.aviso-cal svg { width: 22px; height: 22px; flex-shrink: 0; }
.aviso-cal .seta { margin-left: auto; font-weight: 700; white-space: nowrap; }
@media (max-width: 820px) { .tabbar a { font-size: .62rem; } }

/* ===== Seletor moderno ===== */
.sel { position: relative; min-width: 0; width: 100%; }
.com-botao .sel { flex: 1; }
.sel > select { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.sel-btn {
  width: 100%; min-height: 44px; display: flex; align-items: center; gap: .5rem; text-align: left; cursor: pointer;
  font: inherit; color: var(--text); background: var(--card); border: 1.5px solid var(--line); border-radius: 10px; padding: .5rem .7rem .5rem .8rem;
  transition: border-color .2s, box-shadow .2s, transform .15s var(--ease);
}
.sel-btn:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.sel-btn:focus-visible, .sel-btn.aberto { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.sel-btn:disabled { opacity: .6; cursor: default; }
.sel-btn.vazio .sel-txt { color: var(--muted); }
.sel-txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sel-chev { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; transition: transform .25s var(--ease), color .2s; }
.sel-chev svg { width: 18px; height: 18px; display: block; }
.sel-btn.aberto .sel-chev { transform: rotate(180deg); color: var(--accent); }
.sel-pop {
  position: fixed; z-index: 85; max-width: min(460px, calc(100vw - 16px)); background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden; animation: pop .2s var(--ease) both; display: flex; flex-direction: column;
}
.sel-pop.saindo { animation: pop .15s ease reverse both; }
.sel-tit { display: none; }
.sel-busca { display: flex; align-items: center; gap: .5rem; padding: .55rem .75rem; border-bottom: 1px solid var(--line); color: var(--muted); }
.sel-busca svg { width: 17px; height: 17px; flex-shrink: 0; }
.sel-busca input { border: 0; min-height: 34px; padding: 0; box-shadow: none !important; background: transparent; }
.sel-lista { list-style: none; margin: 0; padding: .35rem; max-height: 300px; overflow-y: auto; overscroll-behavior: contain; }
.sel-lista li {
  display: flex; align-items: center; gap: .6rem; padding: .62rem .7rem; border-radius: 9px; cursor: pointer;
  transition: background .15s, color .15s, transform .15s var(--ease); animation: subir .22s var(--ease) both; animation-delay: calc(var(--i) * 18ms);
}
.sel-lista li:hover, .sel-lista li.sel-foco { background: var(--accent-soft); }
.sel-lista li:active { transform: scale(.98); }
.sel-lista li.sel-ativo { color: var(--accent); font-weight: 600; }
.sel-lista li.sel-nulo { color: var(--muted); }
.sel-lista li.sel-off { opacity: .45; cursor: default; }
.sel-lista li.sel-nada { color: var(--muted); cursor: default; justify-content: center; }
.sel-op { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sel-op small { color: var(--muted); font-weight: 400; font-size: .8rem; }
.sel-ok { width: 18px; height: 18px; flex-shrink: 0; opacity: 0; transform: scale(.5); transition: opacity .2s, transform .2s var(--ease); }
.sel-ok svg { width: 18px; height: 18px; display: block; }
.sel-ativo .sel-ok { opacity: 1; transform: none; }
.sel-tag { font-size: .7rem; font-weight: 700; padding: .1rem .5rem; border-radius: 99px; white-space: nowrap; background: var(--card-2); color: var(--muted); }
.sel-tag.ok, .st-ok { background: var(--ok-soft); color: var(--ok); }
.sel-tag.aviso, .st-aviso { background: #fff4d6; color: #a15c00; }
.sel-tag.ruim, .st-ruim { background: var(--bad-soft); color: var(--bad); }
.sel-tag.cinza, .st-cinza { background: var(--card-2); color: var(--muted); }
.sel-tag.info, .st-info { background: var(--info-soft); color: var(--info); }
:root[data-theme="dark"] .sel-tag.aviso, :root[data-theme="dark"] .st-aviso { background: #3b2e0c; color: #f5c451; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sel-tag.aviso, :root:not([data-theme="light"]) .st-aviso { background: #3b2e0c; color: #f5c451; } }
@media (max-width: 520px) {
  .sel-pop.folha { left: 0 !important; right: 0; bottom: 0; top: auto !important; max-width: none; min-width: 0 !important; border-radius: 20px 20px 0 0; animation-name: folha; max-height: 75vh; padding-bottom: env(safe-area-inset-bottom); }
  .sel-pop.folha .sel-tit { display: block; padding: 1rem 1.1rem .4rem; font-weight: 700; font-size: 1.05rem; }
  .sel-pop.folha .sel-tit::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: -.4rem auto .7rem; }
  .sel-pop.folha .sel-lista { max-height: none; flex: 1; }
  .sel-pop.folha .sel-lista li { padding: .85rem .8rem; }
}

/* ===== Avisos ===== */
.toast {
  position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); background: var(--text); color: var(--bg);
  padding: .75rem 1.15rem; border-radius: 12px; z-index: 90; font-weight: 500; max-width: calc(100% - 2rem);
  box-shadow: 0 10px 30px rgba(0,0,0,.25); animation: toast .35s var(--ease) both;
}
@keyframes toast { from { opacity: 0; transform: translate(-50%, 20px) scale(.95); } to { opacity: 1; transform: translate(-50%, 0); } }
.toast.erro { background: var(--bad); color: #fff; }
@media (max-width: 820px) { .toast { bottom: calc(5.25rem + env(safe-area-inset-bottom)); } }

/* ===== Login ===== */
.login { min-height: 100vh; display: grid; place-items: center; padding: 1rem;
  background: radial-gradient(1200px 600px at 10% -10%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 60%), var(--bg); }
.login .card { width: 100%; max-width: 410px; padding: 2rem; animation: surgir .45s var(--ease) both; box-shadow: var(--shadow-lg); }
.login .marca-l { display: flex; flex-direction: column; align-items: center; gap: .5rem; margin-bottom: 1.4rem; text-align: center; }
.login .marca-l .ml-marca { margin-bottom: .6rem; }
.side .ml-txt small { color: var(--side-text); border-color: var(--side-line); }
.marca { text-decoration: none; }
.login .marca-l .ico { width: 58px; height: 58px; border-radius: 16px; }
.alerta { background: var(--bad-soft); color: var(--bad); padding: .65rem .85rem; border-radius: 10px; font-size: .9rem; animation: tremer .4s; }
.logo-prev { max-height: 70px; max-width: 220px; border: 1px solid var(--line); border-radius: 8px; padding: 4px; background: #fff; }

/* ===== Resultado gerencial ===== */
.lg-f { background: color-mix(in srgb, var(--accent) 35%, transparent); outline: 1px dashed var(--accent); }
.b-f { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--accent) 45%, transparent) 0 4px, color-mix(in srgb, var(--accent) 20%, transparent) 4px 8px); border: 1px dashed var(--accent); }
.fin-c.alerta-c .v { color: #c98a00; }
.escuro .fin-c.alerta-c .v { color: #f5c451; }
.f-obr .lp { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: .35rem; }
.f-obr .lp span { display: flex; flex-direction: column; gap: .1rem; }
.f-obr .lp b { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.f-obr .lp small { font-size: .72rem; color: var(--muted); }
.f-obr .pos b { color: var(--ok); } .f-obr .neg b { color: var(--bad); }
.mini-barra { display: block; width: 100%; max-width: 140px; height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; margin: .15rem 0 .2rem; }
.mini-barra > span { display: block; height: 100%; border-radius: inherit; background: var(--accent); transform-origin: left; animation: encher .8s var(--ease) both; }
.mini-barra.inv > span { background: linear-gradient(90deg, #e0a100, var(--ok)); }
.tab-eq th { background: transparent; }
.tab-eq td { vertical-align: middle; }
.tab-eq td.tit .sel-tag { font-size: .66rem; padding: .05rem .4rem; vertical-align: 1px; }
.mais-l { padding: .6rem 1.1rem .9rem; text-align: center; border-top: 1px solid var(--line); }
.aviso-mini { display: block; margin: .3rem 1.1rem .5rem; padding: .55rem .8rem; border-radius: 10px; font-size: .84rem; background: color-mix(in srgb, #e0a100 14%, transparent); color: var(--text); }
.aviso-mini:hover { background: color-mix(in srgb, #e0a100 22%, transparent); }
.d-eq .card-cab.pad h2 { margin: 0 0 .15rem; }
.rent-eq { display: grid; gap: .9rem; }
.rent-k { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .6rem; }
.rent-k > div { display: flex; flex-direction: column; gap: .15rem; padding: .75rem .85rem; border: 1px solid var(--line); border-radius: 12px; background: var(--card-2); }
.rent-k .l { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; color: var(--muted); }
.rent-k b { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .rent-k { grid-template-columns: 1fr; } }@media (max-width: 1000px) {
  .tab-eq .col-pc, .tab-eq thead { display: none; }
  .tab-eq .so-m { display: block; }
}

/* ===== Visual C: claro e leve (menu na lateral) ===== */
:root { --bg: #f5f6fa; --line: #e8eaf0; --radius: 18px; --shadow: 0 1px 2px rgba(20,20,60,.03), 0 6px 22px rgba(20,20,60,.05); }
body { font-family: Inter, "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; letter-spacing: -.006em; }
h1 { font-weight: 700; letter-spacing: -.02em; }
.card, .stat { border-color: color-mix(in srgb, var(--line) 55%, transparent); }
.side { border-right-color: transparent; box-shadow: 1px 0 0 var(--side-line); }
.nav a { border-radius: 12px; }
.nav a.ativo { background: var(--accent-soft); color: var(--accent); box-shadow: none; font-weight: 600; }
.escuro .nav a.ativo { color: #b9b9ff; }
.btn, .btn-ico, input, select, textarea, .sel-btn, .tema-sw { border-radius: 12px; }
.btn.pri { background: var(--accent); box-shadow: 0 4px 14px rgba(91,91,214,.28); }
.escuro .btn.pri { background: #6b6be6; }

/* Link-botão (ex.: "Copiar endereço do cliente" na obra) */
.link-btn { display: inline-flex; align-items: center; gap: .4rem; align-self: flex-start; padding: .2rem 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: .92rem; font-weight: 600; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.link-btn svg { width: 16px; height: 16px; }

/* Custo anual + resultado com a diária cobrada (aba Custos do equipamento) */
.calc .calc-t { display: block; margin-top: .7rem; padding-top: .5rem; border-top: 1px dashed var(--line); font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.calc .calc-t:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.calc .tot.txt-ok span, .calc .tot.txt-ruim span { color: inherit; }
.res-l { font-size: .78rem; font-weight: 600; white-space: nowrap; }
.res-l.pos { color: var(--ok); }
.res-l.neg { color: var(--bad); }

/* Veredito do "valor que foi locado" (item do orçamento) */
.calc .veredito { display: block; margin-top: .6rem; padding: .7rem .85rem; border-radius: 12px; font-size: .88rem; line-height: 1.45; }
.calc .veredito b:first-child { display: block; margin-bottom: .2rem; font-size: .95rem; }
.calc .veredito.neg { background: var(--bad-soft); color: var(--bad); }
.calc .veredito.pos { background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ok); }
.calc .veredito span { color: var(--text); }
.card-cab .acoes { display: flex; gap: .5rem; flex-wrap: wrap; }
