/* Layout: barra escura cor de PEAD + papel claro levemente esverdeado.
   Campo: alvos grandes, uma coluna. Escritório: painéis densos, tabelas e calendário.
   Convenção do cronograma da Geomarca: previsto azul, realizado verde, projeção laranja, hoje amarelo. */
:root {
  --bg: #F1F4EF; --surface: #FFFFFF; --surface-2: #EAEFE7; --surface-3: #DDE5D9;
  --line: #D2DBCE; --line-2: #B4C1AF;
  --fg: #16211A; --fg-2: #3E4C43; --fg-3: #67756B;
  --brand: #6EBA6A; --accent: #2B7A30; --accent-2: #1E5F24; --accent-soft: #DDEFDA; --on-accent: #FFFFFF;
  --ink: #17201B; --ink-2: #212C25; --ink-3: #2C3931; --ink-line: #3A4840; --on-ink: #EAF2E9; --on-ink-2: #A3B4A7;
  --plan: #3A74C0; --plan-soft: #DCE7F6; --real: #2F8F3A; --real-soft: #DCF0DE; --proj: #C26A00; --proj-soft: #FCE8D0; --hoje: #D9A800;
  --rain: #2C69AA; --rain-soft: #E1EBF7; --cli: #8A3FA0; --cli-soft: #F3E4F7;
  --pos: #1F7A35; --pos-soft: #DBF0DF; --neg: #B42318; --neg-soft: #FBE3DF; --warn: #925400; --warn-soft: #FFF0D0;
  --shadow: 0 1px 2px rgba(22, 33, 26, .06), 0 10px 28px rgba(22, 33, 26, .09);
  --r: 12px; --r-s: 8px;
  --f-ui: 'Barlow', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --f-cond: 'Barlow Semi Condensed', 'Barlow', 'Arial Narrow', system-ui, sans-serif;
  --gut: max(16px, env(safe-area-inset-left, 0px));
  --gut-r: max(16px, env(safe-area-inset-right, 0px));
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1411; --surface: #161E19; --surface-2: #1C2620; --surface-3: #25312A;
    --line: #2C3832; --line-2: #3E4C44;
    --fg: #E6EEE7; --fg-2: #B3C2B7; --fg-3: #87988C;
    --brand: #7CC878; --accent: #79C574; --accent-2: #9AD995; --accent-soft: #1D3320; --on-accent: #0D1A0F;
    --ink: #0A0F0C; --ink-2: #121914; --ink-3: #1A231D; --ink-line: #2A362F; --on-ink: #E6EEE7; --on-ink-2: #93A598;
    --plan: #7DACEB; --plan-soft: #1A2A40; --real: #6FCB79; --real-soft: #17321C; --proj: #F0A24A; --proj-soft: #3A2A14; --hoje: #F0C93A;
    --rain: #7FAEE6; --rain-soft: #172638; --cli: #CB8EE6; --cli-soft: #2E1C35;
    --pos: #6FD38A; --pos-soft: #14301C; --neg: #FF8D7E; --neg-soft: #3A1915; --warn: #F2B457; --warn-soft: #3A2A10;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 28px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E1411; --surface: #161E19; --surface-2: #1C2620; --surface-3: #25312A;
  --line: #2C3832; --line-2: #3E4C44;
  --fg: #E6EEE7; --fg-2: #B3C2B7; --fg-3: #87988C;
  --brand: #7CC878; --accent: #79C574; --accent-2: #9AD995; --accent-soft: #1D3320; --on-accent: #0D1A0F;
  --ink: #0A0F0C; --ink-2: #121914; --ink-3: #1A231D; --ink-line: #2A362F; --on-ink: #E6EEE7; --on-ink-2: #93A598;
  --plan: #7DACEB; --plan-soft: #1A2A40; --real: #6FCB79; --real-soft: #17321C; --proj: #F0A24A; --proj-soft: #3A2A14; --hoje: #F0C93A;
  --rain: #7FAEE6; --rain-soft: #172638; --cli: #CB8EE6; --cli-soft: #2E1C35;
  --pos: #6FD38A; --pos-soft: #14301C; --neg: #FF8D7E; --neg-soft: #3A1915; --warn: #F2B457; --warn-soft: #3A2A10;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 28px rgba(0, 0, 0, .45);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--f-ui); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--ink); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.num, td.n, .tab-num { font-variant-numeric: tabular-nums; }
h1, h2, h3, h4 { font-family: var(--f-cond); margin: 0; line-height: 1.15; text-wrap: balance; letter-spacing: .005em; }
h1 { font-size: 26px; font-weight: 700; }
h2 { font-size: 21px; font-weight: 700; }
h3 { font-size: 17px; font-weight: 600; }
h4 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--fg-3); }
p { margin: 0; }
a { color: var(--accent); }
small, .muted { color: var(--fg-3); }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- topo ---------- */
.topo { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: var(--ink); color: var(--on-ink); border-bottom: 1px solid var(--ink-line); }
.topo-in { display: flex; align-items: center; gap: 12px; min-height: 56px; padding-block: 6px; padding-left: var(--gut); padding-right: var(--gut-r); }
.marca { display: flex; align-items: center; gap: 10px; min-width: 0; background: none; border: 0; padding: 0; color: inherit; text-align: left; }
.marca-g { width: 30px; height: 30px; flex: none; border-radius: 8px; background: var(--brand); display: grid; place-items: center; color: #0F2412; font-family: var(--f-cond); font-weight: 700; font-size: 18px; }
.marca-t { display: flex; flex-direction: column; min-width: 0; }
.marca-t b { font-family: var(--f-cond); font-size: 17px; font-weight: 700; letter-spacing: .01em; white-space: nowrap; }
.marca-t span { font-size: 12px; color: var(--on-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topo-esp { flex: 1; }
.topo-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px; border-radius: 9px; background: var(--ink-3); border: 1px solid var(--ink-line); color: var(--on-ink); font-size: 13px; font-weight: 600; white-space: nowrap; }
.topo-btn svg { width: 18px; height: 18px; }
.topo-btn.voltar { padding: 0 10px 0 6px; }
.sync { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--on-ink-2); white-space: nowrap; }
.sync i { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); display: inline-block; }
.sync.off i { background: #E0A43B; }
.sync.erro i { background: #F07563; }
.sync.go i { animation: pulsa 1s infinite alternate; }
@keyframes pulsa { from { opacity: .35; } to { opacity: 1; } }
.banner-demo { background: var(--warn-soft); color: var(--warn); font-size: 13px; padding-block: 7px; padding-left: var(--gut); padding-right: var(--gut-r); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.banner-demo b { font-weight: 700; }

/* ---------- casca do escritório ---------- */
.casca { display: grid; grid-template-columns: 1fr; min-height: calc(100vh - 56px); }
.nav { display: none; }
.nav-mob { position: sticky; top: calc(56px + env(safe-area-inset-top, 0px)); z-index: 40; background: var(--ink-2); border-bottom: 1px solid var(--ink-line); overflow-x: auto; scrollbar-width: none; }
.nav-mob::-webkit-scrollbar { display: none; }
.nav-mob-in { display: flex; gap: 4px; padding: 6px var(--gut-r) 6px var(--gut); width: max-content; }
.nav-i { display: flex; align-items: center; gap: 9px; border: 0; background: none; color: var(--on-ink-2); padding: 9px 12px; border-radius: 9px; font-size: 14px; font-weight: 600; white-space: nowrap; text-align: left; position: relative; }
.nav-i svg { width: 19px; height: 19px; flex: none; }
.nav-i[aria-current="page"] { background: var(--ink-3); color: var(--on-ink); }
.nav-i[aria-current="page"] svg { color: var(--brand); }
.nav-i .badge { margin-left: auto; }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #E0A43B; color: #1B1300; font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
@media (min-width: 980px) {
  .casca { grid-template-columns: 232px 1fr; }
  .nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: calc(56px + env(safe-area-inset-top, 0px)); height: calc(100vh - 56px - env(safe-area-inset-top, 0px)); overflow-y: auto; background: var(--ink-2); border-right: 1px solid var(--ink-line); padding: 14px 10px 20px max(10px, env(safe-area-inset-left, 0px)); }
  .nav h4 { color: var(--on-ink-2); opacity: .7; padding: 14px 12px 6px; font-size: 11px; }
  .nav-mob { display: none; }
}
.pagina { padding-block: 20px 64px; padding-left: var(--gut); padding-right: var(--gut-r); max-width: 1320px; width: 100%; margin: 0 auto; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.pagina.estreita { max-width: 720px; }
.cab { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; }
.cab-t { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cab-t p { color: var(--fg-3); font-size: 14px; }
.cab-a { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.eyebrow { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }

/* ---------- blocos ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; min-width: 0; }
.card.plano { background: transparent; border-style: dashed; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card-h h3 { display: flex; align-items: center; gap: 8px; }
.grade { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.pilha { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.linha { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.linha.ent { justify-content: space-between; }
.sep { height: 1px; background: var(--line); margin: 4px 0; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.kpi span { font-size: 12px; font-weight: 600; color: var(--fg-3); text-transform: uppercase; letter-spacing: .05em; }
.kpi b { font-family: var(--f-cond); font-size: 25px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; overflow-wrap: anywhere; }
.kpi small { font-size: 12.5px; }
.kpi.pos b { color: var(--pos); } .kpi.neg b { color: var(--neg); } .kpi.warn b { color: var(--warn); }

.pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 11px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--surface-2); color: var(--fg-2); }
.pill.pos { background: var(--pos-soft); color: var(--pos); } .pill.neg { background: var(--neg-soft); color: var(--neg); }
.pill.warn { background: var(--warn-soft); color: var(--warn); } .pill.plan { background: var(--plan-soft); color: var(--plan); }
.pill.ink { background: var(--fg); color: var(--bg); } .pill.mute { background: var(--surface-2); color: var(--fg-3); }
.pill.rain { background: var(--rain-soft); color: var(--rain); } .pill.cli { background: var(--cli-soft); color: var(--cli); }
.pill svg { width: 13px; height: 13px; }

/* ---------- botões e campos ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--fg); font-weight: 600; font-size: 15px; white-space: nowrap; text-decoration: none; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { border-color: var(--fg-3); }
.btn.pri { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.pri:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn.perigo { color: var(--neg); border-color: color-mix(in srgb, var(--neg) 45%, var(--line)); }
.btn.fantasma { border-color: transparent; background: transparent; }
.btn.fantasma:hover { background: var(--surface-2); }
.btn.peq { min-height: 34px; padding: 0 11px; font-size: 13.5px; border-radius: 8px; }
.btn.grande { min-height: 56px; font-size: 17px; border-radius: 13px; padding: 0 20px; }
.btn.bloco { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.icone-btn { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--fg-2); flex: none; }
.icone-btn svg { width: 18px; height: 18px; }
.icone-btn:hover { color: var(--fg); border-color: var(--line-2); }

.campo { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.campo > label, .rot { font-size: 13px; font-weight: 600; color: var(--fg-2); }
.campo .dica { font-size: 12.5px; color: var(--fg-3); }
.inp, select.inp, textarea.inp { width: 100%; min-height: 44px; padding: 9px 12px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface); font-size: 16px; }
textarea.inp { min-height: 88px; resize: vertical; line-height: 1.45; }
.inp:focus { border-color: var(--accent); outline: 2px solid color-mix(in srgb, var(--accent) 25%, transparent); outline-offset: 0; }
.inp.peq { min-height: 36px; padding: 6px 9px; font-size: 14.5px; }
.inp.num { text-align: right; font-variant-numeric: tabular-nums; }
.inp.erro { border-color: var(--neg); }
.campos { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.check { display: flex; align-items: center; gap: 10px; font-size: 15px; min-height: 40px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 13px; border-radius: 18px; border: 1px solid var(--line-2); background: var(--surface); font-size: 14px; font-weight: 600; color: var(--fg-2); }
.chip svg { width: 16px; height: 16px; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chip.leve[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; min-height: 34px; padding: 0 12px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: var(--fg-2); white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--fg); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }

.abas { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.abas::-webkit-scrollbar { display: none; }
.aba { border: 0; background: none; padding: 10px 14px; font-weight: 600; font-size: 14.5px; color: var(--fg-3); border-bottom: 3px solid transparent; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; }
.aba[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--accent); }
.aba .badge { height: 18px; min-width: 18px; font-size: 11px; }

.step { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; background: var(--surface); min-width: 132px; }
.step button { height: 44px; border: 0; background: var(--surface-2); font-size: 22px; font-weight: 600; color: var(--fg-2); }
.step input { border: 0; height: 44px; text-align: center; font-size: 18px; font-weight: 700; width: 100%; background: transparent; font-variant-numeric: tabular-nums; min-width: 0; }

/* ---------- tabelas ---------- */
.tab-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.tab { width: 100%; border-collapse: collapse; font-size: 14px; }
.tab th { text-align: left; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--fg-3); padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; position: sticky; top: 0; }
.tab td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tab tr:last-child td { border-bottom: 0; }
.tab td.n, .tab th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tab tfoot td { font-weight: 700; background: var(--surface-2); }
.tab tr.clic { cursor: pointer; } .tab tr.clic:hover td { background: var(--surface-2); }
.tab .sub { display: block; font-size: 12.5px; color: var(--fg-3); }

/* ---------- vazios, toasts, folhas ---------- */
.vazio { text-align: center; padding: 34px 16px; color: var(--fg-3); display: flex; flex-direction: column; gap: 10px; align-items: center; }
.vazio svg { width: 40px; height: 40px; opacity: .55; }
.vazio b { color: var(--fg-2); font-size: 16px; }
.toast-area { position: fixed; left: 0; right: 0; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 200; pointer-events: none; padding: 0 var(--gut-r) 0 var(--gut); }
.toast { background: var(--fg); color: var(--bg); padding: 11px 16px; border-radius: 11px; font-weight: 600; font-size: 14.5px; box-shadow: var(--shadow); max-width: 560px; animation: sobe .2s ease-out; pointer-events: auto; }
.toast.erro { background: var(--neg); color: #fff; }
@keyframes sobe { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.fundo { position: fixed; inset: 0; background: rgba(8, 12, 10, .5); z-index: 150; display: flex; align-items: flex-end; justify-content: center; animation: aparece .15s ease-out; }
@keyframes aparece { from { opacity: 0; } to { opacity: 1; } }
.folha { background: var(--surface); width: 100%; max-width: 640px; max-height: calc(100vh - 40px - env(safe-area-inset-top, 0px)); overflow-y: auto; border-radius: 18px 18px 0 0; padding: 18px var(--gut-r) calc(20px + env(safe-area-inset-bottom, 0px)) var(--gut); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px; animation: sobe .2s ease-out; }
.folha.larga { max-width: 980px; }
.folha-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.folha-a { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; position: sticky; bottom: calc(-20px - env(safe-area-inset-bottom, 0px)); background: var(--surface); padding-top: 10px; padding-bottom: 4px; margin-top: 4px; }
@media (min-width: 700px) { .fundo { align-items: center; padding: 20px; } .folha { border-radius: 18px; } }

.aviso { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: 10px; font-size: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.aviso svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.aviso.erro { background: var(--neg-soft); color: var(--neg); border-color: transparent; }
.aviso.atencao { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.aviso.ok { background: var(--pos-soft); color: var(--pos); border-color: transparent; }
.aviso.info { background: var(--plan-soft); color: var(--plan); border-color: transparent; }
.aviso .acao { margin-left: auto; flex: none; }

/* ---------- login / PIN ---------- */
.login-wrap { min-height: calc(100vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); display: grid; place-items: center; padding: 28px var(--gut-r) 40px var(--gut); background: radial-gradient(1200px 500px at 20% -10%, color-mix(in srgb, var(--brand) 18%, transparent), transparent 60%), var(--bg); }
.login { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 16px; }
.login-marca { display: flex; align-items: center; gap: 12px; }
.login-marca .marca-g { width: 44px; height: 44px; font-size: 26px; border-radius: 12px; }
.login-marca b { font-family: var(--f-cond); font-size: 26px; font-weight: 700; display: block; line-height: 1; }
.login-marca span { color: var(--fg-3); font-size: 14px; }
.pin-tela { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 30px 0; }
.pin-dots { display: flex; gap: 14px; }
.pin-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-2); display: block; }
.pin-dots i.on { background: var(--accent); border-color: var(--accent); }
.pin-dots.treme { animation: treme .35s; }
@keyframes treme { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.pin-pad { display: grid; grid-template-columns: repeat(3, 76px); gap: 12px; }
.pin-pad button { height: 64px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); font-size: 26px; font-weight: 600; font-family: var(--f-cond); }
.pin-pad button.fant { background: transparent; border-color: transparent; font-size: 14px; color: var(--fg-3); }
.pin-pad button:active { background: var(--surface-2); }

/* ---------- técnico ---------- */
.saud { display: flex; flex-direction: column; gap: 2px; }
.saud b { font-family: var(--f-cond); font-size: 27px; font-weight: 700; }
.meta-card { background: var(--ink); color: var(--on-ink); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 14px; border: 1px solid var(--ink-line); }
.meta-card h4 { color: var(--on-ink-2); }
.meta-i { display: flex; flex-direction: column; gap: 6px; }
.meta-i .v { font-family: var(--f-cond); font-weight: 700; font-size: 40px; line-height: 1; font-variant-numeric: tabular-nums; }
.meta-i .v small { font-size: 20px; color: var(--on-ink-2); font-weight: 600; }
.meta-i .t { font-size: 15px; font-weight: 600; }
.meta-i .d { font-size: 13.5px; color: var(--on-ink-2); }
.meta-barra { height: 8px; background: var(--ink-3); border-radius: 4px; overflow: hidden; }
.meta-barra i { display: block; height: 100%; background: var(--brand); border-radius: 4px; }
.meta-sep { height: 1px; background: var(--ink-line); }
.rdo-cta { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 18px; border-radius: 16px; border: 0; background: var(--accent); color: var(--on-accent); }
.rdo-cta svg { width: 30px; height: 30px; flex: none; }
.rdo-cta b { display: block; font-family: var(--f-cond); font-size: 22px; font-weight: 700; }
.rdo-cta span { font-size: 14px; opacity: .9; }
.rdo-cta.feito { background: var(--surface); color: var(--fg); border: 1px solid var(--line); }
.rdo-cta.feito svg { color: var(--pos); }
.item-rdo { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); width: 100%; text-align: left; }
.item-rdo .n { font-family: var(--f-cond); font-size: 20px; font-weight: 700; width: 46px; flex: none; }
.item-rdo .m { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.item-rdo .m span { font-size: 13px; color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* editor do RDO */
.editor { max-width: 720px; margin: 0 auto; width: 100%; display: flex; flex-direction: column; gap: 14px; padding-block: 14px 120px; padding-left: var(--gut); padding-right: var(--gut-r); }
.passos { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; position: sticky; top: calc(56px + env(safe-area-inset-top, 0px)); z-index: 30; background: var(--bg); padding: 8px 0; }
.passo { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 7px 4px; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 12px; font-weight: 700; color: var(--fg-3); min-width: 0; }
.passo svg { width: 19px; height: 19px; }
.passo span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.passo[aria-current="step"] { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.passo.ok svg { color: var(--pos); }
.passo.erro svg { color: var(--neg); }
.barra-acao { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(8px); border-top: 1px solid var(--line); padding: 10px var(--gut-r) calc(10px + env(safe-area-inset-bottom, 0px)) var(--gut); }
.barra-acao .in { max-width: 720px; margin: 0 auto; display: flex; gap: 10px; align-items: center; }
.barra-acao .in .btn { flex: 1; }
.salvo { font-size: 12.5px; color: var(--fg-3); display: inline-flex; gap: 6px; align-items: center; }
.tempo-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tempo-btns button { min-height: 76px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-weight: 700; font-size: 15px; color: var(--fg-2); }
.tempo-btns button svg { width: 28px; height: 28px; }
.tempo-btns button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); border-width: 2px; }
.tempo-btns button[data-v="Chuvoso"][aria-pressed="true"] { border-color: var(--rain); background: var(--rain-soft); color: var(--rain); }
.parada { border: 1px solid var(--line); border-left: 4px solid var(--fg-3); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 10px; background: var(--surface); }
.parada.chuva { border-left-color: var(--rain); } .parada.cliente { border-left-color: var(--cli); } .parada.geomarca { border-left-color: var(--warn); }
.linha-eq { display: grid; grid-template-columns: 1fr auto 38px; gap: 8px; align-items: center; }
.painel-c { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); width: 100%; text-align: left; }
.painel-n { font-family: var(--f-cond); font-weight: 700; font-size: 18px; width: 54px; height: 44px; border-radius: 8px; display: grid; place-items: center; background: var(--fg); color: var(--bg); }
.painel-n.gt { background: #E8E2D2; color: #4A4330; }
.painel-c .m { display: flex; flex-direction: column; min-width: 0; }
.painel-c .m b { font-variant-numeric: tabular-nums; }
.painel-c .m span { font-size: 13px; color: var(--fg-3); }
.painel-c .a { font-family: var(--f-cond); font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mat-tot { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 10px 2px 0; font-weight: 600; }
.mat-tot b { font-family: var(--f-cond); font-size: 22px; font-variant-numeric: tabular-nums; }
.prog-meta { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 11px; background: var(--surface-2); }
.prog-meta .meta-barra { background: var(--surface-3); }
.fotos-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.foto-c { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); display: flex; flex-direction: column; }
.foto-c .img { aspect-ratio: 4/3; background: var(--surface-2); position: relative; max-width: 100%; }
.foto-c .img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.foto-c .img .n { position: absolute; left: 6px; top: 6px; background: rgba(0, 0, 0, .65); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 7px; border-radius: 8px; }
.foto-c .img .alerta { position: absolute; right: 6px; top: 6px; background: var(--warn); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 8px; }
.foto-c .b { padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.foto-c textarea { min-height: 56px; font-size: 14px; padding: 7px 9px; }
.foto-c .ac { display: flex; gap: 4px; justify-content: space-between; }
.foto-c .ac .icone-btn { width: 32px; height: 32px; }
.sug { display: flex; flex-wrap: wrap; gap: 5px; }
.sug button { border: 1px dashed var(--line-2); background: transparent; border-radius: 12px; padding: 3px 9px; font-size: 12.5px; color: var(--fg-2); }
.revisao dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; font-size: 14.5px; }
.revisao dt { color: var(--fg-3); font-weight: 600; }
.revisao dd { margin: 0; font-weight: 600; }
.texto-rdo { font-family: var(--f-ui); background: var(--surface-2); border-radius: 10px; padding: 12px 14px; font-size: 14px; white-space: pre-wrap; line-height: 1.55; }

/* ---------- painel do escritório ---------- */
.obra-cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); }
.obra-c { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 12px; text-align: left; width: 100%; min-width: 0; }
.obra-c:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.obra-c .t { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.obra-c .t b { font-family: var(--f-cond); font-size: 19px; font-weight: 700; display: block; }
.obra-c .t span { font-size: 13px; color: var(--fg-3); }
.avanco { display: flex; flex-direction: column; gap: 6px; }
.avanco-b { position: relative; height: 12px; background: var(--surface-2); border-radius: 6px; overflow: visible; }
.avanco-b .r { position: absolute; left: 0; top: 0; bottom: 0; background: var(--real); border-radius: 6px; }
.avanco-b .p { position: absolute; top: -4px; bottom: -4px; width: 3px; background: var(--plan); border-radius: 2px; }
.avanco-l { display: flex; justify-content: space-between; font-size: 13px; color: var(--fg-2); gap: 8px; flex-wrap: wrap; }
.avanco-l b { font-variant-numeric: tabular-nums; }
.mini-lista { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.mini-lista div { display: flex; justify-content: space-between; gap: 10px; }
.mini-lista span { color: var(--fg-3); }
.mini-lista b { font-variant-numeric: tabular-nums; text-align: right; }
.alertas { display: flex; flex-direction: column; gap: 6px; }
.alerta-l { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; color: var(--fg-2); }
.alerta-l svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.alerta-l.neg svg { color: var(--neg); } .alerta-l.warn svg { color: var(--warn); } .alerta-l.cli svg { color: var(--cli); } .alerta-l.rain svg { color: var(--rain); }

/* cronograma */
.legenda { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--fg-2); align-items: center; }
.legenda svg { width: 16px; height: 16px; vertical-align: -3px; }
.legenda i { display: inline-block; width: 18px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.legenda i.p1 { background: var(--plan); } .legenda i.r { background: var(--real); height: 4px; } .legenda i.p2 { background: repeating-linear-gradient(90deg, var(--proj) 0 5px, transparent 5px 8px); }
.legenda i.h { background: var(--hoje); width: 3px; height: 14px; }
.legenda i.ch { width: 10px; height: 10px; border-radius: 50%; background: var(--rain-soft); border: 1px solid var(--rain); }
.legenda i.cl { width: 10px; height: 10px; border-radius: 50%; background: var(--cli-soft); border: 1px solid var(--cli); }
.curva { width: 100%; height: auto; display: block; }
.curva text { font-family: var(--f-ui); font-size: 11px; fill: var(--fg-3); }
.curva .grid { stroke: var(--line); stroke-width: 1; }
.curva .l-p1 { stroke: var(--plan); fill: none; stroke-width: 2.25; }
.curva .l-r { stroke: var(--real); fill: none; stroke-width: 3; }
.curva .a-r { fill: color-mix(in srgb, var(--real) 16%, transparent); }
.curva .l-p2 { stroke: var(--proj); fill: none; stroke-width: 2.25; stroke-dasharray: 6 4; }
.curva .hoje { stroke: var(--hoje); stroke-width: 2; }
.curva .chuva { fill: var(--rain-soft); }
.curva .pt { stroke: var(--surface); stroke-width: 2; }
.gantt { border-collapse: separate; border-spacing: 0; font-size: 12px; min-width: 100%; }
.gantt th, .gantt td { border-bottom: 1px solid var(--line); padding: 0; height: 22px; }
.gantt th.ativ, .gantt td.ativ { position: sticky; left: 0; background: var(--surface); z-index: 2; text-align: left; padding: 3px 10px; min-width: 180px; max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-right: 1px solid var(--line); font-size: 13px; }
.gantt td.ativ .tipo { font-size: 11px; color: var(--fg-3); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.gantt th.d { width: 30px; min-width: 30px; text-align: center; font-weight: 600; color: var(--fg-3); font-size: 11px; line-height: 1.1; padding: 3px 0; background: var(--surface-2); position: relative; }
.gantt th.d.nu, .gantt td.nu { background: repeating-linear-gradient(135deg, var(--surface-2) 0 4px, transparent 4px 8px); }
.gantt th.d.hoje { background: color-mix(in srgb, var(--hoje) 30%, var(--surface-2)); color: var(--fg); }
.gantt th.d .gota { position: absolute; right: 1px; top: 1px; width: 7px; height: 7px; border-radius: 50%; background: var(--rain); }
.gantt th.d .cli { position: absolute; left: 1px; top: 1px; width: 7px; height: 7px; border-radius: 50%; background: var(--cli); }
.gantt td.c { text-align: center; font-size: 10.5px; font-variant-numeric: tabular-nums; position: relative; }
.gantt td.c.p1 { background: color-mix(in srgb, var(--plan) 22%, transparent); }
.gantt td.c.p1.cl { background: color-mix(in srgb, var(--cli) 22%, transparent); }
.gantt td.c.r { background: var(--real); color: #fff; font-weight: 700; }
.gantt td.c.p2 { background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--proj) 35%, transparent) 0 6px, transparent 6px 9px); }
.gantt td.c.zero { background: color-mix(in srgb, var(--neg) 12%, transparent); color: var(--neg); }
.gantt tr.linha-r td.ativ, .gantt tr.linha-p2 td.ativ { font-size: 11px; color: var(--fg-3); padding-left: 22px; }
.gantt tr.sep-a td { border-bottom: 2px solid var(--line-2); }
.gantt td.hojec { box-shadow: inset 2px 0 0 var(--hoje), inset -2px 0 0 var(--hoje); }

/* calendário */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal .dsem { font-size: 12px; font-weight: 700; color: var(--fg-3); text-align: center; text-transform: uppercase; letter-spacing: .05em; padding-bottom: 2px; }
.dia { min-height: 108px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 6px 7px; display: flex; flex-direction: column; gap: 2px; text-align: left; position: relative; min-width: 0; font-size: 12px; }
.dia.fora { opacity: .35; background: transparent; }
.dia.nu { background: repeating-linear-gradient(135deg, var(--surface-2) 0 5px, var(--surface) 5px 10px); }
.dia.hoje { border: 2px solid var(--hoje); }
.dia .dn { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 13px; color: var(--fg-2); }
.dia .ic { display: inline-flex; gap: 3px; }
.dia .ic svg { width: 14px; height: 14px; }
.dia .ic .rain { color: var(--rain); } .dia .ic .cli { color: var(--cli); }
.dia .l { display: flex; justify-content: space-between; gap: 4px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dia .l span { color: var(--fg-3); }
.dia .l b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.dia .saldo { margin-top: auto; border-radius: 6px; padding: 3px 6px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: center; font-size: 12.5px; white-space: nowrap; }
.dia .saldo.pos { background: var(--pos-soft); color: var(--pos); }
.dia .saldo.neg { background: var(--neg-soft); color: var(--neg); }
.dia .saldo.zero { background: var(--surface-2); color: var(--fg-3); }
.dia.prev .l, .dia.prev .saldo { opacity: .55; }
.dia.prev .saldo { background: transparent; border: 1px dashed var(--line-2); color: var(--fg-3); }
.dia .fer { font-size: 11px; color: var(--fg-3); line-height: 1.2; }
button.dia:hover { border-color: var(--fg-3); }
@media (max-width: 760px) {
  .cal { gap: 3px; }
  .dia { min-height: 62px; padding: 4px; border-radius: 8px; }
  .dia .l { display: none; }
  .dia .saldo { font-size: 11px; padding: 2px 2px; }
  .dia .fer { display: none; }
}
.resumo-mes { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }

/* histórico e outros */
.barra-h { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; min-width: 60px; }
.barra-h i { display: block; height: 100%; background: var(--accent); }
.drop { border: 2px dashed var(--line-2); border-radius: 16px; padding: 30px 16px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; background: var(--surface); }
.drop.sobre { border-color: var(--accent); background: var(--accent-soft); }
.drop > svg { width: 42px; height: 42px; color: var(--accent); }
.arq { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.arq .ic { width: 38px; height: 38px; border-radius: 9px; background: var(--surface-2); display: grid; place-items: center; }
.arq .ic svg { width: 20px; height: 20px; color: var(--fg-2); }
.arq .m { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.arq .m b { word-break: break-word; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; font-size: 13.5px; }
.kv span { color: var(--fg-3); }
.kv b { font-weight: 600; word-break: break-word; }
.perg { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); width: 100%; text-align: left; }
.perg svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--warn); }
.perg.info svg { color: var(--fg-3); }
.perg span { flex: 1; font-size: 14px; }
.conflito { border: 1px solid var(--warn); background: var(--warn-soft); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.conflito .op { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.diag { display: flex; flex-direction: column; gap: 8px; }
.diag div { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.diag svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.diag .ok svg { color: var(--pos); } .diag .fal svg { color: var(--neg); }
.passo-guia { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; }
.passo-guia > b { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-family: var(--f-cond); font-size: 17px; }
.codigo { font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 12.5px; background: var(--surface-2); border-radius: 8px; padding: 10px 12px; overflow-x: auto; white-space: pre; max-height: 260px; }
.carregando { display: flex; align-items: center; gap: 10px; color: var(--fg-3); padding: 20px; justify-content: center; }
.roda { width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: gira .8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (max-width: 520px) {
  h1 { font-size: 23px; }
  .kpi b { font-size: 21px; }
  .meta-i .v { font-size: 34px; }
  .passo span { font-size: 11px; }
  .tab { font-size: 13.5px; }
  .tab td, .tab th { padding: 8px 9px; }
}
