/* =====================================================================
   Radial — estilos
   Cores em variáveis: o modo escuro só troca os valores (lá embaixo).
   ===================================================================== */
:root {
  --bg: #E9ECEF;
  --shell: #F4F5F6;
  --card: #FFFFFF;
  --soft: #F7F8F9;
  --chip: #F1F2F4;
  --line: #E3E6EA;
  --line-strong: #C5CAD1;
  --ink: #16181D;
  --on-ink: #FFFFFF;
  --text-2: #4B5260;
  --muted: #5F6672;
  --field: #FFFFFF;
  --overlay: rgba(22, 24, 29, .45);

  /* identidade Radial */
  --brand: #046BD2;
  --brand-ink: #FFFFFF;
  --brand-soft: #D3E6FA;
  --brand-text: #0559AD;
  --navy: #121E2B;

  /* destaque principal (antes verde-limão, agora a família do azul da Radial) */
  --lime: #046BD2;
  --on-lime: #FFFFFF;
  --lime-soft: #E8F2FD;
  --lime-ink: #0559AD;
  --on-pastel: #16181D;
  --lav: #CFC8F5;
  --blue: #BFDAF6;
  --mint: #A9CEF5;
  --peach: #F8C9B4;
  --late-bg: #FCE2D6;
  --late-ink: #9A3412;
  --yellow: #FBE38E;
  --yellow-soft: #FFF6D1;
  --yellow-line: #EBCB55;
  --yellow-ink: #6B4E00;
  --yellow-dot: #E0B000;
  --red: #C62828;
  --red-soft: #F9C4C0;
  --red-tint: #FFEDEB;
  --red-line: #E98A82;
  --red-text: #7F1414;
  --green-dot: #3E9B54;   /* só para "online agora" */
  --out-row: #FAFAFB;
  --today: #F3F8FE;

  --radius-xl: 28px;
  --radius-l: 24px;
  --radius-m: 16px;
  --radius-s: 12px;
  --pad-card: 18px;
  --pad-item: 12px 14px;
  --gap-main: 22px;
  --cell-h: 52px;
  color-scheme: light;
}

/* ---------- Modo escuro ---------- */
:root[data-tema="escuro"] {
  --bg: #080C11;
  --shell: #0F151D;
  --card: #161E28;
  --soft: #1D2733;
  --chip: #243140;
  --line: #2A3644;
  --line-strong: #3A4858;
  --ink: #E9EEF4;
  --on-ink: #0B1016;
  --text-2: #B8C2CD;
  --muted: #94A1AE;
  --field: #111922;
  --overlay: rgba(0, 0, 0, .6);
  --brand: #2F86E0;
  --brand-ink: #FFFFFF;
  --brand-soft: #16324F;
  --brand-text: #7DB6F2;
  --lime: #2F86E0;
  --lime-soft: #13283F;
  --lime-ink: #9CC9F5;
  --yellow-soft: #2E2812;
  --yellow-line: #7C6517;
  --yellow-ink: #6B4E00;
  --red-tint: #33191A;
  --red-line: #8C3A35;
  --red-text: #FFB4AC;
  --late-bg: #3A2015;
  --late-ink: #FFB590;
  --out-row: #121A23;
  --today: #111F30;
  color-scheme: dark;
}

/* ---------- Tamanho do texto e densidade ---------- */
:root[data-texto="p"] { zoom: .9; }
:root[data-texto="g"] { zoom: 1.12; }
:root[data-texto="gg"] { zoom: 1.25; }
:root[data-densidade="compacta"] {
  --pad-card: 12px;
  --pad-item: 8px 10px;
  --gap-main: 14px;
  --cell-h: 40px;
}
:root[data-densidade="compacta"] .stat { padding: 14px; }
:root[data-densidade="compacta"] .stat-value { font-size: 26px; }
:root[data-densidade="compacta"] .group, :root[data-densidade="compacta"] .col { gap: 8px; }

* { box-sizing: border-box; }
html, body { margin: 0; }
/* altura real da tela no celular (sem a barra do navegador/WhatsApp) */
:root { --vh: 100vh; }
@supports (height: 100dvh) { :root { --vh: 100dvh; } }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { touch-action: manipulation; -webkit-tap-highlight-color: transparent; overflow-x: clip; }
/* celular: campos com 16px para o iPhone não dar zoom sozinho ao tocar */
@media (pointer: coarse) {
  input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea { font-size: max(16px, 1em) !important; }
}
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
a { color: var(--brand-text); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- Shell ---------- */
.page { min-height: var(--vh); padding: 20px; }
.shell {
  max-width: 1600px; margin: 0 auto; background: var(--shell);
  border-radius: var(--radius-xl); display: flex; flex-wrap: wrap;
  min-height: calc(var(--vh) - 40px); overflow: hidden;
}
.sidebar {
  flex: 1 1 220px; max-width: 100%; background: var(--card);
  padding: 28px 18px; display: flex; flex-direction: column; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 10px; }
.brand-mark {
  width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--brand); color: #FFFFFF;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; letter-spacing: .02em;
}
.brand-name { font-weight: 800; font-size: 18px; letter-spacing: -0.02em; color: var(--ink); }
.brand-sub { font-size: 12px; color: var(--muted); font-weight: 500; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav button {
  display: flex; align-items: center; gap: 12px; border: 0; min-height: 44px; padding: 0 14px;
  border-radius: 14px; background: transparent; font-weight: 500; text-align: left;
}
.nav button:hover { background: var(--soft); }
.nav button.on { background: var(--lime); color: var(--on-lime); font-weight: 700; }
.nav .soon { margin-left: auto; font-size: 10px; font-weight: 600; color: var(--muted); background: var(--chip); padding: 3px 7px; border-radius: 999px; }
.me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 18px; background: var(--shell); }
.me-nome { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-email { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-btn { border: 0; background: none; padding: 0; font-weight: 700; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }

.avatar {
  width: 38px; height: 38px; flex: none; border-radius: 50%; background: var(--brand-soft); color: var(--ink);
  display: flex; align-items: center; justify-content: center; font-weight: 700; position: relative; overflow: visible;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.avatar.lg { width: 72px; height: 72px; font-size: 24px; }
.avatar .on-dot {
  position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--green-dot); border: 2px solid var(--card);
}
.avatar.lg .on-dot { width: 16px; height: 16px; }

.main { flex: 999 1 560px; min-width: 0; padding: 28px; display: flex; flex-direction: column; gap: var(--gap-main); }
.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.head h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; }
.head .date { margin-top: 4px; color: var(--muted); }
.head .date::first-letter { text-transform: uppercase; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.pill {
  border: 0; min-height: 40px; padding: 0 16px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--card); white-space: nowrap;
}
.pill:hover { background: var(--soft); }
.pill.on { background: var(--ink); color: var(--on-ink); }
.pill.lime { background: var(--lime); color: var(--on-lime); font-weight: 700; }
.pill.lime:hover { filter: brightness(1.08); background: var(--lime); }
.pill.dark { background: var(--ink); color: var(--on-ink); font-weight: 700; }
.pill.ghost { background: var(--chip); }
.pill.danger { background: var(--late-bg); color: var(--late-ink); }
.pill:disabled { opacity: .5; cursor: default; }

.card { background: var(--card); border-radius: var(--radius-l); padding: var(--pad-card); }
.card-title { font-size: 16px; font-weight: 800; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.placeholder { padding: 40px; max-width: 640px; display: flex; flex-direction: column; gap: 12px; }
.placeholder p { color: var(--text-2); font-size: 15px; line-height: 1.6; }
.tag { align-self: flex-start; font-size: 12px; font-weight: 700; background: var(--chip); color: var(--muted); padding: 5px 10px; border-radius: 999px; }
.note { font-size: 13px; color: var(--text-2); line-height: 1.55; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.stat { border-radius: 22px; padding: 20px; display: flex; flex-direction: column; gap: 6px; border: 0; text-align: left; color: var(--on-pastel); }
.stat.on { outline: 3px solid var(--brand); outline-offset: 2px; }
.stat-label { font-size: 13px; font-weight: 600; color: #2A2F38; }
.stat-value { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; }
.stat-hint { font-size: 12px; color: #3A404B; }

/* ---------- Board ---------- */
.board { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; align-items: start; }
.col { display: flex; flex-direction: column; gap: 14px; }
.col-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.col-title { display: flex; align-items: center; gap: 10px; }
.col-title h2 { font-size: 16px; font-weight: 800; }
.dot { width: 12px; height: 12px; border-radius: 4px; flex: none; }
.count { font-size: 12px; font-weight: 700; background: var(--chip); padding: 4px 10px; border-radius: 999px; }
.group { display: flex; flex-direction: column; gap: 8px; }
.group-name { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.item {
  display: flex; flex-direction: column; gap: 8px; text-align: left; width: 100%;
  border: 2px solid transparent; background: var(--soft); border-radius: var(--radius-m); padding: var(--pad-item);
}
.item:hover { border-color: var(--line); }
.item.so-ver { cursor: default; }
.item-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.item-name { font-weight: 700; font-size: 14px; }
.due { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; background: var(--chip); color: var(--text-2); }
.due.atrasada { background: var(--red); color: #fff; }
.due.urgente { background: var(--red-soft); color: #7F1414; }
.due.semana { background: var(--yellow); color: var(--yellow-ink); }
.item.sit-semana { background: var(--yellow-soft); border-color: var(--yellow-line); }
.item.sit-urgente { background: var(--red-tint); border-color: var(--red-line); }
.item.sit-atrasada { background: var(--red-tint); border-color: var(--red); }
.item.sit-atrasada .item-name, .item.sit-urgente .item-name { color: var(--red-text); }
.item.sit-urgente .bar > span, .item.sit-atrasada .bar > span { background: var(--red); }
.item-meta { font-size: 12px; color: var(--muted); }
.prog { display: flex; align-items: center; gap: 10px; }
.bar { flex: 1; height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 999px; background: var(--brand); }
.pct { font-size: 12px; font-weight: 700; min-width: 34px; text-align: right; }
.add-line {
  border: 1.5px dashed var(--line); background: transparent; border-radius: var(--radius-m);
  min-height: 44px; color: var(--muted); font-weight: 600; font-size: 13px;
}
.add-line:hover { border-color: var(--line-strong); color: var(--ink); }
.empty { color: var(--muted); font-size: 13px; padding: 8px 2px; }

/* ---------- Modal ---------- */
.overlay {
  position: fixed; inset: 0; background: var(--overlay); z-index: 50;
  display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto;
}
.modal { background: var(--card); border-radius: var(--radius-l); width: 100%; max-width: 620px; padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.modal-head h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.modal-kicker { font-size: 12px; font-weight: 700; color: var(--muted); }
.icon-btn { border: 0; background: var(--chip); width: 40px; height: 40px; border-radius: 12px; font-size: 20px; line-height: 1; flex: none; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12px; font-weight: 700; color: var(--muted); }
.field input, .field select, .field textarea, .input {
  border: 1.5px solid var(--line); border-radius: var(--radius-s); background: var(--field);
  min-height: 44px; padding: 0 12px; outline: none; color: var(--ink);
}
.field textarea { padding: 10px 12px; min-height: 70px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: var(--brand); }
.field input:disabled, .field select:disabled { opacity: .6; }
.seg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; background: var(--chip); padding: 4px; border-radius: 14px; }
.seg button { border: 0; background: transparent; min-height: 40px; border-radius: 10px; font-weight: 600; font-size: 13px; }
.seg button.on { background: var(--brand); color: var(--brand-ink); }
.seg button:disabled { cursor: default; }
.seg.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.seg.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.range-row { display: flex; align-items: center; gap: 12px; }
.range-row input[type=range] { flex: 1; accent-color: var(--brand); min-height: 44px; }
.range-row .input { width: 84px; }
.prod-box { background: var(--lime-soft); border-radius: var(--radius-m); padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.prod-sum { font-size: 13px; color: var(--lime-ink); font-weight: 600; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; }
.quick button { border: 0; background: var(--card); border-radius: 999px; min-height: 36px; padding: 0 12px; font-weight: 700; font-size: 12px; }
.modal-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding-top: 16px; }
.danger { background: var(--late-bg); color: var(--late-ink); }

/* ---------- Agenda ---------- */
.agenda { display: flex; flex-direction: column; gap: 14px; }
.agenda-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.agenda-head h2 { font-size: 18px; font-weight: 800; }
.agenda-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.week-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.week-nav .pill:not(.dark):not(.ghost) { background: var(--soft); }
.week-label { font-weight: 700; padding: 0 6px; min-width: 150px; text-align: center; }
.palette { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px; border-radius: var(--radius-m); background: var(--soft); }
.palette-group { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; width: 100%; }
.palette-hint { font-size: 12px; color: var(--muted); margin-right: 4px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px;
  border-radius: 999px; background: var(--card); border: 1.5px solid var(--line); font-weight: 600; font-size: 13px;
  user-select: none; -webkit-user-select: none; touch-action: none; cursor: grab; white-space: nowrap;
}
.chip.sel { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.chip.free::after { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.chip.out { opacity: .55; border-style: dashed; }
.chip.out::after { content: none; }
.chip.veic { background: var(--mint); color: var(--on-pastel); border-color: transparent; }
.chip.veic.sel { background: var(--brand); color: var(--brand-ink); }
.chip.small { min-height: 28px; padding: 0 4px 0 10px; font-size: 12px; background: var(--lav); color: var(--on-pastel); border-color: transparent; }
.chip.small.veic { background: var(--mint); }
.chip.small.folga { background: #E1E4E9; }
.chip.small.ferias { background: var(--yellow); }
.chip.small.conf, .chip.small.conf.veic { background: var(--peach); border-color: var(--late-ink); }
.chip.ro { cursor: default; touch-action: auto; }
.chip .x { border: 0; background: rgba(0,0,0,.1); color: inherit; width: 20px; height: 20px; border-radius: 50%; font-size: 13px; line-height: 1; padding: 0; }
.trash {
  margin-left: auto; min-height: 34px; padding: 0 14px; border-radius: 999px; border: 1.5px dashed var(--late-ink);
  color: var(--late-ink); font-weight: 700; font-size: 12px; display: flex; align-items: center;
}
.trash.hot { background: var(--late-bg); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.grid-wrap { overflow-x: auto; border-radius: var(--radius-m); border: 1px solid var(--line); }
table.cal { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 900px; table-layout: fixed; } /* dias com a mesma largura */
.cal th, .cal td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); vertical-align: top; }
.cal th:last-child, .cal td:last-child { border-right: 0; }
.cal thead th { background: var(--soft); padding: 10px; text-align: left; font-size: 12px; position: sticky; top: 0; }
.cal thead th.today { background: var(--brand-soft); color: var(--brand-text); }
.cal .day-name { font-weight: 800; text-transform: capitalize; font-size: 13px; }
.cal .day-free { font-weight: 500; color: var(--muted); margin-top: 2px; }
.cal thead th.today .day-free { color: var(--brand-text); }
.cal .rowhead { position: sticky; left: 0; background: var(--card); z-index: 1; width: 200px; min-width: 180px; padding: 10px 12px; text-align: left; }
.cal .rowhead .n { font-weight: 700; font-size: 13px; }
.cal .rowhead .s { font-size: 11px; color: var(--muted); font-weight: 500; margin-top: 2px; }
.cal tr.sep td { background: var(--chip); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 8px 12px; }
.cal tr.out-row th.rowhead, .cal tr.out-row td { background: var(--out-row); }
.rowhead .alert { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.rowhead .alert.atrasada, .rowhead .alert.urgente { background: var(--red); }
.rowhead .alert.semana { background: var(--yellow-dot); }
.cell { padding: 6px; min-width: 120px; height: var(--cell-h); }
.cell-inner { display: flex; flex-wrap: wrap; gap: 4px; min-height: calc(var(--cell-h) - 12px); border-radius: 10px; padding: 2px; }
.cell.today { background: var(--today); }
.cell.hot .cell-inner { background: var(--lime-soft); outline: 2px dashed var(--lime-ink); }
.cell.armed { cursor: copy; }
.cell.armed:hover .cell-inner { background: var(--lime-soft); }
.drag-ghost {
  position: fixed; z-index: 100; pointer-events: none; transform: translate(-50%, -60%);
  background: var(--brand); color: var(--brand-ink); border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 13px;
  box-shadow: 0 8px 24px rgba(0,0,0,.25); font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}

/* ---------- Equipe / Frotas / Configurações ---------- */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.person { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--radius-m); background: var(--soft); }
.person .info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.person .nm { font-weight: 700; }
.person .sub { font-size: 12px; color: var(--muted); }
.person input { border: 1.5px solid var(--line); border-radius: 10px; min-height: 36px; padding: 0 8px; width: 100%; background: var(--field); }
.mini { border: 0; background: var(--chip); min-height: 34px; padding: 0 10px; border-radius: 10px; font-size: 12px; font-weight: 700; }
.mini.lime { background: var(--lime); color: var(--on-lime); }
.add-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.add-form .field { flex: 1 1 180px; }

.vehicles { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.vehicle { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: var(--radius-m); background: var(--soft); }
.vehicle .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.vehicle .nm { font-weight: 800; font-size: 16px; }
.vehicle .sub { font-size: 12px; color: var(--muted); }
.plate { font-family: ui-monospace, Menlo, monospace; font-weight: 700; font-size: 12px; background: var(--field); border: 1.5px solid var(--ink); border-radius: 6px; padding: 2px 8px; letter-spacing: .06em; }
.badge { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--chip); color: var(--text-2); align-self: flex-start; }
.badge.red { background: var(--red); color: #fff; }
.badge.yellow { background: var(--yellow); color: var(--yellow-ink); }
.badge.green { background: var(--lime-soft); color: var(--lime-ink); }
.badge.blue { background: var(--brand-soft); color: var(--brand-text); }

.users { display: flex; flex-direction: column; gap: 8px; }
.user-row {
  display: grid; grid-template-columns: auto minmax(160px, 1.4fr) minmax(140px, 1fr) minmax(150px, 1fr); gap: 14px;
  align-items: center; padding: 12px; border-radius: var(--radius-m); background: var(--soft);
}
.user-row .nm { font-weight: 700; }
.user-row .sub { font-size: 12px; color: var(--muted); }
.user-row .times { font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 2px; }
.user-row .user-senha { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; max-width: 240px; }
.user-row .user-senha .pill { min-height: 36px; }
.user-row select, .user-row .input { min-height: 38px; }
.photo-btn { position: relative; border: 0; padding: 0; background: none; border-radius: 50%; }
.photo-btn .foto-tag {
  position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); font-size: 10px; font-weight: 700;
  background: var(--ink); color: var(--on-ink); padding: 1px 6px; border-radius: 999px; white-space: nowrap;
}
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.opt { display: flex; flex-direction: column; gap: 8px; }
.opt > span { font-size: 12px; font-weight: 700; color: var(--muted); }
.preview-text { font-size: 13px; color: var(--text-2); }

/* ---------- Login ---------- */
.login { min-height: var(--vh); display: flex; align-items: center; justify-content: center; padding: 20px; }
.login .card { width: 100%; max-width: 400px; padding: 32px; display: flex; flex-direction: column; gap: 18px; }
.err { background: var(--late-bg); color: var(--late-ink); border-radius: 12px; padding: 10px 12px; font-size: 13px; font-weight: 600; }
/* verificação em duas etapas (DuasEtapas.jsx) */
.passos-2etapas { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--text-2); line-height: 1.5; }
.qr-2etapas { align-self: center; width: 200px; max-width: 100%; height: auto; background: #fff; padding: 8px; border-radius: 12px; }
.link-2etapas { min-height: 44px; display: flex; align-items: center; justify-content: center; text-decoration: none; color: inherit; }
.chave-2etapas { display: flex; align-items: center; gap: 8px; min-width: 0; }
.chave-2etapas code { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 13px; font-family: ui-monospace, monospace; background: var(--soft); border-radius: 10px; padding: 8px 10px; }

.toast {
  position: fixed; bottom: calc(20px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); z-index: 120;
  background: var(--ink); color: var(--on-ink); padding: 12px 18px; border-radius: 14px; font-weight: 600; max-width: calc(100% - 32px);
}

/* ---------- Computador: tela cheia ----------
   O menu fica fixo à esquerda (mesma largura e no mesmo lugar ao rolar a página ou mudar o zoom);
   o conteúdo ocupa todo o resto da tela e cresce junto com ela. */
@media (min-width: 900px) {
  .page { padding: 12px; }
  .shell { max-width: none; flex-wrap: nowrap; min-height: calc(var(--vh) - 24px); overflow: clip; }
  .sidebar { flex: 0 0 248px; width: 248px; position: sticky; top: 12px; align-self: flex-start;
    height: calc(var(--vh) - 24px); overflow-y: auto; border-radius: var(--radius-xl) 0 0 var(--radius-xl); }
  .main { flex: 1 1 auto; padding: 28px 32px; }
}
@media (min-width: 1800px) { .main { padding: 32px 40px; } }

/* ---------- Modo TV ---------- */
.tv .page { padding: 0; }
.tv .shell { border-radius: 0; min-height: var(--vh); max-width: none; }
.tv .main { padding: 32px 40px; }
.tv .item-name { font-size: 17px; }
.tv .item-meta, .tv .due, .tv .pct { font-size: 14px; }
.tv .head h1 { font-size: 38px; }

@media (max-width: 640px) {
  .page { padding: 0; }
  .shell { border-radius: 0; }
  .main { padding: 16px max(14px, env(safe-area-inset-right)) calc(28px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); }
  .head h1 { font-size: 26px; }
  .user-row { grid-template-columns: auto 1fr; }
  .user-row > :nth-child(n+3) { grid-column: 1 / -1; }
}
/* ---------- Celular e tablet (até 899 px): barra de cima + abas flutuantes embaixo (estilo Instagram) ---------- */
.m-topo, .m-abas { display: none; }
.nav-sub { display: none; }
@media (max-width: 899px) {
  .page.com-abas-celular { --gut: max(16px, env(safe-area-inset-left), env(safe-area-inset-right)); }
  .page.com-abas-celular .sidebar { display: none; }
  .page.com-abas-celular .shell { overflow: clip; }
  .page.com-abas-celular .main { padding-left: var(--gut); padding-right: var(--gut); padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
  .m-topo { display: block; position: sticky; top: var(--faixa-h, 0px); z-index: 40; background: color-mix(in srgb, var(--card) 92%, transparent);
    -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
  body.com-faixa .m-topo { padding-top: 0; }
  .m-topo-linha { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; height: 56px; padding: 0 calc(var(--gut) - 6px); }
  .m-btn { width: 44px; height: 44px; border: 0; background: transparent; color: var(--ink); border-radius: 12px; display: grid; place-items: center; padding: 0; }
  .m-btn:active { background: var(--soft); }
  .m-eu { justify-self: end; }
  .m-eu .avatar { width: 34px; height: 34px; font-size: 13px; box-shadow: 0 0 0 2px var(--card), 0 0 0 3.5px var(--line); }
  .m-marca { justify-self: center; display: inline-flex; align-items: center; gap: 9px; border: 0; background: none; padding: 4px 8px; color: var(--ink); }
  .m-marca img { border-radius: 9px; display: block; }
  .m-marca span { font-size: 20px; font-weight: 800; letter-spacing: -0.03em; }
  .m-subs { display: flex; gap: 8px; overflow-x: auto; padding: 0 var(--gut) 10px; scrollbar-width: none; }
  .m-subs::-webkit-scrollbar { display: none; }
  .m-subs button { flex: none; border: 0; min-height: 34px; padding: 0 14px; border-radius: 999px; background: var(--soft); color: var(--text-2); font-weight: 600; font-size: 14px; white-space: nowrap; }
  .m-subs button.on { background: var(--brand); color: var(--brand-ink); font-weight: 700; }
  /* barra flutuante embaixo */
  .m-abas { display: flex; position: fixed; z-index: 45; left: 50%; transform: translateX(-50%); bottom: calc(12px + env(safe-area-inset-bottom));
    width: min(420px, calc(100% - 2 * var(--gut, 16px))); justify-content: space-around; align-items: center; height: 62px; padding: 0 8px;
    border-radius: 22px; background: color-mix(in srgb, var(--card) 88%, transparent); -webkit-backdrop-filter: saturate(1.8) blur(18px); backdrop-filter: saturate(1.8) blur(18px);
    border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(16, 24, 40, .16), 0 2px 6px rgba(16, 24, 40, .06); }
  .m-abas button { position: relative; flex: 1; height: 100%; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; padding: 0; border-radius: 16px; }
  .m-abas button:active { transform: scale(.92); }
  .m-abas button.on { color: var(--brand); }
  .m-abas-ponto { position: absolute; bottom: 8px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: currentColor; opacity: 0; }
  .m-abas button.on .m-abas-ponto { opacity: 1; }
  body.tv .m-abas { display: none; }
  .toast { bottom: calc(92px + env(safe-area-inset-bottom)); }
}
/* gaveta do menu (abre pela esquerda) */
.m-gaveta-fundo { position: fixed; inset: 0; z-index: 900; background: rgba(10, 14, 22, .42); animation: m-fade .18s ease-out; }
body.com-faixa .m-gaveta-fundo { top: var(--faixa-h); }
.m-gaveta { position: absolute; top: 0; bottom: 0; left: 0; width: min(330px, 86vw); background: var(--card); display: flex; flex-direction: column;
  padding: calc(env(safe-area-inset-top) + 8px) 12px calc(14px + env(safe-area-inset-bottom)); box-shadow: 12px 0 40px rgba(0, 0, 0, .18); animation: m-entra .22s cubic-bezier(.2, .8, .2, 1); }
.m-gaveta-topo { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 10px 8px; }
.m-marca.estatica { display: inline-flex; align-items: center; gap: 9px; }
.m-marca.estatica img { border-radius: 9px; }
.m-marca.estatica span { font-size: 19px; font-weight: 800; letter-spacing: -0.03em; }
.m-gaveta-lista { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding-top: 4px; }
.m-gaveta-item { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 50px; padding: 0 12px; border: 0; background: transparent; border-radius: 14px; font-size: 16px; font-weight: 600; color: var(--ink); text-align: left; }
.m-gaveta-item svg { width: 24px; height: 24px; color: var(--muted); }
.m-gaveta-item.on { background: var(--brand-soft); color: var(--brand-text); }
.m-gaveta-item.on svg { color: var(--brand); }
.m-gaveta-item .soon { margin-left: auto; font-size: 10px; font-weight: 700; color: var(--muted); background: var(--chip); padding: 3px 7px; border-radius: 999px; }
.m-gaveta-sem-icone { width: 24px; height: 24px; flex: none; }
.m-gaveta-sub { display: block; width: calc(100% - 50px); margin-left: 50px; min-height: 40px; padding: 0 12px; border: 0; background: transparent; border-radius: 12px; text-align: left; font-size: 14px; font-weight: 600; color: var(--text-2); }
.m-gaveta-sub.on { background: var(--soft); color: var(--brand-text); }
.m-gaveta-eu { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; margin-top: 8px; border: 0; border-radius: 16px; background: var(--shell); text-align: left; }
.m-gaveta-eu span { display: flex; flex-direction: column; min-width: 0; }
.m-gaveta-eu b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-gaveta-eu small { font-size: 12px; color: var(--muted); }
@keyframes m-entra { from { transform: translateX(-100%); } }
@keyframes m-fade { from { opacity: 0; } }

/* ---------- Registro de atividades ---------- */
.log-day { display: flex; flex-direction: column; gap: 6px; }
.log-day > .group-name::first-letter { text-transform: uppercase; }
.log-item { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; border-radius: var(--radius-m); background: var(--soft); }
.log-item .avatar { width: 32px; height: 32px; font-size: 12px; }
.log-text { font-size: 13px; line-height: 1.45; }
.log-changes { margin: 4px 0 0; padding: 0; list-style: none; font-size: 12px; color: var(--text-2); display: flex; flex-direction: column; gap: 2px; }
.log-changes span { color: var(--muted); }
.log-time { font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- Fábrica: estoque x a produzir ---------- */
.stock-bar { height: 10px; border-radius: 999px; background: var(--card); overflow: hidden; }
.stock-bar > span { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.stock-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--text-2); }
.stock-legend span { display: inline-flex; align-items: center; gap: 6px; }
.stock-legend .sq { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.stock-legend .sq.em { background: var(--brand); }
.stock-legend .sq.falta { background: var(--card); border: 1.5px solid var(--line-strong); }
.item-sub { font-size: 12px; font-weight: 600; color: var(--text-2); }
.tag-fase { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-text); }

/* ---------- Custos ---------- */
.item-cost { font-size: 12px; color: var(--text-2); }
.item-cost b { color: var(--ink); }
.item-cost .warn { color: var(--late-ink); font-weight: 600; }
.cost-box { background: var(--soft); border-radius: var(--radius-m); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.cost-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cost-list li { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: baseline; font-size: 13px; }
.cost-list .sub { font-size: 12px; color: var(--muted); }

/* ---------- Custos e resultado ---------- */
.tabs { display: flex; gap: 4px; background: var(--chip); padding: 4px; border-radius: 14px; }
.tabs button { flex: 1; border: 0; background: transparent; min-height: 40px; border-radius: 10px; font-weight: 700; font-size: 13px; }
.tabs button.on { background: var(--card); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.result { display: flex; flex-direction: column; background: var(--soft); border-radius: var(--radius-m); padding: 6px 14px; }
.result-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.result-row:last-child { border-bottom: 0; }
.result-row span { display: flex; flex-direction: column; gap: 2px; }
.result-row small { font-size: 11px; color: var(--muted); font-weight: 500; }
.result-row b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.result-row.neg b { color: var(--text-2); font-weight: 600; }
.result-row.strong b { font-size: 16px; }
.result-row.total { font-weight: 800; font-size: 15px; }
.result-row.total b { font-size: 18px; }
.result-row.total.pos b, .item-cost b.pos { color: var(--brand-text); }
.result-row.total.bad b, .item-cost b.bad { color: var(--red); }
.lanc-form { display: flex; flex-direction: column; gap: 10px; background: var(--brand-soft); border-radius: var(--radius-m); padding: 14px; }
:root[data-tema="escuro"] .lanc-form { background: var(--soft); }
.lanc-fields { display: flex; flex-wrap: wrap; gap: 10px; }
.lanc-fields .field { flex: 1 1 140px; }
.lanc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.lanc-list li { display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--soft); font-size: 13px; }
.lanc-desc { display: flex; flex-direction: column; min-width: 0; }
.lanc-desc small { font-size: 11px; color: var(--muted); }
.tipo-tag { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; color: var(--on-pastel); }
.tipo-tag.material { background: var(--lav); }
.tipo-tag.combustivel { background: var(--yellow); }
.tipo-tag.despesa { background: var(--peach); }
.x-btn { border: 0; background: var(--chip); width: 30px; height: 30px; border-radius: 50%; font-size: 16px; line-height: 1; }
.cost-chip {
  border: 1px dashed var(--line-strong); background: transparent; color: var(--muted); border-radius: 999px;
  min-height: 24px; padding: 0 8px; font-size: 11px; font-weight: 700; opacity: 0; transition: opacity .15s;
}
.cell:hover .cost-chip, .cost-chip:focus-visible, .cost-chip.has { opacity: 1; }
.cost-chip.has { border: 0; background: var(--yellow); color: var(--yellow-ink); }
@media (hover: none) { .cost-chip { opacity: .7; } }
table.fin { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 980px; font-size: 13px; }
.fin th, .fin td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fin thead th { background: var(--soft); font-size: 12px; color: var(--muted); font-weight: 700; position: sticky; top: 0; }
.fin th[scope="row"], .fin thead th:first-child { text-align: left; position: sticky; left: 0; background: var(--card); z-index: 1; white-space: normal; min-width: 180px; }
.fin thead th:first-child { background: var(--soft); }
.fin th small, .fin td small { display: block; font-size: 11px; color: var(--muted); font-weight: 500; }
.fin td small.warn { color: var(--late-ink); }
.fin tr.sep td { background: var(--chip); text-align: left; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.fin tr.subtotal th, .fin tr.subtotal td { font-weight: 800; background: var(--soft); }
.fin td.pos { color: var(--brand-text); font-weight: 700; }
.fin td.bad { color: var(--red); font-weight: 700; }

/* ---------- Custo do funcionário ---------- */
.custo-box { background: var(--soft); border-radius: var(--radius-m); padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.money-input {
  display: flex; align-items: center; gap: 10px; background: var(--field); border: 2px solid var(--line);
  border-radius: var(--radius-m); padding: 0 18px; min-height: 68px;
}
.money-input:focus-within { border-color: var(--brand); }
.money-input span { font-size: 22px; font-weight: 700; color: var(--muted); }
.money-input .per { font-size: 15px; font-weight: 600; }
.money-input input {
  flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: var(--ink);
  font-size: 30px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
.hist ul { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.hist li { display: flex; justify-content: space-between; font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.hist li:last-child { border-bottom: 0; }
.hist li span { color: var(--muted); }
.due.concl { background: var(--brand-soft); color: var(--brand-text); }

/* ---------- Sub-abas do menu ---------- */
.nav button.parent { font-weight: 700; color: var(--brand-text); }
.nav button.sub { min-height: 38px; margin-left: 48px; padding: 0 12px; font-size: 14px; font-weight: 600; color: var(--text-2); border-radius: 12px; }
.nav button.sub.on { background: var(--soft); color: var(--brand-text); font-weight: 700; }
@media (max-width: 640px) { .nav button.sub { margin-left: 0; border-left: 0; border-radius: 14px; } }

/* ---------- Planilha de obras ---------- */
.view-toggle { min-width: 200px; }
table.sheet { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 1100px; font-size: 13px; }
.sheet th, .sheet td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; white-space: nowrap; }
.sheet thead th { background: var(--soft); position: sticky; top: 0; z-index: 2; padding: 0; }
.th-sort { border: 0; background: transparent; width: 100%; text-align: left; padding: 10px 8px; font-size: 12px; font-weight: 700; color: var(--muted); }
.th-sort:hover { color: var(--ink); }
.sheet th.num .th-sort, .sheet td.num { text-align: right; }
.sheet tbody th[scope="row"] { position: sticky; left: 0; background: var(--card); z-index: 1; min-width: 190px; white-space: normal; }
.sheet tbody tr:hover td, .sheet tbody tr:hover th { background: var(--soft); }
.sheet tbody tr.sel td, .sheet tbody tr.sel th { background: var(--brand-soft); }
.sheet small { display: block; font-size: 11px; color: var(--muted); font-weight: 500; }
.sheet .ck { width: 36px; text-align: center; }
.sheet .ck input { width: 18px; height: 18px; accent-color: var(--brand); }
.link-cell { border: 0; background: none; padding: 0; font-weight: 700; color: var(--ink); text-align: left; cursor: pointer; }
.link-cell:hover { color: var(--brand-text); text-decoration: underline; }
.cell-input {
  border: 1.5px solid transparent; background: transparent; border-radius: 8px; min-height: 34px; padding: 0 6px; color: var(--ink);
}
.cell-input:hover:not(:disabled) { border-color: var(--line); background: var(--field); }
.cell-input:focus { border-color: var(--brand); background: var(--field); outline: none; }
.cell-input:disabled { opacity: .7; }
.cell-input[type=number] { width: 64px; }
.cell-input.num { width: 110px; text-align: right; }
.pct-cell { display: inline-flex; align-items: center; gap: 6px; }
.mini-bar { width: 60px; height: 5px; border-radius: 999px; background: var(--line); overflow: hidden; display: inline-block; }
.mini-bar > span { display: block; height: 100%; background: var(--brand); }
.pct-ro { font-weight: 700; padding-left: 6px; }
.sheet td.pos { color: var(--brand-text); font-weight: 700; }
.sheet td.bad { color: var(--red); font-weight: 700; }
.bulk {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; padding: 12px 14px; border-radius: var(--radius-m);
  background: var(--brand-soft); position: sticky; top: 8px; z-index: 5;
}
.bulk .field { flex: 0 1 150px; }
.bulk-count { font-weight: 800; align-self: center; margin-right: 6px; color: var(--brand-text); }
.cell-input.cli { width: 150px; }
.spec-fixa { min-height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: var(--radius-s); background: var(--field); border: 1.5px dashed var(--line); font-weight: 700; }
.spec-fixa small { font-size: 11px; font-weight: 600; color: var(--muted); }

/* ---------- Início ---------- */
.home-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.today-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.today-card { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--radius-m); background: var(--soft); border: 2px solid transparent; }
.today-card.sit-semana { border-color: var(--yellow-line); }
.today-card.sit-urgente { border-color: var(--red-line); }
.today-card.sit-atrasada { border-color: var(--red); }
.today-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.today-name { font-weight: 800; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.today-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.today-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.t-chip { display: inline-flex; align-items: center; min-height: 30px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--lav); color: var(--on-pastel); }
.t-chip.veic { background: var(--mint); }
.t-chip.folga { background: #E1E4E9; }
.t-chip.ferias { background: var(--yellow); }
.t-chip.livre { background: var(--card); color: var(--ink); border: 1.5px solid var(--line); }
.home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; align-items: start; }
.card-title .count { margin-left: 6px; vertical-align: middle; }
.plain-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.plain-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--soft); }
.pl-name { flex: 1; min-width: 0; font-weight: 700; font-size: 13px; }
.pl-name small { display: block; font-weight: 500; font-size: 11px; color: var(--muted); }
.warn-text { color: var(--late-ink); font-weight: 600; }
@media (max-width: 640px) {
  .home-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .home-stats .stat { padding: 14px; }
  .home-stats .stat-value { font-size: 28px; }
  .today-list { grid-template-columns: 1fr; }
}
.brand-logo { width: 44px; height: 44px; flex: none; display: block; }

/* ---------- Cores de série (gráficos e tipos de demanda: tons de azul) ---------- */
:root {
  --t-res: #0E9CC9; --t-tel: #1F6FD1; --t-ind: #4B4FC4; --t-pre: #0B3A73;
  --ph-1: #CFE2F8; --ph-2: #8DBDF0; --ph-3: #3B86DA; --ph-4: #0A5BB0; --ph-5: #0B3A73;
  --ph-ink-1: #0B3A73; --ph-ink-2: #0B3A73; --ph-ink-3: #fff; --ph-ink-4: #fff; --ph-ink-5: #fff;
  --brand-plan: #A9CEF5;
}
:root[data-tema="escuro"] {
  --t-res: #3CC0EA; --t-tel: #4C93EC; --t-ind: #8E92F0; --t-pre: #A6CBF5;
  --ph-1: #1C3A5C; --ph-2: #24578F; --ph-3: #2F7BD0; --ph-4: #5B9EEA; --ph-5: #A6CBF5;
  --ph-ink-1: #CFE2F8; --ph-ink-2: #E6F0FC; --ph-ink-3: #fff; --ph-ink-4: #0B1626; --ph-ink-5: #0B1626;
  --brand-plan: #24578F;
}

/* ---------- Painel (computador / TV) ---------- */
.painel { display: flex; flex-direction: column; gap: var(--gap-main); }
.painel-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.painel-head h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; }
.painel-head .date::first-letter { text-transform: uppercase; }
.painel-clock { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; text-align: right; line-height: 1; }
.painel-clock small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-top: 4px; }
.kpis { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; }
.kpi { min-width: 0; }
.kpi.stat { padding: 16px; }
.kpi.stat .stat-value { font-size: 32px; }
.kpi-meter { background: var(--card); border-radius: 22px; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.kpi-l { color: var(--text-2) !important; }
.kpi-v { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi-h { font-size: 12px; color: var(--muted); }
.meter { display: block; height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: 999px; background: var(--brand); }
.meter.big { height: 10px; }
.painel-grid { display: grid; gap: 16px; align-items: start; }
.painel-grid.g-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.chart-box { position: relative; display: flex; flex-direction: column; gap: 10px; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .ref { stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 5 4; }
.chart .axis { fill: var(--muted); font-size: 11px; font-weight: 600; }
.chart .axis-bad { fill: var(--red); }
.chart .axis-today { fill: var(--brand-text); font-weight: 800; }
.chart .val { fill: var(--ink); font-size: 12px; font-weight: 800; }
.chart .val-bad { fill: var(--red); }
.chart .bar-real { fill: var(--brand); }
.chart .bar-today { fill: var(--ph-4); }
.chart .bar-plan { fill: var(--brand-plan); }
.legenda { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--text-2); font-weight: 600; }
.legenda span { display: inline-flex; align-items: center; gap: 6px; }
.legenda i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.chart-tip {
  position: absolute; transform: translate(-50%, calc(-100% - 8px)); z-index: 5; pointer-events: none;
  background: var(--ink); color: var(--on-ink); border-radius: 12px; padding: 8px 12px; font-size: 12px;
  display: flex; flex-direction: column; gap: 2px; min-width: 150px; max-width: 260px; box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
.chart-tip span { display: inline-flex; align-items: center; gap: 6px; }
.chart-tip i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.chart-tip small { opacity: .8; margin-top: 2px; }
.hbars { display: flex; flex-direction: column; gap: 14px; padding: 4px 0; }
.hbar-row { display: grid; grid-template-columns: 150px 1fr; gap: 10px; align-items: center; }
.hbar-label { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; }
.hbar-label b { margin-left: auto; color: var(--muted); font-size: 12px; }
.hbar { display: flex; gap: 2px; height: 30px; border-radius: 8px; overflow: hidden; background: var(--soft); }
.hseg { display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; min-width: 22px; cursor: default; }
.andamentos { display: flex; flex-direction: column; gap: 18px; }
.and-row { display: flex; flex-direction: column; gap: 6px; }
.and-top { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; }
.and-top span { display: inline-flex; align-items: center; gap: 8px; }
.and-top b { font-size: 22px; font-weight: 800; }
.painel-today { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.t-chip.sem { background: var(--soft); color: var(--ink); border: 1.5px solid var(--line); }
.t-chip.sem.sit-atrasada, .t-chip.sem.sit-urgente { border-color: var(--red); color: var(--red-text); }
.t-chip.sem.sit-semana { border-color: var(--yellow-dot); }
.tv .painel-head h1 { font-size: 40px; }
.tv .painel-clock { font-size: 48px; }
@media (max-width: 1400px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- Sub-aba de segundo nível (Obras → Calendário) ---------- */
.nav button.sub.n2 { margin-left: 34px; }
@media (max-width: 640px) { .nav button.sub.n2 { margin-left: 0; } }

/* =====================================================================
   App do campo (uma tela só, feita para o celular)
   ===================================================================== */
.campo { max-width: 560px; margin: 0 auto; min-height: var(--vh); padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) calc(40px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); display: flex; flex-direction: column; gap: 16px; background: var(--shell); }
.campo-topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0; }
.campo-topo .brand { margin: 0; padding: 0; display: flex; align-items: center; gap: 10px; }
.campo-topo .brand-logo { width: 36px; height: 36px; }
.campo-ola { display: flex; flex-direction: column; gap: 4px; padding-top: 8px; }
.campo-ola h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.campo-ola .link-btn { align-self: flex-start; color: var(--brand-text); font-size: 13px; }
.campo-data { font-size: 14px; color: var(--muted); }
.campo-msg { background: var(--mint); color: var(--ink); border-radius: 18px; padding: 14px 16px; font-size: 15px; font-weight: 600; line-height: 1.45; }
[data-tema="escuro"] .campo-msg { background: #1C3A5C; }
.campo-obra { background: var(--card); border-radius: var(--radius-l); padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.campo-rot { font-size: 13px; font-weight: 700; color: var(--muted); }
.campo-obra-item { display: flex; flex-direction: column; gap: 2px; }
.campo-obra-item strong { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.campo-obra-item span { font-size: 14px; color: var(--text-2); }
.campo-obra-item + .campo-obra-item { border-top: 1px solid var(--line); padding-top: 10px; }
.campo-livre { font-size: 18px; font-weight: 700; }
.campo-novo { width: 100%; min-height: 64px; border: 0; border-radius: 20px; background: var(--brand); color: var(--brand-ink, #fff); font-size: 19px; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 10px; box-shadow: 0 6px 18px rgba(4, 107, 210, .28); }
.campo-novo span { font-size: 28px; line-height: 1; font-weight: 600; }
.campo-novo:disabled { background: var(--line-strong); color: var(--text-2); box-shadow: none; cursor: default; }
.campo-hoje { background: var(--card); border-radius: var(--radius-l); padding: 18px; display: flex; flex-direction: column; gap: 4px; }
.campo-hoje h2 { font-size: 16px; font-weight: 800; margin-bottom: 6px; }
.campo-check { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px; min-height: 44px; border-top: 1px solid var(--line); font-size: 15px; }
.campo-check:first-of-type { border-top: 0; }
.campo-check-ic { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-items: center; font-size: 13px; font-weight: 800; }
.campo-check.feito .campo-check-ic { background: var(--brand); border-color: var(--brand); color: #fff; }
.campo-check-nome { font-weight: 700; }
.campo-check-pend { font-size: 13px; color: var(--muted); }
.campo-check .link-btn { color: var(--brand-text); font-size: 13px; }
.campo-quem { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.campo-quem button { min-height: 56px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); font-size: 16px; font-weight: 700; }

/* folha do novo relatório (tela cheia no celular) */
.campo-folha { position: fixed; inset: 0; z-index: 60; background: var(--shell); overflow-y: auto; display: flex; flex-direction: column; }
.campo-folha > * { width: 100%; max-width: 560px; margin-left: auto; margin-right: auto; }
.campo-folha-topo { position: sticky; top: 0; z-index: 2; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: max(12px, env(safe-area-inset-top)) 16px 12px; background: var(--shell); border-bottom: 1px solid var(--line); }
.campo-folha-topo > :last-child { justify-self: end; }
.campo-folha-topo strong { font-size: 16px; font-weight: 800; }
.campo-tipos { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.campo-tipo { min-height: 72px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); padding: 12px 18px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; text-align: left; }
.campo-tipo:not(:disabled):hover, .campo-tipo:not(:disabled):active { border-color: var(--brand); }
.campo-tipo-nome { font-size: 18px; font-weight: 800; }
.campo-tipo-desc { font-size: 13px; color: var(--muted); }
.campo-tipo.breve { opacity: .55; cursor: default; background: var(--chip); }
.campo-form { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.campo-form select, .campo-form textarea { font-size: 16px; }
.campo-fotos-head { display: flex; justify-content: space-between; align-items: baseline; }
.campo-fotos-head strong { font-size: 16px; }
.campo-fotos-head .falta { font-size: 14px; font-weight: 700; color: var(--late-ink); }
.campo-fotos-head .okk { font-size: 14px; font-weight: 700; color: var(--brand-text); }
.campo-botoes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.campo-add { min-height: 76px; border-radius: 18px; border: 2px dashed var(--line-strong); background: var(--card); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.campo-add b { font-size: 16px; font-weight: 800; color: var(--brand-text); }
.campo-add span { font-size: 12px; color: var(--muted); }
.campo-add.fino { min-height: 56px; width: 100%; }
.campo-add:disabled { opacity: .5; cursor: default; }
.campo-grade { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.campo-mini { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--chip); }
.campo-mini img { width: 100%; height: 100%; object-fit: cover; display: block; }
.campo-mini button { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .6); color: #fff; font-size: 18px; line-height: 1; }
.campo-mini.carregando { background: linear-gradient(90deg, var(--chip), var(--line), var(--chip)); background-size: 200% 100%; animation: brilho 1.1s linear infinite; }
@keyframes brilho { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.campo-video-item { display: grid; grid-template-columns: 96px 1fr auto; gap: 10px; align-items: center; background: var(--card); border-radius: 16px; padding: 8px; font-size: 14px; }
.campo-video-item video { width: 96px; height: 64px; object-fit: cover; border-radius: 10px; background: #000; }
.campo-video-item .link-btn { color: var(--late-ink); }
.campo-enviar { position: sticky; bottom: 0; padding: 10px 0 calc(16px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--shell) 22%); display: flex; flex-direction: column; gap: 6px; align-items: center; }
.campo-status { padding: 48px 24px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.campo-status strong { font-size: 22px; font-weight: 800; }
.campo-status .meter { width: 100%; max-width: 320px; height: 10px; }
.campo-spin { width: 48px; height: 48px; border-radius: 50%; border: 5px solid var(--line); border-top-color: var(--brand); animation: gira 0.9s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }
.campo-ok { width: 72px; height: 72px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 36px; font-weight: 800; }
@media (prefers-reduced-motion: reduce) { .campo-spin, .campo-mini.carregando { animation: none; } }

/* =====================================================================
   Relatórios de obra (administradores)
   ===================================================================== */
.aviso-banco { display: flex; flex-direction: column; gap: 4px; background: var(--yellow); color: #3a2c00; font-size: 14px; }
.rel-barra { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.rel-modos { width: 260px; }
.rel-nav { display: flex; align-items: center; gap: 8px; }
.rel-nav .pill { min-width: 40px; justify-content: center; }
.rel-rotulo { font-size: 16px; font-weight: 800; min-width: 130px; text-align: center; }
.rel-legenda { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); margin-left: auto; }
.rel-legenda span { display: inline-flex; align-items: center; gap: 6px; }
.rel-legenda i.rel-pill { width: 14px; min-height: 14px; height: 14px; padding: 0; }

.rel-pill { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; border: 1.5px solid transparent; white-space: nowrap; }
.rel-pill.enviado { background: var(--brand); color: #fff; border-color: var(--brand); cursor: pointer; }
button.rel-pill.enviado:hover { filter: brightness(1.1); }
.rel-pill.pendente { background: transparent; color: var(--muted); border-color: var(--line-strong); border-style: dashed; }
.rel-pill.faltou { background: var(--late-bg); color: var(--late-ink); border-color: var(--late-bg); }

.rel-semana { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 10px; align-items: start; }
.rel-col { padding: 12px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.rel-col.hoje { outline: 2px solid var(--brand); outline-offset: -2px; }
.rel-col-head { border: 0; background: none; padding: 0 0 6px; text-align: left; display: flex; flex-direction: column; gap: 4px; border-bottom: 1px solid var(--line); }
.rel-col-head:hover .rel-dia { color: var(--brand-text); }
.rel-dia { font-size: 14px; font-weight: 800; }
.rel-dia em { font-style: normal; color: var(--brand-text); }
.rel-resumo { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--muted); }
.rel-resumo b { color: var(--ink); }
.rel-resumo.grande { font-size: 14px; }
.rel-resumo .meter { height: 5px; }
.meter.ruim > span { background: var(--late-ink); }
.rel-sec { font-size: 11px; font-weight: 800; color: var(--brand-text); text-transform: uppercase; letter-spacing: .04em; margin-top: 2px; }
.rel-obra { background: var(--soft); border: 1px solid var(--line); border-radius: 14px; padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rel-obra-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rel-obra-top strong { font-size: 13.5px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rel-obra-top .dot { flex: none; }
.rel-pessoas { font-size: 11.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rel-pills { display: flex; flex-wrap: wrap; gap: 4px; }
.rel-pills .rel-pill { min-height: 22px; padding: 0 7px; font-size: 11px; }
.rel-parados { font-size: 12.5px; }
.rel-parados summary { cursor: pointer; font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 6px 0 4px; }
.rel-parada { display: flex; align-items: center; gap: 6px; min-height: 26px; color: var(--text-2); min-width: 0; }
.rel-parada .dot { flex: none; width: 7px; height: 7px; opacity: .6; }
.rel-parada-nome { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rel-parada .rel-pill { min-height: 20px; padding: 0 6px; font-size: 10.5px; }

.rel-dia-resumo { max-width: 420px; }
.rel-h2 { font-size: 17px; font-weight: 800; margin-top: 4px; }
.rel-grade-dia { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; align-items: start; }
.rel-obra-g { display: flex; flex-direction: column; gap: 12px; }
.rel-obra-g h3 { font-size: 18px; font-weight: 800; }
.rel-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rel-linha { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); padding-top: 10px; }
.rel-linha-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rel-tira { border: 0; background: none; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; text-align: left; cursor: pointer; }
.rel-tira img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; background: var(--chip); }
.rel-mais { width: 56px; height: 56px; border-radius: 8px; background: var(--chip); display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.rel-tira-obs { flex-basis: 100%; font-size: 12.5px; color: var(--text-2); font-style: italic; }
.rel-parados-dia { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px 18px; }

.rel-mes { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.rel-mes-dow { font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; padding: 0 6px 4px; }
.rel-mes-dia { min-height: 96px; border: 1px solid var(--line); background: var(--soft); border-radius: 14px; padding: 8px; display: flex; flex-direction: column; align-items: stretch; gap: 3px; text-align: left; }
.rel-mes-dia:hover:not(:disabled) { border-color: var(--brand); }
.rel-mes-dia.fora { background: transparent; border-style: dashed; opacity: .4; cursor: default; }
.rel-mes-dia.hoje { outline: 2px solid var(--brand); outline-offset: -2px; }
.rel-mes-dia.ruim .rel-mes-info b { color: var(--late-ink); }
.rel-mes-num { font-size: 15px; font-weight: 800; }
.rel-mes-info { font-size: 11.5px; color: var(--text-2); }
.rel-mes-info b { color: var(--ink); }
.rel-mes-dia .meter { height: 4px; margin-top: auto; }

/* visualizador */
.rel-modal { max-width: 920px; }
.rel-obs { background: var(--chip); border-radius: 14px; padding: 10px 14px; font-size: 14px; font-style: italic; }
.rel-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.rel-foto { border: 0; padding: 0; background: var(--chip); border-radius: 12px; overflow: hidden; aspect-ratio: 1; cursor: zoom-in; }
.rel-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rel-video { width: 100%; max-height: 420px; border-radius: 14px; background: #000; }
.rel-acoes { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 12px; }
.danger-text { color: var(--late-ink); }
.rel-luz { position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, .92); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 16px; }
.rel-luz img { max-width: 100%; max-height: calc(var(--vh) - 110px); object-fit: contain; border-radius: 8px; }
.rel-luz-barra { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 10px; color: #fff; font-weight: 700; padding-bottom: env(safe-area-inset-bottom); }
.rel-luz-barra .pill { background: rgba(255, 255, 255, .14); color: #fff; border: 0; text-decoration: none; }

@media (max-width: 1100px) {
  .rel-semana { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .rel-semana { grid-template-columns: 1fr; }
  .rel-legenda { margin-left: 0; }
  .rel-modos { width: 100%; }
  .rel-grade-dia { grid-template-columns: 1fr; }
  .rel-mes { gap: 3px; padding: 10px; }
  .rel-mes-dia { min-height: 64px; padding: 5px; border-radius: 10px; }
  .rel-mes-info { font-size: 10px; }
  .campo-grade { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Desfazer no registro de atividades ---------- */
.log-lado { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; max-width: 46%; text-align: right; }
.log-desfazer { border: 1px solid var(--line-strong); background: var(--card); border-radius: 999px; min-height: 30px; padding: 0 12px; font-size: 12px; font-weight: 700; color: var(--brand-text); white-space: nowrap; }
.log-desfazer:hover:not(:disabled) { border-color: var(--brand); }
.log-desfazer:disabled { opacity: .6; cursor: default; }
.log-desfeita { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.log-item.desfeita .log-text, .log-item.desfeita .log-changes { text-decoration: line-through; text-decoration-color: var(--line-strong); opacity: .7; }
.log-tag { display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 700; color: var(--brand-text); background: var(--chip); border-radius: 999px; padding: 1px 8px; }
.log-confirma { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px; font-size: 12px; }
.log-confirma .pill { min-height: 30px; font-size: 12px; padding: 0 12px; }
.log-erro { font-size: 12px; color: var(--late-ink); font-weight: 600; }
@media (max-width: 640px) { .log-item { flex-wrap: wrap; } .log-lado { max-width: none; width: 100%; align-items: flex-start; text-align: left; padding-left: 44px; } }

/* campo: frase do dia, frota, confirmação de nome */
.campo-frase { font-size: 17px; font-weight: 600; color: var(--brand-text); line-height: 1.4; margin-top: 2px; }
.campo-frota { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 8px; padding: 10px 12px; border-radius: 14px; background: var(--mint); }
[data-tema="escuro"] .campo-frota { background: #1C3A5C; }
.campo-frota .campo-rot { width: 100%; }
.campo-frota b { font-size: 16px; font-weight: 800; }
.campo-frota b small { font-size: 13px; font-weight: 600; color: var(--text-2); }
.campo-frota.sem { background: var(--chip); }
.campo-frota.sem b { font-size: 14px; font-weight: 700; color: var(--muted); }
.campo-confirma { background: var(--card); border-radius: var(--radius-l); padding: 22px; display: flex; flex-direction: column; gap: 12px; align-items: stretch; text-align: center; }
.campo-confirma strong { font-size: 28px; font-weight: 800; }
.frase-hoje { background: var(--mint); border-radius: 14px; padding: 12px 14px; font-weight: 700; }
[data-tema="escuro"] .frase-hoje { background: #1C3A5C; }
.frase-hoje span { font-weight: 600; color: var(--text-2); margin-right: 4px; }
.frases-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.frases-lista li { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 12px; background: var(--soft); font-size: 14px; }
.frases-lista li span { flex: 1; }
.frases-lista li.off span { color: var(--muted); text-decoration: line-through; }
.frases-lista li .link-btn { font-size: 12px; color: var(--brand-text); }
.frases-lista li .link-btn.danger-text { color: var(--late-ink); }
.frases-lista.padrao li { background: transparent; padding: 4px 12px; color: var(--text-2); }
.campo-linha2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 420px) { .campo-linha2 { grid-template-columns: 1fr; } }
.rel-add { font-size: 12px; color: var(--brand-text); margin-left: auto; }

/* ---------- Calendário de obras ---------- */
.pin-rel { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 700; border: 1.5px solid transparent; white-space: nowrap; }
.pin-rel.ok { background: var(--brand); color: #fff; border-color: var(--brand); cursor: pointer; }
button.pin-rel.ok:hover { filter: brightness(1.1); }
.pin-rel.pend { background: transparent; color: var(--muted); border: 1.5px dashed var(--line-strong); }
.pin-rel.faltou { background: var(--late-bg); color: var(--late-ink); }
.pin-rel.lg, .cost-chip.lg { width: 14px; min-height: 14px; height: 14px; padding: 0; display: inline-block; }
.lg-chip { display: inline-block; width: 14px; height: 14px; border-radius: 5px; }
.lg-chip.func { background: var(--lav); }
.lg-chip.veic { background: var(--mint); }
.agenda.um-dia .cal th.rowhead, .agenda.um-dia .cal td.rowhead { width: 260px; }
.agenda.um-dia .cell-inner { flex-direction: row; flex-wrap: wrap; align-items: center; }
.cal-mes .rel-mes-dia { min-height: 112px; }
.cal-mes-pins { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 2px; }
.cm { display: inline-flex; gap: 3px; align-items: baseline; font-size: 10.5px; font-weight: 600; padding: 1px 6px; border-radius: 999px; color: var(--ink); white-space: nowrap; }
.cm b { font-weight: 800; }
.cm.obra { background: var(--chip); }
.cm.func { background: var(--lav); }
.cm.veic { background: var(--mint); }
.cm.rel { background: var(--brand); color: #fff; }
.cm.faltou { background: var(--late-bg); color: var(--late-ink); }
.cm.custo { background: var(--yellow); color: #3a2c00; }
.cm.func, .cm.veic { color: var(--on-pastel); }
.cm .cm-curto { display: none; }
@media (max-width: 720px) { .cal-mes .rel-mes-dia { min-height: 72px; } .cm { font-size: 9.5px; padding: 0 4px; } .cm .cm-longo { display: none; } .cm .cm-curto { display: inline; } }
/* "+ R$" / "+ custo" só aparece ao passar o mouse na célula (no celular fica sempre visível) */
@media (hover: hover) {
  .cal .cell .cost-chip:not(.has) { opacity: 0; transition: opacity .12s; }
  .cal .cell:hover .cost-chip:not(.has), .cal .cell .cost-chip:focus-visible { opacity: 1; }
}

/* ---------- Início: saudação (hero) ---------- */
.hero { position: relative; overflow: hidden; display: flex; justify-content: space-between; gap: 24px; padding: 28px 32px; border-radius: 28px;
  background: linear-gradient(135deg, #046BD2 0%, #0A4FA0 100%); color: #fff; }
.hero::after { content: ''; position: absolute; right: -80px; top: -120px; width: 360px; height: 360px; border-radius: 50%; background: rgba(255, 255, 255, .07); pointer-events: none; }
.hero.fin { background: linear-gradient(135deg, #0B3A73 0%, #046BD2 100%); }
.hero-txt { display: flex; flex-direction: column; gap: 6px; min-width: 0; z-index: 1; }
.hero-data { font-size: 14px; opacity: .8; }
.hero-data::first-letter { text-transform: uppercase; }
.hero h1 { font-size: 40px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }
.hero-linha { font-size: 22px; font-weight: 600; line-height: 1.3; }
.hero-linha b { font-weight: 800; }
.hero.fin .hero-linha b { font-size: 34px; letter-spacing: -0.02em; display: inline-block; margin-left: 4px; }
.hero-alerta { color: #FFD9C7; }
.hero-frase { font-size: 15px; opacity: .85; margin-top: 4px; font-style: italic; }
.hero-lado { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 12px; z-index: 1; flex: none; }
.hero-acoes { display: flex; gap: 8px; align-items: center; }
.hero-seg { display: flex; background: rgba(255, 255, 255, .16); padding: 4px; border-radius: 999px; }
.hero-seg button { border: 0; background: transparent; color: #fff; font-weight: 700; font-size: 13px; padding: 8px 16px; border-radius: 999px; min-height: 36px; }
.hero-seg button.on { background: #fff; color: #0A4FA0; }
.hero-btn { border: 0; background: rgba(255, 255, 255, .16); color: #fff; font-weight: 700; font-size: 13px; padding: 0 16px; border-radius: 999px; min-height: 44px; }
.hero-btn:hover, .hero-seg button:not(.on):hover { background: rgba(255, 255, 255, .26); }
.hero .painel-clock { color: #fff; }
.hero .painel-clock small { color: rgba(255, 255, 255, .7); }
.hero-mes { display: flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, .14); border-radius: 999px; padding: 4px; font-weight: 700; font-size: 13px; }
.hero-mes button { border: 0; background: rgba(255, 255, 255, .18); color: #fff; width: 32px; height: 32px; border-radius: 50%; font-size: 16px; }
.hero-mes button:disabled { opacity: .35; cursor: default; }
.hero-mes span { min-width: 130px; text-align: center; }
.tv .hero h1 { font-size: 48px; }
.painel-sec { font-size: 20px; font-weight: 800; margin-top: 8px; }

/* hoje em cartões */
.hoje { display: flex; flex-direction: column; gap: 16px; }
.hoje-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.hoje-tile { border: 0; text-align: left; border-radius: 22px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; background: var(--card); color: var(--ink); min-width: 0; }
button.hoje-tile:hover { box-shadow: inset 0 0 0 2px var(--brand); }
.hoje-tile-l { font-size: 13px; font-weight: 700; color: var(--text-2); }
.hoje-tile-v { font-size: 40px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }
.hoje-tile-h { font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hoje-tile.t-agenda { background: var(--mint); color: var(--on-pastel); }
.hoje-tile.t-ativas { background: var(--lav); color: var(--on-pastel); }
.hoje-tile.t-agenda .hoje-tile-l, .hoje-tile.t-agenda .hoje-tile-h, .hoje-tile.t-ativas .hoje-tile-l, .hoje-tile.t-ativas .hoje-tile-h { color: var(--on-pastel); opacity: .8; }
.hoje-tile.t-atencao.tem { background: var(--late-bg); color: var(--late-ink); }
.hoje-tile.t-atencao.tem .hoje-tile-l, .hoje-tile.t-atencao.tem .hoje-tile-h { color: var(--late-ink); }
.equipes-hoje { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.equipe-card { border-radius: 16px; background: var(--soft); border: 1px solid var(--line); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.equipe-card.sit-atrasada, .equipe-card.sit-urgente { border-color: var(--late-ink); }
.equipe-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.equipe-top strong { font-size: 15px; font-weight: 800; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.equipe-top .due { font-size: 11px; }
.equipe-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.eq-chip { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; color: var(--on-pastel); }
.eq-chip.p { background: var(--lav); }
.eq-chip.v { background: var(--mint); }
.eq-chip.vazio { background: var(--chip); color: var(--muted); }
.frota-hoje { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.frota-hoje li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--soft); }
.frota-hoje li.uso { background: var(--mint); color: var(--on-pastel); }
.frota-n { display: flex; flex-direction: column; }
.frota-n small { font-size: 11.5px; opacity: .75; }
.frota-d { font-size: 13px; font-weight: 700; text-align: right; }
.frota-hoje li:not(.uso) .frota-d { color: var(--muted); font-weight: 600; }

/* ---------- Início: visão financeira ---------- */
.fin-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.fin-kpi { background: var(--card); border-radius: 22px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fin-kpi.destaque { background: var(--lav); color: var(--on-pastel); }
.fin-kpi-l { font-size: 13px; font-weight: 700; color: var(--text-2); }
.fin-kpi.destaque .fin-kpi-l { color: var(--on-pastel); opacity: .8; }
.fin-kpi-v { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fin-kpi-h { font-size: 12px; color: var(--text-2); }
.fin-kpi-h.bom { color: var(--brand-text); font-weight: 700; }
.fin-kpi-h.ruim { color: var(--late-ink); font-weight: 700; }
.chart .axis-strong { font-weight: 800; fill: var(--ink); }
.fin-custos { display: flex; flex-direction: column; gap: 12px; }
.fin-custo { display: grid; grid-template-columns: 110px 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.fin-custo-n { font-weight: 700; }
.fin-custo-bar { height: 12px; border-radius: 6px; background: var(--soft); overflow: hidden; }
.fin-custo-bar span { display: block; height: 100%; background: var(--brand); border-radius: 0 6px 6px 0; }
.fin-custo b { font-variant-numeric: tabular-nums; }
.fin-custo.total { border-top: 1px solid var(--line); padding-top: 10px; font-size: 14px; }
.fin-obras { display: flex; flex-direction: column; }
.fin-obra { display: grid; grid-template-columns: minmax(160px, 2fr) 1fr 1fr minmax(160px, 1.6fr) 80px; gap: 12px; align-items: center; padding: 10px 4px; border-top: 1px solid var(--line); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.fin-obra.cab { border-top: 0; font-size: 12px; font-weight: 700; color: var(--muted); }
.fin-obra-n { display: flex; align-items: center; gap: 8px; font-weight: 700; min-width: 0; }
.fin-obra-n small { color: var(--muted); font-weight: 500; }
.fin-obra > span:nth-child(4) { position: relative; display: flex; align-items: center; gap: 8px; }
.fin-res-bar { height: 8px; border-radius: 4px; max-width: 55%; flex: none; }
.fin-res-bar.pos { background: var(--brand); }
.fin-res-bar.neg { background: var(--late-ink); }
.fin-obra .pos { color: var(--brand-text); }
.fin-obra .bad { color: var(--late-ink); }
@media (max-width: 1400px) { .fin-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.equipe-top { flex-wrap: wrap; } .equipe-top strong { flex: 1 1 auto; }

/* ---------- Câmera dentro do app ---------- */
.cam { position: fixed; inset: 0; z-index: 90; background: #000; color: #fff; display: flex; flex-direction: column; }
.cam-topo { display: flex; justify-content: space-between; align-items: center; padding: max(12px, env(safe-area-inset-top)) 16px 12px; }
.cam-btn { border: 0; background: rgba(255, 255, 255, .16); color: #fff; font-weight: 700; font-size: 15px; min-height: 40px; min-width: 40px; padding: 0 14px; border-radius: 999px; }
.cam-btn:disabled { opacity: .4; }
.cam-conta { font-weight: 800; font-size: 15px; }
.cam-visor { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.cam-visor video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.cam-visor video.espelho { transform: scaleX(-1); }
.cam-flash { position: absolute; inset: 0; background: #fff; opacity: .7; pointer-events: none; }
.cam-msg { position: absolute; inset: auto 24px; text-align: center; display: flex; flex-direction: column; gap: 14px; font-size: 15px; line-height: 1.45; }
.cam-base { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 16px 16px max(20px, env(safe-area-inset-bottom)); }
.cam-previas { display: flex; gap: 4px; overflow: hidden; }
.cam-previas img { width: 40px; height: 40px; object-fit: cover; border-radius: 8px; border: 2px solid rgba(255, 255, 255, .7); flex: none; }
.cam-disparo { width: 76px; height: 76px; border-radius: 50%; border: 5px solid #fff; background: rgba(255, 255, 255, .9); box-shadow: 0 0 0 3px rgba(0, 0, 0, .5) inset; }
.cam-disparo:active:not(:disabled) { transform: scale(.92); background: #fff; }
.cam-disparo:disabled { opacity: .4; }
.cam-pronto { justify-self: end; border: 0; background: var(--brand); color: #fff; font-weight: 800; font-size: 16px; min-height: 48px; padding: 0 18px; border-radius: 999px; }
.cam-pronto:disabled { background: rgba(255, 255, 255, .2); color: rgba(255, 255, 255, .6); }
.campo-geo { font-size: 13px; font-weight: 600; padding: 8px 12px; border-radius: 12px; background: var(--chip); color: var(--text-2); }
.campo-geo.ok { background: var(--mint); color: var(--on-pastel); }
.campo-geo.negado { background: var(--late-bg); color: var(--late-ink); }
.campo-geo .link-btn { color: inherit; font-size: 13px; }
.campo-mini-hora, .rel-foto-hora { position: absolute; left: 4px; bottom: 4px; font-size: 10.5px; font-weight: 800; color: #fff; background: rgba(0, 0, 0, .55); padding: 1px 6px; border-radius: 6px; }
.rel-foto { position: relative; }
.rel-luz-barra .pill { display: inline-flex; align-items: center; min-height: 40px; }
/* gravador de vídeo */
.cam-disparo.video { background: #E53935; border-color: #fff; }
.cam-disparo.video.gravando { background: #fff; border-radius: 22%; width: 64px; height: 64px; box-shadow: inset 0 0 0 18px #E53935; }
.cam-rec { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #E53935; margin-right: 4px; animation: piscar 1s steps(2) infinite; }
@keyframes piscar { 50% { opacity: .2; } }
.cam-barra { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, .2); }
.cam-barra span { display: block; height: 100%; background: #E53935; }
.cam-info { text-align: center; font-size: 13px; font-weight: 700; opacity: .85; }
.campo-video-botoes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cam-carimbo { position: absolute; left: 12px; bottom: 16px; display: flex; flex-direction: column; gap: 2px; text-shadow: 0 1px 3px rgba(0, 0, 0, .8); font-size: 12px; font-weight: 600; pointer-events: none; }
.cam-carimbo .l1 { font-size: 16px; font-weight: 800; }

/* ---------- relatório salvo em tempo real ---------- */
.campo-salvo { font-size: 13px; font-weight: 600; color: var(--brand-text); background: var(--mint); border-radius: 12px; padding: 8px 12px; }
.campo-obra-fixa { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; background: var(--card); border-radius: 14px; padding: 10px 14px; }
.campo-obra-fixa strong { font-size: 18px; font-weight: 800; }
.campo-mini-nuvem { position: absolute; right: 4px; bottom: 4px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #fff; background: rgba(0, 0, 0, .55); }
.campo-mini-nuvem.ok { background: var(--brand); }
.campo-andamento { background: var(--card); border: 2px solid var(--brand); border-radius: var(--radius-l); padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.campo-andamento strong { font-size: 18px; font-weight: 800; }
.campo-andamento .campo-novo { margin-top: 6px; min-height: 56px; font-size: 17px; }
.campo-subindo { background: var(--mint); color: var(--on-pastel); border-radius: 18px; padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.campo-check-pend.andamento { color: var(--brand-text); font-weight: 700; }
.campo-pend { font-size: 15px; font-weight: 600; color: var(--text-2); max-width: 340px; line-height: 1.45; }
.campo-pend.ok { color: var(--brand-text); font-weight: 800; }
.campo-apagar-link { color: var(--late-ink); font-size: 13px; margin-top: 4px; }
.campo-apagar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; font-size: 13px; font-weight: 600; color: var(--late-ink); }
.campo-logo { border: 0; background: none; padding: 0; display: flex; align-items: center; gap: 10px; color: inherit; }
.rel-topo-acoes { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.rel-tag-andamento { margin-left: 8px; font-size: 11px; font-weight: 800; color: var(--brand-text); background: var(--mint); padding: 2px 8px; border-radius: 999px; }
.rel-video-box { display: flex; flex-direction: column; gap: 6px; }
.rel-video-info { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 13px; color: var(--text-2); }
.rel-video-info .link-btn { color: var(--brand-text); font-size: 13px; }
.rel-pill.andamento { background: transparent; color: var(--brand-text); border: 1.5px dashed var(--brand); }
.pin-rel.andamento { background: transparent; color: var(--brand-text); border: 1.5px dashed var(--brand); cursor: pointer; }

/* ---------- Relatórios: visão "Somente relatórios" ---------- */
.rel-status { width: 360px; margin-left: auto; }
.rel-card { border: 1px solid var(--line); background: var(--card); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 6px; text-align: left; min-width: 0; cursor: pointer; }
.rel-card:hover { border-color: var(--brand); }
.rel-card.andamento { border-style: dashed; border-color: var(--brand); }
.rel-card.compacto { background: var(--soft); padding: 9px 10px; border-radius: 14px; gap: 4px; }
.rel-card-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.rel-card-hora { font-size: 12px; font-weight: 700; color: var(--muted); }
.rel-card-obra { display: flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 800; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rel-card.compacto .rel-card-obra { font-size: 13px; }
.rel-card-obra .dot { flex: none; }
.rel-card-sub { font-size: 12.5px; color: var(--text-2); }
.rel-card.compacto .rel-card-sub { font-size: 11px; }
.rel-card-fotos { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.rel-card-fotos img, .rel-card-fotos .rel-mais { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; background: var(--chip); }
.rel-card.compacto .rel-card-fotos img, .rel-card.compacto .rel-card-fotos .rel-mais { width: 30px; height: 30px; border-radius: 6px; font-size: 11px; }
.cm.andamento { background: transparent; color: var(--brand-text); border: 1px dashed var(--brand); }
@media (max-width: 720px) { .rel-status { width: 100%; margin-left: 0; } }

/* ---------- Estoque de EPI ---------- */
.epi-abas { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 720px; }
.epi-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.epi-kpi { border: 0; text-align: left; background: var(--card); color: var(--ink); border-radius: 22px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
button.epi-kpi:hover { box-shadow: inset 0 0 0 2px var(--brand); }
.epi-kpi .l { font-size: 13px; font-weight: 700; color: var(--text-2); }
.epi-kpi b { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.epi-kpi .h { font-size: 12px; color: var(--text-2); }
.epi-kpi.ruim { background: var(--late-bg); color: var(--late-ink); }
.epi-kpi.ruim .l, .epi-kpi.ruim .h { color: var(--late-ink); }
.epi-kpi.atencao { background: var(--yellow); color: #3a2c00; }
.epi-kpi.atencao .l, .epi-kpi.atencao .h { color: #3a2c00; }
.epi-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.epi-lista li { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(60px, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--soft); font-size: 13.5px; }
.epi-lista.simples li { grid-template-columns: auto minmax(0, 1fr) auto; }
.epi-nome { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.epi-nome small { color: var(--muted); font-weight: 500; }
.epi-barra { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.epi-barra span { display: block; height: 100%; background: var(--late-ink); border-radius: 4px; }
.epi-num { font-weight: 800; font-variant-numeric: tabular-nums; }
.epi-num.ruim { color: var(--late-ink); }
.epi-ca { font-size: 12.5px; font-weight: 700; }
.epi-ca.vencido { color: var(--late-ink); }
.epi-ca.vence { color: #8a6100; }
.epi-mov { font-weight: 800; font-variant-numeric: tabular-nums; min-width: 38px; }
.epi-mov.saida { color: var(--late-ink); }
.epi-mov.entrada, .epi-mov.ajuste { color: var(--brand-text); }
.epi-top { grid-template-columns: minmax(120px, 1.2fr) 1fr auto; }
.epi-campos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.epi-campos .c2 { grid-column: span 2; }
.epi-tipo { width: 210px; }
.epi-tabela-wrap { overflow-x: auto; }
.epi-tabela { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.epi-tabela th { text-align: left; font-size: 12px; font-weight: 700; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.epi-tabela td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.epi-tabela .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.epi-tabela small { color: var(--muted); }
.epi-tabela .empty { text-align: center; padding: 18px; }
.epi-acoes { display: flex; gap: 10px; align-items: center; justify-content: flex-end; white-space: nowrap; }
.epi-acoes .link-btn { font-size: 12px; color: var(--brand-text); }
.epi-acoes .link-btn.danger-text { color: var(--late-ink); }
.epi-tag { display: inline-block; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; }
.epi-tag.epi { background: var(--lav); color: var(--on-pastel); }
.epi-tag.epc { background: var(--mint); color: var(--on-pastel); }
.epi-escolha { display: flex; flex-direction: column; gap: 4px; max-height: 260px; overflow-y: auto; margin-top: 6px; padding-right: 2px; }
.epi-op { display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; border: 1px solid var(--line); background: var(--soft); border-radius: 12px; padding: 9px 12px; font-size: 13.5px; }
.epi-op.on { border-color: var(--brand); background: var(--card); box-shadow: inset 0 0 0 1px var(--brand); }
.epi-op.zerado { opacity: .55; }
.epi-alerta { display: flex; gap: 10px; align-items: flex-start; background: var(--late-bg); color: var(--late-ink); border-radius: 12px; padding: 10px 12px; font-size: 13px; font-weight: 600; }
.epi-aviso { background: var(--yellow); color: #3a2c00; border-radius: 12px; padding: 8px 12px; font-size: 13px; font-weight: 600; }
.epi-ficha { display: flex; gap: 12px; align-items: center; border: 2px dashed var(--line-strong); border-radius: 14px; padding: 12px 14px; cursor: pointer; }
.epi-ficha.on { border-style: solid; border-color: var(--brand); background: var(--mint); color: var(--on-pastel); }
.epi-ficha input { width: 22px; height: 22px; accent-color: var(--brand); }
.epi-ficha span { display: flex; flex-direction: column; gap: 2px; }
.epi-ficha small { font-size: 12px; opacity: .8; }
.epi-ficha-tag { font-size: 11.5px; font-weight: 800; padding: 2px 9px; border-radius: 999px; background: var(--late-bg); color: var(--late-ink); border: 0; white-space: nowrap; }
button.epi-ficha-tag { cursor: pointer; }
.epi-ficha-tag.ok { background: var(--mint); color: var(--on-pastel); }
.epi-filtros { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 14px; align-items: start; }
.epi-periodo .row { gap: 6px; }
.epi-ver { width: 300px; }
.epi-obs { color: var(--muted); }
.epi-apagar { display: flex; gap: 8px; }
@media (max-width: 1200px) { .epi-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .epi-campos { grid-template-columns: repeat(2, minmax(0, 1fr)); } .epi-filtros { grid-template-columns: 1fr 1fr; } .epi-periodo { grid-column: span 2; } }
@media (max-width: 640px) { .epi-kpis { grid-template-columns: 1fr 1fr; } .epi-campos { grid-template-columns: 1fr; } .epi-campos .c2 { grid-column: auto; } .epi-abas { grid-template-columns: 1fr 1fr; } .epi-filtros { grid-template-columns: 1fr; } .epi-periodo { grid-column: auto; } .epi-lista li { grid-template-columns: 1fr auto; } .epi-lista li .epi-barra { display: none; } }
/* Estoque de materiais (EstoqueMateriais.jsx): mesmas peças do EPI, listas em vez de tabela para caber em 390 px */
.mat-abas { grid-template-columns: repeat(5, minmax(0, 1fr)); max-width: 820px; }
.mat-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mat-lista, .mat-movs, .mat-linhas, .mat-obras { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.mat-lista > li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px 14px; align-items: center; padding: 10px 12px; border-radius: 16px; background: var(--soft); border: 2px solid transparent; }
.mat-lista > li.baixo { border-color: var(--late-bg); }
.mat-lista > li.empty { display: block; background: none; text-align: center; }
.mat-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mat-info b { overflow-wrap: anywhere; }
.mat-info small, .mat-saldo small { color: var(--muted); font-size: 12.5px; }
.mat-saldo { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; white-space: nowrap; }
.mat-acoes { display: flex; gap: 12px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.mat-acoes .link-btn { font-size: 12.5px; color: var(--brand-text); min-height: 32px; }
.mat-acoes .link-btn.danger-text { color: var(--late-ink); }
.mat-filtros-linha .input { min-width: 0; width: 220px; }
.mat-movs > li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 9px 12px; border-radius: 12px; background: var(--soft); font-size: 13.5px; }
.mat-mov-txt { min-width: 0; }
.mat-mov-txt > small { color: var(--muted); }
.mat-sub { display: block; margin-top: 2px; font-size: 12.5px; color: var(--text-2); overflow-wrap: anywhere; }
.mat-sub .link-btn { font-size: 12.5px; font-weight: 600; color: var(--brand-text); }
.mat-tag { display: inline-block; font-size: 11px; font-weight: 800; padding: 1px 8px; border-radius: 999px; background: var(--chip); color: var(--ink); }
.mat-tag.saida { background: var(--late-bg); color: var(--late-ink); }
.mat-tag.entrada, .mat-tag.devolucao { background: var(--brand-soft); color: var(--brand-text); }
.mat-top li { grid-template-columns: minmax(0, 1fr) auto; }
.mat-top .epi-num, .mat-lista .epi-num { white-space: nowrap; }
.mat-filtros-linha .pill:not(.on) { background: var(--chip); }
.mat-linhas > li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--brand-tint); border: 2px solid var(--brand-soft); }
.mat-linhas > li.erro { border-color: var(--late-bg); background: var(--soft); }
.mat-q { display: flex; align-items: center; gap: 6px; }
.mat-q input { width: 96px; height: 44px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.mat-q span { font-size: 13px; font-weight: 700; color: var(--text-2); min-width: 2.5em; }
.mat-erro { grid-column: 1 / -1; color: var(--late-ink); font-weight: 700; font-size: 12.5px; }
.mat-data { max-width: 220px; }
.mat-obras button { width: 100%; display: grid; grid-template-columns: 6px minmax(0, 1fr) auto; gap: 12px; align-items: center; text-align: left; border: 2px solid transparent; background: var(--soft); border-radius: 16px; padding: 10px 12px; color: var(--ink); }
.mat-obras button:hover { border-color: var(--brand-soft); }
.mat-tipo { align-self: stretch; border-radius: 3px; }
.mat-h3 { margin: 4px 0 0; font-size: 13px; font-weight: 700; color: var(--text-2); }
.mat-filtros { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: start; }
.mat-periodo { grid-column: 1 / -1; }
.mat-filtros > * { min-width: 0; }
.mat-filtros select { width: 100%; min-width: 0; max-width: 100%; }
.mat-periodo .row { gap: 6px; }
.mat-so-celular { display: none; }
@media (max-width: 1200px) { .mat-filtros { grid-template-columns: 1fr 1fr; } }
@media (max-width: 899px) {
  .mat-so-celular { display: inline-flex; align-items: center; min-height: 44px; }
  .mat-form-corpo:not(.aberto) { display: none; }
}
@media (max-width: 640px) {
  .mat-abas { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mat-kpis { grid-template-columns: 1fr 1fr; }
  .mat-filtros { grid-template-columns: 1fr; }
  .mat-lista > li { grid-template-columns: minmax(0, 1fr) auto; }
  .mat-acoes { grid-column: 1 / -1; justify-content: flex-start; }
  .mat-acoes .link-btn { min-height: 44px; }
  .mat-filtros-linha { width: 100%; }
  .mat-filtros-linha .input { flex: 1 1 100%; width: auto; }
  .mat-data { max-width: none; }
  .mat-q input { width: 84px; font-size: 16px; }
  .mat-registrar { width: 100%; min-height: 48px; }
}

/* =====================================================================
   Orçamentos
   ===================================================================== */
.orc-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.orc-filtros { justify-content: space-between; }
.orc-filtros .row { gap: 6px; }
.orc-linha { cursor: pointer; }
.orc-linha:hover td { background: var(--soft); }
.orc-st { display: inline-block; font-size: 11.5px; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: var(--chip); color: var(--text-2); white-space: nowrap; }
.orc-st.enviado { background: var(--mint); color: var(--on-pastel); }
.orc-st.negociacao { background: var(--yellow); color: #3a2c00; }
.orc-st.aprovado { background: var(--brand); color: #fff; }
.orc-st.perdido, .orc-st.cancelado { background: var(--late-bg); color: var(--late-ink); }
.orc-cats { display: flex; flex-direction: column; gap: 10px; }

.orc { display: flex; flex-direction: column; gap: 14px; }
.orc-topo { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; position: sticky; top: 0; z-index: 5; background: var(--shell); padding: 8px 0; }
.orc-titulo h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.orc-titulo h1 small { font-size: 15px; color: var(--muted); font-weight: 700; }
.orc-status { width: auto; min-width: 150px; }
.orc-selo { font-size: 12px; font-weight: 800; padding: 5px 12px; border-radius: 999px; }
.orc-selo.previa { background: var(--yellow); color: #3a2c00; }
.orc-selo.pronta { background: var(--mint); color: var(--on-pastel); }
.orc-selo.emitida { background: var(--brand); color: #fff; }
.orc-acoes { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-left: auto; }
.orc-acoes .link-btn { color: var(--brand-text); }
.orc-travado, .orc-tabela-nova { background: var(--mint); color: var(--on-pastel); border-radius: 14px; padding: 10px 14px; font-size: 13.5px; }
.orc-tabela-nova { background: var(--yellow); color: #3a2c00; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.orc-tabela-nova .link-btn { color: inherit; }
.orc-corpo { display: grid; grid-template-columns: minmax(0, 1fr) 430px; gap: 16px; align-items: start; }
.orc-form { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.orc-form:disabled { opacity: .75; }
.orc-campos { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 12px; align-items: start; }
.orc-campos .seg button { padding-left: 6px; padding-right: 6px; white-space: normal; line-height: 1.15; min-width: 0; }
.orc-campos .c2 { grid-column: span 2; }
.orc-campos .c3 { grid-column: span 3; }
.orc-seg-curto { max-width: 380px; }
.orc-alturas { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.orc-num { display: flex; align-items: center; gap: 6px; min-width: 0; }
.orc-num .input { flex: 1; min-width: 0; width: 100%; }
.orc-num i { font-style: normal; color: var(--muted); font-size: 13px; }
.orc-num.curto { flex: 0 0 auto; }
.orc-num.curto .input { width: 84px; flex: 0 0 84px; }
.orc-num.grande .input { font-size: 20px; font-weight: 800; min-height: 52px; }
.orc-dica { font-size: 11.5px; color: var(--brand-text); font-weight: 600; }
.orc-valor { font-size: 15px; padding: 10px 0; }
.orc-lista { display: flex; flex-direction: column; gap: 6px; }
.field-rot { font-size: 12px; font-weight: 700; color: var(--muted); }
.orc-item { display: grid; grid-template-columns: minmax(0, 1.3fr) 150px minmax(0, 1fr) 32px; gap: 8px; align-items: center; }
.orc-escopos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.orc-escopo { border: 1.5px solid var(--line); background: var(--soft); border-radius: 14px; padding: 12px; text-align: left; display: flex; flex-direction: column; gap: 4px; min-height: 64px; }
.orc-escopo b { font-size: 13.5px; }
.orc-escopo small { font-size: 11px; color: var(--late-ink); font-weight: 600; }
.orc-escopo.on { border-color: var(--brand); background: var(--card); box-shadow: inset 0 0 0 1px var(--brand); }
.orc-det summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--brand-text); padding: 4px 0; }
.orc-det .orc-campos { margin-top: 10px; }
.orc-ad-cab, .orc-ad { display: grid; grid-template-columns: minmax(0, 2fr) 70px 60px 100px 100px 120px 56px 32px; gap: 6px; align-items: center; }
.orc-ad-cab { font-size: 11px; font-weight: 700; color: var(--muted); }
.orc-ad .orc-num .input { width: 100%; }
.orc-autorizado { font-size: 13px; font-weight: 700; color: var(--brand-text); }

.orc-resumo { position: sticky; top: 70px; display: flex; flex-direction: column; gap: 12px; max-height: calc(var(--vh) - 90px); overflow-y: auto; padding-bottom: 8px; }
.orc-total { background: linear-gradient(135deg, #046BD2, #0A4FA0); color: #fff; }
.orc-total .modal-kicker, .orc-total .note { color: rgba(255, 255, 255, .8); }
.orc-total-v { font-size: 36px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.orc-tab { width: 100%; border-collapse: collapse; font-size: 13.5px; margin-top: 4px; }
.orc-tab td { padding: 4px 0; border-top: 1px solid rgba(255, 255, 255, .18); }
.orc-tab td:last-child { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.orc-qts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.orc-q { background: var(--soft); border-radius: 12px; padding: 8px 10px; display: flex; flex-direction: column; }
.orc-q span { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.orc-q b { font-size: 18px; font-weight: 800; }
.orc-q small { font-size: 11px; color: var(--text-2); }
.orc-q.ruim b, .orc-q.ruim small { color: var(--late-ink); }
.orc-alertas { gap: 6px; }
.orc-al { font-size: 12.5px; line-height: 1.4; border-radius: 10px; padding: 8px 10px; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.orc-al.erro, .orc-al.bloq { background: var(--late-bg); color: var(--late-ink); font-weight: 700; }
.orc-al.pend { background: var(--yellow); color: #3a2c00; }
.orc-al.aviso { background: var(--soft); color: var(--text-2); }
.orc-al-acoes { display: flex; gap: 12px; flex-wrap: wrap; }
.orc-al-acoes .link-btn { color: inherit; font-size: 12px; }
.orc-resolvidas summary { cursor: pointer; font-size: 13px; font-weight: 700; }
.orc-resolvidas .link-btn { font-size: 12px; color: var(--brand-text); }
.orc-gtab { width: 100%; border-collapse: collapse; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.orc-gtab th { font-size: 11px; color: var(--muted); text-align: right; padding: 4px 3px; }
.orc-gtab td { padding: 5px 3px; border-top: 1px solid var(--line); text-align: right; white-space: nowrap; }
.orc-gtab td:first-child { text-align: left; white-space: normal; color: var(--text-2); }
.orc-gtab tr.forte td { font-weight: 800; color: var(--ink); }
.orc-gtab td.bad { color: var(--late-ink); }
.orc-gnotas { margin: 0; padding-left: 16px; font-size: 12px; color: var(--text-2); display: flex; flex-direction: column; gap: 3px; }
.orc-h3 { font-size: 14px; font-weight: 800; margin-top: 6px; }
.orc-whats { width: 100%; min-height: 320px; font-family: ui-monospace, monospace; font-size: 13px; padding: 12px; }
.orc-desp { display: grid; grid-template-columns: minmax(0, 1.4fr) 130px 190px 100px 32px; gap: 6px; align-items: center; }
@media (max-width: 1250px) { .orc-corpo { grid-template-columns: 1fr; } .orc-resumo { position: static; max-height: none; } .orc-escopos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .orc-campos { grid-template-columns: 1fr; } .orc-campos .c2, .orc-campos .c3 { grid-column: auto; } .orc-escopos { grid-template-columns: 1fr; } .orc-ad-cab { display: none; } .orc-ad { grid-template-columns: 1fr 1fr; } .orc-item { grid-template-columns: 1fr 110px 32px; } .orc-item > span { display: none; } .orc-kpis { grid-template-columns: 1fr 1fr; } }

/* ---------- Apresentação ao cliente ---------- */
.apr { position: fixed; inset: 0; z-index: 80; background: #F4F6F9; color: #16181D; overflow-y: auto; }
.apr-topo { position: sticky; top: 0; display: flex; align-items: center; gap: 14px; padding: 14px 28px; background: #fff; border-bottom: 1px solid #E3E6EA; z-index: 2; }
.apr-marca { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.apr-marca b { display: block; font-size: 17px; } .apr-marca span { font-size: 12px; color: #5F6672; }
.apr-previa { background: #FBE38E; color: #3a2c00; font-weight: 800; font-size: 12px; padding: 5px 12px; border-radius: 999px; }
.apr-topo .pill { background: #EEF1F4; color: #16181D; }
.apr-corpo { max-width: 1100px; margin: 0 auto; padding: 28px 24px 60px; display: flex; flex-direction: column; gap: 20px; }
.apr-hero { background: linear-gradient(135deg, #046BD2, #0B3A73); color: #fff; border-radius: 28px; padding: 32px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px; }
.apr-kicker { font-size: 14px; opacity: .85; width: 100%; }
.apr-hero h1 { font-size: 38px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }
.apr-total { text-align: right; display: flex; flex-direction: column; }
.apr-total span { font-size: 14px; opacity: .85; } .apr-total b { font-size: 48px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; } .apr-total small { font-size: 15px; opacity: .9; }
.apr-ajustes { display: flex; flex-wrap: wrap; gap: 14px; background: #fff; border-radius: 20px; padding: 14px 18px; }
.apr-aj { display: flex; flex-direction: column; gap: 6px; } .apr-aj > span { font-size: 12px; font-weight: 700; color: #5F6672; }
.apr-step { display: flex; align-items: center; gap: 6px; }
.apr-step button { border: 1px solid #D5DAE1; background: #fff; border-radius: 999px; min-height: 40px; padding: 0 14px; font-weight: 700; font-size: 14px; color: #16181D; }
.apr-step button.on { background: #046BD2; border-color: #046BD2; color: #fff; }
.apr-step b { font-size: 18px; min-width: 110px; text-align: center; }
.apr-grade { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.apr-c { background: #fff; border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 2px; }
.apr-c span { font-size: 12.5px; font-weight: 700; color: #5F6672; } .apr-c b { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; } .apr-c small { font-size: 11.5px; color: #5F6672; }
.apr-c.destaque { background: #A9CEF5; }
.apr-dois { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.apr-card { background: #fff; border-radius: 22px; padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.apr-card h2 { font-size: 18px; font-weight: 800; } .apr-card h3 { font-size: 14px; font-weight: 800; margin-top: 6px; }
.apr-escopo { font-weight: 700; color: #046BD2; }
.apr-tab { width: 100%; border-collapse: collapse; font-size: 15px; }
.apr-tab td { padding: 8px 0; border-bottom: 1px solid #E3E6EA; } .apr-tab td:last-child { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.apr-tab tr.tot td { font-size: 20px; font-weight: 800; border: 0; color: #046BD2; }
.apr-benef { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.apr-exc { margin: 0; padding-left: 20px; color: #5F6672; font-size: 13.5px; }
.apr-nota { font-size: 12.5px; color: #5F6672; } .apr-nota.previa { color: #8a6100; font-weight: 700; }
@media (max-width: 900px) { .apr-grade { grid-template-columns: repeat(3, 1fr); } .apr-dois { grid-template-columns: 1fr; } .apr-hero h1 { font-size: 28px; } .apr-total { text-align: left; } .apr-total b { font-size: 36px; } }
@media (max-width: 520px) { .apr-grade { grid-template-columns: repeat(2, 1fr); } .apr-topo { padding: 10px 14px; } .apr-corpo { padding: 16px 14px 40px; } }

/* ---------- Portal do cliente ---------- */
.pc { min-height: var(--vh); background: var(--bg); }
.pc-topo { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px max(16px, calc((100vw - 1180px) / 2)); background: var(--card); border-bottom: 1px solid var(--line); }
.pc-marca { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 0; text-align: left; color: var(--ink); }
.pc-marca img { border-radius: 10px; }
.pc-marca span { display: flex; flex-direction: column; line-height: 1.15; }
.pc-marca b { font-size: 16px; font-weight: 800; }
.pc-marca small { font-size: 12px; color: var(--muted); font-weight: 600; }
.pc-conta { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pc-quem { font-size: 13px; font-weight: 600; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-main { max-width: 1180px; margin: 0 auto; padding: 20px 16px 48px; display: flex; flex-direction: column; gap: 20px; }
.pc-hero { align-items: flex-end; flex-wrap: wrap; }
.pc-kpis { display: flex; gap: 10px; z-index: 1; flex-wrap: wrap; }
.pc-kpis div { background: rgba(255, 255, 255, .14); border-radius: 18px; padding: 12px 16px; min-width: 104px; display: flex; flex-direction: column; }
.pc-kpis b { font-size: 28px; font-weight: 800; line-height: 1; }
.pc-kpis span { font-size: 12px; opacity: .85; margin-top: 4px; }
.pc-sec { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pc-h2 { font-size: 18px; font-weight: 800; letter-spacing: -0.01em; }
.pc-h2 small { font-size: 13px; color: var(--muted); font-weight: 700; margin-left: 4px; }
.pc-colunas { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.pc-colunas.obra { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.pc-hoje { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.pc-hoje-card { display: flex; flex-direction: column; gap: 10px; text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: var(--radius-l); padding: 14px 16px; color: var(--ink); }
.pc-hoje-card:hover, .pc-obra:hover, .pc-rel:hover { border-color: var(--brand); }
.pc-hoje-obra { font-weight: 800; font-size: 15px; }
.pc-pessoas { display: flex; flex-wrap: wrap; gap: 6px; }
.pc-pessoa { display: inline-flex; align-items: center; gap: 6px; background: var(--chip); border-radius: 999px; padding: 3px 10px 3px 3px; font-size: 13px; font-weight: 600; }
.pc-pessoa i { font-style: normal; width: 24px; height: 24px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-text); font-size: 10px; font-weight: 800; display: grid; place-items: center; }
.pc-pessoa small { color: var(--muted); font-weight: 500; }
.pc-feed, .pc-obras { display: flex; flex-direction: column; gap: 10px; }
.pc-rel { display: flex; gap: 14px; align-items: center; text-align: left; border: 1px solid var(--line); padding: 10px; color: var(--ink); width: 100%; }
.pc-rel-mini { position: relative; display: grid; grid-template-columns: repeat(3, 52px); gap: 4px; flex: none; }
.pc-rel-mini img { width: 52px; height: 52px; object-fit: cover; border-radius: 10px; background: var(--chip); }
.pc-rel-semfoto { grid-column: span 3; height: 52px; border-radius: 10px; background: var(--chip); color: var(--muted); font-size: 12px; font-weight: 600; display: grid; place-items: center; }
.pc-rel-mais { position: absolute; right: 4px; bottom: 4px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 11px; font-weight: 800; border-radius: 999px; padding: 1px 6px; }
.pc-rel-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pc-rel-txt b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-rel-tipo { font-size: 12px; font-weight: 800; color: var(--brand-text); text-transform: uppercase; letter-spacing: .04em; }
.pc-mais { align-self: flex-start; }
.pc-obra { display: flex; flex-direction: column; gap: 10px; text-align: left; border: 1px solid var(--line); color: var(--ink); width: 100%; }
.pc-obra-l1 { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.pc-obra-l1 b { font-size: 15px; }
.pc-obra-l2 { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.pc-fase { font-size: 12px; font-weight: 800; border-radius: 999px; padding: 3px 10px; white-space: nowrap; background: var(--chip); color: var(--text-2); }
.pc-fase.exec { background: var(--brand-soft); color: var(--brand-text); }
.pc-fase.ok { background: var(--lime-soft); color: var(--lime-ink); }
.pc-barra { height: 10px; border-radius: 999px; background: var(--chip); overflow: hidden; }
.pc-barra.fina { height: 6px; }
.pc-barra i { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.pc-voltar { align-self: flex-start; }
.pc-obra-topo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 320px); gap: 20px; align-items: end; }
.pc-obra-tit { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.pc-obra-tit h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.pc-prog { display: flex; flex-direction: column; gap: 8px; }
.pc-prog-num { display: flex; align-items: baseline; gap: 6px; }
.pc-prog-num b { font-size: 32px; font-weight: 800; }
.pc-prog-num span { color: var(--muted); font-weight: 600; }
.pc-dia { display: flex; flex-direction: column; gap: 8px; }
.pc-dia h3 { font-size: 13px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.pc-dia h3::first-letter { text-transform: uppercase; }
.pc-equipe { gap: 14px; }
.pc-eq-dia { display: flex; flex-direction: column; gap: 6px; }
.pc-eq-data { font-size: 13px; font-weight: 800; text-transform: capitalize; }
.pc-eq-dia.passado { border-top: 1px solid var(--line); padding-top: 12px; }
.pc-eq-dia.passado .pc-eq-data { color: var(--muted); text-transform: none; }
.pc-vazio { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.pc-vazio h2 { font-size: 20px; font-weight: 800; }
@media (max-width: 900px) {
  .pc-colunas, .pc-colunas.obra { grid-template-columns: 1fr; }
  .pc-colunas.obra:not(.segue) > aside { order: -1; }
  .pc-obra-topo { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .pc-quem { display: none; }
  .pc-hero h1 { font-size: 30px; }
  .pc-hero .hero-linha { font-size: 18px; }
  .pc-kpis { width: 100%; }
  .pc-kpis div { flex: 1; min-width: 0; padding: 10px 12px; }
  .pc-kpis b { font-size: 22px; }
  .pc-rel-mini { grid-template-columns: repeat(2, 48px); }
  .pc-rel-mini img:nth-child(3) { display: none; }
  .pc-rel-mini img { width: 48px; height: 48px; }
  .pc-obra-tit h1 { font-size: 24px; }
}

/* ---------- Escolher cliente ---------- */
.span-tudo { grid-column: 1 / -1; }
.cli-campo { gap: 8px; }
.cli-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cli-chip { border: 1px solid var(--line-strong); background: var(--card); border-radius: 999px; padding: 0 14px; min-height: 38px; font-weight: 600; font-size: 13px; }
.cli-chip:hover:not(:disabled) { border-color: var(--brand); }
.cli-chip.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.cli-chip.vazio:not(.on), .cli-chip.outro:not(.on) { border-style: dashed; color: var(--text-2); }
.cli-chip:disabled { opacity: .55; cursor: default; }
.cli-dica { color: var(--muted); font-size: 12px; }
.cli-novo { display: flex; flex-direction: column; gap: 8px; background: var(--yellow-soft); border: 1px solid var(--yellow-line); border-radius: var(--radius-m); padding: 10px 12px; font-size: 13px; font-weight: 600; }
.cli-novo small { font-weight: 500; color: var(--text-2); font-size: 12px; }
.cli-novo-acoes { display: flex; flex-wrap: wrap; gap: 8px; }
.cli-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.cli-lista li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.cli-lista li.off { opacity: .55; }
.cli-nome { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cli-auto { font-size: 11px; font-weight: 700; color: var(--muted); background: var(--chip); border-radius: 999px; padding: 2px 8px; }
.cli-acoes { display: flex; gap: 12px; }
@media (max-width: 560px) { .cli-lista li { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- Ver como (administradores): faixa fixa no topo ---------- */
:root { --faixa-h: 0px; }
body.com-faixa { --faixa-h: calc(48px + env(safe-area-inset-top)); padding-top: var(--faixa-h); }
body.com-faixa .campo-folha-topo, body.com-faixa .campo { padding-top: 12px; }
.faixa-como { position: fixed; top: 0; left: 0; right: 0; height: var(--faixa-h); box-sizing: border-box; z-index: 1000; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 max(12px, env(safe-area-inset-left)) 0 max(12px, env(safe-area-inset-left)); padding-top: env(safe-area-inset-top);
  background: repeating-linear-gradient(135deg, #FFC83D 0 14px, #FFBF1F 14px 28px); color: #1B1300; border-bottom: 2px solid #1B1300; font-size: 13px; }
.faixa-como-txt { display: flex; align-items: center; gap: 10px; min-width: 0; }
.faixa-como-txt > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.faixa-como-tag { flex: none; background: #1B1300; color: #FFC83D; font-weight: 800; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; padding: 4px 8px; border-radius: 6px; }
.faixa-como-btn { flex: none; border: 0; background: #1B1300; color: #fff; font-weight: 800; font-size: 13px; border-radius: 999px; padding: 0 14px; min-height: 34px; }
.faixa-como-btn:hover { background: #3a2c00; }
/* tudo que é fixo/grudado no topo desce para baixo da faixa */
body.com-faixa .sidebar { top: calc(var(--faixa-h) + 12px); height: calc(var(--vh) - var(--faixa-h) - 24px); }
body.com-faixa .shell { min-height: calc(var(--vh) - var(--faixa-h) - 24px); }
body.com-faixa .pc-topo, body.com-faixa .campo-topo { top: var(--faixa-h); }
body.com-faixa .overlay, body.com-faixa .campo-folha, body.com-faixa .cam, body.com-faixa .rel-luz, body.com-faixa .apr { top: var(--faixa-h); }
.faixa-curto { display: none; }
@media (max-width: 760px) {
  .faixa-como-extra, .faixa-longo { display: none; }
  .faixa-curto { display: inline; }
  .faixa-como-txt { gap: 6px; }
  .faixa-como-tag { padding: 3px 6px; font-size: 10px; }
  .faixa-como-btn { padding: 0 12px; font-size: 12px; }
}
@media (max-width: 420px) { .faixa-como-btn { font-size: 0; } .faixa-como-btn::after { content: 'Voltar'; font-size: 12px; } }
.ver-como-barra { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: var(--soft); border-radius: var(--radius-m); padding: 10px 12px; font-size: 13px; font-weight: 600; }

/* ---------- Relatório por etapas (RFI) ---------- */
.rfi-resumo { display: flex; flex-direction: column; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 12px 14px; position: sticky; top: 0; z-index: 3; }
.rfi-resumo > div:first-child { display: flex; flex-direction: column; gap: 2px; }
.rfi-resumo b { font-size: 15px; }
.rfi-resumo span { font-size: 12px; color: var(--muted); font-weight: 600; }
.rfi-etapas { display: flex; flex-direction: column; gap: 10px; }
.rfi-etapa { display: flex; flex-direction: column; gap: 10px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--line-strong); border-radius: var(--radius-m); padding: 12px; }
.rfi-etapa.parcial { border-left-color: var(--yellow); }
.rfi-etapa.ok { border-left-color: var(--green-dot); }
.rfi-cab { display: flex; gap: 10px; align-items: flex-start; }
.rfi-n { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--chip); color: var(--text-2); font-weight: 800; font-size: 13px; display: grid; place-items: center; }
.rfi-etapa.ok .rfi-n { background: var(--green-dot); color: #fff; }
.rfi-etapa.parcial .rfi-n { background: var(--yellow-soft); color: var(--yellow-ink); }
.rfi-tit { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rfi-tit b { font-size: 15px; line-height: 1.25; }
.rfi-tit small { font-size: 12px; color: var(--muted); font-weight: 600; }
.rfi-botoes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rfi-grade { margin: 0; }
.cam-titulo { display: block; font-size: 12px; font-weight: 600; opacity: .85; max-width: 60vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cam-conta { text-align: center; }
/* visualizador: fotos separadas por etapa */
.rel-etapa { display: flex; flex-direction: column; gap: 8px; }
.rel-etapa h3 { font-size: 13px; font-weight: 800; color: var(--text-2); }
.rel-etapa h3 small { color: var(--muted); font-weight: 600; margin-left: 6px; }
.rel-etapa.vazia h3 small { color: var(--red-text); }
.rfi-campos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.rfi-campos .largo { grid-column: span 2; }
@media (max-width: 560px) { .rfi-campos .largo { grid-column: 1 / -1; } }
.orc-locais { display: flex; flex-direction: column; gap: 8px; background: var(--yellow-soft); border: 1px solid var(--yellow-line); }
.orc-salvo:disabled { opacity: 1; background: var(--lime-soft); color: var(--lime-ink); cursor: default; }
.orc-salvo.off { background: var(--yellow-soft); color: var(--yellow-ink); }

/* ---------- Puxar para atualizar (celular) ---------- */
html, body { overscroll-behavior-y: none; } /* o do navegador fica desligado: usamos o nosso, igual em todo celular */
.puxar { position: fixed; left: 50%; top: calc(var(--faixa-h, 0px) + env(safe-area-inset-top) + 8px); z-index: 1100; width: 40px; height: 40px; border-radius: 50%;
  background: var(--card); color: var(--brand); box-shadow: 0 6px 18px rgba(0, 0, 0, .18); display: grid; place-items: center; font-size: 22px; font-weight: 800;
  transform: translate(-50%, -50px); opacity: 0; pointer-events: none; }
.puxar.pronto { background: var(--brand); color: var(--brand-ink); }
.puxar.carregando span { display: inline-block; animation: puxar-gira .7s linear infinite; }
@keyframes puxar-gira { to { transform: rotate(360deg); } }

/* ---------- Início (painel) no celular e tablet: mesmo painel do computador, reorganizado ---------- */
@media (max-width: 899px) {
  .painel { gap: 14px; }
  .hero { flex-direction: column; align-items: stretch; gap: 14px; padding: 20px 18px 18px; border-radius: 24px; }
  .hero::after { width: 220px; height: 220px; right: -70px; top: -90px; }
  .hero-lado { order: -1; flex-direction: row; align-items: center; justify-content: space-between; }
  .hero-lado .painel-clock { display: none; }
  .hero-acoes { width: 100%; }
  .hero-acoes .hero-btn { display: none; } /* modo TV não faz sentido no celular */
  .hero-seg { width: 100%; }
  .hero-seg button { flex: 1; }
  .hero h1 { font-size: 28px; }
  .hero-linha { font-size: 17px; }
  .hero.fin .hero-linha b { font-size: 26px; }
  .hero-frase { font-size: 14px; }
  .hoje-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .hoje-tile { border-radius: 20px; padding: 14px; }
  .hoje-tile-v { font-size: 32px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpis > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .painel-grid, .painel-grid.g-2-1 { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .painel-today, .today-list { grid-template-columns: minmax(0, 1fr); }
  .painel .card { padding: 16px; border-radius: 22px; }
  .hbar-row { grid-template-columns: 112px minmax(0, 1fr); gap: 8px; }
  .hbar-label { font-size: 12px; min-width: 0; }
  .frota-hoje li { flex-wrap: wrap; }
  .frota-d { text-align: left; }
  .plain-list li { flex-wrap: wrap; }
  .fin-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .fin-kpi { border-radius: 20px; padding: 14px; }
  .fin-kpi-v { font-size: 21px; }
  .fin-custo { grid-template-columns: 92px minmax(0, 1fr) auto; }
  .fin-obra { grid-template-columns: minmax(0, 1fr) auto auto; gap: 4px 12px; }
  .fin-obra > :nth-child(1) { grid-column: 1 / -1; }
  .fin-obra > :nth-child(2), .fin-obra > :nth-child(3) { display: none; } /* no celular: obra, resultado e margem */
  .fin-obra.cab > :nth-child(1) { display: none; }
}

/* ---------- Menu lateral do computador: mesmo visual do menu do celular (ícones, sub-abas sempre abertas) ---------- */
.sidebar .nav { gap: 2px; }
.sidebar .nav > button:not(.sub) { min-height: 48px; gap: 14px; padding: 0 12px; border-radius: 14px; font-size: 15px; font-weight: 600; color: var(--ink); }
.sidebar .nav > button:not(.sub) svg { width: 22px; height: 22px; flex: none; color: var(--muted); }
.sidebar .nav > button.on, .sidebar .nav > button.parent { background: transparent; color: var(--brand-text); font-weight: 700; } /* o fundo azul é a .nav-luz, que desliza */
.sidebar .nav > button.on svg, .sidebar .nav > button.parent svg { color: var(--brand); }
.sidebar .nav > button:not(.on):not(.parent):hover { background: var(--soft); }
.sidebar .nav > button:not(.sub) { min-height: 44px; }
.sidebar .nav > button span:not(.soon) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar .nav .soon { flex: none; }
.nav button.sub { min-height: 34px; }
@media (min-width: 900px) { .sidebar { gap: 20px; padding: 22px 14px 16px; } }

/* ---------- Campo de senha com olhinho ---------- */
.senha-campo { position: relative; display: flex; }
.senha-campo input { flex: 1; min-width: 0; padding-right: 48px; }
.senha-olho {
  position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
  width: 44px; height: 40px; display: grid; place-items: center;
  border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: var(--radius-s);
}
.senha-olho:hover, .senha-olho[aria-pressed="true"] { color: var(--ink); }
.senha-olho:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
/* esconde o olho próprio do Edge para não ficar duplicado */
.senha-campo input::-ms-reveal { display: none; }

/* ---------- Recebimentos e adicionais da obra ---------- */
.fin-obra-box { display: flex; flex-direction: column; gap: 10px; background: var(--soft); border-radius: var(--radius-m); padding: 14px; }
.fin-obra-tit { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.fin-obra-tit b { font-size: 14px; }
.fin-obra-resumo { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.fin-obra-resumo > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; background: var(--card); border-radius: 12px; padding: 10px 12px; }
.fin-obra-resumo span { font-size: 12px; font-weight: 700; color: var(--muted); }
.fin-obra-resumo b { font-size: 17px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fin-obra-resumo small { font-size: 11px; color: var(--muted); }
.fin-obra-resumo .saldo { background: var(--brand-soft); }
.fin-obra-resumo .saldo b { color: var(--brand-text); }
.fin-obra-resumo .saldo.quitado { background: var(--mint); }
.fin-obra-resumo .saldo.quitado b, .fin-obra-resumo .saldo.quitado span, .fin-obra-resumo .saldo.quitado small { color: var(--on-pastel); }
.fin-obra-barra { height: 6px; border-radius: 99px; background: var(--chip); overflow: hidden; }
.fin-obra-barra i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.fin-receb-list li { grid-template-columns: auto 1fr auto auto; background: var(--card); }
.fin-receb-dia { font-weight: 700; font-variant-numeric: tabular-nums; }
.fin-adic-list li { grid-template-columns: 1fr auto auto; background: var(--card); }
.fin-adic-list li.sem-valor { outline: 1.5px dashed var(--late-ink); }
.fin-adic-valor { width: 120px; min-height: 36px !important; text-align: right; }
.fin-adic-status { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--yellow); color: var(--yellow-ink); white-space: nowrap; }
.fin-adic-status.ok { background: var(--mint); color: var(--on-pastel); }
.aviso-mini { background: var(--soft); border-radius: 12px; padding: 10px 12px; }
@media (max-width: 560px) {
  .fin-obra-resumo { grid-template-columns: 1fr 1fr; }
  .fin-obra-resumo b { font-size: 15px; white-space: normal; overflow-wrap: anywhere; }
  .fin-obra-resumo > div { padding: 8px 10px; }
  .fin-obra-resumo .saldo { grid-column: 1 / -1; }
}

/* ---------- Falta e veículo fora de obra ---------- */
.chip.small.falta, .t-chip.falta { background: #FAD4D4; color: #7F1D1D; }
.avatar.aus-folga { background: var(--chip); }
.avatar.aus-ferias { background: var(--yellow); }
.avatar.aus-falta { background: #FAD4D4; color: #7F1D1D; }
.chip.small.veic.v-manutencao { background: #E1E4E9; }
.chip.small.veic.v-outro { background: #FDE7C7; color: #6B3A00; }
.chip.veic.out { opacity: .55; border-style: dashed; }
.out-row.veic-row .rowhead .n { font-size: 12px; }
:root[data-tema="escuro"] .chip.small.falta, :root[data-tema="escuro"] .t-chip.falta, :root[data-tema="escuro"] .avatar.aus-falta { background: #5B1F1F; color: #FECACA; }
:root[data-tema="escuro"] .chip.small.veic.v-outro { background: #5A3A10; color: #FDE7C7; }
:root[data-tema="escuro"] .chip.small.veic.v-manutencao { background: #2A2F37; }

/* ---------- Relatório de ancoragem ---------- */
.anc-editor { display: flex; flex-direction: column; gap: 10px; background: var(--soft); border-radius: var(--radius-m); padding: 12px; }
.anc-editor-tit { display: flex; flex-direction: column; gap: 2px; }
.anc-item { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; background: var(--card); border-radius: 12px; padding: 10px 12px; }
.anc-item-nome { display: flex; flex-direction: column; font-weight: 800; }
.anc-item-nome small { font-weight: 500; font-size: 12px; color: var(--muted); }
.anc-passo { display: inline-flex; align-items: center; gap: 6px; }
.anc-passo button { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--chip); font-size: 18px; font-weight: 700; color: var(--ink); }
.anc-passo b { min-width: 18px; text-align: center; font-size: 16px; }
.anc-passo small { font-size: 11px; color: var(--muted); }
.anc-add { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.anc-bases { display: flex; flex-direction: column; gap: 8px; }
.anc-base { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--line-strong); border-radius: var(--radius-m); overflow: hidden; }
.anc-base.parcial { border-left-color: var(--yellow); }
.anc-base.ok { border-left-color: var(--green-dot); }
.anc-base-cab { width: 100%; display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 12px; border: 0; background: none; text-align: left; color: var(--ink); }
.anc-sigla { font-size: 12px; font-weight: 800; background: var(--brand-soft); color: var(--brand-text); border-radius: 8px; padding: 4px 8px; white-space: nowrap; }
.anc-base-tit { display: flex; flex-direction: column; min-width: 0; }
.anc-base-tit small { font-size: 12px; color: var(--muted); }
.anc-seta { font-size: 11px; color: var(--muted); }
.anc-base.aberta > .rfi-etapas { padding: 0 10px 10px; }
.rel-base { font-size: 15px; font-weight: 800; margin-top: 8px; display: flex; gap: 8px; align-items: center; }

/* ---------- Exportar PDF ---------- */
.pdf-modal { max-width: 820px; }
.pdf-bloco { display: flex; flex-direction: column; gap: 8px; }
.pdf-bloco-cab { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.pdf-bloco-cab .link-btn { margin-left: auto; }
.pdf-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.pdf-foto { position: relative; aspect-ratio: 1; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: var(--soft); opacity: .45; transition: opacity .12s; }
.pdf-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pdf-foto.on { opacity: 1; border-color: var(--brand); }
.pdf-check { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.9); border: 1.5px solid var(--line-strong); font-size: 13px; font-weight: 800; line-height: 19px; color: #fff; }
.pdf-foto.on .pdf-check { background: var(--brand); border-color: var(--brand); }
.pdf-tag { position: absolute; left: 4px; bottom: 4px; font-size: 9px; font-weight: 800; background: rgba(0,0,0,.6); color: #fff; padding: 1px 5px; border-radius: 6px; }
.pdf-outro { background: var(--soft); border-radius: 12px; padding: 8px 10px; display: flex; flex-direction: column; gap: 8px; }
.pdf-outro summary { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; cursor: pointer; font-weight: 700; font-size: 14px; }
.pdf-outro[open] { gap: 8px; }
.pdf-outro[open] > .link-btn { align-self: flex-start; margin: 6px 0; }

/* ---------- Demandas · Geral (obras + fábrica) ---------- */
.geral-board.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.geral-board.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.geral-board.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1280px) { .geral-board.n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .geral-board.n4, .geral-board.n3, .geral-board.n2 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); } }
.geral-col { border-top: 4px solid var(--line-strong); }
.geral-col.emp-residencia { border-top-color: var(--t-res); }
.geral-col.emp-telecom { border-top-color: var(--t-tel); }
.geral-col.emp-industria { border-top-color: var(--t-ind); }
.geral-col.emp-predial { border-top-color: var(--t-pre); }
.geral-col .col-title > div { display: flex; flex-direction: column; gap: 1px; }
.geral-tipo { font-size: 11px; font-weight: 600; color: var(--muted); }
.geral-alerta { align-self: flex-start; font-size: 11px; font-weight: 800; color: var(--late-ink); background: var(--red-soft); padding: 3px 9px; border-radius: 999px; margin-top: -6px; }
.geral-etapa { display: flex; align-items: center; gap: 6px; }
.geral-etapa .dot { width: 8px; height: 8px; }
.geral-pe { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.geral-pe .link-btn { align-self: center; font-size: 13px; }

/* ancoragem: aviso de etapas sem foto */
.campo-aviso-falta { display: flex; flex-direction: column; gap: 4px; background: var(--yellow); color: var(--yellow-ink); border-radius: 14px; padding: 12px 14px; font-size: 13px; text-align: left; }
.campo-aviso-falta b { font-size: 14px; }
.campo-aviso-falta.forte { outline: 2px solid var(--late-ink); }
.campo-aviso-acoes { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; font-weight: 600; }
.campo-aviso-acoes .pill { align-self: stretch; min-height: 46px; }
.rel-aviso-falta { background: var(--yellow); color: var(--yellow-ink); border-radius: 12px; padding: 8px 12px; font-size: 13px; font-weight: 600; }

/* ---------- Configurações em abas ---------- */
.cfg-abas { display: flex; gap: 6px; overflow-x: auto; padding: 4px; background: var(--card); border-radius: 999px; scrollbar-width: none; margin-top: 8px; }
.cfg-abas::-webkit-scrollbar { display: none; }
.cfg-abas button { flex: 1 0 auto; border: 0; background: transparent; padding: 10px 16px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.cfg-abas button.on { background: var(--brand); color: #fff; }
.cfg-n { font-size: 11px; background: var(--chip); color: var(--text-2); border-radius: 999px; padding: 1px 7px; }
.cfg-abas button.on .cfg-n { background: rgba(255,255,255,.25); color: #fff; }
.cfg-desc { margin: -4px 4px 0; }
.cfg-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.cfg-kpis > div { background: var(--soft); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.cfg-kpis b { font-size: 22px; }
.cfg-kpis b.ok { color: var(--green-dot); }
.cfg-kpis span { font-size: 12px; color: var(--muted); }
.cfg-alerta { background: var(--red-soft); color: var(--late-ink); border-radius: 12px; padding: 10px 12px; font-size: 13px; font-weight: 600; }
.cfg-filtros { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cfg-filtros > .input { flex: 1 1 240px; }
.chips-filtro { display: flex; flex-wrap: wrap; gap: 6px; }
.chips-filtro .pill { min-height: 34px; font-size: 13px; }
.cfg-ajuda { background: var(--soft); border-radius: 16px; padding: 14px; }
.user-tags { display: flex; gap: 4px; flex-wrap: wrap; }
@media (max-width: 700px) { .cfg-kpis { grid-template-columns: 1fr 1fr; } }

/* clientes */
.cli-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.cli-card { display: flex; flex-direction: column; gap: 10px; background: var(--soft); border-radius: 16px; padding: 14px; }
.cli-card.off { opacity: .6; }
.cli-card-top { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; justify-content: space-between; }
.cli-card-nome { font-size: 17px; }
.cli-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.cli-nums { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--text-2); }
.cli-portal { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cli-card .cli-acoes { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cli-card .cli-acoes .pill { min-height: 36px; font-size: 13px; }

/* frases */
.frases-semana { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.frases-semana > div { background: var(--soft); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.frases-semana > div.hoje { background: var(--brand-soft); }
.frases-semana span { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: capitalize; }
.frases-semana p { font-size: 13px; margin: 0; }

/* visualizações do portal */
.vis { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; align-items: start; }
.vis-escopos { display: flex; flex-direction: column; gap: 4px; padding: 12px; position: sticky; top: 12px; }
.vis-rot { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 4px 8px; }
.vis-escopo { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; border: 0; background: transparent; padding: 10px 12px; border-radius: 12px; text-align: left; color: var(--ink); }
.vis-escopo small { font-size: 11px; color: var(--muted); }
.vis-escopo.on { background: var(--brand-soft); }
.vis-escopo.on small { color: var(--brand-text); }
.vis-corpo { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.vis-cab-l1 { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: flex-start; }
.vis-resumo { background: var(--soft); border-radius: 12px; padding: 10px 12px; font-size: 13px; color: var(--text-2); margin: 0; }
.vis-grupos { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.vis-grupo h3, .vis-obras h3 { font-size: 15px; font-weight: 800; }
.vis-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.vis-item:first-of-type { border-top: 0; }
.vis-item.sub { padding-left: 16px; }
.vis-item.desl { opacity: .5; }
.vis-item-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.vis-item-txt b { font-size: 14px; font-weight: 600; }
.vis-item-txt small { font-size: 12px; color: var(--muted); }
.vis-mexido { color: var(--brand-text) !important; font-weight: 600; }
.vis-mexido .link-btn { font-size: 12px; }
.chave { flex: 0 0 auto; width: 46px; height: 28px; border-radius: 999px; border: 0; background: var(--line-strong); position: relative; transition: background .15s; padding: 0; }
.chave i { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.chave.on { background: var(--brand); }
.chave.on i { transform: translateX(18px); }
.chave:disabled { cursor: not-allowed; }
.vis-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.vis-lista li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.vis-lista li:first-child { border-top: 0; }
.vis-lista li .vis-item-txt { flex: 1; }
.vis-lista li.off .vis-item-txt b { color: var(--muted); text-decoration: line-through; }
@media (max-width: 900px) {
  .vis { grid-template-columns: 1fr; }
  .vis-escopos { position: static; flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .vis-rot { display: none; }
  .vis-escopo { flex: 0 0 auto; }
}
.pc-colunas.so-obras { grid-template-columns: 1fr; }
.pc-pedido { cursor: default; }
.cfg-abas { scroll-margin-top: 84px; }
.pc-tipo { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--brand-text); margin-bottom: -6px; }

/* ---------- Controle do relatório (admin e gerente) ---------- */
.rel-controle { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; }
.rel-controle-acoes { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.rel-controle-acoes .link-btn { margin-left: auto; }
.rel-editar { display: flex; flex-direction: column; gap: 10px; background: var(--soft); border-radius: 14px; padding: 12px; }
.rel-pedido { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; background: var(--yellow); color: var(--yellow-ink); border-radius: 12px; padding: 10px 12px; font-size: 13px; margin: 0; }
.rel-pedido-acoes { display: flex; gap: 8px; }
.rel-pedidos { display: flex; flex-direction: column; gap: 8px; border-left: 4px solid var(--yellow); }
.rel-pedido-linha { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; justify-content: space-between; font-size: 13px; }

/* ---------- Histórico de prazos da obra ---------- */
.motivo-prazo input { border-color: var(--yellow-dot, #E0A800); }
.prazos { display: flex; flex-direction: column; gap: 8px; background: var(--soft); border-radius: var(--radius-m); padding: 12px 14px; }
.prazos-cab { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; justify-content: space-between; }
.prazos-cab b { font-size: 14px; }
.prazos-resumo { font-size: 12px; font-weight: 700; color: var(--muted); }
.prazos-resumo.mudou { color: var(--late-ink); }
.prazos-linha { display: grid; grid-template-columns: 64px 1fr; gap: 8px; align-items: center; }
.prazos-rot { font-size: 12px; font-weight: 800; color: var(--text-2); }
.prazos-trilha { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.prazos-data { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.15; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 4px 8px; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.prazos-data small { font-size: 10px; font-weight: 600; color: var(--muted); }
.prazos-data.antiga { color: var(--muted); }
.prazos-data.antiga .pd-d { text-decoration: line-through; text-decoration-thickness: 1px; }
.prazos-data.previsto { text-decoration: none; color: var(--text-2); }
.prazos-data.atual { border-color: var(--brand); color: var(--brand-text); }
.prazos-data.real { background: var(--mint); border-color: transparent; color: var(--on-pastel); }
.prazos-data.real small { color: var(--on-pastel); }
.prazos-seta { color: var(--muted); font-size: 12px; }
.prazos-ver { align-self: flex-start; font-size: 12px; }
.prazos-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.prazos-lista li { display: grid; grid-template-columns: 64px 1fr; gap: 8px; }
.prazos-quando { color: var(--muted); font-variant-numeric: tabular-nums; }
.prazos-lista em { color: var(--text-2); }
.prazos-lista small { color: var(--muted); }

/* ---------- Planner de obras ---------- */
:root { --pl-inicio: #D9822B; --pl-meio: #046BD2; --pl-tecnica: #7A5AE0; --pl-final: #1F9D6B; --pl-marco: #16181D; --pl-atencao: #E0B000; }
:root[data-tema="escuro"] { --pl-inicio: #EE9C48; --pl-meio: #2F86E0; --pl-tecnica: #9C83F2; --pl-final: #35B985; --pl-marco: #E9EEF4; }
.pl-voltar { align-self: flex-start; }
.pl-auto { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; background: var(--soft); border-radius: var(--radius-s); padding: 10px 12px; }
.pl-auto .bar { flex: 1 1 120px; }
.pl-auto b { font-size: 16px; }
.pl-obras { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 14px; align-items: start; }
.pl-cartao { display: flex; flex-direction: column; gap: 10px; text-align: left; width: 100%; border: 2px solid transparent; }
.pl-cartao:hover { border-color: var(--line); }
.pl-cartao.atrasada { border-color: var(--red-line); }
.pl-cartao-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pl-cartao-nome { font-weight: 800; font-size: 15px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-partes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.pl-parte { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pl-parte small { font-size: 11px; font-weight: 600; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-parte.atrasada small { color: var(--red); }
.pl-parte-bar { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; display: block; }
.pl-parte-bar i { display: block; height: 100%; border-radius: 999px; }
.pl-prox { font-size: 12px; color: var(--text-2); }
.pl-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 12px; }
.pl-kpi { background: var(--card); border-radius: var(--radius-m); padding: 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; border: 2px solid transparent; text-align: left; }
.pl-kpi > span:first-child { font-size: 12px; font-weight: 700; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-kpi b { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.pl-kpi b small { font-size: 14px; font-weight: 700; color: var(--muted); letter-spacing: 0; }
.pl-kpi .pl-kpi-txt { font-size: 16px; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pl-kpi small { font-size: 12px; color: var(--text-2); }
.pl-kpi .bar { flex: none; margin-top: 4px; }
.pl-kpi.ruim { border-color: var(--red-line); background: var(--red-tint); }
.pl-kpi.ruim b { color: var(--red-text); }
.pl-kpi.clica:hover { border-color: var(--line); }
.pl-visoes { max-width: 460px; }
.pl-dica { border-left: 4px solid var(--brand); }
.pl-chip { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; background: var(--chip); color: var(--text-2); justify-self: start; }
.pl-chip.ok { background: var(--lime-soft); color: var(--lime-ink); }
.pl-chip.andamento { background: var(--brand-soft); color: var(--brand-text); }
.pl-chip.atrasada { background: var(--red); color: #fff; }
.pl-chip.atencao { background: var(--yellow); color: var(--yellow-ink); }
.pl-lista { display: flex; flex-direction: column; gap: 14px; }
.pl-bloco { display: flex; flex-direction: column; gap: 8px; border-left: 6px solid var(--c); }
.pl-bloco-cab { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; border: 0; background: none; padding: 0; text-align: left; width: 100%; color: inherit; }
.pl-bloco-tit { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pl-bloco-tit b { font-size: 16px; font-weight: 800; }
.pl-bloco-tit small { font-size: 12px; color: var(--muted); }
.pl-bloco-pct { font-weight: 800; font-size: 16px; min-width: 46px; text-align: right; }
.pl-obs { margin: 0; }
.pl-item { display: flex; gap: 6px; align-items: stretch; }
.pl-item-corpo {
  flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: 4px 12px; align-items: center;
  text-align: left; border: 2px solid transparent; background: var(--soft); border-radius: var(--radius-s); padding: 10px 12px; color: inherit;
}
.pl-item-corpo:hover { border-color: var(--line); }
.pl-item-nome { font-weight: 700; display: flex; align-items: center; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.pl-item-datas { font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.pl-item-and { font-size: 13px; font-weight: 600; min-width: 0; }
.pl-item-and small { font-weight: 500; color: var(--muted); }
.pl-item-bar { grid-column: 1 / -1; height: 4px; border-radius: 999px; background: var(--line); overflow: hidden; display: block; }
.pl-item-bar i { display: block; height: 100%; }
.pl-ordem { display: flex; flex-direction: column; gap: 4px; justify-content: center; }
.pl-ordem .mini { min-height: 28px; padding: 0 8px; }
.pl-ordem .mini:disabled { opacity: .35; }
.pl-losango { width: 10px; height: 10px; background: var(--pl-marco); transform: rotate(45deg); display: inline-block; flex: none; border-radius: 2px; }
.pl-bloco-add { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pl-diario { display: flex; flex-direction: column; gap: 12px; }
.pl-dia { display: flex; flex-direction: column; gap: 10px; }
.pl-dia.hoje { outline: 2px solid var(--brand); outline-offset: -2px; }
.pl-dia-cab { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.pl-dia-cab b { font-size: 15px; }
.pl-dia-cab .pill { margin-left: auto; min-height: 36px; }
.pl-dia-rels { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 8px; }
.pl-rel { display: flex; flex-direction: column; gap: 6px; text-align: left; border: 1.5px solid var(--line); background: var(--soft); border-radius: var(--radius-s); padding: 8px 10px; color: inherit; }
.pl-rel.andamento { border-style: dashed; }
.pl-rel-tit { font-weight: 700; font-size: 13px; }
.pl-rel-tit small { font-weight: 500; color: var(--muted); }
.pl-rel-fotos { display: flex; gap: 4px; flex-wrap: wrap; }
.pl-rel-fotos img, .pl-rel-fotos .rel-mais { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; font-size: 12px; }
.pl-modelo { list-style: none; margin: 0; padding: 10px 12px; background: var(--soft); border-radius: var(--radius-s); display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.pl-modelo small { display: inline-block; min-width: 86px; color: var(--muted); font-weight: 700; }
.pl-bloco-add > :nth-child(3) { grid-column: 1 / -1; }
/* montar etapas (várias de uma vez, por parte) */
.pl-montar-partes { display: flex; flex-direction: column; gap: 14px; }
.pl-montar-parte { display: flex; flex-direction: column; gap: 8px; border-left: 6px solid var(--c); padding-left: 12px; }
.pl-montar-parte h3 { margin: 0; font-size: 15px; font-weight: 800; }
.pl-montar-parte h3 small { font-weight: 500; color: var(--muted); font-size: 12px; }
.pl-montar-linha { display: flex; flex-direction: column; gap: 8px; background: var(--soft); border-radius: var(--radius-s); padding: 10px; }
.pl-montar-linha .grid2 { gap: 8px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.pl-montar-linha .field input { min-width: 0; width: 100%; }
.pl-montar-linha .field { gap: 4px; }
.pl-montar-top { display: flex; align-items: center; gap: 8px; }
.pl-montar-top .input { flex: 1; min-width: 0; }
.pl-montar-qtd { align-self: flex-start; color: var(--muted); font-size: 12px; }
.pl-montar-salvo { flex-wrap: wrap; gap: 8px; align-items: center; }
.pl-montar-guardar { display: flex; flex-direction: column; gap: 10px; }
.pl-montar-guardar .check { display: flex; gap: 10px; align-items: center; font-weight: 600; font-size: 14px; }
.pl-montar-guardar .check input { width: 20px; height: 20px; flex: none; }
/* etapas dentro da parte (janela da parte) */
.pl-parte-etapas { display: flex; flex-direction: column; gap: 8px; }
.pl-parte-etapas ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.pl-parte-etapa { width: 100%; display: flex; justify-content: space-between; gap: 10px; align-items: center; border: 1.5px solid var(--line); background: var(--soft); border-radius: var(--radius-s); padding: 8px 10px; text-align: left; color: inherit; font-weight: 600; font-size: 13px; }
.pl-parte-etapa span { display: flex; align-items: center; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.pl-parte-etapa small { color: var(--muted); font-weight: 500; white-space: nowrap; }

/* ---------- Chat da equipe ---------- */
.nav-badge, .m-abas-badge, .chat-badge {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--red); color: #fff;
  font-size: 11px; font-weight: 800; display: inline-grid; place-items: center; line-height: 1;
}
.nav button .nav-badge { margin-left: auto; }
.m-abas-badge { position: absolute; top: 8px; left: calc(50% + 4px); min-width: 18px; height: 18px; font-size: 10px; padding: 0 5px; box-shadow: 0 0 0 2px var(--card); }
body.chat-aberta .m-abas { display: none; }
.chat { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 14px; height: calc(var(--vh) - 80px); min-height: 460px; }
.chat-lista, .chat-conversa { background: var(--card); border-radius: var(--radius-l); min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.chat-lista-topo { display: flex; align-items: center; gap: 8px; padding: 16px 16px 8px; }
.chat-lista-topo h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; flex: 1; }
.chat-busca { margin: 0 12px 8px; }
.chat-itens { overflow-y: auto; flex: 1; padding: 0 8px 8px; display: flex; flex-direction: column; gap: 2px; }
.chat-item { display: flex; align-items: center; gap: 10px; text-align: left; border: 0; background: transparent; border-radius: var(--radius-s); padding: 10px 8px; color: inherit; width: 100%; }
.chat-item:hover { background: var(--soft); }
.chat-item.on { background: var(--brand-soft); }
.chat-item .avatar { width: 44px; height: 44px; flex: none; }
.chat-grupo-ic { width: 44px; height: 44px; flex: none; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.chat-item-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.chat-item-l1, .chat-item-l2 { display: flex; align-items: center; gap: 8px; justify-content: space-between; min-width: 0; }
.chat-item-l1 b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-item-l1 small { font-size: 11px; color: var(--muted); flex: none; }
.chat-item.nova .chat-item-l1 small { color: var(--red); font-weight: 700; }
.chat-prev { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.chat-item.nova .chat-prev { color: var(--ink); font-weight: 600; }
.chat-nada { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 24px; }
.chat-nada span { font-size: 42px; }
.chat-topo { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.chat-topo .avatar, .chat-topo .chat-grupo-ic { width: 40px; height: 40px; }
.chat-topo-txt { display: flex; flex-direction: column; min-width: 0; }
.chat-topo-txt b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-topo-txt small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-voltar { display: none; border: 0; background: var(--chip); width: 40px; height: 40px; border-radius: 12px; font-size: 24px; line-height: 1; flex: none; color: var(--ink); }
.chat-msgs { flex: 1; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; background: var(--soft); overscroll-behavior: contain; }
.chat-mais { align-self: center; margin-bottom: 8px; }
.chat-comeco { text-align: center; margin: auto; }
.chat-dia { display: flex; justify-content: center; margin: 10px 0 6px; }
.chat-dia span { font-size: 11px; font-weight: 700; color: var(--text-2); background: var(--card); border-radius: 999px; padding: 4px 10px; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.chat-msg { display: flex; flex-direction: column; align-items: flex-start; margin-top: 6px; }
.chat-msg.seguida { margin-top: 1px; }
.chat-msg.minha { align-items: flex-end; }
.chat-bolha { max-width: min(76%, 560px); background: var(--card); border-radius: 16px 16px 16px 4px; padding: 7px 10px 5px; display: flex; flex-direction: column; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.chat-msg.seguida .chat-bolha { border-radius: 16px; }
.chat-msg.minha .chat-bolha { background: var(--brand); color: var(--brand-ink); border-radius: 16px 16px 4px 16px; cursor: pointer; }
.chat-msg.minha.seguida .chat-bolha { border-radius: 16px; }
.chat-msg.apagada .chat-bolha { opacity: .65; font-style: italic; cursor: default; }
.chat-autor { font-size: 12px; font-weight: 800; margin-bottom: 1px; }
.chat-texto { font-size: 14px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-texto a { color: inherit; text-decoration: underline; }
.chat-hora { align-self: flex-end; font-size: 10px; opacity: .7; margin-top: 1px; }
.chat-apagar { margin-top: 4px; border: 0; background: var(--late-bg); color: var(--late-ink); font-weight: 700; font-size: 12px; border-radius: 999px; min-height: 30px; padding: 0 12px; }
.chat-envio { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--card); }
.chat-envio textarea { flex: 1; resize: none; border: 1.5px solid var(--line); border-radius: 22px; background: var(--field); color: var(--ink); padding: 10px 14px; min-height: 44px; max-height: 140px; font: inherit; font-size: 15px; outline: none; line-height: 1.35; }
.chat-envio textarea:focus { border-color: var(--brand); }
.chat-enviar { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; flex: none; }
.chat-enviar:disabled { opacity: .45; }
.chat-nova { max-width: 480px; }
.chat-pessoas { display: flex; flex-direction: column; gap: 2px; max-height: 46vh; overflow-y: auto; }
.chat-pessoa { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; border-radius: var(--radius-s); padding: 8px; text-align: left; color: inherit; }
.chat-pessoa:hover, .chat-pessoa.on { background: var(--soft); }
.chat-pessoa-txt { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.chat-pessoa-txt small { font-size: 12px; color: var(--green-dot); }
.chat-check { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-items: center; font-size: 13px; font-weight: 800; }
.chat-check.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.campo-chat-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px; border: 2px solid var(--brand); background: var(--card); color: var(--brand-text); border-radius: var(--radius-m); font-weight: 800; font-size: 16px; }
.campo-chat-tela { position: fixed; inset: 0; z-index: 60; background: var(--bg); padding: env(safe-area-inset-top) 0 0; display: flex; flex-direction: column; }
.campo-chat-tela .chat { height: 100%; min-height: 0; }
.campo-chat-tela .chat-lista { border-radius: 0; }
.campo-chat-tela .chat-lista-topo .chat-voltar { display: grid; place-items: center; }
.chat-vazio-banco { display: flex; flex-direction: column; gap: 12px; padding: 16px; }

@media (max-width: 899px) {
  .chat { grid-template-columns: minmax(0, 1fr); height: auto; min-height: 0; }
  .chat-lista { background: transparent; overflow: visible; border-radius: 0; }
  .chat-lista-topo { padding: 0 0 8px; }
  .chat-busca { margin: 0 0 8px; }
  .chat-itens { overflow: visible; padding: 0; }
  .chat-item { background: var(--card); margin-bottom: 4px; }
  .chat .chat-conversa { display: none; }
  .chat.aberta .chat-conversa { display: flex; position: fixed; z-index: 44; left: 0; right: 0; bottom: 0; top: calc(57px + env(safe-area-inset-top) + var(--faixa-h, 0px)); border-radius: 0; }
  .chat-voltar { display: grid; place-items: center; }
  .chat-bolha { max-width: 84%; }
  .campo-chat-tela .chat { height: 100%; overflow-y: auto; padding: 12px 16px; }
  .campo-chat-tela .chat-lista { background: transparent; }
  .campo-chat-tela .chat.aberta .chat-conversa { top: env(safe-area-inset-top); z-index: 61; }
}

/* produção do dia */
.pd-modal { max-width: 640px; }
.pd-dia { max-width: 220px; }
.pd-grupo { display: flex; flex-direction: column; gap: 8px; }
.pd-tit { font-size: 12px; font-weight: 700; color: var(--muted); }
.pd-linha { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; background: var(--soft); border-radius: var(--radius-s); padding: 10px 12px; }
.pd-nome { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 180px; }
.pd-nome small { font-size: 12px; color: var(--muted); }
.pd-nome .pd-aviso { color: var(--late-ink); font-weight: 700; }
.pd-qtd { width: 110px; text-align: right; font-weight: 800; font-size: 16px; }
.pd-seg { flex: 1 1 260px; max-width: 360px; }
.pd-seg button { min-height: 36px; font-size: 12px; }
.pd-ja { display: flex; flex-direction: column; gap: 6px; background: var(--lime-soft); border-radius: var(--radius-s); padding: 10px 12px; }
.pd-ja b { font-size: 13px; }
.pd-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.pd-lista li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.pd-q { font-weight: 800; font-variant-numeric: tabular-nums; min-width: 64px; }
.pd-e { flex: 1; min-width: 0; }
.pd-e em { color: var(--text-2); }
.pd-e small { color: var(--muted); }
.pd-lista .link-btn { font-size: 12px; }
.pd-rel { display: flex; flex-direction: column; gap: 8px; background: var(--lime-soft); border-radius: var(--radius-m); padding: 12px 14px; }
.pd-rel-cab { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }

/* portal do cliente: cronograma e dia a dia */
.pc-crono { gap: 14px; }
.pc-partes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 10px; }
.pc-parte { display: flex; flex-direction: column; gap: 5px; background: var(--soft); border-radius: var(--radius-s); padding: 10px 12px; border-top: 4px solid var(--c); min-width: 0; }
.pc-parte-nome { font-weight: 800; font-size: 13px; }
.pc-parte-info { font-size: 12px; color: var(--text-2); }
.pc-parte small { font-size: 11px; color: var(--muted); }
.pc-marcos { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; align-items: center; }
.pc-prox { font-weight: 600; width: 100%; }
.pc-marco { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
.pc-marco i { width: 9px; height: 9px; transform: rotate(45deg); border: 2px solid var(--pl-marco); border-radius: 2px; display: inline-block; }
.pc-marco.feito i { background: var(--pl-marco); }
.pc-prod { list-style: none; margin: 0 0 8px; padding: 10px 14px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; border-left: 4px solid var(--brand); }
.pc-prod em { color: var(--text-2); }

/* linha do tempo (planner e portal) */
.cr { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.cr-barra { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cr-escalas { width: min(100%, 300px); }
.cr-caixa { --cr-rot: 260px; overflow-x: auto; overflow-y: hidden; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--card); -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.cr-grade { position: relative; width: calc(var(--cr-rot) + var(--cr-w)); }
.cr-linha { display: grid; grid-template-columns: var(--cr-rot) var(--cr-w); min-height: 40px; border-bottom: 1px solid var(--line); position: relative; }
.cr-linha:last-child { border-bottom: 0; }
.cr-linha.clica { cursor: pointer; }
.cr-linha.clica:hover .cr-rot, .cr-linha.clica:focus-visible .cr-rot { background: var(--soft); }
.cr-linha.grupo { min-height: 44px; }
.cr-rot { position: sticky; left: 0; z-index: 3; background: var(--card); border-right: 1px solid var(--line); padding: 6px 10px; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 7px; align-content: center; min-width: 0; }
.cr-linha.grupo .cr-rot { background: var(--soft); }
.cr-nome { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; grid-column: 2; }
.cr-linha.grupo .cr-nome, .cr-linha.obra .cr-nome { font-weight: 800; }
.cr-sub { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; grid-column: 2; }
.cr-sit { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); grid-row: 1 / span 2; align-self: center; }
.cr-sit.ok { background: var(--green-dot); }
.cr-sit.andamento { background: var(--brand); }
.cr-sit.atrasada { background: var(--red); }
.cr-sit.atencao { background: var(--pl-atencao); }
.cr-trilho { position: relative; min-width: 0; }
.cr-cab { position: sticky; top: 0; z-index: 4; background: var(--card); min-height: 48px; border-bottom: 1px solid var(--line-strong); }
.cr-rot-cab { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; display: flex; align-items: flex-end; padding-bottom: 8px; }
.cr-meses, .cr-dias { position: absolute; left: 0; right: 0; height: 24px; }
.cr-meses { top: 0; }
.cr-dias { top: 24px; }
.cr-meses span { position: absolute; top: 4px; font-size: 11px; font-weight: 800; color: var(--text-2); padding-left: 6px; border-left: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-transform: capitalize; }
.cr-dias span { position: absolute; top: 3px; font-size: 11px; font-weight: 600; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cr-dias span.dom { color: var(--late-ink); }
.cr-dias span.hoje { color: var(--brand-ink); background: var(--brand); border-radius: 6px; font-weight: 800; }
.cr-fundo { position: absolute; top: 48px; bottom: 0; left: var(--cr-rot); width: var(--cr-w); pointer-events: none; z-index: 0; }
.cr-dom { position: absolute; top: 0; bottom: 0; background: var(--out-row); }
.cr-hoje { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--red); opacity: .8; }
.cr-bar { position: absolute; top: 50%; height: 14px; margin-top: -7px; border: 1.5px solid var(--c); border-radius: 5px; background: color-mix(in srgb, var(--c) 14%, var(--card)); overflow: hidden; z-index: 1; }
.cr-bar.grossa { height: 18px; margin-top: -9px; }
.cr-feito { position: absolute; left: 0; top: 0; bottom: 0; background: var(--c); }
.cr-real { position: absolute; top: calc(50% + 10px); height: 4px; border-radius: 999px; background: var(--ink); opacity: .55; z-index: 1; }
.cr-linha.grupo .cr-real { top: calc(50% + 12px); }
.cr-marco { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; transform: rotate(45deg); border: 2px solid var(--pl-marco); background: var(--card); border-radius: 2px; z-index: 2; }
.cr-marco.feito { background: var(--pl-marco); }
.cr-legenda { font-size: 12px; }
.cr-lg { width: 18px; height: 10px; border-radius: 3px; display: inline-block; }
.cr-lg.previsto { border: 1.5px solid var(--brand); background: color-mix(in srgb, var(--brand) 14%, var(--card)); }
.cr-lg.feito { background: var(--brand); }
.cr-lg.real { height: 4px; background: var(--ink); opacity: .55; }
.cr-lg.marco { width: 10px; height: 10px; transform: rotate(45deg); background: var(--pl-marco); border-radius: 2px; }
.cr-lg.hoje { width: 2px; height: 14px; background: var(--red); border-radius: 0; }

@media (max-width: 640px) {
  .cr-caixa { --cr-rot: 136px; }
  .cr-rot { padding: 6px 8px; column-gap: 5px; }
  .cr-nome { font-size: 12px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.25; }
  .pl-item-corpo { grid-template-columns: minmax(0, 1fr) auto; }
  .pl-item-datas { grid-column: 1; }
  .pl-item-and { grid-column: 1 / -1; }
  .pl-item-corpo .pl-chip { grid-row: 1; grid-column: 2; }
  .pl-bloco-cab { grid-template-columns: minmax(0, 1fr) auto; }
  .pl-bloco-cab .pl-chip { grid-row: 2; grid-column: 1; }
  .pl-bloco-cab .pl-bloco-pct { grid-row: 1; grid-column: 2; }
  .pl-kpi b { font-size: 24px; }
  .pd-qtd { width: 100%; }
  .pd-seg { max-width: none; }
  .pd-dia { max-width: none; }
}


/* =====================================================================
   Animações (src/animacoes.js)
   Regra: rápidas, só transform/opacity/clip-path, e o conteúdo nunca depende delas para aparecer.
   Quem pediu "reduzir movimento" no aparelho fica só com esmaecer (lá embaixo).
   ===================================================================== */
:root { --suave: cubic-bezier(.16, 1, .3, 1); --sai: cubic-bezier(.4, 0, 1, 1); }

/* ---------- toque: onda no lugar do clique + leve afundar ---------- */
.onda-caixa { position: fixed; z-index: 2147483000; overflow: hidden; pointer-events: none; contain: strict; }
.onda-caixa > span { position: absolute; border-radius: 50%; opacity: 0; will-change: transform, opacity; }
button, .pill { transition: background-color .18s ease, color .18s ease, box-shadow .18s ease, border-color .18s ease, transform .14s ease, filter .18s ease; }
.pill:active:not(:disabled), .m-btn:active, .x-btn:active, .atalho:active:not(:disabled), .hero-btn:active { transform: scale(.96); }
.stat:active, .item:active:not(.so-ver) { transform: scale(.985); }
.item, .today-card { transition: border-color .18s ease, background-color .18s ease, transform .14s ease; }

/* ---------- menu lateral (computador): o destaque azul desliza até a tela escolhida ---------- */
.nav { position: relative; }
.nav > button { position: relative; z-index: 1; }
.nav-luz { position: absolute; top: 0; left: 0; z-index: 0; border-radius: 14px; background: var(--brand-soft); pointer-events: none; opacity: 0;
  transition: transform .45s var(--suave), height .45s var(--suave), width .45s var(--suave), opacity .2s ease; }
.sidebar .nav > button svg { transition: color .25s ease, transform .35s var(--suave); }
.sidebar .nav > button.on svg, .sidebar .nav > button.parent svg { animation: icone-pulo .45s var(--suave); }
@keyframes icone-pulo { 40% { transform: scale(1.14); } }

/* rodapé do menu: claro/escuro, notificações e modo TV */
.sidebar-pe { margin-top: auto; display: flex; flex-direction: column; gap: 10px;
  /* fica sempre visível no pé do menu, mesmo em tela baixa (o menu rola por trás) */
  position: sticky; bottom: -28px; z-index: 3; margin-bottom: -28px; padding: 12px 0 28px; background: var(--card);
  box-shadow: 0 -14px 14px -14px rgba(16, 24, 40, .18); }
.sidebar-pe .me { margin-top: 0; }
.atalhos { display: flex; gap: 8px; padding: 0 6px; }
.atalho { position: relative; width: 38px; height: 38px; flex: none; border: 0; border-radius: 50%; padding: 0; display: grid; place-items: center;
  background: var(--soft); color: var(--text-2); }
.atalho:hover { background: var(--chip); color: var(--ink); }
.atalho:disabled { opacity: .55; cursor: default; }
.atalho svg { display: block; transition: transform .6s var(--suave); }
.atalho.on { background: var(--brand-soft); color: var(--brand-text); box-shadow: inset 0 0 0 1.5px var(--brand); }
.atalho-claro.on svg, .atalho-escuro.on svg { animation: icone-pulo .45s var(--suave); }
.tema-bola { position: fixed; z-index: 2147483001; border-radius: 50%; pointer-events: none; transform: scale(0); will-change: transform; }
.atalho-notif.ligado { background: var(--brand-soft); color: var(--brand-text); }
.atalho-notif i { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 2px var(--card);
  transform: scale(0); transition: transform .3s var(--suave); }
.atalho-notif.ligado i { transform: scale(1); }
.atalho-notif.ligado svg { animation: sino .6s ease; transform-origin: 50% 15%; }
@keyframes sino { 20% { transform: rotate(14deg); } 45% { transform: rotate(-10deg); } 70% { transform: rotate(5deg); } }
.atalho-tv:hover svg { transform: scale(1.08); }

/* ---------- celular: a bolinha azul das abas de baixo desliza de uma aba para a outra ---------- */
.m-abas-luz { display: none; }
@media (max-width: 899px) {
  .m-abas-luz { display: block; position: absolute; top: 0; left: 0; z-index: 0; pointer-events: none; opacity: 0;
    transition: transform .45s var(--suave), width .45s var(--suave), opacity .2s ease; }
  .m-abas-luz::before { content: ''; position: absolute; left: 50%; top: 50%; width: 52px; height: 40px; margin: -20px 0 0 -26px; border-radius: 14px; background: var(--brand-soft); }
  .m-abas-luz i { position: absolute; left: 50%; bottom: 6px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--brand); }
  .m-abas button { z-index: 1; transition: color .25s ease, transform .14s ease; }
  .m-abas button .m-abas-ponto { display: none; }
  .m-abas button svg { transition: transform .35s var(--suave); }
  .m-abas button.on svg { animation: icone-pulo .45s var(--suave); }
  /* sub-abas (Geral / Obras / Fábrica): a pílula azul desliza por baixo das outras */
  .m-subs { position: relative; isolation: isolate; }
  .m-subs button { position: relative; background: transparent; transition: color .25s ease; }
  .m-subs button::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--soft); }
  .m-subs button.on { background: transparent; }
  .m-subs-luz { position: absolute; top: 0; left: 0; border-radius: 999px; background: var(--brand); pointer-events: none; opacity: 0;
    transition: transform .42s var(--suave), width .42s var(--suave), opacity .2s ease; }
}
.m-subs-luz { display: none; }
@media (max-width: 899px) { .m-subs-luz { display: block; } }

/* ---------- troca de tela: a antiga sai rápido (a nova entra em cascata pelo animacoes.js) ---------- */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
html.vt-tela .main { view-transition-name: tela; }
html.vt-tela .m-topo { view-transition-name: m-topo; }
html.vt-tela .m-abas { view-transition-name: m-abas; }
html.vt-tela .faixa-como { view-transition-name: faixa-como; }
::view-transition-group(tela), ::view-transition-group(m-topo), ::view-transition-group(m-abas), ::view-transition-group(faixa-como) { animation: none; }
::view-transition-new(tela), ::view-transition-new(m-topo), ::view-transition-new(m-abas), ::view-transition-new(faixa-como) { animation: none; }
::view-transition-old(m-topo), ::view-transition-old(m-abas), ::view-transition-old(faixa-como) { display: none; }
::view-transition-old(tela) { animation: tela-sai .13s cubic-bezier(.2, 0, .4, 1) both; }
/* claro/escuro: a cor nova aparece pronta dentro do círculo (sem as transições de cor dos botões) */
html.vt-tema *, html.vt-tema *::before, html.vt-tema *::after { transition: none !important; }
@keyframes tela-sai { to { opacity: 0; transform: translateY(-8px); } }

/* ---------- janelas (modais): abrem subindo, fecham descendo ---------- */
.overlay { animation: fundo-entra .2s ease-out both; }
.overlay > * { animation: janela-entra .34s var(--suave) both; }
.overlay.saindo { animation: fundo-sai .2s var(--sai) both; pointer-events: none; }
.overlay.saindo > * { animation: janela-sai .2s var(--sai) both; }
@keyframes fundo-entra { from { opacity: 0; } }
@keyframes fundo-sai { to { opacity: 0; } }
@keyframes janela-entra { from { opacity: 0; transform: translateY(18px) scale(.98); } }
@keyframes janela-sai { to { opacity: 0; transform: translateY(10px) scale(.985); } }

/* gaveta do menu do celular saindo */
.m-gaveta-fundo.saindo { animation: fundo-sai .2s var(--sai) both; pointer-events: none; }
.m-gaveta-fundo.saindo .m-gaveta { animation: gaveta-sai .2s var(--sai) both; }
@keyframes gaveta-sai { to { transform: translateX(-100%); } }
.m-gaveta-lista > * { animation: item-entra .36s var(--suave) both; }
.m-gaveta-lista > :nth-child(2) { animation-delay: 25ms; } .m-gaveta-lista > :nth-child(3) { animation-delay: 50ms; }
.m-gaveta-lista > :nth-child(4) { animation-delay: 75ms; } .m-gaveta-lista > :nth-child(5) { animation-delay: 100ms; }
.m-gaveta-lista > :nth-child(6) { animation-delay: 125ms; } .m-gaveta-lista > :nth-child(n+7) { animation-delay: 150ms; }
@keyframes item-entra { from { opacity: 0; transform: translateX(-10px); } }

/* folha do relatório (campo) e foto ampliada */
.campo-folha { animation: folha-entra .32s var(--suave) both; }
.campo-folha.saindo { animation: folha-sai .2s var(--sai) both; pointer-events: none; }
@keyframes folha-entra { from { opacity: 0; transform: translateY(28px); } }
@keyframes folha-sai { to { opacity: 0; transform: translateY(20px); } }
.rel-luz { animation: fundo-entra .2s ease-out both; }
.rel-luz > img, .rel-luz > video { animation: foto-entra .32s var(--suave) both; }
.rel-luz.saindo { animation: fundo-sai .18s var(--sai) both; pointer-events: none; }
@keyframes foto-entra { from { opacity: 0; transform: scale(.94); } }

/* aviso (toast): sobe e assenta; some descendo */
.toast { animation: toast-entra .38s var(--suave) both; }
.toast.saindo { animation: toast-sai .2s var(--sai) both; }
@keyframes toast-entra { from { opacity: 0; transform: translate(-50%, 18px) scale(.96); } }
@keyframes toast-sai { to { opacity: 0; transform: translate(-50%, 10px) scale(.98); } }

/* ---------- gráficos e barras nascendo ---------- */
.chart .barra-col > path, .chart .barra-col > rect[style] { transform-box: fill-box; transform-origin: 50% 100%;
  animation: barra-sobe .7s var(--suave) both; animation-delay: calc(var(--i, 0) * 35ms + 80ms); }
.chart .barra-col > text.val { animation: fundo-entra .4s ease-out both; animation-delay: calc(var(--i, 0) * 35ms + 380ms); }
@keyframes barra-sobe { from { transform: scaleY(0); } }
.chart .grid { animation: fundo-entra .5s ease-out both; }
.meter > span, .bar > span, .stock-bar > span, .fin-custo-bar > span, .fin-res-bar { transform-origin: left center;
  animation: cresce-x .8s var(--suave) both; animation-delay: .12s; transition: width .5s var(--suave); }
@keyframes cresce-x { from { transform: scaleX(0); } }
.hbar { animation: revela-x .8s var(--suave) both; animation-delay: .1s; }
@keyframes revela-x { from { clip-path: inset(0 100% 0 0 round 8px); } to { clip-path: inset(0 0 0 0 round 8px); } }
.stat-value, .kpi-v { font-variant-numeric: tabular-nums; }

/* ---------- abas segmentadas e cartões: troca de cor suave ---------- */
.seg button, .tabs button, .hero-seg button, .cfg-abas button, .nav-sub button { transition: background-color .22s ease, color .22s ease, box-shadow .22s ease; }
.chave i { transition: transform .3s var(--suave); }

/* ---------- reduzir movimento: sem deslocar nada, só esmaecer ---------- */
@media (prefers-reduced-motion: reduce) {
  .nav-luz, .m-abas-luz, .m-subs-luz { transition: opacity .15s ease; }
  .overlay > *, .campo-folha, .rel-luz > img, .rel-luz > video, .m-gaveta-lista > *, .toast { animation-name: fundo-entra; animation-duration: .15s; }
  .toast { transform: translateX(-50%); }
  .overlay.saindo > *, .campo-folha.saindo, .toast.saindo { animation-name: fundo-sai; animation-duration: .12s; }
  .m-gaveta, .m-gaveta-fundo.saindo .m-gaveta { animation: none; }
  .chart .barra-col > path, .chart .barra-col > rect[style], .meter > span, .bar > span, .stock-bar > span, .fin-custo-bar > span, .fin-res-bar, .hbar { animation: none; }
  .sidebar .nav > button.on svg, .sidebar .nav > button.parent svg, .m-abas button.on svg, .atalho-notif.ligado svg, .atalho.on svg { animation: none; }
  .atalho svg { transition: none; }
  .pill:active:not(:disabled), .m-btn:active, .x-btn:active, .atalho:active:not(:disabled), .hero-btn:active, .stat:active, .item:active:not(.so-ver) { transform: none; }
}

/* ---------- Verificação em duas etapas: escudo, 6 caixinhas e relógio (DuasEtapas.jsx) ---------- */
.otp-card { overflow: hidden; }
.otp-titulo { display: flex; flex-direction: column; gap: 6px; text-align: center; }
.otp-titulo h1 { font-size: 24px; font-weight: 800; animation: otp-sobe .5s var(--suave, ease) both; }
.otp-titulo .note { animation: otp-sobe .5s .06s var(--suave, ease) both; }
.otp-escudo {
  align-self: center; position: relative; width: 76px; height: 76px; border-radius: 24px; display: grid; place-items: center;
  color: var(--brand); background: var(--brand-soft); animation: otp-escudo-entra .6s var(--suave, ease) both;
  transition: color .4s ease, background-color .4s ease;
}
.otp-escudo::before, .otp-escudo::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; border: 2px solid var(--brand); opacity: 0;
  animation: otp-pulso 2.6s ease-out infinite;
}
.otp-escudo::after { animation-delay: 1.3s; }
.otp-escudo svg { animation: otp-flutua 3.2s ease-in-out infinite; }
.otp-escudo.ok { color: #fff; background: var(--green-dot); }
.otp-escudo.ok::before, .otp-escudo.ok::after { border-color: var(--green-dot); animation-duration: 1.2s; }
.otp-escudo-check { stroke-dasharray: 24; stroke-dashoffset: 24; animation: otp-risca .45s .1s ease forwards; }

.otp-campo { display: flex; flex-direction: column; gap: 8px; animation: otp-sobe .5s .12s var(--suave, ease) both; }
.otp-rotulo { font-size: 12px; font-weight: 700; color: var(--muted); text-align: center; }
.otp { position: relative; display: grid; grid-template-columns: repeat(3, 1fr) 2px repeat(3, 1fr); gap: 7px; }
.otp > .otp-caixa:nth-of-type(4) { grid-column: 5; } /* 3 + 3, como aparece no app */
.otp-input {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; opacity: 0; border: 0; padding: 0;
  font-size: 16px; color: transparent; caret-color: transparent; background: transparent; cursor: text;
}
.otp-caixa {
  position: relative; height: 58px; min-width: 0; border-radius: 14px; display: grid; place-items: center;
  background: var(--card); border: 2px solid var(--line, #D9DEE5); box-shadow: 0 1px 0 rgba(0, 0, 0, .03);
  font-size: 26px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s var(--suave, ease), background-color .3s ease;
}
.otp.novo .otp-caixa { animation: otp-caixa-entra .45s calc(.16s + var(--i) * 45ms) var(--suave, ease) both; }
.otp-caixa.cheia { border-color: var(--brand-soft); }
.otp-caixa.ativa { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); transform: translateY(-2px); }
.otp-caixa.ativa::after { content: ''; width: 2px; height: 26px; border-radius: 2px; background: var(--brand); animation: otp-cursor 1s steps(1) infinite; }
.otp-caixa b { font: inherit; animation: otp-numero .32s var(--suave, ease) both; }
.otp.conferindo .otp-caixa { border-color: var(--brand); animation: otp-onda .9s calc(var(--i) * 80ms) ease-in-out infinite; }
.otp.erro { animation: otp-treme .45s ease; }
.otp.erro .otp-caixa { border-color: var(--late-ink); background: var(--late-bg); color: var(--late-ink); }
.otp.ok .otp-caixa { border-color: var(--green-dot); background: var(--green-dot); color: #fff; animation: otp-certo .4s calc(var(--i) * 60ms) var(--suave, ease) both; }
.otp-erro { animation: otp-sobe .3s var(--suave, ease) both; }

.otp-relogio { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; margin: 0; }
.otp-relogio svg { transform: rotate(-90deg); }
.otp-relogio circle { fill: none; stroke-width: 3; }
.otp-relogio-fundo { stroke: var(--soft); }
.otp-relogio-anel { stroke: var(--brand); stroke-linecap: round; transition: stroke-dashoffset .25s linear, stroke .3s ease; }
.otp-relogio.acabando { color: var(--late-ink); }
.otp-relogio.acabando .otp-relogio-anel { stroke: var(--late-ink); }

@keyframes otp-sobe { from { opacity: 0; transform: translateY(10px); } }
@keyframes otp-escudo-entra { from { opacity: 0; transform: scale(.6) rotate(-8deg); } }
@keyframes otp-pulso { 0% { opacity: .5; transform: scale(1); } 100% { opacity: 0; transform: scale(1.5); } }
@keyframes otp-flutua { 50% { transform: translateY(-3px); } }
@keyframes otp-risca { to { stroke-dashoffset: 0; } }
@keyframes otp-caixa-entra { from { opacity: 0; transform: translateY(14px) scale(.9); } }
@keyframes otp-numero { from { opacity: 0; transform: translateY(8px) scale(.6); } }
@keyframes otp-cursor { 50% { opacity: 0; } }
@keyframes otp-onda { 50% { transform: translateY(-5px); box-shadow: 0 6px 14px color-mix(in srgb, var(--brand) 22%, transparent); } }
@keyframes otp-treme { 15%, 55% { transform: translateX(-8px); } 35%, 75% { transform: translateX(8px); } 90% { transform: translateX(-3px); } }
@keyframes otp-certo { 0% { transform: scale(1); } 50% { transform: scale(1.12); } 100% { transform: scale(1); } }

@media (max-width: 380px) { .otp { gap: 5px; } .otp-caixa { height: 52px; font-size: 22px; border-radius: 12px; } }
@media (prefers-reduced-motion: reduce) {
  .otp-escudo, .otp-escudo::before, .otp-escudo::after, .otp-escudo svg, .otp-titulo h1, .otp-titulo .note, .otp-campo,
  .otp-caixa, .otp-caixa b, .otp.conferindo .otp-caixa, .otp.erro, .otp.ok .otp-caixa, .otp-erro { animation: none; }
  .otp-escudo-check { stroke-dashoffset: 0; animation: none; }
  .otp-caixa.ativa { transform: none; }
}

/* ---------- Chat: fotos, arquivos, respostas e envio (atualização 32) ---------- */
.chat-conversa-dentro { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }
.chat-spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: gira 0.9s linear infinite; display: inline-block; }
.chat-bolha { position: relative; transition: transform .18s ease; touch-action: pan-y; }
.chat-msg.minha .chat-bolha, .chat-bolha { cursor: pointer; }
.chat-msg.apagada .chat-bolha { cursor: default; }
.chat-bolha.vai-responder::before { content: '↩'; position: absolute; left: -34px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 50%; background: var(--card); color: var(--brand-text); display: grid; place-items: center; font-size: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.chat-msg.piscar .chat-bolha { animation: chat-piscar 1.2s ease; }
@keyframes chat-piscar { 0%, 100% { box-shadow: 0 1px 2px rgba(0,0,0,.06); } 30% { box-shadow: 0 0 0 4px var(--brand-soft); } }
.chat-hora { display: inline-flex; align-items: center; gap: 3px; }
.chat-tique { display: inline-flex; align-items: center; opacity: .9; }
.chat-tique.lida { color: #7FD3FF; opacity: 1; }
.chat-msg:not(.minha) .chat-tique.lida { color: var(--brand-text); }
.chat-tique.erro { width: 14px; height: 14px; border-radius: 50%; background: var(--red); color: #fff; font-weight: 800; font-size: 10px; justify-content: center; }
.chat-msg.falhou .chat-bolha { opacity: .8; }
.chat-falha { font-size: 11px; color: var(--red); margin-top: 3px; font-weight: 600; max-width: 84%; text-align: right; }
.chat-acoes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; max-width: 92%; }
.chat-msg.minha .chat-acoes { justify-content: flex-end; }
.chat-acoes button { border: 0; background: var(--card); color: var(--ink); font-weight: 700; font-size: 12px; border-radius: 999px; min-height: 32px; padding: 0 12px; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.chat-acoes button.perigo { background: var(--late-bg); color: var(--late-ink); }
.chat-acoes-nota { font-size: 11px; color: var(--muted); align-self: center; flex-basis: 100%; }
.chat-msg.minha .chat-acoes-nota { text-align: right; }
/* citação (respondendo uma mensagem) */
.chat-citacao { display: flex; flex-direction: column; text-align: left; border: 0; border-left: 4px solid var(--cor, var(--brand)); background: rgba(0,0,0,.06); color: inherit; border-radius: 8px; padding: 5px 8px; margin: 1px 0 4px; min-width: 0; max-width: 100%; }
.chat-msg.minha .chat-citacao { background: rgba(255,255,255,.16); border-left-color: rgba(255,255,255,.85); }
.chat-citacao b { font-size: 12px; color: var(--cor, var(--brand-text)); }
.chat-msg.minha .chat-citacao b { color: inherit; }
.chat-citacao span { font-size: 12.5px; opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-respondendo { display: flex; align-items: center; gap: 8px; margin: 0 12px; padding: 8px 6px 8px 10px; border-left: 4px solid var(--cor, var(--brand)); background: var(--soft); border-radius: 10px 10px 0 0; }
.chat-respondendo > span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chat-respondendo b { font-size: 12px; color: var(--cor, var(--brand-text)); }
.chat-respondendo small { font-size: 12.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* anexos dentro da bolha */
.chat-anexos { display: flex; flex-direction: column; gap: 4px; margin: 2px 0 3px; min-width: 0; }
.chat-fotos { display: grid; gap: 3px; border-radius: 12px; overflow: hidden; width: min(260px, 64vw); }
.chat-fotos.n2, .chat-fotos.n3, .chat-fotos.n4 { grid-template-columns: 1fr 1fr; }
.chat-fotos.n3 .chat-foto:first-child { grid-column: span 2; aspect-ratio: 2 / 1; }
.chat-foto { position: relative; border: 0; padding: 0; background: var(--chip); aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; min-height: 0; }
.chat-fotos.n1 .chat-foto { aspect-ratio: 4 / 3; max-height: 340px; }
.chat-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chat-foto-mais { position: absolute; inset: 0; background: rgba(0,0,0,.5); color: #fff; font-size: 24px; font-weight: 800; display: grid; place-items: center; }
.chat-bolha.so-fotos { padding: 3px; }
.chat-bolha.so-fotos .chat-autor { padding: 3px 6px 0; }
.chat-bolha.so-fotos .chat-hora { position: absolute; right: 9px; bottom: 8px; background: rgba(0,0,0,.45); color: #fff; opacity: 1; border-radius: 999px; padding: 1px 7px; }
.chat-video { width: min(260px, 64vw); max-height: 320px; border-radius: 12px; background: #000; }
.chat-audio { width: min(260px, 64vw); height: 40px; }
.chat-arquivo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; background: rgba(0,0,0,.05); border-radius: 12px; padding: 8px 10px; width: min(260px, 64vw); min-width: 0; }
.chat-msg.minha .chat-arquivo { background: rgba(255,255,255,.16); }
.chat-arquivo.carregando { opacity: .7; pointer-events: none; }
.chat-arquivo-ic { flex: none; width: 40px; height: 46px; border-radius: 8px; background: var(--brand-soft); color: var(--brand-text); display: grid; place-items: center; font-size: 10.5px; font-weight: 800; letter-spacing: .02em; }
.chat-msg.minha .chat-arquivo-ic { background: rgba(255,255,255,.92); color: var(--brand); }
.chat-arquivo-txt { display: flex; flex-direction: column; min-width: 0; }
.chat-arquivo-txt b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-arquivo-txt small { font-size: 11.5px; opacity: .75; }
/* botão de anexar e menu */
.chat-clipe-wrap { position: relative; flex: none; }
.chat-clipe { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--chip); color: var(--text-2); display: grid; place-items: center; transition: transform .2s ease, background .2s ease; }
.chat-clipe.on { background: var(--brand-soft); color: var(--brand-text); transform: rotate(45deg); }
.chat-clipe-fundo { position: fixed; inset: 0; z-index: 70; }
.chat-clipe-menu { position: absolute; left: 0; bottom: 54px; z-index: 71; background: var(--card); border-radius: var(--radius-m); box-shadow: 0 8px 28px rgba(0,0,0,.18); padding: 6px; display: flex; flex-direction: column; min-width: 220px; animation: chat-menu-entra .16s ease; transform-origin: bottom left; }
@keyframes chat-menu-entra { from { opacity: 0; transform: translateY(6px) scale(.97); } }
.chat-clipe-menu button { display: flex; align-items: center; gap: 12px; border: 0; background: transparent; color: var(--ink); font-weight: 700; font-size: 15px; min-height: 48px; padding: 0 10px; border-radius: var(--radius-s); text-align: left; }
.chat-clipe-menu button:hover { background: var(--soft); }
.chat-clipe-menu .ic { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; flex: none; }
.chat-clipe-menu .ic svg { width: 19px; height: 19px; }
.chat-clipe-menu .ic.azul { background: #046BD2; }
.chat-clipe-menu .ic.verde { background: #1F9D6B; }
.chat-clipe-menu .ic.roxo { background: #7A5AE0; }
.chat-clipe-menu small { font-size: 11.5px; color: var(--muted); padding: 6px 10px 4px; max-width: 240px; }
/* bandeja: o que vai ser enviado */
.chat-bandeja { display: flex; gap: 8px; overflow-x: auto; padding: 10px 12px 2px; background: var(--card); border-top: 1px solid var(--line); }
.chat-bandeja-item { position: relative; flex: none; width: 72px; height: 72px; border-radius: 12px; background: var(--soft); overflow: hidden; display: grid; place-items: center; }
.chat-bandeja-item img { width: 100%; height: 100%; object-fit: cover; }
.chat-bandeja-item > button { position: absolute; top: 3px; right: 3px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 16px; line-height: 1; display: grid; place-items: center; }
.chat-bandeja-arq { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 4px; text-align: center; min-width: 0; width: 100%; }
.chat-bandeja-arq b { font-size: 12px; color: var(--brand-text); }
.chat-bandeja-arq small { font-size: 9.5px; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-bandeja-mais { flex: none; width: 72px; height: 72px; border-radius: 12px; border: 2px dashed var(--line-strong); background: transparent; color: var(--muted); font-size: 28px; }
.chat-aviso { margin: 0 12px 6px; font-size: 12.5px; font-weight: 600; color: var(--late-ink); background: var(--late-bg); border-radius: 10px; padding: 8px 10px; }
.chat-soltar { position: absolute; inset: 0; z-index: 5; background: rgba(4,107,210,.12); border: 3px dashed var(--brand); border-radius: var(--radius-l); display: grid; place-items: center; pointer-events: none; }
.chat-soltar span { background: var(--card); color: var(--brand-text); font-weight: 800; padding: 10px 16px; border-radius: 999px; }
/* foto em tela cheia */
.chat-visor { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.92); display: grid; place-items: center; padding: calc(56px + env(safe-area-inset-top)) 8px calc(16px + env(safe-area-inset-bottom)); animation: m-fade .15s ease; }
.chat-visor img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }
.chat-visor-topo { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 8px; padding: calc(8px + env(safe-area-inset-top)) 10px 8px 16px; color: #fff; }
.chat-visor-topo > span { flex: 1; font-size: 13px; font-weight: 700; }
.chat-visor-topo .pill { color: #fff; border-color: rgba(255,255,255,.4); background: transparent; }
.chat-visor-x { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 26px; line-height: 1; }
.chat-visor-seta { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 28px; line-height: 1; }
.chat-visor-seta.esq { left: 10px; }
.chat-visor-seta.dir { right: 10px; }
@media (max-width: 760px) { .chat-visor-seta { display: none; } }
@media (prefers-reduced-motion: reduce) { .chat-spin, .chat-clipe-menu, .chat-msg.piscar .chat-bolha { animation: none; } .chat-bolha, .chat-clipe { transition: none; } }
.chat-visor-topo .pill { text-decoration: none; border: 1.5px solid rgba(255,255,255,.4); border-radius: 999px; min-height: 40px; padding: 0 16px; display: inline-flex; align-items: center; font-weight: 700; font-size: 14px; }
.chat-visor { z-index: 200; }

/* ---------- Chat completo (atualização 33): notas, busca, reações, edição, fixadas, áudio, link, cartões do app ---------- */
.chat-item.pessoal .chat-grupo-ic, .chat-grupo-ic.pessoal { background: var(--brand-soft); font-size: 18px; }
.chat-sec { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 12px 8px 4px; }
.chat-item.achada { padding-left: 12px; }
.chat-item.achada mark { background: #FFE58A; color: #111; border-radius: 3px; padding: 0 1px; }
.chat-encaminhada { font-size: 11.5px; font-style: italic; opacity: .75; margin-bottom: 2px; }
.chat-mencao { font-weight: 800; color: var(--brand-text); }
.chat-msg.minha .chat-mencao { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.chat-msg.me-citou .chat-bolha { box-shadow: 0 0 0 2px var(--brand), 0 1px 2px rgba(0,0,0,.06); }
.chat-editada { border: 0; background: transparent; color: inherit; font: inherit; font-size: 10px; font-style: italic; text-decoration: underline; text-underline-offset: 2px; padding: 0 2px 0 0; opacity: .95; cursor: pointer; }
/* reações */
.chat-reacoes { display: flex; flex-wrap: wrap; gap: 4px; margin-top: -6px; padding: 0 8px; position: relative; z-index: 1; }
.chat-reacao { border: 1.5px solid var(--card); background: var(--card); box-shadow: 0 1px 3px rgba(0,0,0,.14); border-radius: 999px; min-height: 26px; padding: 0 7px; font-size: 14px; display: inline-flex; align-items: center; gap: 3px; color: var(--ink); }
.chat-reacao small { font-size: 11px; font-weight: 800; color: var(--text-2); }
.chat-reacao.minha { border-color: var(--brand); background: var(--brand-soft); }
.chat-emojis { display: flex; gap: 2px; background: var(--card); border-radius: 999px; padding: 3px 4px; box-shadow: 0 2px 10px rgba(0,0,0,.14); flex-basis: 100%; max-width: max-content; animation: chat-menu-entra .16s ease; }
.chat-msg.minha .chat-emojis { margin-left: auto; }
.chat-acoes .chat-emojis button { background: transparent; box-shadow: none; font-size: 22px; min-height: 38px; width: 38px; padding: 0; border-radius: 50%; transition: transform .12s ease; }
.chat-acoes .chat-emojis button:active { transform: scale(1.25); }
.chat-acoes .chat-emojis button.on { background: var(--brand-soft); }
/* mensagem fixada */
.chat-fixada { display: flex; align-items: center; gap: 10px; border: 0; border-bottom: 1px solid var(--line); background: var(--card); color: inherit; text-align: left; padding: 8px 14px; min-height: 48px; }
.chat-fixada-ic { color: var(--brand-text); flex: none; display: grid; place-items: center; }
.chat-fixada-txt { display: flex; flex-direction: column; min-width: 0; }
.chat-fixada-txt small { font-size: 11px; font-weight: 700; color: var(--brand-text); }
.chat-fixada-txt b { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* editando */
.chat-respondendo.editando { border-left-color: #D9822B; }
.chat-respondendo.editando b { color: #B8661A; }
/* @menções */
.chat-sugestoes { margin: 0 12px; background: var(--card); border-radius: 12px 12px 0 0; box-shadow: 0 -4px 16px rgba(0,0,0,.1); display: flex; flex-direction: column; padding: 4px; max-height: 240px; overflow-y: auto; }
.chat-sugestoes button { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; color: var(--ink); min-height: 44px; padding: 0 8px; border-radius: 10px; text-align: left; font-size: 14px; }
.chat-sugestoes button:hover, .chat-sugestoes button:first-child { background: var(--soft); }
.chat-sugestoes .avatar { width: 30px; height: 30px; font-size: 11px; }
/* áudio */
.chat-enviar.mic { background: var(--brand); }
.chat-gravando { display: flex; align-items: center; gap: 10px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--card); }
.chat-gravando-lixo { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--late-bg); color: var(--late-ink); display: grid; place-items: center; flex: none; }
.chat-gravando-txt { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: var(--text-2); }
.chat-gravando-txt b { color: var(--ink); font-variant-numeric: tabular-nums; }
.chat-gravando-ponto { width: 12px; height: 12px; border-radius: 50%; background: var(--red); animation: piscar 1s ease infinite; }
.chat-gravando-erro { flex: 1; font-size: 13px; color: var(--late-ink); font-weight: 600; }
.chat-player { display: flex; align-items: center; gap: 8px; width: min(260px, 64vw); padding: 2px 0; }
.chat-player-play { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; flex: none; }
.chat-msg.minha .chat-player-play { background: rgba(255,255,255,.95); color: var(--brand); }
.chat-player-barra { flex: 1; height: 24px; display: flex; align-items: center; cursor: pointer; position: relative; }
.chat-player-barra::before { content: ''; position: absolute; left: 0; right: 0; height: 4px; border-radius: 2px; background: currentColor; opacity: .25; }
.chat-player-barra i { position: relative; height: 4px; border-radius: 2px; background: currentColor; }
.chat-player-tempo { font-size: 11.5px; font-variant-numeric: tabular-nums; opacity: .8; min-width: 30px; }
.chat-player-vel { border: 0; background: rgba(0,0,0,.08); color: inherit; font-size: 11px; font-weight: 800; border-radius: 999px; min-width: 34px; height: 24px; }
.chat-msg.minha .chat-player-vel { background: rgba(255,255,255,.2); }
/* prévia de link */
.chat-link { display: flex; flex-direction: column; text-decoration: none; color: inherit; background: rgba(0,0,0,.05); border-radius: 10px; overflow: hidden; margin: 4px 0 2px; width: min(280px, 66vw); }
.chat-msg.minha .chat-link { background: rgba(255,255,255,.16); }
.chat-link img { width: 100%; max-height: 150px; object-fit: cover; display: block; background: var(--chip); }
.chat-link span { display: flex; flex-direction: column; gap: 2px; padding: 7px 10px 8px; min-width: 0; }
.chat-link b { font-size: 13px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.chat-link small { font-size: 12px; opacity: .8; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.chat-link em { font-size: 11px; font-style: normal; opacity: .65; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* cartões de coisas do app */
.chat-itens-app { display: flex; flex-direction: column; gap: 4px; margin: 2px 0 3px; }
.chat-item-app { display: flex; align-items: center; gap: 10px; text-align: left; border: 0; color: inherit; background: rgba(0,0,0,.05); border-radius: 12px; padding: 8px 10px; width: min(280px, 66vw); min-width: 0; font: inherit; }
.chat-msg.minha .chat-item-app { background: rgba(255,255,255,.16); }
.chat-item-app-ic { width: 38px; height: 38px; border-radius: 10px; background: var(--brand-soft); display: grid; place-items: center; font-size: 19px; flex: none; }
.chat-msg.minha .chat-item-app-ic { background: rgba(255,255,255,.92); }
.chat-item-app-txt { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.chat-item-app-txt small { font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; opacity: .7; }
.chat-item-app-txt b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-item-app-txt span { font-size: 12px; opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-item-app-txt span.ruim { color: var(--red); opacity: 1; font-weight: 700; }
.chat-item-app-txt span.alerta { color: #B8661A; opacity: 1; font-weight: 700; }
.chat-msg.minha .chat-item-app-txt span.ruim, .chat-msg.minha .chat-item-app-txt span.alerta { color: #FFE0D1; }
.chat-item-app-ir { font-size: 22px; opacity: .6; flex: none; }
.chat-clipe-menu .ic.laranja { background: #D9822B; }
.chat-bandeja-item.app { width: 110px; background: var(--brand-soft); }
.chat-bandeja-item.app small { white-space: normal; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; color: var(--ink); font-size: 11px; }
.chat-bandeja-item > button.chat-bandeja-editar { top: auto; right: auto; bottom: 4px; left: 4px; width: auto; height: 24px; border-radius: 999px; padding: 0 8px 0 6px; display: inline-flex; gap: 3px; font-size: 11px; font-weight: 700; }
/* janelas */
.chat-janela { max-width: 480px; }
.chat-itens-abas { display: grid; grid-template-columns: repeat(4, 1fr); }
.chat-itens-abas button { font-size: 12.5px; padding: 0 4px; white-space: nowrap; }
.chat-pessoa-txt small.cinza { color: var(--muted); }
.chat-historico { list-style: none; display: flex; flex-direction: column; gap: 8px; max-height: 56vh; overflow-y: auto; padding: 0; margin: 0; }
.chat-historico li { background: var(--soft); border-radius: 12px; padding: 10px 12px; }
.chat-historico li.atual { background: var(--brand-soft); }
.chat-historico small { font-size: 11.5px; font-weight: 700; color: var(--text-2); }
.chat-historico p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.chat-historico li:not(.atual) p { text-decoration: line-through; text-decoration-color: rgba(0,0,0,.25); }
@media (max-width: 760px) { .chat-itens-abas button { font-size: 11.5px; } }

/* ---------- Editor de foto ---------- */
body.sem-rolar { overflow: hidden; }
.editor-foto { position: fixed; inset: 0; z-index: 210; background: #0B0F14; color: #fff; display: flex; flex-direction: column; padding-top: env(safe-area-inset-top); touch-action: none; animation: m-fade .15s ease; }
.editor-topo { display: flex; align-items: center; gap: 6px; padding: 8px 10px; }
.editor-espaco { flex: 1; }
.editor-btn { border: 0; background: rgba(255,255,255,.12); color: #fff; font-weight: 700; font-size: 14px; min-height: 40px; padding: 0 14px; border-radius: 999px; }
.editor-btn.ic { width: 40px; padding: 0; display: grid; place-items: center; }
.editor-btn:disabled { opacity: .35; }
.editor-btn.pronto { background: var(--brand); }
.editor-area { flex: 1; min-height: 0; display: grid; place-items: center; padding: 6px; position: relative; }
.editor-tela { max-width: 100%; max-height: 100%; width: auto; height: auto; display: block; touch-action: none; cursor: crosshair; border-radius: 4px; box-shadow: 0 4px 30px rgba(0,0,0,.5); }
.editor-area canvas { max-height: calc(var(--vh, 100vh) - 230px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
.editor-erro { color: #FFB590; font-weight: 600; }
.editor-texto { position: fixed; z-index: 5; display: flex; gap: 6px; background: rgba(0,0,0,.7); padding: 6px; border-radius: 12px; }
.editor-texto input { width: 170px; min-height: 40px; border: 0; border-radius: 8px; padding: 0 10px; font: inherit; font-size: 16px; font-weight: 800; background: #fff; }
.editor-texto button { border: 0; background: var(--brand); color: #fff; font-weight: 800; border-radius: 8px; padding: 0 12px; }
.editor-baixo { padding: 6px 10px calc(10px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; }
.editor-opcoes { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.editor-cores { display: flex; gap: 8px; }
.editor-cor { width: 30px; height: 30px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); padding: 0; transition: transform .12s ease; }
.editor-cor.on { border-color: #fff; transform: scale(1.18); box-shadow: 0 0 0 2px rgba(255,255,255,.25); }
.editor-grossura { display: flex; gap: 4px; background: rgba(255,255,255,.1); border-radius: 999px; padding: 3px; }
.editor-grossura button { width: 34px; height: 30px; border: 0; background: transparent; border-radius: 999px; display: grid; place-items: center; }
.editor-grossura button.on { background: rgba(255,255,255,.22); }
.editor-grossura i { display: block; border-radius: 50%; background: #fff; }
.editor-ferramentas { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.editor-ferramentas::-webkit-scrollbar { display: none; }
.editor-ferramentas button { flex: 1 0 46px; min-width: 46px; border: 0; background: transparent; color: rgba(255,255,255,.75); border-radius: 12px; padding: 6px 2px; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 700; }
.editor-ferramentas button.on { background: rgba(255,255,255,.16); color: #fff; }
.editor-tamanhos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.editor-tamanhos button { border: 0; background: rgba(255,255,255,.1); color: #fff; border-radius: 12px; padding: 8px 4px; display: flex; flex-direction: column; gap: 2px; align-items: center; }
.editor-tamanhos button.on { background: var(--brand); }
.editor-tamanhos b { font-size: 13px; }
.editor-tamanhos small { font-size: 10.5px; opacity: .8; }
.editor-corte { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.editor-corte span { flex: 1 1 100%; font-size: 13px; color: rgba(255,255,255,.8); text-align: center; }
.editor-corte .editor-btn { flex: 1; }
@media (prefers-reduced-motion: reduce) { .editor-foto, .chat-emojis { animation: none; } .chat-gravando-ponto { animation: none; } }

/* ---------- Portal do cliente: blocos montados pelo administrador (aba Portal dos clientes) ---------- */
.pc-colunas.inv { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
.pc-colunas.obra.inv { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); }
.pc-recado { display: flex; flex-direction: column; gap: 6px; border-left: 4px solid var(--brand); }
.pc-recado p { margin: 0; white-space: pre-line; color: var(--text-2); font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.pc-planos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.pc-plano { display: flex; flex-direction: column; gap: 12px; text-align: left; border: 1px solid var(--line); color: var(--ink); width: 100%; min-width: 0; }
.pc-plano:hover { border-color: var(--brand); }
.pc-plano .pc-obra-l1 b { min-width: 0; overflow-wrap: anywhere; }
.pc-plano-pct { font-weight: 800; font-size: 15px; color: var(--brand-text); }
.pc-plano-partes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pc-plano-parte { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pc-plano-parte small { font-size: 11px; color: var(--muted); line-height: 1.2; overflow-wrap: anywhere; }
.pc-plano-parte small:nth-of-type(1) { font-weight: 700; color: var(--text-2); }
.pc-plano-sit.atrasada { color: var(--late-ink); font-weight: 700; }
.pc-plano .pc-prox { font-size: 13px; }
@media (max-width: 560px) { .pc-plano-partes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Portal dos clientes (só administradores): montar a tela de cada cliente ---------- */
.ptc { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ptc-aviso { background: var(--yellow-soft); border: 1px solid var(--yellow-line); }
.ptc-aviso p { margin: 0; }
.ptc-clientes { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; }
.ptc-clientes::-webkit-scrollbar { display: none; }
.ptc-cli { flex: none; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; border: 1px solid var(--line); background: var(--card); padding: 9px 14px; border-radius: 14px; text-align: left; color: var(--ink); min-height: 44px; }
.ptc-cli b { font-size: 14px; }
.ptc-cli small { font-size: 11px; color: var(--muted); }
.ptc-cli.on { background: var(--brand-soft); border-color: var(--brand); }
.ptc-cli.on small { color: var(--brand-text); }
.ptc-vista { display: none; }
.ptc-corpo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 16px; align-items: start; }
.ptc-cab { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: flex-start; }
.ptc-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ptc-lista > li { position: relative; }
.ptc-lista.arrastando > li { transition: transform .18s ease; user-select: none; -webkit-user-select: none; }
.ptc-lista.arrastando > li.pego { transition: none; z-index: 2; }
.ptc-lista > li.pego .ptc-bloco { box-shadow: 0 10px 28px rgba(16, 24, 40, .18); border-color: var(--brand); }
.ptc-bloco { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 8px 10px 8px 4px; display: flex; flex-direction: column; gap: 10px; }
.ptc-bloco.off { background: var(--soft); }
.ptc-bloco.off .ptc-bloco-txt b { color: var(--muted); }
.ptc-bloco-l1 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ptc-alca { flex: none; width: 40px; height: 44px; border: 0; background: transparent; color: var(--muted); border-radius: 10px; display: grid; place-items: center; cursor: grab; touch-action: none; padding: 0; }
.ptc-alca:hover { background: var(--chip); color: var(--ink); }
.ptc-lista.arrastando .ptc-alca { cursor: grabbing; }
.ptc-bloco-txt { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ptc-bloco-txt b { font-size: 14px; font-weight: 700; }
.ptc-bloco-txt small { font-size: 12px; color: var(--muted); }
.ptc-bloqueado { color: var(--yellow-ink) !important; font-weight: 600; }
.ptc-bloqueado .link-btn { font-size: 12px; }
.ptc-textos-btn { flex: none; min-height: 36px; padding: 0 12px; font-size: 13px; }
.ptc-textos-btn.on { background: var(--brand-soft); color: var(--brand-text); }
.ptc-textos { display: flex; flex-direction: column; gap: 12px; padding: 4px 4px 6px 48px; }
.ptc-campo-pe { font-size: 12px; color: var(--muted); }
.ptc-campo-pe .link-btn { font-size: 12px; }
.ptc-vars { display: flex; flex-wrap: wrap; gap: 6px; }
.ptc-var { border: 1px dashed var(--line-strong); background: var(--card); border-radius: 999px; padding: 0 10px; min-height: 32px; font-size: 12px; font-weight: 600; color: var(--brand-text); }
.ptc-var:hover { border-color: var(--brand); }
.ptc-opcao { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; font-weight: 600; }
.ptc-dica { font-size: 12px; }
.ptc-acoes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; position: sticky; bottom: 0; background: var(--card); padding: 10px 0 2px; border-top: 1px solid var(--line); }
.ptc-acoes .pill:disabled { opacity: .55; cursor: default; }
.ptc-previa { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ptc-previa-cab { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.ptc-previa-cab .seg { flex: 1; min-width: 200px; }
.ptc-dados { flex: 1; min-width: 160px; }
.ptc-nao-salvo { margin: 0; font-size: 12px; font-weight: 700; color: var(--yellow-ink); background: var(--yellow-soft); border-radius: 10px; padding: 6px 10px; }
.ptc-moldura { border: 1px solid var(--line-strong); border-radius: 26px; background: var(--bg); overflow: hidden; height: min(78vh, 760px); }
.ptc-moldura.celular { max-width: 390px; width: 100%; margin: 0 auto; border-width: 6px; border-color: var(--ink); border-radius: 34px; }
.ptc-tela { height: 100%; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; container: pc / inline-size; background: var(--bg); color: var(--ink); }
.ptc-tela .pc { min-height: 100%; }
.ptc-tela .pc-topo { padding-left: 16px; padding-right: 16px; }
.ptc-tela {
  --bg: #E9ECEF;
  --shell: #F4F5F6;
  --card: #FFFFFF;
  --soft: #F7F8F9;
  --chip: #F1F2F4;
  --line: #E3E6EA;
  --line-strong: #C5CAD1;
  --ink: #16181D;
  --on-ink: #FFFFFF;
  --text-2: #4B5260;
  --muted: #5F6672;
  --field: #FFFFFF;
  --overlay: rgba(22, 24, 29, .45);

  /* identidade Radial */
  --brand: #046BD2;
  --brand-ink: #FFFFFF;
  --brand-soft: #D3E6FA;
  --brand-text: #0559AD;
  --navy: #121E2B;

  /* destaque principal (antes verde-limão, agora a família do azul da Radial) */
  --lime: #046BD2;
  --on-lime: #FFFFFF;
  --lime-soft: #E8F2FD;
  --lime-ink: #0559AD;
  --on-pastel: #16181D;
  --lav: #CFC8F5;
  --blue: #BFDAF6;
  --mint: #A9CEF5;
  --peach: #F8C9B4;
  --late-bg: #FCE2D6;
  --late-ink: #9A3412;
  --yellow: #FBE38E;
  --yellow-soft: #FFF6D1;
  --yellow-line: #EBCB55;
  --yellow-ink: #6B4E00;
  --yellow-dot: #E0B000;
  --red: #C62828;
  --red-soft: #F9C4C0;
  --red-tint: #FFEDEB;
  --red-line: #E98A82;
  --red-text: #7F1414;
  --green-dot: #3E9B54;   /* só para "online agora" */
  --out-row: #FAFAFB;
  --today: #F3F8FE;

  --radius-xl: 28px;
  --radius-l: 24px;
  --radius-m: 16px;
  --radius-s: 12px;
  --pad-card: 18px;
  --pad-item: 12px 14px;
  --gap-main: 22px;
  --cell-h: 52px;
  --pl-inicio: #D9822B; --pl-meio: #046BD2; --pl-tecnica: #7A5AE0; --pl-final: #1F9D6B; --pl-marco: #16181D; --pl-atencao: #E0B000;
  color-scheme: light;
}
/* a prévia se comporta como a tela do tamanho escolhido (celular ou computador) */
@container pc (max-width: 900px) {
  .pc-colunas, .pc-colunas.obra, .pc-colunas.inv, .pc-colunas.obra.inv { grid-template-columns: 1fr; }
  .pc-colunas.obra:not(.segue) > aside { order: -1; }
  .pc-obra-topo { grid-template-columns: 1fr; }
  .hero { flex-direction: column; align-items: stretch; gap: 14px; padding: 20px 18px 18px; border-radius: 24px; }
  .hero::after { width: 220px; height: 220px; right: -70px; top: -90px; }
}
@container pc (max-width: 640px) {
  .cr-caixa { --cr-rot: 136px; }
  .cr-rot { padding: 6px 8px; column-gap: 5px; }
  .cr-nome { font-size: 12px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.25; }
}
@container pc (max-width: 560px) {
  .pc-quem { display: none; }
  .pc-hero h1 { font-size: 30px; }
  .pc-hero .hero-linha { font-size: 18px; }
  .pc-kpis { width: 100%; }
  .pc-kpis div { flex: 1; min-width: 0; padding: 10px 12px; }
  .pc-kpis b { font-size: 22px; }
  .pc-rel-mini { grid-template-columns: repeat(2, 48px); }
  .pc-rel-mini img:nth-child(3) { display: none; }
  .pc-rel-mini img { width: 48px; height: 48px; }
  .pc-obra-tit h1 { font-size: 24px; }
  .pc-plano-partes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .ptc-vista { display: grid; }
  .ptc-corpo { grid-template-columns: minmax(0, 1fr); }
  .ptc-corpo.vista-montar .ptc-previa, .ptc-corpo.vista-previa .ptc-montar { display: none; }
  .ptc-previa { position: static; }
}
@media (max-width: 560px) {
  .ptc-textos { padding-left: 4px; }
  .ptc-moldura.celular { border-width: 0; border-radius: var(--radius-m); border: 1px solid var(--line-strong); }
}
@media (max-width: 899px) {
  /* a barra de Salvar fica acima das abas flutuantes do celular */
  .ptc-acoes { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .ptc-moldura, .ptc-moldura.celular { height: calc(var(--vh, 100vh) - 330px); min-height: 440px; }
}

/* =====================================================================
   Orçamento de impermeabilização (Orçamentos › Impermeabilização › Telecom)
   ===================================================================== */
.oi-trilha { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 4px; }
.orc-st.finalizado { background: var(--brand-soft); color: var(--brand-text); }
.orc-st.rascunho { background: var(--chip); color: var(--text-2); }
.orc-selo.aprovado { background: var(--brand); color: #fff; }
.orc-selo.cancelado { background: var(--late-bg); color: var(--late-ink); }
.orc-campos .c-tudo { grid-column: 1 / -1; }
.orc-q.boa b { color: var(--brand-text); }
.orc-q.ruim b { color: var(--late-ink); }
.orc-q.provisoria b { color: var(--yellow-ink); }

/* lista */
.oi-filtros { display: flex; flex-direction: column; gap: 10px; }
.oi-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.oi-chips::-webkit-scrollbar { display: none; }
.oi-chips .pill { flex: 0 0 auto; }
.oi-chips .pill small { opacity: .65; font-weight: 700; margin-left: 2px; }
.oi-busca { display: grid; grid-template-columns: minmax(0, 1fr) 170px 170px; gap: 8px; align-items: end; }
.oi-periodo { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.oi-periodo .input { min-width: 0; }
.oi-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.oi-lista .empty { padding: 18px 0; }
.oi-item { width: 100%; display: grid; grid-template-columns: 140px minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 6px 14px; align-items: center; text-align: left;
  background: var(--soft); border: 2px solid transparent; border-radius: 16px; padding: 12px 14px; color: inherit; font: inherit; cursor: pointer; }
.oi-item:hover { border-color: var(--line-strong); }
.oi-item small { display: block; font-size: 12px; color: var(--muted); }
.oi-item small.ruim { color: var(--late-ink); font-weight: 700; }
.oi-item-num b { font-size: 13.5px; }
.oi-item-nome b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oi-item-valor { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-variant-numeric: tabular-nums; }

/* tela do orçamento */
.oi .orc-topo { flex-wrap: wrap; }
.oi .orc-salvo { margin-left: auto; }
.oi-acoes { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.oi-mais { position: relative; }
.oi-mais > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; }
.oi-mais > summary::-webkit-details-marker { display: none; }
.oi-mais-menu { position: absolute; z-index: 20; top: calc(100% + 6px); right: 0; min-width: 220px; background: var(--card); border-radius: 14px; padding: 10px 14px;
  display: flex; flex-direction: column; gap: 4px; box-shadow: 0 8px 28px rgba(0, 0, 0, .18); }
.oi-mais-menu .link-btn { text-align: left; min-height: 36px; color: var(--brand-text); text-decoration: none; }
.oi-mais-menu .link-btn.perigo { color: var(--late-ink); }

.oi-etapas { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; background: var(--chip); padding: 4px; border-radius: 16px; }
.oi-etapa { border: 0; background: transparent; border-radius: 12px; min-height: 48px; padding: 6px 8px; display: flex; align-items: center; gap: 8px; text-align: left; color: var(--text-2); font: inherit; cursor: pointer; }
.oi-etapa b { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--muted); }
.oi-etapa span { font-size: 12.5px; font-weight: 700; line-height: 1.15; }
.oi-etapa.on { background: var(--brand); color: var(--brand-ink, #fff); }
.oi-etapa.on b { color: inherit; }
.oi-sistemas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.oi-sistemas .orc-escopo { color: inherit; font: inherit; cursor: pointer; }
.oi-sistemas .oi-letra { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.oi-qts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.oi-mat td, .oi-mat th { white-space: nowrap; }
.oi-ins { display: grid; grid-template-columns: minmax(0, 2fr) 64px 84px 110px 100px 32px; gap: 6px; align-items: center; }
.oi-ins-cab { font-size: 11px; font-weight: 700; color: var(--muted); }
.oi-sub { text-align: right; font-variant-numeric: tabular-nums; font-size: 13.5px; }
.oi-insumos > summary { font-size: 14px; }
.oi-insumos .orc-lista { margin-top: 10px; }
.oi-compl { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 16px; background: var(--soft); }
.oi-compl > .field { max-width: 380px; }
.oi-painel { background: var(--soft); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.oi-painel .orc-h3 { margin-top: 0; }
.oi-restaurar, .oi-aplicar { align-self: flex-start; }
.oi-tab { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.oi-tab td { padding: 6px 0; border-top: 1px solid var(--line); vertical-align: top; }
.oi-tab tr:first-child td { border-top: 0; }
.oi-tab td:last-child { text-align: right; font-weight: 700; padding-left: 10px; white-space: nowrap; }
.oi-tab td:first-child { color: var(--text-2); }
.oi-tab tr.forte td { font-weight: 800; color: var(--ink); }
.oi-tab td.boa { color: var(--brand-text); }
.oi-tab td.ruim { color: var(--late-ink); }
.oi-tab td.provisoria { color: var(--yellow-ink); }
.oi-margem { border: 2px solid transparent; }
.oi-margem-linha { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.oi-margem-linha span { font-size: 13px; font-weight: 700; color: var(--text-2); }
.oi-margem-linha b { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.oi-margem.boa { border-color: var(--brand-soft); } .oi-margem.boa .oi-margem-linha b { color: var(--brand-text); }
.oi-margem.ruim { border-color: var(--late-bg); } .oi-margem.ruim .oi-margem-linha b { color: var(--late-ink); }
.oi-margem.provisoria { border-color: var(--yellow); } .oi-margem.provisoria .oi-margem-linha b { color: var(--yellow-ink); }
.oi-nav { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.oi-faixa { display: none; }

@media (max-width: 1250px) { .oi-qts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 899px) {
  .oi-etapas { display: flex; overflow-x: auto; scrollbar-width: none; }
  .oi-etapas::-webkit-scrollbar { display: none; }
  .oi-etapa { flex: 0 0 auto; }
  .oi-faixa { display: flex; position: sticky; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 6; align-items: center; justify-content: space-between; gap: 10px;
    border: 0; border-radius: 18px; padding: 10px 16px; background: var(--ink); color: var(--on-ink); text-align: left; font: inherit; box-shadow: 0 10px 30px rgba(16, 24, 40, .16); }
  .oi-faixa small { display: block; font-size: 11px; opacity: .7; font-weight: 700; }
  .oi-faixa b { font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
  .oi-faixa.ruim b:last-child { color: #FFB59A; }
  .oi-faixa-ver { font-size: 13px; font-weight: 700; }
}
@media (max-width: 640px) {
  .oi-busca { grid-template-columns: 1fr 1fr; }
  .oi-busca > .input { grid-column: 1 / -1; }
  .oi-periodo { flex-direction: column; align-items: stretch; gap: 2px; }
  .oi-item { grid-template-columns: minmax(0, 1fr) auto; }
  .oi-item-num { grid-column: 1; } .oi-item-valor { grid-column: 2; grid-row: 1 / span 2; }
  .oi-item-nome, .oi-item-meta { grid-column: 1; }
  .oi-sistemas { grid-template-columns: 1fr; }
  .oi-ins-cab { display: none; }
  .oi-ins { grid-template-columns: minmax(0, 1fr) 64px 32px; }
  .oi-ins > .input:first-child { grid-column: 1 / span 2; }
  .oi-ins > .input:nth-child(2) { grid-column: 3; grid-row: 1; }
  .oi-ins > .orc-num:nth-child(3), .oi-ins > .orc-num:nth-child(4) { grid-column: span 1; }
  .oi-ins > .oi-sub { grid-column: 1 / span 2; text-align: left; }
  .oi-ins > .x-btn { grid-column: 3; }
  .oi-ins { padding-bottom: 8px; border-bottom: 1px solid var(--line); }
  .oi-cad-ins { grid-template-columns: minmax(0, 1fr) 60px 32px; }
  .oi-cad-ins > .orc-num { grid-column: 1 / span 2; }
  .oi-mais-menu { right: auto; left: 0; }
  .oi-qts { grid-template-columns: 1fr 1fr; }
}
.oi-cad-sis { display: flex; flex-direction: column; gap: 8px; padding: 12px; background: var(--soft); border-radius: 16px; }
.oi-cad-ins { display: grid; grid-template-columns: minmax(0, 2fr) 70px 140px 32px; gap: 6px; align-items: center; }
@media (max-width: 899px) { .oi .orc-topo { position: static; } }
.oi-busca .input { width: 100%; min-width: 0; }
.oi-periodo { min-width: 0; }
