:root {
  /* v0258: a marca do app passa a ser a VCR. O vermelho ELCOP continua
     existindo, mas SO como sinal de perigo (erro, falha, atraso, pendencia,
     exclusao, substituicao e orcado estourado). Tudo que e marca — aba ativa,
     botao principal, borda de topo, foco, barra de progresso, item do menu —
     usa --marca. */
  /* v0259: o Carlos achou o laranja cheio pesado em area grande. A marca passa
     para o TEAL da VCR — a cor dominante do logo, mais sobria. O laranja
     continua vivo no giro do carregamento e nos detalhes que ja o usavam. */
  --marca: #0b7b80;
  --marca-escura: #075e62;
  --marca-suave: #eaf4f4;
  --marca-suave-2: #d8eaeb;
  --marca-borda: #a9cfd1;
  --red: #a20f1b;
  --red-dark: #790914;
  --graphite: #303234;
  --ink: #171a1d;
  --muted: #68707a;
  --line: #d9dee5;
  --surface: #ffffff;
  /* v0218: fundo principal = cinza chumbo das letras VCR (#464646) a 16%
     sobre branco (escolha do Carlos entre 5/10/16/24%). Antes: #f4f6f8. */
  --page: #e1e1e1;
  --green: #13795b;
  --green-soft: #e8f5ef;
  --amber: #a56500;
  --amber-soft: #fff4df;
  --blue: #1d5f86;
  --warehouse-pending-bg: #fffaf1;
  --warehouse-extra-bg: #f3f8fc;
  --warehouse-replace-bg: #fff6f7;
  --warehouse-done-bg: #f5fbf8;
  --shadow: 0 16px 36px rgba(20, 24, 28, 0.1);
  --row-alt: #fbfcfe;
  --row-soft-shadow: inset 4px 0 0 rgba(48, 50, 52, 0.055), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --cell-soft-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --app-visual-vh: 100svh;
  --app-visual-vw: 100vw;
  --app-modal-safe-top: 18px;
  --mobile-keyboard-inset: 0px;
  --module-shell-max: 1920px;
  --module-shell-gutter: clamp(6px, 0.75vw, 14px);
  --module-shell-pad: clamp(10px, 0.9vw, 18px);
  --module-sidebar-width: clamp(220px, 12.5vw, 260px);
  --module-gap: clamp(10px, 0.85vw, 16px);
  --radius: 8px;
  color-scheme: light;
  font-family:
    Poppins, Inter, "Segoe UI", Roboto, Arial, sans-serif;
}

/* v0139 · Poppins embutida (escolha do Carlos): a MESMA fonte em todo
   aparelho, nitida e sem serrilhado. Arquivos proprios em assets/fonts
   (subconjunto latino, ~13KB cada) — o app continua 100%% offline. */
@font-face {
  font-family: "Poppins";
  src: url("assets/fonts/poppins-400.woff?v=20261002-0356") format("woff");
  font-weight: 100 449;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("assets/fonts/poppins-500.woff?v=20261002-0356") format("woff");
  font-weight: 450 649;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("assets/fonts/poppins-700.woff?v=20261002-0356") format("woff");
  font-weight: 650 1000;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  touch-action: pan-y;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (hover: none), (pointer: coarse) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  min-width: 320px;
  width: 100%;
  max-width: 100%;
  /* v0130: 'hidden' fazia o body virar conteiner de rolagem e QUEBRAVA o
     position:sticky do cabecalho e do menu lateral (eles rolavam junto).
     'clip' corta o estouro horizontal do mesmo jeito, sem quebrar o sticky. */
  overflow-x: clip;
  touch-action: pan-y;
  overscroll-behavior-x: none;
  -webkit-tap-highlight-color: transparent;
  background: var(--page);
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

a,
button,
summary,
label,
input,
select,
textarea,
[role="button"] {
  touch-action: manipulation;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.auth-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(18px, 5vw, 48px);
  background:
    linear-gradient(135deg, rgba(240, 132, 48, 0.08), rgba(19, 121, 91, 0.08)),
    var(--page);
}

.auth-card {
  width: min(520px, 100%);
  padding: clamp(22px, 4vw, 34px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--marca);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.auth-brand {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-bottom: 24px;
}

.auth-brand img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.auth-brand small,
.auth-change-head small,
.auth-default-password,
.auth-status {
  color: var(--muted);
  font-weight: 800;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form label,
.auth-user-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.auth-form label small {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
  font-weight: 800;
}

.auth-form input,
.auth-user-form input,
.auth-user-form select {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius);
  font-weight: 800;
}

.auth-checkbox {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px !important;
  color: var(--ink) !important;
}

.auth-checkbox input {
  width: 18px;
  min-height: 18px;
}

.auth-submit {
  min-height: 50px;
  justify-content: center;
}

.auth-status {
  min-height: 20px;
  margin: 14px 0 0;
}

.auth-status.error {
  color: var(--red);
}

.auth-status.ok {
  color: var(--green);
}

.auth-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  max-width: 240px;
  padding: 0 12px;
  color: var(--graphite);
  background: #f2f5f8;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 900;
}

.auth-user-pill span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-admin-panel {
  margin: 14px 0;
}

.auth-user-form {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
  padding: 16px;
  border-top: 1px solid var(--line);
}

.auth-user-form > label:not(.auth-checkbox) {
  grid-column: span 4;
  min-width: 0;
}

.auth-copy-access {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.auth-copy-access > div {
  min-width: min(100%, 360px);
}

.auth-copy-access span {
  display: block;
  color: var(--ink);
  font-weight: 950;
}

.auth-copy-access small {
  color: var(--muted);
  font-weight: 800;
}

.auth-copy-access .ghost-button {
  min-width: 166px;
  justify-content: center;
}

.auth-copy-status {
  flex-basis: 100%;
}

.auth-copy-dialog {
  width: min(560px, 100%);
}

.auth-copy-dialog-body {
  display: grid;
  gap: 14px;
  padding: 16px 18px;
}

.auth-copy-dialog-note {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.auth-copy-dialog-note strong {
  color: var(--ink);
}

.auth-copy-dialog-note small {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.35;
}

.auth-module-grid {
  grid-column: span 8;
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 10px 16px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.auth-module-grid legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.auth-module-grid label {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  color: var(--ink);
}

.auth-module-grid input {
  width: 18px;
  min-height: 18px;
}

.auth-warehouse-field {
  grid-column: span 4 !important;
}

.auth-scope-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.auth-scope-grid legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.auth-scope-help {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.35;
}

.auth-scope-grid > label {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
}

.auth-scope-grid select[multiple] {
  min-height: 1px;
  padding: 0;
}

.auth-scope-native {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.auth-scope-picker {
  display: grid;
  gap: 8px;
  min-height: 0;
  min-width: 0;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.auth-scope-picker-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.auth-scope-picker-head [data-auth-scope-count] {
  min-width: 0;
  line-height: 1.25;
}

.auth-scope-picker-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.auth-scope-picker-actions button {
  min-height: 28px;
  padding: 0 10px;
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.05;
  white-space: nowrap;
  background: var(--marca-suave);
  border: 1px solid rgba(180, 12, 30, 0.22);
  border-radius: 999px;
  cursor: pointer;
}

.auth-scope-picker-actions button:hover {
  background: var(--marca-suave-2);
  border-color: rgba(180, 12, 30, 0.36);
}

.auth-scope-option-list {
  display: grid;
  gap: 6px;
  max-height: 164px;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 2px;
}

.auth-scope-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  min-height: 34px;
  padding: 7px 8px;
  color: var(--ink);
  font-weight: 850;
  line-height: 1.2;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
}

.auth-scope-option:hover,
.auth-scope-option.is-selected {
  background: var(--marca-suave);
  border-color: rgba(180, 12, 30, 0.32);
}

.auth-scope-option input {
  margin-top: 2px;
  width: 16px;
  min-height: 16px;
  flex: 0 0 auto;
}

.auth-scope-option span {
  min-width: 0;
  max-width: 100%;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

.auth-scope-empty {
  margin: 0;
  padding: 12px 8px;
  color: var(--muted);
  font-weight: 850;
  text-align: center;
  background: #f8fafc;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.auth-scope-picker.is-disabled {
  opacity: 0.62;
}

.auth-scope-grid option {
  padding: 5px 7px;
  border-radius: 6px;
}

.auth-scope-grid small {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.3;
}

@media (max-width: 1100px) {
  .auth-user-form > label:not(.auth-checkbox),
  .auth-module-grid,
  .auth-warehouse-field {
    grid-column: 1 / -1 !important;
  }

  .auth-scope-grid {
    grid-template-columns: repeat(2, minmax(250px, 1fr));
  }
}

@media (max-width: 680px) {
  .auth-user-form {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .auth-module-grid {
    grid-template-columns: 1fr;
  }

  .auth-scope-grid {
    grid-template-columns: 1fr;
  }

  .auth-scope-picker {
    min-height: 0;
  }

  .auth-scope-option-list {
    max-height: 210px;
  }

  .auth-scope-picker-head {
    align-items: flex-start;
    grid-template-columns: 1fr;
  }

  .auth-scope-picker-actions {
    justify-content: flex-start;
  }
}

.auth-user-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  justify-content: center;
}

.auth-default-password {
  grid-column: 1 / -1;
}

.auth-users-list {
  display: grid;
  gap: 10px;
  padding: 0 16px 16px;
}

.auth-user-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(170px, 0.8fr) minmax(260px, 1.2fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.auth-user-row strong,
.auth-user-row span,
.auth-user-row small {
  display: block;
}

.auth-user-row small {
  color: var(--muted);
  font-weight: 800;
}

.auth-user-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.app-shell {
  min-height: 100vh;
}

#checklist:target {
  display: grid !important;
}

#dds:target {
  display: block !important;
}

#tms:target {
  display: grid !important;
}

body:has(#checklist:target) #top,
body:has(#dds:target) #top,
body:has(#tms:target) #top {
  display: none !important;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(250px, max-content) minmax(0, 1fr);
  gap: 14px 18px;
  align-items: center;
  min-height: 82px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 24px rgba(20, 24, 28, 0.06);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  width: clamp(132px, 12vw, 190px);
  min-width: 132px;
}

.brand img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 58px;
  object-fit: contain;
}

.title-block {
  min-width: 250px;
  max-width: 380px;
}

.title-block h1 {
  overflow-wrap: normal;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--marca-escura);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
  color: var(--graphite);
}

h1 {
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  line-height: 1.1;
}

h2 {
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  line-height: 1.15;
}

h3 {
  font-size: 1rem;
  line-height: 1.25;
}

.top-actions,
.toolbar,
.segmented {
  display: flex;
  align-items: center;
}

.top-actions {
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  justify-self: end;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.offline-sync-box {
  position: relative;
  flex: 0 1 auto;
  min-width: 0;
}

.offline-sync-box > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  color: var(--muted);
  background: #eef2f6;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 900;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.offline-sync-box > summary span {
  min-width: max-content;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

.offline-sync-box > summary::-webkit-details-marker {
  display: none;
}

.offline-sync-box > summary svg {
  width: 17px;
  height: 17px;
}

.offline-sync-box > summary strong {
  min-width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  color: var(--muted);
  background: #ffffff;
  border-radius: 999px;
  font-size: 0.78rem;
}

.offline-sync-box.has-pending > summary {
  color: var(--amber);
  background: var(--amber-soft);
  border-color: rgba(165, 101, 0, 0.24);
}

.offline-sync-box.has-pending > summary strong {
  color: #ffffff;
  background: var(--amber);
}

.offline-sync-box.has-error > summary {
  color: var(--red);
  background: #fff5f6;
  border-color: rgba(162, 15, 27, 0.22);
}

.offline-sync-box.has-error > summary strong {
  background: var(--red);
}

.offline-sync-box.is-syncing > summary svg {
  animation: sync-spin 0.9s linear infinite;
}

.offline-sync-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 50;
  width: min(420px, calc(100vw - 24px));
  max-height: min(70vh, 560px);
  overflow: auto;
  padding: 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.offline-sync-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.offline-sync-back {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.78rem;
}

.offline-sync-head > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.offline-sync-head strong {
  color: var(--graphite);
  font-size: 0.92rem;
}

.offline-sync-head small,
.offline-sync-empty,
.offline-sync-more {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.offline-sync-list {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.offline-sync-item {
  display: grid;
  gap: 3px;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid #e4eaf0;
  border-left: 4px solid var(--amber);
  border-radius: 9px;
}

.offline-sync-item.has-error {
  background: #fff8f8;
  border-left-color: var(--red);
}

.offline-sync-item span {
  color: var(--red);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.offline-sync-item strong {
  color: var(--ink);
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.offline-sync-item small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.offline-sync-panel .primary-button {
  width: 100%;
  min-height: 42px;
}

@keyframes sync-spin {
  to {
    transform: rotate(360deg);
  }
}

.icon-button,
.primary-button,
.ghost-button,
.mode-button,
.file-button,
.segment,
.checklist-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-weight: 800;
  letter-spacing: 0;
}

.mode-switch {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  background: #edf1f5;
  border-radius: var(--radius);
  min-width: 0;
  max-width: 100%;
}

.mode-button {
  min-height: 34px;
  padding: 0 10px;
  color: var(--muted);
  background: transparent;
  min-width: 0;
}

.mode-button span {
  white-space: nowrap;
}

.mode-button.active {
  color: #ffffff;
  background: var(--marca);
}

.icon-button {
  padding: 0 14px;
  color: #ffffff;
  background: var(--graphite);
}

.icon-button:hover {
  background: #111315;
}

.app-update-button {
  min-width: 148px;
  color: var(--graphite);
  background: var(--marca-suave);
  border-color: rgba(240, 132, 48, 0.24);
  white-space: nowrap;
  flex-shrink: 0;
}

.app-update-button span {
  white-space: nowrap;
}

.app-update-button:hover {
  color: #ffffff;
  background: var(--marca);
}

.app-update-button.is-loading,
.app-update-button.is-loading:hover,
.app-update-button.is-loading:disabled {
  color: #ffffff;
  background: var(--marca);
  border-color: var(--marca);
  opacity: 1;
}

.app-update-button.is-loading svg {
  animation: elcop-spin 0.85s linear infinite;
}

@keyframes elcop-spin {
  to {
    transform: rotate(360deg);
  }
}

.primary-button {
  padding: 0 14px;
  color: #ffffff;
  background: var(--marca);
  text-decoration: none;
}

.primary-button:hover {
  color: #ffffff;
  background: var(--marca-escura);
}

.ghost-button {
  padding: 0 14px;
  color: var(--marca-escura);
  background: #ffffff;
  border-color: var(--marca-borda);
}

.ghost-button:hover {
  background: var(--marca-suave);
}

.icon-button svg,
.primary-button svg,
.ghost-button svg,
.mode-button svg,
.file-button svg,
.search-box svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.workspace {
  display: grid;
  grid-template-columns: var(--module-sidebar-width) minmax(0, 1fr);
  gap: var(--module-gap);
  width: min(var(--module-shell-max), calc(100% - (var(--module-shell-gutter) * 2)));
  margin: 0 auto 0 var(--module-shell-gutter);
  padding: 24px var(--module-shell-pad) 48px;
}

.app-view[hidden] {
  display: none !important;
}

/* Sem `fill-mode: both`: com ele o transform do ultimo quadro fica aplicado
   para sempre, e transform num ancestral quebra `position: sticky` dentro da
   view (foi o que impedia a coluna Equipe do Planejamento de ficar fixa).
   O estado final da animacao ja e o estado natural do elemento. */
.app-view:not([hidden]) {
  animation: app-view-enter 120ms ease-out;
}

/* O ultimo quadro precisa terminar em `transform: none` (e nao translateY(0)):
   com `animation-fill-mode: both` o transform ficaria aplicado para sempre, e
   transform num ancestral quebra `position: sticky` dentro da view. */
@keyframes app-view-enter {
  from {
    opacity: 0.94;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.home-view,
.dds-view,
.tms-view,
.warehouse-view,
.works-view,
.electric-warehouse-view,
.works-planning-view,
.users-admin-view {
  width: min(var(--module-shell-max), calc(100% - (var(--module-shell-gutter) * 2)));
  margin: 0 auto 0 var(--module-shell-gutter);
  padding: 12px var(--module-shell-pad) 44px;
}

.users-admin-view {
  display: grid;
  gap: 12px;
}

.users-admin-view > * {
  width: min(100%, 1780px);
  margin-inline: 0 auto;
}

.users-admin-mount {
  display: grid;
  gap: 12px;
}

.users-admin-mount .auth-admin-panel {
  margin: 0;
}

.view-back-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
}

.workspace > .view-back-bar {
  grid-column: 1 / -1;
  margin-bottom: -8px;
}

.view-home-button {
  min-height: 38px;
  padding-inline: 12px;
  color: var(--graphite);
  background: #ffffff;
  border-color: #d7dee7;
}

.view-home-button svg {
  width: 16px;
  height: 16px;
}

.home-view {
  display: grid;
  gap: 16px;
}

.home-panel,
.app-update-notice,
.home-module-card,
.electric-warehouse-panel,
.electric-warehouse-card,
.dds-header,
.dds-metric-card,
.dds-calendar-panel,
.dds-topic-panel,
.dds-attendance-panel,
.dds-schedule-panel,
.dds-evidence-card,
.tms-header,
.tms-kpi-card,
.tms-base-panel,
.tms-calendar-panel,
.tms-day-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.app-update-notice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-top: 3px solid var(--marca);
  background: var(--marca-suave);
}

.app-update-notice[hidden] {
  display: none !important;
}

.app-update-notice p:not(.eyebrow) {
  margin: 4px 0 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.45;
}

.app-update-notice .module-icon {
  color: var(--marca-escura);
  background: #ffffff;
}

body.app-update-locked .home-view {
  align-content: start;
}

body.app-update-locked .app-update-notice {
  width: min(100%, 840px);
  justify-self: center;
}

body.app-update-locked .home-vision-panel,
body.app-update-locked .home-module-grid,
body.app-update-locked .home-module-card {
  display: none !important;
}

.home-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
  gap: 18px;
  align-items: stretch;
  padding: 18px;
  border-top: 3px solid var(--marca);
}

.home-copy p:not(.eyebrow) {
  max-width: 780px;
  margin: 10px 0 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.5;
}

.home-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.home-status-card {
  display: grid;
  gap: 8px;
  min-height: 112px;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid #dfe5ec;
  border-radius: var(--radius);
}

.home-status-card span,
.dds-metric-card span,
.tms-kpi-card span,
.dds-panel-head small,
.dds-topic-card h4,
.dds-evidence-grid label span,
.dds-header-actions label span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.home-status-card strong,
.dds-metric-card strong {
  color: var(--ink);
  font-size: 1.9rem;
  line-height: 1;
}

.home-module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.home-vision-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--marca);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.home-vision-panel h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1.15;
}

.home-vision-panel p:not(.eyebrow) {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.35;
}

.home-vision-control {
  display: grid;
  gap: 6px;
  min-width: min(320px, 100%);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.home-vision-control select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
  text-transform: none;
  padding: 0 14px;
}

.home-module-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px;
  min-height: 180px;
  border-top: 3px solid #b9c3ce;
}

.home-module-card p:not(.eyebrow) {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.45;
}

.home-module-card .eyebrow {
  hyphens: none;
  overflow-wrap: normal;
  word-break: normal;
}

.home-module-card .primary-button {
  align-self: center;
  white-space: nowrap;
}

.module-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  color: var(--marca-escura);
  background: var(--marca-suave);
  border: 1px solid var(--marca-borda);
  border-radius: var(--radius);
}

.module-icon svg {
  width: 30px;
  height: 30px;
}

.checklist-module {
  border-top-color: var(--marca);
}

.dds-module {
  border-top-color: var(--green);
}

.dds-module .module-icon {
  color: var(--green);
  background: var(--green-soft);
  border-color: #c9e8db;
}

.tms-module {
  border-top-color: var(--blue);
}

.tms-module .module-icon {
  color: var(--blue);
  background: #e8f4fb;
  border-color: #c5e1f2;
}

.warehouse-module {
  border-top-color: var(--amber);
}

.warehouse-module .module-icon {
  color: var(--amber);
  background: var(--amber-soft);
  border-color: #f5d79d;
}

.electric-warehouse-module {
  border-top-color: #0f766e;
}

.electric-warehouse-module .module-icon {
  color: #0f766e;
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.works-module {
  border-top-color: #0f766e;
}

.works-module .module-icon {
  color: #0f766e;
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.works-view {
  width: min(var(--module-shell-max), calc(100% - (var(--module-shell-gutter) * 2)));
}

.works-shell {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid #0f766e;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.works-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

.works-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.5rem, 2vw, 2rem);
  letter-spacing: 0;
}

.works-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.45;
}

.works-head strong {
  align-self: center;
  padding: 8px 12px;
  color: #4b5563;
  white-space: nowrap;
  background: #eef2f7;
  border-radius: 999px;
}

.works-module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
}

@media (max-width: 1180px) {
  .works-module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.works-module-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 150px;
  padding: 20px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-top: 4px solid #0f766e;
  border-radius: var(--radius);
}

.works-module-card.electric {
  border-top-color: var(--amber);
}

.works-module-card.electric .module-icon {
  color: var(--amber);
  background: var(--amber-soft);
  border-color: #f5d79d;
}

.works-module-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.35rem;
}

.works-module-card p:not(.eyebrow) {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.45;
}

.works-count-mobile {
  display: none;
}

.warehouse-view,
.works-view,
.electric-warehouse-view,
.works-planning-view {
  display: grid;
  gap: 14px;
}

.electric-warehouse-workspace {
  display: grid;
  grid-template-columns: var(--module-sidebar-width) minmax(0, 1fr);
  gap: var(--module-gap);
  width: 100%;
  margin: 0;
}

.electric-warehouse-view:is(
  .electric-tool-inventory,
  .electric-tool-analytics,
  .electric-tool-dashboard,
  .electric-tool-justification,
  .electric-tool-movements
) {
  width: calc(100% - 8px);
  margin-left: 4px;
  padding-inline: 6px;
}

.electric-warehouse-view:is(
  .electric-tool-inventory,
  .electric-tool-analytics,
  .electric-tool-dashboard,
  .electric-tool-justification,
  .electric-tool-movements
) .electric-warehouse-workspace {
  --module-sidebar-width: clamp(190px, 10vw, 220px);
  --module-gap: 8px;
}

.electric-warehouse-view:is(
  .electric-tool-inventory,
  .electric-tool-analytics,
  .electric-tool-dashboard,
  .electric-tool-justification,
  .electric-tool-movements
) .electric-warehouse-head {
  padding: 14px 16px;
}

.electric-warehouse-view:is(
  .electric-tool-inventory,
  .electric-tool-analytics,
  .electric-tool-dashboard,
  .electric-tool-justification,
  .electric-tool-movements
) .inventory-shell {
  padding: 10px 12px 12px;
}

.electric-warehouse-view:is(.electric-tool-dashboard, .electric-tool-justification, .electric-tool-movements) .inventory-dashboard-panel,
.electric-warehouse-view.electric-tool-analytics .inventory-history-panel,
.electric-warehouse-view.electric-tool-inventory .inventory-form-card,
.electric-warehouse-view.electric-tool-inventory .inventory-items-card {
  gap: 10px;
  padding: 12px;
}

.electric-warehouse-view:is(
  .electric-tool-inventory,
  .electric-tool-analytics,
  .electric-tool-dashboard,
  .electric-tool-justification,
  .electric-tool-movements
) .electric-warehouse-panel {
  overflow: visible;
}

.electric-warehouse-sidebar {
  top: 112px;
}

.electric-warehouse-toolbox {
  display: grid;
  gap: 10px;
}

.electric-warehouse-tools .checklist-tab {
  min-height: 58px;
}

.electric-warehouse-panel {
  border-top: 3px solid #0f766e;
  overflow: hidden;
}

/* ==========================================================================
   MODULO: Programacao de Obras — mesma anatomia do Controle de materiais
   eletricos (workspace = barra lateral + painel). Acento proprio: indigo.
   ========================================================================== */
.works-planning-workspace {
  display: grid;
  grid-template-columns: var(--module-sidebar-width) minmax(0, 1fr);
  gap: var(--module-gap);
  width: 100%;
  margin: 0;
}

.works-planning-view:is(.planning-tool-planning) {
  width: calc(100% - 8px);
  margin-left: 4px;
  padding-inline: 6px;
}

.works-planning-view:is(.planning-tool-planning) .works-planning-workspace {
  --module-sidebar-width: clamp(190px, 10vw, 220px);
  --module-gap: 8px;
}

.works-planning-view:is(.planning-tool-planning) .inventory-shell {
  padding: 10px 12px 12px;
}

.works-planning-view:is(.planning-tool-planning) .inventory-dashboard-panel {
  gap: 10px;
  padding: 12px;
}

.works-planning-view:is(.planning-tool-planning) .works-planning-panel {
  overflow: visible;
}

.works-planning-sidebar {
  top: 112px;
}

.works-planning-toolbox {
  display: grid;
  gap: 10px;
}

.works-planning-tools .checklist-tab {
  min-height: 58px;
}

.works-planning-panel {
  border-top: 3px solid #4338ca;
  overflow: hidden;
}

/* Barra de filtros do Planejamento: mesma grade do modulo de materiais,
   com uma coluna a menos (Estado, Pesquisar, De, Ate, botoes). */
.planning-filter-bar {
  grid-template-columns: minmax(170px, 0.9fr) minmax(220px, 1.4fr) minmax(130px, 0.7fr) minmax(130px, 0.7fr) auto auto;
}

.planning-setup-card b {
  color: #171a1d;
}

/* --------------------------------------------------------------------------
   Grade do Planejamento de Obras (modelo: planilha "PLANEJAMENTO BASE ...").
   Coluna Equipe fixa; uma coluna por dia com DATA em cima e DIA DA SEMANA
   por extenso embaixo. Rolagem horizontal fica SO dentro da grade.
   -------------------------------------------------------------------------- */
.planning-grid-block {
  margin: 0 0 4px;
}

/* REGRA: a grade rola DENTRO do proprio quadro (limitado a altura da tela).
   Assim o cabecalho com as datas fica sempre visivel (sticky no topo do
   quadro) e a barra de rolagem horizontal fica sempre a vista no rodape do
   quadro — sem precisar ir ao fim da pagina. */
/* Especificidade acima do .stock-detail-block .table-wrap (que trava o eixo Y
   e vem depois no arquivo — por isso as 3 classes aqui). */
.stock-detail-block.planning-grid-block .planning-grid-scroll {
  max-height: max(360px, calc(100vh - 285px));
  overflow: auto;
  overscroll-behavior: contain;
}

/* border-collapse PRECISA ser separate: com collapse o navegador ignora o
   position:sticky das celulas e a coluna Equipe deixa de ficar fixa. */
.planning-grid-scroll .planning-grid {
  border-collapse: separate;
  border-spacing: 0;
  width: auto;
  min-width: 100%;
}

/* Bordas definidas em todas as celulas: leitura sem confusao visual. */
.planning-grid th,
.planning-grid td {
  border-bottom: 1px solid #d7dee8;
  border-right: 1px solid #e2e8f0;
  white-space: nowrap;
}

/* Cabecalho vermelho de duas linhas, como na planilha. REGRA: fonte SEMPRE
   branca, em todas as celulas do cabecalho (data, dia da semana e Equipe). */
.planning-grid thead th,
.planning-grid thead th * {
  color: #ffffff !important;
}

.planning-grid thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  height: 36px;
  padding: 4px 12px;
  background: #8c1d18;
  font-size: 0.8rem;
  font-weight: 800;
  text-align: center;
  vertical-align: middle;
  border-bottom: 1px solid #6f1713;
  border-right: 1px solid #a1443f;
  box-sizing: border-box;
}

.planning-grid thead tr:nth-child(2) th {
  top: 36px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 0.72rem;
}

.planning-day-date {
  display: block;
  font-variant-numeric: tabular-nums;
}

.planning-day-name {
  display: block;
}

.planning-grid thead th.weekend {
  background: #6f1713;
}

/* Coluna Equipe fixa na horizontal */
/* REGRA: a coluna Equipe tem largura FIXA (210px) — nunca engorda. Em periodo
   curto quem cresce sao as colunas de dia (min 178px, sem maximo). */
.planning-grid .planning-team-col {
  position: sticky;
  left: 0;
  z-index: 1;
  width: 210px;
  min-width: 210px;
  max-width: 210px;
  box-sizing: border-box;
  padding: 12px 14px;
  background: #f1f5f9;
  color: #171a1d;
  font-size: 0.84rem;
  font-weight: 800;
  text-align: left;
  border-right: 1px solid #c9d3df;
  overflow: hidden;
  text-overflow: ellipsis;
}

.planning-grid thead th.planning-team-head {
  z-index: 5;
  background: #8c1d18;
  text-align: center;
}

.planning-grid tbody .planning-team-col {
  border-right: 1px solid #c9d3df;
}

/* Faixa da base: a celula ocupa a largura toda, mas o TEXTO fica fixo a
   esquerda para continuar legivel com a grade rolada para o lado. */
/* especificidade acima do padding padrao de .dashboard-table th */
.planning-grid-scroll .planning-base-cell {
  padding: 0;
}

.planning-grid .planning-base-cell {
  background: #8c1d18;
  color: #ffffff;
  text-align: left;
  padding: 0;
}

.planning-grid .planning-base-label {
  position: sticky;
  left: 0;
  display: inline-block;
  padding: 10px 14px;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.planning-grid .planning-base-label small {
  margin-left: 8px;
  font-weight: 700;
  opacity: 0.78;
  letter-spacing: normal;
}

.planning-grid .planning-team-row:nth-child(even) .planning-team-col {
  background: #e8edf3;
}

.planning-grid .planning-team-row:hover .planning-team-col,
.planning-grid .planning-team-row:hover .planning-cell {
  background: var(--marca-suave);
}

/* Largura minima padronizada; em periodo curto as colunas de dia dividem o
   espaco extra por igual (a coluna Equipe e fixa). Conteudo centralizado na
   vertical quando a linha cresce (regra da tela). */
.planning-grid .planning-cell {
  min-width: 200px;
  height: 46px;
  padding: 8px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  text-align: left;
  vertical-align: middle;
  background: #ffffff;
  cursor: pointer;
  white-space: normal;
}

.planning-grid td,
.planning-grid tbody th {
  vertical-align: middle;
}

/* Icone + na celula vazia (sem elemento no DOM: sao ~2.000 celulas). */
.planning-grid .planning-cell.planning-empty {
  position: relative;
}

/* v0362 (desempenho, teste de estresse): o "+" da celula vazia so EXISTE no hover. Antes ele era
   criado em TODAS as celulas vazias (2.100+ caixas a mais na grade, invisiveis com opacity 0) e
   custava metade do tempo de montar a grade: 196 ms → 100 ms no laboratorio. O visual e o mesmo
   (o "+" aparece ao passar o mouse); so some o esmaecer de 0,12 s. */
.planning-grid .planning-cell.planning-empty:hover::after {
  content: "+";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #b7c4d4;
  font-size: 1.05rem;
  font-weight: 800;
  opacity: 1;
}

.planning-grid .planning-cell.planning-empty:hover {
  background: #f2f6fb;
}

/* v0441: equipe transferida — dia fora da base (antes de chegar ou depois de sair): cinza listrado, não abre */
.planning-grid tbody tr td.planning-cell.planning-fora,
.planning-grid tbody tr td.planning-cell.planning-fora.weekend {
  background: repeating-linear-gradient(135deg, #eef1f5 0 6px, #dfe5ed 6px 12px) !important;
  cursor: not-allowed;
}

/* Celula programada: sombreamento verde claro; bordas por marcacao.
   Desligamento Programado = borda roxo claro; Apoio LV = borda azul;
   os dois juntos = borda roxa + segunda borda azul (box-shadow interno). */
.planning-grid .planning-cell.filled {
  background: #e5f5eb;
  cursor: pointer;
}

.planning-grid .planning-cell.filled:hover {
  background: #d9efe2;
}

/* Marcacoes: selos discretos em preto no canto superior direito da celula.
   Desl. (luz apagada) = Desligamento Programado | LV (raio) = Apoio LV.
   Sem bordas coloridas: celula programada e so o fundo verde claro. */
.planning-grid .planning-cell.filled {
  position: relative;
}

/* Selos um abaixo do outro, colados no canto superior direito. A celula
   reserva espaco a direita para o texto nunca passar por baixo deles. */
.planning-cell-flags {
  position: absolute;
  top: 3px;
  right: 3px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  pointer-events: none;
}

.planning-grid .planning-cell.filled:has(.planning-cell-flags) {
  padding-right: 56px;
}

/* Chip com fundo: o selo nunca corta nem some sobre o verde da celula. */
.planning-flag {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #111827;
  line-height: 1;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #dbe3ec;
  border-radius: 6px;
  padding: 2px 5px;
  white-space: nowrap;
}

.planning-flag svg {
  width: 10px;
  height: 10px;
  stroke-width: 2.4;
}

/* Fontes discretas e profissionais: obra em grafite, detalhes em cinza-ardosia. */
.planning-cell-obra {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  color: #1f2937;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Padroniza a altura dos blocos preenchidos: descricao do servico em ate 2
   linhas com reticencias (o popup mostra completo). */
.planning-grid .planning-cell.filled .planning-cell-line:not(.money):not(.pending) {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.planning-cell-line {
  display: block;
  font-size: 0.69rem;
  font-weight: 600;
  color: #475569;
  line-height: 1.35;
  white-space: normal;
}

.planning-cell-line.muted {
  color: #64748b;
}

.planning-cell-line.money {
  color: #0b5fa5;
  font-weight: 800;
}

.planning-cell-line.pending {
  color: #b45309;
}

.planning-grid .planning-team-row:nth-child(even) .planning-cell {
  background: #fbfcfe;
}

.planning-grid .planning-team-row:nth-child(even) .planning-cell.filled {
  background: #e5f5eb;
}

.planning-grid .planning-cell.weekend {
  background: #f4f6fa;
}

.planning-grid .planning-team-row:nth-child(even) .planning-cell.weekend {
  background: #eef1f6;
}

.planning-grid-scroll .planning-grid tfoot th,
.planning-grid-scroll .planning-grid tfoot td,
.planning-grid tfoot .planning-total-cell {
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: #8c1d18;
  color: #ffffff;
  font-weight: 900;
  border-top: 2px solid #6f1713;
  border-bottom: none;
}

.planning-grid tfoot .planning-team-col {
  z-index: 4;
  text-align: center;
}

.planning-limit-note,
.planning-empty-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 8px 14px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.planning-limit-note svg,
.planning-empty-note svg {
  width: 14px;
  height: 14px;
  flex: none;
}

.planning-empty-note {
  border-top: 1px solid var(--line);
  background: #f8fafc;
}

/* --------------------------------------------------------------------------
   Popup de programacao da celula (equipe x dia)
   -------------------------------------------------------------------------- */
.planning-dialog {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(560px, 100%);
  max-height: calc(100vh - 40px);
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #d8dee7;
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.3);
}

.planning-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: #8c1d18;
  color: #ffffff;
}

.planning-dialog-head small {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.85;
}

.planning-dialog-head strong {
  font-size: 0.95rem;
}

/* Fechar (x): sempre visivel sobre o cabecalho vermelho. */
.planning-dialog-x {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 8px;
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  flex: none;
}

.planning-dialog-x:hover {
  background: rgba(255, 255, 255, 0.26);
}

/* REGRA: rolar com o mouse dentro do popup nao mexe a pagina principal
   (overscroll contido + body travado via .planning-modal-open). */
.planning-dialog-body {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

body.planning-modal-open {
  overflow: hidden;
}

.planning-dialog-backdrop {
  overscroll-behavior: contain;
}

.planning-dialog-field {
  display: grid;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.planning-dialog-field input {
  border: 1px solid #d5dee9;
  border-radius: 8px;
  padding: 10px 11px;
  font: inherit;
  font-size: 0.9rem;
  text-transform: none;
  letter-spacing: normal;
  color: #171a1d;
}

.planning-dialog-field input:focus {
  outline: none;
  border-color: var(--marca);
  box-shadow: none;
}

/* Lista suspensa (obra e servico): so aparece enquanto se digita. */
.planning-obra-field {
  position: relative;
}

.planning-obra-dropdown {
  position: absolute;
  z-index: 6;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  display: grid;
  gap: 4px;
  max-height: 230px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px;
  border: 1px solid #dbe3ec;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
}

.planning-obra-dropdown[hidden] {
  display: none;
}

.planning-obra-option {
  display: grid;
  gap: 1px;
  padding: 8px 10px;
  text-align: left;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font: inherit;
  cursor: pointer;
}

.planning-obra-option:hover {
  border-color: #b7c4d4;
  background: #fbfcfe;
}

.planning-obra-option b {
  font-size: 0.82rem;
  color: #171a1d;
}

.planning-obra-option small {
  font-size: 0.72rem;
  color: #3f6212;
  font-weight: 700;
}

.planning-obra-option small.muted {
  color: var(--muted);
  font-weight: 600;
}

/* v0104 — busca da obra: numero em cima, resto discreto embaixo */
.planning-obra-linha1 { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.planning-obra-num { font-size: 0.92rem; font-weight: 800; color: #171a1d; letter-spacing: .2px; }
.planning-obra-valor { font-size: 0.8rem; font-weight: 800; color: #1c6b45; white-space: nowrap; }
.planning-obra-option small.planning-obra-desc {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 0.73rem; font-weight: 400; color: #39424e; line-height: 1.4; margin-top: 2px;
}
.planning-obra-option small.planning-obra-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px;
  font-size: 0.68rem; font-weight: 400; color: #8a93a0;
}
.planning-obra-option small.planning-obra-meta b { font-size: 0.68rem; font-weight: 700; color: #5a6472; }
.planning-obra-pill { border: 1px solid #e2e6ea; background: #f7f8fa; border-radius: 999px; padding: 1px 8px; font-size: 0.66rem; font-weight: 700; color: #5a6472; }
.planning-obra-pill.prazo { border-color: #cfdcf5; background: #eef2fb; color: #274a9c; }

.planning-obra-note {
  margin: 0;
  padding: 8px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--muted);
}

.planning-obra-note.warn {
  color: #b45309;
}

.planning-obra-selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: #e5f5eb;
  border: 1px solid #b7e0c6;
  border-radius: 10px;
}

.planning-obra-selected > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.planning-obra-selected b {
  font-size: 0.86rem;
  color: #14532d;
}

.planning-obra-selected small {
  font-size: 0.76rem;
  color: #3f6212;
  font-weight: 700;
}

.planning-obra-selected small.muted {
  color: #5b7185;
}

.planning-obra-selected .ghost-button {
  flex: none;
}

.planning-dialog-check {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
}

.planning-dialog-check:hover {
  background: #f8fafc;
}

.planning-dialog-check input {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  accent-color: #b3261e;
  cursor: pointer;
}

.planning-dialog-check b {
  display: block;
  font-size: 0.84rem;
  color: #171a1d;
}

.planning-dialog-check small {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
}

.planning-dialog-pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  padding-left: 28px;
}

.planning-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: #f8fafc;
}

.planning-dialog-actions-right {
  display: inline-flex;
  gap: 8px;
  margin-left: auto;
}

.planning-dialog-remove {
  color: #b3261e;
  border-color: var(--marca-borda);
}

.planning-dialog-check.locked {
  opacity: 0.75;
  cursor: default;
}

/* Bloco Valor de Medicao Planejado */
.planning-medicao-block {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.planning-medicao-title {
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.planning-medicao-title b {
  color: #0b5fa5;
  text-transform: none;
  letter-spacing: normal;
}

.planning-medicao-modes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
}

.planning-medicao-mode {
  padding: 9px 10px;
  background: #ffffff;
  border: 1px solid #d5dee9;
  border-radius: 8px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  color: #52514e;
  cursor: pointer;
}

.planning-medicao-mode:hover {
  border-color: #b7c4d4;
}

.planning-medicao-mode.active {
  border-color: var(--marca);
  background: var(--marca-suave);
  color: #8c1d18;
}

.planning-medicao-open {
  justify-content: center;
}

/* Popup maior da Medicao Real Programada (estilo planilha PONTO) */
.planning-medicao-dialog {
  width: min(1420px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
}

/* Medicao com orcamento da obra (C-3-2-1): popup no limite da janela. */
.planning-medicao-dialog.planning-medicao-obra-mode {
  width: min(1780px, calc(100vw - 20px));
  max-height: calc(100vh - 14px);
}

.planning-obra-services-wrap {
  max-height: 46vh;
  overflow: auto;
  border: 1px solid #d9dee5;
  border-radius: 8px;
  margin-bottom: 12px;
}

.planning-obra-services-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.planning-obra-services-table {
  min-width: 0;
}

.planning-th-sub {
  display: block;
  font-weight: 700;
  font-size: 0.6rem;
  opacity: 0.8;
  text-transform: none;
}

.planning-col-frac {
  width: 130px;
}

.planning-obra-frac-cell {
  min-width: 120px;
}

.planning-obra-frac {
  font-weight: 900;
  font-size: 0.86rem;
  color: #171a1d;
}

.planning-obra-frac small {
  color: #68707a;
  font-weight: 800;
}

.planning-obra-bar {
  display: block;
  height: 6px;
  border-radius: 4px;
  background: #e5e9ef;
  overflow: hidden;
  width: 110px;
  margin: 3px auto 2px;
}

.planning-obra-bar.wide {
  width: 100%;
  margin: 6px 0 0;
}

.planning-obra-bar i {
  display: block;
  height: 100%;
  background: var(--green);
  border-radius: 4px;
}

.planning-obra-bar i.warn {
  background: var(--amber);
}

.planning-obra-bar i.over {
  background: var(--red);
}

.planning-obra-pct {
  font-size: 0.62rem;
  font-weight: 800;
  color: #68707a;
}

.planning-obra-pct.over {
  color: var(--red);
  font-weight: 900;
}

.planning-obra-qty-cell {
  min-width: 210px;
  text-align: center;
  vertical-align: middle;
}

.planning-obra-qty-cell .planning-medicao-input {
  display: block;
  margin: 0 auto;
}

.planning-obra-ref {
  display: block;
  margin: 4px auto 0;
  font-size: 0.64rem;
  font-weight: 800;
  color: var(--blue);
  white-space: nowrap;
  text-align: center;
}

.planning-obra-ref.ok {
  color: var(--green);
}

.planning-obra-ref.warn {
  color: var(--amber);
}

.planning-obra-ref.over {
  color: var(--red);
}

.planning-nao-orcado-badge {
  display: inline-block;
  background: #eef2f7;
  border: 1px solid #cbd5e1;
  color: #475569;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 0.6rem;
  font-weight: 900;
  text-transform: uppercase;
  margin-left: 6px;
  vertical-align: middle;
}

.planning-avulso-commit {
  margin-left: auto;
}

/* Feedback do Planejamento: botao no popup, janela de status e selos na grade. */
.planning-feedback-open {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #bcd7e8;
  background: #f3f8fc;
  color: var(--blue);
  border-radius: 9px;
  padding: 9px 14px;
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
  width: fit-content;
}

.planning-feedback-open i,
.planning-feedback-open svg {
  width: 16px;
  height: 16px;
}

.planning-feedback-badge {
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.64rem;
  font-weight: 900;
  text-transform: uppercase;
}

.planning-feedback-badge.st-pendente { background: var(--amber-soft); color: var(--amber); border: 1px solid #f0dcb2; }
.planning-feedback-badge.st-executado { background: var(--green-soft); color: var(--green); border: 1px solid #b7ead8; }
.planning-feedback-badge.st-cancelado { background: #eef2f7; color: #68707a; border: 1px solid #cbd5e1; }
.planning-feedback-badge.st-substituido { background: #f3f8fc; color: var(--blue); border: 1px solid #bcd7e8; }

.planning-feedback-dialog {
  width: min(680px, calc(100vw - 24px));
}

.planning-feedback-body {
  display: grid;
  gap: 10px;
}

.planning-feedback-option {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 2px solid #d9dee5;
  border-radius: 10px;
  padding: 12px;
  background: #ffffff;
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.planning-feedback-option .planning-feedback-ic {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: #eef2f7;
  color: #475569;
}

.planning-feedback-option.st-executado .planning-feedback-ic { background: var(--green-soft); color: var(--green); }
.planning-feedback-option.st-cancelado .planning-feedback-ic { background: var(--amber-soft); color: var(--amber); }
.planning-feedback-option.st-substituido .planning-feedback-ic { background: #f3f8fc; color: var(--blue); }

.planning-feedback-option b {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 3px;
  color: var(--ink);
}

.planning-feedback-option small {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.planning-feedback-option.selected {
  border-color: var(--marca);
  box-shadow: 0 0 0 3px var(--marca-borda);
}

.planning-feedback-sel {
  margin-left: auto;
  font-size: 0.66rem;
  font-weight: 900;
  color: var(--marca-escura);
  text-transform: uppercase;
}

.planning-feedback-steps {
  border-top: 1px dashed #cbd5e1;
  padding-top: 10px;
  display: grid;
  gap: 8px;
}

.planning-feedback-step {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #334155;
}

.planning-feedback-step .n {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--blue);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 900;
  flex: 0 0 auto;
}

.planning-feedback-step.done .n {
  background: var(--green);
}

.planning-feedback-step .n i,
.planning-feedback-step .n svg {
  width: 13px;
  height: 13px;
}

.planning-feedback-step .ghost-button {
  margin-left: auto;
}

.planning-feedback-lock {
  margin: 0;
  font-size: 0.74rem;
  color: var(--amber);
  background: var(--amber-soft);
  border: 1px solid #f0dcb2;
  border-radius: 8px;
  padding: 8px 10px;
  font-weight: 700;
}

.planning-feedback-obra-field {
  margin-left: 30px;
}

/* Selos do feedback na celula (canto inferior esquerdo; pager fica no direito). */
.planning-feedback-tag {
  position: absolute;
  left: 6px;
  bottom: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 0.6rem;
  font-weight: 900;
  max-width: calc(100% - 60px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.planning-feedback-tag i,
.planning-feedback-tag svg {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
}

.planning-feedback-tag.st-executado { background: var(--green-soft); color: #0f5c46; border: 1px solid #b7ead8; }
.planning-feedback-tag.st-cancelado { background: #eef2f7; color: #68707a; border: 1px solid #cbd5e1; }
.planning-feedback-tag.st-substituido { background: #f3f8fc; color: var(--blue); border: 1px solid #bcd7e8; }

.planning-grid .planning-cell.has-feedback-pages {
  padding-bottom: 30px;
}

.planning-grid .planning-cell.is-cancelled-page {
  background: #f1f5f9;
}

.planning-cell-line.riscado {
  text-decoration: line-through;
  color: #94a3b8;
}

.planning-cell-line.warn-line {
  color: var(--amber);
  font-weight: 800;
}

/* Carregamento do orcamento da obra (SIAGO-C-3-2-1): nada digitavel ate
   terminar - overlay com spinner no corpo do popup. */
.planning-medicao-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 260px;
  color: var(--graphite);
}

.planning-medicao-loading b {
  font-size: 0.95rem;
}

.planning-medicao-loading small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

/* v0291: andamento da C-3-2-1 (baixando X MB de Y · lendo N linhas) */
.planning-medicao-loading .planning-medicao-progresso {
  color: var(--vcr-teal);
  font-variant-numeric: tabular-nums;
  min-height: 1.1em;
}
.planning-medicao-loading .planning-medicao-progresso:empty {
  display: none;
}

/* v0258: o giro do carregamento percorre as cores da VCR — teal, laranja e
   grafite — enquanto roda. Sao duas animacoes independentes: o giro rapido
   (0,8s) e a troca de cor lenta (3,6s), para a cor mudar sem "pular". */
.planning-loading-spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 4px solid #e5e9ef;
  border-top-color: var(--vcr-teal);
  animation: planning-spin 0.8s linear infinite, vcr-giro-cor 3.6s ease-in-out infinite;
}

@keyframes planning-spin {
  to { transform: rotate(360deg); }
}

@keyframes vcr-giro-cor {
  0%, 100% { border-top-color: var(--vcr-teal); }
  33% { border-top-color: var(--vcr-laranja); }
  66% { border-top-color: var(--vcr-grafite); }
}

/* Quem pediu menos movimento fica so com o giro, numa cor so. */
@media (prefers-reduced-motion: reduce) {
  .planning-loading-spinner,
  .auth-atualizando-giro {
    animation: planning-spin 1.4s linear infinite;
    border-top-color: var(--vcr-teal);
  }
}

/* Campos numericos e celulas editaveis das tabelas da medicao: centralizados. */
.planning-medicao-table td.numeric,
.planning-obra-services-table td.numeric {
  text-align: center;
}

.planning-medicao-table input.planning-medicao-input:not([data-planning-service-manual="descricao"]) {
  text-align: center;
}

/* Campo piscando: falta preenchimento (Tab sem codigo / confirmar sem qtd). */
@keyframes planning-field-blink {
  0%, 100% { border-color: #cbd5e1; box-shadow: none; }
  25%, 75% { border-color: var(--marca); box-shadow: 0 0 0 3px rgba(240, 132, 48, 0.18); }
}

.planning-medicao-input.field-blink {
  animation: planning-field-blink 0.5s ease-in-out 2;
}

/* Tela cheia da grade do planejamento (Fullscreen API cobre a barra de
   tarefas). X oculto no canto superior direito: aparece com o mouse perto. */
.planning-fullscreen-hot,
.planning-fullscreen-close {
  display: none;
}

#worksPlanningMount:fullscreen {
  background: var(--page);
  overflow: auto;
  padding: 14px 16px;
}

#worksPlanningMount:fullscreen .planning-grid-scroll {
  max-height: none;
}

#worksPlanningMount:fullscreen .planning-fullscreen-close {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 10px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: var(--graphite);
  font-size: 1.3rem;
  font-weight: 900;
  cursor: pointer;
  z-index: 99;
  opacity: 0;
  transition: opacity 0.2s ease;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.22);
}

#worksPlanningMount:fullscreen .planning-fullscreen-close.show,
#worksPlanningMount:fullscreen .planning-fullscreen-close:hover {
  opacity: 1;
}

.planning-medicao-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.planning-stat {
  border: 1px solid #d9dee5;
  border-radius: 10px;
  padding: 9px 12px;
  background: #fbfcfe;
}

.planning-stat small {
  display: block;
  font-size: 0.62rem;
  font-weight: 900;
  text-transform: uppercase;
  color: #68707a;
  margin-bottom: 3px;
}

.planning-stat b {
  font-size: 0.98rem;
  color: #171a1d;
}

/* O popup cresce com as linhas; quando bater no limite da tela, o corpo rola. */
.planning-medicao-body {
  gap: 8px;
}

.planning-medicao-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.planning-medicao-caption {
  flex: 1;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 900;
  color: #8c1d18;
  letter-spacing: 0.04em;
}

.planning-medicao-tablewrap {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

/* Sem rolagem interna nem horizontal: a tabela cabe inteira no popup.
   min-width: 0 vence o min-width global do .dashboard-table. */
.planning-medicao-tablewrap .planning-medicao-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.planning-col-item { width: 40px; }
.planning-col-code { width: 112px; }
.planning-col-op { width: 96px; }
.planning-col-und { width: 64px; }
.planning-col-money { width: 124px; } /* v0397: cabe "R$ 1.234.567,89" sem cortar */
.planning-col-qty { width: 82px; }
.planning-col-secao { width: 210px; }
.planning-col-x { width: 40px; }

.planning-medicao-table thead th {
  background: #8c1d18;
  color: #ffffff !important;
  font-size: 0.7rem;
  font-weight: 800;
  text-align: center;
  padding: 8px 6px;
  border-right: 1px solid #a1443f;
  white-space: normal;
  line-height: 1.2;
}

/* Dados centralizados (horizontal e vertical); Descricao e Secao a esquerda. */
.planning-medicao-table td {
  padding: 6px 6px;
  font-size: 0.76rem;
  border-bottom: 1px solid #e4e9f0;
  border-right: 1px solid #eef2f6;
  vertical-align: middle;
  text-align: center;
  overflow-wrap: break-word;
}

.planning-medicao-table td.planning-service-desc,
.planning-medicao-table td.planning-service-secao {
  text-align: left;
}

.planning-medicao-table td.numeric {
  text-align: center;
}

.planning-medicao-input {
  text-align: center;
}

/* opcao realcada pela navegacao com as setas */
.planning-obra-option.active {
  border-color: var(--marca);
  background: var(--marca-suave);
}

.planning-medicao-table td.centered {
  text-align: center;
}

.planning-medicao-table td.numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.planning-medicao-table td.strong {
  font-weight: 800;
}

.planning-service-desc {
  white-space: normal;
}

/* Secao em UMA linha: sem quebra; o excedente vira reticencias com tooltip. */
.planning-service-secao {
  font-size: 0.68rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.planning-service-code-cell {
  position: relative;
}

.planning-service-dropdown {
  z-index: 120;
}

.planning-medicao-op {
  font-size: 0.72rem;
}

.planning-medicao-op-cell {
  font-size: 0.72rem;
  font-weight: 700;
  color: #334155;
}

.planning-medicao-und {
  text-align: center;
}

.planning-medicao-kbd {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  text-align: right;
}

.planning-medicao-input {
  box-sizing: border-box;
  max-width: 100%;
  width: 100%;
  padding: 6px 8px;
  font: inherit;
  font-size: 0.78rem;
  border: 1px solid #d5dee9;
  border-radius: 7px;
  background: #fffbea;
}

.planning-medicao-input:focus {
  outline: none;
  border-color: var(--marca);
}

.planning-medicao-qty {
  max-width: 90px;
  text-align: center;
  font-weight: 800;
}

/* Excluir linha: circulo discreto, avermelha no hover. */
.planning-row-remove {
  box-sizing: border-box;
  width: 24px;
  height: 24px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  background: transparent;
  border: none;
  border-radius: 50%;
  color: #9aa6b5;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.planning-row-remove:hover {
  background: #fdf2f1;
  color: #b3261e;
}

.planning-medicao-subtotal {
  text-align: right;
  font-weight: 900;
  background: #f1f5f9;
  padding: 8px 10px;
}

.planning-medicao-table tfoot td {
  background: #f1f5f9;
  border-top: 2px solid var(--line);
}

/* Card do hub */
.works-module-card.planning .module-icon {
  background: #eef2ff;
  color: #4338ca;
}

.electric-warehouse-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.electric-warehouse-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.3rem, 2vw, 2rem);
}

.electric-warehouse-head p:not(.eyebrow) {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.45;
}

.electric-warehouse-head strong {
  justify-self: end;
  border: 1px solid #a7f3d0;
  background: #ecfdf5;
  color: #0f766e;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 900;
}

.electric-warehouse-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
}

.electric-warehouse-card {
  padding: 14px;
  display: grid;
  gap: 8px;
}

.electric-warehouse-card span {
  color: var(--muted);
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 900;
}

.electric-warehouse-card strong {
  color: var(--ink);
  font-size: 1.05rem;
}

.electric-warehouse-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.45;
}

.inventory-shell {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.inventory-analytics-shell,
.inventory-dashboard-shell {
  padding-top: 0;
}

.inventory-form-card,
.inventory-items-card,
.inventory-history-panel,
.inventory-dashboard-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.inventory-fields {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.inventory-assignee-field {
  grid-column: span 2;
}

.inventory-fields label,
.inventory-notes,
.inventory-row label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.inventory-fields input,
.inventory-fields select,
.inventory-notes textarea,
.inventory-row input,
.inventory-static-value {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: none;
  padding: 0 12px;
}

.inventory-fields input[readonly],
.inventory-fields select:disabled {
  background: #f8fafc;
  color: var(--ink);
  opacity: 1;
}

.inventory-notes textarea {
  min-height: 72px;
  line-height: 1.35;
  padding: 10px 12px;
  resize: vertical;
}

.inventory-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.inventory-kpis article {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #f8fafc;
}

.inventory-kpis span,
.inventory-section-head span,
.inventory-history-card span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.inventory-kpis strong {
  color: var(--ink);
  font-size: 1.3rem;
  line-height: 1;
}

.inventory-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.inventory-section-head > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.inventory-section-head strong {
  color: var(--ink);
  font-size: 1rem;
}

.inventory-row {
  display: grid;
  grid-template-columns:
    minmax(86px, 0.6fr)
    minmax(220px, 2.1fr)
    minmax(64px, 0.42fr)
    minmax(118px, 0.72fr)
    minmax(112px, 0.68fr);
  gap: 10px;
  align-items: end;
}

.inventory-rows {
  display: grid;
  gap: 14px;
}

.inventory-row {
  position: relative;
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-left: 5px solid #94a3b8;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.inventory-row.is-filled {
  border-color: #bfdbfe;
  border-left-color: #2563eb;
  background: #f8fbff;
}

.inventory-row.is-locked {
  border-color: #b7ead8;
  border-left-color: #00765f;
  background: #f3fbf8;
}

.inventory-row input:disabled {
  color: #4b5563;
  background: #eef7f3;
  border-color: #b7ead8;
  opacity: 1;
}

.inventory-transformer-evidence {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  margin-top: 2px;
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-left: 4px solid #94a3b8;
  border-radius: 8px;
  background: #f8fafc;
}

.inventory-transformer-evidence.is-complete {
  border-color: #c7e7dc;
  border-left-color: #00765f;
  background: #f3fbf8;
}

.inventory-transformer-evidence-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.inventory-transformer-evidence-head strong {
  color: #334155;
  font-size: 0.88rem;
}

.inventory-transformer-evidence.is-complete .inventory-transformer-evidence-head strong {
  color: #006b58;
}

.inventory-transformer-evidence-head span,
.inventory-photo-status {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.inventory-transformer-unit {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #ffffff;
}

.inventory-transformer-evidence.is-complete .inventory-transformer-unit {
  border-color: #b7ead8;
  background: #f8fffc;
}

.inventory-transformer-unit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.inventory-transformer-unit-head strong {
  color: #334155;
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.inventory-transformer-unit-head span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.inventory-transformer-evidence-note {
  margin: 0;
  color: var(--muted);
  font-weight: 900;
}

/* Banco de equipamentos: unidade com serie + patrimonio ja cadastrados
   dispensa as fotos - grade de fotos some e entra o aviso verde. */
.inventory-registry-note {
  display: none;
  margin: 0;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #b7ead8;
  border-radius: 8px;
  background: #effaf5;
  color: #006b58;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.35;
}

.inventory-registry-note i,
.inventory-registry-note svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin-top: 1px;
}

.inventory-transformer-unit.is-registered {
  border-color: #9adfc6;
  background: #f8fffc;
}

.inventory-transformer-unit.is-registered .inventory-registry-note {
  display: flex;
}

.inventory-transformer-unit.is-registered .inventory-transformer-photo-grid {
  display: none;
}

.inventory-transformer-unit.is-registered .inventory-transformer-unit-head span[data-inventory-unit-photolabel] {
  color: #006b58;
}

/* Planejamento: 2o servico - abas de pagina dentro do popup e pager 1/2 na
   celula da grade (cores do padrao do app). */
.planning-service-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 0;
  flex-wrap: wrap;
}

.planning-service-tab {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 0.8rem;
  font-weight: 900;
  cursor: pointer;
}

.planning-service-tab.active {
  border-color: var(--marca);
  color: var(--marca-escura);
  background: var(--marca-suave);
}

.planning-service-add,
.planning-service-remove {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px dashed #cbd5e1;
  background: #ffffff;
  color: #475569;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.planning-service-remove {
  border-style: solid;
  color: #9d1c21;
  border-color: #efc4c6;
}

.planning-service-add i,
.planning-service-add svg,
.planning-service-remove i,
.planning-service-remove svg {
  width: 14px;
  height: 14px;
}

.planning-service-total {
  margin-left: auto;
  font-size: 0.78rem;
  font-weight: 800;
  color: #475569;
}

.planning-service-total b {
  color: var(--green);
}

.planning-cell.has-service2 {
  padding-bottom: 34px;
}

.planning-cell-pager {
  position: absolute;
  right: 6px;
  bottom: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  color: #1f2937;
  font-size: 0.66rem;
  font-weight: 900;
  line-height: 1;
}

.planning-cell-pager-arrows {
  display: flex;
  gap: 2px;
}

.planning-cell-pager-btn {
  width: 18px;
  height: 16px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #1f2937;
  border-radius: 5px;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.planning-cell-pager-btn:hover {
  border-color: #7f7f7f;
}

.planning-cell-line.money.total {
  font-weight: 900;
}

/* Recuo do bloco completo (Opcao A): evidencia completa vira uma barra verde
   de 1 linha; o toque reabre. */
.inventory-transformer-evidence.is-collapsed {
  padding: 0;
  border: 0;
  background: transparent;
}

.inventory-evidence-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 1px solid #b7ead8;
  background: var(--green-soft);
  border-radius: 9px;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.inventory-evidence-summary-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--green);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.inventory-evidence-summary-check i,
.inventory-evidence-summary-check svg {
  width: 14px;
  height: 14px;
}

.inventory-evidence-summary-text {
  min-width: 0;
  flex: 1;
}

.inventory-evidence-summary-text b {
  display: block;
  color: #0f5c46;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.inventory-evidence-summary-text small {
  display: block;
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 700;
}

.inventory-evidence-summary-chev {
  color: var(--green);
  flex: 0 0 auto;
}

.inventory-evidence-collapse-btn {
  min-height: 30px;
  padding: 0 10px;
  font-size: 0.72rem;
  flex: 0 0 auto;
}

/* Assistente de unidades: com 2+ unidades a contagem mostra UMA por vez,
   com quadradinhos de situacao/atalho - cores do padrao do app. */
.inventory-unit-wizard {
  display: grid;
  gap: 10px;
}

.inventory-unit-wizard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.inventory-unit-wizard-head strong {
  color: #334155;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.inventory-unit-wizard-head span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
  text-align: right;
}

.inventory-unit-progress {
  height: 7px;
  border-radius: 5px;
  background: #e5e9ef;
  overflow: hidden;
}

.inventory-unit-progress i {
  display: block;
  height: 100%;
  background: var(--green);
  border-radius: 5px;
  transition: width 0.25s ease;
}

.inventory-unit-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.inventory-unit-chip {
  min-width: 34px;
  height: 34px;
  padding: 0 6px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  font-weight: 900;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.inventory-unit-chip.is-partial {
  border-color: var(--amber);
  color: var(--amber);
  background: var(--amber-soft);
}

.inventory-unit-chip.is-done {
  background: var(--green);
  border-color: var(--green);
  color: #ffffff;
}

.inventory-unit-chip.is-registered {
  background: var(--green-soft);
  border-color: #7fd8bb;
  color: var(--green);
}

.inventory-unit-chip.is-current {
  outline: 2px solid var(--marca);
  outline-offset: 1px;
}

.inventory-unit-nav {
  display: flex;
  gap: 8px;
}

.inventory-unit-nav .ghost-button,
.inventory-unit-nav .primary-button {
  flex: 1;
  justify-content: center;
  min-height: 42px;
}

.inventory-unit-jump {
  width: 100%;
  justify-content: center;
  border-style: dashed;
}

.inventory-transformer-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.inventory-transformer-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.inventory-photo-field {
  align-content: start;
}

.inventory-photo-button {
  min-height: 42px;
  justify-content: center;
  border-color: #dbe3ec;
  background: #ffffff;
}

.inventory-photo-button.has-photo {
  border-color: #cbd5e1;
  color: #334155;
  background: #ffffff;
}

.inventory-transformer-evidence.is-complete .inventory-photo-button.has-photo {
  border-color: #00765f;
  color: #00765f;
  background: #e8fbf4;
}

.inventory-photo-status.ok {
  color: var(--muted);
}

.inventory-transformer-evidence.is-complete .inventory-photo-status.ok {
  color: #00765f;
}

.inventory-static-value {
  display: flex;
  align-items: center;
  line-height: 1.2;
  overflow-wrap: anywhere;
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #334155;
}

.inventory-label-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.inventory-lock-badge {
  padding: 3px 7px;
  border-radius: 999px;
  background: #d9f8ed;
  color: #00765f;
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.inventory-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.inventory-start-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.inventory-submit-disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.inventory-session-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border: 1px solid #b7ead8;
  border-radius: 8px;
  background: #f3fbf8;
  color: #00765f;
  font-weight: 900;
}

.inventory-session-status.final {
  border-color: #dbe3ec;
  background: #f8fafc;
  color: var(--muted);
}

.inventory-session-status.pending {
  border-color: #dbe3ec;
  background: #f8fafc;
  color: var(--muted);
}

.inventory-session-status span {
  color: inherit;
  font-size: 0.84rem;
  overflow-wrap: anywhere;
}

.inventory-session-status-content {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.inventory-session-status-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.inventory-session-status-actions .ghost-button {
  min-height: 34px;
  justify-content: center;
}

.inventory-history-toolbar {
  display: grid;
  grid-template-columns: minmax(130px, 0.8fr) minmax(220px, 1.25fr) minmax(150px, 0.8fr) minmax(190px, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #f8fafc;
}

.inventory-dashboard-toolbar {
  display: grid;
  grid-template-columns: minmax(130px, 0.8fr) minmax(240px, 1.35fr) minmax(160px, 0.8fr) auto auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #f8fafc;
}

.inventory-justification-toolbar {
  grid-template-columns: minmax(130px, 0.75fr) minmax(220px, 1.15fr) minmax(150px, 0.75fr) minmax(170px, 0.8fr) auto auto;
}

.inventory-management-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) minmax(180px, 0.8fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #f8fafc;
}

.inventory-history-toolbar label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.inventory-dashboard-toolbar label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.inventory-management-toolbar label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.inventory-history-toolbar select {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  padding: 0 10px;
}

.inventory-dashboard-toolbar select,
.inventory-dashboard-toolbar input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  padding: 0 10px;
}

.inventory-dashboard-toolbar input::placeholder {
  color: #94a3b8;
  opacity: 1;
}

.inventory-management-toolbar select {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  padding: 0 10px;
}

.inventory-history-clear,
.inventory-dashboard-search,
.inventory-dashboard-clear,
.inventory-management-clear {
  min-height: 42px;
}

.inventory-history-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 160px));
  gap: 10px;
}

.inventory-analytics-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.inventory-dashboard-summary {
  display: grid;
  grid-template-columns: minmax(70px, 0.5fr) minmax(110px, 0.75fr) minmax(170px, 1.2fr) repeat(3, minmax(105px, 0.8fr));
  gap: 8px;
}

.inventory-history-summary article {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #ffffff;
}

.inventory-analytics-summary article {
  display: grid;
  align-content: center;
  gap: 5px;
  min-height: 74px;
  padding: 12px;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #f8fafc;
}

.inventory-dashboard-summary article {
  display: grid;
  align-content: center;
  gap: 4px;
  min-height: 58px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #f8fafc;
}

.inventory-history-summary span,
.inventory-analytics-summary span,
.inventory-dashboard-summary span,
.inventory-history-section-head span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.inventory-history-summary strong,
.inventory-analytics-summary strong,
.inventory-dashboard-summary strong {
  color: var(--ink);
  font-size: 1.12rem;
  line-height: 1;
  overflow-wrap: anywhere;
}

.inventory-analytics-summary strong,
.inventory-dashboard-summary strong {
  font-size: 1.08rem;
}

.inventory-dashboard-summary strong.positive {
  color: #00765f;
}

.inventory-dashboard-summary strong.negative {
  color: #b20d1c;
}

.inventory-section-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.inventory-dashboard-records-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #ffffff;
}

.inventory-dashboard-records-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
}

.inventory-dashboard-records-table th,
.inventory-dashboard-records-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  text-align: center;
  vertical-align: top;
  line-height: 1.22;
}

.inventory-dashboard-records-table th {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
  background: #f8fafc;
}

.inventory-dashboard-records-table td {
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 850;
}

.inventory-dashboard-records-table td:nth-child(1),
.inventory-dashboard-records-table td:nth-child(2),
.inventory-dashboard-records-table td:nth-child(3) {
  text-align: left;
}

.inventory-dashboard-record-row {
  cursor: pointer;
}

.inventory-dashboard-record-row:hover {
  background: #f8fafc;
}

.inventory-dashboard-record-row strong {
  display: block;
  color: var(--ink);
  font-size: 0.9rem;
}

.inventory-dashboard-record-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.inventory-dashboard-record-open {
  min-height: 34px;
  padding-inline: 12px;
  white-space: nowrap;
}

.inventory-dashboard-panel-detail {
  padding-top: 12px;
}

.inventory-dashboard-selected-record {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #f8fafc;
}

.inventory-dashboard-selected-record.has-action {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 12px;
}

.inventory-selected-record-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.inventory-selected-record-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.inventory-selected-record-back {
  min-height: 42px;
  padding-inline: 14px;
  white-space: nowrap;
}

.inventory-dashboard-selected-record span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.inventory-dashboard-selected-record strong {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.15;
}

.inventory-dashboard-selected-record small {
  color: var(--muted);
  font-weight: 850;
}

.inventory-dashboard-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #ffffff;
}

.inventory-dashboard-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.inventory-dashboard-table {
  min-width: 1380px;
}

.inventory-dashboard-table th,
.inventory-dashboard-table td {
  padding: 10px 10px;
  border-bottom: 1px solid #e2e8f0;
  text-align: center;
  vertical-align: middle;
  line-height: 1.22;
  overflow-wrap: normal;
  word-break: normal;
}

.inventory-dashboard-table th {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.15;
  text-transform: uppercase;
  background: #f8fafc;
  white-space: nowrap;
}

.inventory-dashboard-table td {
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 800;
  white-space: nowrap;
}

.inventory-dashboard-table th:nth-child(1),
.inventory-dashboard-table td:nth-child(1) {
  width: 64px;
}

.inventory-dashboard-table th:nth-child(2),
.inventory-dashboard-table td:nth-child(2) {
  width: 370px;
  white-space: normal;
  overflow-wrap: break-word;
}

.inventory-dashboard-table td:nth-child(2) {
  text-align: left;
}

.inventory-dashboard-table th:nth-child(3),
.inventory-dashboard-table td:nth-child(3) {
  width: 62px;
  text-align: center;
}

.inventory-dashboard-table th:nth-child(4),
.inventory-dashboard-table td:nth-child(4) {
  width: 54px;
  text-align: center;
}

.inventory-dashboard-table th:nth-child(5),
.inventory-dashboard-table td:nth-child(5) {
  width: 122px;
}

.inventory-dashboard-table th:nth-child(6),
.inventory-dashboard-table td:nth-child(6),
.inventory-dashboard-table th:nth-child(7),
.inventory-dashboard-table td:nth-child(7),
.inventory-dashboard-table th:nth-child(8),
.inventory-dashboard-table td:nth-child(8),
.inventory-dashboard-table th:nth-child(9),
.inventory-dashboard-table td:nth-child(9),
.inventory-dashboard-table th:nth-child(10),
.inventory-dashboard-table td:nth-child(10) {
  text-align: center;
}

.inventory-dashboard-table th:nth-child(6),
.inventory-dashboard-table td:nth-child(6) {
  width: 120px;
}

.inventory-dashboard-table th:nth-child(7),
.inventory-dashboard-table td:nth-child(7) {
  width: 110px;
}

.inventory-dashboard-table th:nth-child(8),
.inventory-dashboard-table td:nth-child(8) {
  width: 126px;
}

.inventory-dashboard-table th:nth-child(9),
.inventory-dashboard-table td:nth-child(9) {
  width: 104px;
}

.inventory-dashboard-table th:nth-child(10),
.inventory-dashboard-table td:nth-child(10) {
  width: 124px;
}

.inventory-dashboard-photo-cell {
  text-align: center !important;
}

.inventory-dashboard-photo-empty {
  color: var(--muted);
  font-weight: 900;
}

.inventory-dashboard-photo-button {
  position: relative;
  display: inline-flex;
  width: 38px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid #f3b7bd;
  border-radius: 8px;
  background: #fff8f9;
  color: var(--brand);
  cursor: pointer;
}

.inventory-dashboard-photo-button svg {
  width: 17px;
  height: 17px;
}

.inventory-dashboard-photo-button b {
  position: absolute;
  top: -7px;
  right: -7px;
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  padding: 0 4px;
  border-radius: 999px;
  background: #dff8ef;
  color: #00765f;
  font-size: 0.64rem;
  font-weight: 900;
}

.inventory-dashboard-photo-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.inventory-dashboard-table tbody tr:last-child td {
  border-bottom: 0;
}

.inventory-justification-records-table {
  min-width: 920px;
}

.inventory-justification-open {
  min-height: 36px;
}

.inventory-justification-panel-editing {
  padding-top: 12px;
}

.inventory-justification-reference {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 10px 0;
  background: #ffffff;
  border-bottom: 1px solid rgba(219, 227, 236, 0.9);
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.08);
}

.inventory-justification-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 430px));
  gap: 12px;
  align-items: start;
}

.inventory-justification-summary-grid.has-spen-summary {
  grid-template-columns: repeat(3, minmax(260px, 390px));
}

.inventory-justification-summary-card {
  width: 100%;
  border-collapse: collapse;
  border: 2px solid #111827;
  background: #ffffff;
  table-layout: fixed;
}

.inventory-justification-summary-card th,
.inventory-justification-summary-card td {
  padding: 4px 8px;
  border-bottom: 1px solid #111827;
  color: #111827;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.15;
}

.inventory-justification-summary-card th {
  width: 56%;
  text-align: left;
}

.inventory-justification-summary-card td {
  text-align: right;
}

.inventory-justification-summary-title th,
.inventory-justification-summary-result th,
.inventory-justification-summary-result td {
  background: #111827;
  color: #ffffff;
  text-align: center;
}

.inventory-justification-summary-card .positive {
  color: #00765f;
}

.inventory-justification-summary-card .negative {
  color: #b20d1c;
}

.inventory-justification-summary-result .positive,
.inventory-justification-summary-result .negative {
  color: #ffffff;
}

.inventory-justification-summary-pending {
  color: #94a3b8 !important;
}

.inventory-justification-table-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  max-height: var(--inventory-justification-table-max-height, min(68vh, 760px));
  max-height: var(--inventory-justification-table-max-height, min(68dvh, 760px));
  min-height: min(360px, var(--inventory-justification-table-max-height, 520px));
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #ffffff;
}

.inventory-justification-table-wrap {
  flex: 1 1 auto;
  width: 100%;
  max-width: 100%;
  max-height: none;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: scroll;
  position: relative;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  overscroll-behavior: contain;
  scrollbar-gutter: stable both-edges;
}

.inventory-justification-scrollbar {
  position: relative;
  flex: 0 0 24px;
  z-index: 35;
  width: 100%;
  min-width: 0;
  height: 24px;
  padding: 3px 0;
  overflow-x: auto;
  overflow-y: hidden;
  border-top: 1px solid #dbe3ec;
  border-radius: 0 0 8px 8px;
  background: #f8fafc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.inventory-justification-scrollbar-spacer {
  width: 3000px;
  height: 1px;
}

.inventory-justification-table {
  width: max(100%, 3000px);
  min-width: 3000px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.inventory-justification-col-stock-type {
  width: 104px;
}

.inventory-justification-col-material {
  width: 390px;
}

.inventory-justification-col-unit {
  width: 52px;
}

.inventory-justification-col-stock-quantity {
  width: 76px;
}

.inventory-justification-col-counted-quantity {
  width: 92px;
}

.inventory-justification-col-currency {
  width: 110px;
}

.inventory-justification-col-status {
  width: 78px;
}

.inventory-justification-col-deviation-quantity {
  width: 78px;
}

.inventory-justification-col-justification-code {
  width: 150px;
}

.inventory-justification-col-justify-quantity {
  width: 100px;
}

.inventory-justification-col-final-quantity {
  width: 90px;
}

.inventory-justification-col-final-deviation {
  width: 96px;
}

.inventory-justification-col-complement {
  width: 430px;
}

.inventory-justification-table th,
.inventory-justification-table td {
  height: 44px;
  padding: 7px 8px;
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  text-align: center;
  vertical-align: middle;
  line-height: 1.18;
}

.inventory-justification-table th:last-child {
  border-right: 0;
}

.inventory-justification-table td:last-child {
  border-right: 0;
  padding-right: 22px;
}

.inventory-justification-table th {
  position: sticky;
  color: var(--muted);
  font-size: 0.6rem;
  font-weight: 900;
  text-transform: uppercase;
  text-align: center;
  vertical-align: middle;
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
  background: #f8fafc;
  z-index: 20;
}

.inventory-justification-table thead tr:first-child th {
  top: 0;
  z-index: 24;
}

.inventory-justification-table thead tr:nth-child(2) th {
  top: 28px;
  z-index: 23;
}

.inventory-justification-group-row th {
  height: 28px;
  padding-block: 5px;
  color: #7a0d18;
  background: #fff7ed;
  border-bottom-color: #f3d7b5;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.inventory-justification-table td {
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 850;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}

.inventory-justification-table thead tr:nth-child(2) th:nth-child(1),
.inventory-justification-table tbody td:nth-child(1),
.inventory-justification-table thead tr:nth-child(2) th:nth-child(2),
.inventory-justification-table tbody td:nth-child(2) {
  position: sticky;
}

.inventory-justification-table thead tr:nth-child(2) th:nth-child(1),
.inventory-justification-table tbody td:nth-child(1) {
  left: 0;
}

.inventory-justification-table thead tr:nth-child(2) th:nth-child(2),
.inventory-justification-table tbody td:nth-child(2) {
  left: var(--inventory-justification-material-left, 104px);
  box-shadow: 8px 0 14px rgba(15, 23, 42, 0.08);
}

.inventory-justification-table thead tr:nth-child(2) th:nth-child(1),
.inventory-justification-table thead tr:nth-child(2) th:nth-child(2) {
  background: #f8fafc;
  z-index: 30;
}

.inventory-justification-table tbody td:nth-child(1),
.inventory-justification-table tbody td:nth-child(2) {
  background: #ffffff;
  z-index: 12;
}

.inventory-justification-table tbody tr[data-inventory-justification-row] {
  cursor: pointer;
}

.inventory-justification-table tbody tr[data-inventory-justification-row]:hover td {
  background: #f0fdfa;
}

.inventory-justification-table tbody tr.inventory-justification-row-selected td {
  background: #e6fffb;
  box-shadow: inset 0 1px 0 #99f6e4, inset 0 -1px 0 #99f6e4;
}

.inventory-justification-table tbody tr.inventory-justification-row-selected td:first-child {
  box-shadow: inset 4px 0 0 #008577, inset 0 1px 0 #99f6e4, inset 0 -1px 0 #99f6e4;
}

.inventory-justification-table tbody tr.inventory-justification-row-selected td:nth-child(2) {
  box-shadow: inset 0 1px 0 #99f6e4, inset 0 -1px 0 #99f6e4, 8px 0 14px rgba(15, 23, 42, 0.1);
}

.inventory-justification-table tbody tr.inventory-justification-row-selected .inventory-justification-code-select,
.inventory-justification-table tbody tr.inventory-justification-row-selected .inventory-justification-quantity-input,
.inventory-justification-table tbody tr.inventory-justification-row-selected .inventory-justification-text-input {
  border-color: #5eead4;
  background: #f8fffd;
}

.inventory-justification-table th:nth-child(1),
.inventory-justification-table td:nth-child(1) {
  width: 104px;
}

.inventory-justification-table td:nth-child(2) {
  width: 390px;
  text-align: left;
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
}

.inventory-justification-table th:nth-child(3),
.inventory-justification-table td:nth-child(3) {
  width: 52px;
}

.inventory-justification-table th:nth-child(4),
.inventory-justification-table td:nth-child(4) {
  width: 76px;
}

.inventory-justification-table th:nth-child(6),
.inventory-justification-table td:nth-child(6) {
  width: 92px;
}

.inventory-justification-table th:nth-child(8),
.inventory-justification-table td:nth-child(8) {
  width: 78px;
}

.inventory-justification-table th:nth-child(9),
.inventory-justification-table td:nth-child(9) {
  width: 78px;
}

.inventory-justification-table th:nth-child(12),
.inventory-justification-table td:nth-child(12),
.inventory-justification-table th:nth-child(13),
.inventory-justification-table td:nth-child(13) {
  width: 118px;
}

.inventory-justification-table th:nth-child(5),
.inventory-justification-table td:nth-child(5),
.inventory-justification-table th:nth-child(7),
.inventory-justification-table td:nth-child(7),
.inventory-justification-table th:nth-child(10),
.inventory-justification-table td:nth-child(10),
.inventory-justification-table th:nth-child(15),
.inventory-justification-table td:nth-child(15),
.inventory-justification-table th:nth-child(18),
.inventory-justification-table td:nth-child(18) {
  width: 110px;
}

.inventory-justification-table th:nth-child(11),
.inventory-justification-table td:nth-child(11) {
  width: 150px;
}

.inventory-justification-table th:nth-child(14),
.inventory-justification-table td:nth-child(14) {
  width: 90px;
}

.inventory-justification-table th:nth-child(16),
.inventory-justification-table td:nth-child(16) {
  width: 78px;
}

.inventory-justification-table th:nth-child(17),
.inventory-justification-table td:nth-child(17) {
  width: 96px;
}

.inventory-justification-code-select,
.inventory-justification-quantity-input,
.inventory-justification-text-input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 30px;
  border: 1px solid #d5dee9;
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font-size: 0.6rem;
  font-weight: 850;
  line-height: 1.1;
  padding: 4px 6px;
}

.inventory-justification-quantity-input {
  text-align: center;
}

.inventory-justification-quantity-input.is-calculated:disabled {
  background: #eef7fc;
  border-color: #c9dfee;
  color: #21445b;
}

.inventory-justification-text-input {
  text-align: left;
}

.inventory-justification-observation-input {
  display: block;
  min-height: 42px;
  max-height: 132px;
  resize: vertical;
  white-space: pre-wrap;
  overflow: auto;
  line-height: 1.3;
}

.inventory-justification-other-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  align-items: center;
  gap: 5px;
  width: 100%;
}

.inventory-justification-other-total {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border: 1px solid #d5dee9;
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font-size: 0.6rem;
  font-weight: 900;
}

.inventory-justification-other-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid #9bd8d1;
  border-radius: 6px;
  background: #ecfdf5;
  color: #00796b;
  cursor: pointer;
}

.inventory-justification-other-button svg {
  width: 15px;
  height: 15px;
  stroke-width: 3;
}

.inventory-justification-other-button:disabled {
  border-color: #d5dee9;
  background: #f8fafc;
  color: #94a3b8;
  cursor: not-allowed;
}

.inventory-justification-other-button:not(:disabled):hover {
  border-color: #008577;
  background: #d9fbef;
}

.inventory-justification-material-cell span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.inventory-justification-code-select:focus,
.inventory-justification-quantity-input:focus,
.inventory-justification-text-input:focus {
  outline: 2px solid rgba(0, 128, 112, 0.18);
  border-color: var(--green);
}

.inventory-justification-code-select:disabled,
.inventory-justification-quantity-input:disabled,
.inventory-justification-text-input:disabled {
  background: #f8fafc;
  color: #64748b;
  cursor: not-allowed;
  opacity: 1;
}

.inventory-justification-state-note {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.inventory-justification-table td.inventory-justification-complement-cell {
  width: 430px;
  text-align: left;
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
  vertical-align: middle;
}

.inventory-justification-other-modal {
  width: min(720px, calc(100vw - 28px));
}

.inventory-justification-other-body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
  overflow: hidden;
}

.inventory-justification-other-summary {
  margin: 0;
}

.inventory-justification-other-entry-list {
  display: grid;
  gap: 10px;
  min-height: 0;
  max-height: min(430px, calc(100vh - 300px));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

@supports (height: 100dvh) {
  .inventory-justification-other-entry-list {
    max-height: min(430px, calc(100dvh - 300px));
  }
}

.inventory-justification-other-entry {
  display: grid;
  grid-template-columns: 150px minmax(180px, 1fr) 150px 42px;
  gap: 10px;
  align-items: end;
}

.inventory-justification-other-entry label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.inventory-justification-other-entry input,
.inventory-justification-other-entry select {
  min-height: 38px;
  border: 1px solid #d5dee9;
  border-radius: 7px;
  padding: 8px 10px;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 800;
}

.inventory-justification-other-entry input:focus,
.inventory-justification-other-entry select:focus {
  outline: 2px solid rgba(0, 128, 112, 0.18);
  border-color: var(--green);
}

.inventory-justification-other-remove {
  width: 42px;
  min-width: 42px;
  height: 38px;
  padding: 0;
}

.inventory-justification-other-add {
  justify-self: start;
}

@media (max-width: 720px) {
  .inventory-justification-other-entry-list {
    max-height: min(360px, calc(100svh - 280px));
  }

  .inventory-justification-other-entry {
    grid-template-columns: 1fr 1fr 112px 38px;
    gap: 8px;
  }

  .inventory-justification-other-entry input,
  .inventory-justification-other-entry select {
    min-height: 36px;
    font-size: 0.78rem;
    padding: 7px 8px;
  }

  .inventory-justification-other-remove {
    width: 38px;
    min-width: 38px;
    height: 36px;
  }
}

@media (max-width: 560px) {
  .inventory-justification-other-entry {
    grid-template-columns: 1fr 1fr;
  }

  .inventory-justification-other-remove {
    justify-self: end;
  }
}

.inventory-justification-table .inventory-justification-group-row th {
  width: auto;
}

.inventory-justification-status {
  color: var(--ink);
  font-weight: 900;
}

.inventory-justification-status.positive {
  color: #00765f;
}

.inventory-justification-status.negative {
  color: #b20d1c;
}

.inventory-justification-blank {
  display: inline-block;
  min-width: 42px;
}

.inventory-dashboard-count {
  color: #006b58;
  font-weight: 900;
  white-space: nowrap;
}

.inventory-dashboard-deviation {
  color: var(--ink);
  font-weight: 900;
  white-space: nowrap;
}

.inventory-dashboard-deviation.positive {
  color: #00765f;
}

.inventory-dashboard-deviation.negative {
  color: #b20d1c;
}

.inventory-dashboard-empty {
  margin: 0;
  padding: 14px;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  font-weight: 900;
}

.inventory-management-board {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #f8fafc;
}

.inventory-management-head {
  padding-bottom: 10px;
}

.inventory-management-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #ffffff;
}

.inventory-management-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
}

.inventory-management-table th,
.inventory-management-table td {
  padding: 12px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: top;
}

.inventory-management-table th {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  background: #f8fafc;
}

.inventory-management-table tbody tr:last-child td {
  border-bottom: 0;
}

.inventory-management-table td {
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
}

.inventory-management-table td > strong,
.inventory-management-table td > span,
.inventory-management-table td > small {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.inventory-management-table td > strong {
  color: var(--ink);
  line-height: 1.25;
}

.inventory-management-table td > span,
.inventory-management-table td > small {
  margin-top: 4px;
  color: var(--muted);
}

.inventory-management-status,
.inventory-waiting-badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.inventory-management-status.draft {
  color: #1d4ed8;
  background: #eff6ff;
}

.inventory-management-status.partial {
  color: #9a3412;
  background: #fff7ed;
}

.inventory-management-status.count {
  color: #7f1d1d;
  background: #fef2f2;
}

.inventory-waiting-badge {
  color: #006b58;
  background: #e8fbf4;
}

.inventory-waiting-badge.attention {
  color: #a16207;
  background: #fef9c3;
}

.inventory-waiting-badge.critical {
  color: #991b1b;
  background: #fee2e2;
}

.inventory-management-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  gap: 8px;
  min-width: 240px;
  align-items: stretch;
}

.inventory-management-actions .ghost-button,
.inventory-management-actions .primary-button {
  width: 100%;
  min-height: 36px;
  justify-content: center;
  padding-inline: 10px;
}

.inventory-management-empty {
  margin: 0;
  padding: 14px;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #ffffff;
  color: #334155;
  font-weight: 900;
}

.inventory-desktop-only-note {
  display: none;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  font-weight: 800;
}

.inventory-history-groups {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.inventory-history-section {
  display: grid;
  grid-column: 1 / -1;
  gap: 10px;
  min-width: 0;
}

.inventory-history-section-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid #dbe3ec;
}

.inventory-history-section-head > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.inventory-history-section-head strong {
  color: var(--ink);
  font-size: 1rem;
}

.inventory-history-section-head b {
  display: inline-grid;
  min-width: 34px;
  min-height: 30px;
  place-items: center;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--ink);
  font-size: 0.9rem;
}

.inventory-history-list {
  display: grid;
  gap: 10px;
}

.inventory-pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  padding-top: 2px;
}

.inventory-pagination > span,
.inventory-pagination b {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.inventory-pagination > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inventory-pagination .ghost-button {
  min-height: 34px;
  padding: 8px 10px;
}

.inventory-pagination .ghost-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.inventory-history-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #ffffff;
}

.inventory-history-card.is-complete {
  border-left: 4px solid #00765f;
}

.inventory-history-card.is-pending {
  border-left: 4px solid #c77800;
  background: #fffaf0;
}

.inventory-history-card > div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.inventory-history-card strong,
.inventory-history-card small {
  overflow-wrap: anywhere;
}

.inventory-history-card strong {
  color: var(--ink);
}

.inventory-history-card small {
  color: var(--muted);
  font-weight: 800;
}

.inventory-history-actions {
  display: flex;
  gap: 8px;
}

.inventory-history-image-button {
  position: relative;
}

.inventory-history-image-button b {
  display: inline-grid;
  min-width: 22px;
  min-height: 22px;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  background: #e8fbf4;
  color: #00765f;
  font-size: 0.75rem;
}

.inventory-record-viewer-backdrop {
  z-index: 1390;
  place-items: center;
  padding: 24px;
  overflow: auto;
}

.regularization-modal.inventory-record-viewer {
  width: min(1540px, calc(100vw - 56px));
  max-height: min(920px, calc(100dvh - 56px));
}

.inventory-record-viewer-body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  min-height: 0;
  overflow: hidden;
  padding: 14px;
}

.inventory-record-viewer-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.inventory-record-viewer-summary article {
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 0;
  min-height: 66px;
  padding: 10px 12px;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #f8fafc;
}

.inventory-record-viewer-summary span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.inventory-record-viewer-summary strong {
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.inventory-record-viewer-table-wrap {
  min-height: 0;
  max-height: none;
  overflow: auto;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #ffffff;
}

.inventory-record-viewer-table {
  width: 100%;
  min-width: 1400px;
  border-collapse: collapse;
  color: var(--ink);
  font-size: 0.82rem;
  table-layout: fixed;
}

.inventory-record-viewer-table th,
.inventory-record-viewer-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e4ebf3;
  text-align: left;
  vertical-align: middle;
  line-height: 1.22;
}

.inventory-record-viewer-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1.15;
  text-transform: uppercase;
  white-space: nowrap;
}

.inventory-record-viewer-table td {
  font-weight: 800;
  white-space: nowrap;
}

.inventory-record-viewer-table td:nth-child(1),
.inventory-record-viewer-table td:nth-child(3),
.inventory-record-viewer-table td:nth-child(4),
.inventory-record-viewer-table td:nth-last-child(-n + 4) {
  white-space: nowrap;
}

.inventory-record-viewer-table th:nth-child(1),
.inventory-record-viewer-table td:nth-child(1) {
  width: 72px;
}

.inventory-record-viewer-table th:nth-child(2),
.inventory-record-viewer-table td:nth-child(2) {
  width: 410px;
  white-space: normal;
  overflow-wrap: break-word;
}

.inventory-record-viewer-table th:nth-child(3),
.inventory-record-viewer-table td:nth-child(3) {
  width: 58px;
  text-align: center;
}

.inventory-record-viewer-table th:nth-child(4),
.inventory-record-viewer-table td:nth-child(4) {
  width: 132px;
}

.inventory-record-viewer-table th:nth-child(n + 5),
.inventory-record-viewer-table td:nth-child(n + 5) {
  text-align: right;
}

.inventory-record-viewer-table th:last-child,
.inventory-record-viewer-table td:last-child {
  width: 78px;
  text-align: center;
}

.inventory-record-viewer-photo-cell {
  text-align: center !important;
}

.inventory-record-viewer-photo-empty {
  color: var(--muted);
  font-weight: 900;
}

.inventory-record-viewer-photo-button {
  position: relative;
  display: inline-flex;
  width: 38px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid #f3b7bd;
  border-radius: 8px;
  background: #fff8f9;
  color: var(--brand);
  cursor: pointer;
}

.inventory-record-viewer-photo-button svg {
  width: 17px;
  height: 17px;
}

.inventory-record-viewer-photo-button b {
  position: absolute;
  top: -7px;
  right: -7px;
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  padding: 0 4px;
  border-radius: 999px;
  background: #dff8ef;
  color: #00765f;
  font-size: 0.64rem;
  font-weight: 900;
}

.inventory-record-viewer-photo-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.inventory-record-viewer-table tr.is-divergent td {
  background: #fff7ed;
}

.inventory-photo-viewer-backdrop {
  z-index: 1400;
}

.inventory-photo-viewer {
  width: min(940px, calc(100vw - 28px));
}

.inventory-photo-viewer-body {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.inventory-photo-viewer-frame {
  position: relative;
  display: grid;
  place-items: center;
  min-height: min(58vh, 560px);
  margin: 0;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #0f172a;
  overflow: hidden;
}

.inventory-photo-viewer-frame img {
  display: block;
  max-width: 100%;
  max-height: min(58vh, 560px);
  object-fit: contain;
}

.inventory-photo-viewer-stamp {
  position: absolute;
  right: clamp(14px, 3.5vw, 28px);
  bottom: clamp(12px, 3vw, 24px);
  display: grid;
  justify-items: end;
  gap: 2px;
  max-width: calc(100% - 28px);
  color: #ffffff;
  font: 900 clamp(1rem, 3.6vw, 2rem) / 1.16 Arial, Helvetica, sans-serif;
  letter-spacing: 0;
  text-align: right;
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.9),
    0 0 2px rgba(0, 0, 0, 0.95);
  pointer-events: none;
}

.inventory-photo-viewer-stamp span {
  display: block;
  max-width: 100%;
}

.inventory-photo-viewer-info {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #f8fafc;
}

.inventory-photo-viewer-info span {
  color: #00765f;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.inventory-photo-viewer-info strong {
  color: var(--ink);
}

.inventory-photo-viewer-info small {
  color: var(--muted);
  font-weight: 800;
}

.inventory-photo-viewer-actions {
  align-items: center;
  justify-content: space-between;
}

.inventory-photo-viewer-actions strong {
  color: var(--ink);
  font-weight: 900;
}

.inventory-message,
.inventory-empty-history {
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  font-weight: 800;
}

.inventory-message.ok {
  border-color: #9dd8c3;
  color: #00765f;
  background: #f1fcf8;
}

.inventory-message.error {
  border-color: #f3b4bc;
  color: #990815;
  background: #fff5f6;
}

.inventory-source-notice {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #b7ead8;
  border-radius: 8px;
  background: #f3fbf8;
  color: #00765f;
  font-size: 0.84rem;
  font-weight: 900;
}

.inventory-source-notice.loading {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: var(--muted);
}

.inventory-source-notice.error {
  border-color: #f3b4bc;
  background: #fff5f6;
  color: #990815;
}

.inventory-mobile-inbox {
  gap: 16px;
}

.inventory-mobile-task-list {
  display: grid;
  gap: 10px;
}

.inventory-mobile-task-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid #dbe3ec;
  border-left: 5px solid #00765f;
  border-radius: 8px;
  background: #ffffff;
}

.inventory-mobile-task-card > div {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.inventory-mobile-task-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.inventory-mobile-task-card-head span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.inventory-mobile-task-card-head b {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef6f4;
  color: #00765f;
  font-size: 0.74rem;
  font-weight: 900;
  white-space: nowrap;
}

.inventory-mobile-task-card strong {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.inventory-mobile-task-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.inventory-mobile-task-meta span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.inventory-mobile-task-meta b {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
}

.inventory-mobile-task-meta span:last-child {
  grid-column: 1 / -1;
}

.inventory-mobile-task-card small {
  color: var(--muted);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.inventory-mobile-task-card .primary-button {
  width: 100%;
  justify-content: center;
}

@media (max-width: 1180px) {
  .inventory-analytics-summary,
  .inventory-record-viewer-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .inventory-dashboard-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .inventory-history-toolbar,
  .inventory-dashboard-toolbar,
  .inventory-management-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inventory-history-clear,
  .inventory-dashboard-search,
  .inventory-dashboard-clear,
  .inventory-management-clear {
    width: 100%;
  }

  .inventory-history-groups {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .works-view {
    padding: 14px 10px 30px;
  }

  .works-head {
    display: grid;
    padding: 18px;
  }

  .works-mobile-hidden,
  .works-count-desktop {
    display: none;
  }

  .works-count-mobile {
    display: inline;
  }

  .works-module-grid {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .works-module-card {
    grid-template-columns: auto 1fr;
    align-items: start;
    min-height: 0;
  }

  .works-module-card .primary-button {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: center;
  }

  .electric-warehouse-workspace,
  .works-planning-workspace {
    grid-template-columns: 1fr;
  }

  .electric-mobile-hidden-tool {
    display: none !important;
  }

  .electric-warehouse-view.mobile-management-enabled .electric-mobile-hidden-tool[data-electric-tool="analytics"] {
    display: flex !important;
  }

  .electric-warehouse-head {
    grid-template-columns: 1fr;
  }

  .electric-warehouse-head strong {
    justify-self: start;
  }

  .electric-warehouse-grid {
    grid-template-columns: 1fr;
  }

  .inventory-shell {
    padding: 12px;
  }

  .inventory-dashboard-selected-record.has-action {
    grid-template-columns: 1fr;
  }

  .inventory-selected-record-actions,
  .inventory-selected-record-back {
    width: 100%;
  }

  .inventory-selected-record-back {
    justify-content: center;
  }

  .inventory-form-card,
  .inventory-items-card {
    gap: 14px;
    padding: 12px;
  }

  .inventory-history-count,
  .inventory-history-panel {
    display: none;
  }

  .electric-warehouse-view.mobile-management-enabled .inventory-history-panel {
    display: block;
  }

  .inventory-desktop-only-note {
    display: block;
  }

  .electric-warehouse-view.mobile-management-enabled .inventory-desktop-only-note {
    display: none;
  }

  .inventory-fields,
  .inventory-kpis,
  .inventory-analytics-summary,
  .inventory-dashboard-summary,
  .inventory-justification-summary-grid,
  .inventory-record-viewer-summary,
  .inventory-dashboard-toolbar,
  .inventory-management-toolbar,
  .inventory-row,
  .inventory-history-card {
    grid-template-columns: 1fr;
  }

  .inventory-fields {
    gap: 14px;
  }

  .inventory-assignee-field {
    grid-column: auto;
  }

  .inventory-justification-reference {
    position: static;
    padding-bottom: 0;
    box-shadow: none;
  }

  .inventory-justification-table-stage {
    display: block;
    max-height: none;
    min-height: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .inventory-justification-table-wrap {
    max-height: none;
    min-height: 0;
    overflow-x: auto;
    overflow-y: visible;
    border-bottom: 1px solid #dbe3ec;
    border-radius: 8px;
  }

  .inventory-justification-scrollbar {
    display: none;
  }

  .inventory-justification-table th {
    position: static;
  }

  .inventory-fields input,
  .inventory-fields select {
    min-height: 44px;
    font-size: 0.95rem;
  }

  .inventory-notes textarea {
    min-height: 88px;
  }

  .inventory-kpis article {
    min-height: 72px;
  }

  .inventory-section-head,
  .inventory-start-actions,
  .inventory-actions,
  .inventory-history-actions,
  .inventory-session-status,
  .inventory-session-status-actions,
  .inventory-pagination,
  .inventory-pagination > div {
    display: grid;
    grid-template-columns: 1fr;
  }

  .inventory-section-head .ghost-button,
  .inventory-start-actions .ghost-button,
  .inventory-actions .ghost-button,
  .inventory-actions .primary-button,
  .inventory-history-actions .ghost-button,
  .inventory-pagination .ghost-button {
    width: 100%;
  }

  .inventory-record-viewer-table {
    min-width: 1120px;
  }

  .inventory-transformer-evidence-head,
  .inventory-transformer-unit-head,
  .inventory-transformer-fields,
  .inventory-transformer-photo-grid,
  .inventory-photo-viewer-actions {
    grid-template-columns: 1fr;
    display: grid;
  }

  .inventory-photo-viewer-frame,
  .inventory-photo-viewer-frame img {
    max-height: 48vh;
  }

}

.tms-view {
  display: grid;
  gap: 12px;
}

.tms-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  padding: 16px;
  border-top: 3px solid var(--blue);
}

.tms-header p:not(.eyebrow) {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.tms-header-actions {
  display: grid;
  grid-template-columns: minmax(0, 180px) minmax(0, 280px);
  gap: 10px;
  align-items: end;
  width: min(100%, 470px);
}

.tms-header-actions label,
.tms-modal-body label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.tms-header-actions span,
.tms-modal-body label span,
.tms-card-label,
.tms-day-meta,
.tms-team-meta {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.tms-header-actions input,
.tms-header-actions select,
.tms-modal-body input,
.tms-modal-body select,
.tms-modal-body textarea {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 0 12px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid #cfd8e3;
  border-radius: var(--radius);
  font-weight: 800;
}

.tms-modal-body textarea {
  min-height: 96px;
  padding-block: 12px;
  resize: vertical;
}

.tms-inactivity-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #dce3eb;
  border-radius: var(--radius);
}

.tms-check-option {
  display: flex !important;
  grid-template-columns: none !important;
  gap: 10px;
  align-items: center;
}

.tms-check-option input {
  width: 18px;
  min-width: 18px;
  min-height: 18px;
}

.tms-inactivity-panel small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.tms-indicators {
  display: grid;
  gap: 12px;
}

.tms-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.tms-kpi-card {
  display: grid;
  gap: 8px;
  min-height: 100px;
  padding: 14px;
  background: #fbfcfe;
}

.tms-kpi-card strong {
  color: var(--ink);
  font-size: 1.75rem;
  line-height: 1;
}

.tms-kpi-card small {
  color: var(--muted);
  font-weight: 800;
}

.tms-base-panel {
  padding: 14px;
  border-top: 3px solid #d9a441;
}

.tms-base-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.tms-base-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #dce3eb;
  border-radius: var(--radius);
}

.tms-base-card header,
.tms-team-card header,
.tms-day-panel header {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.tms-base-card header small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.tms-base-card header strong {
  color: var(--blue);
  font-size: 1.2rem;
}

.tms-base-lines {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.tms-progress {
  height: 8px;
  overflow: hidden;
  background: #e8edf3;
  border-radius: 999px;
}

.tms-progress span {
  display: block;
  height: 100%;
  background: var(--green);
}

.tms-calendar-panel {
  overflow: hidden;
  border-top: 3px solid var(--blue);
}

.tms-panel-head {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.tms-calendar-weekdays,
.tms-calendar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.tms-calendar-weekdays {
  padding: 12px 14px 0;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.tms-calendar {
  padding: 10px 14px 14px;
}

.tms-day {
  display: grid;
  gap: 8px;
  min-height: 118px;
  padding: 10px;
  text-align: left;
  background: #f7fbff;
  border: 1px solid #d6e3ef;
  border-radius: var(--radius);
}

.tms-day span {
  color: var(--graphite);
  font-size: 1.25rem;
  font-weight: 900;
}

.tms-day em {
  width: fit-content;
  padding: 3px 8px;
  color: var(--blue);
  background: #eef7fc;
  border-radius: 999px;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
}

.tms-day.has-late em {
  color: var(--amber);
  background: var(--amber-soft);
}

.tms-day:hover,
.tms-day.selected {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(29, 95, 134, 0.12);
}

.tms-day.has-late {
  background: #fff8ec;
  border-color: #edc176;
}

.tms-day.has-inactive {
  background: #eef7fc;
  border-color: #b8d8ec;
}

.tms-day-number {
  color: var(--graphite);
  font-size: 1.25rem;
  font-weight: 900;
}

.tms-day small {
  color: var(--muted);
  font-weight: 900;
}

.tms-day-panel {
  overflow: hidden;
  border-top: 3px solid var(--blue);
}

.tms-day-panel > header {
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.tms-day-list {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.tms-base-section {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #d7e0e8;
  border-radius: var(--radius);
}

.tms-base-section > header {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: #f4f8fb;
  border-left: 4px solid var(--blue);
  border-bottom: 1px solid #dce4ec;
}

.tms-base-section > header h4 {
  margin: 0;
  color: var(--graphite);
  font-size: 1rem;
}

.tms-base-section > header small,
.tms-base-section > header span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.tms-base-section.is-closed > header {
  border-bottom: 0;
}

.tms-base-section-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.tms-base-section-actions > span {
  white-space: nowrap;
}

.tms-base-toggle {
  min-width: 92px;
  justify-content: center;
}

.tms-base-team-list {
  display: grid;
}

.tms-team-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #dce3eb;
  border-radius: var(--radius);
}

.tms-team-card:nth-child(even) {
  background: #f8fafc;
  box-shadow: var(--row-soft-shadow);
}

.tms-team-card h4 {
  margin: 0;
  color: var(--ink);
  font-size: 0.98rem;
}

.tms-team-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
}

.tms-team-status,
.tms-team-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.tms-team-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.tms-clear-button {
  color: var(--marca-escura);
  background: var(--marca-suave);
  border-color: rgba(240, 132, 48, 0.24);
}

.tms-clear-button:hover {
  color: #ffffff;
  background: var(--marca);
}

.tms-team-status strong {
  color: var(--graphite);
  font-size: 1.15rem;
}

.tms-pill,
.tms-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.tms-pill-missing,
.tms-status-missing {
  color: #8a5700;
  background: var(--amber-soft);
}

.tms-pill-ok,
.tms-status-ok {
  color: var(--green);
  background: var(--green-soft);
}

.tms-pill-late,
.tms-status-late {
  color: var(--red);
  background: #fff1f2;
}

.tms-pill-inactive,
.tms-status-inactive {
  color: var(--blue);
  background: #e8f3f8;
}

.tms-team-status-note {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  text-align: right;
}

.tms-register-button {
  min-height: 36px;
  padding-inline: 12px;
  color: #ffffff;
  background: var(--marca);
  border: 1px solid var(--marca);
  border-radius: var(--radius);
  font-weight: 900;
}

.tms-register-button.secondary {
  color: var(--graphite);
  background: #ffffff;
  border-color: #cfd8e3;
}

.tms-modal-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(560px, calc(100vw - 24px));
  max-height: min(720px, calc(100vh - 24px));
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.tms-modal-card header,
.tms-modal-card footer {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
}

.tms-modal-card header {
  border-bottom: 1px solid var(--line);
}

.tms-modal-card footer {
  border-top: 1px solid var(--line);
}

.tms-modal-body {
  display: grid;
  gap: 12px;
  overflow: auto;
  padding: 16px;
}

.tms-modal-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.tms-modal-summary > div {
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #dce3eb;
  border-radius: var(--radius);
  font-weight: 900;
}

.tms-modal-reference {
  padding: 12px;
  color: var(--blue);
  background: #eef7fc;
  border: 1px solid #cde4f2;
  border-radius: var(--radius);
  font-weight: 800;
}

.dds-view {
  display: grid;
  gap: 12px;
}

.dds-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border-top: 3px solid var(--green);
}

.dds-header p:not(.eyebrow) {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.dds-view > .dds-calendar-panel {
  border-top: 3px solid var(--green);
}

.dds-header-actions {
  display: grid;
  grid-template-columns: repeat(2, auto) minmax(170px, 1fr);
  gap: 10px;
  align-items: end;
  min-width: min(520px, 42vw);
}

.dds-action-button {
  min-height: 42px;
  padding-inline: 12px;
  color: var(--graphite);
  background: #ffffff;
  border-color: #d7dee7;
  white-space: nowrap;
}

.dds-header-actions label,
.dds-selected-base-card label,
.dds-evidence-grid label {
  display: grid;
  gap: 6px;
}

.dds-header-actions select,
.dds-header-actions input,
.dds-selected-base-card select,
.dds-evidence-grid select,
.dds-evidence-grid input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid #cfd7e2;
  border-radius: var(--radius);
  font-weight: 800;
}

.dds-selected-base-card {
  display: grid;
  gap: 6px;
  margin: 14px 16px 0;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #dfe5ec;
  border-radius: var(--radius);
}

.dds-awaiting-base .dds-selected-base-card {
  background: #fff7ed;
  border-color: rgba(176, 111, 0, 0.28);
  box-shadow: inset 3px 0 0 var(--amber);
}

.dds-selected-base-card span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.dds-selected-base-card small {
  color: var(--muted);
  font-weight: 800;
}

.dds-evidence-grid input[type="file"] {
  min-height: 46px;
  padding: 7px;
  font-size: 0.84rem;
}

.dds-evidence-grid input[type="file"]::file-selector-button {
  min-height: 30px;
  margin-right: 8px;
  padding: 0 10px;
  color: var(--graphite);
  background: #edf1f5;
  border: 1px solid #ccd5df;
  border-radius: 6px;
  font-weight: 900;
}

.dds-metrics {
  display: grid;
  gap: 12px;
}

.legacy-dds-metrics[hidden] {
  display: none !important;
}

.dds-indicators {
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--green);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.dds-indicator-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 2px;
}

.dds-indicator-head small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.dds-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.dds-metric-card {
  display: grid;
  gap: 6px;
  min-height: 96px;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid #dfe5ec;
  border-radius: var(--radius);
}

.dds-metric-card small {
  color: var(--muted);
  font-weight: 700;
}

.dds-metric-card-wide {
  grid-column: span 2;
}

.dds-combined-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.dds-combined-metrics > div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.dds-combined-metrics > div + div {
  padding-left: 12px;
  border-left: 1px solid #dfe5ec;
}

.dds-base-performance-panel,
.dds-base-chart-panel,
.dds-participation-panel {
  display: grid;
  gap: 12px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #dfe5ec;
  border-radius: var(--radius);
}

.dds-base-performance-panel .dds-panel-head,
.dds-base-chart-panel .dds-panel-head,
.dds-participation-panel .dds-panel-head {
  padding: 0;
}

.dds-base-performance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.dds-base-performance-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid #dfe5ec;
  border-radius: var(--radius);
}

.dds-base-performance-card:nth-child(even) {
  background: var(--row-alt);
  box-shadow: var(--cell-soft-shadow);
}

.dds-base-performance-card header,
.dds-base-performance-card footer,
.dds-performance-line > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dds-base-performance-card header b {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 950;
  line-height: 1.2;
}

.dds-base-performance-card header small,
.dds-base-performance-card footer,
.dds-performance-line span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1.25;
}

.dds-base-performance-card header strong {
  color: var(--green);
  font-size: 1.35rem;
  line-height: 1;
}

.dds-performance-lines {
  display: grid;
  gap: 10px;
}

.dds-performance-line {
  display: grid;
  gap: 6px;
}

.dds-performance-line strong {
  color: var(--ink);
  font-size: 0.95rem;
}

.dds-performance-line i {
  display: block;
  height: 9px;
  overflow: hidden;
  background: #e8edf3;
  border-radius: 999px;
}

.dds-performance-line i span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #136f5b, #29a36a);
  border-radius: inherit;
}

.dds-performance-line.participation i span {
  background: linear-gradient(90deg, #0f5f8f, #3a94d6);
}

.dds-base-performance-card footer {
  flex-wrap: wrap;
  justify-content: flex-start;
  padding-top: 2px;
}

.dds-base-performance-card footer span {
  padding: 4px 8px;
  background: #ffffff;
  border: 1px solid #dfe5ec;
  border-radius: 999px;
}

.dds-base-bars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  align-items: end;
}

.dds-base-bar-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px;
  align-items: end;
  min-height: 160px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #dfe5ec;
  border-radius: var(--radius);
}

.dds-base-bar-card:nth-child(even) {
  background: var(--row-alt);
  box-shadow: var(--cell-soft-shadow);
}

.dds-vertical-bar {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: center;
  width: 42px;
  height: 118px;
  overflow: hidden;
  background: #e8edf3;
  border: 1px solid #d2dbe5;
  border-radius: 8px;
}

.dds-vertical-bar span {
  display: block;
  width: 100%;
  min-height: 4px;
  background: linear-gradient(180deg, #29a36a, #0f7f5f);
  border-radius: 8px 8px 0 0;
}

.dds-base-bar-text {
  display: grid;
  gap: 4px;
  align-content: end;
  min-width: 0;
}

.dds-base-bar-text b,
.dds-participation-row b {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 950;
  line-height: 1.2;
}

.dds-base-bar-text strong {
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1;
}

.dds-base-bar-text small,
.dds-participation-row small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1.25;
}

.dds-participation-rows {
  display: grid;
  gap: 8px;
}

.dds-participation-row {
  display: grid;
  grid-template-columns: minmax(190px, 0.75fr) minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #dfe5ec;
  border-radius: var(--radius);
}

.dds-participation-row:nth-child(even) {
  background: var(--row-alt);
  box-shadow: var(--cell-soft-shadow);
}

.dds-participation-row > div:first-child {
  display: grid;
  gap: 3px;
}

.dds-participation-meter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.dds-participation-meter span {
  display: block;
  height: 10px;
  overflow: hidden;
  background: #e8edf3;
  border-radius: 999px;
}

.dds-participation-meter i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #0f7f5f, #29a36a);
  border-radius: inherit;
}

.dds-participation-meter strong,
.dds-participation-row em {
  color: var(--ink);
  font-size: 0.84rem;
  font-style: normal;
  font-weight: 950;
  white-space: nowrap;
}

.dds-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(460px, 1.3fr) minmax(300px, 0.9fr);
  gap: 12px;
  align-items: start;
}

.dds-view:not(.dds-detail-open) .dds-layout {
  grid-template-columns: 1fr;
}

.dds-view:not(.dds-detail-open) .dds-topic-panel {
  display: none;
}

.dds-view.dds-detail-open .dds-metrics,
.dds-view.dds-detail-open .dds-calendar-panel,
.dds-view.dds-detail-open .dds-schedule-panel {
  display: none;
}

.dds-view.dds-detail-open .dds-layout {
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
}

.dds-view.dds-detail-open .dds-topic-panel {
  width: min(980px, 100%);
  border-top: 3px solid var(--green);
}

.dds-calendar-panel,
.dds-topic-panel,
.dds-attendance-panel,
.dds-schedule-panel {
  overflow: hidden;
}

.dds-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.dds-panel-head.compact {
  padding: 0 0 12px;
  border-bottom: 0;
}

.dds-schedule-head {
  align-items: end;
}

.dds-schedule-filter {
  display: grid;
  gap: 6px;
  min-width: min(280px, 38vw);
}

.dds-schedule-filter span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.dds-schedule-filter select {
  min-height: 38px;
  padding: 0 12px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid #cfd7e2;
  border-radius: var(--radius);
  font-weight: 850;
}

.dds-detail-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 12px 16px;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
}

.dds-back-button {
  min-height: 36px;
  padding-inline: 12px;
  color: var(--graphite);
  background: #ffffff;
  border-color: #d7dee7;
}

.dds-back-button svg {
  width: 16px;
  height: 16px;
}

.dds-calendar-weekdays,
.dds-calendar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.dds-calendar-weekdays {
  padding: 12px 14px 0;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.dds-calendar {
  padding: 10px 14px 14px;
}

.dds-day {
  display: grid;
  gap: 4px;
  min-height: 126px;
  padding: 8px;
  color: var(--graphite);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #dbe3ec;
  border-radius: var(--radius);
  box-shadow: 0 6px 14px rgba(20, 24, 28, 0.04);
  text-align: left;
  contain: layout paint style;
}

.dds-day span {
  font-size: 1rem;
  font-weight: 950;
}

.dds-day small {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
}

.dds-day-topics {
  display: grid;
  gap: 4px;
  margin-top: 2px;
}

.dds-day-topics em {
  display: grid;
  gap: 1px;
  min-width: 0;
  padding: 6px 7px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(207, 215, 226, 0.9);
  border-radius: 6px;
  cursor: pointer;
  font-style: normal;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease,
    background-color 0.16s ease;
}

.dds-day-topics em.empty {
  color: #334155;
  background: #e5ebf2;
  border-color: #c7d1de;
  box-shadow: inset 3px 0 0 #94a3b8;
}

.dds-day-topics em.dds-day-topic-planned {
  background: #eff6ff;
  border-color: rgba(29, 95, 134, 0.26);
  box-shadow: inset 3px 0 0 rgba(29, 95, 134, 0.48), 0 6px 14px rgba(29, 95, 134, 0.07);
}

.dds-day-topics em.dds-day-topic-overdue {
  background: #fff1f2;
  border-color: rgba(162, 15, 27, 0.28);
  box-shadow: inset 3px 0 0 rgba(162, 15, 27, 0.55), 0 6px 14px rgba(162, 15, 27, 0.08);
}

.dds-day-topics em.dds-day-topic:hover,
.dds-day-topics em.dds-day-topic:active {
  background: #fff;
  border-color: rgba(240, 132, 48, 0.55);
  box-shadow: 0 0 0 2px rgba(240, 132, 48, 0.1), 0 8px 16px rgba(20, 24, 28, 0.12);
  transform: translateY(-1px);
}

.dds-day-topics em.empty:hover,
.dds-day-topics em.empty:active {
  background: #dce4ee;
  border-color: #aebccc;
  box-shadow: inset 3px 0 0 #64748b, 0 7px 14px rgba(71, 85, 105, 0.13);
}

.dds-day-topics em.dds-day-topic-planned:hover,
.dds-day-topics em.dds-day-topic-planned:active {
  background: #f8fbff;
  border-color: rgba(29, 95, 134, 0.55);
  box-shadow: inset 3px 0 0 var(--blue), 0 0 0 2px rgba(29, 95, 134, 0.12), 0 8px 16px rgba(29, 95, 134, 0.14);
}

.dds-day-topics em.dds-day-topic-overdue:hover,
.dds-day-topics em.dds-day-topic-overdue:active {
  background: #fff8f8;
  border-color: rgba(162, 15, 27, 0.58);
  box-shadow: inset 3px 0 0 var(--red), 0 0 0 2px rgba(162, 15, 27, 0.12), 0 8px 16px rgba(162, 15, 27, 0.16);
}

.dds-day-topics em.dds-day-topic-done {
  color: var(--ink);
  background: #ecfdf5;
  border-color: rgba(0, 121, 85, 0.32);
  box-shadow: inset 3px 0 0 var(--green), 0 6px 14px rgba(0, 121, 85, 0.08);
}

.dds-day-topics em.dds-day-topic-done:hover,
.dds-day-topics em.dds-day-topic-done:active {
  background: #f7fffb;
  border-color: rgba(0, 121, 85, 0.58);
  box-shadow: inset 3px 0 0 var(--green), 0 0 0 2px rgba(0, 121, 85, 0.12), 0 8px 16px rgba(0, 121, 85, 0.16);
}

.dds-day-topics b,
.dds-day-topics i {
  color: #0f172a;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.2;
}

.dds-day-topics b {
  font-size: 0.7rem;
  font-weight: 950;
}

.dds-day-topics i {
  color: #0f172a;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
}

.dds-day:hover,
.dds-day.selected {
  border-color: #b9c5d3;
  box-shadow: 0 10px 22px rgba(20, 24, 28, 0.08);
}

.dds-day-done,
.dds-day-pending,
.dds-day-planned {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.dds-calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 14px 14px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.dds-calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dds-no-program-row td {
  color: var(--muted);
}

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.legend-dot.planned {
  background: var(--blue);
}

.legend-dot.done {
  background: var(--green);
}

.legend-dot.pending {
  background: var(--amber);
}

.dds-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 950;
  white-space: nowrap;
}

.dds-status-done {
  color: var(--green);
  background: var(--green-soft);
}

.dds-status-pending {
  color: var(--amber);
  background: var(--amber-soft);
}

.dds-status-planned {
  color: var(--blue);
  background: #eff6ff;
}

.dds-topic-card {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.dds-topic-card-empty {
  margin: 16px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius);
}

.dds-topic-card-empty .dds-topic-columns {
  display: none;
}

.dds-topic-card > p:not(.eyebrow) {
  margin: 0;
  color: var(--graphite);
  font-weight: 750;
  line-height: 1.5;
}

.dds-topic-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.dds-topic-columns > div {
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #dfe5ec;
  border-radius: var(--radius);
}

.dds-topic-card h4 {
  margin: 0 0 8px;
}

.dds-topic-card ol,
.dds-topic-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: var(--ink);
  font-weight: 750;
  line-height: 1.42;
}

.dds-evidence-card {
  margin: 0 16px 16px;
  padding: 14px;
  box-shadow: none;
}

.dds-evidence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.dds-evidence-grid label small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.25;
}

.dds-register-submit {
  justify-self: end;
  min-width: 180px;
  margin: 0 16px 16px;
}

.dds-attendance-panel {
  max-height: 760px;
}

.dds-topic-panel .dds-attendance-panel {
  margin: 0 16px 16px;
  max-height: none;
  box-shadow: none;
}

.dds-search-box {
  margin: 12px 14px;
}

.dds-attendance-list {
  display: grid;
  gap: 8px;
  max-height: 610px;
  overflow: auto;
  padding: 0 14px 14px;
}

.dds-topic-panel .dds-attendance-list {
  max-height: 360px;
}

.dds-attendee {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  background: #ffffff;
  border: 1px solid #dfe5ec;
  border-radius: var(--radius);
}

.dds-attendee:nth-child(even) {
  background: var(--row-alt);
  box-shadow: var(--cell-soft-shadow);
}

.dds-attendee input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.dds-attendee b,
.dds-attendee small {
  display: block;
}

.dds-attendee b {
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1.25;
}

.dds-attendee small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 850;
}

.dds-schedule-panel {
  border-top: 3px solid var(--blue);
}

.dds-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(3px);
}

.dds-modal-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(720px, 100%);
  max-height: calc(100vh - 36px);
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #d7dee7;
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.26);
}

.dds-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.dds-modal-head h3 {
  margin: 2px 0;
  color: var(--ink);
  font-size: 1.25rem;
}

.dds-modal-head small,
.dds-modal-help {
  color: var(--muted);
  font-weight: 800;
}

.dds-modal-body {
  display: grid;
  gap: 12px;
  min-height: 0;
  max-height: min(62vh, 620px);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 18px;
}

.dds-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.dds-modal-body label {
  display: grid;
  gap: 6px;
}

.dds-modal-body label span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.dds-template-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #dfe5ec;
  border-radius: var(--radius);
}

.dds-template-box > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.dds-template-box > div > span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.dds-template-box small {
  color: var(--graphite);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.35;
}

.dds-template-download {
  min-height: 38px;
  padding-inline: 12px;
  white-space: nowrap;
  text-decoration: none;
}

.dds-modal-body input,
.dds-modal-body select,
.dds-modal-body textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid #cfd7e2;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 800;
}

.dds-modal-body textarea {
  resize: vertical;
}

.dds-schedule-table {
  min-width: 0;
  table-layout: fixed;
  font-size: 0.88rem;
}

.dds-schedule-panel .table-wrap {
  overflow-x: visible;
}

.dds-schedule-table th,
.dds-schedule-table td {
  padding: 10px 9px;
}

.dds-schedule-table th:nth-child(1),
.dds-schedule-table td:nth-child(1) {
  width: 7%;
}

.dds-schedule-table th:nth-child(2),
.dds-schedule-table td:nth-child(2) {
  width: 10%;
}

.dds-schedule-table th:nth-child(3),
.dds-schedule-table td:nth-child(3) {
  width: 30%;
}

.dds-schedule-table th:nth-child(4),
.dds-schedule-table td:nth-child(4) {
  width: 15%;
}

.dds-schedule-table th:nth-child(5),
.dds-schedule-table td:nth-child(5) {
  width: 9%;
}

.dds-schedule-table th:nth-child(6),
.dds-schedule-table td:nth-child(6) {
  width: 10%;
}

.dds-schedule-table th:nth-child(7),
.dds-schedule-table td:nth-child(7) {
  width: 9%;
}

.dds-schedule-table th:nth-child(8),
.dds-schedule-table td:nth-child(8) {
  width: 10%;
}

.dds-schedule-table td {
  overflow-wrap: anywhere;
}

.dds-schedule-table .dds-topic-cell,
.dds-schedule-table .dds-speaker-cell {
  line-height: 1.28;
}

.dds-schedule-table .dds-status-pill {
  white-space: nowrap;
}

.sidebar {
  position: sticky;
  top: 112px;
  align-self: start;
  display: grid;
  gap: 16px;
}

.field-label {
  color: var(--graphite);
  font-size: 0.85rem;
  font-weight: 800;
}

.group-selector,
.subgroup-selector,
.checklist-selector {
  display: grid;
  gap: 10px;
}

select,
input,
textarea {
  width: 100%;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid #cfd6df;
  border-radius: var(--radius);
  outline: none;
}

select,
input {
  min-height: 42px;
  padding: 0 12px;
}

textarea {
  min-height: 72px;
  padding: 10px 12px;
  resize: vertical;
}

select:focus,
input:focus,
textarea:focus {
  border-color: var(--marca);
  box-shadow: 0 0 0 3px rgba(240, 132, 48, 0.13);
}

.native-select-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.search-select {
  position: relative;
  min-width: 0;
}

.search-select-input {
  padding-right: 34px;
}

.search-select::after {
  position: absolute;
  top: 17px;
  right: 14px;
  width: 8px;
  height: 8px;
  pointer-events: none;
  content: "";
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
}

.search-select.locked::after {
  display: none;
}

.search-select.locked .search-select-input {
  cursor: default;
  color: var(--graphite);
  background: #f3f6f9;
  border-color: #d8e0e8;
}

.search-select-list {
  position: absolute;
  right: 0;
  left: 0;
  z-index: 40;
  max-height: min(280px, 52vh);
  margin-top: 5px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: #ffffff;
  border: 1px solid #cfd6df;
  border-radius: var(--radius);
  box-shadow: 0 18px 36px rgba(20, 24, 28, 0.16);
}

.search-select-option {
  justify-content: flex-start;
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  color: var(--ink);
  background: #ffffff;
  border: 0;
  border-radius: 0;
  text-align: left;
  line-height: 1.25;
}

.search-select-option:hover,
.search-select-option.active,
.search-select-option[aria-selected="true"] {
  color: var(--marca-escura);
  background: var(--marca-suave);
}

.search-select-empty {
  padding: 12px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.mobile-search-picker {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: grid;
  align-items: end;
  padding: 16px 12px max(12px, env(safe-area-inset-bottom));
  background: rgba(15, 23, 42, 0.42);
}

.mobile-search-picker[hidden] {
  display: none !important;
}

.mobile-search-card {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  width: min(100%, 620px);
  max-height: min(78vh, 720px);
  max-height: min(78dvh, 720px);
  margin-inline: auto;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #d6dee7;
  border-radius: 22px 22px 14px 14px;
  box-shadow: 0 26px 58px rgba(15, 23, 42, 0.28);
}

.mobile-search-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px 12px;
  border-bottom: 1px solid #e5ebf1;
}

.mobile-search-head strong {
  display: block;
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.2;
}

.mobile-search-kicker {
  display: block;
  margin-bottom: 3px;
  color: var(--marca-escura);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.mobile-search-close {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  color: var(--ink);
  background: #f5f7fa;
  border: 1px solid #d9e1ea;
  border-radius: 999px;
}

.mobile-search-query {
  position: relative;
  padding: 12px 18px;
  border-bottom: 1px solid #e5ebf1;
}

.mobile-search-query svg {
  position: absolute;
  top: 50%;
  left: 32px;
  width: 18px;
  height: 18px;
  color: var(--muted);
  transform: translateY(-50%);
}

.mobile-search-query input {
  width: 100%;
  min-height: 48px;
  padding-left: 42px;
  font-size: 16px;
}

.mobile-search-list {
  min-height: 120px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.mobile-search-option {
  justify-content: flex-start;
  width: 100%;
  min-height: 52px;
  padding: 13px 18px;
  color: var(--ink);
  background: #ffffff;
  border: 0;
  border-bottom: 1px solid #eef2f6;
  border-radius: 0;
  text-align: left;
  line-height: 1.25;
}

.mobile-search-option[aria-selected="true"] {
  color: var(--marca-escura);
  background: var(--marca-suave);
}

.mobile-search-empty {
  padding: 22px 18px;
  color: var(--muted);
  font-weight: 900;
}

body.mobile-search-open {
  overflow: hidden;
}

.checklist-tabs {
  display: grid;
  gap: 8px;
}

.group-tabs {
  display: grid;
  gap: 9px;
}

.subgroup-tabs {
  display: grid;
  gap: 8px;
}

.group-card {
  justify-content: space-between;
  width: 100%;
  min-height: 72px;
  padding: 13px;
  color: var(--graphite);
  background: #ffffff;
  border-color: var(--line);
  text-align: left;
}

.group-card:hover {
  border-color: #b9c2cc;
  box-shadow: 0 10px 24px rgba(20, 24, 28, 0.08);
}

.group-card.active {
  color: #ffffff;
  background: var(--marca);
  border-color: var(--marca);
}

.group-card span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.group-card b {
  font-size: 1rem;
  line-height: 1.2;
}

.group-card small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.2;
}

.group-card.active small {
  color: rgba(255, 255, 255, 0.78);
}

.group-card em {
  flex: 0 0 auto;
  padding: 4px 9px;
  color: var(--marca-escura);
  background: var(--marca-suave);
  border-radius: 999px;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 950;
}

.group-card.active em {
  color: var(--marca-escura);
  background: #ffffff;
}

.subgroup-card {
  justify-content: space-between;
  width: 100%;
  min-height: 58px;
  padding: 11px 12px;
  color: var(--graphite);
  background: #ffffff;
  border-color: var(--line);
  text-align: left;
}

.subgroup-card:hover {
  border-color: #b9c2cc;
  box-shadow: 0 8px 20px rgba(20, 24, 28, 0.07);
}

.subgroup-card.active {
  color: #ffffff;
  background: var(--graphite);
  border-color: var(--graphite);
}

.subgroup-card span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.subgroup-card b {
  font-size: 0.92rem;
  line-height: 1.2;
}

.subgroup-card small {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  line-height: 1.2;
}

.subgroup-card.active small {
  color: rgba(255, 255, 255, 0.78);
}

.subgroup-card em {
  flex: 0 0 auto;
  padding: 4px 8px;
  color: var(--graphite);
  background: #edf2f7;
  border-radius: 999px;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 950;
}

.subgroup-card.active em {
  color: var(--graphite);
  background: #ffffff;
}

.checklist-empty-card {
  padding: 12px;
  color: var(--muted);
  background: #f8fafc;
  border: 1px dashed #c8d1dc;
  border-radius: var(--radius);
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1.35;
}

.checklist-tab-group {
  display: grid;
  gap: 7px;
  padding: 8px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.checklist-tab-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 4px 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.checklist-tab-group-title small {
  flex: 0 0 auto;
  color: var(--marca-escura);
  font-size: 0.68rem;
}

.checklist-tab {
  justify-content: space-between;
  width: 100%;
  padding: 10px 12px;
  color: var(--graphite);
  background: #ffffff;
  border-color: var(--line);
  text-align: left;
}

.checklist-tab span:first-child {
  min-width: 0;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.checklist-tab:hover {
  border-color: #b9c2cc;
  box-shadow: 0 8px 20px rgba(20, 24, 28, 0.06);
}

.checklist-tab.active {
  color: #ffffff;
  background: var(--marca);
  border-color: var(--marca);
}

.checklist-tab .count {
  flex: 0 0 auto;
  min-width: 34px;
  padding: 3px 7px;
  border-radius: 999px;
  color: var(--graphite);
  background: #edf1f5;
  text-align: center;
  font-size: 0.78rem;
}

.checklist-tab.active .count {
  color: var(--marca-escura);
  background: #ffffff;
}

.summary-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.summary-panel > div {
  display: grid;
  align-content: center;
  min-height: 92px;
  padding: 14px;
  background: #ffffff;
}

.metric-label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.summary-panel strong {
  color: var(--graphite);
  font-size: 1.55rem;
  line-height: 1;
}

.summary-panel small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.metric-ratio {
  display: flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}

.content {
  display: grid;
  align-content: start;
  gap: 18px;
  min-width: 0;
}

.form-band,
.toolbar,
.checklist-header,
.type-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.form-band {
  display: grid;
  align-self: start;
  align-content: start;
  grid-auto-rows: max-content;
  gap: 16px;
  padding: 18px;
  min-height: 0;
  scroll-margin-top: 16px;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 0;
}

.form-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.35;
}

.form-actions .primary-button {
  flex: 0 0 auto;
  min-width: 150px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  align-items: start;
  gap: 14px 16px;
}

.form-grid label,
.notes-field {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
}

.form-grid span,
.notes-field span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.field-help {
  min-height: 1.2em;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.25;
}

.form-band .search-select,
.form-grid select,
.form-grid input {
  min-height: 44px;
}

.notes-field textarea {
  min-height: 78px;
  resize: vertical;
}

.toolbar {
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px;
}

.search-box {
  position: relative;
  flex: 1 1 260px;
}

.search-box svg {
  position: absolute;
  top: 50%;
  left: 12px;
  color: var(--muted);
  transform: translateY(-50%);
}

.search-box input {
  padding-left: 40px;
}

.segmented {
  flex: 0 1 auto;
  gap: 4px;
  padding: 4px;
  background: #edf1f5;
  border-radius: var(--radius);
}

.segment {
  min-height: 34px;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
}

.segment.active {
  color: #ffffff;
  background: var(--graphite);
}

.checklist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
}

.progress-wrap {
  display: grid;
  gap: 8px;
  width: min(260px, 40%);
  min-width: 180px;
  color: var(--graphite);
  font-weight: 900;
  text-align: right;
}

.progress-track {
  overflow: hidden;
  height: 10px;
  background: #e5e9ee;
  border-radius: 999px;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: var(--marca);
  border-radius: inherit;
  transition: width 180ms ease;
}

.checklist-photo-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid #d8e0e8;
  border-left: 5px solid var(--marca);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.checklist-photo-copy {
  display: grid;
  gap: 5px;
}

.checklist-photo-copy h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.2;
}

.checklist-photo-copy p {
  max-width: 840px;
  margin: 0;
  color: var(--graphite);
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.45;
}

.checklist-photo-copy small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.checklist-photo-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
  min-width: 180px;
}

.checklist-photo-button {
  min-height: 42px;
  padding-inline: 14px;
  color: #ffffff;
  background: var(--marca);
  border-color: var(--marca);
}

.checklist-photo-button.has-photo {
  color: var(--green);
  background: #effaf6;
  border-color: rgba(18, 128, 96, 0.28);
}

.sections {
  display: grid;
  gap: 18px;
}

.motosserra-authorization-panel {
  overflow: hidden;
  background: #fff9ed;
  border: 1px solid rgba(165, 101, 0, 0.28);
  border-left: 4px solid var(--amber);
  border-radius: var(--radius);
}

.motosserra-authorization-panel.active {
  background: #eef8f4;
  border-color: rgba(19, 121, 91, 0.28);
  border-left-color: var(--green);
}

.motosserra-authorization-panel.denied {
  background: #f8fafc;
  border-color: #d8e0e8;
  border-left-color: var(--muted);
}

.motosserra-authorization-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
}

.motosserra-authorization-text {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.motosserra-authorization-text strong {
  color: var(--ink);
  font-size: 0.98rem;
}

.motosserra-authorization-text small,
.motosserra-authorization-text em {
  color: var(--muted);
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1.35;
}

.motosserra-authorization-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.motosserra-authorization-options label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  color: var(--graphite);
  background: #ffffff;
  border: 1px solid #cfd7e2;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 900;
}

.motosserra-authorization-options label:has(input:checked) {
  color: #ffffff;
  background: var(--marca);
  border-color: var(--marca);
}

.motosserra-authorization-options input {
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 0;
  accent-color: var(--marca);
}

.motosserra-authorization-options label:has(input:checked) input {
  accent-color: #ffffff;
}

.motosserra-authorization-options span {
  display: grid;
  min-width: 0;
}

.motosserra-authorization-blocker {
  display: grid;
  gap: 6px;
  padding: 18px 20px;
  color: var(--muted);
  background: #f7f9fb;
  border: 1px dashed #cfd7e2;
  border-radius: var(--radius);
}

.motosserra-authorization-blocker strong {
  color: var(--graphite);
  font-size: 1rem;
}

.motosserra-authorization-blocker span {
  font-size: 0.88rem;
  font-weight: 850;
  line-height: 1.45;
}

.type-section {
  overflow: hidden;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
  padding: 16px 18px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.section-head small {
  color: var(--muted);
  font-weight: 800;
}

.items-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.items-table th {
  height: 42px;
  padding: 0 14px;
  color: var(--muted);
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  font-size: 0.76rem;
  text-align: left;
  text-transform: uppercase;
}

.items-table th:nth-child(1) {
  width: 50%;
}

.items-table th:nth-child(2) {
  width: 11%;
  text-align: center;
}

.items-table th:nth-child(3) {
  width: 21%;
  text-align: center;
}

.items-table th:nth-child(4) {
  width: 18%;
}

.items-table-with-photo th:nth-child(1) {
  width: 43%;
}

.items-table-with-photo th:nth-child(2),
.items-table-with-photo th:nth-child(3) {
  width: 11%;
}

.items-table-with-photo th:nth-child(4) {
  width: 15%;
}

.items-table-with-photo th:nth-child(5) {
  width: 20%;
}

.item-row td {
  padding: 12px 14px;
  border-bottom: 1px solid #edf0f4;
  vertical-align: middle;
}

.item-row:nth-child(even) {
  background: var(--row-alt);
}

.item-row:nth-child(even) td {
  box-shadow: var(--cell-soft-shadow);
}

.item-row:nth-child(even) td:first-child {
  box-shadow: var(--row-soft-shadow);
}

.item-row:last-child td {
  border-bottom: 0;
}

.item-description {
  color: var(--ink);
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.serial-field {
  display: grid;
  gap: 6px;
  max-width: 360px;
  margin-top: 10px;
}

.serial-field span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.serial-input {
  min-height: 38px;
  font-size: 0.9rem;
  font-weight: 900;
  text-transform: uppercase;
}

.reference-cell {
  color: var(--graphite);
  font-size: 1.05rem;
  font-weight: 900;
  text-align: center;
}

.quantity-input {
  text-align: center;
  font-weight: 900;
}

.quantity-control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.quantity-control .quantity-input {
  flex: 0 1 92px;
  min-width: 72px;
  max-width: 96px;
}

.replacement-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: auto;
  min-width: 104px;
  min-height: 42px;
  padding: 0 12px;
  color: var(--marca-escura);
  background: var(--marca-suave);
  border: 1px solid rgba(240, 132, 48, 0.22);
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 950;
  white-space: nowrap;
}

.replacement-button:hover,
.replacement-button.active {
  color: #ffffff;
  background: var(--marca);
  border-color: var(--marca);
}

.replacement-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.replacement-button[hidden] {
  display: none;
}

.replacement-button svg {
  width: 16px;
  height: 16px;
}

.replacement-button span {
  display: inline;
}

.photo-cell {
  display: grid;
  gap: 5px;
  justify-items: start;
}

.photo-capture-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 11px;
  color: var(--graphite);
  background: #f8fafc;
  border: 1px solid #cfd8e3;
  border-radius: var(--radius);
  font-size: 0.78rem;
  font-weight: 950;
  cursor: pointer;
}

.photo-capture-button.has-photo {
  color: var(--green);
  background: #effaf6;
  border-color: rgba(18, 128, 96, 0.28);
}

.photo-capture-button svg {
  width: 16px;
  height: 16px;
}

.photo-help,
.photo-status {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1.2;
}

.photo-status {
  padding: 3px 7px;
  background: #eef3f7;
  border-radius: 999px;
}

.photo-status-empty {
  color: var(--red-dark);
  background: #fff5f6;
}

.photo-status-synced,
.photo-status-draft {
  color: var(--green);
  background: #effaf6;
}

.photo-status-error {
  color: var(--red);
  background: #fff5f6;
}

.field-attention {
  border-color: var(--red) !important;
  box-shadow: 0 0 0 4px rgba(162, 15, 27, 0.2) !important;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.status-cell {
  display: grid;
  justify-items: center;
  gap: 6px;
}

.status-empty {
  color: var(--muted);
  background: #edf1f5;
}

.status-ok {
  color: var(--green);
  background: var(--green-soft);
}

.status-pending {
  color: var(--amber);
  background: var(--amber-soft);
}

.status-extra {
  color: var(--blue);
  background: #e8f3f8;
}

.status-replace {
  color: var(--red);
  background: #fff1f2;
}

.item-row.pending {
  background: #fffaf0;
}

.item-row.pending td {
  background: #fffaf0;
}

.item-row.pending:nth-child(even) td:first-child {
  box-shadow: inset 4px 0 0 rgba(165, 101, 0, 0.14), var(--cell-soft-shadow);
}

.item-row.ok {
  background: #fbfffd;
}

.item-row.ok td {
  background: #fbfffd;
}

.item-row.ok:nth-child(even) td:first-child {
  box-shadow: inset 4px 0 0 rgba(19, 121, 91, 0.12), var(--cell-soft-shadow);
}

.empty-state {
  margin: 0;
  padding: 28px;
  color: var(--muted);
  background: #ffffff;
  border: 1px dashed #c2cad3;
  border-radius: var(--radius);
  text-align: center;
  font-weight: 800;
}

.dashboard .empty-state {
  padding: 18px;
}

.dashboard {
  display: grid;
  gap: 12px;
  width: 100%;
  margin: 0 auto;
  padding: 14px clamp(10px, 1.5vw, 24px) 36px;
}

.dashboard > * {
  width: min(100%, var(--module-shell-max));
  margin-inline: 0 auto;
}

.dashboard-header,
.dashboard-panel,
.dash-metric {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
}

.dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.dashboard-filter-control {
  display: grid;
  gap: 5px;
  min-width: 220px;
  margin-left: auto;
}

.dashboard-filter-control label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-filter-control select {
  min-height: 38px;
  padding: 0 38px 0 12px;
  color: var(--graphite);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 900;
}

.dashboard-workspace {
  display: grid;
  grid-template-columns: minmax(250px, 300px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.dashboard-sidebar {
  position: sticky;
  top: 88px;
  z-index: 7;
  display: grid;
  gap: 12px;
  padding: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 16px 38px rgba(16, 24, 40, 0.1);
}

.dashboard-sidebar-head {
  display: grid;
  gap: 2px;
  padding: 4px 4px 8px;
  border-bottom: 1px solid #e8edf3;
}

.dashboard-sidebar-head span {
  color: var(--marca-escura);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.dashboard-sidebar-head strong {
  color: var(--graphite);
  font-size: 0.94rem;
  line-height: 1.2;
}

.dashboard-nav {
  display: grid;
  gap: 8px;
}

.dashboard-nav button {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 68px;
  padding: 12px;
  color: var(--graphite);
  background: #ffffff;
  border: 1px solid #dce3ec;
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease,
    background-color 0.16s ease;
}

.dashboard-nav button:hover,
.dashboard-nav button.active {
  border-color: rgba(240, 132, 48, 0.38);
  box-shadow: inset 4px 0 0 var(--marca), 0 12px 24px rgba(16, 24, 40, 0.1);
  transform: translateY(-1px);
}

.dashboard-nav button.active {
  background: var(--marca-suave);
}

.dashboard-nav svg {
  width: 18px;
  height: 18px;
  color: var(--marca-escura);
}

.dashboard-nav-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.dashboard-nav-text b {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 950;
}

.dashboard-nav-text small,
.dashboard-sidebar-note {
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 850;
  line-height: 1.35;
}

.dashboard-nav button > strong {
  min-width: 54px;
  padding: 4px 8px;
  color: var(--graphite);
  background: #eef3f7;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 950;
  text-align: center;
  white-space: nowrap;
}

.dashboard-nav button.active > strong {
  color: var(--marca-escura);
  background: var(--marca-suave);
}

.dashboard-sidebar-note {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  padding: 10px;
  background: #f3f6fa;
  border: 1px solid #dde5ee;
  border-radius: 10px;
}

.dashboard-sidebar-note svg {
  width: 16px;
  height: 16px;
  color: var(--blue);
}

.dashboard-content {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.dashboard-indicators-section {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.dashboard-indicator-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid var(--line);
  border-top: 3px solid var(--blue);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.dashboard-indicator-toolbar h3 {
  margin: 0;
  color: var(--graphite);
  font-size: 1.1rem;
}

.dashboard-indicator-toolbar small {
  color: var(--muted);
  font-weight: 900;
}

.dashboard-period-control {
  display: grid;
  gap: 5px;
  min-width: 220px;
}

.dashboard-period-control span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.dashboard-period-control select {
  min-height: 40px;
  padding: 0 38px 0 12px;
  color: var(--graphite);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 900;
}

.dashboard-center-section.active {
  animation: dashboard-section-enter 110ms ease-out both;
}

.dashboard-center-section[hidden] {
  display: none !important;
}

@keyframes dashboard-section-enter {
  from {
    opacity: 0.96;
    transform: translateY(3px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-view:not([hidden]),
  .dashboard-center-section.active {
    animation: none;
  }

  .dashboard-nav button,
  .dds-day-topics em,
  .tms-day {
    transition: none;
  }
}

.file-button {
  position: relative;
  min-height: 42px;
  padding: 0 14px;
  color: #ffffff;
  background: var(--graphite);
  overflow: hidden;
}

.file-button:hover {
  background: #111315;
}

.file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
}

.dash-metric {
  min-height: 88px;
  padding: 12px;
}

.dash-metric span {
  display: block;
  min-height: 28px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1.25;
}

.dash-metric strong {
  display: block;
  margin-top: 6px;
  color: var(--graphite);
  font-size: 1.75rem;
  line-height: 1;
}

.post-inspection-panel .panel-head {
  align-items: stretch;
}

.post-inspection-panel .panel-head > div {
  display: grid;
  gap: 4px;
}

.post-filter {
  display: grid;
  grid-template-columns: minmax(240px, 380px) auto;
  gap: 6px 8px;
  align-items: center;
  justify-content: end;
  min-width: min(520px, 100%);
}

.post-search-box {
  position: relative;
  display: block;
}

.post-search-box svg {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 18px;
  height: 18px;
  color: var(--muted);
  transform: translateY(-50%);
}

.post-search-box input {
  width: 100%;
  min-height: 40px;
  padding: 0 12px 0 40px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid #ccd5df;
  border-radius: var(--radius);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
}

.post-search-box input:focus {
  outline: 2px solid rgba(240, 132, 48, 0.16);
  border-color: rgba(240, 132, 48, 0.42);
}

.post-filter-clear {
  min-height: 40px;
  padding: 0 12px;
  color: var(--marca-escura);
  background: #fff8f9;
  border: 1px solid rgba(240, 132, 48, 0.22);
  border-radius: var(--radius);
  font-size: 0.78rem;
  font-weight: 950;
  cursor: pointer;
}

.post-filter-clear:hover {
  background: var(--marca-suave);
}

.post-filter small {
  grid-column: 1 / -1;
  justify-self: start;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
}

.warehouse-mobile-panel {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--amber);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.warehouse-mobile-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.warehouse-mobile-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.warehouse-mobile-head > strong {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  color: var(--marca-escura);
  background: var(--marca-suave);
  border: 1px solid rgba(240, 132, 48, 0.18);
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 950;
  white-space: nowrap;
}

.warehouse-mobile-filters {
  display: grid;
  grid-template-columns: minmax(150px, 0.9fr) minmax(130px, 0.7fr) minmax(150px, 0.8fr) minmax(200px, 1.2fr) auto auto;
  gap: 10px;
  align-items: end;
  padding: 14px 16px;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
}

.warehouse-search-button {
  white-space: nowrap;
}

.warehouse-search-placeholder {
  margin: 18px 16px;
}

.dashboard-search-toolbar {
  display: grid;
  grid-template-columns: minmax(140px, 0.7fr) minmax(200px, 1.1fr) minmax(170px, 0.9fr) minmax(220px, 1.3fr) auto auto;
  gap: 10px;
  align-items: end;
  padding: 14px 16px;
  margin: 0 0 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.dashboard-search-toolbar label {
  display: grid;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}

.dashboard-search-toolbar select,
.dashboard-search-toolbar input {
  border: 1px solid #d5dee9;
  border-radius: 8px;
  padding: 9px 10px;
  font: inherit;
  background: #fff;
  min-width: 0;
}

.dashboard-search-toolbar .primary-button,
.dashboard-search-toolbar .ghost-button {
  white-space: nowrap;
}

.dashboard-search-placeholder {
  margin: 14px 2px;
}

.dashboard-pagination-row td {
  background: #f8fafc;
  padding: 6px 10px;
}

.dashboard-pagination {
  margin: 8px 0;
}

@media (max-width: 900px) {
  .dashboard-search-toolbar {
    grid-template-columns: 1fr;
  }
}

.warehouse-mobile-filters label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 950;
  text-transform: uppercase;
}

.warehouse-mobile-filters select,
.warehouse-mobile-filters input {
  width: 100%;
  min-height: 42px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid #ccd5df;
  border-radius: var(--radius);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 850;
  text-transform: none;
}

.warehouse-mobile-filters select {
  padding: 0 12px;
}

.warehouse-mobile-search div {
  position: relative;
}

.warehouse-mobile-search svg {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 18px;
  height: 18px;
  color: var(--muted);
  transform: translateY(-50%);
}

.warehouse-mobile-search input {
  padding: 0 12px 0 40px;
}

.warehouse-search-clear {
  min-height: 42px;
  padding: 0 12px;
  color: var(--marca-escura);
  background: #fff8f9;
  border-color: rgba(240, 132, 48, 0.22);
}

.warehouse-mobile-filters > small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.warehouse-mobile-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.warehouse-mobile-kpis div {
  display: grid;
  gap: 4px;
  min-height: 74px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e0e7ef;
  border-radius: var(--radius);
}

.warehouse-mobile-kpis span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 950;
  text-transform: uppercase;
}

.warehouse-mobile-kpis strong {
  color: var(--graphite);
  font-size: 1.5rem;
  line-height: 1;
}

.warehouse-triage-sections {
  display: grid;
  gap: 12px;
  padding: 14px 16px 16px;
  background: #f2f5f8;
}

.warehouse-section,
.warehouse-group-card {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #ccd5df;
  border-radius: var(--radius);
}

.warehouse-section-teams {
  border-left: 5px solid var(--blue);
}

.warehouse-section-people {
  border-left: 5px solid var(--green);
}

.warehouse-section-purchase-balance {
  border-left: 5px solid var(--amber);
}

.warehouse-section-purchase-balance > summary {
  background: #fffaf0;
}

.warehouse-access-notice {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  background: #f7fbff;
  border: 1px solid #cfe0ef;
  border-left: 5px solid var(--blue);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.warehouse-access-notice strong {
  color: var(--blue);
  font-size: 0.84rem;
  text-transform: uppercase;
}

.warehouse-status-section {
  border-left-width: 5px;
}

.warehouse-status-pending {
  border-left-color: var(--red);
}

.warehouse-status-pending > summary {
  background: #fff7f8;
}

.warehouse-status-purchase {
  border-left-color: var(--amber);
}

.warehouse-status-purchase > summary {
  background: #fffaf0;
}

.warehouse-status-done {
  border-left-color: var(--green);
}

.warehouse-status-done > summary {
  background: #f3fbf7;
}

.warehouse-status-content {
  gap: 12px;
  background: #f6f8fb;
}

/* Layout plano (sem sanfona): cabecalho fixo + janela de resultados com rolagem propria */
.warehouse-flat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.warehouse-status-pending .warehouse-flat-head {
  background: #fff7f8;
}

.warehouse-status-purchase .warehouse-flat-head {
  background: #fffaf0;
}

.warehouse-status-done .warehouse-flat-head {
  background: #f3fbf7;
}

.warehouse-flat-content {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  background: #f6f8fb;
}

/* ===== Movimentacoes de Estoque ===== */
.stock-movement-shell {
  display: grid;
  gap: 12px;
}

/* Dentro do painel padrao do modulo: os blocos ficam encostados na casca,
   sem card duplo, igual as outras ferramentas. */
.stock-movement-panel {
  display: grid;
  gap: 12px;
}

.stock-movement-panel .stock-filter-bar,
.planning-filter-bar {
  padding: 0 0 12px;
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

.stock-movement-panel .stock-balance-block,
.stock-movement-panel .stock-chart-block {
  border-radius: 10px;
}

.stock-filter-bar {
  display: grid;
  grid-template-columns: minmax(150px, 0.9fr) minmax(190px, 1.1fr) minmax(190px, 1.1fr) minmax(130px, 0.7fr) minmax(130px, 0.7fr) auto auto;
  gap: 10px;
  align-items: end;
  padding: 14px 16px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  position: relative;
  z-index: 20;
}

.stock-filter-bar > label,
.planning-filter-bar > label {
  display: grid;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.stock-filter-bar select,
.stock-filter-bar input,
.planning-filter-bar select,
.planning-filter-bar input {
  border: 1px solid #d5dee9;
  border-radius: 8px;
  padding: 9px 10px;
  font: inherit;
  background: #fff;
  min-width: 0;
}

/* Menus suspensos de multipla escolha */
.stock-menu {
  position: relative;
  display: grid;
  gap: 6px;
  min-width: 0;
}

.stock-menu-label {
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.stock-menu-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 9px 11px;
  background: #fff;
  border: 1px solid #d5dee9;
  border-radius: 8px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  color: #171a1d;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.stock-menu-button:hover {
  border-color: #b7c4d4;
  background: #fbfcfe;
}

.stock-menu-button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stock-menu-button svg {
  width: 15px;
  height: 15px;
  color: #64748b;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

/* Sem halo/sombra em volta da caixa: so a borda muda de cor. */
.stock-menu.open .stock-menu-button {
  border-color: var(--marca);
  box-shadow: none;
  background: #fff;
}

.stock-menu-button:focus,
.stock-menu-button:focus-visible {
  outline: none;
  box-shadow: none;
  border-color: var(--marca);
}

.stock-menu.open .stock-menu-button svg {
  transform: rotate(180deg);
}

.stock-menu-panel {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  display: flex;
  flex-direction: column;
  min-width: 296px;
  max-width: 400px;
  max-height: 380px;
  overflow: hidden;
  padding: 10px 10px 0;
  background: #fff;
  border: 1px solid #dbe3ec;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(20, 24, 28, 0.1);
}

.stock-menu-scroll {
  overflow-y: auto;
  padding-right: 4px;
  margin-right: -4px;
}

.stock-menu-group + .stock-menu-group {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #eef2f6;
}

.stock-menu-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 2px 4px;
  background: none;
  border: none;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 900;
  color: #171a1d;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.stock-menu-group-head em {
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--marca-escura);
  text-transform: none;
}

.stock-menu-group-hint {
  display: block;
  padding: 0 4px 6px;
  color: var(--muted);
  font-size: 0.72rem;
}

.stock-menu-item {
  text-transform: none;
  letter-spacing: normal;
  font-weight: 600;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
}

.stock-menu-item + .stock-menu-item {
  margin-top: 4px;
}

.stock-menu-item:hover {
  background: #f6f8fb;
}

.stock-menu-item.checked {
  background: var(--marca-suave);
  border-color: var(--marca-borda);
}

.stock-menu-item input {
  margin-top: 2px;
  width: 14px;
  height: 14px;
  accent-color: #b3261e;
  cursor: pointer;
}

.stock-menu-item b {
  display: block;
  font-size: 0.8rem;
  color: #171a1d;
}

.stock-menu-item small {
  color: var(--muted);
  font-size: 0.72rem;
}

.stock-menu-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 10px 0 12px;
  border-top: 1px solid #eef2f6;
  background: #fff;
  position: sticky;
  bottom: 0;
}

.stock-menu-actions .ghost-button,
.stock-menu-actions .primary-button {
  white-space: nowrap;
  line-height: 1.2;
  min-height: 32px;
}

.primary-button.compact,
.ghost-button.compact {
  padding: 5px 11px;
  font-size: 0.76rem;
  min-height: 0;
}

.stock-dirty-hint {
  grid-column: 1 / -1;
  margin-top: -2px;
  color: #b45309;
  font-size: 0.74rem;
  font-weight: 800;
}

.stock-filter-date {
  display: grid;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.stock-section-note {
  display: block;
  margin-top: 2px;
  font-style: normal;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--muted);
}

.stock-group-row {
  cursor: pointer;
}

.stock-group-row:hover td {
  background: #f4f7fb;
}

.stock-group-row.selected td {
  background: var(--marca-suave);
  box-shadow: inset 0 0 0 1px var(--marca-borda);
}

.stock-group-row.selected td:first-child {
  box-shadow: inset 3px 0 0 0 var(--marca), inset 0 0 0 1px var(--marca-borda);
}

.stock-detail-table td.strong,
.stock-detail-table tfoot td {
  font-weight: 900;
}

.stock-detail-table tfoot td {
  background: #f8fafc;
  border-top: 2px solid var(--line);
}

.stock-detail-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-style: normal;
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--marca-escura);
}

.stock-period-bar {
  display: flex;
  justify-content: flex-end;
  margin: 0 14px 10px;
}

.stock-no-obra {
  color: #94a3b8;
  font-weight: 800;
}

.stock-detail-table td.centered,
.stock-detail-table th.centered {
  text-align: center;
}

.stock-detail-table td.centered .stock-cell-note {
  text-align: center;
}

/* Tabelas de movimentacao: cabecalho e dados centralizados na horizontal e na
   vertical. A unica excecao e a coluna Material (texto longo, fica a esquerda). */
.stock-detail-table thead th,
.stock-detail-table tbody td,
.stock-detail-table tfoot td {
  text-align: center;
  vertical-align: middle;
}

.stock-detail-table thead th.numeric,
.stock-detail-table tbody td.numeric,
.stock-detail-table tfoot td.numeric {
  text-align: center;
}

.stock-detail-table .stock-cell-note {
  text-align: center;
}

.stock-detail-table th.stock-detail-material-head,
.stock-detail-table td.stock-detail-material {
  text-align: left;
}

.stock-detail-table td.stock-detail-material .stock-cell-note {
  text-align: left;
}

.stock-balance-slot.policy.warn small {
  color: #b06a00;
  font-weight: 800;
}

.stock-table-empty {
  padding: 18px 14px;
  color: var(--muted);
  font-weight: 700;
}

/* Linha de filtros digitados dentro do cabecalho da tabela. */
.stock-detail-table thead tr.stock-table-filter-row th {
  padding: 3px 5px;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
}

.stock-table-filter-input {
  width: 100%;
  min-width: 54px;
  padding: 3px 5px;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  color: #171a1d;
  text-align: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: none;
}

.stock-table-filter-input::placeholder {
  color: #a3adba;
  font-weight: 600;
}

.stock-table-filter-input:focus {
  border-color: var(--marca);
  box-shadow: none;
}

/* Selecao da obra precisa vencer o zebrado das linhas pares. */
.dashboard-table tbody tr.stock-group-row.selected td,
.dashboard-table tbody tr.stock-group-row.selected:nth-child(even) td,
.dashboard-table tbody tr.stock-group-row.selected:hover td {
  background: var(--marca-suave-2) !important;
  box-shadow: inset 0 -1px 0 0 var(--marca-borda), inset 0 1px 0 0 var(--marca-borda);
}

.dashboard-table tbody tr.stock-group-row.selected td:first-child {
  box-shadow: inset 4px 0 0 0 var(--marca), inset 0 -1px 0 0 var(--marca-borda), inset 0 1px 0 0 var(--marca-borda);
}

.dashboard-table tbody tr.stock-group-row.selected td:last-child {
  box-shadow: inset -1px 0 0 0 var(--marca-borda), inset 0 -1px 0 0 var(--marca-borda), inset 0 1px 0 0 var(--marca-borda);
}

.stock-type-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.stock-type-bar.unavailable {
  opacity: 0.65;
}

.stock-type-title {
  font-size: 0.72rem;
  font-weight: 900;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.stock-type-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.stock-type-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid #d5dee9;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  color: #64748b;
  background: #fff;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
}

.stock-type-chip input {
  width: 13px;
  height: 13px;
  accent-color: currentColor;
  cursor: pointer;
}

.stock-type-chip.active.rma {
  border-color: #00765f;
  background: #f1faf6;
  color: #00765f;
}

.stock-type-chip.active.dma {
  border-color: #b3261e;
  background: #fdf2f1;
  color: #b3261e;
}

.stock-type-actions {
  display: inline-flex;
  gap: 6px;
  white-space: nowrap;
}

.stock-type-note {
  grid-column: 1 / -1;
  color: #b45309;
  font-size: 0.74rem;
}

.stock-chart-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 14px 10px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.stock-chart-hint svg {
  width: 14px;
  height: 14px;
}

.stock-detail-block {
  margin: 0 14px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.stock-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 11px 14px;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
}

.stock-detail-head span small {
  display: block;
  font-size: 0.7rem;
  font-weight: 900;
  color: var(--marca-escura);
  text-transform: uppercase;
}

.stock-detail-head strong {
  font-size: 0.9rem;
  color: #171a1d;
}

.stock-detail-totals {
  display: grid;
  justify-items: end;
  gap: 1px;
  margin-left: auto;
}

.stock-detail-totals b {
  font-size: 0.95rem;
}

.stock-detail-totals small {
  color: var(--muted);
  font-size: 0.72rem;
}

/* REGRA: as duas tabelas nao rolam na vertical. A navegacao e por pagina.
   Na horizontal a rolagem continua, senao as ultimas colunas seriam cortadas. */
.stock-detail-block .table-wrap {
  max-height: none;
  overflow-x: auto;
  overflow-y: hidden;
}

.stock-detail-table td:first-child {
  white-space: nowrap;
}

.stock-detail-table thead th {
  background: #f1f5f9;
  white-space: nowrap;
}

.stock-detail-table td {
  vertical-align: top;
  font-size: 0.76rem;
}

.stock-detail-table td.numeric,
.stock-detail-table th.numeric {
  text-align: right;
}

.stock-detail-table td.positive {
  color: #00765f;
  font-weight: 800;
}

.stock-detail-table td.negative {
  color: #b3261e;
  font-weight: 800;
}

.stock-detail-material {
  min-width: 240px;
  max-width: 340px;
  white-space: normal;
}

.stock-cell-note {
  display: block;
  color: #94a3b8;
  font-size: 0.68rem;
  font-weight: 600;
}

.stock-type-pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 900;
  white-space: nowrap;
}

.stock-type-pill.rma {
  background: #e8f6f1;
  color: #00765f;
}

.stock-type-pill.dma {
  background: #fdecea;
  color: #b3261e;
}

.stock-hover-band {
  cursor: pointer;
}

@media (max-width: 900px) {
  .stock-type-bar {
    grid-template-columns: 1fr;
  }
}

.stock-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-bottom: none;
  border-radius: 12px 12px 0 0;
}

.stock-section-head span small {
  display: block;
  font-size: 0.7rem;
  font-weight: 900;
  color: var(--marca-escura);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stock-section-head span strong {
  font-size: 0.92rem;
  color: #171a1d;
}

.stock-balance-block,
.stock-chart-block {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
}

.stock-balance-cards {
  display: grid;
  /* v0261: 460px era apertado demais para as quatro colunas — o valor do Saldo
     Operacional ("R$ 3.787.325") passava do espaco e era cortado. Medido: a
     partir de 450px cabe, e 480px deixa folga sem tirar cards da linha. */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr));
  gap: 12px;
  padding: 14px;
  background: #f6f8fb;
}

.stock-balance-card {
  background: #ffffff;
  border: 1px solid var(--line);
  /* A cor do deposito acompanha o card inteiro, nao so o cabecalho. */
  border-left: 5px solid var(--stock-accent, #64748b);
  border-radius: 12px;
  overflow: hidden;
}

.stock-balance-card header {
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfe;
}

.stock-balance-code {
  font-size: 0.7rem;
  font-weight: 900;
  color: var(--stock-accent, #64748b);
  letter-spacing: 0.04em;
}

.stock-balance-card header strong {
  font-size: 0.92rem;
  color: #171a1d;
}

.stock-balance-card header small {
  color: var(--muted);
  font-size: 0.74rem;
}

.stock-balance-card.outside {
  opacity: 0.92;
}

.stock-balance-grid {
  display: grid;
  /* v0261: a coluna da POLITICA e mais larga que as outras tres. O rotulo dela
     ("Valor Política de Estoque") e a linha de detalhe ("68.521 un | 202 de 212
     itens com preço") sao os textos mais compridos do card — com as quatro
     colunas iguais eles nao cabiam e vazavam por cima do Saldo Operacional. */
  grid-template-columns: 1.3fr repeat(3, minmax(0, 1fr));
}

.stock-balance-slot.policy {
  background: #f8fafc;
}

.stock-balance-slot.policy b {
  color: #7c3aed;
}

.stock-balance-slot {
  display: grid;
  gap: 2px;
  /* v0261: 8px nas laterais (era 10) — os 4px que sobram por coluna sao o que
     falta para o valor em R$ caber inteiro. */
  padding: 11px 8px;
  min-width: 0;
  /* v0261: nada de uma coluna pintar por cima da vizinha. */
  overflow: hidden;
  border-right: 1px solid #eef2f6;
}

.stock-balance-slot:last-child {
  border-right: none;
}

.stock-balance-slot span {
  font-size: 0.63rem;
  line-height: 1.25;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* REGRA (v0261): so o VALOR em R$ nunca quebra. O rotulo e a linha de detalhe
   quebram — era a regra antiga (small com nowrap) que empurrava o texto por
   cima da coluna do lado. */
.stock-balance-slot b {
  white-space: nowrap;
}

.stock-balance-slot small {
  white-space: normal;
  overflow-wrap: anywhere;
}

.stock-balance-slot b {
  /* v0261: 0.8rem (era 0.82) — mesma leitura, e o valor cabe na coluna. */
  font-size: 0.8rem;
  color: #171a1d;
}

.stock-balance-slot small {
  color: var(--muted);
  font-size: 0.7rem;
}

.stock-balance-slot.operational b {
  color: #0b5fa5;
}

.stock-balance-slot.reform b {
  color: #b45309;
}

.stock-balance-slot.scrap b {
  color: #475569;
}


.stock-mode-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.stock-mode-button {
  border: 1px solid #d5dee9;
  background: #fff;
  border-radius: 999px;
  padding: 6px 13px;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  color: #334155;
  cursor: pointer;
}

.stock-mode-button.active {
  background: var(--marca);
  border-color: var(--marca);
  color: #fff;
}

.stock-kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  padding: 14px 14px 0;
}

.stock-kpi {
  display: grid;
  gap: 3px;
  padding: 11px 13px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.stock-kpi span {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
}

.stock-kpi b {
  font-size: 1.02rem;
  color: #171a1d;
}

.stock-kpi b.positive,
.stock-data-table td.positive {
  color: #00765f;
}

.stock-kpi b.negative,
.stock-data-table td.negative {
  color: #b3261e;
}

.stock-kpi-note {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: normal;
}

/* 4o card: os tres valores acumulados dentro do MESMO card, sem crescer. */
.stock-kpi-accumulated {
  align-content: start;
  padding: 9px 13px 8px;
}

.stock-kpi-lines {
  display: grid;
  gap: 1px;
  margin-top: 1px;
}

.stock-kpi-lines em {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-style: normal;
  font-size: 0.71rem;
  font-weight: 700;
  color: #52514e;
  line-height: 1.35;
}

.stock-kpi-lines em b {
  margin-left: auto;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.stock-kpi-lines em.strong {
  margin-top: 2px;
  padding-top: 3px;
  border-top: 1px solid #e4eaf1;
  color: #171a1d;
  font-weight: 900;
}

.stock-kpi-lines em.strong b {
  font-size: 0.86rem;
  font-weight: 900;
}

.stock-chart-shell {
  position: relative;
  padding: 10px 14px 4px;
}

/* Periodo longo: a rolagem horizontal fica SO no grafico, nunca na tela. */
.stock-chart-scroll {
  position: relative;
  overflow: hidden;
}

.stock-chart-scroll.scrollable {
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 6px;
  overscroll-behavior-x: contain;
}

/* Eixo Y fixo: os valores nao rolam junto com o grafico. */
.stock-chart-axis {
  position: absolute;
  z-index: 3;
  top: 10px;
  left: 14px;
  pointer-events: none;
  background: linear-gradient(to right, #ffffff 78%, rgba(255, 255, 255, 0));
}

.stock-chart-axis svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.stock-chart-scroll-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.stock-chart-shell .stock-chart-scroll-hint svg {
  width: 14px;
  height: 14px;
  flex: none;
}

.stock-chart-shell svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.stock-chart-scroll.scrollable svg {
  overflow: visible;
}

/* Linha percorrida pelo mouse ganha destaque; as outras recuam. */
.stock-series {
  transition: opacity 0.12s ease;
}

.stock-series.dimmed {
  opacity: 0.3;
}

.stock-series.active .stock-line {
  stroke-width: 3.2;
}

.stock-hover-dot {
  stroke: #ffffff;
  stroke-width: 2;
  pointer-events: none;
}

.stock-grid-line {
  stroke: #eef2f6;
  stroke-width: 1;
}

.stock-zero-line {
  stroke: #cbd5e1;
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
}

.stock-axis-line {
  stroke: #e2e8f0;
  stroke-width: 1;
}

.stock-axis-text {
  fill: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.stock-series-label {
  fill: #52514e;
  font-size: 11px;
  font-weight: 900;
}

.stock-line {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stock-dot {
  stroke: #ffffff;
  stroke-width: 1.5;
}

.stock-hover-band {
  fill: transparent;
  cursor: crosshair;
}

.stock-crosshair {
  stroke: #94a3b8;
  stroke-width: 1;
  stroke-dasharray: 3 3;
  pointer-events: none;
}

.stock-tooltip {
  position: absolute;
  z-index: 5;
  min-width: 170px;
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(20, 24, 28, 0.18);
  font-size: 0.76rem;
  pointer-events: none;
}

.stock-tooltip strong {
  font-size: 0.8rem;
  color: #171a1d;
}

.stock-tooltip span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #52514e;
}

.stock-tooltip span b {
  margin-left: auto;
  color: #171a1d;
}

.stock-tooltip i {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  flex-shrink: 0;
}

.stock-tooltip-total {
  border-top: 1px solid #eef2f6;
  padding-top: 6px;
  margin-top: 2px;
  font-weight: 800;
}

.stock-tooltip {
  min-width: 232px;
  max-width: 300px;
}

.stock-tooltip-hint {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.25;
}

.stock-tooltip-block.active {
  display: grid;
  gap: 3px;
  padding: 7px 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.stock-tooltip-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.stock-tooltip-head b {
  margin-left: 0;
  font-size: 0.78rem;
  color: #171a1d;
}

.stock-tooltip-head small {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 130px;
}

.stock-tooltip-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
}

.stock-tooltip-row em {
  font-style: normal;
  color: #52514e;
  font-weight: 600;
}

.stock-tooltip-row b {
  margin-left: auto;
  font-weight: 800;
}

.stock-tooltip-row.compact {
  color: #52514e;
  font-weight: 700;
}

.stock-tooltip b.positive,
.stock-tooltip-total b.positive {
  color: #00765f;
}

.stock-tooltip b.negative,
.stock-tooltip-total b.negative {
  color: #b3261e;
}

.stock-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 6px 4px 12px;
}

.stock-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  color: #52514e;
}

.stock-legend-item i {
  width: 11px;
  height: 11px;
  border-radius: 3px;
}

.stock-legend-item b {
  color: #171a1d;
}

.stock-legend-item small {
  color: var(--muted);
}

.stock-data-table {
  padding: 0 14px 14px;
}

.stock-data-table .table-wrap {
  max-height: 46vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.stock-data-table thead th {
  position: sticky;
  top: 0;
  background: #f1f5f9;
  z-index: 1;
}

.stock-empty-card {
  display: grid;
  gap: 4px;
  margin: 14px;
  padding: 16px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

.stock-empty-card strong {
  color: #171a1d;
  font-size: 0.88rem;
}

.stock-empty-card.error {
  background: #fdecea;
  border-color: #f5c6c1;
  color: #b3261e;
}

@media (max-width: 900px) {
  .stock-filter-bar {
    grid-template-columns: 1fr;
  }

  /* v0261: era UMA coluna (os quatro saldos empilhados, card altissimo).
     Vira 2 x 2 — politica e operacional em cima, reforma e sucata embaixo. */
  .stock-balance-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stock-balance-slot {
    border-right: 1px solid #eef2f6;
    border-bottom: none;
  }

  .stock-balance-slot:nth-child(2n) {
    border-right: none;
  }

  .stock-balance-slot:nth-child(-n + 2) {
    border-bottom: 1px solid #eef2f6;
  }
}

/* Aproveitamento de tela: remove as faixas de titulo/subtitulo das telas
   (o titulo ja aparece na barra superior do app). */
.electric-warehouse-head,
.warehouse-mobile-head,
#dashboardView > .dashboard-header,
.users-admin-header,
.siago-intro-card {
  display: none !important;
}

/* Barra de ferramentas do Almoxarifado EPI/EPC (estilo Obras eletricas) */
.warehouse-workspace {
  display: grid;
  grid-template-columns: 225px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
}

.warehouse-tools-nav {
  display: grid;
  gap: 8px;
  position: sticky;
  top: 10px;
}

.warehouse-tools-title {
  font-size: 0.72rem;
  font-weight: 900;
  color: var(--muted);
  letter-spacing: 0.02em;
  padding: 2px 2px 0;
}

.warehouse-tool-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 13px 13px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-weight: 800;
  font-size: 0.83rem;
  color: #171a1d;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.warehouse-tool-button b {
  background: #eef2f7;
  color: #334155;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.74rem;
}

.warehouse-tool-button:hover {
  border-color: var(--marca);
}

.warehouse-tool-button.active {
  background: var(--marca);
  border-color: var(--marca);
  color: #ffffff;
}

.warehouse-tool-button.active b {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.warehouse-workspace-content {
  display: grid;
  gap: 10px;
  min-width: 0;
}

@media (max-width: 900px) {
  .warehouse-workspace {
    grid-template-columns: 1fr;
  }

  .warehouse-tools-nav {
    position: static;
  }
}

.warehouse-group-list {
  display: grid;
  gap: 8px;
}

.warehouse-group-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  font: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.warehouse-group-row:hover,
.warehouse-group-row:focus-visible {
  border-color: #b3261e;
  box-shadow: 0 6px 18px rgba(20, 24, 28, 0.08);
  transform: translateY(-1px);
}

.warehouse-group-row-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.warehouse-group-row-main strong {
  font-size: 0.92rem;
  color: #171a1d;
}

.warehouse-group-row-main small {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warehouse-group-row-stats {
  display: grid;
  gap: 3px;
  justify-items: end;
  white-space: nowrap;
}

.warehouse-group-row-stats b {
  color: #b3261e;
  font-size: 0.85rem;
}

.warehouse-group-row-stats small {
  color: var(--muted);
}

.warehouse-group-row-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #b3261e;
  font-weight: 800;
  font-size: 0.8rem;
  white-space: nowrap;
}

.warehouse-group-row-cta svg {
  width: 16px;
  height: 16px;
}

.warehouse-group-detail {
  display: grid;
  gap: 10px;
}

.warehouse-group-detail-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.warehouse-group-detail-title {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.warehouse-group-detail-title small {
  color: var(--muted);
}

.warehouse-group-detail-items {
  display: grid;
  gap: 8px;
}

/* Tabela profissional de itens do grupo */
.warehouse-item-table-wrap {
  max-height: 66vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
}

.warehouse-item-table {
  width: 100%;
  border-collapse: collapse;
}

.warehouse-item-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f1f5f9;
  text-align: left;
  padding: 10px 12px;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: #334155;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.warehouse-item-table thead th.numeric,
.warehouse-item-table td.numeric {
  text-align: right;
}

.warehouse-item-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #eef2f6;
  vertical-align: middle;
  font-size: 0.78rem;
}

.warehouse-item-table tbody tr:nth-child(even) td {
  background: #fbfcfe;
}

.warehouse-item-table tbody tr:hover td {
  background: #f4f7fb;
}

.warehouse-item-material strong {
  display: block;
  font-size: 0.8rem;
  color: #171a1d;
}

.warehouse-item-material small {
  color: var(--muted);
}

.warehouse-item-diff {
  font-weight: 900;
  white-space: nowrap;
}

.warehouse-item-diff.pending {
  color: #b45309;
}

.warehouse-item-diff.extra {
  color: #0b5fa5;
}

.warehouse-item-diff.replace {
  color: #475569;
}

.warehouse-item-actions {
  min-width: 240px;
}

.warehouse-item-actions .regularization-cell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
}

.warehouse-item-actions .regularization-cell small {
  order: 9;
  width: 100%;
  margin: 0;
  text-align: left;
}

.warehouse-item-actions .regularization-actions {
  display: flex;
  gap: 6px;
}

/* Botões de tratativa refinados */
.regularization-button {
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(20, 24, 28, 0.1);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.regularization-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(240, 132, 48, 0.22);
  filter: brightness(1.03);
}

@media (max-width: 900px) {
  .warehouse-item-actions {
    min-width: 170px;
  }
}

.warehouse-group-flat {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
}

.warehouse-group-flat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
}

.warehouse-issue-list-flat {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
}

.launch-flat-block {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
}

.launch-flat-block.pending-launch-block {
  border-left: 5px solid var(--red);
}

.launch-flat-block.completed-launch-block {
  border-left: 5px solid var(--green);
}

.launch-flat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.launch-flat-group {
  padding: 12px 16px;
}

.launch-flat-group + .launch-flat-group {
  border-top: 1px solid var(--line);
}

.launch-flat-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.launch-flat-subhead span {
  display: grid;
  gap: 2px;
}

.launch-flat-subhead small {
  color: var(--muted);
}

.launch-flat-group .table-wrap,
.launch-flat-table .table-wrap {
  max-height: 55vh;
  overflow: auto;
}

@media (max-width: 900px) {
  .warehouse-flat-head,
  .warehouse-group-flat-head,
  .launch-flat-head,
  .launch-flat-subhead {
    flex-direction: column;
    align-items: flex-start;
  }

  .warehouse-flat-content {
    max-height: none;
  }
}

.warehouse-subsection {
  border-left-width: 4px;
  box-shadow: none;
}

.warehouse-section > summary,
.warehouse-group-card > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 12px;
  cursor: pointer;
  list-style: none;
}

.warehouse-section > summary::-webkit-details-marker,
.warehouse-group-card > summary::-webkit-details-marker {
  display: none;
}

.warehouse-section > summary:hover,
.warehouse-group-card > summary:hover {
  background: #fbfcfd;
}

.warehouse-section[open] > summary,
.warehouse-group-card[open] > summary {
  border-bottom: 1px solid #dfe6ee;
}

.warehouse-section-title,
.warehouse-group-title {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.warehouse-section-title small {
  color: var(--marca-escura);
  font-size: 0.74rem;
  font-weight: 950;
  text-transform: uppercase;
}

.warehouse-section-title strong,
.warehouse-group-title strong {
  color: var(--graphite);
  overflow-wrap: anywhere;
}

.warehouse-group-title small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.warehouse-section-actions,
.warehouse-group-counts {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.warehouse-section-actions b,
.warehouse-section-actions small,
.warehouse-group-counts b,
.warehouse-group-counts small {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  background: #f3f6f9;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
  white-space: nowrap;
}

.warehouse-group-counts b {
  color: var(--marca-escura);
  background: var(--marca-suave);
}

.warehouse-open-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  min-height: 32px;
  padding: 0 14px;
  color: var(--marca-escura);
  background: var(--marca-suave);
  border: 1px solid rgba(240, 132, 48, 0.24);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 950;
  white-space: nowrap;
}

.warehouse-open-button::before {
  content: "Abrir";
}

.warehouse-section[open] > summary .warehouse-open-button,
.warehouse-group-card[open] > summary .warehouse-open-button {
  color: var(--graphite);
  background: #eef3f7;
  border-color: #d2dbe5;
}

.warehouse-section[open] > summary .warehouse-open-button::before,
.warehouse-group-card[open] > summary .warehouse-open-button::before {
  content: "Fechar";
}

.warehouse-section-content {
  display: grid;
  gap: 10px;
  padding: 10px;
  background: #f8fafc;
}

.warehouse-purchase-balance-content {
  gap: 12px;
  background: #fff9ed;
}

.warehouse-purchase-balance-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  gap: 12px;
  align-items: end;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #e2cfa9;
  border-radius: var(--radius);
}

.warehouse-purchase-balance-toolbar > div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.warehouse-purchase-balance-toolbar strong {
  color: var(--graphite);
  font-size: 1rem;
  font-weight: 950;
}

.warehouse-purchase-balance-toolbar small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.warehouse-purchase-balance-list {
  display: grid;
  gap: 10px;
}

.warehouse-purchase-balance-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(140px, auto);
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  background: #ffffff;
  border: 1px solid #e1d3b5;
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(20, 24, 28, 0.055);
}

.warehouse-purchase-balance-card:nth-child(even) {
  background: #fffdf8;
}

.warehouse-purchase-balance-main,
.warehouse-purchase-balance-side {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.warehouse-purchase-balance-main span {
  width: max-content;
  max-width: 100%;
  padding: 4px 8px;
  color: #8a5600;
  background: #fff0cb;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.warehouse-purchase-balance-main strong {
  color: var(--graphite);
  overflow-wrap: anywhere;
}

.warehouse-purchase-balance-main small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.warehouse-purchase-balance-side {
  justify-items: end;
  text-align: right;
}

.warehouse-purchase-balance-side span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.warehouse-purchase-balance-side strong {
  color: #8a5600;
  font-size: 1.45rem;
  line-height: 1;
}

.warehouse-issue-list {
  display: grid;
}

.warehouse-issue-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, auto);
  gap: 12px;
  align-items: start;
  padding: 13px 12px;
  background: #ffffff;
  border-bottom: 1px solid #edf0f4;
}

.warehouse-issue-card.pending {
  background: var(--warehouse-pending-bg);
}

.warehouse-issue-card.extra {
  background: var(--warehouse-extra-bg);
}

.warehouse-issue-card.replace {
  background: var(--warehouse-replace-bg);
}

.warehouse-issue-card.has-regularization {
  background: var(--warehouse-done-bg);
}

.warehouse-issue-card:nth-child(even) {
  box-shadow: var(--row-soft-shadow);
}

.warehouse-issue-card:last-child {
  border-bottom: 0;
}

.warehouse-issue-main,
.warehouse-issue-side {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.warehouse-issue-main strong {
  color: var(--graphite);
  overflow-wrap: anywhere;
}

.warehouse-issue-main small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.warehouse-issue-side {
  align-self: start;
  justify-items: end;
}

.warehouse-issue-side strong {
  color: var(--graphite);
  font-size: 0.96rem;
  white-space: nowrap;
}

.warehouse-field {
  display: grid;
  gap: 6px;
  min-width: min(360px, 100%);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.warehouse-field input,
.warehouse-field select,
.warehouse-field .search-select-input {
  min-height: 42px;
  padding: 0 12px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid #d5dce4;
  border-radius: var(--radius);
  font: inherit;
  text-transform: none;
}

.post-checklists {
  display: grid;
  gap: 12px;
  padding: 12px 14px 14px;
  background: #f2f5f8;
  border-top: 1px solid #dbe2e9;
}

.post-status-box {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #ccd5df;
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(20, 24, 28, 0.08);
}

.post-status-box.open-box {
  border-left: 5px solid var(--red);
}

.post-status-box.done-box {
  border-left: 5px solid var(--green);
}

.post-status-box.purchase-box {
  border-left: 5px solid var(--amber);
}

.post-status-box > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  min-height: 54px;
  padding: 0 12px 0 14px;
  color: var(--graphite);
  background: #ffffff;
  cursor: pointer;
  list-style: none;
}

.post-status-box > summary:hover {
  filter: brightness(0.995);
}

.post-status-box.open-box > summary {
  background: #fff8f9;
}

.post-status-box.done-box > summary {
  background: #f5fbf8;
}

.post-status-box.purchase-box > summary {
  background: #fff9ed;
}

.post-status-box > summary::-webkit-details-marker {
  display: none;
}

.post-status-box > summary span {
  min-width: 0;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.post-status-box > summary strong {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid #dce3ea;
  border-radius: 999px;
  font-size: 0.82rem;
  white-space: nowrap;
}

.post-status-box > summary::after {
  content: "Abrir";
  min-width: 74px;
  padding: 7px 12px;
  color: var(--marca-escura);
  background: #ffffff;
  border: 1px solid rgba(240, 132, 48, 0.24);
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 950;
  text-align: center;
}

.post-status-box[open] > summary {
  border-bottom: 1px solid #d9e0e8;
}

.post-status-box[open] > summary::after {
  content: "Fechar";
  color: var(--graphite);
  background: #eef2f6;
  border-color: #d0d8e1;
}

.post-status-content {
  display: grid;
  gap: 10px;
  padding: 10px;
  background: #f7f9fb;
}

.post-checklist {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #dbe2e9;
  border-radius: var(--radius);
}

.post-checklist > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  min-height: 64px;
  padding: 12px;
  background: #ffffff;
  cursor: pointer;
  list-style: none;
}

.post-checklist > summary:hover {
  background: #fafbfd;
}

.post-checklist > summary::-webkit-details-marker {
  display: none;
}

.post-checklist > summary::after {
  content: "Abrir";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  min-height: 30px;
  padding: 7px 12px;
  color: var(--marca-escura);
  background: var(--marca-suave);
  border: 1px solid rgba(240, 132, 48, 0.2);
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 950;
  line-height: 1;
  text-align: center;
}

.post-checklist[open] > summary::after {
  content: "Fechar";
  color: var(--graphite);
  background: #eef3f7;
  border-color: #d5dde6;
}

.post-checklist > summary > span:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.post-checklist > summary strong {
  color: var(--graphite);
  overflow-wrap: anywhere;
}

.post-checklist > summary small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.post-checklist-counts {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.post-checklist-counts b,
.post-checklist-counts small {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  background: #f3f6f9;
  border-radius: 999px;
  white-space: nowrap;
}

.post-checklist-counts b {
  color: var(--marca-escura);
  background: var(--marca-suave);
}

.post-checklist[open] > summary {
  border-bottom: 1px solid #e1e6ec;
  background: #fbfcfd;
}

.post-issue-list {
  display: grid;
}

.post-issue {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(210px, 320px);
  gap: 16px;
  align-items: center;
  padding: 14px;
  background: #ffffff;
  border-bottom: 1px solid #edf0f4;
  overflow: hidden;
}

.post-issue:nth-child(even) {
  background: var(--row-alt);
  box-shadow: var(--row-soft-shadow);
}

.post-issue:last-child {
  border-bottom: 0;
}

.post-issue > div:first-child {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.post-issue strong {
  color: var(--graphite);
}

.post-issue small {
  color: var(--muted);
  font-weight: 850;
}

.post-issue-side {
  display: grid;
  justify-items: end;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

.issue-kind {
  width: fit-content;
  min-height: 24px;
  padding: 0 8px;
  color: var(--amber);
  background: var(--amber-soft);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 950;
}

.issue-kind.extra {
  color: var(--blue);
  background: #eaf2ff;
}

.issue-kind.replace {
  color: var(--red);
  background: #fff1f2;
}

.post-inspection-body {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 12px 14px;
}

.post-card {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 76px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e5e9ee;
  border-radius: var(--radius);
}

.post-card span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.post-card strong {
  color: var(--graphite);
  font-size: 1.35rem;
  line-height: 1.05;
}

.mini-progress {
  overflow: hidden;
  height: 8px;
  background: #e9eef3;
  border-radius: 999px;
}

.mini-progress div {
  height: 100%;
  width: 0;
  background: var(--green);
  border-radius: inherit;
  transition: width 180ms ease;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-insight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-panel-wide {
  grid-column: 1 / -1;
}

.dashboard-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-panel {
  overflow: hidden;
  border-top-width: 3px;
  border-top-color: #b9c3ce;
}

#postInspectionSection {
  border-top-color: var(--marca);
}

#launchPendingSection {
  border-top-color: var(--blue);
}

.launch-control-panel > summary {
  cursor: pointer;
  list-style: none;
}

.launch-control-panel > summary::-webkit-details-marker {
  display: none;
}

.launch-control-panel > summary::after {
  content: "Abrir";
  min-width: 72px;
  padding: 7px 12px;
  color: var(--marca-escura);
  background: var(--marca-suave);
  border: 1px solid rgba(240, 132, 48, 0.2);
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 950;
  text-align: center;
}

.launch-control-panel[open] > summary::after {
  content: "Fechar";
  color: var(--graphite);
  background: #eef3f7;
  border-color: #d5dde6;
}

#purchaseSection {
  border-top-color: var(--amber);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 50px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.panel-head small {
  color: var(--muted);
  font-weight: 900;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.compact-button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.78rem;
}

.bar-list,
.expected-list,
.treatment-list {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
}

.bar-item {
  display: grid;
  gap: 6px;
}

.bar-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: var(--graphite);
  font-weight: 900;
}

.bar-row span:first-child {
  overflow-wrap: anywhere;
}

.bar-track {
  overflow: hidden;
  height: 9px;
  background: #edf1f5;
  border-radius: 999px;
}

.bar-fill {
  height: 100%;
  background: var(--marca);
  border-radius: inherit;
}

.bar-fill.extra {
  background: var(--blue);
}

.expected-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 10px;
  align-items: center;
  min-height: 46px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #e5e9ee;
  border-radius: var(--radius);
}

.expected-card strong {
  color: var(--graphite);
  overflow-wrap: anywhere;
}

.expected-card span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.expected-progress {
  grid-column: 1 / -1;
  height: 7px;
}

.treatment-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.treatment-card {
  display: grid;
  gap: 4px;
  min-height: 66px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #e5e9ee;
  border-radius: var(--radius);
}

.treatment-card strong {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 950;
}

.treatment-card span {
  color: var(--graphite);
  font-size: 1.35rem;
  font-weight: 950;
  line-height: 1;
}

.treatment-card small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.contract-performance-list,
.month-trend-list {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
}

.contract-performance-list {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.contract-performance-card,
.month-trend-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e0e7ef;
  border-radius: var(--radius);
}

.contract-performance-head,
.month-trend-head,
.contract-performance-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.contract-performance-head strong,
.month-trend-head strong {
  color: var(--graphite);
  font-size: 0.96rem;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.contract-performance-head span,
.month-trend-head span {
  color: var(--green);
  font-size: 1.1rem;
  font-weight: 950;
  white-space: nowrap;
}

.contract-performance-row {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.contract-performance-row b {
  color: var(--graphite);
}

.month-trend-card {
  background: #ffffff;
}

.month-trend-card.active {
  border-color: rgba(28, 101, 140, 0.34);
  box-shadow: 0 0 0 2px rgba(28, 101, 140, 0.08);
}

.month-trend-card small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.indicator-table-wrap {
  max-height: 380px;
  border-top: 0;
}

.dashboard-table.indicator-table {
  min-width: 760px;
}

.dashboard-table.indicator-table th,
.dashboard-table.indicator-table td {
  vertical-align: middle;
}

.dashboard-table.entity-performance-table {
  min-width: 900px;
}

.indicator-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 950;
  white-space: nowrap;
}

.indicator-status.done {
  color: var(--green);
  background: #e8f6ef;
}

.indicator-status.pending {
  color: var(--red);
  background: #fff1f2;
}

.table-wrap {
  overflow-x: auto;
}

.launch-stack {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
}

.launch-block {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #d8e0e8;
  border-left: 4px solid var(--blue);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(28, 38, 49, 0.06);
}

.completed-launch-block {
  border-left-color: var(--green);
}

.launch-block > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  min-height: 64px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}

.launch-block > summary::-webkit-details-marker {
  display: none;
}

.launch-block > summary::after {
  content: "Abrir";
  justify-self: end;
  min-width: 72px;
  padding: 7px 12px;
  color: var(--marca-escura);
  background: var(--marca-suave);
  border: 1px solid rgba(240, 132, 48, 0.2);
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 950;
  text-align: center;
}

.launch-block[open] > summary {
  border-bottom: 1px solid #d8e0e8;
}

.launch-block[open] > summary::after {
  content: "Fechar";
  color: var(--graphite);
  background: #eef3f7;
  border-color: #d5dde6;
}

.launch-block-title {
  display: grid;
  gap: 3px;
}

.launch-block-title small {
  color: var(--marca-escura);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.completed-launch-block .launch-block-title small {
  color: var(--green);
}

.launch-block-title strong {
  color: var(--graphite);
  font-size: 1.02rem;
  line-height: 1.15;
}

.launch-block > summary > b {
  justify-self: end;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 950;
  white-space: nowrap;
}

.launch-block > .launch-groups {
  display: grid;
  gap: 8px;
  padding: 10px 12px 12px;
}

.launch-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
}

.launch-section-title h4 {
  margin: 0;
  color: var(--graphite);
  font-size: 0.92rem;
}

.launch-section-title small {
  color: var(--muted);
  font-weight: 900;
}

.launch-group {
  overflow: hidden;
  background: #fbfcfe;
  border: 1px solid #e1e6ec;
  border-radius: var(--radius);
}

.launch-group > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 9px 12px;
  color: var(--graphite);
  font-weight: 950;
  cursor: pointer;
  list-style: none;
}

.launch-group > summary::-webkit-details-marker {
  display: none;
}

.launch-group > summary::after {
  content: "Abrir";
  min-width: 58px;
  padding: 6px 10px;
  color: var(--marca-escura);
  background: var(--marca-suave);
  border: 1px solid rgba(240, 132, 48, 0.2);
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 950;
  text-align: center;
}

.launch-group[open] > summary {
  border-bottom: 1px solid #e1e6ec;
  background: #ffffff;
}

.launch-group[open] > summary::after {
  content: "Fechar";
  color: var(--graphite);
  background: #f1f4f7;
  border-color: #d7dde5;
}

.launch-group-title {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.launch-group-title b {
  overflow-wrap: anywhere;
  color: var(--graphite);
  font-size: 0.94rem;
  line-height: 1.16;
}

.launch-group-title small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1.2;
}

.launch-group > summary strong {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 950;
  white-space: nowrap;
}

.dashboard-table.launch-table {
  min-width: 820px;
}

.dashboard-table.completed-table {
  min-width: 1080px;
}

.launch-history-list {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.launch-history-empty {
  padding: 18px 14px;
  color: var(--muted);
  background: #ffffff;
  border: 1px dashed #cbd5df;
  border-radius: var(--radius);
  font-weight: 900;
  text-align: center;
}

.launch-history-card {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #d8e0e8;
  border-left: 4px solid var(--green);
  border-radius: var(--radius);
  box-shadow: 0 8px 18px rgba(28, 38, 49, 0.05);
}

.launch-history-card > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
}

.launch-history-card > summary::-webkit-details-marker {
  display: none;
}

.launch-history-card > summary::after {
  content: "Abrir";
  min-width: 72px;
  padding: 7px 11px;
  color: var(--marca-escura);
  background: var(--marca-suave);
  border: 1px solid rgba(240, 132, 48, 0.2);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 950;
  text-align: center;
}

.launch-history-card[open] > summary {
  border-bottom: 1px solid #d8e0e8;
  background: #fbfffd;
}

.launch-history-card[open] > summary::after {
  content: "Fechar";
  min-width: 86px;
  color: var(--graphite);
  background: #eef3f7;
  border-color: #d5dde6;
}

.launch-history-title {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.launch-history-title b {
  overflow-wrap: anywhere;
  color: var(--graphite);
  font-size: 0.95rem;
  line-height: 1.15;
}

.launch-history-title small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.launch-history-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.launch-history-badges em {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  color: var(--muted);
  background: #f3f6f9;
  border-radius: 999px;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 950;
  white-space: nowrap;
}

.launch-history-badges em.warn {
  color: var(--red);
  background: #fff5f6;
}

.launch-history-badges em.ok {
  color: var(--green);
  background: #effaf6;
}

.launch-history-body {
  display: grid;
  gap: 10px;
  padding: 10px 12px 12px;
}

.launch-history-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.launch-history-meta span {
  display: grid;
  gap: 3px;
  min-height: 46px;
  padding: 8px 10px;
  background: #f7f9fb;
  border: 1px solid #dfe6ee;
  border-radius: var(--radius);
  color: var(--graphite);
  font-size: 0.82rem;
  font-weight: 900;
}

.launch-history-meta b {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.dashboard-table.history-table {
  min-width: 1160px;
}

.photo-evidence-panel {
  border-top: 2px solid var(--green);
}

.photo-evidence-head {
  align-items: center;
}

.photo-evidence-filters {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(190px, 260px);
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.photo-evidence-filters select {
  min-height: 40px;
  padding: 0 12px;
  color: var(--graphite);
  background: #ffffff;
  border: 1px solid #cfd8e3;
  border-radius: var(--radius);
  font-weight: 900;
}

.photo-evidence-list {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.photo-evidence-empty {
  padding: 22px 14px;
  color: var(--muted);
  background: #ffffff;
  border: 1px dashed #cbd5df;
  border-radius: var(--radius);
  font-weight: 900;
  text-align: center;
}

.photo-evidence-card {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #d8e0e8;
  border-left: 4px solid var(--green);
  border-radius: var(--radius);
  box-shadow: 0 10px 22px rgba(28, 38, 49, 0.05);
}

.photo-evidence-card > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
}

.photo-evidence-card > summary::-webkit-details-marker {
  display: none;
}

.photo-evidence-card > summary::after {
  content: "Abrir";
  min-width: 72px;
  padding: 7px 11px;
  color: var(--marca-escura);
  background: var(--marca-suave);
  border: 1px solid rgba(240, 132, 48, 0.2);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 950;
  text-align: center;
}

.photo-evidence-card[open] > summary {
  border-bottom: 1px solid #d8e0e8;
  background: #fbfffd;
}

.photo-evidence-card[open] > summary::after {
  content: "Fechar";
  color: var(--graphite);
  background: #eef3f7;
  border-color: #d5dde6;
}

.photo-evidence-title {
  display: grid;
  gap: 3px;
}

.photo-evidence-title b {
  color: var(--graphite);
  font-size: 0.98rem;
  line-height: 1.15;
}

.photo-evidence-title small,
.photo-evidence-card > summary strong {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.photo-evidence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  padding: 12px;
}

.photo-evidence-item {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  gap: 12px;
  min-height: 138px;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid #dfe6ee;
  border-radius: var(--radius);
}

.photo-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #ffffff;
  border: 1px solid #d4dde7;
  border-radius: var(--radius);
}

.photo-frame-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: inherit;
  font-size: 0;
  line-height: 0;
  text-decoration: none;
}

.photo-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.photo-placeholder {
  display: grid;
  place-items: center;
  gap: 6px;
  width: 100%;
  height: 100%;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-align: center;
}

.photo-open-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 8px;
  color: var(--marca-escura);
  background: var(--marca-suave);
  border: 1px solid rgba(240, 132, 48, 0.2);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 950;
  text-decoration: none;
}

.photo-lazy-placeholder {
  color: var(--graphite);
  background: #f8fafc;
}

.photo-evidence-info {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
}

.photo-evidence-info strong {
  color: var(--graphite);
  font-size: 0.86rem;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.photo-evidence-info small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1.25;
}

.photo-type {
  width: fit-content;
  padding: 3px 7px;
  color: var(--graphite);
  background: #eef3f7;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 950;
}

.ok-row {
  background: #fbfffd;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.pdf-row-button,
.delete-row-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  color: #ffffff;
  background: var(--graphite);
  border: 1px solid var(--graphite);
  border-radius: var(--radius);
  font-size: 0.76rem;
  font-weight: 950;
  cursor: pointer;
  white-space: nowrap;
}

.pdf-row-button:hover {
  background: #111315;
}

.delete-row-button {
  color: var(--red);
  background: #fff5f6;
  border-color: rgba(166, 18, 28, 0.24);
}

.delete-row-button:hover {
  background: #ffecee;
}

.pdf-row-button svg,
.delete-row-button svg {
  width: 15px;
  height: 15px;
}

.dashboard-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

.dashboard-table.detail-table,
.dashboard-table.grouped-table {
  min-width: 1760px;
}

#purchaseSection .table-wrap {
  position: relative;
}

#purchaseSection .dashboard-table th:last-child,
#purchaseSection .dashboard-table tbody tr:not(.purchase-group-row) td:last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  min-width: 174px;
  background: #ffffff;
  box-shadow: -14px 0 18px rgba(23, 31, 42, 0.08);
}

#purchaseSection .dashboard-table th:last-child {
  z-index: 3;
  background: #f8fafc;
}

.dashboard-table th,
.dashboard-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #edf0f4;
  vertical-align: top;
  text-align: left;
}

.dashboard-table th {
  color: var(--muted);
  background: #f8fafc;
  font-size: 0.76rem;
  text-transform: uppercase;
}

.dashboard-table tbody tr:not(.purchase-group-row):nth-child(even) td {
  background: var(--row-alt);
  box-shadow: var(--cell-soft-shadow);
}

#purchaseSection .dashboard-table tbody tr:not(.purchase-group-row):nth-child(even) td:last-child {
  background: var(--row-alt);
  box-shadow: -14px 0 18px rgba(23, 31, 42, 0.08), var(--cell-soft-shadow);
}

.dashboard-table tbody tr:not(.purchase-group-row):nth-child(even) td:first-child {
  box-shadow: var(--row-soft-shadow);
}

.dashboard-table tbody tr:not(.purchase-group-row):not(.regularized-row):hover td,
.item-row:not(.pending):not(.ok):hover td,
.post-issue:not(.regularized-row):hover {
  background: #f7f9fc;
}

#purchaseSection .dashboard-table tbody tr:not(.purchase-group-row):hover td:last-child {
  background: #f7f9fc;
}

.purchase-group-row td {
  padding: 8px 12px;
  color: var(--graphite);
  background: #eef3f7;
  border-top: 2px solid #c8d2dc;
  border-bottom-color: #d7e0e8;
}

.purchase-group-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.purchase-group-label strong {
  color: var(--graphite);
  font-size: 0.86rem;
  font-weight: 950;
}

.purchase-group-label small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  white-space: nowrap;
}

.dashboard-table td {
  color: var(--ink);
  font-weight: 700;
  line-height: 1.35;
}

.dashboard-table td.numeric {
  color: var(--graphite);
  font-weight: 950;
  white-space: nowrap;
}

.regularized-row {
  background: #f8fbf9;
}

.dashboard-table tbody tr.regularized-row td {
  background: #f8fbf9;
}

.dashboard-table tbody tr.regularized-row:nth-child(even) td:first-child {
  box-shadow: inset 4px 0 0 rgba(19, 121, 91, 0.12), var(--cell-soft-shadow);
}

.post-issue.regularized-row {
  background: #f8fbf9;
}

.post-issue.regularized-row:nth-child(even) {
  background: #f8fbf9;
  box-shadow: inset 4px 0 0 rgba(19, 121, 91, 0.12), var(--cell-soft-shadow);
}

.regularization-cell {
  display: grid;
  justify-items: end;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}

.regularization-cell small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: right;
}

.regularization-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: 100%;
}

.regularization-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 950;
  white-space: nowrap;
}

.regularization-pill.open {
  color: var(--amber);
  background: var(--amber-soft);
}

.regularization-pill.done {
  color: var(--green);
  background: var(--green-soft);
}

.regularization-pill.purchase {
  color: var(--blue);
  background: #eaf2ff;
}

.regularization-pill.available {
  color: var(--amber);
  background: var(--amber-soft);
}

.regularization-pill.replace {
  color: var(--red);
  background: #fff1f2;
}

.regularization-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  min-height: 32px;
  padding: 0 10px;
  color: #ffffff;
  background: var(--marca);
  border: 1px solid var(--marca);
  border-radius: var(--radius);
  font-size: 0.76rem;
  font-weight: 950;
  cursor: pointer;
}

.regularization-button svg {
  width: 15px;
  height: 15px;
}

.regularization-button.secondary {
  color: var(--graphite);
  background: #ffffff;
  border-color: #d5dce4;
}

.regularization-button:hover {
  filter: brightness(0.96);
}

.purchase-receipt-cell {
  display: grid;
  gap: 5px;
  min-width: 170px;
}

.purchase-receipt-cell small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
}

.purchase-receipt-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 950;
  white-space: nowrap;
}

.purchase-receipt-status.waiting {
  color: var(--amber);
  background: var(--amber-soft);
}

.purchase-receipt-status.done {
  color: var(--green);
  background: var(--green-soft);
}

.purchase-receipt-status.partial {
  color: var(--blue);
  background: #eaf2ff;
}

.purchase-receipt-button {
  min-width: 142px;
}

.purchase-arrival-button {
  min-width: 132px;
}

.purchase-arrival-button.arrived {
  color: #ffffff;
  background: var(--green);
  border-color: var(--green);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(17, 24, 39, 0.44);
}

.regularization-modal {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(620px, 100%);
  max-height: calc(100vh - 40px);
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #d8dee7;
  border-radius: var(--radius);
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.32);
}

.inventory-unsaved-modal {
  display: block;
  width: min(520px, calc(100vw - 28px));
  max-height: none;
  border-color: #d8dee7;
  border-radius: 10px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.22);
}

.inventory-unsaved-content {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 20px 20px 8px;
}

.inventory-unsaved-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--amber-soft);
  color: var(--amber);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.inventory-unsaved-icon i,
.inventory-unsaved-icon svg {
  width: 20px;
  height: 20px;
}

.inventory-unsaved-texts {
  min-width: 0;
  flex: 1;
}

.inventory-unsaved-content h3 {
  margin: 2px 0 6px;
  color: var(--graphite);
  font-size: 1rem;
  font-weight: 900;
  overflow-wrap: break-word;
}

.inventory-unsaved-content p {
  margin: 0;
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.5;
  overflow-wrap: break-word;
}

/* Botoes EMPILHADOS (padrao para todos os dialogos de decisao do celular):
   nada de 3 colunas apertadas com texto vazando das margens. */
.inventory-unsaved-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 14px 20px 20px;
}

.inventory-unsaved-actions .ghost-button,
.inventory-unsaved-actions .primary-button {
  width: 100%;
  min-height: 44px;
  border-radius: 9px;
  justify-content: center;
  padding-inline: 12px;
  box-shadow: none;
  font-size: 0.86rem;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
}

.inventory-unsaved-actions .inventory-unsaved-save {
  color: #ffffff;
  background: #111827;
  border-color: #111827;
  box-shadow: none;
}

.inventory-unsaved-actions .inventory-unsaved-save:hover {
  background: #1f2937;
  border-color: #1f2937;
}

.inventory-unsaved-actions .inventory-unsaved-cancel {
  color: #374151;
  background: #ffffff;
  border-color: #cfd7e3;
}

.inventory-unsaved-actions .danger-soft {
  color: #8a101b;
  background: #ffffff;
  border-color: #e3c4c8;
}

.inventory-unsaved-actions .danger-soft:hover,
.inventory-unsaved-actions .inventory-unsaved-cancel:hover {
  background: #f8fafc;
}

@media (max-width: 380px) {
  .inventory-unsaved-actions {
    grid-template-columns: 1fr;
  }
}

.regularization-modal-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: 16px;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  margin: 0;
  color: var(--graphite);
  font-size: 1.25rem;
}

.modal-close {
  width: 38px;
  min-height: 38px;
  padding: 0;
  color: var(--graphite);
  background: #f4f6f8;
  border: 1px solid #dce2e8;
  border-radius: 999px;
}

.modal-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 16px 18px 0;
}

.modal-summary div {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #e5e9ee;
  border-radius: var(--radius);
}

.modal-summary span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.modal-summary strong {
  color: var(--graphite);
  overflow-wrap: anywhere;
}

.warehouse-quantity-panel {
  display: grid;
  gap: 12px;
  margin: 16px 18px 0;
  padding: 12px;
  background: #fbfcfd;
  border: 1px solid #d6dee7;
  border-radius: var(--radius);
}

.warehouse-quantity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.warehouse-quantity-grid div,
.warehouse-quantity-input,
.warehouse-purchase-result {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 12px;
  background: #f5f7fa;
  border: 1px solid #e2e8ef;
  border-radius: var(--radius);
}

.warehouse-quantity-grid span,
.warehouse-quantity-input span,
.warehouse-purchase-result span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.warehouse-quantity-grid strong,
.warehouse-purchase-result strong {
  color: var(--graphite);
  font-size: 1.2rem;
}

.warehouse-quantity-input input {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  color: var(--graphite);
  background: #fff;
  border: 1px solid #cbd5df;
  border-radius: 8px;
  font: inherit;
  font-weight: 900;
}

.warehouse-purchase-result {
  background: #fff7ed;
  border-color: #fed7aa;
}

.warehouse-purchase-result strong {
  color: #9a3412;
}

.warehouse-purchase-result small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.replacement-warning-panel {
  display: grid;
  gap: 6px;
  margin: 16px 18px 0;
  padding: 12px;
  color: #7f1d1d;
  background: #fff7ed;
  border: 1px solid #fecaca;
  border-left: 4px solid var(--red);
  border-radius: var(--radius);
}

.replacement-warning-panel strong {
  color: var(--red-dark);
}

.replacement-warning-panel small,
.replacement-help {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
  line-height: 1.35;
}

.replacement-help {
  margin: 8px 18px 0;
}

.replacement-photo-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  margin: 12px 18px 0;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #dce3ea;
  border-radius: var(--radius);
}

.replacement-photo-panel strong {
  display: block;
  color: var(--graphite);
}

.replacement-photo-panel small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.35;
}

.replacement-photo-button {
  align-self: stretch;
  justify-content: center;
  white-space: nowrap;
}

.replacement-photo-panel .photo-status,
.replacement-photo-timestamp {
  grid-column: 1 / -1;
}

.replacement-photo-timestamp {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  line-height: 1.35;
}

.ghost-button.danger-soft {
  color: var(--red);
  background: #fff5f6;
  border-color: rgba(166, 18, 28, 0.28);
}

.warehouse-action-field {
  display: grid;
  gap: 8px;
  margin: 16px 18px 0;
  padding: 12px;
  border: 1px solid #dce3ea;
  border-radius: var(--radius);
}

.warehouse-action-field legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 950;
  text-transform: uppercase;
}

.warehouse-action-field label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid #e5e9ee;
  border-radius: var(--radius);
  cursor: pointer;
}

.warehouse-action-field label:hover {
  border-color: #cbd5df;
}

.warehouse-action-field input {
  margin-top: 4px;
  accent-color: var(--marca);
}

.warehouse-action-field span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.warehouse-action-field strong {
  color: var(--graphite);
}

.warehouse-action-field small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.regularization-modal .warehouse-field {
  margin: 16px 18px 0;
}

.regularization-modal .warehouse-responsible-field {
  margin-top: 12px;
}

.regularization-modal .search-select-list {
  position: static;
  z-index: 90;
  max-height: 180px;
  box-shadow: none;
}

.purchase-receipt-panel {
  display: grid;
  gap: 12px;
  margin: 16px 18px 0;
  padding: 12px;
  background: #fbfcfd;
  border: 1px solid #d6dee7;
  border-radius: var(--radius);
}

.receipt-info-box {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: #f8fbf9;
  border: 1px solid #cfe9df;
  border-radius: var(--radius);
}

.receipt-info-box strong {
  color: var(--green);
  font-size: 0.9rem;
}

.receipt-info-box small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.35;
}

.receipt-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.purchase-receipt-allocation {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #dde5ed;
  border-radius: var(--radius);
}

.receipt-allocation-head {
  display: grid;
  gap: 4px;
}

.receipt-allocation-head strong {
  color: var(--graphite);
}

.receipt-allocation-head small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.35;
}

.receipt-allocation-list {
  display: grid;
  overflow: hidden;
  border: 1px solid #e2e8ef;
  border-radius: var(--radius);
}

.receipt-allocation-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(110px, auto) 110px;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #ffffff;
  border-bottom: 1px solid #edf1f5;
}

.receipt-allocation-row:nth-child(even) {
  background: var(--row-alt);
  box-shadow: var(--row-soft-shadow);
}

.receipt-allocation-row:last-child {
  border-bottom: 0;
}

.receipt-allocation-row > span:first-child,
.receipt-allocation-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.receipt-allocation-row strong {
  color: var(--graphite);
  overflow-wrap: anywhere;
}

.receipt-allocation-row small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
}

.receipt-allocation-meta {
  justify-items: end;
}

.receipt-allocation-row input {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  color: var(--graphite);
  background: #ffffff;
  border: 1px solid #cbd5df;
  border-radius: 8px;
  font: inherit;
  font-weight: 950;
  text-align: right;
}

.receipt-allocation-total {
  min-height: 34px;
  padding: 9px 10px;
  color: var(--muted);
  background: #f6f8fb;
  border: 1px solid #e1e7ee;
  border-radius: var(--radius);
  font-size: 0.78rem;
  font-weight: 900;
}

.receipt-allocation-total.ok {
  color: var(--green);
  background: var(--green-soft);
  border-color: #cfe9df;
}

.receipt-allocation-total.warn {
  color: var(--red);
  background: #fff5f6;
  border-color: rgba(166, 18, 28, 0.22);
}

.purchase-receipt-modal .warehouse-field,
.delivery-modal .warehouse-field {
  margin: 0;
}

.purchase-receipt-modal .search-select-list,
.delivery-modal .search-select-list {
  position: static;
  max-height: 180px;
  box-shadow: none;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 18px;
  background: #ffffff;
  border-top: 1px solid var(--line);
}

.sync-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 900;
  white-space: nowrap;
}

.sync-pending {
  color: var(--amber);
  background: var(--amber-soft);
}

.sync-progress {
  color: var(--blue);
  background: #e8f3f8;
}

.sync-sent {
  color: var(--green);
  background: var(--green-soft);
}

.muted-row td,
.empty-row td {
  color: var(--muted);
  font-weight: 800;
}

.desktop-preferred {
  display: inline;
}

.print-report {
  display: none;
}

@media (max-width: 1380px) {
  .topbar {
    grid-template-columns: auto minmax(240px, 1fr);
  }

  .top-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
}

@media (max-width: 980px) {
  .home-panel,
  .dds-header,
  .dds-layout,
  .tms-header {
    grid-template-columns: 1fr;
  }

  .home-module-grid,
  .dds-kpi-row,
  .dds-topic-columns,
  .tms-kpi-grid,
  .tms-base-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dds-header-actions,
  .tms-header-actions {
    min-width: 0;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .group-tabs,
  .subgroup-tabs,
  .checklist-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-header,
  .post-inspection-panel .panel-head {
    display: grid;
  }

  .dashboard-filter-control {
    width: 100%;
    margin-left: 0;
  }

  .post-filter {
    grid-template-columns: minmax(0, 1fr) auto;
    justify-content: stretch;
    min-width: 0;
  }

  .dashboard-workspace {
    grid-template-columns: 1fr;
  }

  .dashboard-sidebar {
    position: static;
  }

  .dashboard-indicator-toolbar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .dashboard-period-control {
    width: 100%;
  }

  .dashboard-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid,
  .dashboard-insight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .post-inspection-body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .post-checklist > summary,
  .post-status-box > summary,
  .launch-history-card > summary,
  .post-issue,
  .receipt-allocation-row,
  .receipt-form-grid,
  .expected-card,
  .warehouse-quantity-grid,
  .modal-summary {
    grid-template-columns: 1fr;
  }

  .post-checklist > summary::after,
  .post-status-box > summary::after,
  .launch-history-card > summary::after {
    justify-self: start;
  }

  .post-checklist-counts,
  .launch-history-badges,
  .receipt-allocation-meta,
  .post-issue-side {
    justify-content: flex-start;
    justify-items: start;
  }
}

@media (max-width: 720px) {
  html {
    scroll-behavior: auto;
  }

  html,
  body {
    width: 100%;
    max-width: 100%;
    min-height: 100%;
    overflow-y: auto;
    overscroll-behavior-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: manipulation;
  }

  input,
  select,
  textarea,
  button,
  .search-select-input,
  .quantity-input,
  .serial-input {
    font-size: 16px;
    touch-action: manipulation;
  }

  .app-shell,
  .app-view,
  .topbar,
  .topbar *,
  .home-view,
  .home-view *,
  .workspace,
  .workspace *,
  .form-band,
  .form-band *,
  .checklist-header,
  .checklist-header *,
  .sections,
  .sections *,
  .type-section,
  .type-section * {
    max-width: 100%;
    min-width: 0;
  }

  body.modal-open {
    position: static;
    top: auto !important;
    right: auto;
    left: auto;
    width: 100%;
    overflow: auto;
    overscroll-behavior-y: auto;
  }

  .modal-backdrop,
  .dds-modal-backdrop {
    align-items: flex-start;
    justify-items: stretch;
    place-items: start stretch;
    padding: 18px 8px 14px;
    padding-top: max(14px, calc(env(safe-area-inset-top) + 10px), var(--app-modal-safe-top));
    padding-right: max(8px, env(safe-area-inset-right));
    padding-bottom: max(14px, calc(env(safe-area-inset-bottom) + 10px));
    padding-left: max(8px, env(safe-area-inset-left));
    overflow: auto;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }

  .regularization-modal,
  .dds-modal-card,
  .tms-modal-card {
    width: 100%;
    max-height: calc(100svh - var(--app-modal-safe-top, 18px) - 16px);
    min-height: 0;
    align-self: start;
    border-radius: 16px 16px 10px 10px;
    box-shadow: 0 -18px 54px rgba(15, 23, 42, 0.28);
  }

  .regularization-modal.inventory-record-viewer {
    width: 100%;
    max-height: calc(100svh - var(--app-modal-safe-top, 18px) - 16px);
  }

  @supports not (height: 100dvh) {
    .regularization-modal,
    .dds-modal-card,
    .tms-modal-card {
      max-height: calc(100vh - var(--app-modal-safe-top, 18px) - 18px);
    }
  }

  .modal-head,
  .dds-modal-head,
  .tms-modal-card header {
    align-items: center;
    padding: 14px;
    background: #ffffff;
  }

  .modal-head h2,
  .dds-modal-head h3,
  .tms-modal-card header h3 {
    font-size: 1.08rem;
    line-height: 1.2;
  }

  .modal-close,
  .dds-modal-head .icon-button,
  .tms-modal-card .icon-button {
    flex: 0 0 auto;
    width: 42px;
    min-height: 42px;
  }

  .regularization-modal-body,
  .dds-modal-body,
  .tms-modal-body {
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 14px;
    touch-action: pan-y;
  }

  .modal-summary {
    gap: 8px;
    padding: 12px 14px 0;
  }

  .warehouse-quantity-panel,
  .purchase-receipt-panel,
  .delivery-panel,
  .replacement-photo-panel {
    margin: 12px 14px 0;
  }

  .replacement-photo-panel {
    grid-template-columns: 1fr;
  }

  .replacement-photo-button {
    width: 100%;
  }

  .modal-actions {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
    box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.06);
  }

  .modal-actions .ghost-button,
  .modal-actions .primary-button {
    width: 100%;
    min-height: 46px;
    justify-content: center;
  }

  .modal-backdrop input,
  .modal-backdrop select,
  .modal-backdrop textarea,
  .dds-modal-backdrop input,
  .dds-modal-backdrop select,
  .dds-modal-backdrop textarea {
    min-height: 46px;
    font-size: 16px;
  }

  .modal-backdrop .search-select,
  .dds-modal-backdrop .search-select {
    width: 100%;
  }

  .modal-backdrop .search-select-list,
  .dds-modal-backdrop .search-select-list {
    position: static;
    max-height: min(34vh, 260px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    box-shadow: none;
  }

  .modal-backdrop .search-select-option,
  .dds-modal-backdrop .search-select-option {
    min-height: 44px;
    padding-block: 10px;
  }

  .topbar {
    position: static;
    grid-template-columns: 1fr;
    gap: 12px;
    overflow-x: hidden;
    padding:
      12px
      max(10px, env(safe-area-inset-right))
      12px
      max(10px, env(safe-area-inset-left));
  }

  .brand {
    width: min(220px, 72vw);
    min-width: 0;
  }

  .title-block {
    min-width: 0;
    max-width: 100%;
  }

  .title-block h1 {
    overflow-wrap: anywhere;
  }

  .top-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    justify-self: stretch;
    align-items: stretch;
  }

  .offline-sync-box {
    width: 100%;
    flex: none;
  }

  .offline-sync-box > summary {
    width: 100%;
    min-height: 46px;
    padding-inline: 10px;
  }

  .offline-sync-box > summary span {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .offline-sync-panel {
    position: fixed;
    top: max(12px, env(safe-area-inset-top));
    right: max(10px, env(safe-area-inset-right));
    bottom: auto;
    left: max(10px, env(safe-area-inset-left));
    width: auto;
    min-width: 0;
    max-height: min(70dvh, 560px);
    border-radius: 16px;
  }

  .offline-sync-head {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .offline-sync-back {
    justify-self: end;
    min-height: 40px;
    white-space: nowrap;
  }

  .offline-sync-item {
    padding: 12px;
  }

  .mode-switch,
  .top-actions .icon-button,
  .top-actions .mode-button,
  .top-actions .ghost-button,
  .auth-user-pill {
    width: 100%;
    flex: none;
  }

  .top-actions .app-update-button {
    min-width: 0;
    padding-inline: 12px;
  }

  .top-actions .app-update-button span,
  .auth-user-pill span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .auth-user-pill {
    justify-content: center;
    max-width: none;
  }

  .auth-logout-button {
    grid-column: 1 / -1;
  }

  body[data-view="home"] {
    width: var(--app-visual-vw, 100vw);
    max-width: 100%;
    height: var(--app-visual-vh, 100dvh);
    min-height: var(--app-visual-vh, 100dvh);
    overflow: hidden;
  }

  body[data-view="home"] .app-shell {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    width: 100%;
    max-width: 100%;
    height: var(--app-visual-vh, 100dvh);
    min-height: var(--app-visual-vh, 100dvh);
    overflow: hidden;
  }

  body[data-view="home"] .topbar {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    align-items: center;
    min-height: 0;
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
    box-sizing: border-box;
    padding:
      max(7px, env(safe-area-inset-top))
      max(10px, env(safe-area-inset-right))
      8px
      max(10px, env(safe-area-inset-left));
  }

  body[data-view="home"] .brand {
    flex: 0 0 min(98px, 28vw);
    width: min(98px, 28vw);
    min-width: 0;
  }

  body[data-view="home"] .brand img {
    max-height: 34px;
  }

  body[data-view="home"] .title-block {
    flex: 1 1 0;
    align-self: center;
    min-width: 0;
    max-width: none;
    overflow: hidden;
  }

  body[data-view="home"] .title-block .eyebrow {
    margin-bottom: 1px;
    font-size: 0.62rem;
  }

  body[data-view="home"] .title-block h1 {
    font-size: clamp(1.12rem, 6vw, 1.42rem);
    line-height: 1.05;
    overflow-wrap: anywhere;
  }

  body[data-view="home"] .top-actions {
    display: grid;
    flex: 0 0 100%;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    justify-self: stretch;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  body[data-view="home"] .top-actions > * {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  body[data-view="home"] .top-actions span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body[data-view="home"] .auth-logout-button {
    grid-column: auto;
  }

  body[data-view="home"] .offline-sync-box > summary,
  body[data-view="home"] .top-actions .app-update-button,
  body[data-view="home"] .top-actions .ghost-button,
  body[data-view="home"] .auth-user-pill {
    min-height: 38px;
    padding-inline: 8px;
    font-size: 0.82rem;
  }

  body[data-view="home"] .home-view {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 8px;
    width: 100%;
    max-width: 100vw;
    height: 100%;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
    padding:
      8px
      max(10px, env(safe-area-inset-right))
      max(10px, env(safe-area-inset-bottom))
      max(10px, env(safe-area-inset-left));
  }

  body[data-view="home"] .app-update-notice {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px 10px;
    padding: 10px;
  }

  body[data-view="home"] .app-update-notice .primary-button {
    grid-column: 1 / -1;
    min-height: 36px;
  }

  body[data-view="home"] .home-module-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: auto;
    align-content: start;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    height: 100%;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
  }

  body[data-view="home"] .home-module-card {
    grid-template-columns: 38px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-content: center;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 0;
    height: auto;
    padding: 10px;
    overflow: hidden;
  }

  body[data-view="home"] .home-module-card > *,
  body[data-view="home"] .home-module-card > div {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
  }

  body[data-view="home"] .home-module-card .module-icon {
    width: 38px;
    height: 38px;
  }

  body[data-view="home"] .home-module-card .module-icon svg {
    width: 20px;
    height: 20px;
  }

  body[data-view="home"] .home-module-card .eyebrow {
    margin-bottom: 2px;
    font-size: 0.58rem;
    line-height: 1.1;
  }

  body[data-view="home"] .home-module-card h3 {
    font-size: clamp(0.86rem, 3.9vw, 1rem);
    line-height: 1.12;
    overflow-wrap: anywhere;
  }

  body[data-view="home"] .home-module-card p:not(.eyebrow) {
    margin-top: 4px;
    font-size: clamp(0.68rem, 3.1vw, 0.78rem);
    line-height: 1.22;
    overflow-wrap: anywhere;
  }

  body[data-view="home"] .home-module-card .primary-button {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 36px;
    padding-inline: 8px;
    font-size: 0.78rem;
    white-space: nowrap;
    overflow: hidden;
    justify-content: center;
  }

  body[data-view="home"] .home-module-card .primary-button span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body[data-view="home"] .home-module-card .primary-button svg {
    width: 16px;
    height: 16px;
  }

  @media (max-height: 700px) {
    body[data-view="home"] .topbar {
      gap: 6px 8px;
      padding-top: max(5px, env(safe-area-inset-top));
      padding-bottom: 6px;
    }

    body[data-view="home"] .brand img {
      max-height: 36px;
    }

    body[data-view="home"] .title-block h1 {
      font-size: clamp(1rem, 5.6vw, 1.25rem);
    }

    body[data-view="home"] .offline-sync-box > summary,
    body[data-view="home"] .top-actions .app-update-button,
    body[data-view="home"] .top-actions .ghost-button,
    body[data-view="home"] .auth-user-pill,
    body[data-view="home"] .home-module-card .primary-button {
      min-height: 34px;
      font-size: 0.76rem;
    }

    body[data-view="home"] .home-view,
    body[data-view="home"] .home-module-grid,
    body[data-view="home"] .home-module-card {
      gap: 6px;
    }

    body[data-view="home"] .home-module-grid {
      grid-auto-rows: minmax(0, 1fr);
    }

    body[data-view="home"] .home-module-card {
      height: 100%;
    }

    body[data-view="home"] .home-module-card {
      padding: 8px;
    }

    body[data-view="home"] .home-module-card .module-icon {
      width: 32px;
      height: 32px;
    }

    body[data-view="home"] .home-module-card p:not(.eyebrow) {
      font-size: 0.66rem;
      line-height: 1.16;
      overflow: hidden;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
    }
  }

  .mode-switch {
    order: -1;
    width: 100%;
  }

  .mode-switch,
  #exportButton {
    display: none;
  }

  .mode-button {
    min-width: 0;
  }

  .home-view,
  .dds-view,
  .tms-view,
  .warehouse-view,
  .electric-warehouse-view {
    padding: 14px 10px 30px;
  }

  .home-panel,
  .app-update-notice,
  .home-module-card {
    grid-template-columns: 1fr;
    overflow-x: hidden;
  }

  .app-view:not([hidden]),
  .dashboard-center-section.active {
    animation: none;
  }

  .home-module-card {
    align-items: stretch;
    padding: 16px;
  }

  .home-module-card h3,
  .home-module-card p,
  .home-copy h1,
  .home-copy p {
    overflow-wrap: anywhere;
  }

  .home-module-card .primary-button {
    white-space: normal;
  }

  .home-status-grid,
  .home-module-grid,
  .warehouse-mobile-head,
  .warehouse-mobile-filters,
  .warehouse-mobile-kpis,
    .warehouse-section > summary,
    .warehouse-group-card > summary,
    .warehouse-purchase-balance-toolbar,
    .warehouse-purchase-balance-card,
    .warehouse-issue-card,
    .dds-header-actions,
    .dds-kpi-row,
  .dds-topic-columns,
  .dds-evidence-grid,
  .tms-header-actions,
  .tms-kpi-grid,
  .tms-base-grid,
  .tms-modal-summary {
    grid-template-columns: 1fr;
  }

  .dds-metric-card-wide {
    grid-column: 1 / -1;
  }

  .warehouse-mobile-head > strong,
  .warehouse-section-actions,
  .warehouse-group-counts,
  .warehouse-issue-side {
    justify-self: start;
    justify-items: start;
  }

  .warehouse-mobile-filters > small {
    grid-column: 1;
  }

  .warehouse-search-clear {
    width: 100%;
  }

  .warehouse-purchase-balance-side {
    justify-items: start;
    text-align: left;
  }

  .warehouse-purchase-balance-side .regularization-button {
    width: 100%;
    justify-content: center;
  }

  .warehouse-triage-sections,
  .warehouse-section-content {
    padding-inline: 10px;
  }

  .warehouse-issue-card {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    column-gap: 10px;
    row-gap: 8px;
    padding: 14px 12px;
    border: 1px solid #dbe2ea;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(20, 24, 28, 0.045);
  }

  .warehouse-issue-main {
    grid-column: 1;
    grid-row: 1;
  }

  .warehouse-issue-side {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    justify-self: end;
    justify-items: end;
    min-width: 78px;
  }

  .warehouse-issue-side .regularization-button {
    width: auto;
    min-width: 72px;
    min-height: 38px;
    padding-inline: 12px;
  }

  .dds-view:not(.dds-detail-open) .dds-indicators,
  .dds-view:not(.dds-detail-open) .dds-schedule-panel {
    display: none;
  }

  .dds-participation-row {
    grid-template-columns: 1fr;
  }

  .dds-participation-meter {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .home-module-card .primary-button,
  .app-update-notice .primary-button,
  .view-home-button,
  .dds-evidence-card .primary-button,
  .dds-register-submit {
    width: 100%;
  }

  .dds-register-submit {
    width: calc(100% - 32px);
  }

  .dds-calendar-weekdays,
  .dds-calendar,
  .tms-calendar {
    gap: 4px;
  }

  .dds-calendar-weekdays {
    padding: 8px 8px 0;
    font-size: 0.58rem;
  }

  .dds-calendar,
  .tms-calendar {
    padding: 8px;
  }

  .tms-calendar-weekdays {
    padding: 8px 8px 0;
    font-size: 0.58rem;
  }

  .tms-day {
    gap: 4px;
    min-height: 76px;
    padding: 6px 5px;
    border-radius: 7px;
  }

  .tms-day span {
    font-size: 0.95rem;
    line-height: 1;
  }

  .tms-day small,
  .tms-day em {
    font-size: 0.5rem;
    line-height: 1.05;
  }

  .tms-day em {
    padding: 3px 4px;
  }

  .tms-team-card {
    grid-template-columns: 1fr;
  }

  .tms-team-status {
    justify-content: flex-start;
  }

  .tms-team-status-note {
    text-align: left;
  }

  .tms-team-actions {
    justify-content: stretch;
  }

  .tms-team-actions .ghost-button {
    flex: 1 1 130px;
  }

  .tms-base-section > header {
    align-items: flex-start;
    flex-direction: column;
  }

  .tms-base-section-actions {
    width: 100%;
    align-items: flex-start;
    justify-content: space-between;
  }

  .tms-base-section-actions > span {
    white-space: normal;
  }

  .tms-modal-card {
    width: calc(100vw - 16px);
    max-height: calc(var(--app-visual-vh, 100vh) - var(--app-modal-safe-top, 18px) - 18px);
  }

  .dds-day {
    align-content: start;
    gap: 3px;
    min-height: 0;
    padding: 6px 5px;
    border-radius: 7px;
    box-shadow: none;
    content-visibility: auto;
    contain-intrinsic-size: 120px;
  }

  .dds-day span {
    font-size: 0.82rem;
    line-height: 1;
  }

  .dds-day small {
    font-size: 0.46rem;
    line-height: 1.05;
  }

  .dds-day-topics {
    gap: 3px;
    max-height: none;
    overflow: visible;
  }

  .dds-day-topics em {
    min-height: 28px;
    padding: 4px 5px;
    border-radius: 5px;
    box-shadow: inset 3px 0 0 rgba(100, 116, 139, 0.32);
    transform: none;
    transition: none;
  }

  .dds-day-topics em.empty,
  .dds-day-topics em.dds-day-topic-planned,
  .dds-day-topics em.dds-day-topic-overdue,
  .dds-day-topics em.dds-day-topic-done {
    box-shadow: inset 3px 0 0 #94a3b8;
  }

  .dds-day-topics em.dds-day-topic-planned {
    box-shadow: inset 3px 0 0 var(--blue);
  }

  .dds-day-topics em.dds-day-topic-overdue {
    box-shadow: inset 3px 0 0 var(--red);
  }

  .dds-day-topics em.dds-day-topic-done {
    box-shadow: inset 3px 0 0 var(--green);
  }

  .dds-day-topics em.dds-day-topic:hover,
  .dds-day-topics em.dds-day-topic:active,
  .dds-day-topics em.empty:hover,
  .dds-day-topics em.empty:active,
  .dds-day-topics em.dds-day-topic-planned:hover,
  .dds-day-topics em.dds-day-topic-planned:active,
  .dds-day-topics em.dds-day-topic-overdue:hover,
  .dds-day-topics em.dds-day-topic-overdue:active,
  .dds-day-topics em.dds-day-topic-done:hover,
  .dds-day-topics em.dds-day-topic-done:active {
    transform: none;
  }

  .dds-day-topics b,
  .dds-day-topics i {
    font-size: 0.5rem;
    line-height: 1.12;
  }

  .dds-modal-grid {
    grid-template-columns: 1fr;
  }

  .dds-template-box {
    align-items: stretch;
    flex-direction: column;
  }

  .dds-template-download {
    justify-content: center;
    width: 100%;
    white-space: normal;
  }

  .dds-panel-head {
    align-items: flex-start;
  }

  .dds-schedule-head {
    display: grid;
    grid-template-columns: 1fr;
  }

  .dds-schedule-filter {
    width: 100%;
    min-width: 0;
  }

  .dds-schedule-panel .table-wrap {
    overflow-x: visible;
  }

  .dds-schedule-table {
    display: block;
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.86rem;
  }

  .dds-schedule-table thead {
    display: none;
  }

  .dds-schedule-table tbody,
  .dds-schedule-table tr,
  .dds-schedule-table td {
    display: block;
    width: 100%;
  }

  .dds-schedule-table tr {
    margin: 10px 0;
    padding: 10px 12px;
    background: #ffffff;
    border: 1px solid #d9e1eb;
    border-left: 4px solid var(--blue);
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(28, 38, 49, 0.06);
  }

  .dds-schedule-table tr.dds-no-program-row {
    border-left-color: #8bbde8;
    background: #f8fbff;
  }

  .dds-schedule-table td {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 6px 0;
    border-bottom: 0;
    background: transparent !important;
    box-shadow: none !important;
    overflow-wrap: anywhere;
  }

  .dds-schedule-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 950;
    line-height: 1.2;
    text-transform: uppercase;
  }

  .dds-schedule-table td[data-label="Tema"] {
    display: block;
    padding-top: 8px;
  }

  .dds-schedule-table td[data-label="Tema"]::before {
    display: block;
    margin-bottom: 4px;
  }

  .dds-schedule-table .dds-topic-cell {
    color: var(--ink);
    font-size: 0.9rem;
    font-weight: 900;
    line-height: 1.35;
  }

  .workspace {
    padding-top: 16px;
    max-width: 100%;
    overflow-x: hidden;
  }

  .post-inspection-body {
    grid-template-columns: 1fr;
  }

  .launch-history-meta {
    grid-template-columns: 1fr;
  }

  .photo-evidence-filters,
  .photo-evidence-card > summary,
  .photo-evidence-item {
    grid-template-columns: 1fr;
  }

  .photo-evidence-card > summary::after {
    justify-self: start;
  }

  .photo-frame {
    max-height: 260px;
  }

  .checklist-photo-panel {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .checklist-photo-actions {
    justify-items: stretch;
    min-width: 0;
  }

  .checklist-photo-button {
    width: 100%;
  }

  .warehouse-field {
    min-width: 0;
  }

  .modal-actions {
    display: grid;
  }

  .content,
  .sections,
  .type-section {
    max-width: 100%;
    overflow-x: hidden;
  }

  .motosserra-authorization-panel {
    grid-template-columns: 1fr;
  }

  .motosserra-authorization-options {
    justify-content: stretch;
  }

  .motosserra-authorization-options label {
    flex: 1 1 120px;
    justify-content: center;
  }

  .sections {
    overscroll-behavior-y: auto;
    -webkit-overflow-scrolling: touch;
    overflow-anchor: none;
  }

  .app-shell,
  .app-view,
  .workspace,
  .content,
  .sections,
  .type-section,
  .items-table,
  .items-table tbody,
  .item-row,
  .item-row td {
    touch-action: pan-y;
  }

  .quantity-input,
  .serial-input,
  .search-select-input,
  textarea {
    touch-action: manipulation;
  }

  .group-tabs,
  .subgroup-tabs,
  .checklist-tabs,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-band {
    gap: 12px;
    padding: 14px;
    scroll-margin-top: 10px;
  }

  .form-grid {
    gap: 11px;
  }

  .form-grid label,
  .notes-field {
    gap: 5px;
  }

  .notes-field textarea {
    min-height: 68px;
  }

  .toolbar {
    align-items: stretch;
  }

  .form-actions,
  .segmented,
  .ghost-button,
  .primary-button {
    width: 100%;
  }

  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .segmented {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .checklist-header {
    display: grid;
  }

  .progress-wrap {
    width: 100%;
    min-width: 0;
    text-align: left;
  }

  .items-table,
  .items-table tbody,
  .items-table tr,
  .items-table td {
    display: block;
    width: 100%;
  }

  .items-table thead {
    display: none;
  }

  .item-row {
    display: grid;
    gap: 10px;
    scroll-margin-block: 14px;
    padding: 14px;
    border-bottom: 1px solid var(--line);
    contain: layout paint style;
    content-visibility: auto;
    contain-intrinsic-size: 190px;
  }

  .item-row:last-child {
    border-bottom: 0;
  }

  .item-row td {
    padding: 0;
    border-bottom: 0;
  }

  .reference-cell {
    text-align: left;
  }

  .reference-cell::before,
  .quantity-cell::before,
  .status-cell::before,
  .photo-cell::before {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 900;
    text-transform: uppercase;
  }

  .reference-cell::before {
    content: "Referência";
  }

  .reference-cell::before {
    content: "Referência";
  }

  .quantity-cell::before {
    content: "Quantidade existente";
  }

  .status-cell::before {
    content: "Status";
  }

  .photo-cell::before {
    content: "Foto";
  }

  .status-pill {
    width: 100%;
  }

  .photo-cell {
    justify-items: stretch;
  }

  .photo-capture-button {
    width: 100%;
  }

  .quantity-input {
    min-height: 46px;
    font-size: 16px;
  }

  .quantity-control {
    justify-content: stretch;
  }

  .quantity-control .quantity-input {
    flex: 1;
    min-width: 0;
  }

  .replacement-button {
    width: auto;
    min-width: 104px;
    min-height: 46px;
    padding: 0 12px;
    border-radius: var(--radius);
  }

  .replacement-button span {
    display: inline;
    font-weight: 950;
  }

  .serial-field {
    max-width: none;
  }

  .serial-input {
    min-height: 46px;
    font-size: 16px;
  }

  .dashboard {
    padding-top: 16px;
  }

  .dashboard-header {
    display: grid;
  }

  .dashboard-actions,
  .dashboard-filter-control,
  .dashboard-filter-control select,
  .dashboard-actions .icon-button,
  .dashboard-actions .ghost-button,
  .file-button {
    width: 100%;
  }

  .dashboard-nav {
    grid-template-columns: 1fr;
  }

  .dashboard-nav button {
    min-height: 58px;
    padding: 10px;
  }

  .dashboard-sidebar-note {
    display: none;
  }

  .dashboard-metrics,
  .dashboard-grid,
  .dashboard-insight-grid,
  .dashboard-columns,
  .contract-performance-list {
    grid-template-columns: 1fr;
  }

  .dashboard-indicator-toolbar {
    padding: 12px;
  }

  .dashboard-period-control {
    min-width: 0;
  }

  .dash-metric {
    min-height: 88px;
  }

  .dashboard-table {
    min-width: 560px;
  }

  .dashboard-table.dds-schedule-table {
    min-width: 0;
    width: 100%;
  }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 7mm;
  }

  html,
  body {
    width: 100%;
    margin: 0;
    background: #ffffff;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .app-shell {
    display: none !important;
  }

  .print-report {
    display: block;
    color: #171a1d;
    background: #ffffff;
    font-size: 11px;
  }

  .print-page {
    display: flex;
    flex-direction: column;
    height: calc(297mm - 14mm);
    min-height: calc(297mm - 14mm);
    padding: 0;
    overflow: hidden;
  }

  .print-page + .print-page {
    break-before: page;
    page-break-before: always;
  }

  .print-header {
    display: grid;
    grid-template-columns: 148px minmax(0, 1fr) 44mm;
    gap: 12px;
    align-items: center;
    margin-bottom: 4mm;
    padding-bottom: 5mm;
    border-bottom: 2px solid var(--marca);
  }

  .print-brand {
    display: flex;
    align-items: center;
  }

  .print-header img {
    width: 142px;
    height: auto;
  }

  .print-header p {
    margin: 0 0 3px;
    color: var(--marca-escura);
    font-size: 9.5px;
    line-height: 1.1;
    font-weight: 900;
    text-transform: uppercase;
  }

  .print-header h1 {
    margin: 0;
    color: var(--graphite);
    font-size: 20px;
    line-height: 1.16;
  }

  .print-title small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
  }

  .print-stamp {
    align-self: stretch;
    display: grid;
    align-content: center;
    gap: 1.5px;
    padding: 5px 7px;
    border: 1px solid #cfd6df;
    border-radius: 4px;
    background: #f8fafc;
  }

  .print-stamp span {
    color: var(--muted);
    font-size: 8.5px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .print-stamp strong {
    overflow-wrap: anywhere;
    color: var(--graphite);
    font-size: 10px;
    line-height: 1.2;
  }

  .print-continuation-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 5mm;
    padding-bottom: 3mm;
    border-bottom: 2px solid var(--marca);
  }

  .print-continuation-header strong {
    color: var(--graphite);
    font-size: 15px;
    line-height: 1.2;
  }

  .print-continuation-header span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 900;
    text-align: right;
    text-transform: uppercase;
  }

  .print-meta,
  .print-summary {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
    align-items: stretch;
    margin-top: 0;
  }

  .print-summary {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin-top: 7px;
  }

  .print-meta div,
  .print-summary div,
  .print-notes {
    display: flex;
    min-height: 13.5mm;
    padding: 5.5px 7px;
    border: 1px solid #cfd6df;
    border-radius: 4px;
    background: #ffffff;
    break-inside: avoid;
    box-sizing: border-box;
    flex-direction: column;
    justify-content: center;
  }

  .print-meta span,
  .print-summary span,
  .print-notes span {
    display: block;
    margin-bottom: 2.5px;
    color: var(--muted);
    font-size: 8.4px;
    line-height: 1.15;
    font-weight: 900;
    text-transform: uppercase;
  }

  .print-meta strong,
  .print-summary strong {
    display: block;
    overflow-wrap: anywhere;
    color: var(--graphite);
    font-size: 12px;
    line-height: 1.25;
  }

  .print-notes {
    margin-top: 7px;
  }

  .print-notes p {
    margin: 0;
    font-size: 11px;
    font-weight: 700;
  }

  .print-table {
    width: 100%;
    margin-top: 8px;
    border-collapse: collapse;
    border: 1px solid #cfd6df;
    font-size: 10.2px;
    line-height: 1.24;
  }

  .print-col-type {
    width: 13%;
  }

  .print-col-item {
    width: 56%;
  }

  .print-col-number {
    width: 7%;
  }

  .print-col-status {
    width: 17%;
  }

  .print-table thead {
    display: table-header-group;
  }

  .print-table th,
  .print-table td {
    padding: 4.5px 5px;
    border: 1px solid #cfd6df;
    vertical-align: top;
    text-align: left;
    break-inside: avoid;
  }

  .print-table th {
    color: #ffffff;
    background: var(--graphite);
    font-size: 9px;
    line-height: 1.2;
    font-weight: 900;
    text-align: center;
    text-transform: uppercase;
    vertical-align: middle;
  }

  .print-table tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .print-table .numeric {
    text-align: center;
    white-space: nowrap;
  }

  .print-table td:nth-child(1),
  .print-table td:nth-child(3),
  .print-table td:nth-child(4),
  .print-table td:nth-child(5) {
    text-align: center;
    vertical-align: middle;
  }

  .print-table td:nth-child(2) {
    text-align: left;
  }

  .print-item-serial {
    display: block;
    margin-top: 2px;
    color: var(--graphite);
    font-size: 9px;
    font-weight: 900;
  }

  .print-item-description {
    display: block;
  }

  .print-replacement-photo-thumb {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 34mm;
    max-width: 34mm;
    min-height: 20mm;
    margin: 2mm 0 0;
    padding: 1mm;
    color: var(--graphite);
    background: #ffffff;
    border: 1px solid #cfd6df;
    border-radius: 3px;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .print-replacement-photo-thumb img {
    display: block;
    width: 100%;
    max-height: 26mm;
    object-fit: contain;
    filter: none !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    forced-color-adjust: none;
  }

  .print-replacement-photo-thumb figcaption {
    margin-top: 1mm;
    color: var(--marca-escura);
    font-size: 7.8px;
    line-height: 1.15;
    font-weight: 950;
    text-align: center;
    text-transform: uppercase;
  }

  .print-replacement-photo-thumb.missing {
    gap: 1mm;
    color: var(--muted);
    background: #fff7ed;
    border-style: dashed;
    font-size: 7.8px;
    line-height: 1.2;
    font-weight: 850;
    text-align: center;
  }

  .print-replacement-photo-thumb.missing strong {
    color: var(--marca-escura);
    font-size: 8px;
    text-transform: uppercase;
  }

  .print-photo-section {
    width: 100%;
    margin: 7mm auto 0;
    text-align: center;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .print-photo-section > span {
    display: block;
    margin-bottom: 2mm;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.2;
    font-weight: 900;
    text-transform: uppercase;
  }

  .print-photo-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 150mm;
    min-height: 52mm;
    margin: 0 auto;
    padding: 2mm;
    background: #f8fafc;
    border: 1px solid #cfd6df;
    border-radius: 4px;
  }

  .print-photo-frame img {
    display: block;
    max-width: 144mm;
    max-height: 88mm;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: none !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    forced-color-adjust: none;
  }

  .print-photo-caption {
    max-width: 150mm;
    margin: 2mm auto 0;
    color: var(--graphite);
    font-size: 9.5px;
    line-height: 1.3;
    font-weight: 800;
  }

  .print-photo-placeholder {
    display: grid;
    place-items: center;
    min-height: 42mm;
    max-width: 150mm;
    margin: 0 auto;
    color: var(--muted);
    background: #f8fafc;
    border: 1px dashed #aeb9c5;
    border-radius: 4px;
    font-size: 10.5px;
    font-weight: 900;
  }

  .print-signatures {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16mm;
    margin-top: auto;
    padding-top: 19mm;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .print-signature-page {
    justify-content: flex-end;
  }

  .print-signature-page .print-signatures {
    margin-top: auto;
    padding-top: 0;
    padding-bottom: 16mm;
  }

  .print-photo-signature-page {
    justify-content: flex-end;
  }

  .print-closing-block {
    width: 100%;
    margin-top: auto;
    padding-bottom: 12mm;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .print-photo-signature-page .print-photo-section {
    margin: 0 auto 5mm;
  }

  .print-photo-signature-page .print-photo-frame {
    max-width: 162mm;
    min-height: 74mm;
  }

  .print-photo-signature-page .print-photo-frame img {
    max-width: 156mm;
    max-height: 104mm;
  }

  .print-photo-signature-page .print-photo-caption {
    max-width: 166mm;
    font-size: 10px;
  }

  .print-photo-signature-page .print-photo-placeholder {
    max-width: 162mm;
    min-height: 66mm;
  }

  .print-photo-signature-page .print-signatures {
    margin-top: 0;
    padding-top: 8mm;
    padding-bottom: 0;
  }

  .signature-box {
    min-height: 29mm;
    padding-top: 15mm;
    border-top: 1px solid #171a1d;
    text-align: center;
  }

  .signature-box span {
    display: block;
    color: var(--muted);
    font-size: 9.5px;
    line-height: 1.2;
    font-weight: 900;
    text-transform: uppercase;
  }

  .signature-box strong {
    display: block;
    margin-top: 3px;
    color: var(--graphite);
    font-size: 11.5px;
    line-height: 1.25;
  }

  .print-pending td {
    background: #fff1f2;
  }

  .print-extra td {
    background: #eff6ff;
  }

  .print-replace td {
    background: #fff7ed;
  }

  .print-ok td {
    background: #f0fdf4;
  }

  .dds-print-page {
    color: #171a1d;
  }

  .dds-print-header {
    grid-template-columns: 136px minmax(0, 1fr) 58mm;
    margin-bottom: 3mm;
  }

  .dds-print-topic-band {
    display: grid;
    gap: 2mm;
    margin-bottom: 3mm;
    padding: 3mm 4mm;
    background: #f8fafc;
    border: 1px solid #cfd6df;
    border-left: 3px solid var(--green);
    border-radius: 4px;
    break-inside: avoid;
  }

  .dds-print-topic-band span,
  .dds-print-meta-grid span,
  .dds-print-guidance-grid span,
  .dds-print-photos > span,
  .dds-print-presence-card > span,
  .dds-print-participants-card header span {
    color: var(--muted);
    font-size: 8.5px;
    line-height: 1.15;
    font-weight: 900;
    text-transform: uppercase;
  }

  .dds-print-topic-band strong {
    color: var(--graphite);
    font-size: 15px;
    line-height: 1.2;
    font-weight: 950;
  }

  .dds-print-topic-band p {
    margin: 0;
    color: var(--ink);
    font-size: 10.5px;
    line-height: 1.35;
    font-weight: 750;
  }

  .dds-print-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
    margin-bottom: 3mm;
  }

  .dds-print-meta-grid div {
    display: grid;
    align-content: center;
    gap: 2px;
    min-height: 13mm;
    padding: 5px 7px;
    background: #ffffff;
    border: 1px solid #cfd6df;
    border-radius: 4px;
    box-sizing: border-box;
  }

  .dds-print-meta-grid strong {
    color: var(--graphite);
    font-size: 10.5px;
    line-height: 1.25;
    font-weight: 900;
    overflow-wrap: anywhere;
  }

  .dds-print-guidance-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    margin-bottom: 4mm;
    break-inside: avoid;
  }

  .dds-print-guidance-grid article,
  .dds-print-presence-card,
  .dds-print-participants-card {
    padding: 7px;
    background: #ffffff;
    border: 1px solid #cfd6df;
    border-radius: 4px;
    box-sizing: border-box;
  }

  .dds-print-guidance-grid ol {
    margin: 5px 0 0;
    padding-left: 17px;
    color: var(--ink);
    font-size: 10px;
    line-height: 1.34;
    font-weight: 750;
  }

  .dds-print-guidance-grid li + li {
    margin-top: 2px;
  }

  .dds-print-guidance-grid p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
  }

  .dds-print-photos {
    display: grid;
    gap: 2mm;
    flex: 1 1 auto;
    min-height: 0;
  }

  .dds-print-photo-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5mm;
    align-items: stretch;
    min-height: 0;
  }

  .dds-print-photo-card {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 2mm;
    margin: 0;
    min-height: 0;
  }

  .dds-print-photo-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 119mm;
    padding: 2mm;
    background: #f8fafc;
    border: 1px solid #cfd6df;
    border-radius: 4px;
    box-sizing: border-box;
  }

  .dds-print-photo-frame img {
    display: block;
    max-width: 100%;
    max-height: 118mm;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: none !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    forced-color-adjust: none;
  }

  .dds-print-photo-card figcaption {
    display: grid;
    gap: 1px;
    color: var(--muted);
    font-size: 8.8px;
    line-height: 1.22;
    font-weight: 800;
    text-align: center;
  }

  .dds-print-photo-card figcaption strong {
    color: var(--graphite);
    font-size: 9.5px;
    text-transform: uppercase;
  }

  .dds-print-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 38mm;
    padding: 4mm;
    color: var(--muted);
    background: #f8fafc;
    border: 1px dashed #aeb9c5;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 900;
    text-align: center;
    box-sizing: border-box;
  }

  .dds-print-attendance-layout {
    display: grid;
    grid-template-columns: minmax(0, 2.15fr) minmax(42mm, 1fr);
    gap: 4mm;
    align-items: start;
    flex: 1 1 auto;
    min-height: 0;
  }

  .dds-print-presence-card,
  .dds-print-participants-card {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 2mm;
    min-height: 0;
    break-inside: avoid;
  }

  .dds-print-attendance-page .dds-print-presence-card {
    grid-template-rows: auto auto;
    align-content: start;
  }

  .dds-print-attendance-page .dds-print-participants-card {
    grid-template-rows: auto minmax(0, 1fr);
  }

  .dds-print-presence-frame {
    display: grid;
    place-items: center;
    align-self: start;
    min-height: 0;
    padding: 1.5mm;
    background: #ffffff;
    border: 1px solid #cfd6df;
    border-radius: 4px;
    overflow: hidden;
    box-sizing: border-box;
  }

  .dds-print-presence-frame.image img {
    display: block;
    max-width: 100%;
    max-height: 184mm;
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: none !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    forced-color-adjust: none;
  }

  .dds-print-presence-frame.pdf-preview img {
    width: 100%;
    max-height: 184mm;
    object-fit: contain;
  }

  .dds-print-presence-frame.pdf object {
    display: block;
    width: 100%;
    height: 184mm;
    border: 0;
    background: #ffffff;
  }

  .dds-print-presence-frame.file {
    align-content: center;
    gap: 2mm;
    padding: 8mm;
    color: var(--graphite);
    text-align: center;
  }

  .dds-print-presence-frame.file strong {
    font-size: 15px;
  }

  .dds-print-presence-frame.file span,
  .dds-print-presence-frame.file small,
  .dds-print-presence-frame.file em {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    overflow-wrap: anywhere;
  }

  .dds-print-participants-card header {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: flex-end;
    padding-bottom: 2mm;
    border-bottom: 1px solid #dfe5ec;
  }

  .dds-print-participants-card header strong {
    color: var(--graphite);
    font-size: 12px;
    line-height: 1;
    font-weight: 950;
  }

  .dds-print-participant-list {
    display: grid;
    align-content: start;
    gap: 2px;
    min-height: 0;
  }

  .dds-print-participant-list.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px 5px;
  }

  .dds-print-participant {
    display: grid;
    grid-template-columns: 13px minmax(0, 1fr);
    gap: 5px;
    align-items: start;
    padding: 2.5px 3px;
    border: 1px solid #dfe5ec;
    border-radius: 3px;
    background: #ffffff;
    break-inside: avoid;
  }

  .dds-print-participant:nth-child(even) {
    background: #f8fafc;
  }

  .dds-print-participant.present {
    background: #f0fdf4;
    border-color: #bfe7ce;
  }

  .dds-print-participant > span {
    display: grid;
    place-items: center;
    width: 11px;
    height: 11px;
    border: 1px solid #6b7280;
    color: #007a53;
    font-size: 8px;
    line-height: 1;
    font-weight: 950;
  }

  .dds-print-participant strong {
    display: block;
    color: var(--graphite);
    font-size: 8px;
    line-height: 1.15;
    font-weight: 900;
  }

  .dds-print-participant small {
    display: block;
    margin-top: 1px;
    color: var(--muted);
    font-size: 7px;
    line-height: 1.1;
    font-weight: 800;
  }

  .dds-print-participants-card.full {
    flex: 1 1 auto;
    min-height: 0;
  }
}

@media (max-width: 720px) {
  body[data-view="home"],
  body[data-view="home"] .app-shell {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    overscroll-behavior: none;
  }

  body[data-view="home"] .topbar {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    width: 100vw;
    max-width: 100vw;
    overflow: hidden;
    gap: 7px 9px;
  }

  body[data-view="home"] .top-actions {
    display: grid;
    flex: 0 0 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: minmax(34px, auto);
    gap: 6px;
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
    min-width: 0 !important;
    box-sizing: border-box;
    overflow: hidden;
  }

  body[data-view="home"] .top-actions > *,
  body[data-view="home"] .top-actions .icon-button,
  body[data-view="home"] .top-actions .ghost-button,
  body[data-view="home"] .auth-user-pill,
  body[data-view="home"] .offline-sync-box > summary {
    width: 100%;
    max-width: 100%;
    min-width: 0 !important;
    box-sizing: border-box;
    overflow: hidden;
    justify-content: center;
    min-height: 34px;
    padding-inline: 8px;
    white-space: nowrap;
  }

  body[data-view="home"] .auth-logout-button {
    grid-column: auto;
  }

  body[data-view="home"] .home-view {
    width: 100%;
    max-width: 100vw;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    overflow: hidden;
    padding:
      8px
      max(10px, env(safe-area-inset-right))
      max(10px, env(safe-area-inset-bottom))
      max(10px, env(safe-area-inset-left));
  }

  body[data-view="home"] .home-module-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: auto;
    align-content: start;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  body[data-view="home"] .home-module-card {
    grid-template-columns: 38px minmax(0, 1fr) 74px;
    grid-template-rows: auto;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto;
    min-height: 72px;
    padding: 9px;
    overflow: hidden;
  }

  body[data-view="home"] .home-module-card h3,
  body[data-view="home"] .home-module-card .eyebrow {
    display: block;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
    -webkit-line-clamp: unset;
  }

  body[data-view="home"] .home-module-card h3 {
    font-size: clamp(0.82rem, 3.8vw, 0.98rem);
    line-height: 1.14;
  }

  body[data-view="home"] .home-module-card .eyebrow {
    margin-bottom: 2px;
    font-size: 0.56rem;
    line-height: 1.05;
  }

  body[data-view="home"] .home-module-card p:not(.eyebrow) {
    display: none;
  }

  body[data-view="home"] .home-module-card > div {
    min-width: 0;
    overflow: hidden;
  }

  body[data-view="home"] .home-module-card .primary-button {
    grid-column: 3;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 38px;
    padding-inline: 9px;
    font-size: 0.76rem;
    white-space: nowrap;
    overflow: hidden;
    justify-content: center;
  }

  body[data-view="home"] .home-module-card .primary-button span {
    font-size: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body[data-view="home"] .home-module-card .primary-button span::after {
    content: "Abrir";
    font-size: 0.76rem;
  }
}

@media (max-width: 380px), (max-height: 700px) {
  body[data-view="home"] .topbar {
    gap: 5px 7px;
  }

  body[data-view="home"] .top-actions {
    grid-auto-rows: minmax(32px, auto);
    gap: 5px;
  }

  body[data-view="home"] .offline-sync-box > summary,
  body[data-view="home"] .top-actions .icon-button,
  body[data-view="home"] .top-actions .ghost-button,
  body[data-view="home"] .auth-user-pill {
    min-height: 32px;
    font-size: 0.74rem;
  }

  body[data-view="home"] .home-view {
    gap: 6px;
    padding-top: 6px;
    padding-bottom: max(6px, env(safe-area-inset-bottom));
  }

  body[data-view="home"] .home-module-grid {
    gap: 6px;
  }

  body[data-view="home"] .home-module-card {
    grid-template-columns: 32px minmax(0, 1fr) 66px;
    min-height: 62px;
    padding: 7px;
    gap: 7px;
  }

  body[data-view="home"] .home-module-card .module-icon {
    width: 32px;
    height: 32px;
  }

  body[data-view="home"] .home-module-card .module-icon svg {
    width: 18px;
    height: 18px;
  }

  body[data-view="home"] .home-module-card h3 {
    font-size: 0.82rem;
    line-height: 1.08;
  }

  body[data-view="home"] .home-module-card .primary-button {
    min-height: 32px;
    font-size: 0.68rem;
    padding-inline: 7px;
  }

  body[data-view="home"] .home-module-card .primary-button span::after {
    font-size: 0.68rem;
  }
}

@media (max-width: 720px) {
  body[data-view="home"] .topbar {
    gap: 9px 10px;
    padding:
      max(10px, env(safe-area-inset-top))
      max(12px, env(safe-area-inset-right))
      11px
      max(12px, env(safe-area-inset-left));
  }

  body[data-view="home"] .brand {
    flex: 0 0 clamp(112px, 31vw, 138px);
    width: clamp(112px, 31vw, 138px);
  }

  body[data-view="home"] .brand img {
    max-height: 46px;
  }

  body[data-view="home"] .title-block .eyebrow {
    margin-bottom: 2px;
    font-size: clamp(0.7rem, 2.5vw, 0.78rem);
  }

  body[data-view="home"] .title-block h1 {
    font-size: clamp(1.38rem, 5.3vw, 1.72rem);
    line-height: 1.08;
  }

  body[data-view="home"] .top-actions {
    grid-auto-rows: minmax(44px, auto);
    gap: 8px;
  }

  body[data-view="home"] .offline-sync-box > summary,
  body[data-view="home"] .top-actions .icon-button,
  body[data-view="home"] .top-actions .ghost-button,
  body[data-view="home"] .top-actions .app-update-button,
  body[data-view="home"] .auth-user-pill {
    min-height: 44px;
    padding-inline: 10px;
    font-size: 0.9rem;
  }

  body[data-view="home"] .offline-sync-box > summary svg,
  body[data-view="home"] .top-actions .icon-button svg,
  body[data-view="home"] .top-actions .ghost-button svg,
  body[data-view="home"] .auth-user-pill svg {
    width: 20px;
    height: 20px;
  }

  body[data-view="home"] .home-view {
    gap: 10px;
    padding:
      10px
      max(12px, env(safe-area-inset-right))
      max(10px, env(safe-area-inset-bottom))
      max(12px, env(safe-area-inset-left));
  }

  body[data-view="home"] .home-module-grid {
    grid-auto-rows: minmax(0, 1fr);
    gap: 10px;
  }

  body[data-view="home"] .home-module-card {
    grid-template-columns: 50px minmax(0, 1fr) 92px;
    min-height: 92px;
    height: 100%;
    padding: 13px;
    gap: 12px;
  }

  body[data-view="home"] .home-module-card .module-icon {
    width: 50px;
    height: 50px;
  }

  body[data-view="home"] .home-module-card .module-icon svg {
    width: 26px;
    height: 26px;
  }

  body[data-view="home"] .home-module-card .eyebrow {
    margin-bottom: 3px;
    font-size: clamp(0.66rem, 2.35vw, 0.75rem);
    line-height: 1.08;
  }

  body[data-view="home"] .home-module-card h3 {
    font-size: clamp(1.02rem, 4.35vw, 1.2rem);
    line-height: 1.08;
  }

  body[data-view="home"] .home-module-card .primary-button {
    min-height: 52px;
    padding-inline: 12px;
  }

  body[data-view="home"] .home-module-card .primary-button span::after {
    font-size: 0.95rem;
  }

  body[data-view="home"] .home-module-card .primary-button svg {
    width: 21px;
    height: 21px;
  }
}

@media (max-width: 380px), (max-height: 700px) {
  body[data-view="home"] .brand {
    flex-basis: clamp(102px, 29vw, 124px);
    width: clamp(102px, 29vw, 124px);
  }

  body[data-view="home"] .brand img {
    max-height: 42px;
  }

  body[data-view="home"] .title-block h1 {
    font-size: clamp(1.25rem, 5vw, 1.5rem);
  }

  body[data-view="home"] .top-actions {
    grid-auto-rows: minmax(40px, auto);
  }

  body[data-view="home"] .offline-sync-box > summary,
  body[data-view="home"] .top-actions .icon-button,
  body[data-view="home"] .top-actions .ghost-button,
  body[data-view="home"] .top-actions .app-update-button,
  body[data-view="home"] .auth-user-pill {
    min-height: 40px;
    font-size: 0.84rem;
  }

  body[data-view="home"] .home-module-card {
    grid-template-columns: 44px minmax(0, 1fr) 82px;
    min-height: 78px;
    padding: 10px;
    gap: 9px;
  }

  body[data-view="home"] .home-module-card .module-icon {
    width: 44px;
    height: 44px;
  }

  body[data-view="home"] .home-module-card .module-icon svg {
    width: 23px;
    height: 23px;
  }

  body[data-view="home"] .home-module-card h3 {
    font-size: 0.98rem;
    line-height: 1.08;
  }

  body[data-view="home"] .home-module-card .eyebrow {
    font-size: 0.62rem;
  }

  body[data-view="home"] .home-module-card .primary-button {
    min-height: 44px;
    padding-inline: 9px;
  }

  body[data-view="home"] .home-module-card .primary-button span::after {
    font-size: 0.84rem;
  }
}

@media (max-width: 720px) {
  body[data-view="home"] .topbar {
    gap: 11px 12px;
    padding:
      max(12px, env(safe-area-inset-top))
      max(14px, env(safe-area-inset-right))
      12px
      max(14px, env(safe-area-inset-left));
  }

  body[data-view="home"] .brand {
    flex-basis: clamp(126px, 34vw, 154px);
    width: clamp(126px, 34vw, 154px);
  }

  body[data-view="home"] .brand img {
    max-height: 52px;
  }

  body[data-view="home"] .title-block .eyebrow {
    font-size: clamp(0.76rem, 2.7vw, 0.86rem);
  }

  body[data-view="home"] .title-block h1 {
    font-size: clamp(1.58rem, 5.85vw, 1.95rem);
    line-height: 1.06;
  }

  body[data-view="home"] .top-actions {
    grid-auto-rows: minmax(48px, auto);
    gap: 9px;
  }

  body[data-view="home"] .offline-sync-box > summary,
  body[data-view="home"] .top-actions .icon-button,
  body[data-view="home"] .top-actions .ghost-button,
  body[data-view="home"] .top-actions .app-update-button,
  body[data-view="home"] .auth-user-pill {
    min-height: 48px;
    font-size: 0.98rem;
  }

  body[data-view="home"] .offline-sync-box > summary svg,
  body[data-view="home"] .top-actions .icon-button svg,
  body[data-view="home"] .top-actions .ghost-button svg,
  body[data-view="home"] .auth-user-pill svg {
    width: 22px;
    height: 22px;
  }

  body[data-view="home"] .home-view {
    gap: 12px;
    padding:
      12px
      max(14px, env(safe-area-inset-right))
      max(12px, env(safe-area-inset-bottom))
      max(14px, env(safe-area-inset-left));
  }

  body[data-view="home"] .home-module-grid {
    gap: 12px;
  }

  body[data-view="home"] .home-module-card {
    grid-template-columns: 58px minmax(0, 1fr) 104px;
    min-height: 112px;
    padding: 17px 14px;
    gap: 14px;
  }

  body[data-view="home"] .home-module-card .module-icon {
    width: 58px;
    height: 58px;
  }

  body[data-view="home"] .home-module-card .module-icon svg {
    width: 30px;
    height: 30px;
  }

  body[data-view="home"] .home-module-card .eyebrow {
    font-size: clamp(0.74rem, 2.6vw, 0.84rem);
  }

  body[data-view="home"] .home-module-card h3 {
    font-size: clamp(1.16rem, 4.8vw, 1.36rem);
    line-height: 1.07;
  }

  body[data-view="home"] .home-module-card .primary-button {
    min-height: 58px;
    padding-inline: 14px;
  }

  body[data-view="home"] .home-module-card .primary-button span::after {
    font-size: 1.05rem;
  }
}

@media (max-width: 380px), (max-height: 700px) {
  body[data-view="home"] .brand {
    flex-basis: clamp(112px, 31vw, 136px);
    width: clamp(112px, 31vw, 136px);
  }

  body[data-view="home"] .brand img {
    max-height: 46px;
  }

  body[data-view="home"] .title-block h1 {
    font-size: clamp(1.36rem, 5.35vw, 1.62rem);
  }

  body[data-view="home"] .top-actions {
    grid-auto-rows: minmax(43px, auto);
  }

  body[data-view="home"] .offline-sync-box > summary,
  body[data-view="home"] .top-actions .icon-button,
  body[data-view="home"] .top-actions .ghost-button,
  body[data-view="home"] .top-actions .app-update-button,
  body[data-view="home"] .auth-user-pill {
    min-height: 43px;
    font-size: 0.9rem;
  }

  body[data-view="home"] .home-module-card {
    grid-template-columns: 50px minmax(0, 1fr) 92px;
    min-height: 92px;
    padding: 13px 11px;
    gap: 11px;
  }

  body[data-view="home"] .home-module-card .module-icon {
    width: 50px;
    height: 50px;
  }

  body[data-view="home"] .home-module-card .module-icon svg {
    width: 26px;
    height: 26px;
  }

  body[data-view="home"] .home-module-card h3 {
    font-size: 1.08rem;
  }

  body[data-view="home"] .home-module-card .eyebrow {
    font-size: 0.68rem;
  }

  body[data-view="home"] .home-module-card .primary-button {
    min-height: 50px;
  }

  body[data-view="home"] .home-module-card .primary-button span::after {
    font-size: 0.95rem;
  }
}

/* Final mobile viewport guard for iOS/Android password bars and safe areas.
   v0130: no body usamos 'clip' — 'hidden' transforma o body em conteiner de
   rolagem e quebra o position:sticky do cabecalho e do menu lateral. */
html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

.auth-gate,
.auth-card,
.auth-brand,
.auth-form,
.auth-form label,
.auth-form input,
.auth-form button,
.app-shell,
.app-view,
.topbar {
  max-width: 100%;
  box-sizing: border-box;
}

.auth-gate {
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
  padding-left: max(14px, env(safe-area-inset-left));
  padding-right: max(14px, env(safe-area-inset-right));
}

.auth-card {
  width: min(520px, 100%);
  min-width: 0;
  overflow: hidden;
}

.auth-brand > div,
.auth-form,
.auth-form label {
  min-width: 0;
}

.auth-brand h1,
.auth-brand small,
.auth-form small,
.auth-checkbox span {
  overflow-wrap: anywhere;
}

@media (max-width: 720px) {
  .auth-gate {
    place-items: start stretch;
    min-height: var(--app-visual-vh, 100svh);
    max-height: var(--app-visual-vh, 100dvh);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding:
      max(18px, env(safe-area-inset-top))
      max(14px, env(safe-area-inset-right))
      max(18px, env(safe-area-inset-bottom))
      max(14px, env(safe-area-inset-left));
  }

  .auth-card {
    width: 100%;
    max-width: calc(100dvw - 28px);
    margin-inline: auto;
    padding: clamp(18px, 5vw, 24px);
  }

  .auth-brand {
    grid-template-columns: 1fr;
    gap: 14px;
    align-items: start;
    text-align: left;
  }

  .auth-brand img {
    width: min(220px, 70vw);
    max-width: 100%;
    justify-self: center;
  }

  .auth-brand h1 {
    font-size: clamp(1.8rem, 7.6vw, 2.28rem);
    line-height: 1.04;
  }

  .auth-brand small {
    display: block;
    max-width: 100%;
    line-height: 1.35;
  }

  .auth-form input,
  .auth-form button {
    width: 100%;
    min-width: 0;
    font-size: 16px;
  }

  .auth-checkbox {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: flex-start;
  }

  body[data-view="home"],
  body[data-view="home"] .app-shell,
  body[data-view="home"] .topbar,
  body[data-view="home"] .home-view {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  body[data-view="home"] {
    height: var(--app-visual-vh, 100dvh);
    min-height: var(--app-visual-vh, 100dvh);
  }

  body[data-view="home"] .app-shell {
    height: var(--app-visual-vh, 100dvh);
    min-height: var(--app-visual-vh, 100dvh);
  }

  body[data-view="home"] .topbar,
  body[data-view="home"] .home-view {
    padding-left: max(10px, env(safe-area-inset-left));
    padding-right: max(10px, env(safe-area-inset-right));
  }

  body[data-view="home"] .top-actions {
    width: 100%;
    max-width: 100%;
  }

  .app-view,
  .workspace,
  .content,
  .sections,
  .type-section,
  .dashboard-shell,
  .dashboard-main,
  .dashboard-workspace,
  .warehouse-view,
  .works-view,
  .electric-warehouse-view,
  .electric-warehouse-workspace,
  .warehouse-page,
  .warehouse-panel,
  .warehouse-section,
  .warehouse-group-card,
  .warehouse-issue-card,
  .dds-view,
  .dds-page,
  .dds-calendar-panel,
  .dds-topic-panel,
  .tms-view,
  .tms-page,
  .users-view,
  .users-admin-mount,
  .regularization-modal,
  .dds-modal-card,
  .tms-modal-card {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .regularization-modal-body,
  .dds-modal-body,
  .tms-modal-body,
  .warehouse-section-content,
  .dashboard-content {
    overflow-x: hidden;
  }

  input,
  select,
  textarea,
  button {
    max-width: 100%;
  }

  body.mobile-tight-viewport[data-view="home"] .topbar {
    gap: 6px 8px;
  }

  body.mobile-tight-viewport[data-view="home"] .home-module-card {
    min-height: 0;
  }
}

/* Mobile compatibility authority: keep iOS/Android safe-area, password bars
   and soft keyboards from pushing the app into horizontal overflow. */
@media (max-width: 720px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
    overscroll-behavior-x: none;
  }

  .app-shell,
  .app-view,
  .workspace,
  .content,
  .sections,
  .form-band,
  .dashboard-shell,
  .dashboard-main,
  .dashboard-workspace,
  .warehouse-view,
  .works-view,
  .electric-warehouse-view,
  .electric-warehouse-workspace,
  .warehouse-page,
  .warehouse-panel,
  .warehouse-section,
  .warehouse-group-card,
  .warehouse-issue-card,
  .dds-view,
  .dds-page,
  .dds-calendar-panel,
  .dds-topic-panel,
  .tms-view,
  .tms-page,
  .users-view,
  .users-admin-mount,
  .auth-gate,
  .auth-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .app-view,
  .workspace,
  .home-view,
  .dds-view,
  .tms-view,
  .warehouse-view,
  .works-view,
  .electric-warehouse-view,
  .users-admin-view {
    margin-left: 0;
    margin-right: 0;
  }

  .dashboard > * {
    width: 100%;
    margin-inline: 0;
  }

  body[data-view="home"] {
    width: 100%;
    max-width: 100%;
    height: var(--app-visual-vh, 100svh);
    min-height: var(--app-visual-vh, 100svh);
    max-height: var(--app-visual-vh, 100dvh);
    overflow: hidden;
  }

  body[data-view="home"] .app-shell {
    height: var(--app-visual-vh, 100svh);
    min-height: var(--app-visual-vh, 100svh);
    max-height: var(--app-visual-vh, 100dvh);
    overflow: hidden;
  }

  body[data-view="home"] .topbar {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding:
      max(10px, env(safe-area-inset-top))
      max(12px, env(safe-area-inset-right))
      10px
      max(12px, env(safe-area-inset-left));
    gap: 10px;
    overflow: hidden;
  }

  body[data-view="home"] .brand {
    flex: 0 1 clamp(112px, 31vw, 160px);
    min-width: 0;
  }

  body[data-view="home"] .brand img {
    max-height: clamp(42px, 7vh, 58px);
  }

  body[data-view="home"] .title-block {
    min-width: 0;
  }

  body[data-view="home"] .title-block h1 {
    font-size: clamp(1.48rem, 6.2vw, 2rem);
    line-height: 1.04;
  }

  body[data-view="home"] .top-actions {
    width: 100%;
    max-width: 100%;
    min-width: 0 !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: minmax(46px, auto);
    gap: 8px;
  }

  body[data-view="home"] .top-actions .icon-button,
  body[data-view="home"] .top-actions .ghost-button,
  body[data-view="home"] .top-actions .app-update-button,
  body[data-view="home"] .auth-user-pill,
  body[data-view="home"] .auth-logout-button,
  body[data-view="home"] .offline-sync-box > summary {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    justify-content: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body[data-view="home"] .home-view {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: clamp(8px, 1.4vh, 12px);
    width: 100%;
    max-width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    padding:
      clamp(10px, 1.5vh, 14px)
      max(12px, env(safe-area-inset-right))
      max(10px, env(safe-area-inset-bottom))
      max(12px, env(safe-area-inset-left));
  }

  body[data-view="home"] .home-module-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: repeat(4, minmax(0, 1fr));
    gap: clamp(8px, 1.45vh, 13px);
    width: 100%;
    max-width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  body[data-view="home"] .home-module-card {
    grid-template-columns: clamp(48px, 12vw, 62px) minmax(0, 1fr) minmax(92px, 22vw, 112px);
    grid-template-rows: auto;
    align-items: center;
    align-content: center;
    width: 100%;
    height: 100%;
    min-height: 0;
    max-width: 100%;
    padding: clamp(12px, 2.1vh, 18px) clamp(11px, 3.2vw, 16px);
    gap: clamp(10px, 2.4vw, 14px);
    overflow: hidden;
  }

  body[data-view="home"] .home-module-card > div {
    min-width: 0;
    overflow: hidden;
  }

  body[data-view="home"] .home-module-card .module-icon {
    width: clamp(48px, 12vw, 62px);
    height: clamp(48px, 12vw, 62px);
  }

  body[data-view="home"] .home-module-card .module-icon svg {
    width: clamp(25px, 6vw, 32px);
    height: clamp(25px, 6vw, 32px);
  }

  body[data-view="home"] .home-module-card .eyebrow {
    margin-bottom: 3px;
    font-size: clamp(0.66rem, 2.6vw, 0.84rem);
    line-height: 1.08;
  }

  body[data-view="home"] .home-module-card h3 {
    font-size: clamp(1.08rem, 4.85vw, 1.38rem);
    line-height: 1.08;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  body[data-view="home"] .home-module-card p:not(.eyebrow) {
    display: none;
  }

  body[data-view="home"] .home-module-card .primary-button {
    grid-column: 3;
    width: 100%;
    min-width: 0;
    min-height: clamp(48px, 7.2vh, 60px);
    padding-inline: clamp(10px, 2.8vw, 14px);
    justify-content: center;
    white-space: nowrap;
  }

  body[data-view="home"] .home-module-card .primary-button span {
    font-size: 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body[data-view="home"] .home-module-card .primary-button span::after {
    content: "Abrir";
    font-size: clamp(0.92rem, 4vw, 1.08rem);
  }

  body.app-update-locked[data-view="home"] .home-view {
    grid-template-rows: minmax(0, 1fr);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  body.app-update-locked[data-view="home"] .home-module-grid {
    display: none !important;
  }

  body.app-update-locked[data-view="home"] .app-update-notice {
    align-self: start;
    margin-top: 0;
  }

  .auth-gate {
    min-height: var(--app-visual-vh, 100svh);
    max-height: var(--app-visual-vh, 100dvh);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding:
      max(16px, env(safe-area-inset-top))
      max(14px, env(safe-area-inset-right))
      max(16px, env(safe-area-inset-bottom))
      max(14px, env(safe-area-inset-left));
  }

  .auth-card {
    width: 100%;
    max-width: min(520px, calc(100dvw - 28px));
    margin-inline: auto;
  }

  .auth-form input,
  .auth-form button,
  .auth-checkbox {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .modal-backdrop,
  .dds-modal-backdrop {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .regularization-modal,
  .dds-modal-card,
  .tms-modal-card {
    width: min(100%, calc(100vw - 16px));
    max-width: calc(100vw - 16px);
  }

}

@media (max-width: 380px), (max-height: 700px) {
  body[data-view="home"] .topbar {
    gap: 7px;
  }

  body[data-view="home"] .top-actions {
    grid-auto-rows: minmax(42px, auto);
    gap: 7px;
  }

  body[data-view="home"] .top-actions .icon-button,
  body[data-view="home"] .top-actions .ghost-button,
  body[data-view="home"] .top-actions .app-update-button,
  body[data-view="home"] .auth-user-pill,
  body[data-view="home"] .auth-logout-button,
  body[data-view="home"] .offline-sync-box > summary {
    min-height: 42px;
    font-size: 0.88rem;
  }

  body[data-view="home"] .home-module-card {
    grid-template-columns: 46px minmax(0, 1fr) 88px;
    padding: 10px;
    gap: 9px;
  }

  body[data-view="home"] .home-module-card .module-icon {
    width: 46px;
    height: 46px;
  }

  body[data-view="home"] .home-module-card h3 {
    font-size: clamp(1rem, 4.4vw, 1.18rem);
  }

  body[data-view="home"] .home-module-card .eyebrow {
    font-size: 0.62rem;
  }

  body[data-view="home"] .home-module-card .primary-button {
    min-height: 44px;
    padding-inline: 9px;
  }
}

@media (max-width: 720px) {
  body[data-view="home"] .offline-sync-box > summary {
    gap: 5px;
    padding-inline: 6px;
  }

  body[data-view="home"] .offline-sync-box > summary span {
    flex: 0 0 auto;
    min-width: max-content;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
    font-size: clamp(0.76rem, 3.05vw, 0.9rem);
  }

  body[data-view="home"] .offline-sync-box > summary strong {
    flex: 0 0 auto;
  }
}

@media (max-width: 380px) {
  body[data-view="home"] .offline-sync-box > summary {
    gap: 4px;
    padding-inline: 5px;
  }

  body[data-view="home"] .offline-sync-box > summary span {
    font-size: clamp(0.72rem, 3vw, 0.84rem);
  }
}

/* SIAGO */
.siago-view {
  padding: 18px 0 40px;
  background: #f3f6f8;
}

.siago-shell {
  width: min(var(--module-shell-max), calc(100% - (var(--module-shell-gutter) * 2)));
  margin: 0 auto 0 var(--module-shell-gutter);
  display: grid;
  gap: 12px;
  color: #1f2933;
}

.siago-hero {
  position: relative;
  overflow: hidden;
  min-height: 158px;
  border-radius: 8px;
  background: linear-gradient(120deg, #242424 0%, #303030 54%, #0f7776 54%, #138c89 100%);
  color: #fff;
  display: grid;
  grid-template-columns: 1fr 250px;
  gap: 28px;
  align-items: center;
  padding: 28px 34px;
  box-shadow: 0 18px 34px rgba(17, 24, 39, 0.16);
}

.siago-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0 62%, rgba(255, 145, 20, 0.95) 62% 100%);
  clip-path: polygon(78% 0, 100% 0, 100% 11%, 75% 11%);
  pointer-events: none;
}

.siago-hero > div,
.siago-hero aside {
  position: relative;
  z-index: 1;
}

.siago-hero span {
  font-size: 12px;
  font-weight: 900;
  color: #ff9816;
  text-transform: uppercase;
}

.siago-hero h2 {
  margin: 5px 0 4px;
  font-size: 32px;
  line-height: 1.05;
}

.siago-hero p {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #eef7f7;
}

.siago-hero aside {
  justify-self: end;
  min-width: 210px;
  padding: 18px 22px;
  background: rgba(255, 255, 255, 0.12);
  border-left: 4px solid #ff9816;
}

.siago-hero aside span {
  display: block;
  color: #f1f7f7;
  font-size: 13px;
  font-weight: 800;
}

.siago-hero aside strong {
  display: block;
  margin-top: 4px;
  font-size: 16px;
}

.siago-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.siago-tabs button,
.siago-intro-card button {
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #fff;
  color: #111827;
  font-weight: 900;
  min-height: 34px;
  padding: 0 14px;
  cursor: pointer;
}

.siago-tabs button.active {
  border-color: #99d8d8;
  background: #ebfbfb;
  color: #006f70;
}

.siago-tabs button.alt {
  background: #dff7f7;
}

.siago-card,
.siago-overview-card,
.siago-state-panel {
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.siago-intro-card {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.siago-intro-card h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.siago-intro-card p {
  margin: 0;
  color: #4b5563;
  font-weight: 700;
}

.siago-overview-grid,
.siago-panels-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.siago-overview-card {
  padding: 14px;
  border-left: 5px solid #0f8c8a;
}

.siago-overview-card header,
.siago-state-panel-header,
.siago-state-box header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #dde5ee;
}

.siago-overview-card h3,
.siago-state-panel h3,
.siago-state-box h4 {
  margin: 0;
  font-size: 18px;
}

.siago-overview-card header span,
.siago-state-box header span {
  color: #4b5563;
  font-size: 12px;
  font-weight: 900;
}

.siago-query-mini-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.siago-query-mini {
  min-width: 0;
  padding: 10px;
  border-radius: 7px;
  border: 1px solid #d8e0e9;
  background: #fff7ed;
  font-size: 12px;
  overflow: hidden;
}

.siago-query-mini strong,
.siago-query-mini span {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.siago-query-mini span {
  color: #4b5563;
  font-weight: 800;
  margin-top: 3px;
}

.siago-query-mini.treated,
.siago-query-mini.complete {
  background: #ecfdf5;
  border-color: #99d7c6;
}

.siago-query-mini.pending {
  background: #fff3e6;
  border-color: #f5c08a;
}

.siago-state-panel {
  border-top: 4px solid #0f8c8a;
}

.siago-state-panel-header {
  padding: 16px 18px 10px;
}

.siago-state-panel-header > div > span {
  font-size: 12px;
  font-weight: 900;
  color: #b20d1c;
  text-transform: uppercase;
}

.siago-state-panel-header p {
  margin: 2px 0 0;
  max-width: 360px;
  color: #5f6b7a;
  font-size: 12px;
  text-align: right;
  font-weight: 700;
}

.siago-state-box {
  padding: 16px 18px 18px;
}

.siago-upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.siago-upload-card {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid #d7e0e9;
  border-radius: 8px;
  background: #fff;
}

.siago-upload-card.treated,
.siago-upload-card.complete {
  background: #f4fbfb;
  border-color: #a8dddb;
}

.siago-upload-card.pending {
  background: #fffaf4;
  border-color: #f0d0aa;
}

.siago-upload-card-text {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.siago-upload-card-text strong,
.siago-upload-card-text span,
.siago-upload-card-text small,
.siago-upload-card-text em {
  display: block;
  max-width: 100%;
  /* v0139: quebra so entre palavras (os nomes com underline ganham ponto de
     quebra invisivel no JS — nada quebra mais no meio da palavra) */
  overflow-wrap: break-word;
  word-break: normal;
}

.siago-upload-card-text strong {
  font-size: 13px;
}

.siago-upload-card-text span,
.siago-upload-card-text small,
.siago-upload-card-text em {
  color: #5f6b7a;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.siago-upload-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.siago-file-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  height: 28px;
  padding: 0 12px;
  border: 1px solid #9bd8d7;
  border-radius: 6px;
  color: #007b7b;
  background: #f6ffff;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  overflow: hidden;
}

.siago-file-pill input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.siago-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  background: #edf2f7;
  color: #425466;
}

.siago-status-pill.treated,
.siago-status-pill.complete {
  background: #dff5ed;
  color: #00765f;
}

.siago-status-pill.pending {
  background: #fff0dd;
  color: #946000;
}

.siago-upload-button {
  width: 100%;
  min-height: 36px;
  margin-top: 14px;
  border: 0;
  border-radius: 7px;
  background: #6fc1bd;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.siago-upload-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.siago-state-box > p {
  margin: 10px 0 0;
  color: #4b5563;
  font-weight: 800;
}

.siago-message {
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-weight: 800;
}

.siago-message.error {
  border-color: #f3b4bc;
  color: #990815;
  background: #fff5f6;
}

.siago-message.ok {
  border-color: #9dd8c3;
  color: #00765f;
  background: #f1fcf8;
}

@media (max-width: 900px) {
  .siago-view {
    padding: 10px 0 24px;
  }

  .siago-shell {
    width: min(100% - 16px, 760px);
    margin-inline: 8px auto;
    gap: 10px;
  }

  .siago-hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 20px;
  }

  .siago-hero h2 {
    font-size: 26px;
  }

  .siago-hero aside {
    justify-self: stretch;
    min-width: 0;
  }

  .siago-tabs,
  .siago-intro-card {
    flex-direction: column;
    align-items: stretch;
  }

  .siago-overview-grid,
  .siago-panels-grid,
  .siago-upload-grid,
  .siago-query-mini-grid {
    grid-template-columns: 1fr;
  }

  .siago-state-panel-header,
  .siago-state-box header {
    align-items: flex-start;
  }

  .siago-state-panel-header p {
    text-align: left;
  }

  .siago-upload-card {
    grid-template-columns: 1fr;
  }

  .siago-upload-card-actions {
    justify-content: space-between;
  }
}

@media (max-width: 720px) {
  .home-vision-panel {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 0 0 12px;
    padding: 14px;
  }

  .home-vision-panel h2 {
    font-size: 1.1rem;
  }

  .home-vision-panel p:not(.eyebrow) {
    font-size: 0.86rem;
  }
}

/* Home cards: keep action buttons visible across desktop, tablet, and mobile widths. */
body[data-view="home"] .home-module-grid {
  align-items: stretch;
}

body[data-view="home"] .home-module-card {
  min-width: 0;
}

@media (min-width: 721px) {
  body[data-view="home"] .home-view {
    width: min(var(--module-shell-max), calc(100% - (var(--module-shell-gutter) * 2)));
    max-width: 100%;
    margin-inline: var(--module-shell-gutter) auto;
    height: auto;
    overflow: visible;
  }

  body[data-view="home"] .home-module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    height: auto;
    overflow: visible;
  }

  body[data-view="home"] .home-module-card {
    grid-template-columns: 58px minmax(0, 1fr) max-content;
    height: auto;
    min-height: 154px;
    overflow: visible;
  }

  body[data-view="home"] .home-module-card > div {
    min-width: 0;
  }

  body[data-view="home"] .home-module-card .primary-button {
    width: max-content;
    min-width: max-content;
    max-width: 100%;
    justify-self: end;
    overflow: visible;
    white-space: nowrap;
  }

  body[data-view="home"] .home-module-card .primary-button span {
    min-width: max-content;
    overflow: visible;
    text-overflow: clip;
  }

  body[data-view="home"] .home-module-card .primary-button span::after {
    content: none;
  }
}

@media (min-width: 721px) and (max-width: 1160px) {
  body[data-view="home"] .home-module-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-view="home"] .home-module-card {
    min-height: 132px;
  }
}

@media (min-width: 721px) and (max-width: 820px) {
  body[data-view="home"] .home-module-card {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  body[data-view="home"] .home-module-card .primary-button {
    grid-column: 2;
    justify-self: start;
    margin-top: 2px;
  }
}

@media (max-width: 720px) {
  body[data-view="home"] {
    height: auto;
    min-height: var(--app-visual-vh, 100svh);
    overflow-x: hidden;
    overflow-y: auto;
  }

  body[data-view="home"] .app-shell,
  body[data-view="home"] .home-view {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  body[data-view="home"] .home-view {
    grid-template-rows: auto;
  }

  body[data-view="home"] .home-module-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-auto-rows: auto;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  body[data-view="home"] .home-module-card {
    grid-template-columns: clamp(44px, 12vw, 54px) minmax(0, 1fr) minmax(82px, 24vw, 96px);
    height: auto;
    min-height: 96px;
    overflow: visible;
  }

  body[data-view="home"] .home-module-card .primary-button {
    width: 100%;
    min-width: 0;
    max-width: 96px;
    justify-self: end;
    overflow: visible;
  }

  body[data-view="home"] .home-module-card .primary-button span {
    min-width: 0;
    overflow: visible;
    text-overflow: clip;
  }
}

@media (max-width: 380px) {
  body[data-view="home"] .home-module-card {
    grid-template-columns: 44px minmax(0, 1fr) 82px;
  }

  body[data-view="home"] .home-module-card .primary-button {
    max-width: 82px;
  }
}

/* Desktop zoom authority: keep wide layouts centered when browser zoom changes. */
@media (min-width: 721px) {
  .workspace,
  .home-view,
  .dds-view,
  .tms-view,
  .warehouse-view,
  .works-view,
  .electric-warehouse-view,
  .users-admin-view,
  .siago-shell {
    margin-left: auto;
    margin-right: auto;
  }

  .dashboard > * {
    margin-left: auto;
    margin-right: auto;
  }

  .users-admin-view > * {
    margin-left: auto;
    margin-right: auto;
  }

  body[data-view="home"] .home-view {
    margin-left: auto;
    margin-right: auto;
  }
}


/* Observacoes da justificativa: campo automatico, somente leitura */
.inventory-justification-observation-input[readonly] {
  background: #f4f6f8;
  color: #3a4149;
  cursor: default;
  caret-color: transparent;
}

.inventory-justification-observation-input[readonly]:focus {
  outline: none;
  box-shadow: none;
}

/* Analise SPEN: quebra de linha, altura ajustavel e afastamento da barra de rolagem */
.inventory-justification-spen-input {
  width: calc(100% - 18px);
  margin-right: 18px;
  min-height: 44px;
  resize: none;
  overflow: hidden;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  field-sizing: content;
}

.inventory-justification-spen-dialog-hint {
  margin: 0 0 12px;
  color: #68707a;
  font-size: 13px;
  line-height: 1.4;
}

.inventory-justification-other-entry input[readonly] {
  background: #f4f6f8;
  color: #3a4149;
  cursor: default;
}

/* Popup Qtde Validado SPEN: 4 colunas fixas (Tipo, Numero, Qtde Justificada, Qtde Validada) */
.inventory-justification-other-entry[data-inventory-spen-validation-entry] {
  grid-template-columns: 130px minmax(170px, 1fr) 110px 110px;
}

/* Alinhamento vertical central de todas as celulas, mesmo com linhas altas (Analise SPEN grande) */
.inventory-justification-table td {
  vertical-align: middle;
}

.inventory-justification-table td .inventory-justification-text-input,
.inventory-justification-table td .inventory-justification-quantity-input,
.inventory-justification-table td .inventory-justification-code-select,
.inventory-justification-table td .inventory-justification-other-control {
  vertical-align: middle;
}

/* Com a coluna Qtde Validado SPEN presente, as colunas a partir da 14 deslocam +1 */
.inventory-justification-table.has-spen-validation th:nth-child(14),
.inventory-justification-table.has-spen-validation td:nth-child(14) {
  width: 118px;
}

.inventory-justification-table.has-spen-validation th:nth-child(15),
.inventory-justification-table.has-spen-validation td:nth-child(15) {
  width: 90px;
}

.inventory-justification-table.has-spen-validation th:nth-child(16),
.inventory-justification-table.has-spen-validation td:nth-child(16) {
  width: 110px;
}

.inventory-justification-table.has-spen-validation th:nth-child(17),
.inventory-justification-table.has-spen-validation td:nth-child(17) {
  width: 78px;
}

.inventory-justification-table.has-spen-validation th:nth-child(18),
.inventory-justification-table.has-spen-validation td:nth-child(18) {
  width: 96px;
}

.inventory-justification-table.has-spen-validation th:nth-child(19),
.inventory-justification-table.has-spen-validation td:nth-child(19) {
  width: 110px;
}

/* Observacao escrita (bloco de notas) na celula de Observacoes */
.inventory-justification-observation-wrap {
  position: relative;
  display: block;
}

.inventory-justification-observation-wrap .inventory-justification-observation-input {
  padding-right: 30px;
}

.inventory-justification-note-button {
  position: absolute;
  top: 4px;
  right: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid #d5dee9;
  border-radius: 5px;
  background: #ffffff;
  color: #68707a;
  cursor: pointer;
}

.inventory-justification-note-button i,
.inventory-justification-note-button svg {
  width: 14px;
  height: 14px;
}

.inventory-justification-note-button.has-note {
  border-color: #e5b95d;
  background: #fff7e0;
  color: #8a6100;
}

.inventory-justification-note-button:disabled {
  opacity: 0.35;
  cursor: default;
}

.inventory-justification-note-modal {
  width: min(560px, calc(100vw - 28px));
}

.inventory-justification-note-text,
.inventory-justification-note-readonly {
  box-sizing: border-box;
  width: 100%;
  min-height: 160px;
  border: 1px solid #e5d9a8;
  border-radius: 8px;
  background: #fffbe8;
  background-image: repeating-linear-gradient(
    transparent,
    transparent 27px,
    #f0e4b8 27px,
    #f0e4b8 28px
  );
  color: #3a3421;
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 28px;
  padding: 6px 12px;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  resize: vertical;
}

.inventory-justification-note-meta {
  display: block;
  margin-top: 8px;
  color: #68707a;
  font-weight: 700;
}

/* ---- Avisos flutuantes (toasts) ---- */
#appToastHost {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 12000;
  display: grid;
  gap: 10px;
  width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}

.app-toast {
  pointer-events: auto;
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 13px 14px 15px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-left: 5px solid #00765f;
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(20, 24, 28, 0.2);
  overflow: hidden;
  animation: appToastIn 0.28s cubic-bezier(0.21, 0.9, 0.35, 1.1);
}

.app-toast.error {
  border-left-color: #a20f1b;
}

.app-toast.loading {
  border-left-color: #0b5fa5;
}

.app-toast.loading .app-toast-icon {
  background: rgba(11, 95, 165, 0.1);
  color: #0b5fa5;
}

.app-toast.loading .app-toast-icon svg {
  animation: elcop-spin 1s linear infinite;
}

.app-toast-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(0, 118, 95, 0.1);
  color: #00765f;
  flex-shrink: 0;
}

.app-toast.error .app-toast-icon {
  background: rgba(162, 15, 27, 0.1);
  color: #a20f1b;
}

.app-toast-icon svg {
  width: 17px;
  height: 17px;
}

.app-toast-message {
  color: #171a1d;
  font-size: 0.83rem;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: break-word;
}

.app-toast-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #8a94a0;
  cursor: pointer;
}

.app-toast-close:hover {
  background: #f1f5f9;
  color: #171a1d;
}

.app-toast-close svg {
  width: 14px;
  height: 14px;
}

.app-toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: #00765f;
  opacity: 0.55;
  animation-name: appToastProgress;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

.app-toast.error .app-toast-progress {
  background: #a20f1b;
}

.app-toast.is-leaving {
  animation: appToastOut 0.22s ease-in forwards;
}

@keyframes appToastIn {
  from {
    opacity: 0;
    transform: translateX(26px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes appToastOut {
  to {
    opacity: 0;
    transform: translateX(26px);
  }
}

@keyframes appToastProgress {
  from {
    width: 100%;
  }
  to {
    width: 0;
  }
}

@media (max-width: 640px) {
  #appToastHost {
    top: 12px;
    right: 12px;
    left: 12px;
    width: auto;
  }
}

/* ---- SIAGO: barra de progresso do carregamento ---- */
.siago-progress-card {
  margin: 0 0 14px;
  padding: 14px 16px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-left: 5px solid var(--marca);
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(20, 24, 28, 0.08);
}

.siago-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.siago-progress-head strong {
  color: #171a1d;
  font-size: 0.86rem;
  font-weight: 900;
}

.siago-progress-head span {
  color: var(--marca-escura);
  font-size: 0.95rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.siago-progress-track {
  height: 10px;
  background: #eef2f6;
  border-radius: 999px;
  overflow: hidden;
}

.siago-progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--marca), var(--marca-escura));
  border-radius: 999px;
  transition: width 0.25s ease;
}

.siago-progress-card small {
  display: block;
  margin-top: 7px;
  color: #68707a;
  font-weight: 700;
}

/* ---- SIAGO: pill de colar + card compacto ---- */
.siago-paste-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.siago-paste-pill svg {
  width: 13px;
  height: 13px;
}

.siago-file-pill.is-blocked {
  opacity: 0.55;
}

.siago-upload-card.has-selected-file {
  outline: 2px solid rgba(0, 118, 95, 0.35);
}

/* ---- SIAGO: dialogo de colagem ---- */
.siago-paste-modal {
  width: min(860px, calc(100vw - 28px));
}

.siago-paste-hint {
  margin: 0 0 10px;
  color: #68707a;
  font-size: 0.82rem;
  line-height: 1.4;
}

.siago-paste-textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 160px;
  border: 1px solid #d5dee9;
  border-radius: 8px;
  padding: 10px 12px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.72rem;
  line-height: 1.45;
  white-space: pre;
  overflow: auto;
  resize: vertical;
}

.siago-paste-preview {
  margin-top: 10px;
}

.siago-paste-preview-meta {
  margin-bottom: 6px;
  color: #00765f;
  font-size: 0.74rem;
  font-weight: 900;
}

.siago-paste-preview-warning {
  color: #b3261e;
  background: #fdecea;
  border: 1px solid #f5c6c1;
  border-radius: 8px;
  padding: 7px 10px;
}

.siago-paste-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.siago-paste-table-window {
  max-height: 46vh;
}

.siago-paste-table-window thead th {
  position: sticky;
  top: 0;
  background: #f1f5f9;
  z-index: 1;
}

.siago-paste-row-number {
  color: #94a3b8;
  font-weight: 700;
  text-align: right;
  min-width: 44px;
}

.siago-paste-pagination {
  margin: 6px 0;
}

/* Grade estilo Excel */
.siago-paste-table-window table {
  border-collapse: collapse;
  width: 100%;
}

.siago-paste-table-window th,
.siago-paste-table-window td {
  border: 1px solid #dbe3ec;
  padding: 5px 9px;
  white-space: nowrap;
  font-size: 0.7rem;
}

.siago-paste-table-window thead th {
  background: #eef2f7;
  font-weight: 800;
  color: #334155;
}

.siago-paste-table-window tbody tr:nth-child(even) td {
  background: #fbfcfe;
}

.siago-paste-table-window td.siago-paste-row-number,
.siago-paste-table-window th.siago-paste-row-number {
  position: sticky;
  left: 0;
  background: #eef2f7;
  z-index: 1;
}

.siago-paste-excel-placeholder {
  position: relative;
  cursor: pointer;
  outline: none;
  border-radius: 10px;
}

.siago-paste-excel-placeholder:focus-visible {
  box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.25);
}

.siago-paste-excel-mock {
  max-height: 240px;
  overflow: hidden;
  opacity: 0.85;
}

.siago-paste-excel-mock td {
  min-width: 84px;
  height: 26px;
}

.siago-paste-excel-hint {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 6px;
  text-align: center;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 10px;
  padding: 14px;
}

.siago-paste-excel-hint svg {
  width: 26px;
  height: 26px;
  color: #b3261e;
}

.siago-paste-excel-hint strong {
  font-size: 0.92rem;
  color: #171a1d;
}

.siago-paste-excel-hint small {
  color: var(--muted);
  max-width: 380px;
}

.siago-paste-preview-scroll {
  max-height: 220px;
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.siago-paste-preview-scroll table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.68rem;
}

.siago-paste-preview-scroll th,
.siago-paste-preview-scroll td {
  padding: 5px 8px;
  border-bottom: 1px solid #eef2f6;
  border-right: 1px solid #eef2f6;
  text-align: left;
  white-space: nowrap;
}

.siago-paste-preview-scroll th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  color: #171a1d;
  font-weight: 900;
}

/* ==== Hancock vs SIAGO (v0063) — layout Opcao B, cores discretas ==== */
.hk-panel .panel-head h3 { margin-bottom: 2px; }
.hk-toolbar { margin-bottom: 12px; }
.hk-menu { position: relative; }
.hk-menu summary { list-style: none; cursor: pointer; display: flex; flex-direction: column; gap: 3px; font-size: 12px; }
.hk-menu summary::-webkit-details-marker { display: none; }
.hk-menu summary span { font-size: 11px; font-weight: 700; color: #5a6472; }
.hk-menu summary b { border: 1px solid #cfd6dd; border-radius: 8px; padding: 8px 10px; background: #fff; font-weight: 600; min-width: 140px; font-size: 12.5px; }
.hk-menu[open] summary b { border-color: #8a1621; }
.hk-menu-box { position: absolute; z-index: 40; top: 100%; left: 0; background: #fff; border: 1px solid #cfd6dd; border-radius: 10px; padding: 8px 10px; min-width: 230px; box-shadow: 0 10px 24px rgba(20,24,28,.14); display: flex; flex-direction: column; gap: 5px; max-height: 260px; overflow: auto; }
.hk-menu-box label { display: flex; gap: 7px; align-items: center; font-size: 12px; font-weight: 600; }
.hk-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-bottom: 12px; }
.hk-card { border: 1px solid #e3e6ea; border-radius: 10px; padding: 10px 12px; background: #fff; }
.hk-card small { font-size: 9.5px; font-weight: 700; color: #5a6472; letter-spacing: .03em; display: block; }
.hk-card b { display: block; font-size: 17px; margin-top: 3px; white-space: nowrap; }
.hk-card span { font-size: 10px; color: #8a93a0; }
.hk-alerta { color: var(--marca-escura) !important; font-weight: 800; }
.hk-chart-card { border: 1px solid #e3e6ea; border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; background: #fff; }
.hk-chart-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.hk-chart-head strong { font-size: 12.5px; }
.hk-chart-head small { font-size: 11px; color: #5a6472; }
.hk-sw { display: inline-block; width: 16px; height: 4px; border-radius: 2px; vertical-align: middle; margin: 0 4px 0 10px; }
.hk-sw-hancock { background: #39424e; }
.hk-sw-baixado { background: #2f9e57; }
.hk-sw-gap { background: var(--marca-borda); height: 9px; }
.hk-chart-card svg { width: 100%; height: auto; display: block; }
.hk-axis { font-size: 11px; fill: #8a93a0; }
.hk-final { font-size: 11.5px; font-weight: 700; }
.hk-final.hancock { fill: #39424e; }
.hk-final.baixado { fill: #2f9e57; }
.hk-actions-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.hk-legenda { font-size: 10.5px; color: #5a6472; }
.hk-badge { background: #c22733; color: #fff; border-radius: 10px; padding: 1px 8px; font-size: 10.5px; margin-left: 6px; }
/* Cabecalho FIXO da tabela de obras: a ROLAGEM e DENTRO da propria tabela
   (barra vertical no bloco) e o thead gruda no topo do bloco — o cabecalho
   nunca some, e a pagina em volta (topo do app, filtros) rola como sempre. */
.hk-table-wrap { overflow: auto; max-height: calc(100vh - 200px); min-height: 280px; border: 1px solid #e6e9ee; border-radius: 10px; }
.hk-table th { background: #f0f1f4; color: #39424e; border-bottom: 2px solid #d7dbe1; font-size: 10.5px; text-align: center; }
.hk-table thead th { position: sticky; top: 0; z-index: 6; box-shadow: 0 2px 0 #d7dbe1; }
.hk-table td { text-align: center; vertical-align: middle; border-bottom: 1px solid #eceef2; font-size: 11.5px; padding: 6px 8px; }
.hk-left { text-align: left !important; }
.hk-num { white-space: nowrap; }
.hk-obra-row { background: #f7f8fa; cursor: pointer; }
.hk-obra-row:hover { background: #f1f3f6; }
.hk-obra-row b { font-size: 12px; }
.hk-obra-row small { display: block; color: #8a93a0; font-size: 10px; }
.hk-mat-row td { color: #37414e; }
.hk-mat { padding-left: 22px !important; }
.hk-tag { font-size: 9.5px; background: #eef0f3; border-radius: 6px; padding: 1px 7px; color: #5a6472; font-weight: 700; }
.hk-dot { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 700; color: #39424e; white-space: nowrap; }
.hk-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #9aa3ae; flex: none; }
.hk-dot.ok::before { background: #2f9e57; }
.hk-dot.bad::before { background: #c22733; }
.hk-dot.warn::before { background: #e0a52e; }
.hk-dot.part::before { background: #3f68c9; }
.hk-dot.neutra { color: #6a7480; }
.hk-dot.neutra::before { background: #9aa3ae; }
.hk-chip-req { border-color: #cfdcf5; background: #eef2fb; color: #274a9c; }
.hk-req-painel { display: block; margin: 6px 0 2px; background: #f7f9fd; border: 1px solid #dfe6f3; border-radius: 9px; padding: 7px 10px; }
.hk-table .hk-obra-row td:first-child .hk-req-painel > b { display: block; font-size: 9.5px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: #274a9c; margin-bottom: 5px; }
.hk-req-painel { max-width: 640px; }
.hk-req-lista { display: flex; gap: 5px; flex-wrap: wrap; }
.hk-chip-origem { border-color: #d8dde4; background: #f3f5f8; color: #5a6470; }
/* Saida liquida: "(Req. X − Dev. Y)" abaixo da quantidade */
.hk-req-dev { display: block; font-size: 9.5px; font-weight: 700; color: #8a93a0; margin: 1px 0; white-space: nowrap; }
.hk-dev-aviso { background: #fff9ef; border: 1px solid #f0d9a8; border-radius: 8px; padding: 7px 11px; }
/* Caixa de pendencias: obras candidatas quando a chave (NR / acionamento) aparece em mais de uma obra */
.hk-fila-cands { margin: 4px 0 10px; border: 1px solid #f0d9a8; background: #fff9ef; border-radius: 10px; padding: 9px 11px; }
.hk-fila-cands > b { display: block; font-size: 11px; color: #8a6212; margin-bottom: 6px; }
.hk-fila-cands-lista { display: flex; gap: 6px; flex-wrap: wrap; }
.hk-cand { display: inline-flex; flex-direction: column; gap: 1px; text-align: left; border: 1px solid #e0c9a0; background: #fff; border-radius: 9px; padding: 6px 10px; font-size: 11.5px; font-weight: 700; color: #39424e; cursor: pointer; }
.hk-cand:hover { border-color: var(--marca-escura); color: var(--marca-escura); }
.hk-cand small { font-weight: 400; color: #8a93a0; font-size: 10.5px; }
.hk-diag-sgm { color: #5a6472; }
/* Etiquetas que ABREM listas (requisicoes / OS SGM) — estado natural fechado */
.hk-chip-abre { cursor: pointer; font: inherit; font-size: 10px; font-weight: 800; }
.hk-chip-req.hk-chip-abre.on { background: var(--marca-escura); border-color: var(--marca-escura); color: #fff; }
.hk-obra-os { display: block; margin-top: 4px; }
.hk-chip-os { border-color: #c2e6d4; background: #eefaf3; color: #1c6b45; }
.hk-chip-os.hk-chip-abre.on { background: #1c6b45; border-color: #1c6b45; color: #fff; }
.hk-chip-os-vazio { border-color: #e2e6ea; background: #f4f6f8; color: #98a1ad; }
.hk-os-painel { background: #f3fbf7; border-color: #d3eadf; max-width: 720px; }
.hk-table .hk-obra-row td:first-child .hk-os-painel > b { color: #1c6b45; }
.hk-chip-aviso { border-color: #f0d9a8; background: #fff6e6; color: #8a6212; }
/* Secao "OS SGM sem obra localizada" no topo da tabela */
.hk-secao-row td { background: #f3fbf7; border-top: 2px solid #cfe6d9; font-size: 10px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: #1c6b45; padding: 7px 9px; }
.hk-os-row td { background: #fbfdfb; }
/* Tela cheia da Tabela de obras */
.hk-tabela-page.full { position: fixed; inset: 0; z-index: 140; background: #fff; overflow: auto; padding: 0 14px 16px; }
.hk-tabela-page.full .hk-table-wrap { max-height: calc(100vh - 210px); }
.hk-full-bar { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 -14px 12px; padding: 9px 14px; background: #2b3138; color: #fff; font-size: 12.5px; font-weight: 700; }
.hk-full-bar .ghost-button { background: #fff; color: #2b3138; border-color: #fff; }
body.hk-tela-cheia { overflow: hidden; }
/* Legenda por deposito dos graficos (opcao B) */
.hk-legenda-deps { display: grid; grid-template-columns: repeat(auto-fit, minmax(212px, 1fr)); gap: 8px; margin: 12px 0 0; border-top: 1px solid #eef1f4; padding-top: 10px; }
.hk-legenda-bloco { display: flex; flex-direction: column; gap: 3px; text-align: left; border: 1px solid #eef1f4; border-radius: 9px; padding: 7px 10px; background: #fff; cursor: pointer; font: inherit; transition: opacity .12s ease, border-color .12s ease; }
.hk-legenda-bloco:hover { border-color: #d7dbe1; }
.hk-legenda-bloco.off { opacity: .45; background: #fafbfc; }
.hk-legenda-nome { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 800; color: #1f242a; }
.hk-legenda-nome small { font-weight: 400; color: #8a93a0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hk-legenda-cor { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.hk-legenda-par { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; color: #5a6472; }
.hk-legenda-par b { font-variant-numeric: tabular-nums; color: #39424e; }
.hk-legenda-par.verde b { color: #2f9e57; }
.hk-legenda-par.dif b { color: var(--marca-escura); }
.hk-legenda-dica { margin: 8px 0 0; font-size: 11px; color: #8a93a0; }
.elcop-mark-fds { width: 18px !important; height: 0 !important; border-top: 2px dashed #b6bdc6; border-radius: 0 !important; background: none !important; }
.elcop-mark-feriado { width: 18px !important; height: 0 !important; border-top: 2px dashed #e0a52e; border-radius: 0 !important; background: none !important; }
.hk-tooltip-nota em { color: #8a93a0 !important; font-size: 10.5px; }
.hk-tooltip-nota b { color: #8a93a0 !important; font-weight: 600; }
.stock-tooltip-nonbiz { font-weight: 600; font-size: 10px; color: #9a6c00; background: #fdf6e7; border: 1px solid #f0e0bb; border-radius: 999px; padding: 1px 7px; margin-left: 6px; }
.stock-legend-note { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; color: #8a93a0; }
.stock-legend-dash { width: 20px; height: 0; border-top: 2px dashed #8a93a0; display: inline-block; }
.stock-tooltip-total.strong { font-weight: 800; border-top: 1px solid #eef1f4; padding-top: 4px; margin-top: 2px; }
.stock-section-head-sub { margin-top: 22px; padding-top: 16px; border-top: 1px solid #eef1f4; }
.hk-legenda-limpar { border: 0; background: none; padding: 0; color: var(--marca-escura); font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; }
.hk-empty { color: #8a93a0; font-size: 11.5px; text-align: center; padding: 10px; }
.hk-loading { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 40px 0; color: #39424e; }

/* v0264: a etapa da montagem do resumo, dentro do aviso de carregamento */
.hk-loading-etapa {
  color: var(--marca-escura);
  font-weight: 900;
}
.hk-fila-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.hk-fila-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.hk-fila-tab { border: 1px solid #d7dbe1; border-radius: 7px; padding: 5px 11px; background: #fff; font-size: 11.5px; font-weight: 700; color: #5a6472; cursor: pointer; }
.hk-fila-tab.on { background: #5a2028; color: #fff; border-color: #5a2028; }
.hk-fila-split { display: grid; grid-template-columns: minmax(280px, 360px) 1fr; gap: 12px; align-items: start; }
.hk-fila-list { border: 1px solid #e9ebef; border-radius: 10px; overflow: auto; max-height: 520px; display: flex; flex-direction: column; }
.hk-fila-item { text-align: left; border: 0; border-bottom: 1px solid #eef0f3; background: #fff; padding: 9px 11px; cursor: pointer; font-size: 11px; }
.hk-fila-item b { display: block; font-family: Consolas, monospace; font-size: 11.5px; color: #1c2430; }
.hk-fila-item small { color: #8a93a0; display: block; }
.hk-fila-item .hk-vinc { color: #274a9c; font-weight: 700; }
.hk-fila-item.sel { background: #fdf6f6; border-left: 3px solid #8a1621; }
.hk-fila-detail { border: 1px solid #e9ebef; border-radius: 10px; padding: 12px; }
.hk-fila-detail h4 { margin: 0 0 8px; font-size: 13px; }
.hk-steps { background: #f8f9fb; border: 1px solid #e9ebef; border-radius: 8px; padding: 8px 10px; font-size: 11.5px; margin-bottom: 8px; }
.hk-steps .hit { color: #1e6b34; font-weight: 700; }
.hk-steps .miss { color: #8a93a0; }
.hk-fila-rows { margin-bottom: 10px; }
.hk-fila-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.hk-fila-actions input { border: 1px solid #cfd6dd; border-radius: 8px; padding: 8px 10px; font-size: 12px; min-width: 280px; }
.hk-sugestoes { margin-top: 8px; font-size: 11px; color: #5a6472; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.hk-sug { border: 1px solid #bfcdf0; background: #eef2fb; color: #274a9c; border-radius: 7px; padding: 3px 9px; font-size: 10.5px; font-weight: 700; cursor: pointer; }
@media (max-width: 980px) { .hk-fila-split { grid-template-columns: 1fr; } }
/* Caixa de pendencias v2 (Opcao A): filtros proprios, detalhe completo, associacao */
/* Tabela de obras: cabecalho proprio, chips de situacao e estado vazio */
.hk-page-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-bottom: 10px; margin-bottom: 4px; border-bottom: 1px solid #eef1f4; }
.hk-page-tit { display: flex; flex-direction: column; gap: 1px; }
.hk-page-tit small { font-size: 9.5px; letter-spacing: .9px; text-transform: uppercase; color: var(--marca-escura); font-weight: 800; }
.hk-page-tit strong { font-size: 15px; color: #1f242a; }
.hk-page-espaco { flex: 1; }
.hk-page-meta { font-size: 11.5px; color: #7a8492; }
.hk-sit-chips { display: flex; gap: 7px; flex-wrap: wrap; }
.hk-menu-acoes { display: flex; gap: 6px; padding: 6px 8px; border-bottom: 1px solid #eef1f4; position: sticky; top: 0; background: #fff; z-index: 1; }
.hk-menu-acoes button { flex: 1; border: 1px solid #cfd6dd; background: #fff; border-radius: 8px; padding: 5px 6px; font-size: 11px; font-weight: 700; color: #5a6472; cursor: pointer; font-family: inherit; }
.hk-menu-acoes button:hover { border-color: var(--marca-escura); color: var(--marca-escura); }
.hk-menu-status .hk-menu-box { min-width: 340px; max-height: 320px; overflow: auto; }
.hk-menu-status .hk-menu-box label { display: flex; align-items: center; gap: 8px; }
.hk-menu-nome { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hk-menu-status .hk-menu-box label b { font-size: 11px; color: #7a8492; }
.hk-menu-vazio { font-size: 11.5px; color: #8a93a0; padding: 10px; margin: 0; }
.hk-tags-sel { display: flex; gap: 6px; flex-wrap: wrap; margin: -4px 0 10px; }
.hk-tag-sel { display: inline-flex; align-items: center; gap: 6px; background: var(--marca-suave); border: 1px solid var(--marca-borda); color: var(--marca-escura); border-radius: 999px; padding: 3px 10px; font-size: 11px; font-weight: 700; cursor: pointer; font-family: inherit; }
.hk-chip-grupos { display: flex; flex-direction: column; gap: 7px; margin: 10px 0 12px; }
.hk-chip-linha { display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 10px; align-items: start; }
.hk-chip-tit { font-size: 10px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: #7a8492; padding-top: 7px; }
.hk-chip-dica { font-size: 11px; color: #8a93a0; margin: 2px 0 0 128px; }
/* Cabecalho da tabela: nunca quebrar palavra no meio */
.hk-table th { word-break: keep-all; overflow-wrap: normal; hyphens: none; }
.hk-mat-cod { color: #39424e; font-weight: 800; }
.hk-sit-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #e0e4e9; background: #fff; border-radius: 999px; padding: 5px 12px; font-size: 11px; font-weight: 700; color: #48525e; cursor: pointer; font-family: inherit; }
.hk-sit-chip:hover { border-color: #cfd6dd; }
.hk-sit-chip.on { border-color: var(--marca-escura); background: var(--marca-suave); color: var(--marca-escura); }
.hk-sit-chip b { font-weight: 800; color: #1f242a; }
.hk-sit-chip.on b { color: var(--marca-escura); }
.hk-sit-dot { width: 8px; height: 8px; border-radius: 50%; background: #9aa3ae; flex: none; }
.hk-sit-dot.ok { background: #2f9e57; }
.hk-sit-dot.bad { background: #c22733; }
.hk-sit-dot.warn { background: #e0a52e; }
.hk-sit-dot.part { background: #3f68c9; }
.hk-sit-dot.neutra { background: #9aa3ae; }
.hk-vazio { text-align: center; max-width: 540px; margin: 26px auto 34px; }
.hk-vazio-ic { width: 52px; height: 52px; border-radius: 14px; background: #f4f6f8; border: 1px solid #e6eaee; display: inline-flex; align-items: center; justify-content: center; color: #7a8492; margin-bottom: 12px; }
.hk-vazio b { display: block; font-size: 14.5px; color: #1f242a; margin-bottom: 5px; }
.hk-vazio p { font-size: 12.5px; color: #6a7480; line-height: 1.5; margin-bottom: 14px; }
.hk-vazio p b, .hk-vazio p strong { display: inline; font-weight: 700; color: #39424e; }
.hk-vazio small { display: block; font-size: 11.5px; color: #8a93a0; margin-top: 12px; }
.hk-fila-filtros { grid-template-columns: repeat(3, minmax(170px, 220px)) auto; align-items: end; }
.hk-fila-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.hk-fila-tabs { margin: 10px 0; }
.hk-fila-detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.hk-fila-detail-head h4 { margin: 0; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.hk-fila-meta { color: #6a7480; display: block; margin-top: 3px; font-size: 11.5px; }
.hk-fila-porque { margin: 0 0 10px; font-size: 11.5px; color: #5a6472; background: #f6f7f9; border: 1px solid #e6e9ee; border-radius: 8px; padding: 6px 10px; }
.hk-fila-porque summary { cursor: pointer; font-weight: 700; }
.hk-fila-porque summary i { font-weight: 400; color: #7a8492; font-style: normal; }
.hk-fila-porque .hk-steps { margin-top: 6px; }
.hk-fila-mat-scroll { max-height: 320px; overflow: auto; border: 1px solid #e9ebef; border-radius: 8px; margin-bottom: 12px; }
.hk-fila-mat-scroll .hk-fila-rows { margin-bottom: 0; }
.hk-fila-mat-scroll thead th { position: sticky; top: 0; background: #f4f6f8; z-index: 1; }
.hk-fila-assoc { background: #f9fafb; border: 1px solid #e6e9ee; border-radius: 10px; padding: 12px; }
.hk-fila-assoc-grid { display: grid; grid-template-columns: 1fr 1fr auto auto; gap: 10px; align-items: end; }
.hk-fila-campo { display: flex; flex-direction: column; gap: 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: #5a6470; }
.hk-fila-campo input { border: 1px solid #cfd6dd; border-radius: 8px; padding: 8px 10px; font-size: 12.5px; font-weight: 400; letter-spacing: 0; text-transform: none; }
.hk-fila-assoc-dica { margin: 8px 0 0; font-size: 11px; color: #6a7480; }
.hk-fila-assoc-info { margin: 0 0 8px; font-size: 12px; color: #3d4652; }
@media (max-width: 1100px) { .hk-fila-assoc-grid { grid-template-columns: 1fr; } .hk-fila-filtros { grid-template-columns: 1fr 1fr; } }
.hk-chip-man { border-color: #b9cdf2; background: #e9f0fd; color: #1a56b0; }
.hk-man-row td { background: #f4f8fe; border-bottom: 1px solid #e2eafb; }
.hk-man-item { display: inline-flex; gap: 8px; align-items: center; font-size: 11.5px; color: #2d466e; margin-right: 14px; flex-wrap: wrap; }

/* v0257: aviso de que a obra abriu recortada pelo filtro de situacao. */

/* Hancock DW dialog (v0064) */
.hk-actions-btns { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hk-dw-modal { max-width: min(880px, calc(100vw - 24px)); }
.hk-dw-body { max-height: 64vh; overflow: auto; }
.hk-dw-ok { font-size: 12px; color: #1e6b34; margin: 0 0 6px; }
.hk-dw-scroll { max-height: 46vh; overflow: auto; border: 1px solid #e9ebef; border-radius: 8px; margin-bottom: 8px; }
.hk-dw-table-row { cursor: pointer; }
.hk-dw-table-row:hover { background: #f7f8fa; }
.hk-dw-sample { font-family: Consolas, monospace; font-size: 10px; color: #5a6472; }

.hk-dw-table-row small.hk-dw-sample { display: block; margin-top: 2px; }

/* v0070: aviso de dados desatualizados no cabecalho do grafico Hancock */
.hk-chart-head .hk-aviso-dados {
  font-style: normal;
  font-weight: 600;
  color: #b3261e;
  font-size: 0.78rem;
}

/* v0071: quantidade abaixo do valor nas linhas de obra */
.hk-table .hk-num .hk-qtd {
  display: block;
  color: #6b7684;
  font-weight: 500;
  font-size: 0.72rem;
}

/* v0072: numero da requisicao na linha de material */
.hk-mat .hk-numeros {
  display: block;
  color: #6b7684;
  font-size: 0.72rem;
  font-weight: 500;
}

/* v0073: filtros do Hancock em grade limpa (mesmo padrao do Movimentacoes) */
.hk-toolbar { display: grid !important; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px 12px; align-items: end; }
.hk-toolbar > label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; min-width: 0; }
.hk-toolbar > label > span { font-size: 11px; font-weight: 700; color: #5a6472; }
.hk-toolbar select, .hk-toolbar input { height: 38px; border: 1px solid #cfd6dd; border-radius: 8px; padding: 0 10px; font-size: 12.5px; background: #fff; width: 100%; box-sizing: border-box; }
.hk-toolbar .hk-menu summary b { height: 38px; display: flex; align-items: center; width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; box-sizing: border-box; }
.hk-toolbar .dashboard-search-field { grid-column: span 4; }
.hk-toolbar [data-hk-search] { grid-column: span 2; height: 38px; margin: 0; }
@media (max-width: 980px) {
  .hk-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hk-toolbar .dashboard-search-field { grid-column: span 2; }
  .hk-toolbar [data-hk-search] { grid-column: span 2; }
}

/* v0073: painel do Hancock no mesmo padrao de altura do Movimentacoes */
.hk-panel { min-height: 72vh; }
/* O painel e um grid com altura minima: sem isto as linhas (cabecalho,
   filtros, chips) ESTICAM para preencher a tela e viram espaco em branco. */
.hk-panel { align-content: start; }

/* v0073: subtitulo Qtd/Valor no cabecalho e pares numericos */
.hk-table th .hk-th-sub { display: block; font-size: 9px; font-weight: 600; color: #8a93a0; letter-spacing: .02em; }
.hk-table .hk-num b { font-weight: 700; font-size: 12.5px; }

/* v0074: leitura da tabela fechada — obras bem separadas, sem quebra */
.hk-table .hk-obra-row td { border-top: 2px solid #d9dee4; background: #fbfcfd; padding-top: 9px; padding-bottom: 9px; }
.hk-table .hk-obra-row td:first-child b { font-size: 15px; letter-spacing: .01em; }
.hk-table .hk-obra-row .hk-num { white-space: nowrap; }
.hk-table .hk-obra-row .hk-num b { font-size: 13.5px; }
.hk-table .hk-obra-row .hk-num .hk-qtd { font-size: 11px; }
.hk-table .hk-mat-row td { background: #fff; }

/* v0074: chips de status da obra e do TCI na linha da obra */
.hk-chips { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 4px; }
.hk-chip { display: inline-block; border: 1px solid #d5dae0; border-radius: 999px; padding: 1px 8px; font-size: 10px; font-weight: 700; color: #4b5563; background: #f4f6f8; white-space: nowrap; }
.hk-chip-ok { border-color: #bfe3cc; background: #eaf7ef; color: #1c7c43; }
.hk-chip-bad { border-color: var(--marca-borda); background: var(--marca-suave); color: var(--marca-escura); }
.hk-chip-warn { border-color: #ecd9b0; background: #fdf6e7; color: #8a6a12; }
.hk-chip-part { border-color: #bdd4ee; background: #edf4fc; color: #2d5f96; }

/* v0074: conferencia das requisicoes + checkboxes dos menus */
.hk-conferencia { font-size: 11px; color: #5a6472; margin: -4px 0 12px; }
.hk-menu-box label input[type="checkbox"] { width: 15px; height: 15px; accent-color: #8a1621; flex: none; }
.hk-menu-box label { white-space: nowrap; }

/* v0076: aviso de carregamento parcial (etapa 2 em segundo plano) */
.hk-parcial { display: flex; align-items: center; gap: 8px; }
.hk-spinner-mini { width: 14px; height: 14px; border-width: 2px; flex: none; }

/* v0077: barra de filtros do Hancock no padrao do Movimentacoes (stock-filter-bar) */
.hk-filter-bar { grid-template-columns: minmax(135px, 0.9fr) minmax(150px, 1fr) minmax(135px, 0.9fr) minmax(150px, 1fr) minmax(122px, 0.7fr) minmax(122px, 0.7fr) auto auto; }
.hk-filter-bar .hk-menu summary { display: grid; gap: 6px; font-size: 0.74rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.02em; }
.hk-filter-bar .hk-menu summary b { text-transform: none; letter-spacing: normal; font-weight: 600; color: #1d232a; border: 1px solid #cfd6dd; border-radius: 10px; padding: 0 10px; height: 40px; display: flex; align-items: center; background: #fff; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hk-filter-bar select, .hk-filter-bar input { height: 40px; box-sizing: border-box; }
.hk-filter-bar .primary-button, .hk-filter-bar .ghost-button { height: 40px; }
.hk-filter-bar .hk-search-row { grid-column: 1 / -1; display: grid; gap: 6px; font-size: 0.74rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.02em; }
@media (max-width: 1100px) {
  .hk-filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hk-filter-bar .primary-button, .hk-filter-bar .ghost-button { grid-column: span 1; }
}

/* v0077: clique no dia + chip de dia filtrado */
.hk-chart-card .stock-hover-band { cursor: pointer; }
.hk-dia-filtro { display: flex; align-items: center; gap: 10px; }
.hk-dia-filtro .ghost-button { height: 30px; padding: 0 10px; font-size: 12px; }

/* v0078: pagina Tabela de obras — paginacao, chips na linha do numero, badge neutra */
.hk-paginacao { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0; font-size: 12px; color: #5a6472; font-weight: 600; }
.hk-paginacao-btns { display: flex; gap: 6px; }
.hk-paginacao .ghost-button { height: 30px; padding: 0 10px; font-size: 12px; }
.hk-paginacao .ghost-button:disabled { opacity: 0.4; cursor: default; }
.hk-obra-linha1 { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.hk-obra-linha1 b { font-size: 15px; }
.hk-badge-neutra { background: #eef1f4 !important; color: #39424e !important; }
.hk-tabela-filtros { grid-template-columns: minmax(150px, 0.9fr) minmax(170px, 1fr) minmax(170px, 1fr) minmax(240px, 2fr); margin-bottom: 12px; }
.hk-tabela-busca { display: grid; gap: 6px; font-size: 0.74rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.02em; }

/* v0080: Hancock no visual do Movimentacoes — cartoes maiores com barra de cor,
   titulos de bloco com "eyebrow" vermelho, botao Pesquisar na tabela */
.hk-card { padding: 14px 16px; border-radius: 12px; border-left-width: 4px; }
.hk-card b { font-size: 21px; margin-top: 4px; }
.hk-card small { font-size: 10px; letter-spacing: .04em; }
.hk-card span { font-size: 10.5px; }
.hk-cards .hk-card:nth-child(1) { border-left-color: #39424e; }
.hk-cards .hk-card:nth-child(2) { border-left-color: #2f9e57; }
.hk-cards .hk-card:nth-child(3) { border-left-color: var(--marca-escura); }
.hk-cards .hk-card:nth-child(4) { border-left-color: #c8921a; }
.hk-cards .hk-card:nth-child(5) { border-left-color: var(--marca-escura); }
.hk-bloco-titulo { display: grid; gap: 2px; }
.hk-bloco-titulo span { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: #8a1621; }
.hk-bloco-titulo strong { font-size: 13.5px; }
.hk-chart-card { padding: 14px 16px; border-radius: 12px; }
.hk-tabela-filtros { grid-template-columns: minmax(140px, 0.75fr) minmax(150px, 0.85fr) minmax(170px, 1fr) minmax(210px, 1.7fr) auto auto auto; align-items: end; }
.hk-tabela-filtros .primary-button, .hk-tabela-filtros .ghost-button { height: 40px; }
@media (max-width: 1180px) { .hk-tabela-filtros { grid-template-columns: 1fr 1fr; } }
.hk-actions-row { margin: 2px 0 12px; }

/* ===== LAYOUT B da Tabela de obras (20/08, escolha do usuario) =============
   Filtros na coluna da esquerda (recolhivel) e a tabela ocupando todo o resto.
   Vale com e sem tela cheia — em tela cheia as duas colunas usam a altura da
   janela inteira e so a tabela rola. */
.hk-tab-layout { display: grid; grid-template-columns: minmax(196px, 224px) minmax(0, 1fr); gap: 12px; align-items: start; }
.hk-tab-layout.sem-lado { grid-template-columns: minmax(0, 1fr); }
.hk-tab-main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.hk-tab-side { border: 1px solid #e6e9ee; border-radius: 12px; background: #fafbfc; padding: 11px; display: flex; flex-direction: column; gap: 11px; }
.hk-side-topo { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hk-side-topo b { font-size: 11px; letter-spacing: .08em; color: #4b5563; }
.hk-side-fechar { border: 1px solid #e2e6ec; background: #fff; border-radius: 999px; padding: 3px 10px; font-size: 11px; color: #6b7280; cursor: pointer; font: inherit; font-size: 11px; }
.hk-side-fechar:hover { border-color: #c9ced6; color: #39424e; }
.hk-side-campos { display: flex; flex-direction: column; gap: 9px; }
.hk-side-campos > label, .hk-side-campos > .hk-menu { width: 100%; }
.hk-side-campos label > span, .hk-side-campos .hk-menu > summary > span { display: block; font-size: 0.7rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .02em; margin-bottom: 4px; }
.hk-side-campos select, .hk-side-campos .hk-menu > summary { width: 100%; }
.hk-side-grupo { display: flex; flex-direction: column; gap: 5px; }
.hk-side-tit { font-size: 0.7rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.hk-side-lista { display: flex; flex-direction: column; gap: 2px; }
.hk-side-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; border: 0; background: transparent; border-radius: 8px; padding: 5px 8px; font: inherit; font-size: 11.5px; color: #4b5563; cursor: pointer; text-align: left; }
.hk-side-item > span { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hk-side-item b { font-size: 11.5px; color: #1f242a; }
.hk-side-item:hover { background: #eef1f5; }
.hk-side-item.on { background: var(--marca-suave-2); color: var(--marca-escura); font-weight: 800; }
.hk-side-item.on b { color: var(--marca-escura); }
.hk-side-dica { font-size: 10.5px; color: #98a1ad; margin: 0; }
.hk-side-abrir { align-self: center; }
.hk-tab-acoes { display: flex; align-items: center; gap: 9px; }
.hk-tab-acoes .hk-tabela-busca { flex: 1; min-width: 0; display: block; }
.hk-tab-acoes .hk-tabela-busca input { width: 100%; }
.hk-tab-acoes .primary-button, .hk-tab-acoes .ghost-button { height: 40px; white-space: nowrap; }
/* aviso de devolucoes em UMA linha, com o detalhe atras do "ver detalhe" */
.hk-dev-det { padding: 7px 11px; }
.hk-dev-det > summary { cursor: pointer; list-style: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hk-dev-det > summary::-webkit-details-marker { display: none; }
.hk-dev-corpo { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; padding-top: 6px; border-top: 1px solid #f0d9a8; }
/* alturas: com e sem tela cheia so a tabela rola */
.hk-tab-main .hk-table-wrap { max-height: calc(100vh - 300px); }
.hk-tabela-page.full { display: flex; flex-direction: column; padding: 0 14px 12px; }
.hk-tabela-page.full .hk-tab-layout { flex: 1; min-height: 0; align-items: stretch; }
.hk-tabela-page.full .hk-tab-side { overflow: auto; max-height: calc(100vh - 74px); }
.hk-tabela-page.full .hk-tab-main .hk-table-wrap { max-height: calc(100vh - 152px); }
@media (max-width: 1180px) {
  .hk-tab-layout { grid-template-columns: minmax(0, 1fr); }
  .hk-tab-side { order: 2; }
}

/* rotulos da coluna de filtros no mesmo padrao (ESTADO / DEPOSITO / STATUS) */
.hk-side-campos .hk-menu > summary { display: block; padding: 0; border: 0; background: transparent; }
.hk-side-campos .hk-menu > summary > b { display: flex; align-items: center; justify-content: space-between; gap: 6px; border: 1px solid var(--line, #e3e7ec); border-radius: 10px; padding: 9px 11px; background: #fff; font-size: 12.5px; font-weight: 600; color: #1f242a; }
.hk-side-campos .hk-menu[open] > summary > b { border-color: #b9c0c9; }
.hk-side-campos .hk-menu-box { max-height: 260px; }
.hk-tab-main > .hk-paginacao:first-of-type { margin-top: 0; }

/* v0116: colunas DMA Sistema Energisa e Desativação Fiscal — o que SAIU da obra
   aparece em vermelho discreto, para não ser lido como baixa. */
.hk-table td.hk-saiu b { color: #b3151b; }
.hk-table td.hk-saiu .hk-qtd { color: var(--marca-borda); }

/* v0118: selo da obra congelada na SIAGO-C-6-2-2 ENCERRADAS */
.hk-chip.hk-chip-enc { background: #f4f0ff; border-color: #ddd6fe; color: #6d28d9; font-weight: 700; }

/* v0119 item 1: em TELA CHEIA a página não rola — só a tabela. A altura vem da
   janela e o corpo da tabela ocupa o que sobra (flex), sem calc fixo. */
.hk-tabela-page.full { height: 100vh; max-height: 100vh; overflow: hidden; }
.hk-tabela-page.full .hk-tab-main { min-height: 0; }
.hk-tabela-page.full .hk-tab-main .hk-table-wrap { flex: 1 1 auto; min-height: 0; max-height: none; }
.hk-tabela-page.full .hk-tab-side { max-height: none; }
/* total da coluna no cabeçalho (item 5) */
.hk-table thead th .hk-th-total { color: var(--marca-escura); font-weight: 800; font-size: 10px; letter-spacing: 0; }
.hk-btn-excel i { color: #1f6b3f; }

/* v0121 (opção A): barra fina de contexto presa abaixo do cabeçalho — mostra a
   obra cujos materiais estão passando, sem cobrir linha nenhuma. */
.hk-table tbody tr.hk-ctx-row > td {
  position: sticky;
  top: var(--hk-thead-h, 46px);
  z-index: 3;
  padding: 0;
  border-bottom: 0;
}
.hk-ctx-barra {
  display: flex; align-items: center; gap: 9px;
  background: #eef2f7; border-bottom: 1px solid #cfd7e1;
  box-shadow: 0 5px 6px -5px rgba(31, 36, 42, .35);
  padding: 5px 10px; font-size: 11.5px; color: #39424e;
  cursor: pointer; width: 100%; text-align: left; font-family: inherit;
}
.hk-ctx-barra:hover { background: #e6ecf4; }
.hk-ctx-barra b { font-size: 12.5px; color: #1f242a; }
.hk-ctx-barra .hk-chip { margin: 0; }
.hk-ctx-dir { margin-left: auto; color: #8b929d; white-space: nowrap; }
.hk-ctx-dir b { color: var(--marca-escura); font-size: 12px; }
.hk-ctx-row.vazia > td { visibility: hidden; } /* só quando não há obra nenhuma na página */

/* v0122: nome do depósito ao lado do código no tooltip dos gráficos */
.stock-tooltip-row.compact .stock-tooltip-dep {
  font-size: 0.68rem;
  font-weight: 600;
  color: #8b8a86;
  letter-spacing: .01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 190px;
}

/* ===== SHELL DO DESKTOP (v0124, etapa 1) ===================================
   Cabeçalho fixo + menu lateral com módulos/submódulos. Vale só a partir de
   1100px: no celular e no tablet estreito o app continua exatamente como era
   (as abas do topo seguem funcionando e a lateral fica escondida). */
.app-side,
.app-side-toggle,
.app-crumb { display: none; }

@media (min-width: 900px) {
  .app-shell { display: flex; flex-direction: column; min-height: 100vh; }
  /* o cabeçalho antigo era grid de 3 colunas; no shell novo vira uma faixa */
  .topbar {
    position: sticky; top: 0; z-index: 40;
    display: flex !important; align-items: center; gap: 14px;
    grid-template-columns: none;
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding: 0 16px; min-height: 0; height: 58px; flex: none;
    box-shadow: 0 1px 2px rgba(20, 24, 28, .05);
  }
  /* as três laterais de navegação antigas saem de cena: quem navega é o menu */
  .electric-warehouse-sidebar,
  .works-planning-sidebar,
  .warehouse-tools-nav,
  .dashboard-sidebar { display: none !important; }
  .electric-warehouse-workspace,
  .works-planning-workspace,
  .dashboard-workspace { grid-template-columns: minmax(0, 1fr) !important; }
  .topbar .title-block { display: none; }        /* o caminho substitui o título */
  .topbar .mode-switch { display: none; }        /* a navegação virou a lateral */
  .app-side-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 9px; flex: none;
    border: 1px solid var(--line); background: #fff; color: var(--muted); cursor: pointer;
  }
  .app-side-toggle:hover { border-color: #c9ced6; color: var(--ink); }
  .topbar .brand { flex: none; }
  .topbar .brand img { height: 30px; width: auto; }
  .app-crumb {
    display: flex; align-items: center; gap: 7px; flex: 1; min-width: 0;
    font-size: 12.5px; color: var(--muted); overflow: hidden; white-space: nowrap;
  }
  .app-crumb-sep { color: #c3c9d1; }
  .app-crumb-atual { color: var(--ink); font-weight: 700; font-size: 13.5px; }
  .topbar .top-actions { flex: 0 0 auto; margin-left: auto; gap: 10px; width: auto; }
  .topbar .brand { max-width: 150px; }

  .app-body { flex: 1; min-height: 0; display: flex; align-items: stretch; }
  .app-side {
    display: flex; flex-direction: column; gap: 2px;
    width: 252px; flex: none; background: var(--surface);
    border-right: 1px solid var(--line); padding: 8px 0 18px;
    position: sticky; top: 58px; align-self: flex-start;
    min-height: calc(100vh - 58px); max-height: calc(100vh - 58px); overflow: auto;
  }
  .app-main { flex: 1; min-width: 0; }
  .app-side-grupo { display: flex; flex-direction: column; }
  .app-side-titulo {
    font-size: 9.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
    color: #9aa2ae; padding: 13px 16px 5px;
  }
  .app-side-item {
    display: flex; align-items: center; gap: 10px; width: calc(100% - 16px);
    margin: 1px 8px; padding: 8px 12px; border: 0; background: transparent;
    border-radius: 9px; font: inherit; font-size: 13px; color: #39424e;
    cursor: pointer; text-align: left;
  }
  .app-side-item i[data-lucide] { width: 17px; height: 17px; flex: none; }
  .app-side-item:hover { background: var(--page); }
  .app-side-item.on { background: var(--marca-suave-2); color: var(--marca); font-weight: 700; }
  .app-side-item.aberto { color: var(--ink); font-weight: 700; }
  .app-side-seta { margin-left: auto; color: #b8c0c9; font-size: 11px; font-style: normal; }
  .app-side-subs { display: flex; flex-direction: column; padding: 1px 0 4px; }
  .app-side-sub {
    display: flex; align-items: center; gap: 9px; width: calc(100% - 38px);
    margin: 1px 8px 1px 30px; padding: 6px 11px; border: 0; background: transparent;
    border-radius: 8px; font: inherit; font-size: 12.3px; color: #5a6470;
    cursor: pointer; text-align: left;
  }
  .app-side-sub:hover { background: var(--page); }
  .app-side-sub.on { background: var(--marca-suave-2); color: var(--marca); font-weight: 700; }
  .app-side-ponto { width: 5px; height: 5px; border-radius: 50%; background: #c3c9d1; flex: none; }
  .app-side-sub.on .app-side-ponto { background: var(--marca); }

  /* recolhida: só os ícones dos módulos */
  body.app-side-recolhida .app-side { width: 64px; }
  body.app-side-recolhida .app-side-titulo,
  body.app-side-recolhida .app-side-item span,
  body.app-side-recolhida .app-side-seta,
  body.app-side-recolhida .app-side-subs { display: none; }
  body.app-side-recolhida .app-side-item { justify-content: center; padding: 9px 0; margin: 2px 8px; width: calc(100% - 16px); }
  body.app-side-recolhida .app-side-grupo + .app-side-grupo { border-top: 1px solid #eef1f4; padding-top: 4px; margin-top: 4px; }

  /* a barra "Voltar" das telas perde a função com o menu sempre à vista */
  .view-back-bar { display: none; }
}

/* ---- v0125 · ETAPA 2: barra padrao das telas (opcao A - cartao unico) ------
   Linha 1: titulo + resumo + acoes a direita (o cabecalho que a tela ja tinha,
   agora com os botoes Pesquisar/Limpar dentro dele).
   Linha 2: os filtros, separados por uma linha fina, no MESMO cartao branco.
   As classes antigas continuam nos elementos (nenhum handler mudou);
   .tela-filtros troca so a moldura: sem cartao proprio, sem fundo cinza. */
.tela-filtros.tela-filtros {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 12px;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 12px 0 0;
  margin: 0;
}

.tela-filtros > label {
  min-width: 150px;
  flex: 0 1 auto;
}

.tela-filtros > .stock-menu,
.tela-filtros > .hk-menu,
.tela-filtros > .planning-menu {
  min-width: 175px;
}

.tela-filtros input[type="search"] {
  min-width: 230px;
}

.tela-filtros .stock-dirty-hint {
  align-self: center;
}

/* botoes que subiram para o cabecalho ficam colados a direita
   (o cabecalho estiliza os <span> e transforma <div> em grid — desfazemos
   dentro do bloco de acoes para os botoes ficarem normais) */
.inventory-section-head .inventory-section-actions {
  display: flex;
  flex-flow: row wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
  flex: none;
  align-items: center;
}

.inventory-section-head .inventory-section-actions span {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  text-transform: none;
}

.inventory-history-section-head .inventory-section-actions {
  flex: none;
  align-items: center;
}

.inventory-management-head > b {
  margin-left: 0;
}

/* Acompanhar: o cartao da busca segue o mesmo padrao */
.dashboard-search-panel {
  margin: 0 0 12px;
}

/* EPI/EPC no computador: filtros integrados ao cartao, como nas outras telas
   (no celular continua o formato proprio, feito para o campo) */
@media (min-width: 900px) {
  .warehouse-mobile-filters {
    background: transparent;
    border-bottom: 0;
    border-top: 1px solid var(--line);
    margin: 0 16px;
    padding: 12px 0 14px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px 12px;
  }
  .warehouse-mobile-filters > label {
    min-width: 150px;
  }
  .warehouse-mobile-filters .warehouse-mobile-search {
    min-width: 240px;
  }
}

/* etiquetas do Acompanhar no mesmo padrao das outras telas */
.dashboard-search-toolbar.tela-filtros label {
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--muted);
}

/* ---- v0126 · Usuarios e acessos (opcao A: tabela + gaveta lateral) --------
   A tela vira a tabela; Novo/Editar abre a gaveta a direita com o formulario
   em secoes numeradas. Os ids e names do formulario NAO mudaram. */
.inventory-section-head .auth-users-resumo {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: normal;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.auth-users-filtros input[type="search"] {
  border: 1px solid #d5dee9;
  border-radius: 8px;
  padding: 9px 10px;
  font: inherit;
  background: #fff;
}

.auth-users-filtros select {
  border: 1px solid #d5dee9;
  border-radius: 8px;
  padding: 9px 10px;
  font: inherit;
  background: #fff;
}

.auth-users-filtros > label {
  display: grid;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.auth-users-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
}

.auth-users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.auth-users-table th {
  background: #f8fafc;
  text-align: left;
  padding: 9px 12px;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.auth-users-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #eef1f5;
  vertical-align: middle;
}

.auth-users-table tbody tr:last-child td {
  border-bottom: 0;
}

.auth-users-table tbody tr:hover td {
  background: #fbfcfe;
}

.auth-users-table td b {
  display: block;
}

.auth-users-table td small {
  display: block;
  color: var(--muted);
}

.auth-linha-inativa td b,
.auth-linha-inativa td {
  color: #8a919b;
}

.auth-td-modulos {
  max-width: 420px;
}

.auth-td-modulos small {
  margin-top: 3px;
}

.auth-td-acoes {
  white-space: nowrap;
  text-align: right;
}

.auth-chip {
  display: inline-block;
  background: #f1f4f7;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 0.74rem;
  margin: 1px 3px 1px 0;
  color: #40474f;
  white-space: nowrap;
}

.auth-chip-mais {
  background: #fff;
  border-style: dashed;
  color: var(--muted);
  cursor: help;
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}

.auth-badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.auth-badge.on { background: var(--green-soft); color: var(--green); }
.auth-badge.off { background: #f2f3f5; color: #6a727c; }
.auth-badge.senha { background: var(--amber-soft); color: var(--amber); }

/* gaveta */
.auth-drawer-fundo {
  position: fixed;
  inset: 0;
  background: rgba(23, 26, 29, 0.38);
  z-index: 88;
}

.auth-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(520px, 100vw);
  background: #fff;
  z-index: 89;
  box-shadow: -18px 0 40px rgba(20, 24, 28, 0.22);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transform: translateX(14px);
  opacity: 0.6;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.auth-drawer.aberta {
  transform: none;
  opacity: 1;
}

.auth-drawer-topo {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.auth-drawer-topo strong {
  font-size: 1rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-drawer-x {
  margin-left: auto;
}

/* o formulario dentro da gaveta e empilhado, nao em grade de 12 colunas */
.auth-drawer .auth-user-form {
  display: block;
  padding: 0 0 16px;
  border-top: 0;
}

.auth-sec {
  padding: 13px 16px;
  border-bottom: 1px solid #eef1f5;
  margin: 0;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  border-radius: 0;
  background: transparent;
}

.auth-sec-titulo {
  display: block;
  width: 100%;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--marca-escura);
  margin: 0 0 10px;
  padding: 0;
  float: none;
}

.auth-drawer .auth-user-form > .auth-sec > label,
.auth-drawer .auth-scope-grid > label {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
  grid-column: auto;
}

.auth-drawer .auth-sec > label:last-child {
  margin-bottom: 0;
}

.auth-drawer .auth-user-form input[type="text"],
.auth-drawer .auth-user-form input[type="email"],
.auth-drawer .auth-user-form select {
  width: 100%;
}

.auth-drawer .auth-module-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.auth-drawer .auth-module-grid legend {
  margin-bottom: 4px;
}

.auth-drawer .auth-module-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  margin: 0;
}

.auth-drawer .auth-module-grid label:has(input:checked) {
  border-color: var(--marca-borda);
  background: var(--marca-suave);
  font-weight: 700;
}

.auth-drawer .auth-module-grid input {
  accent-color: var(--marca);
  flex: none;
}

.auth-drawer .auth-scope-grid {
  display: block;
}

.auth-drawer .auth-scope-help {
  margin: 0 0 10px;
  font-size: 0.78rem;
  color: var(--muted);
  grid-column: auto;
}

.auth-drawer-rodape {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 12px 16px;
  background: #fff;
  border-top: 1px solid var(--line);
  margin-top: 2px;
}

.auth-drawer-rodape .auth-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.84rem;
  font-weight: 700;
  white-space: nowrap;
  margin: 0;
}

.auth-drawer-rodape .auth-checkbox input {
  accent-color: var(--marca);
}

.auth-drawer-rodape .auth-default-password {
  color: var(--muted);
  font-size: 0.74rem;
  flex: 1 1 100%;
  margin: 0;
}

.auth-drawer-rodape .auth-user-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  padding: 0;
}

@media (max-width: 700px) {
  .auth-drawer {
    width: 100vw;
  }
  .auth-drawer .auth-module-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- v0127 · ETAPA 3: acabamento do layout do desktop ---------------------
   1) DDS e TMS entram no padrao das outras telas (titulo compacto, mesmo
      cabecalho da Etapa 2) — no celular continuam como estavam.
   2) Checklist: o seletor de grupo vira um cartao, no lugar do select solto.
   3) Notebook (1100–1279px): menu lateral mais enxuto para sobrar conteudo.
   4) Foco visivel ao navegar por teclado no menu novo. */
@media (min-width: 900px) {
  .dds-header,
  .tms-header {
    padding: 12px 16px;
    gap: 12px;
  }

  .dds-header h2,
  .tms-header h2 {
    font-size: 1.05rem;
    margin: 0;
  }

  .dds-header > div > .eyebrow,
  .tms-header > div > .eyebrow {
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    margin: 0 0 2px;
  }

  .dds-header > div > p:not(.eyebrow),
  .tms-header > div > p:not(.eyebrow) {
    color: var(--muted);
    font-size: 0.8rem;
    margin: 2px 0 0;
  }

  /* Checklist: seletor de grupo/checklist com a mesma moldura das telas */
  .workspace .sidebar {
    top: 70px; /* o cabecalho fixo novo tem 58px */
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
  }
}

/* notebook: lateral mais estreita, conteudo respira */
@media (min-width: 1100px) and (max-width: 1279px) {
  .app-side {
    width: 224px;
  }

  .app-side-item {
    font-size: 13px;
  }

  body.app-side-recolhida .app-side {
    width: 64px;
  }
}

/* foco visivel no menu lateral e no botao de recolher */
.app-side-item:focus-visible,
.app-side-sub:focus-visible,
.app-side-toggle:focus-visible {
  outline: 2px solid var(--marca);
  outline-offset: -2px;
}

/* ---- v0128 · Cabecalhos de pesquisa no estilo A (campos preenchidos) ------
   Escolha do Carlos: campos com fundo cinza-claro sem borda, cantos 10px,
   altura 40px; ao focar o campo fica branco com anel vermelho ELCOP.
   Vale para TODAS as barras de pesquisa no desktop (>=1100px); no celular
   as telas de campo continuam com o visual proprio. */
@media (min-width: 900px) {
  .tela-filtros select,
  .tela-filtros input,
  .hk-filter-bar select,
  .hk-filter-bar input,
  .hk-tabela-busca input,
  .warehouse-mobile-filters select,
  .warehouse-mobile-filters input,
  .dds-header-actions select,
  .dds-header-actions input,
  .tms-header-actions select,
  .tms-header-actions input,
  .stock-menu-button {
    background: #f1f4f8;
    border: 1.5px solid transparent;
    border-radius: 10px;
    min-height: 40px;
    padding: 8px 12px;
    font: inherit;
    font-size: 0.86rem;
    color: var(--ink);
    transition: background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
  }

  .tela-filtros select:hover,
  .tela-filtros input:hover,
  .hk-filter-bar select:hover,
  .hk-filter-bar input:hover,
  .hk-tabela-busca input:hover,
  .warehouse-mobile-filters select:hover,
  .warehouse-mobile-filters input:hover,
  .dds-header-actions select:hover,
  .dds-header-actions input:hover,
  .tms-header-actions select:hover,
  .tms-header-actions input:hover,
  .stock-menu-button:hover {
    background: #eaeef4;
  }

  .tela-filtros select:focus,
  .tela-filtros input:focus,
  .hk-filter-bar select:focus,
  .hk-filter-bar input:focus,
  .hk-tabela-busca input:focus,
  .warehouse-mobile-filters select:focus,
  .warehouse-mobile-filters input:focus,
  .dds-header-actions select:focus,
  .dds-header-actions input:focus,
  .tms-header-actions select:focus,
  .tms-header-actions input:focus,
  .stock-menu-button:focus,
  .stock-menu.open .stock-menu-button {
    outline: none;
    background: #fff;
    border-color: var(--marca);
    box-shadow: 0 0 0 3px rgba(240, 132, 48, 0.1);
  }

  .tela-filtros input::placeholder,
  .hk-filter-bar input::placeholder,
  .hk-tabela-busca input::placeholder,
  .warehouse-mobile-filters input::placeholder {
    color: #98a1ab;
  }

  /* gatilho dos menus suspensos do Hancock (details/summary) no mesmo tom */
  .hk-filter-bar .hk-menu summary b,
  .hk-menu summary b {
    background: #f1f4f8;
    border: 1.5px solid transparent;
    border-radius: 10px;
  }

  .hk-menu summary:hover b {
    background: #eaeef4;
  }

  .hk-menu[open] summary b,
  .hk-menu summary:focus-visible b {
    background: #fff;
    border-color: var(--marca);
    box-shadow: 0 0 0 3px rgba(240, 132, 48, 0.1);
  }

  /* busca do EPI/EPC (icone dentro do campo) e busca do Checklist */
  .warehouse-mobile-search div {
    background: transparent;
  }

  .toolbar .search-box {
    background: #f1f4f8;
    border: 1.5px solid transparent;
    border-radius: 10px;
    min-height: 40px;
    transition: background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
  }

  .toolbar .search-box:hover {
    background: #eaeef4;
  }

  .toolbar .search-box:focus-within {
    background: #fff;
    border-color: var(--marca);
    box-shadow: 0 0 0 3px rgba(240, 132, 48, 0.1);
  }

  .toolbar .search-box input {
    background: transparent;
    border: 0;
    outline: none;
  }
}

/* ---- v0133 · modulo selecionado SEMPRE em vermelho no menu lateral --------
   Antes so modulo sem submodulo (TMS, Inicio...) ganhava o destaque; modulo
   com submodulos (Materiais eletricos, EPI/EPC) ficava escuro — no menu
   recolhido o icone ativo nem aparecia. Escolha do Carlos: opcao B, vermelho
   no recolhido E no aberto (modulo + submodulo ativos destacados juntos). */
.app-side-item.aberto {
  background: var(--marca-suave-2);
  color: var(--marca-escura);
  font-weight: 700;
}

.app-side-item.aberto i[data-lucide],
.app-side-item.aberto svg {
  color: var(--marca-escura);
}

.app-side-item.aberto .app-side-seta {
  color: var(--marca-escura);
}

/* ---- v0134 · Inicio com FOTO REAL (desktop) + banner no hub de Obras ------
   Pedido do Carlos: tirar o acesso aos modulos pela tela inicial no
   computador (navegacao pela barra lateral) e usar a foto real da equipe em
   campo. No CELULAR nada muda: o hero fica escondido e os cartoes continuam
   (la nao existe barra lateral). */
.home-hero,
.home-hero-foto {
  display: none;
}

@media (min-width: 900px) {
  /* v0136 (opção A do Carlos): a foto NÃO é mais esticada no fundo — aparece
     INTEIRA, menor e nítida, emoldurada, sobre um fundo desfocado dela mesma.
     Isso resolve a perda de qualidade que o "cover" causava. */
  .home-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 34px;
    min-height: calc(100vh - 58px - 32px);
    padding: 26px 30px;
    border-radius: 14px;
    background: linear-gradient(140deg, #1b2431 0%, #2a3646 55%, #3a2a2c 100%);
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
  }

  .home-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("assets/img/inicio-obra-v2.jpg?v=20261002-0356") center / cover no-repeat;
    filter: blur(26px) saturate(0.8) brightness(0.42);
    transform: scale(1.12);
    z-index: 0;
  }

  .home-hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--marca), #d4a017);
    z-index: 3;
  }

  .home-hero-foto {
    display: block; /* desfaz o display:none do celular */
    position: relative;
    z-index: 2;
    flex: none;
    height: min(calc(100vh - 190px), 620px);
    aspect-ratio: 1100 / 1466;
    background: url("assets/img/inicio-obra-v2.jpg?v=20261002-0356") center / contain no-repeat #0d1117;
    border-radius: 14px;
    border: 6px solid #fff;
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.25);
  }

  .home-hero-overlay {
    position: relative;
    z-index: 2;
    max-width: 420px;
    padding: 0;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
  }

  .home-hero-eyebrow {
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    color: #ffd9a8;
    margin: 0 0 6px;
  }

  .home-hero-overlay h2 {
    font-size: 1.7rem;
    margin: 0 0 2px;
    color: #fff;
  }

  #homeHeroData {
    font-size: 0.9rem;
    opacity: 0.94;
    margin: 0 0 8px;
  }

  .home-hero-frase {
    font-size: 0.85rem;
    opacity: 0.92;
    margin: 0;
  }

  /* ---- v0254 · assinatura VCR discreta + faixa do tempo -------------------
     Pedido do Carlos (02/09/2026): tirar a linha "ELCOP ENGENHARIA · NOSSA
     ENERGIA E VOCE", deixar uma referencia SUTIL da VCR e mostrar a previsao
     do tempo em tempo real. Tudo so no computador — no celular a capa nem
     aparece (.home-hero fica display:none fora deste media query). */
  .home-hero-assinatura {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 18px 0 0;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
  }

  .home-hero-assinatura img {
    height: 22px;
    width: auto;
    opacity: 0.85;
  }

  .home-hero-assinatura span {
    font-size: 0.6rem;
    letter-spacing: 0.17em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
  }

  .home-hero-tempo {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 9px 18px;
    background: rgba(13, 17, 23, 0.5);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 0.75rem;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
  }

  .home-hero-tempo[hidden] {
    display: none;
  }

  .home-hero-tempo b {
    font-size: 0.92rem;
  }

  .home-hero-tempo .hht-sep {
    opacity: 0.35;
  }

  .home-hero-tempo .hht-dir {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 13px;
    opacity: 0.85;
  }

  /* pilula da chuva: apagada quando o dia nao tem nenhuma hora com chuva */
  .home-hero-tempo .hht-chuva {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.16);
    opacity: 0.7;
  }

  .home-hero-tempo .hht-chuva.tem {
    background: rgba(212, 160, 23, 0.24);
    border-color: rgba(255, 214, 120, 0.55);
    color: #ffe2a6;
    font-weight: 700;
    opacity: 1;
  }

  /* no computador os modulos saem da Inicio: quem navega e a barra lateral */
  .home-view .home-module-grid {
    display: none;
  }

  /* cartoes do hub em coluna (no shell novo os 3 ficavam espremidos) */
  .works-module-grid .works-module-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .works-module-card .primary-button {
    margin-top: auto;
  }

  .works-hero {
    height: 190px;
    border-radius: 14px;
    background:
      linear-gradient(180deg, rgba(16, 18, 24, 0) 45%, rgba(16, 18, 24, 0.35) 100%),
      url("assets/img/obras-banner-v2.jpg?v=20261002-0356") center 45% / cover no-repeat;
    box-shadow: var(--shadow);
    margin-bottom: 14px;
  }
}

/* capa dos modulos (v0134): mesma foto da Inicio; o resto da tela some */
@media (min-width: 900px) {
  .warehouse-view.em-capa > *:not(#warehouseHubHero) {
    display: none !important;
  }

  .module-hero .home-hero-frase {
    font-size: 0.9rem;
  }
}

/* v0135: um estado só (submódulo Energisa MS/MT) usa a largura toda */
.siago-panels-grid.um-estado {
  grid-template-columns: minmax(0, 1fr);
}

/* v0136: nas CAPAS dos hubs/módulos a foto sai da moldura — fica só o fundo
   desfocado com a legenda (escolha do Carlos). A moldura segue só na Início. */
@media (min-width: 900px) {
  .module-hero {
    justify-content: flex-start;
    padding: 26px 46px;
  }

  .module-hero .home-hero-foto {
    display: none;
  }

  .module-hero::before {
    filter: blur(20px) saturate(0.85) brightness(0.5);
  }

  .module-hero .home-hero-overlay {
    max-width: 560px;
  }
}

/* ---- v0137 · ajustes pedidos pelo Carlos --------------------------------- */

/* ITEM 1: cards de saldo por depósito — os rótulos de 2 linhas desalinhavam
   os valores das colunas vizinhas (parecia texto sobreposto). Agora todos os
   rótulos ocupam a mesma altura e as 3 linhas do slot ficam alinhadas. */
.stock-balance-slot {
  gap: 3px;
  align-content: start;
  padding: 12px 11px;
}

.stock-balance-slot span {
  display: block;
  min-height: 2.2em;
}

.stock-balance-slot b {
  font-size: 0.88rem;
}

/* ITEM 3: Programação de obras — a PÁGINA não rola (só a grade), e as duas
   barras da grade ficam sempre visíveis e mais grossas. */
@media (min-width: 900px) {
  /* A tela ocupa exatamente a altura livre abaixo do cabeçalho fixo e NAO rola.
     Da view ate a grade tudo vira coluna flexivel com min-height:0 — assim a
     grade recebe a sobra exata e as duas barras dela ficam dentro da tela.
     (Altura fixa por calc() nao funciona: o cabecalho/filtros mudam de altura
     conforme o zoom, a largura e o estado dos filtros.) */
  .works-planning-view:is(.planning-tool-planning) {
    height: calc(100vh - 58px);
    overflow: hidden;
    grid-template-rows: minmax(0, 1fr);
    padding-bottom: 10px; /* a folga de rodape das telas roláveis nao serve aqui */
  }

  .works-planning-view:is(.planning-tool-planning) .works-planning-workspace {
    min-height: 0;
    align-items: stretch;
  }

  .works-planning-view:is(.planning-tool-planning) .works-planning-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
  }

  .works-planning-view:is(.planning-tool-planning) .inventory-shell.planning-shell,
  .works-planning-view:is(.planning-tool-planning) .inventory-dashboard-panel.planning-panel,
  .works-planning-view:is(.planning-tool-planning) .stock-detail-block.planning-grid-block {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
  }

  .works-planning-view:is(.planning-tool-planning) .stock-detail-block.planning-grid-block {
    margin-bottom: 0;
  }

  .works-planning-view:is(.planning-tool-planning) .stock-detail-block.planning-grid-block .planning-grid-scroll {
    flex: 1 1 auto;
    min-height: 140px;
    max-height: none;
    overflow: scroll; /* mantém as duas barras sempre à vista */
    scrollbar-gutter: stable;
  }

}

/* ITEM 4: no computador o caminho no cabeçalho já diz onde estamos — o
   título/subtítulo repetido no topo de cada tela sai. As AÇÕES do cabeçalho
   (Pesquisar, Limpar, Atualizar…) e os resumos continuam. */
@media (min-width: 900px) {
  .stock-movement-panel > .inventory-section-head:first-child > div:not(.inventory-section-actions),
  .hk-panel > .inventory-section-head:first-child > div:not(.inventory-section-actions),
  .planning-panel > .inventory-section-head:first-child > div:not(.inventory-section-actions),
  .inventory-dashboard-panel > .inventory-section-head:first-child > div:not(.inventory-section-actions),
  .dashboard-search-panel > .inventory-section-head > div:not(.inventory-section-actions),
  .auth-users-head > div:not(.inventory-section-actions):not(.auth-users-resumo) {
    display: none;
  }

  /* cabeçalho que ficou só com os botões encosta à direita, sem sobrar altura */
  .stock-movement-panel > .inventory-section-head:first-child,
  .hk-panel > .inventory-section-head:first-child,
  .planning-panel > .inventory-section-head:first-child,
  .inventory-dashboard-panel > .inventory-section-head:first-child,
  .dashboard-search-panel > .inventory-section-head,
  .auth-users-head {
    justify-content: flex-end;
    min-height: 0;
  }
}

/* ITEM 2 (opção A): tela Hancock vs Sistemas Energisa — barra de acessos no
   canto superior direito, FIXA junto com os filtros e os cartões; só os
   gráficos rolam. "Limpar consultas antigas" saiu; "Tabela de obras" ficou sem
   contador (ele dependia do filtro); o contador da Caixa de pendências é o
   total do histórico. */
.hk-actions-row {
  align-items: center;
  gap: 14px;
}

.hk-legenda {
  flex: 1 1 260px;
  max-width: 78ch;
  line-height: 1.45;
}

.hk-actions-btns {
  gap: 7px;
  background: #f7f9fb;
  border: 1px solid #e6ebf1;
  border-radius: 10px;
  padding: 6px;
}

.hk-actions-btns > .ghost-button.compact {
  border-color: transparent;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(20, 24, 28, 0.06);
}

.hk-actions-btns > .ghost-button.compact:hover {
  border-color: #d7dbe1;
}

.hk-actions-sep {
  width: 1px;
  align-self: stretch;
  margin: 2px 1px;
  background: #e2e8f0;
  flex: none;
}

.hk-actions-btns > .ghost-button.hk-pend-btn {
  background: var(--marca);
  border-color: var(--marca);
  color: #ffffff;
}

.hk-actions-btns > .ghost-button.hk-pend-btn .hk-badge {
  background: #ffffff;
  color: var(--marca-escura);
}

.hk-badge-carregando {
  opacity: 0.6;
}

@media (min-width: 900px) {
  /* mesma receita do Planejamento: a tela ocupa a altura livre e NAO rola —
     topo (acessos + filtros + cartoes) fixo, graficos rolando embaixo. */
  .electric-warehouse-view:has(.hk-panel-comparacao) .electric-warehouse-workspace,
  .electric-warehouse-view:has(.hk-panel-comparacao) .hk-shell {
    min-height: 0;
  }

  .hk-panel-comparacao {
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: calc(100vh - var(--hk-painel-desconto, 116px));
  }

  .hk-panel-comparacao .hk-topo {
    flex: none;
    display: grid;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eef1f4;
  }

  /* v0143 (pedido do Carlos): FIXO fica so a barra de acessos + filtros; os
     cartoes, avisos e graficos ("tela das informacoes") rolam juntos. */
  .hk-panel-comparacao .hk-corpo {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    gap: 10px;
    align-content: start;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    padding-top: 10px;
    margin-right: -4px;
    padding-right: 4px;
  }

}

/* ---- v0138 · aviso de atualização (opção A) + Início sem rolagem ---------
   Pedido do Carlos: "melhorar esse visual, deixar conforme novo padrão" e
   "não ter barra de rolagem na tela home". Só no computador — no celular o
   aviso continua como cartão (lá a tela rola mesmo). */
@media (min-width: 900px) {
  /* AVISO: faixa vermelha fina, uma linha de texto, botão branco à direita. */
  .app-update-notice {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border: 0;
    border-radius: 10px;
    background: var(--marca);
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(240, 132, 48, 0.22);
    flex: none;
  }

  /* a faixa ocupa a largura toda (a regra antiga centralizava em 840px) */
  body.app-update-locked .app-update-notice {
    width: auto;
    justify-self: stretch;
  }

  .app-update-notice .module-icon {
    width: 30px;
    height: 30px;
    min-width: 0;
    min-height: 0;
    padding: 0;
    flex: none;
    border-radius: 8px;
    border: 0;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    box-shadow: none;
  }

  .app-update-notice .module-icon svg {
    width: 16px;
    height: 16px;
  }

  /* "Atualização obrigatória" vira o título da faixa; o título antigo
     ("Nova versão do app disponível") sai — o caminho já é curto e claro. */
  .app-update-notice .eyebrow {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
    color: #ffffff;
  }

  .app-update-notice h3 {
    display: none;
  }

  .app-update-notice p:not(.eyebrow) {
    margin: 1px 0 0;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.88);
  }

  .app-update-notice .primary-button {
    margin-left: auto;
    flex: none;
    background: #ffffff;
    border-color: #ffffff;
    color: var(--marca-escura);
    box-shadow: none;
    padding: 8px 14px;
    min-height: 0;
  }

  .app-update-notice .primary-button:hover {
    background: var(--marca-suave-2);
    border-color: var(--marca-suave-2);
    color: var(--marca-escura);
  }

  /* INÍCIO SEM ROLAGEM: a tela ocupa a altura livre e a foto recebe a sobra
     (com ou sem a faixa de aviso em cima). Antes o herói tinha altura fixa
     por calc() e estourava a janela em ~24px — e mais ainda com o aviso. */
  body[data-view="home"] .home-view {
    height: calc(100vh - 58px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 12px;
  }

  .home-hero {
    flex: 1 1 auto;
    min-height: 0;
  }

  /* a moldura acompanha a altura que sobrou, sem cortar a foto */
  .home-hero-foto {
    height: 100%;
    max-height: 100%;
  }
}

/* ---- v0139 · PADRÃO GLOBAL (opção A do Carlos) ---------------------------
   Regras que valem para o app inteiro: texto nítido, nunca quebrado no meio
   da palavra, nunca vazando das caixas; botões, cartões e bordas iguais. */

/* Texto nítido e uniforme */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Palavra NUNCA quebra no meio nem é hifenizada; quando não couber, o
   contêiner deve dar conta (ellipsis ou quebra entre palavras). */
* {
  hyphens: none;
}

/* Números sempre tabulares (colunas alinhadas em tabelas e cards) */
.stock-balance-slot b,
.card b,
.hk-badge,
td[data-num],
.planning-grid td {
  font-variant-numeric: tabular-nums;
}

@media (min-width: 900px) {
  /* Botões do app: mesma altura, mesmo raio, mesmo peso — em todo lugar. */
  .primary-button,
  .ghost-button,
  .icon-button {
    border-radius: 9px;
    font-weight: 600;
  }

  .primary-button {
    letter-spacing: 0.01em;
  }

  /* Rótulos de campo (os "eyebrows" maiúsculos) padronizados */
  .tela-filtros label > span,
  .stock-filter-bar label > span,
  .hk-filter-bar label > span {
    font-weight: 600;
    letter-spacing: 0.05em;
  }

  /* Poppins é um pouco mais larga que a Segoe: os rótulos maiúsculos pequenos
     ganham reticências em vez de vazar. */
  .stock-balance-slot span,
  .inventory-card span,
  .app-side-titulo {
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (min-width: 900px) {
  /* DDS e TMS entram na regra geral: o caminho do cabeçalho já diz onde o
     usuário está — o bloco de título sai e ficam só as ações, à direita. */
  .dds-header > div:first-child:not(.dds-header-actions),
  .tms-header > div:first-child:not(.tms-header-actions) {
    display: none;
  }

  .dds-header,
  .tms-header {
    justify-content: flex-end;
    min-height: 0;
  }

  /* sem o título, as ações não podem esticar pela linha inteira */
  .dds-header-actions {
    min-width: 0;
    grid-template-columns: repeat(2, auto) 190px;
    margin-left: auto;
  }

  .tms-header-actions {
    width: auto;
    grid-template-columns: 170px 240px;
    margin-left: auto;
  }
}

/* ---- v0141 · MARCA VCR (opção C — grafite discreto) -----------------------
   O app é da VCR Engenharia e Soluções (serviços e análise de dados para a
   ELCOP). Logo VCR no topo e na tela de entrada; ELCOP referenciada no pé do
   menu lateral com a logo original. Cores da marca: teal #0B7B80 · laranja
   #F08430 · grafite #3A3A3C — nos botões, menu, foco e sombras, de forma
   discreta. Os VERMELHOS SEMÂNTICOS (erros, avisos, Pendência RMA, gráficos)
   continuam vermelhos. */
:root {
  --vcr-teal: #0b7b80;
  --vcr-teal-escuro: #075e62;
  --vcr-teal-suave: #e3f1f1;
  --vcr-laranja: #f08430;
  --vcr-laranja-escuro: #c2620f;
  --vcr-grafite: #3a3a3c;
  --vcr-grafite-escuro: #262628;
  /* sombra padrão com um sopro de teal (alusão discreta) */
  --shadow: 0 16px 36px rgba(13, 78, 82, 0.10);
}

/* logo VCR no topo (a lockup horizontal é mais larga que a da ELCOP) */
.brand img {
  max-height: 44px;
}

/* Botões de MARCA: grafite (ação principal) e neutro com hover teal */
.primary-button {
  background: var(--vcr-grafite);
}

.primary-button:hover {
  background: var(--vcr-grafite-escuro);
}

.ghost-button {
  color: var(--vcr-grafite);
  border-color: #d5dae0;
}

.ghost-button:hover {
  background: #f2f7f7;
  border-color: var(--vcr-teal);
}

/* Menu lateral: item ativo grafite com filete teal (módulo) / laranja (sub) */
.app-side-item.on,
.app-side-item.aberto {
  background: #ececee;
  color: var(--vcr-grafite);
  box-shadow: inset 3px 0 0 var(--vcr-teal);
}

.app-side-item.aberto i[data-lucide],
.app-side-item.aberto svg,
.app-side-item.aberto .app-side-seta,
.app-side-item.on i[data-lucide],
.app-side-item.on svg {
  color: var(--vcr-teal-escuro);
}

.app-side-sub.on {
  background: #ececee !important;
  color: var(--vcr-grafite) !important;
  box-shadow: inset 3px 0 0 var(--vcr-laranja);
}

.app-side-sub.on .app-side-ponto {
  background: var(--vcr-laranja) !important;
}

/* Foco (campos e busca, padrão v0128): borda e anel em teal */
@media (min-width: 900px) {
  .tela-filtros input:focus,
  .tela-filtros select:focus,
  .hk-filter-bar input:focus,
  .hk-filter-bar select:focus,
  .hk-tabela-busca input:focus,
  .toolbar .search-box:focus-within,
  .warehouse-mobile-filters input:focus,
  .warehouse-mobile-filters select:focus {
    border-color: var(--vcr-teal) !important;
    box-shadow: 0 0 0 3px rgba(11, 123, 128, 0.12) !important;
  }

  .app-side-item:focus-visible,
  .app-side-sub:focus-visible,
  .app-side-toggle:focus-visible {
    outline: 2px solid var(--vcr-teal);
  }
}

/* Crachás de contagem (Pendências, Caixa de pendências): laranja VCR */
.hk-badge {
  background: var(--vcr-laranja);
}

.hk-actions-btns > .ghost-button.hk-pend-btn {
  background: var(--vcr-laranja);
  border-color: var(--vcr-laranja);
  color: #ffffff;
}

.hk-actions-btns > .ghost-button.hk-pend-btn .hk-badge {
  background: #ffffff;
  color: var(--vcr-laranja-escuro);
}

/* Rodapé ELCOP no menu lateral */
.app-side-sobra {
  flex: 1 1 auto;
  min-height: 10px;
}

.app-side-elcop {
  border-top: 1px solid #eef1f4;
  padding: 10px 8px 4px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.app-side-elcop img {
  height: 22px;
  width: auto;
  flex: none;
}

.app-side-elcop small {
  font-size: 9.5px;
  line-height: 1.35;
  color: #8a93a0;
}

/* menu recolhido (64px): só a logo ELCOP, sem o texto */
body.app-side-recolhida .app-side-elcop {
  justify-content: center;
  padding-inline: 0;
}

body.app-side-recolhida .app-side-elcop small {
  display: none;
}

body.app-side-recolhida .app-side-elcop img {
  height: 16px;
}

/* no celular a barra lateral não existe: a referência ELCOP fica no fim da
   tela Início (o shell desktop esconde) */
.home-parceria {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 18px 0 4px;
  color: #8a93a0;
  font-size: 11px;
}

.home-parceria img {
  height: 18px;
}

@media (min-width: 900px) {
  .home-parceria {
    display: none;
  }
}

/* v0141: seleções de "aba/modo" são marca (não semântica) → grafite VCR */
.stock-mode-button.active {
  background: var(--vcr-grafite);
  border-color: var(--vcr-grafite);
}

/* topo: a lockup da VCR é horizontal — precisa de mais largura que a da ELCOP */
@media (min-width: 900px) {
  .brand {
    width: auto;
    min-width: 0;
  }

  .brand img {
    max-height: 42px;
    width: auto;
  }
}

/* ---- v0142 · Programação de obras: tempo real, sem linha e sem Pesquisar --
   Escolha do Carlos: a tela carrega sozinha ao abrir e reage aos filtros na
   hora — o botão Pesquisar saiu; Limpar e Tela cheia moram na própria linha
   de filtros. A linha roxa acima do filtro (accent antigo do módulo) saiu. */
.works-planning-panel {
  border-top: 0;
}

@media (min-width: 900px) {
  /* cabeçalho da tela ficou vazio (título saiu na v0137, botões desceram) */
  .planning-panel > .inventory-section-head:first-child {
    display: none;
  }

  .works-planning-view:is(.planning-tool-planning) .planning-filter-bar.tela-filtros {
    display: grid;
    grid-template-columns: minmax(150px, 0.8fr) minmax(160px, 1fr) minmax(160px, 1fr) minmax(126px, 0.62fr) minmax(126px, 0.62fr) auto;
    gap: 10px;
    align-items: end;
    border-top: 0;
    padding-top: 2px;
  }

  .planning-filter-acoes {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-self: end;
  }

  .planning-filter-acoes .ghost-button {
    min-height: 40px;
  }
}

/* ---- v0145 · Programação de obras: tema VCR + novidades ------------------
   Grade e popups do Planejamento na temática VCR (grafite + filete teal,
   discreto); ficha da obra; horário do desligamento; improdutividade;
   feedback por serviço. As cores SEMÂNTICAS das células (verde programada,
   borda roxa desligamento, azul LV, fim de semana) não mudam. */

/* Grade: cabeçalho, faixa da base e totais em grafite VCR */
.planning-grid thead th,
.planning-grid thead th.planning-team-head {
  background: var(--vcr-grafite);
  border-bottom: 2px solid var(--vcr-teal);
  border-right: 1px solid #55555a;
}

.planning-grid thead tr:nth-child(2) th {
  background: #2f2f31;
  border-bottom: 2px solid var(--vcr-teal);
}

.planning-grid thead th.weekend {
  background: #232324;
}

.planning-grid .planning-base-cell {
  background: var(--vcr-teal-suave);
  color: var(--vcr-teal-escuro);
}

/* v0395 (Carlos: "mudar fonte verde para branca"): a faixa da base ficou grafite (padrão v0364 dos cabeçalhos),
   e o "N equipes" seguia teal-escuro — ilegível; agora branco como o rótulo. */
.planning-grid .planning-base-label b,
.planning-grid .planning-base-label small {
  color: #ffffff;
  opacity: 0.88;
}

.planning-grid-scroll .planning-grid tfoot th,
.planning-grid-scroll .planning-grid tfoot td,
.planning-grid tfoot .planning-total-cell {
  background: var(--vcr-grafite);
  border-top: 2px solid var(--vcr-teal);
}

/* Popups do Planejamento (programação, medição, feedback): cabeçalho grafite */
.planning-dialog-head {
  background: var(--vcr-grafite);
  border-bottom: 3px solid var(--vcr-teal);
}

/* Ficha da obra no popup */
.planning-obra-ficha {
  border: 1px solid #dcebe9;
  border-left: 4px solid var(--vcr-teal);
  background: #f6fbfa;
  border-radius: 10px;
}

.planning-obra-ficha > span > b {
  color: var(--vcr-teal-escuro);
}

.planning-ficha-pills em {
  display: inline-block;
  font-style: normal;
  font-size: 9.5px;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 9px;
  margin: 2px 5px 0 0;
}

.planning-ficha-pills .pill-programa {
  background: var(--vcr-teal-suave);
  color: var(--vcr-teal-escuro);
}

.planning-ficha-pills .pill-prazo {
  background: #fdeedd;
  color: var(--marca-escura);
}

.planning-ficha-nums {
  border-top: 1px dashed #cfe3e0;
  padding-top: 6px;
  margin-top: 4px;
  color: #68707a;
}

.planning-ficha-nums b {
  color: var(--ink);
}

/* Tipo do lançamento: Serviço em obra × Improdutividade */
.planning-tipo-switch {
  display: flex;
  gap: 8px;
}

.planning-tipo {
  flex: 1;
  border: 1px solid #e0e5ea;
  background: #ffffff;
  border-radius: 10px;
  padding: 9px 11px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: #39424e;
  cursor: pointer;
}

.planning-tipo.active {
  border-color: var(--vcr-teal);
  background: var(--vcr-teal-suave);
  color: var(--vcr-teal-escuro);
}

.planning-tipo.improd.active {
  border-color: var(--vcr-laranja);
  background: #fdeedd;
  color: var(--marca-escura);
}

/* Card de improdutividade na grade */
td.planning-cell-improd {
  background: #fffaf4 !important;
  box-shadow: inset 4px 0 0 var(--vcr-laranja);
}

td.planning-cell-improd .planning-cell-obra {
  color: var(--marca-escura);
}

/* Horário do desligamento sob o chip Desl. */
.planning-flag-hora {
  display: block;
  font-size: 8.5px;
  font-weight: 700;
  color: #7c3aed;
  text-align: center;
  letter-spacing: 0.02em;
  margin-top: 1px;
}

.planning-cell-flags {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

/* Feedback por serviço */
.planning-feedback-legenda {
  margin: 0;
  font-size: 10.5px;
  color: #68707a;
  line-height: 1.5;
}

.planning-feedback-servico {
  border: 1px solid #e6ebf1;
  border-radius: 10px;
  padding: 10px 12px;
  display: grid;
  gap: 8px;
}

.planning-feedback-servico.improd {
  background: #fffaf4;
  border-color: #f4dcc2;
}

.planning-feedback-servico-tit {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
}

.planning-feedback-servico-tit small {
  font-weight: 500;
  color: #8a93a0;
}

.planning-feedback-ops {
  display: flex;
  gap: 7px;
}

.planning-feedback-option.compacta {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid #e0e5ea;
  background: #ffffff;
  border-radius: 9px;
  padding: 8px 9px;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  color: #39424e;
  cursor: pointer;
}

.planning-feedback-option.compacta svg {
  width: 14px;
  height: 14px;
}

.planning-feedback-option.compacta.st-executado.selected {
  border-color: #13795b;
  background: #e8f5ef;
  color: #13795b;
}

.planning-feedback-option.compacta.st-cancelado.selected {
  border-color: #a56500;
  background: #fff4df;
  color: #a56500;
}

.planning-feedback-option.compacta.st-substituido.selected {
  border-color: #7c3aed;
  background: #f1eafe;
  color: #7c3aed;
}

/* v0145 — o popup da programação tem 4 linhas (cabeçalho, abas de serviço,
   corpo, rodapé): sem esta regra as ABAS ficavam na linha 1fr e colapsavam
   quando o corpo crescia (a ficha/switch fazia o chip "Serviço 1" pintar por
   cima do corpo). Os demais popups (3 linhas) seguem a regra antiga. */
.planning-dialog:has(.planning-service-tabs) {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.planning-dialog:has(.planning-service-tabs) .planning-dialog-body {
  overflow-y: auto;
}

/* v0145b — MEDIÇÃO na temática VCR: as tabelas do popup de medição ainda
   estavam com o cabeçalho vinho antigo. Grafite + filete teal, igual à grade
   e ao topo dos popups; captions e botão de modo ativo em teal. */
.planning-medicao-table thead th {
  background: var(--vcr-grafite);
  border-right: 1px solid #55555a;
  border-bottom: 2px solid var(--vcr-teal);
}

.planning-medicao-caption {
  color: var(--vcr-teal-escuro);
}

.planning-medicao-mode.active {
  border-color: var(--vcr-teal);
  background: var(--vcr-teal-suave);
  color: var(--vcr-teal-escuro);
}

.planning-medicao-table tfoot td {
  background: #efefef;
  border-top: 2px solid var(--vcr-grafite);
}

/* ---- v0147 · Início: aro degradê VCR na foto + faixa inferior VCR --------
   Escolha do Carlos (opção A): a moldura branca fica mais fina e ganha um
   ARO em degradê teal→laranja com brilho suave; a faixa no fim da tela vira
   degradê VCR (teal → grafite → laranja) com um reflexo sutil subindo.
   O aro é um wrapper novo no index (.home-hero-aro) — só na Início; as capas
   dos hubs seguem sem foto. No celular nada muda (hero escondido). */
.home-hero-aro {
  display: none;
}

@media (min-width: 900px) {
  .home-hero-aro {
    position: relative;
    z-index: 2;
    flex: none;
    display: flex;
    padding: 4px;
    border-radius: 18px;
    background: linear-gradient(
      150deg,
      var(--vcr-teal) 0%,
      rgba(255, 255, 255, 0.92) 45%,
      rgba(255, 255, 255, 0.92) 55%,
      var(--vcr-laranja) 100%
    );
    box-shadow: 0 24px 55px rgba(0, 0, 0, 0.55), 0 0 42px rgba(11, 123, 128, 0.32);
    height: min(calc(100vh - 190px), 628px);
  }

  .home-hero-aro .home-hero-foto {
    height: 100%;
    max-height: 100%;
    border: 3px solid #fff;
    border-radius: 14px;
    box-shadow: none;
  }

  /* faixa inferior do hero: degradê VCR + reflexo suave (vale também nas
     capas dos hubs — mesma identidade). */
  .home-hero::after {
    height: 70px;
    background:
      linear-gradient(
          90deg,
          var(--vcr-teal) 0%,
          var(--vcr-teal-escuro) 30%,
          var(--vcr-grafite) 52%,
          var(--vcr-laranja-escuro) 74%,
          var(--vcr-laranja) 100%
        )
        left bottom / 100% 5px no-repeat,
      linear-gradient(180deg, rgba(11, 123, 128, 0) 0%, rgba(11, 123, 128, 0.1) 55%, rgba(58, 58, 60, 0.28) 100%);
    pointer-events: none;
  }

  /* Início sem rolagem (v0138): o ARO — novo pai da foto — recebe a sobra */
  body[data-view="home"] .home-hero-aro {
    height: 100%;
    max-height: 100%;
  }
}

/* ---- v0148 · Popup de lançamento: 4 tipos, 4 serviços, cabeçalho chips ----
   Escolhas do Carlos: A (tipos em grade 2x2 com legenda), H1 (cabeçalho
   grafite com chips) e E1 (selo de emergência laranja VCR com raio). */

/* Tamanho FIXO: trocar o tipo de lançamento NUNCA muda o tamanho do popup.
   Só o popup da programação tem o seletor de tipos. */
.planning-dialog:has(.planning-tipo-switch) {
  height: min(780px, calc(100vh - 40px));
}

/* Cabeçalho H1 — grafite refinado com ícone e chips de equipe/dia */
.planning-head-chips {
  gap: 12px;
  background: linear-gradient(180deg, #3f3f42 0%, #333336 100%);
}

.planning-head-ic {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(11, 123, 128, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b5e2e4;
}

.planning-head-ic svg {
  width: 17px;
  height: 17px;
}

.planning-head-tx {
  flex: 1;
  min-width: 0;
}

.planning-head-chips small {
  display: block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9fdadd;
  margin-bottom: 4px;
}

.planning-head-linha {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.planning-head-chip {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 3px 9px;
  white-space: nowrap;
}

.planning-head-chip.dia {
  font-weight: 600;
  font-size: 11px;
  color: #e8e8ea;
}

/* Tipos de lançamento — grade 2x2 com ícone e legenda (opção A) */
.planning-tipo-quatro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.planning-tipo-card {
  display: flex;
  gap: 9px;
  align-items: center;
  text-align: left;
  padding: 8px 11px;
}

.planning-tipo-ic {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #f1f4f8;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #68707a;
}

.planning-tipo-ic svg {
  width: 15px;
  height: 15px;
}

.planning-tipo-tx {
  min-width: 0;
}

.planning-tipo-tx b {
  display: block;
  font-size: 11.5px;
  line-height: 1.25;
}

.planning-tipo-tx small {
  display: block;
  font-size: 9px;
  font-weight: 500;
  color: #8a93a0;
  line-height: 1.25;
}

.planning-tipo-card.active .planning-tipo-ic {
  background: var(--vcr-teal);
  color: #ffffff;
}

/* Emergencial ativo: laranja VCR (o selo da grade tem a mesma cor) */
.planning-tipo-card.emerg.active {
  border-color: var(--vcr-laranja-escuro);
  background: #fdeedd;
  color: var(--vcr-laranja-escuro);
}

.planning-tipo-card.emerg.active .planning-tipo-ic {
  background: var(--vcr-laranja);
}

.planning-tipo-card.emerg.active .planning-tipo-tx small {
  color: #b0723a;
}

/* Dica de padrão sob os campos de OS / NR / AC */
.planning-field-hint {
  font-size: 9.5px;
  color: #8a93a0;
  margin-top: 3px;
}

.planning-field-hint b {
  color: var(--vcr-teal-escuro);
}

/* Aviso do lançamento emergencial */
.planning-emerg-aviso {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 0;
  border: 1px solid #f6c89b;
  border-left: 4px solid var(--vcr-laranja);
  background: #fdeedd;
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 10.5px;
  color: #8a5510;
}

.planning-emerg-aviso b {
  color: var(--vcr-laranja-escuro);
}

.planning-emerg-aviso svg {
  flex: none;
  width: 14px;
  height: 14px;
  color: var(--vcr-laranja);
  margin-top: 1px;
}

/* Horário do desligamento em LISTA (07:00–17:00 de 30 em 30) */
.planning-dialog-field select[data-planning-dialog-hora] {
  border: 1px solid #d8dee7;
  border-radius: 9px;
  padding: 9px 11px;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  background: #ffffff;
  width: 100%;
}

/* Selo E1 na grade — laranja VCR com raio + contorno fino na célula */
.planning-selo-emerg {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  border-radius: 6px;
  padding: 2px 7px;
  background: #fdeedd;
  border: 1px solid #f0a468;
  color: var(--vcr-laranja-escuro);
  margin-bottom: 3px;
  width: fit-content;
}

.planning-selo-emerg svg {
  width: 10px;
  height: 10px;
}

/* o --cell-soft-shadow padrao e mais especifico em .planning-cell.filled —
   o contorno laranja soma os dois e usa !important para nao ser engolido */
td.planning-cell.planning-cell-emerg,
td.planning-cell.planning-cell-emerg.filled {
  box-shadow: inset 0 0 0 2px var(--vcr-laranja), var(--cell-soft-shadow) !important;
}

/* ---- v0149 · card da grade completa da C-6-1-1 (opção A) -----------------
   O gravado vence; campo vazio vem da consulta na hora de desenhar. Quando a
   obra NÃO está na consulta do estado da equipe, aviso âmbar discreto. */
.planning-cell-line.aviso-consulta {
  color: #b45309;
  font-weight: 600;
  font-size: 9px;
}

/* ---- v0155 · Acabamento global (pedido do Carlos, 23/08) -----------------
   1) Tela encostada nos cantos (gutter zero, respiro interno de 12px);
   2) Banners dos hubs PADRONIZADOS (mesma dimensão/posição, foto nítida);
   3) Barras de rolagem iguais no app inteiro;
   4) Transições firmes e discretas, padrão de site profissional. */

@media (min-width: 900px) {
  /* 1 · ENCOSTAR NOS CANTOS ------------------------------------------------ */
  :root {
    --module-shell-gutter: 0px;
    --module-shell-pad: 12px;
  }

  .app-view {
    padding-top: 12px;
    padding-bottom: 14px;
  }

  .workspace {
    padding-top: 12px;
    padding-bottom: 16px;
  }

  /* 2 · BANNERS DOS HUBS — um padrão só ------------------------------------ */
  /* Todos os hubs com mais de uma ferramenta (SESMT, Planejamento, EPI/EPC,
     Materiais elétricos, Consultas) + o hub Gestão de Obras: 300px de altura,
     foto REAL nítida (sem desfoque) com véu de leitura da esquerda para a
     direita, texto centralizado na vertical e o filete VCR embaixo. */
  .home-hero.module-hero {
    min-height: 0;
    height: 300px;
    align-items: center;
    justify-content: flex-start;
    padding: 0 48px;
    margin: 0;
  }

  .module-hero::before {
    background:
      linear-gradient(90deg, rgba(15, 19, 25, 0.88) 0%, rgba(15, 19, 25, 0.52) 46%, rgba(15, 19, 25, 0.16) 100%),
      url("assets/img/inicio-obra-v2.jpg?v=20261002-0356") center 38% / cover no-repeat;
    filter: none;
    transform: none;
  }

  .module-hero .home-hero-overlay {
    max-width: 640px;
  }

  .module-hero .home-hero-eyebrow {
    font-size: 0.74rem;
    margin-bottom: 8px;
  }

  .module-hero .home-hero-overlay h2 {
    font-size: 2rem;
    margin: 0 0 6px;
  }

  .module-hero .home-hero-frase {
    font-size: 0.95rem;
  }

  /* Hub Gestão de Obras Elétricas: banner na MESMA dimensão e tratamento */
  .works-hero {
    height: 300px;
    margin-bottom: 12px;
    background:
      linear-gradient(90deg, rgba(15, 19, 25, 0.82) 0%, rgba(15, 19, 25, 0.45) 46%, rgba(15, 19, 25, 0.12) 100%),
      url("assets/img/obras-banner-v2.jpg?v=20261002-0356") center 45% / cover no-repeat;
  }

  /* 3 · BARRAS DE ROLAGEM PADRONIZADAS — v0368: passou para o bloco único no FIM do arquivo */

  /* 4 · TRANSIÇÕES — firmes, rápidas e discretas --------------------------- */
  /* Troca de tela: entrada decidida (170ms, easing firme). O último quadro
     termina em transform:none — regra antiga do sticky preservada. */
  .app-view:not([hidden]) {
    animation: app-view-enter 170ms cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  /* Micro-transições nos controles (um timing só para o app inteiro) */
  .primary-button,
  .ghost-button,
  .app-side-item,
  .app-side-sub,
  .app-side-toggle,
  .planning-tipo,
  .planning-service-tab,
  .planning-medicao-mode,
  .planning-feedback-option,
  .stock-menu-button,
  .planning-cell-pager-btn,
  .tela-filtros input,
  .tela-filtros select,
  .works-module-card,
  .home-module-card {
    transition: background-color 0.13s ease, color 0.13s ease, border-color 0.13s ease,
      box-shadow 0.16s ease, transform 0.16s ease;
  }

  .works-module-card:hover,
  .home-module-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.12);
  }

  .primary-button:active,
  .ghost-button:active,
  .planning-tipo:active {
    transform: translateY(1px);
  }
}

/* entrada da tela: mais presente que a antiga (0.94/4px), sem ficar lenta */
@keyframes app-view-enter {
  from {
    opacity: 0.55;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* acessibilidade: quem pede menos movimento não recebe animação nenhuma */
@media (prefers-reduced-motion: reduce) {
  .app-view:not([hidden]),
  .home-hero,
  .planning-dialog {
    animation: none !important;
  }

  * {
    transition-duration: 0.01ms !important;
  }
}

/* ---- v0156 · Serviços de Materiais — Cadastro de Módulos (MS x MT) ------- */
.works-materials-view {
  width: min(var(--module-shell-max), calc(100% - (var(--module-shell-gutter) * 2)));
  margin: 0 auto 0 var(--module-shell-gutter);
  /* v0170: sem o cabecalho interno a tela comeca mais para cima */
  padding: 2px var(--module-shell-pad) 14px;
}

/* v0170: faixa minima so das janelas estreitas (fallback do seletor MS/MT) */
.wm-head-min {
  display: flex;
  justify-content: flex-end;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
}

.wm-card {
  padding: 0;
  overflow: hidden;
}

.wm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.wm-estados {
  display: flex;
  gap: 6px;
}

.wm-estado {
  border: 1px solid #d8dee7;
  background: #fff;
  border-radius: 9px;
  padding: 8px 16px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  color: #68707a;
  cursor: pointer;
}

.wm-estado.on {
  border-color: var(--vcr-teal);
  background: var(--vcr-teal-suave);
  color: var(--vcr-teal-escuro);
}

.wm-modulos {
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: #fafbfc;
}

.wm-modulos-tit {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.wm-modulos-tit b {
  font-size: 12.5px;
}

.wm-modulos-tit small {
  color: #8a93a0;
  font-size: 10.5px;
  flex: 1;
}

.wm-modulos-lista {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.wm-modulo-card {
  flex: none;
  width: 250px;
  border: 1px solid #e0e5ea;
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
}

.wm-modulo-card b {
  display: block;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wm-modulo-card small {
  display: block;
  font-size: 10px;
  color: #5a6472;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wm-modulo-card small.muted {
  color: #9aa2ae;
}

.wm-modulo-acoes {
  display: flex;
  gap: 6px;
  margin-top: 7px;
}

.wm-modulo-acoes .ghost-button.compact {
  font-size: 10px;
  padding: 4px 8px;
}

.wm-excluir {
  color: #a12027;
}

.wm-corpo {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 380px;
}

.wm-lado {
  border-right: 1px solid var(--line);
  background: #fafbfc;
  padding: 12px;
  overflow-y: auto;
  max-height: 560px;
}

.wm-lado h4 {
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8a93a0;
  margin: 0 0 8px;
}

.wm-grupo {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 1px solid #e0e5ea;
  background: #fff;
  border-radius: 9px;
  padding: 7px 10px;
  margin-bottom: 5px;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  color: #39424e;
  cursor: pointer;
  text-align: left;
}

.wm-grupo i {
  width: 14px;
  height: 14px;
  border: 2px solid #c6cdd6;
  border-radius: 4px;
  flex: none;
}

.wm-grupo em {
  font-style: normal;
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  color: #8a93a0;
}

.wm-grupo.on {
  border-color: var(--vcr-teal);
  background: var(--vcr-teal-suave);
  color: var(--vcr-teal-escuro);
}

.wm-grupo.on i {
  background: var(--vcr-teal);
  border-color: var(--vcr-teal);
}

.wm-grupo.warn {
  border-style: dashed;
  color: #b45309;
}

.wm-main {
  padding: 12px 14px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.wm-filtros {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.wm-busca {
  flex: 1;
  background: #f1f4f8;
  border: 0;
  border-radius: 9px;
  padding: 10px 12px;
  font: inherit;
  font-size: 12.5px;
}

.wm-chip {
  border: 1px solid #d8dee7;
  background: #fff;
  border-radius: 999px;
  padding: 7px 14px;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  color: #68707a;
  cursor: pointer;
}

.wm-chip.on {
  border-color: var(--vcr-teal);
  background: var(--vcr-teal-suave);
  color: var(--vcr-teal-escuro);
}

.wm-tabela-wrap {
  overflow: auto;
  max-height: 470px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.wm-tabela thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--vcr-grafite);
  color: #fff;
  font-size: 10px;
  border-bottom: 2px solid var(--vcr-teal);
  padding: 8px 9px;
}

.wm-tabela td {
  font-size: 11.5px;
  padding: 6px 9px;
  border-bottom: 1px solid #edf0f4;
}

.wm-desc {
  max-width: 480px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wm-grupo-cel {
  font-size: 10px;
  color: #5a6472;
  white-space: nowrap;
}

.wm-tag {
  display: inline-block;
  font-size: 8.5px;
  font-weight: 800;
  border-radius: 5px;
  padding: 1px 6px;
  background: #eef2f7;
  color: #5a6472;
  margin-right: 6px;
}

.wm-tag.lv {
  background: #fdeedd;
  color: var(--vcr-laranja-escuro);
}

.wm-marc {
  width: 16px;
  height: 16px;
  border: 2px solid #c6cdd6;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  padding: 0;
}

.wm-marc.on {
  background: var(--vcr-teal);
  border-color: var(--vcr-teal);
}

.wm-qtd {
  width: 64px;
  border: 1px solid #d8dee7;
  border-radius: 7px;
  padding: 5px 7px;
  text-align: center;
  font: inherit;
  font-size: 12px;
}

.wm-mat-btn {
  border: 1px solid #d8dee7;
  background: #fff;
  border-radius: 7px;
  padding: 4px 9px;
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  color: #68707a;
  cursor: pointer;
  white-space: nowrap;
}

.wm-mat-btn.tem {
  border-color: var(--vcr-teal);
  color: var(--vcr-teal-escuro);
  background: var(--vcr-teal-suave);
}

.wm-rodape {
  display: flex;
  align-items: center;
  gap: 14px;
  border-top: 2px solid var(--vcr-teal);
  background: #f6fbfa;
  padding: 11px 16px;
}

.wm-rodape b {
  color: var(--vcr-teal-escuro);
}

.wm-total {
  text-align: right;
}

.wm-total small {
  display: block;
  font-size: 9px;
  color: #68707a;
  letter-spacing: 0.06em;
}

.wm-total b {
  font-size: 14px;
}

.wm-nome {
  flex: 1;
  min-width: 200px;
  border: 1px solid #d8dee7;
  border-radius: 9px;
  padding: 9px 12px;
  font: inherit;
  font-size: 12.5px;
}

.wm-mat-dialog {
  width: min(720px, 100%);
}

.wm-mat-resultados {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 6px;
  margin-bottom: 10px;
}

.wm-mat-opcao {
  display: flex;
  gap: 8px;
  align-items: center;
  border: 0;
  background: #fff;
  border-radius: 7px;
  padding: 6px 8px;
  font: inherit;
  font-size: 11.5px;
  text-align: left;
  cursor: pointer;
}

.wm-mat-opcao:hover {
  background: var(--vcr-teal-suave);
}

.wm-mat-opcao b {
  flex: none;
}

.wm-mat-opcao span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wm-mat-opcao em {
  font-style: normal;
  color: #8a93a0;
  font-size: 10px;
}

.wm-saida-servico {
  border: 1px solid #e0e5ea;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
}

.wm-saida-servico b {
  font-size: 12px;
}

.wm-saida-servico ul,
.wm-saida-consolidado ul {
  margin: 6px 0 0;
  padding-left: 18px;
  font-size: 11.5px;
}

.wm-saida-consolidado {
  border: 1px solid #dcebe9;
  border-left: 4px solid var(--vcr-teal);
  background: #f6fbfa;
  border-radius: 10px;
  padding: 10px 12px;
}

.wm-saida-consolidado b {
  color: var(--vcr-teal-escuro);
  font-size: 11px;
  letter-spacing: 0.05em;
}

/* ---- v0157 · Estruturas da NDU — cadastro direto no app ------------------ */

.wm-abas {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--line);
  margin: 0 0 12px;
}

.wm-aba {
  border: none;
  background: none;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  color: #8a93a0;
  padding: 9px 16px;
  border-bottom: 3px solid transparent;
  cursor: pointer;
}

.wm-aba.on {
  color: var(--vcr-teal-escuro);
  border-bottom-color: var(--vcr-teal);
  background: #f6fbfa;
}

.wm-est-topo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.wm-est-busca {
  flex: 1;
  min-width: 180px;
}

.wm-est-familia {
  font-size: 9.5px;
  letter-spacing: 0.08em;
  color: #8a93a0;
  text-transform: uppercase;
  font-weight: 700;
  margin: 12px 0 6px;
}

.wm-est-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 9px;
}

.wm-est-card {
  border: 1px solid #e0e5ea;
  border-radius: 10px;
  padding: 10px 11px;
  background: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: border-color 130ms ease, box-shadow 130ms ease;
}

.wm-est-card:hover {
  border-color: var(--vcr-teal);
  box-shadow: 0 6px 16px rgba(11, 123, 128, 0.14);
}

.wm-est-card b {
  font-size: 13px;
  color: var(--vcr-teal-escuro);
}

.wm-est-card small {
  font-size: 10.5px;
  color: #4d5560;
  line-height: 1.35;
}

.wm-est-st {
  font-size: 9px;
  font-weight: 800;
  margin-top: 4px;
}

.wm-est-st.ok {
  color: var(--vcr-teal);
}

.wm-est-st.pend {
  color: #b45309;
}

.wm-ndu-editor-cab {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.wm-ndu-editor-cab label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 10px;
  font-weight: 700;
  color: #68707a;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.wm-ndu-editor-cab label.crescer {
  flex: 1;
  min-width: 160px;
}

.wm-ndu-editor-cab input,
.wm-ndu-editor-cab select {
  border: 1px solid #d8dee7;
  border-radius: 8px;
  padding: 7px 9px;
  font: inherit;
  font-size: 12px;
  background: #fff;
}

.wm-ndu-pagina {
  width: 64px;
}

.wm-ndu-vinculos {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  border: 1px solid #e0e5ea;
  background: #fafbfc;
  border-radius: 10px;
  padding: 9px 12px;
  margin-bottom: 12px;
}

.wm-ndu-vinculos > b {
  font-size: 11px;
  color: var(--vcr-teal-escuro);
  align-self: center;
}

.wm-ndu-vinculo {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 9.5px;
  font-weight: 700;
  color: #68707a;
}

.wm-ndu-vinculo input {
  width: 92px;
  border: 1px solid #d8dee7;
  border-radius: 7px;
  padding: 5px 8px;
  font: inherit;
  font-size: 11.5px;
}

.wm-ndu-vinculo small {
  max-width: 150px;
  font-weight: 500;
  color: #8a93a0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wm-ndu-titulo {
  font-size: 11px;
  font-weight: 800;
  color: var(--vcr-teal-escuro);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 14px 0 7px;
}

.wm-ndu-cod {
  font-weight: 700;
  white-space: nowrap;
}

.wm-ndu-desenho {
  width: 56px;
  text-align: center;
}

.wm-ndu-desc {
  width: 100%;
  min-width: 180px;
}

.wm-ndu-desenho,
.wm-ndu-desc,
.wm-ndu-tab-nome {
  border: 1px solid #d8dee7;
  border-radius: 7px;
  padding: 5px 8px;
  font: inherit;
  font-size: 11.5px;
  background: #fff;
}

.wm-ndu-add {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0 4px;
}

.wm-ndu-add input[type="search"] {
  border: 1px solid #d8dee7;
  border-radius: 9px;
  padding: 8px 11px;
  font: inherit;
  font-size: 12px;
}

.wm-ndu-add .ghost-button {
  align-self: flex-start;
}

.wm-ndu-tabela-bloco {
  border: 1px solid #e0e5ea;
  border-radius: 11px;
  padding: 10px 12px;
  margin-bottom: 10px;
  background: #fff;
}

.wm-ndu-tabela-cab {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.wm-ndu-tab-nome {
  flex: 1;
  font-weight: 700;
}

.wm-ndu-params {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #68707a;
}

.wm-ndu-params select {
  border: 1px solid #d8dee7;
  border-radius: 7px;
  padding: 5px 8px;
  font: inherit;
  font-size: 11px;
  background: #fff;
}

.wm-ndu-valores {
  display: inline-flex;
  gap: 4px;
  flex-wrap: wrap;
}

.wm-chip.mini {
  padding: 3px 9px;
  font-size: 10px;
}

.wm-ndu-grade th.wm-ndu-topo {
  background: var(--vcr-teal);
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}

.wm-ndu-grade th.wm-ndu-sub {
  text-align: center;
  min-width: 52px;
}

.wm-ndu-cel input {
  width: 44px;
  text-align: center;
  border: 1px solid #d8dee7;
  border-radius: 7px;
  padding: 5px 4px;
  font: inherit;
  font-size: 11.5px;
  background: #fff;
}

.wm-ndu-cel input:focus {
  border-color: var(--vcr-teal);
  outline: none;
}

.wm-ndu-rodape {
  margin-top: 12px;
  border-radius: 10px;
}

.wm-ndu-rodape .crescer {
  flex: 1;
}

.wm-funil-btn {
  border-color: var(--vcr-laranja) !important;
  color: var(--vcr-laranja-escuro) !important;
  font-weight: 800;
}

.wm-ndu-funil-perguntas {
  border: 1px solid #cfe4e4;
  background: #f6fbfa;
  border-radius: 10px;
  padding: 10px 13px;
  margin-bottom: 12px;
}

.wm-ndu-funil-perguntas > b {
  font-size: 11px;
  color: var(--vcr-teal-escuro);
}

.wm-ndu-pergunta {
  font-size: 10.5px;
  font-weight: 700;
  color: #4d5560;
  margin: 9px 0 4px;
}

.wm-ndu-pills {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

/* ---- v0158 · Funil de Montagem — famílias de componentes ----------------- */

.wm-ndu-cond {
  display: block;
  margin-top: 4px;
  max-width: 170px;
  border: 1px solid #d8dee7;
  border-radius: 7px;
  padding: 3px 6px;
  font: inherit;
  font-size: 9.5px;
  color: #68707a;
  background: #fff;
}

.wm-ndu-zero {
  color: #c2c9d2 !important;
}

.wm-ndu-fam-nome {
  font-size: 12.5px;
  color: var(--vcr-teal-escuro);
}

.wm-ndu-semear {
  border: 1px dashed var(--vcr-teal);
  background: #f6fbfa;
  border-radius: 11px;
  padding: 13px 16px;
  margin-bottom: 12px;
}

.wm-ndu-semear b {
  color: var(--vcr-teal-escuro);
  font-size: 12.5px;
}

.wm-ndu-semear p {
  font-size: 11.5px;
  color: #4d5560;
  margin: 5px 0 9px;
  line-height: 1.5;
}

.wm-ndu-auto {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: var(--vcr-grafite);
  background: #eef2f7;
  border-radius: 6px;
  padding: 3px 8px;
  margin-top: 4px;
  width: fit-content;
}

/* ---- v0159 · classes 13,8/34,5 kV + associação SICEC --------------------- */

.wm-ndu-sisup {
  display: block;
  font-size: 8.5px;
  font-weight: 600;
  color: #8a93a0;
  letter-spacing: 0.02em;
}

.wm-ndu-bloq {
  color: #c2c9d2;
  background: #f6f8fa;
  font-weight: 700;
  cursor: not-allowed;
}

.wm-ndu-sicec-cel {
  font-size: 10.5px;
}

.wm-ndu-sicec-cel b {
  color: var(--vcr-teal-escuro);
}

.wm-ndu-sicec-cel span {
  color: #4d5560;
}

.wm-ndu-sicec-busca {
  width: 100%;
  border: 1px solid var(--vcr-teal);
  border-radius: 7px;
  padding: 5px 8px;
  font: inherit;
  font-size: 10.5px;
}

.wm-ndu-sicec-cel .wm-mat-resultados {
  max-height: 180px;
  overflow: auto;
}

/* ---- v0160 · tela única de montagem da estrutura ------------------------- */

.wm-ndu-sec {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 16px 0 8px;
}

.wm-ndu-sec > b {
  font-size: 11px;
  font-weight: 800;
  color: var(--vcr-teal-escuro);
  letter-spacing: 0.05em;
}

.wm-ndu-sec-num {
  display: inline-flex;
  width: 21px;
  height: 21px;
  border-radius: 6px;
  background: var(--vcr-teal);
  color: #fff;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  flex: none;
}

.wm-ndu-sec .crescer {
  flex: 1;
}

.wm-ndu-semear-btn {
  border: none;
  background: linear-gradient(100deg, var(--vcr-laranja), var(--vcr-laranja-escuro));
  color: #fff;
  border-radius: 9px;
  padding: 8px 15px;
  font: inherit;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(240, 132, 48, 0.3);
}

.wm-ndu-semear-btn:hover {
  filter: brightness(1.06);
}

.wm-ndu-fam {
  padding: 0 0 10px;
  overflow: hidden;
}

.wm-ndu-fam-cab {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(100deg, var(--vcr-teal), var(--vcr-teal-escuro));
  color: #fff;
  padding: 8px 14px;
  margin-bottom: 8px;
}

.wm-ndu-fam-cab .wm-ndu-fam-nome {
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.04em;
}

.wm-ndu-fam-cab small {
  color: #d9ecec;
  font-size: 9.5px;
}

.wm-ndu-fam-cond {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 9.5px;
  font-weight: 700;
  white-space: nowrap;
}

.wm-ndu-fam .wm-tabela-wrap,
.wm-ndu-fam .wm-ndu-add {
  margin-left: 10px;
  margin-right: 10px;
}

.wm-ndu-sisup.sicec-ok {
  color: var(--vcr-teal);
}

.wm-ndu-sisup.sicec-warn {
  color: #b45309;
}

/* ---- v0163 · cards por seção + assistente de 3 etapas -------------------- */

.wm-sec-cab {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(100deg, var(--vcr-teal), var(--vcr-teal-escuro));
  color: #fff;
  border-radius: 10px 10px 0 0;
  padding: 9px 14px;
  margin-top: 14px;
}

.wm-sec-cab.laranja {
  background: linear-gradient(100deg, var(--vcr-laranja), var(--vcr-laranja-escuro));
}

.wm-sec-cab b {
  font-size: 12px;
  letter-spacing: 0.05em;
}

.wm-sec-cab small {
  color: rgba(255, 255, 255, 0.85);
  font-size: 9.5px;
}

.wm-sec-acoes {
  margin-left: auto;
  display: flex;
  gap: 6px;
}

.wm-sec-acoes button {
  background: rgba(255, 255, 255, 0.16);
  border: none;
  border-radius: 6px;
  padding: 4px 10px;
  font: inherit;
  font-size: 9.5px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
}

.wm-sec-acoes button:hover {
  background: rgba(255, 255, 255, 0.28);
}

.wm-sec-corpo {
  border: 1px solid #cfe4e4;
  border-top: none;
  border-radius: 0 0 10px 10px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 9px;
}

.wm-est-card-v2 {
  position: relative;
  padding: 0;
  display: block;
}

.wm-est-card-abrir {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  border: none;
  background: none;
  font: inherit;
  text-align: left;
  padding: 10px 26px 10px 11px;
  cursor: pointer;
}

.wm-est-card-abrir b {
  font-size: 13px;
  color: var(--vcr-teal-escuro);
}

.wm-est-card-abrir small {
  font-size: 10px;
  color: #68707a;
  line-height: 1.35;
}

.wm-est-card-x {
  position: absolute;
  top: 6px;
  right: 7px;
  border: none;
  background: none;
  font: inherit;
  font-size: 13px;
  color: #c6cdd6;
  cursor: pointer;
}

.wm-est-card-x:hover {
  color: #c25656;
}

.wm-est-card-add {
  border: 1px dashed #c6cdd6;
  border-radius: 10px;
  background: none;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  color: #68707a;
  min-height: 66px;
  cursor: pointer;
}

.wm-est-card-add:hover {
  border-color: var(--vcr-teal);
  color: var(--vcr-teal-escuro);
}

.wm-sec-nova {
  display: block;
  width: 100%;
  border: 1px dashed #c6cdd6;
  border-radius: 10px;
  background: none;
  font: inherit;
  font-size: 11.5px;
  font-weight: 700;
  color: #68707a;
  padding: 11px;
  margin-top: 14px;
  cursor: pointer;
}

.wm-sec-nova:hover {
  border-color: var(--vcr-teal);
  color: var(--vcr-teal-escuro);
}

.wm-ndu-passos {
  display: flex;
  border-bottom: 1px solid var(--line);
  background: #fafbfc;
  border-radius: 10px 10px 0 0;
  margin-bottom: 12px;
}

.wm-ndu-passo {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  background: none;
  font: inherit;
  font-size: 11.5px;
  font-weight: 700;
  color: #8a93a0;
  padding: 11px 10px;
  border-bottom: 3px solid transparent;
  cursor: pointer;
}

.wm-ndu-passo .n {
  display: inline-flex;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #c6cdd6;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  flex: none;
}

.wm-ndu-passo.on {
  color: var(--vcr-teal-escuro);
  border-bottom-color: var(--vcr-teal);
  background: #fff;
}

.wm-ndu-passo.on .n {
  background: var(--vcr-teal);
  border-color: var(--vcr-teal);
  color: #fff;
}

.wm-ndu-passo.feita {
  color: var(--vcr-teal);
}

.wm-ndu-passo.feita .n {
  background: var(--vcr-teal-suave);
  border-color: var(--vcr-teal);
  color: var(--vcr-teal-escuro);
}

.wm-ndu-passo.bloq {
  opacity: 0.55;
  cursor: not-allowed;
}

.wm-ndu-etapa3 {
  border: 1px dashed #c6cdd6;
  border-radius: 11px;
  padding: 26px;
  text-align: center;
  color: #8a93a0;
}

.wm-ndu-etapa3 b {
  display: block;
  color: #4d5560;
  font-size: 13px;
  margin-bottom: 6px;
}

.wm-ndu-etapa3 p {
  max-width: 640px;
  margin: 0 auto;
  font-size: 11.5px;
  line-height: 1.55;
}

/* ---- v0164 · cards de postes (medida + MO) ------------------------------- */

.wm-poste-card .wm-est-card-abrir {
  text-align: center;
  align-items: center;
}

.wm-poste-card .wm-est-card-abrir b {
  font-size: 14px;
}

.wm-poste-tipos {
  display: flex;
  gap: 3px;
  justify-content: center;
  margin-top: 3px;
}

.wm-poste-tipos i {
  font-style: normal;
  font-size: 8px;
  font-weight: 800;
  border-radius: 4px;
  padding: 1px 6px;
  background: #eef2f7;
  color: #5a6472;
}

.wm-sec-gerar {
  background: var(--vcr-laranja) !important;
}

.wm-poste-mo {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid #e0e5ea;
  border-radius: 9px;
  padding: 8px 11px;
  margin-top: 6px;
  font-size: 11.5px;
}

.wm-poste-mo b {
  color: var(--vcr-teal-escuro);
}

.wm-poste-mo-uf {
  font-size: 9px;
  font-weight: 800;
  background: var(--vcr-teal-suave);
  color: var(--vcr-teal-escuro);
  border-radius: 5px;
  padding: 2px 8px;
  flex: none;
}

.wm-poste-mo-desc {
  flex: 1;
  color: #39424e;
}

.wm-poste-mo .wm-ndu-cond {
  margin-top: 0;
  max-width: 140px;
}

/* ---- v0167 · barra de ações no TOPO (padrão do app) ---------------------- */

.wm-topo-acoes {
  border-top: none;
  border-bottom: 2px solid var(--vcr-teal);
  border-radius: 10px 10px 0 0;
  margin-bottom: 12px;
}

.wm-ndu-rodape.wm-topo-acoes {
  margin-top: 0;
  border-radius: 10px 10px 0 0;
}

/* ============================================================
   v0171 · NDU 005 subdividida + visual da tela de cards
   (cabecalho de secao sem icone, contagem em pilula, subgrupos
   com linha, cards com hover suave e bolinha de etapa)
   ============================================================ */
.wm-sec-cab {
  gap: 12px;
  border-radius: 12px 12px 0 0;
  padding: 10px 16px;
  margin-top: 16px;
}

.wm-sec-cab b {
  font-size: 12.5px;
  letter-spacing: 0.06em;
  font-weight: 800;
}

.wm-sec-qtd {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.wm-sec-acoes button {
  border-radius: 7px;
  padding: 5px 12px;
  font-size: 10px;
}

.wm-sec-corpo {
  border-radius: 0 0 12px 12px;
  background: #fbfdfd;
  padding: 12px 14px 14px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.wm-sub-cab {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.wm-sub-cab:first-child {
  margin-top: 0;
}

.wm-sub-cab b {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--vcr-teal-escuro);
  white-space: nowrap;
}

.wm-sub-cab small {
  font-size: 9.5px;
  color: #68707a;
  white-space: nowrap;
}

.wm-sub-cab i {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, #bcd9d9, transparent);
}

.wm-est-card-v2 {
  background: #fff;
  border-radius: 11px;
  transition: box-shadow 0.12s, border-color 0.12s, transform 0.12s;
}

.wm-est-card-v2:hover {
  border-color: #b7d6d6;
  box-shadow: 0 4px 14px rgba(11, 123, 128, 0.10);
  transform: translateY(-1px);
}

.wm-est-card-abrir {
  gap: 3px;
  padding: 11px 26px 11px 13px;
}

.wm-est-st {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-top: 3px;
}

.wm-est-st::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex: none;
}

.wm-est-st.pend { color: #b06a12; }
.wm-est-st.pend::before { background: #e79b2e; }
.wm-est-st.fam { color: #9a6a00; }
.wm-est-st.fam::before { background: #d9a400; }
.wm-est-st.ok { color: #1d7a3c; }
.wm-est-st.ok::before { background: #2ea45a; }

/* ============================================================
   v0172 · Etapa 1 reformulada — Desenho primeiro, Código,
   coluna Família por item, e as protecoes de edicao
   ============================================================ */
.wm-linha-regra td {
  background: #fbf7f1;
}

.wm-ndu-codigo {
  width: 92px;
  text-align: left;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
}

.wm-ndu-cod-vazio {
  color: #9aa2ad;
  font-weight: 700;
}

.wm-ndu-fam select {
  width: 100%;
  max-width: 280px;
  font: inherit;
  font-size: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  background: #fff;
}

.wm-linha-regra .wm-ndu-fam select {
  border-color: #e0c9a6;
  font-weight: 600;
}

.wm-ndu-lixo {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 13px;
  color: #c6cdd6;
  padding: 4px 7px;
  border-radius: 6px;
}

.wm-ndu-lixo:hover {
  background: #fdecec;
  color: var(--red, #a20f1b);
}

.wm-ndu-sujo {
  display: none;
  align-items: center;
  gap: 6px;
  background: #fdf1e2;
  color: #b05e14;
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-left: 10px;
}

.wm-ndu-sujo.on {
  display: inline-flex;
}

.wm-ndu-sujo::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e79b2e;
}

.wm-ndu-desfazer {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #343a42;
  color: #fff;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 11px;
  margin-top: 8px;
}

.wm-ndu-desfazer button {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  font: inherit;
  font-size: 10.5px;
  font-weight: 700;
  border-radius: 7px;
  padding: 5px 12px;
  cursor: pointer;
}

/* ============================================================
   v0174 · Etapa 1 — tabela protegida, colunas centradas,
   popup Inserir material e janela flutuante do desenho tecnico
   ============================================================ */
.wm-tabela-norma thead th {
  text-align: center;
}

.wm-tabela-norma thead th.esq {
  text-align: left;
}

.wm-tabela-norma td.centered {
  text-align: center;
}

.wm-tabela-norma .wm-ndu-curto {
  font-weight: 700;
  font-size: 12px;
}

.wm-tabela-norma .wm-ndu-cod {
  width: 76px;
  white-space: nowrap;
}

.wm-tabela-norma .wm-ndu-cod b {
  font-size: 12.5px;
}

.wm-ndu-sicec-ok,
.wm-ndu-sicec-warn {
  font-style: normal;
  font-weight: 800;
  font-size: 10px;
  margin-left: 4px;
  cursor: help;
}

.wm-ndu-sicec-ok { color: var(--vcr-teal); }
.wm-ndu-sicec-warn { color: #c07a12; }

.wm-ndu-codigo {
  width: 72px;
  text-align: center;
}

.wm-ndu-fam-chip {
  display: inline-block;
  background: #f4ede2;
  border: 1px solid #e0c9a6;
  color: #7a5a17;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
}

.wm-ndu-fam-chip.vazia {
  background: #f2f4f8;
  border-color: #e0e5ec;
  color: #9aa2ad;
}

.wm-ndu-lixo.bloq {
  color: #e4e8ee;
  cursor: not-allowed;
}

.wm-ndu-btn-edicao,
.wm-ndu-btn-inserir,
.wm-ndu-btn-desenho {
  border-radius: 8px;
  font: inherit;
  font-size: 10.5px;
  font-weight: 700;
  padding: 6px 12px;
  cursor: pointer;
}

.wm-ndu-btn-desenho {
  border: 1px solid #cfe4e4;
  background: #fff;
  color: var(--vcr-teal-escuro);
}

.wm-ndu-btn-edicao {
  border: 1px solid var(--line);
  background: #fff;
  color: #68707a;
}

.wm-ndu-btn-edicao.on {
  border-color: var(--vcr-laranja);
  background: #fdf1e2;
  color: #b05e14;
}

.wm-ndu-btn-inserir {
  border: none;
  background: var(--vcr-teal);
  color: #fff;
}

/* popup Inserir material (opcao A — janela central) */
.wm-ins-backdrop {
  z-index: 90;
}

.wm-ins-modal {
  width: min(480px, calc(100vw - 32px));
  background: #fff;
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 24px 70px rgba(20, 30, 40, 0.3);
}

.wm-ins-cab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.wm-ins-cab b {
  font-size: 13.5px;
  color: var(--vcr-teal-escuro);
}

.wm-ins-abas {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.wm-ins-abas button {
  flex: 1;
  border: 1px solid var(--line);
  background: #fff;
  font: inherit;
  font-size: 10.5px;
  font-weight: 700;
  color: #68707a;
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
}

.wm-ins-abas button.on {
  border-color: var(--vcr-teal);
  background: var(--vcr-teal-suave);
  color: var(--vcr-teal-escuro);
}

.wm-ins-campo {
  display: block;
  margin-bottom: 10px;
}

.wm-ins-campo span {
  display: block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #9aa2ad;
  margin-bottom: 3px;
}

.wm-ins-campo input,
.wm-ins-campo select {
  width: 100%;
  font: inherit;
  font-size: 12.5px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 11px;
  background: #f7f9fc;
}

.wm-ins-campo input:focus,
.wm-ins-campo select:focus {
  background: #fff;
  border-color: var(--vcr-teal);
  outline: none;
}

.wm-ins-achado {
  font-size: 10.5px;
  color: #9aa2ad;
  background: #f2f4f8;
  border-radius: 7px;
  padding: 7px 10px;
  margin: -4px 0 10px;
}

.wm-ins-achado.ok {
  color: var(--vcr-teal-escuro);
  background: var(--vcr-teal-suave);
}

.wm-ins-achado.warn {
  color: #b06a12;
  background: #fdf1e2;
}

.wm-ins-sug {
  display: grid;
  gap: 4px;
  margin: -4px 0 8px;
}

.wm-ins-sug button {
  display: flex;
  gap: 8px;
  align-items: baseline;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 6px 10px;
  font: inherit;
  font-size: 10.5px;
  text-align: left;
  cursor: pointer;
}

.wm-ins-sug button:hover {
  border-color: var(--vcr-teal);
}

.wm-ins-linha2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.wm-ins-pe {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

/* janela flutuante do desenho tecnico */
.wm-desenho-janela {
  position: fixed;
  top: 110px;
  right: 40px;
  width: 520px;
  height: 620px;
  min-width: 280px;
  min-height: 240px;
  background: #fff;
  border: 1px solid #cfd6df;
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(20, 30, 40, 0.28);
  overflow: hidden;
  resize: both;
  display: flex;
  flex-direction: column;
  z-index: 80;
}

.wm-desenho-cab {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--vcr-teal-escuro);
  color: #fff;
  padding: 8px 12px;
  cursor: move;
  font-size: 11px;
  user-select: none;
  flex: none;
}

.wm-desenho-cab b {
  font-weight: 700;
}

.wm-desenho-cab small {
  color: rgba(255, 255, 255, 0.7);
}

.wm-desenho-garra {
  color: rgba(255, 255, 255, 0.6);
}

.wm-desenho-nav {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 8px;
}

.wm-desenho-nav button {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  border-radius: 6px;
  font: inherit;
  font-size: 10px;
  padding: 2px 8px;
  cursor: pointer;
}

.wm-desenho-nav em {
  font-style: normal;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.85);
}

.wm-desenho-x {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  border-radius: 6px;
  font: inherit;
  padding: 2px 9px;
  cursor: pointer;
}

.wm-desenho-corpo {
  flex: 1;
  overflow: auto;
  background: #e9edf2;
  display: grid;
  place-items: start center;
  padding: 8px;
}

.wm-desenho-corpo img {
  max-width: 100%;
  border: 1px solid #d5dbe3;
  background: #fff;
}

.wm-desenho-pe {
  flex: none;
  font-size: 9.5px;
  color: #9aa2ad;
  padding: 5px 12px;
  border-top: 1px solid var(--line);
}

/* ============================================================
   v0178 · PADRAO v5.1 das tabelas + associacao de cards (v3)
   + secao CABOS (G2) + previsoes puxadas na etapa 2
   ============================================================ */
/* cabecalhos SEMPRE centralizados nas tabelas das montagens */
.wm-ndu-grade th,
.wm-ndu-editor .wm-tabela thead th {
  text-align: center;
}

.wm-ndu-editor .wm-tabela thead th.esq {
  text-align: left;
}

/* linhas: zebra sutil, respiro, hover */
.wm-ndu-grade tbody td {
  padding: 12px 10px;
  vertical-align: middle;
}

.wm-ndu-grade tbody tr:nth-child(even) td {
  background: #fafcfc;
}

.wm-ndu-grade tbody tr:hover td {
  background: #f2f9f9;
}

/* codigo centralizado com o selo SICEC embaixo */
.wm-ndu-grade tbody td.wm-ndu-cod {
  text-align: center;
  white-space: nowrap;
}

.wm-ndu-grade tbody td.wm-ndu-cod small {
  display: block;
  text-align: center;
}

/* quantidades: caixa uniforme centrada */
.wm-ndu-grade input[data-ndu-fcel] {
  width: 46px;
  height: 38px;
  text-align: center;
  margin: 0 auto;
  display: block;
  border-radius: 9px;
}

/* "-" de classe sem previsao: caixa fantasma centrada */
.wm-ndu-vazio {
  display: inline-flex;
  width: 46px;
  height: 38px;
  border: 1.5px dashed #e0e5ec;
  border-radius: 9px;
  align-items: center;
  justify-content: center;
  color: #c6cdd6;
  font-weight: 700;
}

/* excluir discreto: so no hover da linha */
.wm-ndu-grade tbody td:last-child .planning-row-remove,
.wm-ndu-grade tbody td:last-child .wm-ndu-lixo {
  opacity: 0;
  transition: opacity 0.12s;
}

.wm-ndu-grade tbody tr:hover td:last-child .planning-row-remove,
.wm-ndu-grade tbody tr:hover td:last-child .wm-ndu-lixo {
  opacity: 1;
}

/* separadores: solida entre GRUPOS · tracejada transparente por dentro */
.wm-sep-forte {
  border-left: 2.5px solid var(--vcr-teal-escuro) !important;
}

.wm-sep-suave {
  border-left: 1.5px dashed rgba(11, 123, 128, 0.28) !important;
}

/* chips de associacao (linhas de poste/cabo na etapa 1) */
.wm-assoc {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: center;
  margin-top: 6px;
}

.wm-assoc small {
  font-size: 9px;
  color: #9aa2ad;
}

.wm-assoc-chip {
  border-radius: 8px;
  font: inherit;
  font-size: 9.5px;
  font-weight: 700;
  padding: 4px 10px;
  cursor: pointer;
  border: 1.5px solid #d8dee7;
  background: #fff;
  color: #9aa2ad;
}

span.wm-assoc-chip {
  cursor: default;
}

.wm-assoc-chip.on {
  border-color: var(--vcr-teal);
  background: var(--vcr-teal-suave);
  color: var(--vcr-teal-escuro);
}

/* previsoes puxadas dos cards (etapa 2) */
.wm-ndu-prev {
  border: 1px solid #cfe4e4;
  border-radius: 12px;
  overflow: hidden;
  margin: 12px 0;
}

.wm-ndu-prev-cab {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: linear-gradient(100deg, var(--vcr-teal), var(--vcr-teal-escuro));
  color: #fff;
  padding: 8px 14px;
}

.wm-ndu-prev-cab b {
  font-size: 11.5px;
  letter-spacing: 0.05em;
}

.wm-ndu-prev-cab small {
  color: rgba(255, 255, 255, 0.82);
  font-size: 9.5px;
}

.wm-ndu-prev-tab tbody td {
  font-size: 11px;
}

/* aviso de conferencia (R1 leve) no funil */
.wm-ndu-confere {
  display: block;
  background: #fdf1e2;
  border-radius: 8px;
  padding: 7px 10px;
  margin: 4px 0 8px;
}

/* v0181 — contagens nos menus suspensos (padrao dos filtros facetados):
   numero a direita em TODOS os menus, nao so no de status. */
.hk-menu-box label b { font-size: 11px; color: #7a8492; margin-left: auto; }

/* v0183 — Tabela de obras SEM rolagem de página: a página inteira cabe na
   janela, a TABELA ocupa o máximo da altura e rola por dentro, e a coluna de
   FILTROS ganha barra de rolagem própria. (No celular/janela estreita volta
   ao fluxo normal.) */
@media (min-width: 1181px) {
  .hk-tabela-page:not(.full) { height: calc(100vh - var(--hk-tab-desconto, 154px)); overflow: hidden; display: flex; flex-direction: column; }
  .hk-tabela-page:not(.full) .hk-tab-layout { flex: 1 1 auto; min-height: 0; align-items: stretch; }
  .hk-tabela-page:not(.full) .hk-tab-side { overflow-y: auto; min-height: 0; }
  .hk-tabela-page:not(.full) .hk-tab-main { min-height: 0; }
  .hk-tabela-page:not(.full) .hk-tab-main .hk-table-wrap { flex: 1 1 auto; min-height: 0; max-height: none; }
}

/* ===== v0187 — APROVEITAMENTO DE TELA COM O MENU RECOLHIDO ==================
   Pedido do Carlos: ao recolher a barra principal, o conteúdo deve ganhar a
   área liberada — em TODAS as telas. Antes só o menu encolhia (252→64px): as
   margens em cascata (app-view 12px + shell 16px + painel 16px = 44px de cada
   lado) continuavam iguais, então a tabela quase não crescia.
   Aqui, e SÓ no modo recolhido (desktop), as margens externas encolhem e o
   trilho de ícones fica mais estreito. Nada muda no modo normal, no tablet
   nem no celular; as margens INTERNAS dos cartões seguem intactas. */
@media (min-width: 900px) {
  body.app-side-recolhida {
    --module-shell-pad: 4px;          /* margem externa dos shells/workspaces */
    --module-shell-gutter: 0px;
    --hk-tab-desconto: 122px;         /* Tabela de obras ganha ~32px de altura */
    --hk-painel-desconto: 96px;       /* tela principal do Hancock idem */
  }
  body.app-side-recolhida .app-side { width: 54px; }
  body.app-side-recolhida .app-view { padding-left: 4px; padding-right: 4px; padding-top: 6px; padding-bottom: 8px; }
  /* nível 1 (shell da tela) e nível 2 (painel da ferramenta) */
  body.app-side-recolhida .inventory-shell,
  body.app-side-recolhida .inventory-analytics-shell,
  body.app-side-recolhida .stock-movement-shell,
  body.app-side-recolhida .siago-shell,
  body.app-side-recolhida .works-planning-workspace,
  body.app-side-recolhida .electric-warehouse-workspace,
  body.app-side-recolhida .dashboard-workspace,
  body.app-side-recolhida .warehouse-shell,
  body.app-side-recolhida .works-shell { padding-left: 6px; padding-right: 6px; padding-top: 8px; }
  body.app-side-recolhida .inventory-dashboard-panel,
  body.app-side-recolhida .electric-warehouse-panel,
  body.app-side-recolhida .works-planning-panel,
  body.app-side-recolhida .siago-panel { padding-left: 8px; padding-right: 8px; }
  /* grades altas aproveitam a altura liberada pelo topo mais enxuto */
  body.app-side-recolhida .hk-table-wrap { max-height: calc(100vh - 168px); }
  body.app-side-recolhida .hk-tab-main .hk-table-wrap { max-height: calc(100vh - 268px); }
  body.app-side-recolhida .planning-grid-scroll { max-height: calc(100vh - 250px); }
}

/* ===== v0188 — SITUAÇÃO com várias pendências ===============================
   Linha da OBRA (opção D): as 2 mais graves lado a lado + "＋N" que abre o
   resto — a altura da linha continua igual à de antes.
   Linha de MATERIAL: pendências empilhadas, cada uma com a quantidade. */
.hk-sit-cel { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.hk-sit-cel.empilha { flex-direction: column; align-items: flex-start; gap: 3px; }
.hk-sit-cel.aberta { flex-direction: column; align-items: flex-start; gap: 3px; }
/* v0265: material sem selo (obra nao fiscalizada, sem TCI apresentado) — um traco discreto */
.hk-sit-cel.hk-sit-sem { min-height: 18px; }
.hk-sit-cel.hk-sit-sem::before { content: "—"; color: #b4bcc6; font-size: 12px; }
.hk-sit-qtd { color: #7a8492; font-weight: 700; font-size: 10px; margin-left: 5px; }
.hk-sit-mat { color: #8a93a0; font-weight: 700; font-size: 9.5px; margin-left: 5px; }
.hk-sit-mais {
  border: 1px solid var(--marca-borda); background: var(--marca-suave); color: var(--marca-escura); border-radius: 999px;
  padding: 1px 8px; font: inherit; font-size: 10px; font-weight: 800; cursor: pointer; line-height: 1.5;
}
.hk-sit-mais:hover { background: var(--marca-suave-2); border-color: var(--marca-borda); }
.hk-sit-mais.on { background: #eef1f4; border-color: #cfd6dd; color: #5a6472; }

/* ===== v0189 — caixas de seleção: texto INTEIRO, sem cortar ================
   O menu de Status da obra cortava os nomes longos (ENCERRAMENTO:ENCERRAM…).
   Agora o texto quebra em quantas linhas precisar dentro da caixa. Clicar
   fora fecha a caixa (handler global no app.js, padrão de todos os filtros). */
.hk-menu-box label { white-space: normal; }
.hk-menu-nome { white-space: normal; overflow: visible; text-overflow: unset; word-break: break-word; }
.hk-menu-box label b { flex: none; }

/* ===== v0192 — inventário: parcial a qualquer tempo + fotos em arquivo ===== */
.inventory-lock-badge.is-partial {
  background: #fdf3e3;
  color: #b7791f;
  border-color: rgba(183, 121, 31, 0.35);
}
.inventory-photo-queue-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #6b7482;
}
.inventory-photo-queue-note.is-busy { color: #b7791f; font-weight: 600; }

/* v0195 — foto que não voltou da câmera */
.inventory-photo-field.nao-voltou .inventory-photo-button {
  border-color: rgba(163, 21, 31, 0.55);
  background: #fdecee;
}
.inventory-photo-status.alerta {
  color: var(--marca-escura);
  font-weight: 700;
}

/* v0196 — funil de famílias: previsões agrupadas e famílias numeradas */
.wm-ndu-fam-ordem {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(11, 123, 128, 0.12);
  color: #075e62;
  font-size: 11px;
  font-weight: 700;
  vertical-align: middle;
}
.wm-ndu-prev-tab th.wm-ndu-prev-item {
  font-size: 10.5px;
  line-height: 1.25;
  white-space: normal;
}
.wm-ndu-prev-tab td.wm-ndu-prev-total {
  background: rgba(11, 123, 128, 0.09);
}
.wm-ndu-prev-tab th.wm-ndu-prev-total {
  /* v0199: era rgba(255,255,255,.14) — o shorthand APAGAVA o fundo escuro do
     cabeçalho e sobrava o branco da tabela com texto branco por cima
     (a palavra TOTAL sumia). Agora é um tom sólido do próprio cabeçalho. */
  background: #55595f;
  color: #fff;
}

/* ===== v0197 — famílias separadas, variante e item fixo com SICEC ===== */
.wm-ndu-variante {
  margin-left: 6px;
  border: 1px solid #c9d5dc;
  border-radius: 7px;
  padding: 2px 6px;
  font-size: 11.5px;
  color: #0b7b80;
  background: #f4fbfb;
}
.wm-ndu-variante-chip {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(11, 123, 128, 0.12);
  color: #075e62;
  font-size: 11px;
  font-weight: 700;
}
.wm-ndu-variapor {
  display: block;
  margin-top: 3px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .3px;
  color: #0b7b80;
}
.wm-ndu-fixo {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border: 1px solid #dbe3e8;
  border-radius: 8px;
  padding: 5px 8px;
  background: #fbfcfd;
  min-width: 210px;
}
.wm-ndu-fixo.ok { border-color: rgba(31, 107, 63, .5); background: #f7fcf9; }
.wm-ndu-fixo.nao-achado { border-color: rgba(183, 121, 31, .55); background: #fdfaf2; }
.wm-ndu-fixo.sem { border-color: rgba(240, 132, 48, .5); background: #fdf6f7; }
.wm-ndu-fixo > b { font-family: Consolas, "Courier New", monospace; font-size: 12.5px; color: #0b7b80; }
.wm-ndu-fixo > small { font-size: 11.3px; color: #41505f; line-height: 1.35; }
.wm-ndu-fixo-st { font-size: 10.5px; font-weight: 700; color: #5a6472; }
.wm-ndu-fixo-st.ok { color: #1f6b3f; }
.wm-ndu-fixo-st.warn { color: #b7791f; }
.wm-ndu-fixo-st.err { color: var(--marca-escura); }
.wm-ndu-fixo-linha { display: flex; gap: 6px; align-items: center; }
.wm-ndu-fixo-linha .wm-ndu-codigo { width: 92px; }
.wm-ndu-fixo-busca {
  flex: 1;
  min-width: 150px;
  border: 1px solid #c9d5dc;
  border-radius: 7px;
  padding: 3px 8px;
  font-size: 11.5px;
}
.wm-ndu-fixos .wm-ndu-prev-cab { background: #41505f; }
.wm-ndu-fixo-falta td { background: #fdf6f7 !important; }
.wm-ndu-fixo-aviso {
  margin: 6px 12px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--marca-escura);
}
.wm-est-st.erro { background: #fdecee; color: #a3151f; }

/* ============================================================
   v0198 · Etapa 1 — layout A (escolha do Carlos): larguras
   definidas, DESCRIÇÃO que quebra em vez de cortar, coluna TIPO
   só com o selo e a condição ("quando") junto da família.
   ============================================================ */
.wm-tabela-norma {
  table-layout: fixed;
  width: 100%;
}

.wm-tabela-norma col.wm-col-des { width: 64px; }
.wm-tabela-norma col.wm-col-cod { width: 276px; }
.wm-tabela-norma col.wm-col-fam { width: 250px; }
.wm-tabela-norma col.wm-col-qtd { width: 50px; }
.wm-tabela-norma col.wm-col-tipo { width: 70px; }
.wm-tabela-norma col.wm-col-lixo { width: 36px; }
.wm-tabela-norma.em-edicao col.wm-col-cod { width: 296px; }

/* DESCRIÇÃO: era uma linha só com "…" no fim — agora quebra e usa a sobra */
.wm-tabela-norma .wm-desc {
  max-width: none;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.35;
  font-weight: 600;
  color: #20252b;
}

.wm-tabela-norma td.wm-ndu-fam,
.wm-tabela-norma td.wm-ndu-cod {
  text-align: left;
  white-space: normal;
  vertical-align: middle;
}

.wm-tabela-norma .wm-ndu-cod { width: auto; }

.wm-tabela-norma textarea.wm-ndu-desc {
  width: 100%;
  min-height: 32px;
  resize: none;
  overflow: hidden;
  line-height: 1.3;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  background: #fff;
  color: var(--ink);
}

.wm-tabela-norma textarea.wm-ndu-desc:focus {
  outline: none;
  border-color: var(--vcr-teal);
  box-shadow: 0 0 0 3px rgba(11, 123, 128, 0.12);
}

/* coluna TIPO: só o selo, centralizado e folgado */
.wm-tabela-norma td.wm-ndu-tipo .wm-tag {
  margin-right: 0;
  font-size: 9px;
  padding: 3px 9px;
}

/* a condição desceu para a coluna da família */
.wm-ndu-quando {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.wm-ndu-quando-rot {
  flex: none;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #9aa2ad;
  text-transform: uppercase;
}

.wm-ndu-quando-chip {
  font-size: 9.5px;
  font-weight: 700;
  color: #5a6472;
  background: #f2f5f8;
  border: 1px solid #e3e8ee;
  border-radius: 6px;
  padding: 3px 8px;
}

.wm-ndu-quando .wm-ndu-cond {
  display: block;
  margin-top: 0;
  flex: 1;
  min-width: 0;
  max-width: none;
}

/* os chips da família ganham respiro e não empilham torto */
.wm-tabela-norma .wm-assoc {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 5px;
  margin-top: 5px;
}

.wm-tabela-norma .wm-ndu-variapor {
  margin-top: 5px;
}

.wm-tabela-norma .wm-ndu-fam select {
  max-width: none;
}

/* v0198 · selo de família ainda combinada (Laços e alças / Parafusos e cintas) */
.wm-ndu-combinada {
  display: block;
  margin-top: 5px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #a56500;
  background: #fff4df;
  border: 1px solid #eccfa0;
  border-radius: 7px;
  padding: 3px 8px;
  cursor: help;
}

.wm-tabela-norma .wm-ndu-fam select,
.wm-tabela-norma .wm-ndu-variante {
  width: 100%;
  box-sizing: border-box;
}

/* v0198 · a célula do item fixo respeita a largura da coluna (antes o nome do
   SICEC vazava por cima da coluna da família) */
.wm-tabela-norma .wm-ndu-fixo {
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  overflow-wrap: anywhere;
}

.wm-tabela-norma .wm-ndu-fixo b,
.wm-tabela-norma .wm-ndu-fixo small,
.wm-tabela-norma .wm-ndu-fixo-st {
  white-space: normal;
  overflow-wrap: anywhere;
}

.wm-ndu-fam-vazia {
  color: #c6cdd6;
  font-weight: 700;
}

/* ============================================================
   v0199 · APROVEITAR A TELA no Módulo de Estruturas e Serviços
   Pedido do Carlos: a tabela terminava no meio da tela (teto fixo
   de 470px) e sobrava um vazio branco embaixo. Agora a tela do
   módulo ocupa a altura da janela: as ações e os passos ficam
   parados no topo e a área de conteúdo (.wm-ndu-rolagem) usa
   TODA a altura livre, rolando por dentro. Vale para a lista de
   cards, as 3 etapas e os cards de poste e de cabo.
   Sem :has (navegador antigo) ou em janela estreita, tudo volta
   ao fluxo de antes — nada sobrepõe nada.
   ============================================================ */
@media (min-width: 900px) {
  /* a view sai do fluxo e ocupa a caixa do app-main: assim o conteúdo alto
     (a lista de seções, por exemplo) não empurra mais a página para baixo —
     quem rola é a área de dentro, e a tela fica exatamente do tamanho da
     janela. */
  .app-main:has(> .works-materials-view:not([hidden])) {
    position: relative;
    min-height: 0;
  }

  .works-materials-view:not([hidden]) {
    position: absolute;
    inset: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-bottom: 8px;
  }

  .works-materials-view > .wm-card {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  .works-materials-view .wm-card > .wm-ndu-editor {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  .works-materials-view .wm-ndu-rolagem {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    /* respiro para a barra de rolagem não colar no conteúdo */
    padding-right: 2px;
  }

  .works-materials-view .wm-ndu-rolagem > * {
    flex: 0 0 auto;
  }

  /* a tabela da Etapa 1 estica até a borda de baixo da tela */
  .works-materials-view .wm-ndu-rolagem > .wm-tabela-cheia {
    flex: 1 1 auto;
    min-height: 200px;
    max-height: none;
  }

  /* nas demais telas do módulo as tabelas perdem o teto fixo: quem
     rola é a área, então elas mostram tudo o que couber */
  .works-materials-view .wm-ndu-rolagem .wm-tabela-wrap {
    max-height: none;
  }
}

/* com o menu recolhido a área ganha ainda mais altura e largura */
@media (min-width: 900px) {
  body.app-side-recolhida .works-materials-view:not([hidden]) {
    padding-bottom: 6px;
  }
}

/* ============================================================
   v0200 · Etapa 1 — opção 2 (escolha do Carlos): LINHA ENXUTA +
   FAIXA DE DETALHES. A linha de cima é sempre igual para todo
   item; os detalhes da regra (varia por · variante · cards ·
   quando) descem para uma faixa que usa a largura inteira, em
   pares "rótulo + valor". A lista de cards virou um resumo com
   botão — antes ela era despejada inteira dentro da célula e uma
   linha só chegava a ocupar meia tela.
   ============================================================ */
.wm-tabela-norma tbody tr td { vertical-align: middle; }

.wm-tabela-norma tr.wm-linha-mae td {
  border-bottom: none;
  padding-bottom: 6px;
}

.wm-tabela-norma tr.wm-linha-detalhe td {
  padding: 0 10px 10px 74px;
}

.wm-ndu-faixa {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  background: #fff;
  border: 1px solid #e9edf2;
  border-left: 3px solid var(--vcr-laranja);
  border-radius: 9px;
  padding: 7px 12px;
}

.wm-ndu-par {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: #41474f;
  max-width: 100%;
}

.wm-ndu-par > b {
  flex: none;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #9aa2ad;
  text-transform: uppercase;
}

.wm-ndu-par-vazio {
  font-size: 10px;
  color: #9aa2ad;
  font-weight: 700;
}

/* dentro da faixa os campos ficam compactos e na mesma altura */
.wm-ndu-faixa .wm-ndu-cond,
.wm-ndu-faixa .wm-ndu-variante {
  display: inline-block;
  margin: 0;
  width: auto;
  max-width: 260px;
  font-size: 10px;
  padding: 4px 8px;
}

.wm-ndu-faixa .wm-ndu-variapor,
.wm-ndu-faixa .wm-ndu-variante-chip {
  display: inline-block;
  margin: 0;
}

.wm-ndu-faixa .wm-ndu-quando-chip {
  font-size: 10px;
}

.wm-ndu-faixa .wm-ndu-combinada {
  display: inline-block;
  margin: 0;
}

/* resumo dos cards + botão que abre a lista */
.wm-assoc-mais {
  border: 1px dashed #bfdedd;
  background: #fff;
  color: var(--vcr-teal-escuro);
  border-radius: 7px;
  padding: 3px 9px;
  font: inherit;
  font-size: 9.5px;
  font-weight: 700;
  cursor: pointer;
}

.wm-assoc-mais:hover,
.wm-assoc-mais.on {
  background: var(--vcr-teal-suave);
  border-style: solid;
}

.wm-assoc-lista {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
  padding-top: 7px;
  border-top: 1px dashed #e3e8ee;
}

/* a célula da família volta a ser só a família (o resto foi para a faixa) */
.wm-tabela-norma td.wm-ndu-fam .wm-ndu-fam-chip {
  white-space: normal;
}

/* v0200: a caixa do item fixo respeita a largura da coluna CÓD. */
.wm-tabela-norma .wm-ndu-fixo,
.wm-tabela-norma .wm-ndu-fixo-linha {
  width: 100%;
  box-sizing: border-box;
}

.wm-tabela-norma .wm-ndu-fixo-linha .wm-ndu-fixo-busca {
  flex: 1 1 auto;
  min-width: 0;
}

.wm-tabela-norma .wm-ndu-fixo-linha .wm-ndu-codigo {
  flex: 0 0 auto;
}

/* ============================================================
   v0201 · Etapa 1 — separação visual dos grupos (linha + faixa).
   Carlos apontou que ainda ficava difícil ver onde um item termina
   e o próximo começa. Agora cada item "regra" (linha-mãe + sua
   faixa de detalhes) ganha uma fita colorida contínua na lateral
   (correndo pela altura toda do grupo) e o fundo alterna em zebra
   por GRUPO (não por linha) — a faixa herda o tom da sua linha-mãe,
   então as duas ficam visualmente coladas uma na outra e destacadas
   do próximo grupo. Também: CÓD. mais larga / DESCRIÇÃO mais
   estreita (larguras redistribuídas no colgroup acima), e o sufixo
   "(anexo)" saiu do chip de leitura da família (só faz sentido no
   select de edição, e forçava o chip a quebrar em duas linhas).
   ============================================================ */
.wm-tabela-norma tbody tr.wm-linha-mae[data-grupo-par="1"] td,
.wm-tabela-norma tbody tr.wm-linha-detalhe[data-grupo-par="1"] td {
  background: #f4f7f9;
}

.wm-tabela-norma tbody tr.wm-linha-mae[data-grupo-par="0"] td,
.wm-tabela-norma tbody tr.wm-linha-detalhe[data-grupo-par="0"] td {
  background: #ffffff;
}

.wm-tabela-norma tbody tr.wm-linha-mae[data-grupo-primeiro="1"] td {
  border-top: 2px solid #e3e8ee;
}

.wm-tabela-norma tr.wm-linha-mae td:first-child {
  position: relative;
}

.wm-tabela-norma tr.wm-linha-detalhe td:first-child {
  position: relative;
}

.wm-tabela-norma tr.wm-linha-mae.wm-linha-regra td:first-child::before,
.wm-tabela-norma tr.wm-linha-detalhe td:first-child::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--vcr-laranja);
}

.wm-tabela-norma tr.wm-linha-mae td {
  padding-top: 10px;
}

.wm-tabela-norma tr.wm-linha-detalhe td {
  padding-bottom: 14px;
}

/* a faixa deixa de ter moldura própria — agora ela é parte do mesmo
   "cartão" visual da linha-mãe (mesmo fundo, mesma fita lateral) */
.wm-ndu-faixa {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 5px 12px 0 12px;
}

/* ============================================================
   v0202 · Ferragens por estrutura no card de poste (ND-2.4).
   O desenho é o vetor da prancha (as linhas guia do papel foram
   apagadas); quem desenha as divisórias é o app, na mesma altura
   de cada campo — por isso nenhuma linha corta um campo ao meio.
   ============================================================ */
.wm-fer {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 14px;
}

.wm-fer-abas {
  display: flex;
  border-bottom: 1px solid #e6eaee;
  background: #f7f9fb;
  padding: 0 10px;
}

.wm-fer-aba {
  border: none;
  background: none;
  padding: 11px 16px 9px;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #8a929c;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  text-align: left;
}

.wm-fer-aba.on {
  color: var(--vcr-teal-escuro);
  border-bottom-color: var(--vcr-teal-escuro);
}

.wm-fer-aba small {
  display: block;
  margin-top: 2px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: #a8b0ba;
}

.wm-fer-aba.on small { color: #5aa3a0; }

.wm-fer-topo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 9px 14px;
  background: #fbfcfd;
  border-bottom: 1px solid #eef1f4;
  font-size: 10.5px;
  color: #8a929c;
}

.wm-fer-topo b { font-size: 11px; color: #41474f; }

.wm-fer-chip {
  background: var(--vcr-teal-suave);
  border: 1px solid #bfdedd;
  color: var(--vcr-teal-escuro);
  border-radius: 20px;
  padding: 3px 11px;
  font-size: 10px;
  font-weight: 800;
}

.wm-fer-soma {
  margin-left: auto;
  font-size: 10px;
  font-weight: 800;
  color: var(--vcr-teal-escuro);
}

.wm-fer-aviso {
  margin: 0;
  padding: 8px 14px;
  background: #fffaf3;
  border-bottom: 1px solid #f3e4cf;
  font-size: 10.5px;
  color: #8a6a3c;
}

.wm-fer-faixa {
  display: flex;
  height: 32px;
  background: #f2f5f8;
  border-bottom: 1px solid #cfd6dd;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8a929c;
}

.wm-fer-fe {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding: 0 14px;
}

.wm-fer-fd {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border-left: 1px solid #cfd6dd;
}

.wm-fer-corpo { position: relative; }

.wm-fer-desenho {
  position: absolute;
  left: 0;
  top: 0;
}

.wm-fer-desenho svg {
  width: 100%;
  height: auto;
  display: block;
}

.wm-fer-sep {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #cfd6dd;
}

.wm-fer-linhas {
  position: absolute;
  inset: 0;
}

.wm-fer-lin {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px solid #cfd6dd;
}

.wm-fer-lin.zebra { background: rgba(20, 40, 60, 0.028); }

.wm-fer-campos {
  position: absolute;
  left: var(--wm-fer-larg, 750px);
  right: 0;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
}

.wm-fer-n {
  flex: none;
  width: 16px;
  text-align: right;
  font-size: 9.5px;
  font-weight: 800;
  color: #c2c8d0;
}

.wm-fer-med {
  border: 1px solid #bfdedd;
  background: var(--vcr-teal-suave);
  color: var(--vcr-teal-escuro);
  border-radius: 7px;
  padding: 4px 9px;
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
}

.wm-fer-med sup {
  color: var(--vcr-laranja);
  font-size: 10px;
  cursor: help;
}

.wm-fer-vazio {
  font-size: 10px;
  font-weight: 700;
  font-style: italic;
  color: #b6bcc4;
}

.wm-fer-sel {
  width: 120px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 4px 6px;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  background: #fff;
  color: var(--ink);
}

.wm-fer-qtd {
  width: 56px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 5px 6px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 800;
  text-align: center;
  background: #fff;
}

.wm-fer-qtd.tem {
  border-color: var(--vcr-teal-escuro);
  background: var(--vcr-teal-suave);
  color: var(--vcr-teal-escuro);
}

.wm-fer-qtd:focus {
  outline: none;
  border-color: var(--vcr-teal);
  box-shadow: 0 0 0 3px rgba(11, 123, 128, 0.12);
}

.wm-fer-qtd-leitura {
  min-width: 56px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--ink);
}

.wm-fer-un {
  font-size: 9.5px;
  font-weight: 800;
  color: #a8b0ba;
}

.wm-fer-rodape {
  margin: 0;
  padding: 9px 14px;
  border-top: 1px solid #cfd6dd;
  background: #fbfcfd;
  font-size: 10px;
  line-height: 1.6;
  color: #8a929c;
}

.wm-fer-rodape b { color: var(--vcr-teal-escuro); }
.wm-fer-rodape .wm-fer-ast { color: var(--vcr-laranja); font-weight: 800; }

/* ============================================================
   v0203 · Nível de instalação das estruturas.
   Coluna própria entre o desenho e os campos, agrupando as faixas
   por altura no poste (1º/2º Nível Estrutura Primária, Estrutura
   Secundária, Luminária). A cor do nível também pinta a faixa dele
   por cima do desenho, para se ver em que altura do poste ele cai.
   ============================================================ */
.wm-fer-rolagem { overflow-x: auto; }
.wm-fer-quadro { position: relative; }

.wm-fer-fn {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-left: 1px solid #cfd6dd;
  color: var(--vcr-teal-escuro);
}

.wm-fer-zona {
  position: absolute;
  left: 0;
  width: var(--wm-fer-larg, 750px);
  pointer-events: none;
}

.wm-fer-zona i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
}

.wm-fer-nivel {
  position: absolute;
  left: var(--wm-fer-larg, 750px);
  width: var(--wm-fer-nivel, 200px);
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border-top: 1px solid #cfd6dd;
}

.wm-fer-barra {
  flex: none;
  width: 5px;
  align-self: stretch;
  margin: 8px 0;
  border-radius: 4px;
}

.wm-fer-nivel-txt b {
  display: block;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.85;
}

.wm-fer-nivel-txt > span {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--ink);
}

/* a divisória fica mais forte onde muda de nível */
.wm-fer-lin { border-top-color: #e3e8ee; }
.wm-fer-lin.troca-nivel { border-top-color: #cfd6dd; }

.wm-fer-campos {
  left: calc(var(--wm-fer-larg, 750px) + var(--wm-fer-nivel, 200px));
}

/* ============================================================
   v0204 · Medida vira seletor nas duas abas (listas fechadas) e
   cada estrutura ganha o código SICEC com a descrição padrão ao lado.
   ============================================================ */
.wm-fer-sel.norma {
  border-color: #bfdedd;
  background: var(--vcr-teal-suave);
  color: var(--vcr-teal-escuro);
}

.wm-fer-campos .wm-fer-ast {
  color: var(--vcr-laranja);
  font-size: 11px;
  font-weight: 800;
  margin-left: -6px;
  cursor: help;
}

.wm-fer-cod {
  width: 104px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 5px 8px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  background: #fff;
}

.wm-fer-cod:focus {
  outline: none;
  border-color: var(--vcr-teal);
  box-shadow: 0 0 0 3px rgba(11, 123, 128, 0.12);
}

.wm-fer-cod-leitura {
  min-width: 104px;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
}

.wm-fer-desc {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 11px;
  font-weight: 700;
  color: #41474f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wm-fer-desc.vazio {
  font-weight: 600;
  font-style: italic;
  color: #c2c8d0;
}

.wm-fer-desc.erro {
  color: var(--vcr-laranja);
}

.wm-fer-desc.ok::before {
  content: "✓ ";
  color: var(--vcr-teal-escuro);
  font-weight: 800;
}

/* v0207 — foto do checklist que não voltou da câmera (mesmo padrão do inventário) */
.photo-status-alerta {
  color: #a3151f;
  background: #fdecee;
  font-weight: 700;
}
.foto-nao-voltou .photo-button,
.foto-nao-voltou #checklistPhotoButton,
.foto-nao-voltou #replacementPhotoButton {
  border-color: rgba(163, 21, 31, 0.55);
  background: #fdecee;
}
.foto-nao-voltou {
  border-color: rgba(240, 132, 48, 0.4);
}

/* v0210 — Cadastro de Materiais (página própria do Módulo de Estruturas) */
.wm-cad-topo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.wm-cad-topo .wm-cad-busca { flex: 1; min-width: 260px; }
.wm-cad-titulo { font-size: 16px; }
/* v0211: .wm-cad-fontes e .wm-cad-unico sairam da tela (limpeza pedida pelo Carlos) */
.wm-cad-qtd { background: rgba(11, 123, 128, 0.12); color: #075e62; font-weight: 700; border-radius: 999px; padding: 3px 12px; font-size: 12px; }
.wm-cad-tabela { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #e3e8ee; border-radius: 10px; overflow: hidden; }
.wm-cad-tabela th { background: #f4f7f9; text-align: left; font-size: 11px; letter-spacing: 0.4px; color: #5b6572; padding: 8px 12px; border-bottom: 1px solid #e3e8ee; }
.wm-cad-tabela th.centro { text-align: center; }
.wm-cad-tabela td { padding: 7px 12px; border-bottom: 1px solid #eef1f4; font-size: 13px; }
.wm-cad-tabela tr:nth-child(even) td { background: #fbfcfd; }
.wm-cad-cod { font-weight: 700; color: #0b7b80; width: 96px; }
.wm-cad-un { width: 64px; text-align: center; }
.wm-cad-acoes { width: 120px; text-align: right; white-space: nowrap; }
.wm-cad-acoes button { border: 1px solid #d7dce2; background: #fff; border-radius: 7px; padding: 3px 8px; cursor: pointer; font-size: 12px; margin-left: 4px; }
.wm-cad-acoes button.excluir { color: var(--marca-escura); border-color: rgba(240, 132, 48, 0.35); }
.wm-cad-acoes button.ok { border-color: #0b7b80; color: #075e62; font-weight: 600; }
.wm-cad-selo { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; font-size: 10px; font-weight: 700; letter-spacing: 0.3px; vertical-align: 1px; }
.wm-cad-selo.editado { background: rgba(183, 121, 31, 0.14); color: #8a5a12; }
.wm-cad-selo.novo { background: rgba(11, 123, 128, 0.14); color: #075e62; }
.wm-cad-tabela tr.em-edicao td { background: #fff8ec !important; }
.wm-cad-tabela input, .wm-cad-tabela select { width: 100%; border: 1px solid #cfd6dd; border-radius: 7px; padding: 5px 8px; font-size: 13px; background: #fff; }
.wm-cad-tabela input.cod { width: 88px; font-weight: 700; }
.wm-cad-tabela input.cod:disabled { background: #f1f4f7; color: #6b7482; }
.wm-cad-tabela select.un { width: 78px; }
.wm-cad-incluir td { background: #eef7f7 !important; border-top: 2px solid #0b7b80; }
.wm-cad-mais { display: block; margin: 12px auto 4px; }
.wm-cad-conf { background: #fdecee; border: 1px solid rgba(163, 21, 31, 0.35); border-radius: 8px; padding: 5px 10px; font-size: 12px; color: #7d1016; display: inline-flex; gap: 8px; align-items: center; }
.wm-cad-conf button { border: 1px solid rgba(163, 21, 31, 0.45); background: #fff; border-radius: 6px; padding: 2px 8px; cursor: pointer; font-size: 12px; }

/* v0212 — Tabelas de Serviço (página própria; um contrato por aba) */
.ts-abas { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; border-bottom: 2px solid #e3e8ee; }
.ts-aba { border: 1px solid #e3e8ee; border-bottom: none; background: #f4f7f9; border-radius: 9px 9px 0 0; padding: 8px 16px; font-weight: 600; color: #5b6572; cursor: pointer; font-size: 13px; }
.ts-aba.on { background: #0b7b80; color: #fff; border-color: #0b7b80; }
.ts-aba.mais { background: #fff; border-style: dashed; color: #0b7b80; }
.ts-cab { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: #fbfcfd; border: 1px solid #e3e8ee; border-radius: 10px; padding: 10px 14px; margin-bottom: 10px; }
.ts-cab b { font-size: 15px; }
.ts-cab-edit { flex: 1; }
.ts-cab-edit .linha2 { display: flex; gap: 10px; }
.ts-cab-edit label { flex: 1; font-size: 12px; color: #5b6572; font-weight: 600; }
.ts-cab-edit input, .ts-cab-edit select { display: block; width: 100%; border: 1px solid #cfd6dd; border-radius: 8px; padding: 7px 10px; font-size: 13px; margin-top: 4px; color: #1c2430; }
.ts-cab-edit-acoes { display: flex; gap: 8px; margin-top: 12px; align-items: center; }
.ts-chip { background: #eef3f7; border-radius: 999px; padding: 3px 10px; font-size: 12px; color: #3d4754; }
.ts-ups { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.ts-ups span { color: #5b6572; font-size: 12px; font-weight: 600; }
.ts-ups input { width: 92px; border: 1px solid #cfd6dd; border-radius: 7px; padding: 5px 8px; font-size: 13px; text-align: right; font-weight: 700; }
.ts-topo { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.ts-topo .wm-busca { flex: 1; min-width: 240px; }
.ts-filtros { display: inline-flex; gap: 4px; }
.ts-filtro { border: 1px solid #d7dce2; background: #fff; border-radius: 999px; padding: 4px 12px; font-size: 12px; font-weight: 600; color: #5b6572; cursor: pointer; }
.ts-filtro.on { background: #0b7b80; border-color: #0b7b80; color: #fff; }
.ts-qtd { background: rgba(11, 123, 128, 0.12); color: #075e62; font-weight: 700; border-radius: 999px; padding: 3px 12px; font-size: 12px; }
.ts-tab { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #e3e8ee; border-radius: 10px; overflow: hidden; }
.ts-tab th { background: #f4f7f9; text-align: left; font-size: 11px; letter-spacing: 0.4px; color: #5b6572; padding: 8px 12px; border-bottom: 1px solid #e3e8ee; }
.ts-tab th.centro { text-align: center; }
.ts-tab th.dir { text-align: right; }
.ts-tab td { padding: 7px 12px; border-bottom: 1px solid #eef1f4; font-size: 13px; }
.ts-tab tr:nth-child(even) td { background: #fbfcfd; }
.ts-cod { font-weight: 700; color: #0b7b80; width: 84px; }
.ts-linha { width: 56px; text-align: center; }
.ts-lv { background: rgba(183, 121, 31, 0.14); color: #8a5a12; border-radius: 6px; padding: 1px 7px; font-size: 11px; font-weight: 700; }
.ts-lm { background: rgba(11, 123, 128, 0.12); color: #075e62; border-radius: 6px; padding: 1px 7px; font-size: 11px; font-weight: 700; }
.ts-num { text-align: right; width: 80px; }
.ts-val { text-align: right; width: 110px; font-weight: 600; white-space: nowrap; }
.ts-acoes { width: 128px; text-align: right; white-space: nowrap; }
.ts-acoes button { border: 1px solid #d7dce2; background: #fff; border-radius: 7px; padding: 3px 8px; cursor: pointer; font-size: 12px; margin-left: 4px; }
.ts-acoes button.excluir { color: var(--marca-escura); border-color: rgba(240, 132, 48, 0.35); }
.ts-acoes button.ok { border-color: #0b7b80; color: #075e62; font-weight: 600; }
.ts-tab tr.em-edicao td { background: #fff8ec !important; }
.ts-tab input, .ts-tab select { width: 100%; border: 1px solid #cfd6dd; border-radius: 7px; padding: 5px 8px; font-size: 13px; background: #fff; }
.ts-tab input.cod { width: 76px; font-weight: 700; }
.ts-tab input.cod:disabled { background: #f1f4f7; color: #6b7482; }
.ts-tab input.un { width: 56px; text-align: center; }
.ts-tab input.ups { width: 76px; text-align: right; }
.ts-incluir td { background: #eef7f7 !important; border-top: 2px solid #0b7b80; }
.ts-mais { display: block; margin: 12px auto 4px; }
.ts-conf { background: #fdecee; border: 1px solid rgba(163, 21, 31, 0.35); border-radius: 8px; padding: 5px 10px; font-size: 12px; color: #7d1016; display: inline-flex; gap: 8px; align-items: center; }
.ts-conf button { border: 1px solid rgba(163, 21, 31, 0.45); background: #fff; border-radius: 6px; padding: 2px 8px; cursor: pointer; font-size: 12px; }
.ts-novo { background: #fff; border: 1px solid #e3e8ee; border-radius: 12px; padding: 18px; max-width: 580px; }
.ts-novo-titulo { font-size: 15px; display: block; margin-bottom: 14px; }
.ts-novo label { display: block; margin-bottom: 10px; font-size: 12px; color: #5b6572; font-weight: 600; }
.ts-novo input, .ts-novo select { display: block; width: 100%; border: 1px solid #cfd6dd; border-radius: 8px; padding: 8px 10px; font-size: 14px; margin-top: 4px; font-weight: 500; color: #1c2430; }
.ts-novo .linha2 { display: flex; gap: 10px; }
.ts-novo .linha2 label { flex: 1; }
.ts-novo-acoes { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }

/* ==========================================================================
   v0214 — CAPAS DE MÓDULO: FAIXA ÚNICA EM MOSAICO GEOMÉTRICO (Opção 3)
   Pedido do Carlos: banner da ferramenta somente como faixa no topo, igual em
   TODAS as capas (SESMT, EPI/EPC, Materiais elétricos, Planejamento,
   Consultas, Módulo de Estruturas e Gestão de Obras). Sem foto: gradiente da
   marca com facetas diagonais sutis e o filete VCR embaixo. A capa da tela
   Início NÃO muda (o seletor exige .module-hero).
   Este bloco fica no FIM do arquivo de propósito: vence as regras antigas de
   300px/altura cheia que vivem nas media queries acima.
   ========================================================================== */
.home-hero.module-hero {
  position: relative;
  min-height: 0;
  height: 132px;
  max-height: 132px;
  flex: 0 0 auto; /* o mount é flex: sem isto a faixa era esticada */
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 40px;
  margin: 0 0 14px;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(120deg, #0e1720 0%, #12333a 55%, var(--vcr-teal) 100%);
  box-shadow: var(--shadow);
}

.home-hero.module-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(115deg, transparent 58%, rgba(240, 132, 48, 0.16) 58%, rgba(240, 132, 48, 0.16) 70%, transparent 70%),
    linear-gradient(115deg, transparent 66%, rgba(11, 123, 128, 0.35) 66%, rgba(11, 123, 128, 0.35) 82%, transparent 82%),
    linear-gradient(115deg, transparent 78%, rgba(255, 255, 255, 0.06) 78%, rgba(255, 255, 255, 0.06) 92%, transparent 92%),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.045) 0 2px, transparent 2px 26px);
  filter: none;
  transform: none;
  z-index: 0;
}

.home-hero.module-hero::after {
  height: 4px;
  background: linear-gradient(90deg, var(--vcr-teal), var(--vcr-laranja));
}

.home-hero.module-hero .home-hero-foto {
  display: none;
}

.home-hero.module-hero .home-hero-overlay {
  position: relative;
  z-index: 2;
  max-width: none;
}

.home-hero.module-hero .home-hero-eyebrow {
  font-size: 0.68rem;
  margin: 0 0 4px;
  letter-spacing: 0.14em;
}

.home-hero.module-hero .home-hero-overlay h2 {
  font-size: 1.5rem;
  margin: 0;
}

.home-hero.module-hero .home-hero-frase {
  font-size: 0.82rem;
  margin: 4px 0 0;
  opacity: 0.85;
}

/* Gestão de Obras Elétricas: a MESMA faixa (o banner é decorativo, sem texto) */
.works-hero {
  height: 132px;
  border-radius: 14px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
  background-image:
    linear-gradient(115deg, transparent 58%, rgba(240, 132, 48, 0.16) 58%, rgba(240, 132, 48, 0.16) 70%, transparent 70%),
    linear-gradient(115deg, transparent 66%, rgba(11, 123, 128, 0.35) 66%, rgba(11, 123, 128, 0.35) 82%, transparent 82%),
    linear-gradient(115deg, transparent 78%, rgba(255, 255, 255, 0.06) 78%, rgba(255, 255, 255, 0.06) 92%, transparent 92%),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.045) 0 2px, transparent 2px 26px),
    linear-gradient(120deg, #0e1720 0%, #12333a 55%, var(--vcr-teal) 100%);
}

.works-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--vcr-teal), var(--vcr-laranja));
}

/* ==========================================================================
   v0215 — PADRONIZAÇÃO DAS CAPAS + TRANSIÇÕES DE TELA
   Pedido do Carlos: as capas tem de ficar EXATAMENTE iguais em todas as
   ferramentas. A auditoria mediu 3 larguras (1322/1324/1348), 3 recuos
   (252/264/265) e topos de 60 a 74 — cada tela tinha a sua moldura. O padrão
   definido: a capa fica a 12px das bordas do workspace e a 12px do topo,
   em TODAS as ferramentas.
   ========================================================================== */
:root {
  --capa-recuo: 12px;
}

/* Consultas e hubs de capa (SESMT / Planejamento): a moldura não tem recuo
   interno — a capa ganha o recuo padrão por conta própria. */
.siago-shell .home-hero.module-hero,
.hub-capa-view .home-hero.module-hero {
  margin-left: var(--capa-recuo);
  margin-right: var(--capa-recuo);
}

/* Módulo de Estruturas: começava 10px mais alto que as demais (v0170). */
.works-materials-view {
  padding-top: var(--capa-recuo);
}

/* Materiais elétricos: no modo capa, o cartão da moldura (borda teal + sombra)
   sai de cena — a capa fica idêntica às demais. Nas ferramentas o cartão volta
   normalmente (o seletor só casa quando a capa está montada). */
.electric-warehouse-panel:has(> .home-hero.module-hero) {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  overflow: visible;
}

/* ==========================================================================
   v0216 — BANNER FIXO NA TROCA DE TELA + PULSO NAS LINHAS (Opção 3)
   Pedido do Carlos: na transição, a imagem do banner fica FIXA e as linhas
   do mosaico ganham uma animação. Como funciona:
   1) a tela entra só deslizando (sem fade — fade faria o banner piscar);
   2) a capa desliza na direção contrária, na mesma duração e curva, então o
      movimento se anula e o banner parece parado enquanto o resto se move;
   3) um brilho diagonal atravessa as linhas do mosaico UMA vez a cada troca
      de tela (animação de 0,9s que não repete; a camada descansa fora da
      faixa). Nos redesenhos internos da mesma tela nada roda de novo.
   Tudo dentro de prefers-reduced-motion: quem pede menos movimento não vê
   animação nenhuma.
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  main.app-view:not([hidden]) {
    animation: appViewEntra 0.18s ease-out;
  }

  @keyframes appViewEntra {
    from {
      transform: translateY(8px);
    }
    to {
      transform: none;
    }
  }

  main.app-view:not([hidden]) .home-hero.module-hero,
  main.app-view:not([hidden]) .works-hero {
    animation: capaFixa 0.18s ease-out;
  }

  @keyframes capaFixa {
    from {
      transform: translateY(-8px);
    }
    to {
      transform: none;
    }
  }

  main.app-view:not([hidden]) .home-hero.module-hero::before {
    background-image:
      linear-gradient(115deg, transparent 0%, transparent 42%, rgba(255, 255, 255, 0.16) 50%, transparent 58%, transparent 100%),
      linear-gradient(115deg, transparent 58%, rgba(240, 132, 48, 0.16) 58%, rgba(240, 132, 48, 0.16) 70%, transparent 70%),
      linear-gradient(115deg, transparent 66%, rgba(11, 123, 128, 0.35) 66%, rgba(11, 123, 128, 0.35) 82%, transparent 82%),
      linear-gradient(115deg, transparent 78%, rgba(255, 255, 255, 0.06) 78%, rgba(255, 255, 255, 0.06) 92%, transparent 92%),
      repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.045) 0 2px, transparent 2px 26px);
    background-size: 220% 100%, auto, auto, auto, auto;
    background-position: 130% 0, 0 0, 0 0, 0 0, 0 0;
    animation: pulsoTroca 0.9s ease-out 1;
  }

  @keyframes pulsoTroca {
    from {
      background-position: 130% 0, 0 0, 0 0, 0 0, 0 0;
    }
    to {
      background-position: -70% 0, 0 0, 0 0, 0 0, 0 0;
    }
  }
}

/* ==========================================================================
   v0217 — LOGIN ATIVO POR 48H DE INATIVIDADE + ATUALIZACAO NO RELOGIN
   Faixa ambar na tela de login (Opcao 1, escolhida pelo Carlos) quando o
   acesso encerra por 48h sem uso, e overlay do "atualizando" que cobre a
   tela quando o relogin encontra versao nova publicada.
   ========================================================================== */
.auth-aviso-faixa {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #fdf3e3;
  border: 1px solid #f0c078;
  border-left: 4px solid #e08c2e;
  border-radius: 10px;
  padding: 12px 14px;
  margin: 0 0 16px;
  color: #7a4a10;
}

.auth-aviso-faixa svg {
  flex: 0 0 auto;
  margin-top: 1px;
}

.auth-aviso-faixa strong {
  display: block;
  font-size: 0.9rem;
  margin: 0 0 2px;
}

.auth-aviso-faixa span {
  font-size: 0.8rem;
  line-height: 1.4;
}

.auth-atualizando {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 26, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 240;
}

.auth-atualizando-caixa {
  background: #fff;
  border-radius: 14px;
  padding: 26px 28px;
  width: min(340px, 86vw);
  text-align: center;
  box-shadow: var(--shadow);
}

.auth-atualizando-giro {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid #cfe4e5;
  border-top-color: var(--vcr-teal);
  margin: 0 auto 14px;
  /* v0258: mesma troca de cor do giro da tabela — os dois iguais. */
  animation: authAtualizandoGiro 1s linear infinite, vcr-giro-cor 3.6s ease-in-out infinite;
}

@keyframes authAtualizandoGiro {
  to { transform: rotate(360deg); }
}

.auth-atualizando-caixa h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.auth-atualizando-caixa p {
  margin: 0;
  font-size: 0.8rem;
  color: #4c5a60;
  line-height: 1.45;
}

/* ==========================================================================
   v0218 — FASE 1 THOR/ZEUS: nome da marca no topo (computador) e assinatura
   VCR na tela de login. O fundo chumbo 16% esta na variavel --page (topo).
   ========================================================================== */
/* O link da logo nunca teve texto: sem esta regra o navegador sublinha o
   ZEUS como link comum. */
.topbar .brand,
.topbar .brand:hover {
  text-decoration: none;
}

/* v0221: ZEUS menor e mais discreto ao lado da logo (escolha do Carlos:
   posicionamento da opcao 2, sem o subtitulo). */
.app-marca-nome {
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  color: var(--ink);
  margin-left: 6px;
  align-self: center;
  white-space: nowrap;
}

.auth-brand-assina {
  margin: 10px 0 0;
  font-size: 0.7rem;
  color: #8a969c;
  letter-spacing: 0.05em;
}

/* ==========================================================================
   v0219 — FASE 2 THOR (so celular <= 720px): cabecalho FIXO com envios +
   atualizacao + avatar; faixa que ENCOLHE ao rolar; folha de envios.
   No computador nada disso aparece (display none fora do media query).
   ========================================================================== */
.thor-cab-acoes,
.thor-faixa,
.thor-folha,
.thor-folha-fundo,
.thor-menu-usuario {
  display: none;
}

@media (max-width: 720px) {
  /* CABECALHO PRINCIPAL: fixo, 58px, sempre visivel em todas as telas. */
  .topbar,
  body[data-view="home"] .topbar {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 80;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center;
    gap: 8px;
    height: 58px !important;
    min-height: 58px !important;
    max-height: 58px;
    width: 100%;
    padding: 0 max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left)) !important;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 2px 10px rgba(23, 32, 38, 0.08);
    overflow: visible !important;
  }

  .topbar .title-block,
  .topbar .mode-switch,
  .topbar .top-actions,
  .topbar .app-crumb,
  .topbar .app-side-toggle {
    display: none !important;
  }

  .topbar .brand,
  body[data-view="home"] .brand {
    flex: 0 0 auto;
    width: auto !important;
    min-width: 0;
  }

  .topbar .brand img {
    height: 30px;
    max-height: 30px;
    width: auto;
  }

  /* 58px do cabecalho + 96px da faixa + respiros (12 acima, 10 abaixo). */
  .app-shell,
  body[data-view="home"] .app-shell {
    padding-top: 176px;
  }

  /* As capas de modulo saem de cena no celular: a faixa THOR assume. */
  .home-hero.module-hero,
  .works-hero {
    display: none !important;
  }

  .thor-cab-acoes {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
  }

  .thor-cab-botao {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1.5px solid #e2e8ea;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5b6a72;
    padding: 0;
  }

  .thor-cab-botao svg {
    width: 21px;
    height: 21px;
  }

  .thor-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 19px;
    height: 19px;
    border-radius: 999px;
    background: var(--vcr-laranja, #e07b2e);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 2px solid #fff;
  }

  .thor-badge-erro {
    background: #c0392b;
  }

  .thor-ponto-ok {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #2e9e5b;
    border: 2px solid #fff;
  }

  .thor-cab-botao.thor-alerta {
    border-color: #f0c078;
    background: #fdf3e3;
    color: var(--vcr-laranja, #e07b2e);
  }

  @media (prefers-reduced-motion: no-preference) {
    .thor-cab-botao.thor-alerta::after {
      content: "";
      position: absolute;
      inset: -5px;
      border-radius: 16px;
      border: 2px solid rgba(224, 123, 46, 0.45);
      animation: thorPulsa 1.6s ease-out infinite;
    }

    @keyframes thorPulsa {
      0% { transform: scale(0.92); opacity: 1; }
      100% { transform: scale(1.12); opacity: 0; }
    }

    .thor-cab-botao.thor-sincronizando svg {
      animation: thorSobe 1s ease-in-out infinite;
    }

    @keyframes thorSobe {
      0%, 100% { transform: translateY(0); }
      50% { transform: translateY(-2px); }
    }
  }

  .thor-cab-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 0;
    background: var(--vcr-teal-suave, #e3f1f1);
    color: var(--vcr-teal, #0b7b80);
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
  }

  /* FAIXA THOR: cheia no topo, regua compacta ao rolar. Fixa (o shell tem
     estruturas de rolagem variadas por tela; sticky nao era confiavel aqui). */
  .thor-faixa {
    position: fixed;
    top: 70px;
    left: 12px;
    right: 12px;
    z-index: 45;
    display: flex;
    align-items: center;
    height: 96px;
    border-radius: 14px;
    overflow: hidden;
    padding: 0 18px;
    background: linear-gradient(120deg, #180f06 0%, #3a2410 55%, #b95c17 100%);
    box-shadow: 0 10px 24px rgba(23, 32, 38, 0.18);
    transition: height 0.18s ease, top 0.18s ease, left 0.18s ease, right 0.18s ease, border-radius 0.18s ease;
  }

  .thor-faixa::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
      linear-gradient(115deg, transparent 58%, rgba(11, 123, 128, 0.30) 58%, rgba(11, 123, 128, 0.30) 70%, transparent 70%),
      linear-gradient(115deg, transparent 66%, rgba(255, 255, 255, 0.09) 66%, rgba(255, 255, 255, 0.09) 82%, transparent 82%),
      repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.05) 0 2px, transparent 2px 22px);
  }

  .thor-faixa::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--vcr-laranja, #e07b2e), var(--vcr-teal, #0b7b80));
  }

  .thor-faixa-conteudo {
    position: relative;
    z-index: 1;
    min-width: 0;
  }

  .thor-faixa-conteudo p {
    margin: 0 0 3px;
    font-size: 0.6rem;
    letter-spacing: 0.14em;
    font-weight: 600;
    color: #ffd9b3;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .thor-faixa-conteudo h1 {
    margin: 0;
    font-size: 1.4rem;
    color: #fff;
    letter-spacing: 0.02em;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: font-size 0.18s ease;
  }

  .thor-faixa-encolhida {
    height: 40px;
    top: 58px;
    left: 0;
    right: 0;
    border-radius: 0;
    box-shadow: 0 6px 14px rgba(23, 32, 38, 0.22);
  }

  .thor-faixa-encolhida .thor-faixa-conteudo p {
    display: none;
  }

  .thor-faixa-encolhida .thor-faixa-conteudo h1 {
    font-size: 0.92rem;
  }

  /* MENU DO AVATAR */
  .thor-menu-usuario {
    display: block;
    position: fixed;
    top: 64px;
    right: 10px;
    z-index: 95;
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--line);
    box-shadow: 0 14px 34px rgba(23, 32, 38, 0.22);
    padding: 12px 14px;
    min-width: 210px;
  }

  .thor-menu-usuario[hidden] {
    display: none;
  }

  .thor-menu-usuario strong {
    display: block;
    font-size: 0.86rem;
  }

  .thor-menu-usuario small {
    display: block;
    color: #7c8a91;
    font-size: 0.68rem;
    margin: 2px 0 10px;
    overflow-wrap: anywhere;
  }

  .thor-menu-sair {
    width: 100%;
    border: 1.5px solid #e2e8ea;
    background: #fff;
    border-radius: 10px;
    padding: 9px;
    font-weight: 600;
    font-size: 0.8rem;
    color: #a20f1b;
  }

  /* FOLHA DE ENVIOS PENDENTES */
  .thor-folha-fundo {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 88;
    background: rgba(10, 20, 26, 0.45);
  }

  .thor-folha-fundo[hidden] {
    display: none;
  }

  .thor-folha {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    background: #fff;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -12px 40px rgba(10, 20, 26, 0.25);
    padding: 4px 16px calc(16px + env(safe-area-inset-bottom));
    max-height: 78svh;
    overflow-y: auto;
  }

  .thor-folha[hidden] {
    display: none;
  }

  .thor-folha-alca {
    display: block;
    width: 100%;
    background: transparent;
    border: 0;
    padding: 8px 0 10px;
  }

  .thor-folha-alca span {
    display: block;
    width: 44px;
    height: 4px;
    border-radius: 99px;
    background: #d6dde0;
    margin: 0 auto;
  }

  .thor-folha h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 2px;
    font-size: 1.02rem;
  }

  .thor-folha h2 svg {
    width: 20px;
    height: 20px;
    color: var(--vcr-laranja, #e07b2e);
  }

  .thor-folha-resumo {
    display: block;
    color: #7c8a91;
    font-size: 0.72rem;
    margin-bottom: 10px;
  }

  .thor-folha-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 2px;
    border-bottom: 1px solid #f0f3f4;
  }

  .thor-folha-item:last-child {
    border-bottom: 0;
  }

  .thor-folha-texto {
    flex: 1;
    min-width: 0;
  }

  .thor-folha-texto b {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .thor-folha-texto small {
    display: block;
    font-size: 0.64rem;
    color: #7c8a91;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .thor-chip {
    font-size: 0.6rem;
    font-weight: 600;
    border-radius: 999px;
    padding: 4px 10px;
    white-space: nowrap;
    flex: 0 0 auto;
  }

  .thor-chip-espera {
    background: #fdf3e3;
    color: #a05a12;
  }

  .thor-chip-enviando {
    background: var(--vcr-teal-suave, #e3f1f1);
    color: var(--vcr-teal, #0b7b80);
  }

  .thor-chip-falha {
    background: #fdeaea;
    color: #c0392b;
  }

  .thor-folha-vazia {
    color: #9aa6ac;
    font-size: 0.74rem;
    text-align: center;
    padding: 14px 0;
  }

  .thor-folha-aviso {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: #eef7f0;
    border-radius: 10px;
    padding: 10px 12px;
    margin: 12px 0;
  }

  .thor-folha-aviso svg {
    width: 18px;
    height: 18px;
    color: #2e7d4f;
    flex: 0 0 auto;
  }

  .thor-folha-aviso span {
    font-size: 0.7rem;
    color: #38634b;
    line-height: 1.45;
  }

  .thor-folha-botao {
    width: 100%;
    border: 0;
    border-radius: 12px;
    padding: 14px;
    background: var(--graphite, #303234);
    color: #fff;
    font-weight: 600;
    font-size: 0.92rem;
  }

  .thor-folha-botao:disabled {
    opacity: 0.55;
  }
}

/* ==========================================================================
   v0220 — FASE 3 THOR (so celular <= 720px): home de Lancamentos com modulos
   RECOLHIVEIS (organizacao do ZEUS) + cartao de atualizacao no padrao THOR.
   No computador a grade classica continua e .thor-home fica oculta.
   ========================================================================== */
.thor-home {
  display: none;
}

@media (max-width: 720px) {
  .thor-home {
    display: block;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
  }

  /* A grade classica sai de cena no celular (a home THOR assume). */
  .home-view .home-module-grid {
    display: none !important;
  }

  /* Na home travada do celular: aviso em cima, home THOR rolavel, rodape. */
  body[data-view="home"] .home-view {
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  body[data-view="home"] .app-update-notice {
    grid-row: 1;
  }

  body[data-view="home"] .thor-home {
    grid-row: 2;
  }

  body[data-view="home"] .home-parceria {
    grid-row: 3;
    margin: 4px 0 0;
  }

  .thor-secao {
    margin: 14px 2px 8px;
    font-size: 0.64rem;
    letter-spacing: 0.13em;
    font-weight: 600;
    color: #7c8a91;
    text-transform: uppercase;
  }

  .thor-secao:first-child {
    margin-top: 2px;
  }

  .thor-mod {
    margin: 0 0 12px;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(23, 32, 38, 0.08);
  }

  .thor-mod-capa {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 46px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    border: 0;
    text-align: left;
    cursor: pointer;
  }

  .thor-mod-teal {
    background: linear-gradient(120deg, #0e1720 0%, #12333a 55%, var(--vcr-teal, #0b7b80) 100%);
  }

  .thor-mod-lar {
    background: linear-gradient(120deg, #180f06 0%, #3a2410 55%, #b95c17 100%);
  }

  .thor-mod-capa::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
      linear-gradient(115deg, transparent 66%, rgba(255, 255, 255, 0.10) 66%, rgba(255, 255, 255, 0.10) 82%, transparent 82%),
      repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.05) 0 2px, transparent 2px 20px);
  }

  .thor-mod-capa::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--vcr-laranja, #e07b2e), var(--vcr-teal, #0b7b80));
  }

  .thor-mod-capa p {
    position: relative;
    margin: 0;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1;
  }

  .thor-mod-qtd {
    position: relative;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.62rem;
    font-weight: 500;
    white-space: nowrap;
  }

  .thor-mod-chev {
    position: relative;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    transition: transform 0.25s ease;
  }

  .thor-mod-chev svg {
    width: 13px;
    height: 13px;
    color: #fff;
  }

  .thor-mod-recolhido .thor-mod-chev {
    transform: rotate(-180deg);
  }

  .thor-mod-ferramentas {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 12px;
    max-height: 420px;
    opacity: 1;
    overflow: hidden;
    transition: max-height 0.28s ease, opacity 0.22s ease, padding 0.28s ease;
  }

  .thor-mod-recolhido .thor-mod-ferramentas {
    max-height: 0;
    opacity: 0;
    padding: 0 12px;
  }

  .thor-ferr {
    border: 1.5px solid #e2e8ea;
    border-radius: 12px;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
    background: #fff;
    text-align: left;
    cursor: pointer;
    min-width: 0;
  }

  .thor-ferr:active {
    transform: translateY(1px);
    border-color: var(--vcr-teal, #0b7b80);
  }

  .thor-ferr-larga {
    grid-column: 1 / -1;
  }

  .thor-ferr b {
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.25;
    color: var(--ink);
  }

  .thor-ferr small {
    font-size: 0.62rem;
    color: #7c8a91;
    margin-top: -5px;
  }

  .thor-ferr-ic {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .thor-ferr-ic svg {
    width: 22px;
    height: 22px;
  }

  .thor-ferr-lar {
    background: #fdeee0;
    color: var(--vcr-laranja, #e07b2e);
  }

  .thor-ferr-teal {
    background: var(--vcr-teal-suave, #e3f1f1);
    color: var(--vcr-teal, #0b7b80);
  }

  .thor-home-vazia {
    color: #9aa6ac;
    font-size: 0.78rem;
    text-align: center;
    padding: 22px 10px;
  }

  /* CARTAO DE ATUALIZACAO no padrao THOR (aprovado no mockup): cartao branco
     com borda ambar, filete gradiente e botao laranja de largura cheia. */
  .home-view .app-update-notice {
    position: relative;
    overflow: hidden;
    display: block;
    background: #fff;
    border: 1.5px solid #f0c078;
    border-radius: 14px;
    box-shadow: 0 6px 16px rgba(23, 32, 38, 0.10);
    padding: 14px;
    margin-bottom: 10px;
  }

  .home-view .app-update-notice::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--vcr-laranja, #e07b2e), var(--vcr-teal, #0b7b80));
  }

  .home-view .app-update-notice .module-icon {
    background: #fdf3e3;
    color: var(--vcr-laranja, #e07b2e);
    margin-bottom: 8px;
  }

  .home-view .app-update-notice .eyebrow {
    color: #a05a12;
  }

  .home-view .app-update-notice .primary-button {
    width: 100%;
    justify-content: center;
    margin-top: 10px;
    background: var(--vcr-laranja, #e07b2e);
    border-color: var(--vcr-laranja, #e07b2e);
  }
}

/* ==========================================================================
   v0221 — ajustes aprovados: home THOR fechada por padrao ja e regra no JS;
   aqui entra o RODAPE ELCOP fixo (translucido, so texto) na home do celular.
   ========================================================================== */
@media (max-width: 720px) {
  body[data-view="home"] .home-parceria {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    margin: 0;
    background: rgba(225, 225, 225, 0.92);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 6px 14px calc(6px + env(safe-area-inset-bottom));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    color: #7c8a91;
    text-align: center;
  }

  /* So o texto: a logo ELCOP sai do rodape fixo. */
  body[data-view="home"] .home-parceria img {
    display: none;
  }

  body[data-view="home"] .thor-home {
    padding-bottom: 46px;
  }
}

/* ==========================================================================
   v0225 — SOBREPOSICAO NO CABECALHO DA TABELA (Etapa 1 em edicao).
   Bug do Chromium: border-collapse: collapse + thead sticky faz o conteudo
   das linhas PINTAR POR CIMA do cabecalho (z-index nao resolve). A mesma
   cura ja usada na grade do Planejamento: separate + spacing 0.
   ========================================================================== */
.wm-tabela-wrap .wm-tabela {
  border-collapse: separate;
  border-spacing: 0;
}

/* ==========================================================================
   v0225 — LINHAS COM REGRA: Opcao 1 (escolha do Carlos) — painel teal com
   rotulos minusculos EM CIMA de cada campo (VARIA POR / VARIANTE / CARDS /
   QUANDO), alinhados pela base. Vale para leitura e edicao.
   ========================================================================== */
.wm-linha-regra .wm-ndu-faixa {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  align-items: flex-end;
  background: #f4f7f8;
  border: 0;
  border-left: 4px solid var(--vcr-teal);
  border-radius: 0 8px 8px 0;
  padding: 8px 14px 9px;
  margin: 2px 0 4px;
}

.wm-linha-regra .wm-ndu-par {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-start;
}

.wm-linha-regra .wm-ndu-par > b {
  font-size: 9px;
  letter-spacing: 0.08em;
  color: #7c8a91;
  text-transform: uppercase;
}

.wm-linha-regra .wm-ndu-par select {
  min-height: 30px;
}

/* ============================================================
   v0226 — card de poste · aba parafusos: SELETOR COMPLETO
   O seletor lista o parafuso inteiro (medida — código · nomenclatura)
   e o código preenche sozinho. Medida sem material na família fica
   âmbar (pendente); código vindo da família fica travado em verde.
   ============================================================ */

.wm-fer-sel-parafuso {
  min-width: 300px;
  max-width: 345px;
  font-size: 11.5px;
}

.wm-fer-sel-parafuso.pend {
  border-color: #d9a441;
  background: #fdf6e7;
}

.wm-fer-cod.trava {
  background: #eef6f0;
  border-color: #bcd9c4;
  color: #2e6b45;
  font-weight: 600;
}

/* ============================================================
   v0227 — três pedidos do Carlos:
   (1) cintas com o mesmo seletor completo dos parafusos (código
       puxado da Família · Cintas; sem material = âmbar pendente);
   (2) postes juntados em UMA família (sem CSS — regra de dados);
   (3) itens FIXO sempre acima na lista da norma (sem CSS — ordem).
   ============================================================ */

.wm-fer-sel-cheia {
  min-width: 300px;
  max-width: 345px;
  font-size: 11.5px;
}

.wm-fer-sel-cheia.pend {
  border-color: #d9a441;
  background: #fdf6e7;
}

/* ============================================================
   v0228 — leitura das ferragens também mostra o código puxado
   da família (verde discreto), sem precisar habilitar a edição.
   ============================================================ */

.wm-fer-cod-leitura.da-familia {
  color: #2e6b45;
  font-weight: 600;
}

/* ============================================================
   v0230 — código SICEC das ferragens editável (sem readonly) e
   botão "Habilitar edição" na própria seção de ferragens do card
   de poste (medida, quantidade e código destravam juntos).
   ============================================================ */

.wm-fer-btn-edicao {
  margin-left: auto;
}

/* ============================================================
   v0231 — ferragens do card de poste: CAMPO ÚNICO por linha
   (busca por descrição ou código, só cadastro de materiais);
   material escolhido aparece uma vez (verde, × para trocar);
   sem campo de código nem nome repetido; sem rolagem horizontal.
   ============================================================ */

.wm-fer-busca {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.wm-fer-busca input {
  flex: 1;
  min-width: 0;
  min-height: 32px;
  border: 1px solid #ccd6db;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 12px;
  background: #fff;
}

.wm-fer-busca input.tem {
  background: #eef6f0;
  border-color: #bcd9c4;
  color: #2e6b45;
  font-weight: 600;
}

.wm-fer-busca input.tem.fora {
  background: var(--marca-suave);
  border-color: #e3b8ab;
  color: #8a3b28;
}

.wm-fer-busca input.pend {
  border-color: #d9a441;
  background: #fdf6e7;
}

.wm-fer-limpa {
  border: 0;
  background: #eef2f4;
  border-radius: 6px;
  width: 24px;
  height: 24px;
  cursor: pointer;
  color: #66757c;
  font-size: 14px;
  line-height: 1;
  flex: none;
}

.wm-fer-limpa:hover {
  background: #e2eaed;
  color: #31424a;
}

.wm-fer-lista {
  position: absolute;
  top: 36px;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #ccd6db;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(20, 40, 50, 0.16);
  z-index: 30;
  overflow: hidden;
  display: block;
}

.wm-fer-lista-cab {
  display: block;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #98a5ac;
  padding: 6px 12px 2px;
}

.wm-fer-lista button {
  display: flex;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: 0;
  background: none;
  padding: 7px 12px;
  font-size: 11.5px;
  cursor: pointer;
  align-items: baseline;
}

.wm-fer-lista button:hover {
  background: #f2f7f8;
}

.wm-fer-lista button b {
  color: var(--vcr-teal, #0b7b80);
  font-size: 11.5px;
  flex: none;
}

.wm-fer-lista button em {
  margin-left: auto;
  color: #98a5ac;
  font-size: 10px;
  font-style: normal;
  flex: none;
}

.wm-fer-lista-nada {
  display: block;
  padding: 8px 12px 10px;
  font-size: 11.5px;
  color: #98a5ac;
}

.wm-fer-mat-leitura {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
  color: #2e6b45;
  white-space: nowrap;
}

.wm-fer-mat-leitura.vazio {
  color: #b6c2c8;
  font-weight: 400;
}

.wm-fer-mat-leitura.pend {
  color: #b07817;
  font-weight: 500;
}

.wm-fer-mat-chip {
  flex: 1;
  min-width: 0;
  background: #eef6f0;
  border: 1px solid #bcd9c4;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 11px;
  line-height: 1.3;
  color: #2e6b45;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.wm-fer-mat-chip.fora {
  background: var(--marca-suave);
  border-color: #e3b8ab;
  color: #8a3b28;
}

.wm-fer-mat-leitura {
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: 11px;
  line-height: 1.3;
}

/* ============================================================
   v0233 — AS BUILT OBRA (THOR · Planejamento de Obras)
   Lançamento dos pontos executados pelo poste dinâmico.
   ============================================================ */

.asbuilt-view {
  padding: 12px;
}

.asb {
  max-width: 560px;
  margin: 0 auto;
}

.asb-obra {
  background: #fff;
  border-radius: 12px;
  padding: 11px 14px;
  box-shadow: 0 2px 8px rgba(20, 40, 50, 0.08);
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.asb-obra label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7c8a91;
}

.asb-obra label.crescer { flex: 1; }

.asb-obra input {
  border: 1px solid #ccd6db;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 13px;
  min-width: 0;
}

.asb-config {
  font-size: 10.5px;
  color: #5b6b72;
  background: #eaf0f2;
  border-radius: 8px;
  padding: 6px 10px;
  margin: 0 0 12px;
}

.asb-sec-titulo {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7c8a91;
  margin: 0 2px 7px;
  display: flex;
  justify-content: space-between;
}

.asb-ponto {
  background: #fff;
  border-radius: 12px;
  padding: 10px 13px;
  box-shadow: 0 2px 8px rgba(20, 40, 50, 0.07);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.asb-ponto-ic {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12px;
  background: #e3f1e7;
  color: #2e6b45;
  flex: none;
}

.asb-ponto.parcial .asb-ponto-ic {
  background: #fdf3dd;
  color: #8a5a13;
}

.asb-ponto-info { flex: 1; min-width: 0; }
.asb-ponto-info b { font-size: 12.5px; color: #16333a; display: block; }
.asb-ponto-info small { display: block; font-size: 10.5px; color: #7c8a91; margin-top: 1px; overflow-wrap: anywhere; }

.asb-selo {
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 9px;
  padding: 2px 8px;
  font-weight: 700;
  flex: none;
}

.asb-selo.env { background: #e3f1e7; color: #2e6b45; }
.asb-selo.fila { background: #fdf3dd; color: #8a5a13; }
.asb-selo.rasc { background: #eef2f4; color: #66757c; }

.asb-mini {
  border: 1.5px solid #bcd9d5;
  background: #fff;
  color: #0b7b80;
  border-radius: 12px;
  padding: 3px 10px;
  font-size: 11px;
  cursor: pointer;
  flex: none;
}

.asb-mini.apaga { color: #b3402a; border-color: #ecc5bb; }

.asb-novo {
  display: block;
  width: 100%;
  background: var(--vcr-teal, #0b7b80);
  color: #fff;
  border: 0;
  border-radius: 14px;
  padding: 14px;
  font-size: 14px;
  font-weight: 700;
  margin-top: 12px;
  box-shadow: 0 6px 16px rgba(11, 123, 128, 0.35);
  cursor: pointer;
}

.asb-novo:disabled { opacity: 0.45; cursor: default; box-shadow: none; }

.asb-vazio { font-size: 11px; color: #98a5ac; margin: 8px 0 0; }

/* ---- tela do ponto (poste dinâmico) ---- */

.asb-ponto-topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.asb-ponto-obra { font-size: 12px; font-weight: 700; color: #123c42; }

.asb-palco {
  position: relative;
  height: 560px; /* v0235: espaço para a faixa da calçada no pé do poste */
}

.asb-desenho { position: absolute; left: 0; top: 0; width: 132px; }
.asb-desenho svg { width: 132px; height: 458px; }

.asb-zona {
  position: absolute;
  left: 138px;
  right: 0;
  border-radius: 12px;
  padding: 7px 34px 7px 12px;
  border: 1.5px dashed #b7c6cb;
  background: rgba(255, 255, 255, 0.88);
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.asb-zona-rot {
  display: block;
  font-size: 9px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #7c8a91;
}

.asb-zona-val {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #16333a;
  margin-top: 1px;
  overflow-wrap: anywhere;
}

.asb-zona.vazia .asb-zona-val { color: #b6c2c8; font-weight: 500; }
.asb-zona.feita { border: 1.5px solid var(--vcr-teal, #0b7b80); background: #eef6f5; }
.asb-zona.feita .asb-zona-val { color: #0b7b80; }
.asb-zona.ativa { border: 2px solid #d97b1e; background: #fdf4e7; box-shadow: 0 4px 14px rgba(160, 90, 20, 0.22); }

.asb-zona-ok {
  position: absolute;
  right: 10px;
  top: 9px;
  font-size: 12px;
  color: #0b7b80;
  font-weight: 700;
}

.asb-folha {
  border-top: 3px solid #d97b1e;
  background: #fff;
  margin-top: 10px;
  padding: 12px 14px 14px;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(20, 40, 50, 0.14);
}

.asb-folha h3 {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #a1531a;
  margin: 0 0 8px;
}

.asb-folha-sub {
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7c8a91;
  margin: 8px 0 5px;
}

.asb-chips { display: flex; flex-wrap: wrap; gap: 7px; }

.asb-chip {
  border: 1.5px solid #c9d6da;
  border-radius: 16px;
  padding: 5px 14px;
  font-size: 12.5px;
  color: #47585f;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
}

.asb-chip.on {
  background: var(--vcr-teal, #0b7b80);
  border-color: var(--vcr-teal, #0b7b80);
  color: #fff;
  font-weight: 700;
}

.asb-folha-busca {
  width: 100%;
  border: 1px solid #ccd6db;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 12.5px;
  margin: 8px 0;
}

.asb-est-lista { display: flex; flex-direction: column; gap: 5px; max-height: 220px; overflow-y: auto; }

.asb-est {
  display: flex;
  gap: 9px;
  align-items: baseline;
  border: 1px solid #e2eaed;
  border-radius: 9px;
  padding: 7px 11px;
  background: #fbfcfd;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
}

.asb-est b { color: var(--vcr-teal, #0b7b80); flex: none; }
.asb-est span { color: #47585f; overflow-wrap: anywhere; }
.asb-est.on { border-color: var(--vcr-teal, #0b7b80); background: #eef6f5; }

.asb-folha-dica { font-size: 10px; color: #98a5ac; margin: 8px 0 0; }

.asb-obra label span { white-space: nowrap; }
.asb-obra label:first-child input { width: 110px; }

.asb-ponto-topo { gap: 10px; }
.asb-ponto-topo .ghost-button { flex: none; width: auto; }
.asb-ponto-obra { white-space: nowrap; }

/* v0235 — cavas e calçada reais do Anexo 7 de MS: chips em lista, código + nome */
.asb-chips-col { flex-direction: column; align-items: stretch; }
.asb-chip-cava { text-align: left; display: flex; gap: 8px; align-items: baseline; }
.asb-chip-cava b { font-variant-numeric: tabular-nums; }

/* v0236 — o desenho monta conforme as respostas: partes pendentes em fantasma */
.asb-parte-ghost { opacity: 0.38; stroke: #7e939c; }
.asb-parte-ghost [fill="#1f2c31"] { fill: #7e939c; }
.asb-parte-ghost text { fill: #7e939c; }

/* v0238 — valor da faixa numa linha só (nomes longos ganham reticências) */
.asb-zona-val { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* v0242 — o app conta o que houve em vez de esconder */
.asb-falha { border: 1px solid #e6c9a8; background: #fdf6ee; border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.asb-falha b { font-size: 14px; color: #8a4b12; }
.asb-falha p { margin: 0; font-size: 13px; line-height: 1.45; color: #4a5560; }
.asb-estado { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin: 0 0 8px; font-size: 12px; color: #5b6b72; }
.asb-estado.ruim { color: #8a4b12; }
.asb-estado > span:first-child { font-variant-numeric: tabular-nums; opacity: .75; }
.asb-estado-erro { margin: -4px 0 10px; font-size: 12.5px; line-height: 1.45; color: #8a4b12; }

/* v0243 — popup de lançamento com as variações do card + classe na capa */
.asb-popup-fundo { position: fixed; inset: 0; background: rgba(16,24,28,.55); display: flex; align-items: flex-end; justify-content: center; z-index: 60; }
.asb-popup { background: #fff; width: min(420px, 100%); border-radius: 18px 18px 0 0; padding: 18px 18px 22px; display: flex; flex-direction: column; gap: 10px; max-height: 86vh; overflow: auto; }
.asb-popup-faixa { margin: 0; font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: #7e939c; }
.asb-popup-tit { margin: 0 0 4px; font-size: 17px; font-weight: 600; color: #1f2c31; }
.asb-popup-tit b { color: #0f6d70; margin-right: 6px; }
.asb-popup-perg { margin: 6px 0 0; font-size: 12px; letter-spacing: .07em; text-transform: uppercase; color: #5b6b72; }
.asb-popup-nada { margin: 4px 0; font-size: 13px; color: #5b6b72; }
.asb-popup-acoes { display: flex; gap: 10px; align-items: center; margin-top: 12px; }
.asb-popup-acoes .asb-mini { margin-right: auto; }
.asb-popup-ok { flex: 1; border: 0; border-radius: 12px; background: #0f6d70; color: #fff; font-size: 16px; font-weight: 600; padding: 13px 18px; }
.asb-popup-ok[disabled] { background: #b9c8cc; }
.asb-popup-falta { margin: 6px 0 0; font-size: 12px; color: #8a4b12; text-align: right; }
.asb-obra-tensao { display: flex; flex-direction: column; gap: 6px; margin: 0 0 10px; }
.asb-obra-tensao > span { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #5b6b72; }
.asb-popup-obra { margin: -2px 0 2px; font-size: 12.5px; color: #5b6b72; }
.asb-popup-obra b { color: #0f6d70; }

/* ===== v0271 · GERENCIAL (Obras elétricas) ================================ */
.gerencial-view { padding: 0; }
.ger-page { background: #fff; border: 1px solid #e3e6ea; border-radius: 12px; padding: 14px 16px 18px; }
.ger-top { align-items: center; }
.ger-titulos h2 { margin: 0; font-size: 16px; }
.ger-titulos .eyebrow { margin: 0 0 2px; }
.ger-top-dir { margin-left: auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 11px; color: #6b7480; }
.ger-consultado b { color: #1f2733; }
.ger-bases { font-size: 10.5px; color: #8a93a0; max-width: 520px; }
.ger-progresso, .ger-carregando { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #5a6472; margin: 10px 0; }
.ger-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; margin-top: 12px; }
.ger-card { text-align: left; font: inherit; color: inherit; border: 1px solid #e3e6ea; border-left: 4px solid var(--marca); border-radius: 12px; padding: 14px 16px; background: #fff; cursor: pointer; transition: box-shadow .15s, transform .15s; }
.ger-card:hover { box-shadow: 0 6px 18px rgba(11, 123, 128, .12); transform: translateY(-1px); }
.ger-card-prev { border-left-color: #39424e; }
.ger-card h4 { margin: 0 0 6px; font-size: 13px; }
.ger-tot { font-size: 22px; font-weight: 800; color: var(--marca-escura); }
.ger-sub { display: flex; gap: 14px; margin-top: 8px; font-size: 11px; color: #5a6472; flex-wrap: wrap; }
.ger-sub b { display: block; font-size: 14px; color: #1f2733; }
.ger-dica { font-size: 10px; color: #8a93a0; margin-top: 8px; line-height: 1.4; }
.ger-neg { color: var(--red) !important; }
.ger-pos { color: #1c7c43 !important; }
.ger-tabs { display: flex; gap: 6px; margin: 10px 0; align-items: center; flex-wrap: wrap; }
.ger-tab { border: 1px solid #d5dae0; border-radius: 999px; padding: 4px 12px; font: inherit; font-size: 11px; font-weight: 700; background: #fff; color: #1f2733; cursor: pointer; }
.ger-tab.on { background: var(--marca); border-color: var(--marca); color: #fff; }
.ger-espaco { flex: 1; }
.ger-busca { border: 1px solid #d5dae0; border-radius: 999px; padding: 4px 12px; font: inherit; font-size: 11px; width: 260px; }
.ger-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 6px 0 12px; }
.ger-kpi { border: 1px solid #e3e6ea; border-radius: 10px; padding: 10px 12px; background: #fff; }
.ger-kpi small { font-size: 9.5px; font-weight: 700; color: #5a6472; display: block; letter-spacing: .03em; }
.ger-kpi b { display: block; font-size: 17px; margin-top: 3px; white-space: nowrap; }
.ger-kpi.ruim b { color: var(--red); }
.ger-wrap { max-height: calc(100vh - 300px); }
.ger-tabela { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.ger-tabela th { background: #eef2f4; text-align: left; padding: 7px 8px; font-size: 10px; letter-spacing: .03em; text-transform: uppercase; color: #4b5563; position: sticky; top: 0; z-index: 1; }
.ger-tabela td { padding: 7px 8px; border-bottom: 1px solid #eef1f4; }
.ger-tabela td.n, .ger-tabela th.n { text-align: right; white-space: nowrap; }
.ger-tabela td.f { font-weight: 800; }
.ger-linha-estado { cursor: pointer; }
.ger-linha-estado:hover td { background: var(--marca-suave); }
.ger-abrir { font-size: 10.5px; font-weight: 700; color: var(--marca-escura); }
.ger-rodape, .ger-contagem, .ger-aviso { font-size: 11px; color: #6b7480; margin: 8px 0 0; }
.ger-contagem { margin: 0 0 8px; }
.ger-aviso { margin: 8px 0 10px; padding: 8px 10px; background: #fff8e8; border: 1px solid #f0e0bd; border-radius: 8px; color: #6b5312; }
.ger-vazio { text-align: center; color: #8a93a0; padding: 18px !important; }
.ger-prev th { background: #39424e; color: #fff; }
.ger-prev td.ger-grp { font-weight: 800; background: #f4f6f8; vertical-align: top; }
.ger-prev tr.ger-subtotal td { font-weight: 800; background: var(--marca-suave); }
.ger-prev th:first-child, .ger-prev td.ger-grp { width: 170px; }
.ger-prev td:nth-child(2) { min-width: 320px; }
.ger-tabela tr.ger-total td { font-weight: 800; background: var(--marca-suave-2); }
.ger-metas { margin-top: 12px; }
@media (max-width: 720px) { .ger-top-dir { margin-left: 0; } .ger-busca { width: 100%; } }
/* v0273 · Gerencial: os tres valores no card e a nota "pago >= base" */
.ger-valores { font-size: 10.5px; color: #5a6472; margin-top: 8px; }
.ger-valores b { color: #1f2733; font-weight: 700; }
.ger-nota { font-size: 9.5px; color: #8a93a0; font-weight: 400; }
.ger-cards { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
/* v0274 · Previsão de faturamento automatizada */
.ger-prev-wrap { overflow-x: auto; }
.ger-prev th:first-child, .ger-prev td.ger-grp { width: 130px; }
.ger-prev td:nth-child(2) { min-width: 0; }
.ger-prev td.ger-grp { font-size: 10.5px; }
.ger-cel-man { width: 92px; border: 1px solid #cfd6de; border-radius: 6px; padding: 2px 6px; font: inherit; font-size: 11px; text-align: right; background: #fffdf5; color: #1f2733; }
.ger-cel-man:focus { outline: 2px solid var(--marca-borda); border-color: var(--marca); }
.ger-obra-man { width: 100px; text-align: left; }
.ger-cel-auto { display: inline-block; min-width: 88px; border: 0; border-bottom: 1px dashed var(--marca-borda); padding: 2px 2px; background: transparent; text-align: right; color: var(--marca-escura); font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
.ger-cel-auto small { display: block; font-size: 8.5px; color: #8a93a0; font-weight: 400; }
.ger-cel-auto:hover { background: var(--marca-suave); }
.ger-cel-nada { color: #b4bcc6; }
.ger-cel-man-ex, .ger-cel-auto-ex { font-size: 10px; padding: 1px 6px; border-radius: 6px; }
.ger-cel-man-ex { border: 1px solid #cfd6de; background: #fffdf5; }
.ger-cel-auto-ex { border-bottom: 1px dashed var(--marca-borda); color: var(--marca-escura); font-weight: 700; }
.ger-legenda { font-size: 10.5px; color: #6b7480; margin: 0 0 8px; }
.ger-mes { font-size: 12px; font-weight: 800; color: var(--marca-escura); padding: 0 6px; }
/* v0450: ciclo de faturamento (Previsão) */
.ger-ciclo { display: inline-flex; flex-direction: column; justify-content: center; padding: 3px 10px; border-radius: 8px; background: #e6f2f2; color: #0e5c5b; font-size: 11px; line-height: 1.25; }
.ger-ciclo b { font-weight: 800; }
.ger-ciclo small { font-size: 10.5px; color: #4b6b6a; font-weight: 500; }
.ger-ciclo.virou { background: #fff4e5; color: #8a4b08; }
.ger-ciclo.virou small { color: #8a5a20; }
.ger-desc-man { width: 260px; border: 1px solid #cfd6de; border-radius: 6px; padding: 2px 6px; font: inherit; font-size: 11px; background: #fffdf5; }
.ger-x { border: 0; background: transparent; color: #8a93a0; cursor: pointer; font-size: 11px; }
.ger-x:hover { color: var(--red); }
.ger-mais { border: 1px solid #d5dae0; border-radius: 999px; padding: 1px 8px; font: inherit; font-size: 10px; font-weight: 700; background: #fff; cursor: pointer; margin-top: 4px; }
.ger-vazio-linha { color: #8a93a0; font-size: 11px; }
.ger-nota { font-size: 9.5px; color: #8a93a0; font-weight: 400; }
.ger-prev td.ger-desc { min-width: 330px; }
.ger-nota-linha { display: block; }
.ger-prev td { padding: 5px 8px; }
/* v0276 · Previsão: tudo centralizado (Descrição à esquerda), sem rolagem interna, listas digitadas e metas por contrato */
.ger-prev th, .ger-prev td, .ger-prev td.n, .ger-prev th.n { text-align: center; }
.ger-prev td.ger-desc, .ger-prev th.ger-desc-th, .ger-prev tr.ger-subtotal td:first-child, .ger-prev tr.ger-total td:first-child, .ger-prev td.ger-vazio-linha { text-align: left; }
.ger-prev td.ger-grp { vertical-align: middle; }
.ger-prev .ger-cel-man, .ger-prev .ger-cel-auto { text-align: center; }
.ger-metas th, .ger-metas td, .ger-metas td.n, .ger-metas th.n { text-align: center; }
.ger-metas td:first-child, .ger-metas th:first-child { text-align: left; }
.ger-metas .ger-cel-auto { min-width: 110px; text-align: center; }
.ger-prev-wrap, .ger-metas { max-height: none; overflow: visible; min-height: 0; }
.ger-prev-wrap { overflow-x: auto; }
.ger-nota-metas { margin: 6px 0 0; }
.ger-meta-form { padding: 10px 0; }
.ger-meta-form label { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; }
.ger-meta-input { width: 160px; font-size: 13px; padding: 5px 8px; }
.ger-campo-livre { width: 260px; text-align: left; }
.ger-prev td.ger-desc { min-width: 280px; }
.ger-prev .ger-cel-auto { min-width: 78px; }
/* v0278 · listas do Gerencial: tela inteira, R$ ao digitar, situação, colar do Excel */
.ger-lista-wrap { height: calc(100vh - 250px); max-height: none; min-height: 240px; overflow: auto; }
.ger-lista { table-layout: fixed; width: 100%; }
.ger-lista th, .ger-lista td { text-align: center; overflow: hidden; text-overflow: ellipsis; }
.ger-lista th:first-child, .ger-lista td:first-child { text-align: left; }
.ger-lista input.ger-cel-man { width: 100%; box-sizing: border-box; font-size: 12px; padding: 5px 8px; }
.ger-lista input.ger-campo-livre { text-align: left; }
.ger-lista td.n input.ger-cel-man { text-align: right; }
.ger-chip-ja { display: inline-block; font-size: 10px; font-weight: 700; color: #6b5312; background: #fff8e8; border: 1px solid #f0e0bd; border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.ger-riscado { color: #9aa3ae !important; text-decoration: line-through; }
.ger-cola { font-size: 10.5px; color: #6b7480; }
.ger-cola b { color: var(--marca-escura); }
.ger-tabs-rodape { margin-top: 8px; }
.ger-prev input.ger-cel-man { width: 108px; }
.ger-meta-input { width: 200px; }
/* v0279 · garantia/complementos: descrição + ✕ na mesma linha; células iguais ao STC */
.ger-prev td.ger-desc .ger-desc-man { width: calc(100% - 34px); max-width: 300px; }
/* v0288 · busca nas listas da previsão */
.ger-busca-lista { width: 280px; }

/* ===== v0292/v0293 — DESKTOP: o cartão ocupa TODO o cinza (opção A) ==========
   v0292 (menu recolhido) e v0293 (Carlos: "mesma configuração quando a barra
   não está recolhida — para todas as telas"): no desktop, com o menu aberto
   OU recolhido, os invólucros transparentes (app-view, workspaces, shells,
   painéis de ferramenta) perdem as margens externas e o cartão encosta no
   menu, no topo, na direita e embaixo, com cantos retos. A margem INTERNA dos
   cartões continua igual; tablet e celular (< 1100 px) não mudam.
   Complementa a v0187. */
@media (min-width: 900px) {
  body .app-view { padding: 0 !important; margin: 0 !important; width: 100% !important; max-width: none !important; }
  body .users-admin-view > * { width: 100%; }
  /* v0293: capas dos modulos (Consultas, SESMT, Planejamento…) tambem encostam — todas iguais (check-0140) */
  body .module-hero { margin-left: 0 !important; margin-right: 0 !important; }
  body .app-view > .works-planning-workspace,
  body .app-view > .electric-warehouse-workspace,
  body .app-view > .dashboard-workspace,
  body .app-view > .siago-shell,
  body .app-view > .warehouse-shell,
  body .app-view > .works-shell,
  body .works-planning-panel,
  body .electric-warehouse-panel,
  body .siago-panel,
  body .inventory-shell,
  body .inventory-analytics-shell,
  body .stock-movement-shell { padding: 0 !important; }
  body .users-admin-mount { max-width: none !important; margin: 0 !important; }
  body .inventory-dashboard-panel,
  body .ger-page,
  body .dashboard-card,
  body .dashboard-panel,
  body .siago-panel,
  body .warehouse-mobile-panel,
  body .dds-header,
  body .tms-header { border-radius: 0 !important; }
}

/* ===== v0297 — GERENCIAL · PLANEJAMENTO × META (opção A) =====================
   KPIs, tabelas por base/UF/ranking, improdutividade + pareto, comparativo
   diário e a tela de apoio "Metas por equipe". Prefixo gp-. */
.ger-card-plan { border-left-color: #0b7b80; }
.gp-filtros { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; margin: 6px 0 12px; }
.gp-filtros label { display: grid; gap: 4px; font-size: 9.5px; font-weight: 800; letter-spacing: .06em; color: #5a6472; text-transform: uppercase; }
.gp-filtros select, .gp-filtros .gp-toggle { border: 1px solid #d5dae0; border-radius: 10px; padding: 8px 12px; font: inherit; font-size: 12px; background: #fff; min-width: 170px; color: #1f2733; }
.gp-toggle { display: flex; align-items: stretch; gap: 6px; padding: 4px !important; cursor: pointer; }
.gp-toggle span { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; padding: 5px 10px; border-radius: 7px; font-weight: 700; font-size: 11px; color: #5a6472; line-height: 1.2; } /* v0306: centralizado na horizontal e na vertical (rotulo em 2 linhas) */
.gp-toggle span.on { background: var(--marca); color: #fff; }
.gp-filtros .gp-arquivo { display: inline-flex; align-items: center; cursor: pointer; text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 700; color: inherit; }
.gp-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin: 0 0 14px; }
.gp-kpi { border: 1px solid #e3e6ea; border-radius: 12px; padding: 12px 14px; background: #fff; border-top: 4px solid var(--marca); min-width: 0; }
.gp-kpi small { display: block; font-size: 9.5px; font-weight: 800; letter-spacing: .06em; color: #5a6472; text-transform: uppercase; }
.gp-kpi b { display: block; font-size: 20px; margin-top: 4px; color: #1f2733; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gp-kpi em { display: block; font-style: normal; font-size: 11px; color: #5a6472; margin-top: 3px; }
.gp-kpi.ok { border-top-color: #1c7c43; } .gp-kpi.ok b { color: #1c7c43; }
.gp-kpi.ruim { border-top-color: var(--red); } .gp-kpi.ruim b { color: var(--red); }
.gp-kpi.neutro { border-top-color: #8a93a0; }
.gp-sec { border: 1px solid #e3e6ea; border-radius: 12px; background: #fff; padding: 12px 14px; margin: 0 0 14px; }
.gp-sec h3 { margin: 0 0 8px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: #1f2733; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gp-sec h3 small { font-weight: 600; letter-spacing: 0; text-transform: none; color: #8a93a0; font-size: 10.5px; }
.gp-duas { display: grid; grid-template-columns: 1fr 1.4fr; gap: 14px; }
.gp-tab { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.gp-tab th { background: #eef2f4; text-align: left; padding: 7px 8px; font-size: 10px; letter-spacing: .03em; text-transform: uppercase; color: #4b5563; white-space: nowrap; }
.gp-tab td { padding: 7px 8px; border-bottom: 1px solid #eef1f4; white-space: nowrap; }
.gp-tab td.n, .gp-tab th.n { text-align: right; }
.gp-tab tr.tot td { font-weight: 800; background: #f6f8f9; border-top: 2px solid #d5dae0; }
.gp-bar { display: inline-grid; grid-template-columns: 64px 44px; align-items: center; gap: 6px; vertical-align: middle; }
.gp-bar i { display: block; height: 8px; border-radius: 999px; background: #e5e9ee; overflow: hidden; position: relative; }
.gp-bar i::after { content: ""; position: absolute; inset: 0; width: var(--p); background: var(--c, var(--marca)); border-radius: 999px; }
.gp-bar b { font-size: 11px; text-align: right; }
.gp-pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: .03em; }
.gp-pill.ok { background: #e3f4ea; color: #1c7c43; } .gp-pill.and { background: #fff3d6; color: #8a5a00; } .gp-pill.ruim { background: #fde8e8; color: #b42318; } .gp-pill.neutro { background: #eef1f4; color: #5a6472; }
.gp-pos { color: #1c7c43; font-weight: 700; } .gp-neg { color: var(--red); font-weight: 700; } .gp-mudo { color: #8a93a0; }
.gp-cob { font-size: 10.5px; color: #5a6472; } .gp-cob b { color: #1f2733; }
.gp-rank td:first-child { font-weight: 800; }
.gp-rank tr.top td { background: #eef8f2; }
.gp-nota { font-size: 10.5px; color: #8a93a0; margin: 6px 0 10px; }
.gp-pareto td.b { padding-right: 0; } .gp-pareto .gp-bar { grid-template-columns: 90px 44px; }
.gp-graf { display: grid; gap: 3px; align-items: end; height: 130px; margin: 6px 0 14px; }
.gp-graf div { position: relative; background: #e6f0f1; border-radius: 3px 3px 0 0; height: 100%; }
.gp-graf div i { position: absolute; left: 0; right: 0; bottom: 0; background: var(--marca); border-radius: 3px 3px 0 0; opacity: .85; }
.gp-graf div em { position: absolute; left: 30%; right: 30%; bottom: 0; background: #1c7c43; border-radius: 3px 3px 0 0; }
.gp-graf div.fds { background: #e9ecef; } .gp-graf div.fds i { background: #b8c0c9; }
.gp-graf div u { position: absolute; left: 0; right: 0; border-top: 2px dashed #e07b00; }
.gp-graf div s { position: absolute; left: 0; right: 0; bottom: -13px; text-align: center; font-size: 8.5px; color: #8a93a0; text-decoration: none; }
.gp-legenda { display: flex; gap: 16px; font-size: 10.5px; color: #5a6472; margin-top: 6px; }
.gp-legenda i { display: inline-block; width: 12px; height: 8px; border-radius: 2px; margin-right: 4px; vertical-align: middle; }
.gp-input { border: 1px solid #d5dae0; border-radius: 8px; padding: 5px 8px; font: inherit; font-size: 11.5px; width: 180px; }
.gp-input-n { width: 120px; text-align: right; }
@media (max-width: 1100px) { .gp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .gp-duas { grid-template-columns: 1fr; } }
/* v0298: meta padrao (nao gravada no mes) */
.gp-chip { display: inline-block; font-size: 9px; font-weight: 800; padding: 1px 7px; border-radius: 999px; background: #eef1f4; color: #5a6472; margin-left: 6px; vertical-align: middle; letter-spacing: .04em; }
tr.gp-padrao .gp-input { color: #5a6472; }
/* v0299 · Previsão de faturamento salva sozinha: selo de situação na barra (sem botão Salvar) */
.ger-prev-status { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 700; color: #6b7480; background: #f1f3f6; border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.ger-prev-status.ok { color: #1c7c43; background: #e9f6ee; }
.ger-prev-status.salvando { color: #6b5312; background: #fff8e8; }
.ger-prev-status.erro { color: var(--red); background: #fdecec; white-space: normal; }
.ger-prev-status .planning-loading-spinner { width: 11px; height: 11px; border-width: 2px; }
.ger-prev-status .ger-tab { padding: 2px 9px; font-size: 10px; }
/* v0301 · Previsão: total de cada bloco (1 · esteira de fiscalização, 2 · valor garantido) */
.ger-tabela tr.ger-total-bloco td { font-weight: 800; background: #eef3f2; border-top: 2px solid var(--marca); }
.ger-prev tr.ger-total-bloco td:first-child { text-align: left; }
.ger-prev tr.ger-total-bloco td:first-child .ger-nota, .ger-prev tr.ger-total td:first-child .ger-nota { display: block; font-weight: 400; }
/* v0303/v0305 · Medição · esteira de recebimento do serviço (opção A: stepper numerado, tudo centralizado) */
.med-page .gp-filtros { align-items: end; background: #fff; border: 1px solid #e3e6ea; border-radius: 14px; padding: 12px 14px; margin: 8px 0 14px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.med-sec { padding: 10px 14px 8px; border-radius: 14px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.est-faixa.stp { display: flex; align-items: stretch; gap: 0; margin: 4px 0 2px; position: relative; overflow-x: auto; }
.est-faixa.stp:before { content: ""; position: absolute; left: 24px; right: 24px; top: 22px; height: 3px; background: #e3e6ea; z-index: 0; }
.est-etapa.stp-e { flex: 1; min-width: 120px; position: relative; z-index: 1; text-align: center; padding: 0 6px 4px; cursor: pointer; font: inherit; color: inherit; background: transparent; border: 0; border-radius: 10px; clip-path: none; }
.est-etapa.stp-e:hover { background: #f3f6f8; }
.stp-n { width: 44px; height: 44px; border-radius: 50%; margin: 0 auto 6px; display: grid; place-items: center; font-size: 16px; font-weight: 800; background: #fff; border: 3px solid #d5dae0; color: #5a6472; box-sizing: border-box; }
.stp-n b { font-weight: 800; }
.est-etapa.stp-e.ok .stp-n { background: var(--marca); border-color: var(--marca); color: #fff; }
.est-etapa.stp-e.siago .stp-n { border-radius: 10px; }
.est-etapa.stp-e.siago.ok .stp-n { background: #39424e; border-color: #39424e; }
.est-etapa.stp-e.on { background: #e6f2f2; box-shadow: inset 0 0 0 2px var(--marca); }
.est-etapa.stp-e small { display: block; font-size: 9.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #1f2733; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.est-etapa.stp-e em { display: block; font-style: normal; font-size: 10.5px; color: #5a6472; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.est-pontos { display: inline-flex; gap: 3px; align-items: center; }
.est-pontos i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid #c9d1d9; display: inline-block; background: #fff; }
.est-pontos i.ok { background: var(--marca); border-color: var(--marca); }
.est-pontos i.atual { border-color: #e0a300; background: #fff3c4; }
.est-pontos i.siago { border-radius: 2px; }
.est-tipo { display: inline-block; font-size: 9px; font-weight: 800; letter-spacing: .05em; padding: 2px 7px; border-radius: 999px; background: #eef1f4; color: #5a6472; white-space: nowrap; }
.est-tipo.man { background: #fff8e8; color: #6b5312; }
.med-chip { display: inline-block; font-size: 9px; font-weight: 800; letter-spacing: .04em; padding: 3px 9px; border-radius: 999px; background: #eef1f4; color: #5a6472; white-space: normal; text-align: center; }
.med-chip.ok { background: #e9f6ee; color: #1c7c43; }
.med-chip.warn { background: #fff8e8; color: #6b5312; }
.med-chip.red { background: #fdecec; color: var(--red); }
.est-cmp { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 10px 0 14px; }
.est-cmp .gp-kpi { border-top: 1px solid #e3e6ea; border-left: 5px solid var(--marca); border-radius: 14px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.est-cmp .gp-kpi.neutro { border-left-color: #8a93a0; }
.est-cmp .gp-kpi.ok { border-left-color: #1c7c43; }
.est-cmp .gp-kpi.ruim { border-left-color: var(--red); }
.med-wrap { max-height: none; overflow-x: auto; overflow-y: visible; border: 1px solid #e3e6ea; border-radius: 14px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); background: #fff; }
.med-tabela { table-layout: fixed; width: 100%; min-width: 1100px; }
.med-tabela th { text-align: center !important; background: #f3f6f8; color: #39424e; padding: 10px 6px; font-size: 10px; letter-spacing: .04em; white-space: normal !important; overflow: visible; text-overflow: clip; line-height: 1.25; }
.med-tabela td .est-tipo { font-size: 8.5px; letter-spacing: .03em; padding: 2px 6px; }
.med-tabela td { overflow: visible; text-overflow: clip; }
.med-tabela td { text-align: center; padding: 10px 8px; white-space: normal; word-break: break-word; vertical-align: middle; font-variant-numeric: tabular-nums; }
.med-tabela td:first-child, .med-tabela th:first-child { text-align: left !important; } /* v0369: a 5ª coluna (Etapa atual · pendência) passou a ser centralizada (td.c) */
.med-tabela td.n, .med-tabela th.n { text-align: center; }
.med-tabela tr.est-obra td { background: #fff; font-weight: 600; }
.med-tabela tr.est-obra td:first-child { border-left: 4px solid var(--marca); }
.med-tabela tr.est-obra.est-man td:first-child { border-left-color: #e0a300; }
.med-tabela tr.est-sub td { font-size: 11px; color: #3b4552; background: #fbfcfd; }
.med-tabela tr.est-sub td:first-child { padding-left: 34px; border-left: 4px solid #e3e6ea; }
.med-tabela tr.est-avulsa td { background: #fffdf5; }
.med-tabela tr.est-avulsa td:first-child { border-left-color: #e0a300; }
.med-tabela tbody tr:hover td { background: #f3fafa; }
.med-tabela tr.ger-total td { background: #eef3f2; border-top: 2px solid var(--marca); }
.med-exp { border: 0; background: transparent; cursor: pointer; font-size: 12px; color: var(--marca-escura); padding: 0 4px; }
.med-acoes { white-space: normal; }
.med-acoes .ger-tab { margin: 1px 0; white-space: nowrap; padding: 6px 12px; border-radius: 10px; }
.med-acoes .ger-tab.med-btn-medir { white-space: normal; }
.med-os-valor { width: 118px; text-align: right; }
/* v0304 · popup de medição real: janela maior, cabeçalho com chips, resumo, tabela com grupos de colunas */
.med-backdrop { z-index: 60; }
.planning-dialog.med-dialog { width: min(1560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); }
.med-head { align-items: flex-start; background: var(--marca-escura, #0b5f63); padding: 16px 20px; }
.med-head-txt { display: grid; gap: 4px; min-width: 0; }
.med-head-txt small { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.med-head-txt strong { font-size: 20px; line-height: 1.2; }
.med-head-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.med-hchip { display: inline-flex; align-items: baseline; gap: 6px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); border-radius: 999px; padding: 3px 10px; font-size: 11px; color: #fff; }
.med-hchip small { font-size: 9px; letter-spacing: .06em; text-transform: uppercase; opacity: .8; }
.med-hchip b { font-weight: 700; }
.med-hchip.ok { background: rgba(28,124,67,.55); border-color: rgba(28,124,67,.7); }
.med-body { padding: 16px 20px; background: #f6f8f9; }
.med-resumo { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.med-resumo .gp-kpi b { font-size: 22px; }
.med-resumo .gp-kpi b.med-kpi-txt { font-size: 12.5px; white-space: normal; line-height: 1.3; }
.med-toolbar { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; }
.med-caption { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--marca-escura); }
.med-tabwrap { background: #fff; border: 1px solid #e3e6ea; border-radius: 12px; overflow: auto; max-height: calc(100vh - 470px); min-height: 160px; }
.med-tab { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 12.5px; }
.med-tab th { position: sticky; top: 0; z-index: 1; background: #eef2f4; color: #4b5563; font-size: 10px; letter-spacing: .04em; text-transform: uppercase; padding: 8px 10px; text-align: left; border-bottom: 1px solid #d5dae0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.med-tab tr.med-th-grupo th { top: 0; height: 24px; padding: 4px 10px; font-size: 9.5px; letter-spacing: .1em; text-align: center; background: #fff; border-bottom: 0; }
.med-tab thead tr:nth-child(2) th { top: 24px; }
.med-tab th.med-th-ref { background: #e8eef5; color: #2f4a6b; }
.med-tab tr.med-th-grupo th.med-th-ref { border-bottom: 3px solid #2f4a6b; background: #fff; }
.med-tab th.med-th-med { background: #1c7c43; color: #fff; }
.med-tab tr.med-th-grupo th.med-th-med { background: #fff; color: #1c7c43; border-bottom: 3px solid #1c7c43; }
.med-tab td { padding: 9px 10px; border-bottom: 1px solid #eef1f4; vertical-align: middle; }
.med-tab tbody tr:nth-child(even) td { background: #fafbfc; }
.med-tab td.c, .med-tab th.c { text-align: center; }
.med-tab td.n, .med-tab th.n { text-align: right; font-variant-numeric: tabular-nums; }
.med-tab td.med-desc { white-space: normal; line-height: 1.3; }
.med-tab td.med-cod { font-weight: 700; }
.med-tab td.med-ref { background: #f3f6fa !important; color: #2f4a6b; }
.med-tab td.med-medida { background: #eef8f1 !important; }
.med-tab tr.med-extra td { background: #fffdf5 !important; }
.med-tab tfoot td { font-weight: 800; background: #f6f8f9; border-top: 2px solid #d5dae0; padding: 10px; }
.med-tab tfoot td.med-sub-rotulo { text-align: right; text-transform: uppercase; font-size: 10.5px; letter-spacing: .06em; color: #4b5563; }
.med-inp { font: inherit; font-size: 14px; font-weight: 700; border: 1.5px solid #bfd9c7; border-radius: 8px; padding: 6px 8px; background: #fff; color: #1f2733; }
.med-inp:focus { outline: none; border-color: #1c7c43; box-shadow: 0 0 0 3px rgba(28,124,67,.18); }
.med-inp-qtd { width: 90px; text-align: right; }
.med-inp-valor { width: 130px; text-align: right; }
.med-inp-cod { width: 90px; border-color: #d5dae0; font-weight: 600; }
.med-rodape { display: grid; grid-template-columns: 1.6fr 1fr; gap: 12px; margin-top: 14px; align-items: end; }
.med-obs input { font-size: 13px; }
.med-situacao { border: 1px solid #e3e6ea; border-left: 4px solid var(--marca); border-radius: 12px; background: #fff; padding: 10px 14px; display: grid; gap: 2px; }
.med-situacao small { font-size: 9.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #5a6472; }
.med-situacao b { font-size: 12.5px; color: #1f2733; }
.med-situacao em { font-style: normal; font-size: 10.5px; color: #8a93a0; }
.med-acoes-pop { align-items: center; justify-content: space-between; gap: 12px; }
@media (max-width: 1200px) { .med-resumo { grid-template-columns: repeat(2, minmax(0, 1fr)); } .med-rodape { grid-template-columns: 1fr; } }
@media (max-width: 1100px) { .est-cmp { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---- v0307: Tabelas de Serviço — operação I/R e importar planilha ---- */
.ts-op { display: inline-block; min-width: 22px; text-align: center; border-radius: 6px; padding: 1px 6px; font-size: 11px; font-weight: 700; }
.ts-op.i { background: rgba(11, 123, 128, 0.12); color: #075e62; }
.ts-op.r { background: rgba(108, 117, 125, 0.16); color: #3d4754; }
.ts-importar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: #f1f7f7; border: 1px solid rgba(11, 123, 128, 0.35); border-radius: 10px; padding: 10px 14px; margin-bottom: 10px; font-size: 13px; color: #1f2733; }
.ts-importar-acoes { display: inline-flex; gap: 8px; margin-left: auto; }

/* ---- v0308: Medição — popup Associar OS (várias OS por NR/AC) ---- */
.planning-dialog.med-assoc-dialog { width: min(960px, calc(100vw - 32px)); }
.med-assoc-tab tbody tr.on td { background: #eef7f1; }
.med-assoc-tab td { vertical-align: middle; }
.med-assoc-campo { margin-top: 12px; }
.med-assoc-linha { display: flex; gap: 8px; align-items: center; }
.med-assoc-linha input { flex: 1; }

/* ---- v0309: Medição — um só botão por NR/AC/obra; troca de OS dentro do popup ---- */
.med-btn-medir { white-space: normal; line-height: 1.2; text-align: center; max-width: 100%; padding: 6px 10px; }
.med-tabela td.med-acoes { text-align: center; }
.med-tabela td.med-acoes .ger-tab { display: inline-block; margin: 2px 0; }
.med-os-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 2px; }
.med-os-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.28); color: #fff; border-radius: 8px; padding: 5px 10px; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.med-os-btn small { font-weight: 600; font-size: 10.5px; opacity: .85; }
.med-os-btn.pend { border-style: dashed; }
.med-os-btn.on { background: #fff; color: #0b5f63; border-color: #fff; }
.med-os-btn:hover { background: rgba(255,255,255,.22); }
.med-os-btn.on:hover { background: #fff; }

/* ---- v0310: popup "Realizar Medição M.O. e Materiais" no estilo da Medição Real Programada ---- */
.planning-dialog.med-dialog-v2 { width: min(1600px, calc(100vw - 32px)); }
.med-dialog-v2 .planning-dialog-head { background: linear-gradient(135deg, #3a3a3c, #4b4b4e); color: #fff; }
.med-dialog-v2 .planning-dialog-head small { color: rgba(255,255,255,.78); }
.med-dialog-v2 .med-head-txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.med-dialog-v2 .med-os-btn.on { color: #3a3a3c; }
.med-abas { display: flex; gap: 6px; border-bottom: 2px solid #e3e8ee; margin: 0 0 12px; }
.med-aba { border: 0; background: transparent; font: inherit; font-weight: 700; font-size: 13px; color: #5a6472; padding: 8px 16px; border-bottom: 3px solid transparent; margin-bottom: -2px; cursor: pointer; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; }
.med-aba small { font-weight: 600; font-size: 10.5px; color: #8a93a0; }
.med-aba.on { color: #0b5f63; border-color: #0b5f63; }
.med-aba.on small { color: #0b5f63; }
.med-tab-obra thead th.med-th-ref, .med-tab-obra thead th.med-th-ref small { background: #e8eef5; color: #2f4a6b !important; }
.med-tab-obra thead th.med-th-med { background: #1c7c43; color: #fff; }
.med-tab-obra thead th.med-th-siago { background: #5a6472; color: #fff; }
.med-dialog-v2 .planning-obra-services-wrap { max-height: min(46vh, 520px); }
.med-tab-obra td.med-medida { background: #f2f9f4; }
.med-tab-obra td.med-ref { background: #f5f8fb; }
.med-tab-obra td.med-siago { color: #3d4754; }
.med-badge-np { background: #fff3e0; color: #9a4b00; }
.med-tab-extra tr.med-adicional td { background: #fffbea; font-style: italic; }
/* v0374 · Colar do SGM (popup Realizar Medição) */
.med-btn-colar.on { background: #e6f2f2; border-color: #0e5c5b; color: #0e5c5b; }
.med-colar { border: 1px solid #b9d9d8; background: #f3f9f9; border-radius: 12px; padding: 12px 14px; margin: 0 0 12px; display: flex; flex-direction: column; gap: 8px; }
.med-colar-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.med-colar-head strong { font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: #0e5c5b; }
.med-colar-texto { width: 100%; box-sizing: border-box; font: 12px/1.4 ui-monospace, Consolas, monospace; padding: 8px 10px; border: 1px solid #c9d4d4; border-radius: 8px; background: #fff; resize: vertical; white-space: pre; overflow: auto; }
.med-colar-texto:focus { outline: 2px solid #0e5c5b; outline-offset: 1px; }
.med-colar-resumo { font-size: 12px; color: #40505a; }
.med-colar-resumo .ok { color: #1c7c43; } .med-colar-resumo .warn { color: #6b5312; } .med-colar-resumo .red, .med-colar-resumo.red { color: var(--red); }
.med-colar-wrap { overflow: auto; max-height: 360px; border: 1px solid #d5dfe0; border-radius: 8px; background: #fff; }
.med-colar-tab { font-size: 12px; min-width: 100%; border-collapse: collapse; }
.med-colar-tab thead th { position: sticky; top: 0; z-index: 1; }
.med-colar-tab th.med-colar-sgm, .med-colar-tab td.med-colar-sgm { background: #fafcf0; border-right: 1px solid #e6e9d8; white-space: nowrap; font-family: Calibri, "Segoe UI", Arial, sans-serif; font-weight: 500; color: #222; }
.med-colar-tab th.med-colar-sgm { background: #e9edd3; color: #3b4a1c; font-weight: 800; }
.med-colar-tab td.med-colar-sgm.med-colar-desc { white-space: normal; min-width: 260px; }
.med-colar-tab .med-colar-n { color: #8a949c; text-align: center; width: 28px; }
.med-colar-tab .med-colar-sep { width: 6px; padding: 0; background: #e6f2f2; border: 0; }
.med-colar-tab th, .med-colar-tab td { padding: 4px 8px; vertical-align: middle; }
.med-colar-tab .med-colar-desc { white-space: normal; max-width: 320px; }
.med-colar-tab tr.med-colar-nao td { background: #fdf3f3; }
.med-colar-tab tr.med-colar-descricao td { background: #fffbea; }
.med-colar-acoes { display: flex; gap: 8px; justify-content: flex-end; }
/* v0377: grade vazia já com as colunas (foco + Ctrl+V) */
.med-colar-vazia { cursor: text; }
.med-colar-vazia:focus { outline: 2px solid #0e5c5b; outline-offset: -2px; }
.med-colar-vazia tbody td { height: 30px; }
.med-colar-vazia .med-colar-dica { color: #7a8794; font-style: italic; font-weight: 500; white-space: nowrap; }
.med-colar-vazia:focus .med-colar-dica { color: #0e5c5b; }
.med-sgm-tag { display: block; font-size: 9px; font-weight: 700; color: #0e5c5b; letter-spacing: .03em; margin-top: 2px; white-space: nowrap; }
.med-sgm-tag.warn { color: #6b5312; } .med-sgm-tag.red { color: var(--red); }
.pill-sgm { display: inline-block; background: #e6f2f2; color: #075e62; border-radius: 999px; padding: 1px 8px; font-size: 10.5px; font-weight: 700; font-style: normal; margin-left: 6px; }
.med-stats .planning-stat.med-stat-ok b { color: #1c7c43; }
.med-stats .planning-stat .ger-nota { display: block; margin-top: 2px; }
.med-dialog-v2 .med-obs { margin-top: 12px; }
.med-dialog-v2 .med-inp-cod { width: 90px; text-align: center; }

/* ===== v0313 — Previsão de faturamento: grade na largura da tela (opção A) ==========
   Carlos: "sem barra de rolagem na tela principal, colunas das bases na mesma dimensão
   e sem rolagem horizontal". Tipo 9,5 % · Descrição 21 % · 8 bases + TOTAL com a MESMA
   largura (table-layout: fixed); campos e valores automáticos ocupam a célula inteira;
   números nunca quebram; cabeçalho e descrições quebram linha quando preciso. */
.ger-prev-wrap { overflow: visible; }
.ger-prev { table-layout: fixed; width: 100%; }
.ger-prev th:first-child, .ger-prev td.ger-grp { width: 9.5%; }
.ger-prev th.ger-desc-th { width: 21%; }
.ger-prev td.ger-desc { min-width: 0; overflow-wrap: anywhere; padding-left: 8px; }
.ger-prev td.ger-grp { overflow-wrap: anywhere; }
.ger-prev thead th, .ger-prev thead th.n { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; padding: 6px 2px; line-height: 1.2; vertical-align: middle; font-size: 9px; letter-spacing: 0; }
.ger-prev td { padding: 5px 4px; }
.ger-prev .ger-cel-auto { min-width: 0; width: 100%; box-sizing: border-box; white-space: nowrap; }
.ger-prev .ger-cel-auto small { white-space: normal; }
.ger-prev input.ger-cel-man { width: 100%; box-sizing: border-box; }
.ger-prev td.n { white-space: nowrap; }
.ger-prev tr.ger-subtotal td:first-child, .ger-prev tr.ger-total-bloco td:first-child, .ger-prev tr.ger-total td:first-child { white-space: normal; }

/* ===== v0314 — a grade nunca sobrepoe a tabela de metas ==============================
   Carlos (print com o menu recolhido): "nao sobrepor texto". Com a v0313 a moldura da
   grade deixou de rolar por dentro (overflow: visible), mas regras antigas ainda davam
   ALTURA MAXIMA a ela (.hk-table-wrap, .ger-wrap e a do menu recolhido, dentro de media
   query) — o que passava da altura vazava e caia por cima das metas. Sem altura maxima,
   a pagina inteira rola e nada se sobrepoe. */
.hk-table-wrap.ger-prev-wrap, .hk-table-wrap.ger-metas { max-height: none !important; min-height: 0 !important; overflow: visible; }

/* v0318 — OS digitada à mão que o SGM substituiu (só continua porque já tem medição gravada) */
.est-tipo.med-os-trocada { background: #fff8e8; color: #6b5312; border-color: #f0e0bd; }

/* ===== v0319 — Medição: uma linha por obra/NR-AC + ficha em tela inteira ==================== */
.med-tabela-v2 { min-width: 0; }
.med-tabela-v2 th { text-align: left !important; background: #39424e; color: #fff; padding: 9px 8px; font-size: 9.5px; letter-spacing: .04em; }
.med-tabela-v2 th.n { text-align: right !important; }
.med-tabela-v2 td { text-align: left; padding: 8px 8px; vertical-align: middle; }
.med-tabela-v2 td.n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.med-tabela-v2 td.c, .med-tabela-v2 th.c { text-align: center !important; }
/* v0369: .med-tabela-v2 td:nth-child(5) deixou de ser forçada à esquerda — Etapa atual · pendência centralizada */
.med-tabela-v2 tr.med-linha { cursor: pointer; transition: background .12s; }
.med-tabela-v2 tr.med-linha:hover td { background: #f2f8f6; }
.med-tabela-v2 tr.med-linha td { font-weight: 500; }
.med-tabela-v2 .med-obra { font-weight: 800; color: #1f2733; font-size: 12px; }
.med-tabela-v2 .med-sub, .med-ficha-tab .med-sub { display: block; font-size: 9.5px; color: #8a93a0; font-weight: 400; margin-top: 2px; }
.med-tabela-v2 .med-ir { color: #8a93a0; font-size: 15px; font-weight: 700; }
/* v0374: ficha abre só pelo ícone; clique na linha = selecionar (clique de novo = tirar) */
.med-tabela-v2 td.med-ir, .med-tabela-v2 th.med-ir { width: 48px; min-width: 48px; padding: 6px 8px !important; text-align: center !important; vertical-align: middle; }
.med-tabela-v2 .med-abrir-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin: 0 auto; border-radius: 8px; border: 1px solid #c9d9d8; background: #f3f9f9; color: #0e5c5b; cursor: pointer; transition: background .12s, border-color .12s; vertical-align: middle; }
.med-tabela-v2 .med-abrir-btn svg { width: 16px; height: 16px; }
.med-tabela-v2 .med-abrir-btn:hover { background: #e6f2f2; border-color: #0e5c5b; }
.med-tabela-v2 tr.med-linha.sel td { background: #e3f0ef !important; box-shadow: inset 0 0 0 1px #9ccfcb; }
.med-tabela-v2 tr.med-linha.sel td:first-child { box-shadow: inset 4px 0 0 #0e5c5b, inset 0 0 0 1px #9ccfcb; }
.med-tabela-v2 .med-os { display: inline-block; font-weight: 700; font-size: 10.5px; color: #1f2733; background: #eef1f4; border-radius: 6px; padding: 1px 6px; margin: 1px 2px 1px 0; white-space: nowrap; /* v0369 (Carlos): o número da OS SGM não quebra em duas linhas */ }
.med-tabela-v2 .med-os.manual { background: #fff8e8; color: #6b5312; }
.med-tabela-v2 tr.ger-total td { text-align: right; }
.med-tabela-v2 tr.ger-total td:first-child { text-align: left; }
/* ficha */
.med-ficha-topo { margin: 0 0 10px; }
.med-ficha { background: #fff; border: 1px solid #e6e9ee; border-radius: 12px; overflow: hidden; }
.med-ficha-cab { background: #39424e; color: #fff; padding: 16px 20px; display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.med-ficha-cab small { display: block; font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; opacity: .8; }
.med-ficha-cab h3 { margin: 2px 0 6px; font-size: 20px; font-weight: 800; color: #fff; }
.med-ficha-chips .med-chip { background: rgba(255,255,255,.14); color: #fff; }
.med-ficha-chips .est-tipo { background: rgba(255,255,255,.14); color: #fff; }
.med-ficha-cab-acoes { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.med-ficha-cab-acoes .ger-tab { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.25); }
.med-ficha-cab-acoes .ger-tab.on { background: var(--marca); border-color: var(--marca); }
/* v0375: substituir / incluir NR-AC no cabeçalho da ficha */
.med-nr-troca { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25); border-radius: 10px; padding: 4px 6px 4px 10px; position: relative; }
.med-nr-troca small { display: inline; font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; opacity: .85; white-space: nowrap; }
.med-nr-troca input.ger-cel-man { width: 128px; height: 28px; border-radius: 7px; border: 1px solid rgba(255,255,255,.35); background: #fff; color: #1f2733; padding: 0 8px; font-weight: 700; font-size: 12px; }
.med-nr-troca input.ger-cel-man.invalido { border-color: var(--red); box-shadow: 0 0 0 2px rgba(200,40,40,.25); }
.med-nr-troca .ger-tab { height: 28px; padding: 0 10px; }
.med-nr-troca .med-os-nrac-erro { position: absolute; left: 0; top: calc(100% + 4px); background: #fdecec; color: var(--red); font-size: 10.5px; font-weight: 700; padding: 3px 8px; border-radius: 6px; white-space: nowrap; z-index: 2; }
.med-ficha-cab h3 .med-nr-sub { font-size: 11px; vertical-align: middle; margin-left: 8px; background: rgba(255,255,255,.14); color: #fff; font-weight: 700; }
.med-ficha-cab .med-os-nrac-nota { color: rgba(255,255,255,.85); margin: 0; }
.med-ficha-cab .med-os-nrac-nota b { color: #fff; }
.med-ficha-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); border-bottom: 1px solid #eef1f4; }
.med-ficha-kpi { padding: 12px 16px; border-right: 1px solid #eef1f4; }
.med-ficha-kpi:last-child { border-right: 0; }
.med-ficha-kpi small { display: block; font-size: 9px; letter-spacing: .05em; text-transform: uppercase; color: #8a93a0; }
.med-ficha-kpi b { display: block; font-size: 15px; color: #1f2733; margin-top: 2px; }
.med-ficha-kpi.ok b { color: #1c7c43; }
.med-ficha-kpi em { display: block; font-style: normal; font-size: 9.5px; color: #8a93a0; margin-top: 2px; }
.med-ficha-etapas { list-style: none; margin: 0; padding: 12px 16px; display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid #eef1f4; }
.med-ficha-etapas li { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 700; color: #8a93a0; padding: 4px 10px; border-radius: 999px; background: #f4f6f8; }
.med-ficha-etapas li i { width: 9px; height: 9px; border-radius: 50%; border: 2px solid #c9d1d9; background: #fff; display: inline-block; }
.med-ficha-etapas li.ok { color: #1f2733; }
.med-ficha-etapas li.ok i { background: var(--marca); border-color: var(--marca); }
.med-ficha-etapas li.atual { background: #fff3c4; color: #6b5312; }
.med-ficha-etapas li.atual i { border-color: #e0a300; background: #fff3c4; }
.med-ficha-etapas li.siago i { border-radius: 2px; }
.med-ficha-h4 { margin: 14px 16px 6px; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: #4b5563; }
.med-ficha .ger-nota { margin: 0 16px 8px; }
.med-ficha-wrap { margin: 0 16px 14px; max-height: none !important; min-height: 0 !important; overflow: visible; }
.med-ficha-tab { table-layout: fixed; width: 100%; }
.med-ficha-tab th { text-align: left !important; }
.med-ficha-tab th.n, .med-ficha-tab td.n { text-align: right !important; white-space: nowrap; }
.med-ficha-tab td { text-align: left; vertical-align: middle; }
.med-ficha-tab td.med-acoes { text-align: right; }
.med-ficha-valor { margin: 0 16px 14px; max-width: 320px; }
.med-ficha-valor input { width: 100%; box-sizing: border-box; font-size: 13px; padding: 6px 10px; text-align: right; }
/* v0369: NR/AC opcional na ficha da OS avulsa — só no padrão do estado, com erro embaixo */
.med-os-nrac input { text-align: left; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.med-os-nrac input.invalido { border-color: #c0392b; box-shadow: 0 0 0 2px rgba(192, 57, 43, .18); }
.med-os-nrac .hint { display: block; font-size: 11px; color: #667; margin-top: 4px; line-height: 1.35; }
.med-os-nrac-erro { display: block; margin-top: 5px; font-size: 12px; font-weight: 700; color: #c0392b; }
.med-os-nrac-nota { margin: 0 16px 14px; }

/* ===== v0320 — popup de medição: cards no topo, nada oculto, tela limpa ============= */
.med-dialog-v3 .med-wrap-livre { max-height: none !important; overflow: visible !important; }
.med-dialog-v3 .planning-dialog-body { overflow: auto; max-height: calc(100vh - 170px); }
.med-dialog-v3 .med-stats-topo { margin: 10px 0 14px; }
.med-dialog-v3 .med-toolbar { margin-top: 12px; }
.med-dialog-v3 .med-inp-cod { width: 100%; min-width: 150px; text-align: left; }
.med-dialog-v3 .med-tab-extra .planning-col-code { width: 16%; }
.med-dialog-v3 .planning-medicao-table td, .med-dialog-v3 .planning-medicao-table th { white-space: normal; }
.med-lista-serv { z-index: 2100; }

/* v0322 · ficha da Medição: cabeçalhos das tabelas quebram linha (nada de texto cortado com "…") */
.med-ficha-tab th { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; line-height: 1.2; vertical-align: bottom; }

/* v0323 · esteira: rótulo da etapa quebra em 2 linhas (nada cortado) */
.est-etapa.stp-e small { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.25; min-height: 24px; }

/* v0327 · botão Atualizar avisando que há consultas novas (âmbar, sem vermelho) */
.ghost-button.ger-btn-novas { background: #fff3d6; border-color: #e5c777; color: #6b5312; font-weight: 700; }
.ghost-button.ger-btn-novas:hover { background: #ffe9b8; }

/* v0329 · Medição: filtros de Estado/Base com seleção múltipla, chips do filtro e "Limpar filtros" */
.gp-filtros .med-multi { position: relative; }
.gp-filtros .med-multi-btn { border: 1px solid #d5dae0; border-radius: 10px; padding: 8px 12px; font: inherit; font-size: 12px; background: #fff; min-width: 190px; color: #1f2733; text-align: left; display: flex; justify-content: space-between; align-items: center; gap: 8px; cursor: pointer; text-transform: none; letter-spacing: 0; }
.gp-filtros .med-multi-btn b { font-weight: 700; }
.gp-filtros .med-multi-btn i { font-style: normal; color: #8a93a0; font-size: 10px; }
.gp-filtros .med-multi-btn.on { border-color: var(--marca, #0e7c7b); box-shadow: 0 0 0 2px #e6f2f2; }
.gp-filtros .med-multi-pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; background: #fff; border: 1px solid #d5dae0; border-radius: 12px; box-shadow: 0 10px 30px rgba(31,39,51,.14); min-width: 260px; padding: 8px; text-transform: none; letter-spacing: 0; font-weight: 500; }
.gp-filtros .med-multi-acoes { display: flex; gap: 6px; align-items: center; padding: 2px 4px 8px; border-bottom: 1px solid #eef1f4; margin-bottom: 6px; }
.gp-filtros .med-multi-acoes button { border: 1px solid #d5dae0; background: #fff; border-radius: 8px; padding: 4px 10px; font: inherit; font-size: 11px; font-weight: 700; color: #1f2733; cursor: pointer; }
.gp-filtros .med-multi-acoes button.on { background: var(--marca, #0e7c7b); color: #fff; border-color: var(--marca, #0e7c7b); }
.gp-filtros .med-multi-acoes .ger-nota { margin-left: auto; }
.gp-filtros .med-multi-grupo { font-size: 9.5px; font-weight: 800; letter-spacing: .06em; color: #8a93a0; padding: 6px 6px 2px; text-transform: uppercase; }
.gp-filtros .med-multi-pop label.med-multi-item { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 8px; font-size: 12px; font-weight: 500; color: #1f2733; cursor: pointer; text-transform: none; letter-spacing: 0; }
.gp-filtros .med-multi-pop label.med-multi-item:hover { background: #f2f8f6; }
.gp-filtros .med-multi-pop input[type="checkbox"] { accent-color: var(--marca, #0e7c7b); width: 15px; height: 15px; margin: 0; }
.med-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: -6px 0 12px; }
.med-chip-f { display: inline-flex; align-items: center; gap: 6px; background: #e6f2f2; color: #0e5c5b; border-radius: 999px; padding: 3px 10px; font-size: 11px; font-weight: 700; }
.med-chip-f button { border: 0; background: transparent; color: inherit; font-weight: 800; cursor: pointer; padding: 0 2px; font: inherit; }
.ger-titulos h2 small.ger-nota { font-size: 11px; font-weight: 500; }

/* v0330 · popup Associar OS (só manual + o que o SGM trouxe) */
.med-assoc-v2 .planning-dialog-head { background: linear-gradient(135deg, #1f2733, #39424e); color: #fff; padding: 16px 20px; display: flex; justify-content: space-between; align-items: flex-start; }
.med-assoc-v2 .med-head-txt small { display: block; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; opacity: .75; margin-bottom: 4px; }
.med-assoc-v2 .med-head-txt strong { font-size: 18px; font-weight: 800; }
.med-assoc-v2 .med-chips-h { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.med-assoc-v2 .med-chips-h span { background: rgba(255,255,255,.12); color: #fff; border-radius: 999px; padding: 2px 10px; font-size: 10.5px; font-weight: 700; }
.med-assoc-v2 .planning-dialog-x { color: #fff; background: rgba(255,255,255,.12); border-radius: 8px; border: 0; width: 32px; height: 32px; font-size: 20px; }
.med-assoc-v2 .planning-dialog-body { padding: 18px 20px; }
.med-assoc-v2 .med-assoc-add { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; background: #f6f8f9; border: 1px solid #e3e6ea; border-radius: 12px; padding: 14px 16px; }
.med-assoc-v2 .med-assoc-add label { display: grid; gap: 6px; font-size: 9.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #5a6472; }
.med-assoc-v2 .med-assoc-add input { border: 1px solid #cfd5dc; border-radius: 10px; padding: 12px 14px; font: inherit; font-size: 15px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; width: 100%; box-sizing: border-box; }
.med-assoc-v2 .med-assoc-add .hint { grid-column: 1 / -1; font-size: 10.5px; color: #8a93a0; font-weight: 500; line-height: 1.4; }
.med-assoc-v2 .med-assoc-add .primary-button { padding: 11px 18px; font-weight: 700; white-space: nowrap; }
.med-assoc-v2 h4 { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: #5a6472; margin: 18px 0 8px; }
.med-assoc-v2 .med-os-list { display: grid; gap: 8px; }
.med-assoc-v2 .med-os-card { display: grid; grid-template-columns: auto 1fr auto auto; gap: 14px; align-items: center; border: 1px solid #e3e6ea; border-radius: 12px; padding: 10px 14px; background: #fff; }
.med-assoc-v2 .med-os-card.sgm { border-left: 4px solid var(--marca, #0e7c7b); }
.med-assoc-v2 .med-os-card.manual { border-left: 4px solid #e5c777; }
.med-assoc-v2 .med-os-num { font-weight: 800; font-size: 14px; color: #1f2733; font-variant-numeric: tabular-nums; white-space: nowrap; }
.med-assoc-v2 .med-os-desc { font-size: 12px; color: #1f2733; min-width: 0; }
.med-assoc-v2 .med-os-desc small { display: block; color: #8a93a0; font-size: 10.5px; margin-top: 2px; }
.med-assoc-v2 .med-os-tag { font-size: 9.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.med-assoc-v2 .med-os-tag.sgm { background: #e6f2f2; color: #0e5c5b; }
.med-assoc-v2 .med-os-tag.manual { background: #fff3d6; color: #6b5312; }
.med-assoc-v2 .med-os-x { border: 1px solid #d5dae0; background: #fff; border-radius: 8px; width: 30px; height: 30px; font-weight: 800; color: #5a6472; cursor: pointer; font: inherit; }
.med-assoc-v2 .med-os-x:hover { background: #fff3d6; border-color: #e5c777; color: #6b5312; }
.med-assoc-v2 .med-os-lock { color: #8a93a0; font-size: 12px; width: 30px; text-align: center; }
.med-assoc-v2 .med-vazio { border: 1px dashed #cfd5dc; border-radius: 12px; padding: 16px; text-align: center; color: #8a93a0; font-size: 12px; }
.med-assoc-v2 .planning-dialog-actions { padding: 14px 20px; border-top: 1px solid #eef1f4; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.med-assoc-v2 .planning-dialog-actions-right { display: flex; gap: 8px; }
@media (max-width: 640px) { .med-assoc-v2 .med-os-card { grid-template-columns: 1fr auto; } .med-assoc-v2 .med-os-desc { grid-column: 1 / -1; } }

/* v0331: Garantia/Complementos e STC abatidos pela C-5-4 do contrato — explicação da conta no lançamento */
.ger-abat { margin: 6px 0 10px; padding: 10px 12px; border: 1px solid #d9e2ec; border-left: 4px solid #9db1c7; border-radius: 8px; background: #f6f9fc; font-size: 13px; line-height: 1.45; color: #1f2d3d; }
.ger-abat.on { border-left-color: #1c7c43; background: #eef8f1; }
.ger-abat .med-sub { display: block; margin-top: 4px; color: #5a6b7c; font-size: 12px; }

/* v0332: lista SIAGO C&M — por que a obra caiu na base */
.gp-chip.ger-por-os { background: #eef2fb; color: #2b4a8a; }
.gp-chip.ger-por-fraco { background: #fff8e8; color: #6b5312; }
.ger-aviso-mun, .ger-aviso-outro { padding: 8px 12px; border-radius: 8px; background: #fff8e8; color: #6b5312; border: 1px solid #f1dfae; }

/* v0334: Garantia/Complementos — marcação manual "já na SIAGO C-5-4" */
.ger-siago-chk { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: #1c7c43; cursor: pointer; white-space: nowrap; }
.ger-siago-chk input { width: 16px; height: 16px; accent-color: #1c7c43; margin: 0; }
.ger-siago-chk.off { color: #8a93a0; font-weight: 500; }
tr.ger-na-siago td { background: #f3f7f4; }
.ger-lista td .ger-siago-chk + .med-sub { display: block; margin-top: 2px; font-size: 10.5px; color: #8a93a0; white-space: nowrap; }

/* v0335: botão "Reler tudo" (ao lado do Atualizar) */
.ghost-button.ger-btn-reler { font-size: 11px; opacity: .85; }

/* v0337: escolha suspensa da Garantia (situação na Energisa) e "medição validada" no STC/Corte/Leitura */
select.ger-sel { font: inherit; font-size: 11.5px; padding: 5px 8px; border: 1px solid #cfd6de; border-radius: 8px; background: #fff; color: #1f2d3d; max-width: 100%; }
select.ger-sel.c54 { border-color: #1c7c43; color: #1c7c43; font-weight: 700; background: #eef8f1; }
select.ger-sel.outro { border-color: #2b4a8a; color: #2b4a8a; font-weight: 700; background: #eef2fb; }
.ger-lista td select.ger-sel + .med-sub { display: block; margin-top: 2px; font-size: 10.5px; color: #8a93a0; white-space: nowrap; }
.ger-siago-chk.ger-validada-chk { color: #2b4a8a; }
.ger-siago-chk.ger-validada-chk input { accent-color: #2b4a8a; }
.ger-siago-chk.ger-validada-chk.off { color: #8a93a0; }
tr.ger-validada td { background: #eef2fb; }
/* v0337: cabeçalho fixo da grade da Previsão (gruda abaixo da barra do app ao rolar) */
.ger-prev thead th { position: sticky; top: var(--ger-topo, 0px); z-index: 3; }

/* ---- v0345 · Programação de obras: filtros menores, legenda fora e a grade no maior tamanho
   possível (pedido do Carlos, 26/09). A legenda de baixo virou a dica (title) do cabeçalho
   "Equipe"; o resumo do escopo e o total subiram para a linha dos filtros; a data e o dia da
   semana passaram a dividir a mesma célula do cabeçalho da grade (o render mudou).
   Na tela de 1920×1080: a grade saiu de 820px (15,3 equipes) para 937px (18,5 equipes). */
.works-planning-view:is(.planning-tool-planning) .inventory-dashboard-panel.planning-panel {
  padding: 8px 10px;
  gap: 6px;
}

/* a data e o dia da semana na mesma célula */
.planning-grid thead th .planning-day-name {
  display: block;
  font-size: 0.62rem;
  font-weight: 800;
  opacity: 0.85;
}

/* resumo do escopo + total na linha dos filtros */
.planning-resumo-inline {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.planning-resumo-inline b {
  font-size: 0.95rem;
  font-weight: 900;
  color: var(--ink);
}

.planning-resumo-inline small {
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--muted);
}

@media (min-width: 1100px) {
  /* ---- v0345/v0346: filtros numa faixa fina (o rotulo fica AO LADO do campo) ----
     v0346: o rotulo nunca encolhe (o "De" aparecia cortado como "E" quando o resumo crescia),
     a fonte voltou a um tamanho confortavel e cada faixa de largura tem a largura de campo
     que mantem os sete blocos numa linha so — barra de ~34px contra 65px do original. */
  .works-planning-view:is(.planning-tool-planning) .planning-filter-bar.tela-filtros {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    padding-top: 0;
  }

  .works-planning-view:is(.planning-tool-planning) .planning-filter-bar > label,
  .works-planning-view:is(.planning-tool-planning) .planning-filter-bar > .stock-menu {
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex: 0 1 auto;
  }

  /* as datas tem largura propria (nao disputam espaco com os seletores) */
  .works-planning-view:is(.planning-tool-planning) .planning-filter-bar > label.stock-filter-date {
    flex: 0 0 auto;
  }

  /* o rotulo NUNCA encolhe */
  .works-planning-view:is(.planning-tool-planning) .planning-filter-bar > label > span,
  .works-planning-view:is(.planning-tool-planning) .planning-filter-bar .stock-menu-label {
    flex: 0 0 auto;
    font-size: 0.7rem;
    letter-spacing: 0;
    white-space: nowrap;
    overflow: visible;
  }

  .works-planning-view:is(.planning-tool-planning) .planning-filter-bar select,
  .works-planning-view:is(.planning-tool-planning) .planning-filter-bar input,
  .works-planning-view:is(.planning-tool-planning) .planning-filter-bar .stock-menu-button {
    flex: 0 1 auto;
    width: 175px;
    min-height: 34px;
    padding: 5px 10px;
    font-size: 0.84rem;
    border-radius: 7px;
  }

  .works-planning-view:is(.planning-tool-planning) .planning-filter-bar select,
  .works-planning-view:is(.planning-tool-planning) .planning-filter-bar .stock-menu-button {
    min-width: 142px;
  }

  /* as datas cabem em ~130px */
  .works-planning-view:is(.planning-tool-planning) .planning-filter-bar input[type="date"] {
    width: 132px;
    min-width: 118px;
  }

  .works-planning-view:is(.planning-tool-planning) .planning-filter-acoes {
    flex: 0 0 auto;
    gap: 6px;
  }

  .works-planning-view:is(.planning-tool-planning) .planning-filter-acoes .ghost-button {
    min-height: 34px;
    padding: 0 12px;
    font-size: 0.82rem;
  }

  .works-planning-view:is(.planning-tool-planning) .planning-filter-acoes .ghost-button svg {
    width: 14px;
    height: 14px;
  }

  /* o resumo encosta a direita, antes dos botoes */
  .works-planning-view:is(.planning-tool-planning) .planning-resumo-inline {
    flex: 0 0 auto;
    margin-left: auto;
    white-space: nowrap;
    max-width: 30vw;
    overflow: hidden;
  }

  /* ---- larguras de tela: a barra continua numa linha so ---- */
  /* o resumo fica so com o valor (a legenda completa fica na dica do mouse) */
  @media (max-width: 1800px) {
    .works-planning-view:is(.planning-tool-planning) .planning-resumo-inline small {
      display: none;
    }
  }

  @media (max-width: 1560px) {
    .works-planning-view:is(.planning-tool-planning) .planning-filter-bar select,
    .works-planning-view:is(.planning-tool-planning) .planning-filter-bar .stock-menu-button {
      width: 152px;
    }

    /* "Tela cheia" fica so com o icone (o texto continua na dica do mouse) */
    .works-planning-view:is(.planning-tool-planning) .planning-filter-acoes [data-planning-fullscreen] span {
      display: none;
    }
  }

  /* notebook 1440/1366: campos mais curtos e espacos mais apertados */
  @media (max-width: 1460px) {
    .works-planning-view:is(.planning-tool-planning) .planning-filter-bar.tela-filtros {
      gap: 5px 8px;
    }

    .works-planning-view:is(.planning-tool-planning) .planning-filter-bar select,
    .works-planning-view:is(.planning-tool-planning) .planning-filter-bar .stock-menu-button {
      width: 138px;
      min-width: 118px;
    }

    .works-planning-view:is(.planning-tool-planning) .planning-filter-bar input[type="date"] {
      width: 130px;
    }

    .works-planning-view:is(.planning-tool-planning) .planning-filter-acoes .ghost-button {
      padding: 0 10px;
    }
  }

  /* a data nao encolhe mais (o dia/mes/ano precisa caber inteiro com o icone do calendario) e
     o Estado fica mais largo que Base/Equipe: o <select> corta seco, enquanto Base/Equipe
     terminam em reticencias e mostram tudo ao abrir */
  @media (max-width: 1400px) {
    .works-planning-view:is(.planning-tool-planning) .planning-filter-bar select {
      width: 164px;
      min-width: 142px;
    }

    .works-planning-view:is(.planning-tool-planning) .planning-filter-bar .stock-menu-button {
      width: 104px;
      min-width: 88px;
    }
  }

  /* ultimo aperto (1280 e abaixo): sem isso o resumo e os botoes caem para uma segunda linha */
  @media (max-width: 1330px) {
    .works-planning-view:is(.planning-tool-planning) .planning-filter-bar.tela-filtros {
      gap: 5px 6px;
    }

    .works-planning-view:is(.planning-tool-planning) .planning-filter-bar > label,
    .works-planning-view:is(.planning-tool-planning) .planning-filter-bar > .stock-menu {
      gap: 5px;
    }

    .works-planning-view:is(.planning-tool-planning) .planning-filter-bar select {
      width: 152px;
      min-width: 136px;
    }

    .works-planning-view:is(.planning-tool-planning) .planning-filter-bar .stock-menu-button {
      width: 88px;
      min-width: 76px;
    }

    .works-planning-view:is(.planning-tool-planning) .planning-filter-bar input[type="date"] {
      width: 128px;
      min-width: 124px;
      padding-left: 6px;
      padding-right: 4px;
    }

    .works-planning-view:is(.planning-tool-planning) .planning-filter-acoes .ghost-button {
      padding: 0 8px;
    }

    .works-planning-view:is(.planning-tool-planning) .planning-resumo-inline {
      margin-left: 0;
    }
  }
}

/* v0349: em tela cheia a grade vai ATE A BORDA de baixo. O desconto fixo
   (100vh - 150px) sobrava ~100px brancos embaixo do TOTAL GERAL desde que a
   barra de filtros ficou fina (v0346); agora quem manda e o proprio flex. */
#worksPlanningMount:fullscreen {
  padding: 8px 10px;
}

#worksPlanningMount:fullscreen .planning-grid-scroll {
  max-height: none;
  flex: 1 1 auto;
  min-height: 0;
}

#worksPlanningMount:fullscreen .planning-grid-block {
  min-height: 0;
}

/* ===== v0348: a grade da Programação de obras ocupa a altura que sobra =====
   Com poucas equipes a grade parava no meio da tela. Agora as linhas das
   equipes crescem até --planning-linha-h (calculado no app.js, teto de 200px)
   e o conteúdo da célula fica encostado no topo, para as obras empilharem. */
.planning-grid.planning-grid-estica .planning-team-row > .planning-cell {
  height: var(--planning-linha-h, 46px);
  vertical-align: top;
}

.planning-grid.planning-grid-estica .planning-team-row > .planning-team-col {
  height: var(--planning-linha-h, 46px);
}

/* ===== v0351: feedback com as três respostas do Executado, motivo do
   cancelamento, "Sem feedback" e observação livre ============================ */
.planning-feedback-ops {
  flex-wrap: wrap;
}

.planning-feedback-option.compacta.st-pendente.selected {
  border-color: #8b8a86;
  background: #f1f3f5;
  color: #5b6269;
}

/* a pergunta das três respostas e o motivo da improdutividade usam a mesma
   moldura dos passos do Substituído, para a cara do popup não mudar */
.planning-feedback-conclusao .planning-feedback-ops,
.planning-feedback-improd .planning-feedback-ops {
  margin-top: 6px;
}

.planning-feedback-conclusao .planning-feedback-option.compacta {
  flex: 1 1 150px;
  text-align: center;
  line-height: 1.25;
}

.planning-feedback-nota {
  margin: 8px 2px 0;
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  line-height: 1.35;
}

.planning-feedback-improd .planning-dialog-field {
  margin-top: 8px;
}

.planning-feedback-obs {
  margin-top: 10px;
}

.planning-feedback-obs textarea {
  width: 100%;
  resize: vertical;
  min-height: 46px;
  border: 1px solid #e0e5ea;
  border-radius: 9px;
  padding: 8px 10px;
  font: inherit;
  font-size: 12.5px;
  color: #39424e;
  background: #fff;
}

.planning-feedback-obs textarea:focus {
  outline: none;
  border-color: var(--marca-escura, #0f3d3e);
}

/* etiqueta da célula: a resposta aparece junto do "Executado" */
.planning-feedback-tag.st-executado.fb-finalizada {
  background: #dff3e9;
  color: #0c4f3c;
  border-color: #9dd9c2;
}

.planning-feedback-tag.st-executado.fb-parcial {
  background: #fff4df;
  color: #8a5600;
  border-color: #f0d9a8;
}

/* v0352: o Substituído passou a usar a mesma tela do lançamento — três tipos
   (obra, manutenção programada, emergencial) na mesma linha dentro do popup. */
.planning-feedback-steps .planning-tipo-switch.planning-tipo-tres {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 8px 0 2px;
}

.planning-feedback-steps .planning-tipo-switch.planning-tipo-tres .planning-tipo-card {
  padding: 8px 9px;
}

.planning-feedback-steps .planning-tipo-switch.planning-tipo-tres .planning-tipo-tx b {
  font-size: 11.5px;
}

.planning-feedback-steps .planning-tipo-switch.planning-tipo-tres .planning-tipo-tx small {
  font-size: 10px;
}

@media (max-width: 760px) {
  .planning-feedback-steps .planning-tipo-switch.planning-tipo-tres {
    grid-template-columns: 1fr;
  }
}

/* ===== v0354: TELA DIVIDIDA =================================================
   O shell do desktop (cabeçalho + menu lateral) passou a valer a partir de
   900px — antes era 1100px, e quem dividia a tela ao meio num monitor Full HD
   (≈950px) caía no layout antigo, com as abas no topo. Nessa faixa a lateral
   começa RECOLHIDA (só os ícones), para o conteúdo ficar com quase toda a
   largura; o botão de sanduíche abre a lateral inteira quando precisar. */
@media (min-width: 900px) and (max-width: 1099px) {
  .app-side {
    width: 54px;
  }

  body.app-side-aberta-estreita .app-side {
    width: 224px;
  }

  /* os rótulos só aparecem quando a pessoa abre a lateral de propósito */
  body:not(.app-side-aberta-estreita) .app-side-item > span,
  body:not(.app-side-aberta-estreita) .app-side-grupo,
  body:not(.app-side-aberta-estreita) .app-side-sub,
  body:not(.app-side-aberta-estreita) .app-side-seta {
    display: none;
  }

  body:not(.app-side-aberta-estreita) .app-side-item {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
  }

  /* o conteúdo acompanha a lateral estreita */
  .app-view {
    padding-left: 6px;
    padding-right: 6px;
  }
}

/* ===== v0354: PADRÃO DAS TABELAS do Gerencial e da Medição ==================
   Pedido do Carlos (02/10): cabeçalho centralizado · número centralizado ·
   texto curto centralizado · texto longo à esquerda · quebra sempre bem feita ·
   e um ponto de fonte a menos, para caber mais coluna sem apertar o texto.
   Texto longo é marcado no app com a classe "tl" (worksPlanningTextoLongo). */
.ger-tabela th, .ger-lista th, .ger-metas th, .ger-prev th,
.gp-tab th, .med-tabela th, .med-tabela-v2 th, .med-ficha-tab th,
.planning-medicao-table thead th {
  text-align: center !important;
  vertical-align: middle;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
  line-height: 1.2;
}

.ger-tabela td, .ger-lista td, .ger-metas td, .ger-prev td,
.gp-tab td, .med-tabela-v2 td, .med-ficha-tab td,
.planning-medicao-table td {
  text-align: center !important;
  vertical-align: middle;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: break-word;
  word-break: normal;
  line-height: 1.3;
}

/* números: centralizados e sem quebrar no meio do valor */
.ger-tabela td.n, .ger-lista td.n, .gp-tab td.n, .ger-prev td.n,
.med-tabela-v2 td.n, .med-ficha-tab td.n,
.planning-medicao-table td.numeric {
  text-align: center !important;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* texto longo: à esquerda, quebrando por palavra */
.ger-tabela td.tl, .ger-lista td.tl, .gp-tab td.tl, .ger-prev td.tl,
.med-tabela-v2 td.tl, .med-ficha-tab td.tl,
.ger-prev td.ger-desc,
.ger-prev tr.ger-subtotal td:first-child,
.ger-prev tr.ger-total td:first-child,
.ger-prev tr.ger-total-bloco td:first-child,
.planning-medicao-table td.planning-service-desc,
.planning-medicao-table td.planning-service-secao,
.med-tabela-v2 td:first-child {
  text-align: left !important;
}

/* fonte um ponto menor (pedido do Carlos) */
.ger-tabela, .ger-lista, .ger-metas, .ger-prev, .gp-tab,
.med-tabela-v2, .med-ficha-tab, .planning-medicao-table {
  font-size: 11.5px;
}

.ger-tabela th, .ger-lista th, .ger-metas th, .ger-prev th,
.gp-tab th, .med-tabela-v2 th, .med-ficha-tab th,
.planning-medicao-table thead th {
  font-size: 10.5px;
}

.med-tabela-v2 .med-sub, .ger-tabela .ger-nota, .gp-tab .gp-mudo {
  font-size: 10px;
}

/* v0355 — CABEÇALHO CENTRALIZADO DE VERDADE.
   O bloco do v0354 não vencia quatro regras antigas mais específicas (duas
   classes ou pseudo-classe, com !important): na lista da Medição o "OBRA SIAGO"
   e a "ETAPA ATUAL" continuavam à esquerda e os títulos dos valores à direita,
   e na ficha o título dos valores também. Aqui os seletores têm a MESMA
   especificidade das antigas e vêm depois — então valem. */
.med-tabela-v2 th,
.med-tabela-v2 th.n,
.med-tabela-v2 th.c,
.med-tabela-v2 th:first-child,
.med-tabela-v2 th:nth-child(5),
.med-tabela th,
.med-tabela th.n,
.med-tabela th:first-child,
.med-tabela th:nth-child(5),
.med-ficha-tab th,
.med-ficha-tab th.n,
.ger-tabela th.n,
.ger-lista th,
.ger-lista th.n,
.ger-lista th:first-child,
.ger-metas th,
.ger-metas th:first-child,
.ger-prev th,
.ger-prev th.n,
.ger-prev th.ger-desc-th,
.gp-tab th,
.gp-tab th.n,
.planning-medicao-table thead th {
  text-align: center !important;
}

/* =====================================================================================
 * v0357 · PLANEJAMENTO DE OBRAS · VALOR META PRODUÇÃO e VALOR PLANEJAMENTO
 * Duas colunas novas logo depois de Equipe, FIXAS na rolagem horizontal junto com ela
 * (como na planilha PLANEJAMENTO MS-MT.xlsx). Equipe = 210px → meta em left:210px e
 * planejamento em left:334px. Números centralizados e tabulares (padrão das tabelas).
 * ===================================================================================== */
.planning-grid .planning-meta-col,
.planning-grid .planning-plan-col {
  position: sticky;
  z-index: 1;
  box-sizing: border-box;
  padding: 8px 10px;
  background: #f1f5f9;
  color: #171a1d;
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
  font-variant-numeric: tabular-nums;
  border-right: 1px solid #c9d3df;
}

.planning-grid .planning-meta-col {
  left: 210px;
  width: 124px;
  min-width: 124px;
  max-width: 124px;
}

.planning-grid .planning-plan-col {
  left: 334px;
  width: 134px;
  min-width: 134px;
  max-width: 134px;
}

/* Mesma cor do resto do cabecalho da grade (tema VCR grafite + filete teal). */
.planning-grid thead th.planning-meta-col,
.planning-grid thead th.planning-plan-col {
  z-index: 5;
  background: var(--vcr-grafite);
  border-bottom: 2px solid var(--vcr-teal);
  border-right: 1px solid #55555a;
  padding: 4px 8px;
  line-height: 1.15;
  white-space: normal;
}

.planning-grid thead th.planning-meta-col small {
  display: block;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: normal;
  opacity: 0.85;
}

.planning-grid .planning-team-row:nth-child(even) .planning-meta-col,
.planning-grid .planning-team-row:nth-child(even) .planning-plan-col {
  background: #e8edf3;
}

.planning-grid .planning-team-row:hover .planning-meta-col,
.planning-grid .planning-team-row:hover .planning-plan-col {
  background: var(--marca-suave);
}

.planning-grid .planning-plan-col small {
  display: block;
  font-size: 0.66rem;
  font-weight: 800;
  opacity: 0.85;
}

.planning-grid .planning-plan-col.abaixo small {
  color: #9a6c00;
}

.planning-grid .planning-plan-col.acima small {
  color: #00765f;
}

.planning-grid .planning-plan-col.zerado {
  color: #8b8a86;
}

.planning-grid-scroll .planning-grid tfoot .planning-meta-col,
.planning-grid-scroll .planning-grid tfoot .planning-plan-col {
  z-index: 4;
  background: var(--vcr-grafite);
  color: #ffffff;
  font-weight: 900;
  border-top: 2px solid var(--vcr-teal);
  border-bottom: none;
}

.planning-grid tfoot .planning-plan-col small {
  color: #ffffff;
  opacity: 0.88;
}

/* Subtotais da base, dentro da faixa vermelha (acompanham a rolagem com o rótulo). */
.planning-grid .planning-base-faixa {
  display: inline-flex;
  gap: 14px;
  margin-left: 14px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: normal;
  opacity: 0.92;
}

/* v0358 · as duas colunas novas acompanham a altura da linha com o conteudo no MEIO
   (mesma regra da coluna Equipe quando a celula do dia cresce). */
.planning-grid .planning-meta-col,
.planning-grid .planning-plan-col {
  vertical-align: middle;
}

.planning-grid thead th.planning-meta-col,
.planning-grid thead th.planning-plan-col {
  vertical-align: middle;
}

/* v0360 · localidade da obra substituta (vem da consulta C-6-1-1, nao e mais digitada) */
.planning-feedback-step .planning-feedback-local {
  display: inline-block;
  margin-left: 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

/* =====================================================================================
 * v0361 · PROGRAMAÇÃO DE OBRAS · coluna Equipe mais estreita, centralizada e sem quebra
 * (Carlos, 03/10). O nome mais longo é COX_ECP_B1_01 (13 letras): 160px cabem com folga.
 * As duas colunas fixas ao lado andam junto: meta em left:160px, planejamento em left:284px.
 * ===================================================================================== */
.planning-grid .planning-team-col {
  width: 160px;
  min-width: 160px;
  max-width: 160px;
  padding: 8px 10px;
  text-align: center;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}

.planning-grid tbody .planning-team-col,
.planning-grid tfoot .planning-team-col {
  vertical-align: middle;
}

.planning-grid .planning-meta-col {
  left: 160px;
}

.planning-grid .planning-plan-col {
  left: 284px;
}

/* =====================================================================================
 * v0363 · CAIXAS DE MARCAR DENTRO DOS MENUS DAS BARRAS DE FILTRO
 * As regras gerais dos campos das barras (v0128: .tela-filtros input — fundo cinza, 40px;
 * v0345/v0346: .planning-filter-bar input — 175px de largura, 34px) pegavam tambem os
 * <input type=checkbox> dentro dos menus suspensos (Base/Equipe da Programacao, Estado/
 * Deposito/Tipo das Movimentacoes, Deposito/Tipo do Hancock). As caixinhas voltam ao
 * tamanho natural SO dentro dos menus; os campos da barra continuam iguais.
 * ===================================================================================== */
.tela-filtros input[type="checkbox"],
.tela-filtros input[type="radio"],
.hk-filter-bar input[type="checkbox"],
.hk-filter-bar input[type="radio"],
.works-planning-view:is(.planning-tool-planning) .planning-filter-bar input[type="checkbox"],
.works-planning-view:is(.planning-tool-planning) .planning-filter-bar input[type="radio"] {
  width: auto;
  min-width: 0;
  height: auto;
  min-height: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  flex: none;
}
.tela-filtros .stock-menu-item input[type="checkbox"],
.works-planning-view:is(.planning-tool-planning) .planning-filter-bar .stock-menu-item input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin-top: 2px;
}
.hk-filter-bar .hk-menu-box label input[type="checkbox"] {
  width: 15px;
  height: 15px;
}

/* =====================================================================================
 * v0364 · PADRÃO ZEUS DE FILTROS (computador, ≥900px) — aprovado pelo Carlos em 03/10/2026
 * Uma faixa fina, rótulo AO LADO do campo, campos de 34px com cantos de 7px, menus de
 * seleção múltipla iguais em todas as telas (Marcar todos · Limpar todos · Concluir) e as
 * ações sempre no fim da faixa, à direita (extras · Limpar · Pesquisar).
 * Telas: Programação (já no padrão desde a v0346), Medição, Gerencial (Plan×Meta e Metas),
 * Materiais (Dashboard, Justificativa, Movimentações, Hancock). No celular nada muda.
 * ===================================================================================== */
@media (min-width: 900px) {
  /* ---- a faixa ---- */
  .zeus-filtros.zeus-filtros {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    padding: 6px 0 8px;
    margin: 0 0 8px;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    z-index: 20;
  }
  .zeus-filtros > label,
  .zeus-filtros > .stock-menu,
  .zeus-filtros > .zeus-campo,
  .zeus-filtros > .med-multi-label,
  .zeus-filtros > details.hk-menu > summary {
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex: 0 1 auto;
    margin: 0;
  }
  .zeus-filtros > details.hk-menu { flex: 0 1 auto; min-width: 0; margin: 0; }
  .zeus-filtros > label > span,
  .zeus-filtros .stock-menu-label,
  .zeus-filtros > .zeus-campo > span,
  .zeus-filtros > .med-multi-label > span,
  .zeus-filtros > details.hk-menu > summary > span {
    flex: 0 0 auto;
    margin: 0;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
    color: var(--muted);
    white-space: nowrap;
  }
  /* ---- os campos ---- */
  .zeus-filtros select,
  .zeus-filtros input:where(:not([type="checkbox"]):not([type="radio"]):not([type="file"])),
  .zeus-filtros .stock-menu-button,
  .zeus-filtros .med-multi-btn,
  .zeus-filtros > details.hk-menu > summary > b {
    flex: 0 1 auto;
    width: 168px;
    min-width: 120px;
    height: 34px;
    min-height: 34px;
    padding: 5px 10px;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--ink);
    background: #f1f4f8;
    border: 1.5px solid transparent;
    border-radius: 7px;
    box-shadow: none;
    box-sizing: border-box;
    text-transform: none;
    letter-spacing: normal;
    transition: background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
  }
  .zeus-filtros select:hover,
  .zeus-filtros input:where(:not([type="checkbox"]):not([type="radio"]):not([type="file"])):hover,
  .zeus-filtros .stock-menu-button:hover,
  .zeus-filtros .med-multi-btn:hover,
  .zeus-filtros > details.hk-menu > summary:hover > b { background: #e9eef4; }
  .zeus-filtros select:focus,
  .zeus-filtros input:where(:not([type="checkbox"]):not([type="radio"]):not([type="file"])):focus,
  .zeus-filtros .stock-menu-button:focus-visible,
  .zeus-filtros .stock-menu.open .stock-menu-button,
  .zeus-filtros .med-multi-btn:focus-visible,
  .zeus-filtros .med-multi-btn.aberto,
  .zeus-filtros > details.hk-menu[open] > summary > b {
    outline: none;
    background: #fff;
    border-color: var(--marca);
    box-shadow: 0 0 0 3px rgba(15, 61, 62, 0.14);
  }
  .zeus-filtros input[type="date"] { width: 132px; min-width: 124px; }
  .zeus-filtros .stock-menu-button span,
  .zeus-filtros > details.hk-menu > summary > b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
  .zeus-filtros .stock-menu-button,
  .zeus-filtros .med-multi-btn,
  .zeus-filtros > details.hk-menu > summary > b { display: flex; align-items: center; justify-content: space-between; gap: 8px; text-align: left; cursor: pointer; }
  .zeus-filtros .stock-menu-button svg,
  .zeus-filtros .med-multi-btn i,
  .zeus-filtros > details.hk-menu > summary > b::after { flex: none; width: 14px; height: 14px; color: var(--muted); font-style: normal; font-size: 10px; }
  .zeus-filtros > details.hk-menu > summary > b::after { content: "▾"; width: auto; height: auto; }
  .zeus-filtros .med-multi-btn b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* busca por texto: ocupa o que sobrar */
  .zeus-filtros > .zeus-busca,
  .zeus-filtros > label.hk-search-row { flex: 1 1 200px; min-width: 230px; display: flex; flex-flow: row nowrap; align-items: center; gap: 6px; grid-column: auto; }
  .zeus-filtros > .zeus-busca input,
  .zeus-filtros > label.hk-search-row input { flex: 1 1 auto; width: 100%; min-width: 150px; border-radius: 7px; }
  /* alternadores (Tipo, Sim/Não) na mesma altura */
  .zeus-filtros .gp-toggle,
  .zeus-filtros .zeus-toggle {
    display: inline-flex;
    align-items: center;
    height: 34px;
    min-width: 0;
    width: auto;
    padding: 3px !important;
    gap: 2px;
    background: #f1f4f8;
    border: 0;
    border-radius: 7px;
    cursor: pointer;
  }
  .zeus-filtros .gp-toggle > span,
  .zeus-filtros .zeus-toggle > button {
    flex: 0 0 auto;
    height: 28px;
    padding: 0 12px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    font: inherit;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--muted);
    cursor: pointer;
    white-space: nowrap;
    line-height: 1;
  }
  .zeus-filtros .gp-toggle > span.on,
  .zeus-filtros .zeus-toggle > button.active { background: var(--marca); color: #fff; }
  /* ações: sempre no fim, à direita */
  .zeus-filtros .zeus-acoes {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    flex: 0 0 auto;
  }
  .zeus-filtros .zeus-acoes .ghost-button,
  .zeus-filtros .zeus-acoes .primary-button,
  .zeus-filtros .zeus-acoes .ger-tab {
    height: 34px;
    min-height: 34px;
    padding: 0 12px;
    font-size: 0.82rem;
    font-weight: 700;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    text-transform: none;
    letter-spacing: 0;
  }
  .zeus-filtros .zeus-acoes .ghost-button { border: 1px solid #d7dee8; background: #fff; color: var(--ink); }
  .zeus-filtros .zeus-acoes .ghost-button:hover { background: #f1f4f8; }
  .zeus-filtros .zeus-acoes .ghost-button[disabled] { opacity: 0.55; cursor: default; }
  .zeus-filtros .zeus-acoes svg { width: 14px; height: 14px; }
  .zeus-filtros .zeus-acoes label.gp-arquivo { margin: 0; }
  /* resumo (ex.: total da grade / "salva sozinho") encosta à direita, antes das ações */
  .zeus-filtros .zeus-resumo { margin-left: auto; white-space: nowrap; font-weight: 800; font-size: 0.9rem; }
  .zeus-filtros .ger-espaco { display: none; }
  .zeus-filtros .stock-dirty-hint { margin: 0; flex: 1 1 100%; order: 99; }

  /* ---- o menu de seleção múltipla (os TRÊS botões em todas as telas) ---- */
  .stock-menu-actions.zeus-menu-acoes,
  .med-multi-acoes.zeus-menu-acoes,
  .hk-menu-acoes.zeus-menu-acoes {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 6px;
    margin: 8px 0 0;
    padding: 10px 0 2px;
    border: 0;
    border-top: 1px solid #eef2f6;
    background: #fff;
    position: sticky;
    bottom: 0;
    top: auto;
  }
  .zeus-menu-acoes .ghost-button,
  .zeus-menu-acoes .primary-button,
  .zeus-menu-acoes button {
    flex: 0 0 auto;
    min-height: 30px;
    height: 30px;
    padding: 0 10px;
    font: inherit;
    font-size: 0.76rem;
    font-weight: 700;
    border-radius: 7px;
    cursor: pointer;
    text-transform: none;
    letter-spacing: 0;
  }
  .zeus-menu-acoes button:not(.primary-button) { border: 1px solid #d7dee8; background: #fff; color: var(--ink); }
  .zeus-menu-acoes button:not(.primary-button):hover { background: #f1f4f8; border-color: #c9d3df; }
  .zeus-menu-acoes .primary-button { margin-left: auto; border: 0; background: var(--ink, #171a1d); color: #fff; }
  .zeus-menu-acoes .ger-nota { margin-left: 6px; }

  /* Medição: o menu próprio ganha a cara do menu padrão */
  .zeus-filtros .med-multi { position: relative; }
  .zeus-filtros .med-multi-pop {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 60;
    min-width: 300px;
    max-height: 360px;
    overflow: auto;
    padding: 8px 8px 0;
    background: #fff;
    border: 1px solid #e3e8ef;
    border-radius: 12px;
    box-shadow: 0 14px 34px rgba(16, 42, 67, 0.16);
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500;
  }
  .zeus-filtros .med-multi-grupo { padding: 6px 10px 2px; font-size: 0.66rem; font-weight: 800; color: var(--muted); text-transform: uppercase; }
  .zeus-filtros .med-multi-item {
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #171a1d;
    cursor: pointer;
  }
  .zeus-filtros .med-multi-item + .med-multi-item { margin-top: 4px; }
  .zeus-filtros .med-multi-item:hover { background: #f6f8fb; }
  .zeus-filtros .med-multi-item:has(input:checked) { background: var(--marca-suave); border-color: var(--marca-borda); }
  .zeus-filtros .med-multi-item input,
  .zeus-filtros input[type="checkbox"],
  .zeus-filtros input[type="radio"] { width: 14px; height: 14px; min-height: 0; min-width: 0; padding: 0; margin: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; accent-color: #b3261e; }

  /* Hancock: o menu <details> ganha a cara do menu padrão */
  .zeus-filtros > details.hk-menu > summary { list-style: none; cursor: pointer; }
  .zeus-filtros > details.hk-menu > summary::-webkit-details-marker { display: none; }
  .zeus-filtros > details.hk-menu > .hk-menu-box {
    padding: 8px 8px 0;
    gap: 0;
    border: 1px solid #e3e8ef;
    border-radius: 12px;
    box-shadow: 0 14px 34px rgba(16, 42, 67, 0.16);
  }
  .zeus-filtros > details.hk-menu > .hk-menu-box > label {
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    margin: 0;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: normal;
    cursor: pointer;
  }
  .zeus-filtros > details.hk-menu > .hk-menu-box > label + label { margin-top: 4px; }
  .zeus-filtros > details.hk-menu > .hk-menu-box > label:hover { background: #f6f8fb; }
  .zeus-filtros > details.hk-menu > .hk-menu-box > label:has(input:checked) { background: var(--marca-suave); border-color: var(--marca-borda); }
  .zeus-filtros > details.hk-menu > .hk-menu-box > .hk-menu-acoes { order: 99; }
  .zeus-filtros > details.hk-menu > .hk-menu-box { display: flex; flex-direction: column; }
}

@media (min-width: 900px) {
  /* v0364: o item do menu da Medição com o mesmo peso/espaçamento dos outros menus */
  .zeus-filtros .med-multi-pop label.med-multi-item {
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #171a1d;
  }
}

/* =====================================================================================
 * v0368 · BARRAS DE ROLAGEM — UM PADRÃO SÓ NO ZEUS INTEIRO (Carlos: "deixar todas iguais,
 * mais grossas para ver melhor" → opção B: 16px grafite)
 * -------------------------------------------------------------------------------------
 * As barras saíam finas (~8px) porque o Chrome (121+) dá PRIORIDADE às propriedades padrão
 * scrollbar-width/scrollbar-color: o "scrollbar-width: thin" que havia em * fazia o navegador
 * IGNORAR todas as regras ::-webkit-scrollbar (12px, 15px...). Por isso:
 *  - Chrome/Edge/Safari: só ::-webkit-scrollbar — e NENHUM scrollbar-width/color no app;
 *  - Firefox (não tem ::-webkit-scrollbar): scrollbar-width/color só dentro do @supports.
 * As regras próprias (grade da Programação, justificativas, gráficos, Hancock) saíram:
 * toda barra do app é esta.
 * ===================================================================================== */
::-webkit-scrollbar {
  width: 16px;
  height: 16px;
}

::-webkit-scrollbar-track {
  background: #e6eaf0;
  border-radius: 999px;
}

::-webkit-scrollbar-thumb {
  background: #5f6a78;
  border: 3px solid #e6eaf0;
  border-radius: 999px;
  min-height: 40px;
  min-width: 40px;
}

::-webkit-scrollbar-thumb:hover,
::-webkit-scrollbar-thumb:active {
  background: #3a3a3c;
}

::-webkit-scrollbar-corner {
  background: #e6eaf0;
}

::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

@supports not selector(::-webkit-scrollbar) {
  * {
    scrollbar-width: auto;
    scrollbar-color: #5f6a78 #e6eaf0;
  }
}

/* v0370 · esteira emergencial com 7 etapas: ação embaixo do nome; chip de materiais (C-6-2-2) nas etapas 4/5 */
.est-etapa .stp-acao { display: block; font-weight: 600; font-size: 9.5px; letter-spacing: 0; text-transform: none; color: #6b7280; margin-top: 2px; line-height: 1.25; }
.med-chip-mat { display: inline-block; margin-top: 4px; }
.med-mat-tab tr.med-mat-obra td { background: #f4f6f9; }
.med-mat-tab tr.est-sub td { font-size: 11.5px; }

/* v0374 (Carlos: "no app não ter quebra de linha no meio da palavra") — cabeçalhos e células das
   tabelas quebram só entre palavras; palavra maior que a coluna alarga a coluna ("QUANTIDAD / E" nunca). */
.ger-tabela th, .ger-lista th, .ger-metas th, .ger-prev th, .gp-tab th, .med-tabela th, .med-tabela-v2 th, .med-ficha-tab th,
.planning-medicao-table thead th, .planning-services-table th, .planning-obra-services-table th, .dashboard-table th, .med-colar-tab th,
.ger-tabela td, .ger-lista td, .ger-metas td, .ger-prev td, .gp-tab td, .med-tabela td, .med-tabela-v2 td, .med-ficha-tab td,
.planning-medicao-table td, .planning-services-table td, .planning-obra-services-table td, .dashboard-table td, .med-colar-tab td,
.planning-stat small, .planning-stat b, .med-chip, .stp-acao, .est-etapa small {
  overflow-wrap: normal !important;
  word-break: keep-all !important;
  hyphens: none !important;
}
.planning-medicao-table .planning-col-qty { width: 96px; min-width: 96px; }

/* v0377 (Carlos: "colocar no cabeçalho bem organizado") — tabela SIAGO da ficha: cabeçalho e células na mesma
   coluna, tudo centralizado (o cabeçalho já era centralizado pela v0355, as células ficavam à esquerda/direita). */
.med-siago-tab th, .med-siago-tab th.n, .med-siago-tab td, .med-siago-tab td.n, .med-siago-tab td.tl { text-align: center !important; vertical-align: middle; }
.med-siago-tab td.tl { white-space: normal; }
.med-siago-tab td .med-chip, .med-siago-tab td .ger-nota { display: inline-block; }
/* ===== v0378 (Carlos: "muitas cores, deixar mais discreto e profissional") · esteira da Medição — Opção B:
   cabeçalho grafite mantido; linhas sem faixa colorida; tipo/OS em texto com contorno; chips em contorno neutro
   com um ponto de cor (verde ok · amarelo atenção · vermelho pendência); esteira teal com o ponto atual vazado. ===== */
body .med-tabela-v2 th { background: #39424e; color: #fff; font-size: 9.5px; letter-spacing: .06em; padding: 10px 8px; }
body .med-tabela tr.est-obra td, body .med-tabela tr.est-avulsa td { background: #fff; font-weight: 500; border-bottom: 1px solid #edf0f3; }
body .med-tabela tr.est-obra td:first-child, body .med-tabela tr.est-obra.est-man td:first-child, body .med-tabela tr.est-avulsa td:first-child { border-left: 0; }
body .med-tabela-v2 tr.med-linha:hover td { background: #f7f9fa; }
body .med-tabela-v2 tr.med-linha.sel td { background: #eef4f4 !important; box-shadow: inset 0 0 0 1px #c5d8d7; }
body .med-tabela-v2 tr.med-linha.sel td:first-child { box-shadow: inset 3px 0 0 #0e5c5b, inset 0 0 0 1px #c5d8d7; }
body .med-tabela-v2 .med-obra { font-weight: 700; color: #1f2733; }
body .med-tabela-v2 .med-sub { color: #7a8794; }
/* tipo e OS: texto discreto, sem pílula colorida */
body .med-tabela-v2 .est-tipo, body .med-tabela-v2 .est-tipo.man { background: transparent; color: #5a6472; border: 1px solid #d9dfe5; border-radius: 4px; padding: 2px 6px; font-weight: 700; letter-spacing: .05em; }
body .med-tabela-v2 .med-os { background: transparent; border: 1px solid #e1e6eb; border-radius: 4px; color: #2c3640; font-weight: 600; font-size: 10.5px; }
body .med-tabela-v2 .med-os.manual { border-style: dashed; color: #5a6472; }
/* esteira: pontos teal + atual em grafite vazado */
body .est-pontos i { border-color: #d5dbe1; }
body .est-pontos i.ok { background: #0e5c5b; border-color: #0e5c5b; }
body .est-pontos i.atual { background: #fff; border-color: #39424e; }
/* chips de etapa/pendência: contorno neutro + ponto de cor */
body .med-tabela-v2 .med-chip { background: transparent; border: 1px solid #dfe4e9; color: #3b4651; font-weight: 600; letter-spacing: .03em; padding: 3px 8px 3px 7px; border-radius: 4px; }
body .med-tabela-v2 .med-chip::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #9aa5b1; margin-right: 6px; vertical-align: 1px; }
body .med-tabela-v2 .med-chip.ok::before { background: #2e8b57; }
body .med-tabela-v2 .med-chip.warn::before { background: #d9a400; }
body .med-tabela-v2 .med-chip.red::before { background: #c0392b; }
body .med-tabela-v2 .med-chip.ok, body .med-tabela-v2 .med-chip.warn, body .med-tabela-v2 .med-chip.red { color: #3b4651; background: transparent; }
body .med-tabela-v2 .med-chip-mat { margin-top: 4px; }
body .med-tabela-v2 .med-chip-mat .med-chip { font-size: 8.5px; border-color: #e6eaee; color: #5a6472; }
/* ícone de abrir */
body .med-tabela-v2 .med-abrir-btn { background: #fff; border-color: #d9dfe5; color: #4a5560; }
body .med-tabela-v2 .med-abrir-btn:hover { background: #f3f5f7; border-color: #0e5c5b; color: #0e5c5b; }
/* total */
body .med-tabela-v2 tr.ger-total td { background: #f8f9fb; border-top: 1px solid #d9dfe5; }
/* ===== v0379 (Carlos: "deixar mais discreto e profissional" · "todas as tabelas do app") · padrão discreto:
   cabeçalho grafite em todas as tabelas (menos a grade da Programação), linhas brancas, chips em contorno
   neutro com ponto de cor; chips dentro de cabeçalhos escuros ficam brancos. ===== */
/* cabeçalhos: grafite (como a esteira) */
body .ger-tabela th, body .ger-lista th, body .ger-metas th, body .ger-prev th,
body .med-ficha-tab th, body .hk-table th, body .ts-tab th, body .dashboard-table th, body .planning-medicao-table thead th,
body .planning-services-table th, body .planning-obra-services-table th, body .stock-table th {
  background: #39424e !important; color: #fff !important; border-color: #4a5461 !important; font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; box-shadow: none !important;
}
body .hk-table th .hk-th-sub { color: rgba(255,255,255,.7); }
body .hk-table thead th .hk-th-total { color: #fff; }
/* linhas: brancas, divisórias finas, sem faixas coloridas nem zebra forte */
body .ger-tabela td, body .ger-lista td, body .ger-prev td, body .med-ficha-tab td,
body .hk-table td, body .ts-tab td, body .dashboard-table td, body .planning-medicao-table td { border-bottom: 1px solid #edf0f3; }
body .dashboard-table tbody tr:nth-child(even) td, body .hk-table tbody tr:nth-child(even) td { background: #fbfcfd; box-shadow: none; }
body .med-ficha-tab tr.est-sub td, body .ger-tabela tr.est-sub td { background: #fff; }
body .planning-medicao-table td.planning-service-desc, body .planning-medicao-table td.planning-service-secao { color: #2c3640; }
/* chips: contorno neutro + ponto de cor (ok verde · atenção amarelo · pendência vermelho · neutro cinza) */
body .med-chip, body .est-tipo, body .est-tipo.man, body .ger-tabela .gp-chip, body .ger-prev .gp-chip, body .gp-chip.ger-por-os, body .gp-chip.ger-por-fraco,
body .ger-chip-ja, body .pill-sgm, body .med-os-tag, body .med-sgm-tag {
  background: transparent !important; color: #3b4651 !important; border: 1px solid #dfe4e9; border-radius: 4px; font-weight: 600; letter-spacing: .03em; padding: 2px 7px;
}
body .med-chip::before, body .ger-chip-ja::before, body .med-os-tag::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #9aa5b1; margin-right: 6px; vertical-align: 1px; }
body .med-chip.ok::before, body .med-os-tag.sgm::before { background: #2e8b57; }
body .med-chip.warn::before, body .ger-chip-ja::before, body .med-os-tag.manual::before { background: #d9a400; }
body .med-chip.red::before { background: #c0392b; }
body .med-sgm-tag { display: inline-block; border: 0; padding: 0; font-weight: 700; color: #6b7682 !important; }
/* números de OS e etiquetas: texto com contorno fino */
body .med-tabela-v2 .med-os, body .med-ficha-tab .med-os { background: transparent; border: 1px solid #e1e6eb; border-radius: 4px; color: #2c3640; }
/* cards de OS (Associar OS / Substituir NR) */
body .med-os-card { border-color: #e1e6eb; background: #fff; }
body .med-os-card.manual { border-left: 3px solid #d9a400; }
body .med-os-card.sgm { border-left: 3px solid #0e5c5b; }
/* KPIs e cartões das fichas: fundo branco, borda fina */
body .med-ficha-kpi { background: #fff; }
body .med-stat-ok b, body .planning-stat.med-stat-ok b { color: #0e5c5b; }
/* esteira: etapas (faixa) — bolas coloridas só na etapa com contagem, resto cinza */
body .est-etapa .stp-n { box-shadow: none; }
/* exceções do padrão discreto: chips dentro de cabeçalhos escuros (fichas, popups) ficam brancos */
body .med-ficha-cab .med-chip, body .med-ficha-cab .est-tipo, body .planning-dialog-head .med-chip, body .planning-dialog-head .est-tipo, body .med-chips-h span {
  color: #fff !important; border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.08) !important;
}
body .med-ficha-cab .med-chip::before { background: rgba(255,255,255,.8); }
body .med-ficha-cab .med-chip.red::before { background: #ff8a80; }
body .med-ficha-cab .med-chip.warn::before { background: #ffd54f; }
body .med-ficha-cab .med-chip.ok::before { background: #8fe3b0; }
/* v0378: descrição do SGM embaixo do serviço (linha colada) — em bloco, discreta */
.med-tab-extra .med-sgm-desc { display: block; font-size: 9.5px; color: #7a8794; font-weight: 500; margin-top: 2px; }

/* v0382 (Carlos: "tela até o limite em baixo") — a Tabela de obras (Hancock vs Sistemas Energisa) vai até
   o fim da janela: a página cresce até sobrar só a folga do cartão; filtros e corpo esticam juntos e a
   mensagem de carregando fica centralizada no espaço. */
.hk-tabela-page.hk-estica { display: flex; flex-direction: column; min-height: calc(100vh - var(--hk-page-top, 160px) - var(--hk-page-folga, 28px)); }
.hk-tabela-page.hk-estica .hk-tab-layout { flex: 1; min-height: 0; align-items: stretch; }
.hk-tabela-page.hk-estica .hk-tab-main { min-height: 100%; }
.hk-tabela-page.hk-estica .hk-loading { flex: 1; justify-content: center; }
.hk-tabela-page.hk-estica .hk-vazio { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; }

/* v0384 · Hancock abre na Tabela de obras: acessos na barra do topo; comparação sem gráficos */
.hk-page-top .hk-actions-btns { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hk-sem-grafico { margin-top: 6px; }
.hk-sem-grafico .link-button { background: none; border: 0; padding: 0; color: #1f6f8b; font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; }

/* v0386 · período da saída do estoque (Hancock) na coluna de filtros da Tabela de obras */
.hk-side-periodo { display: flex; flex-direction: column; gap: 5px; }
.hk-side-periodo .hk-side-rotulo { display: block; font-size: 0.7rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .02em; }
.hk-side-periodo .hk-side-data { display: flex; align-items: center; gap: 8px; margin: 0; }
.hk-side-periodo .hk-side-data > span { flex: 0 0 28px; margin: 0; font-size: 0.7rem; font-weight: 800; color: var(--muted); text-transform: uppercase; }
.hk-side-periodo .hk-side-data > input[type="date"] { flex: 1; min-width: 0; padding: 7px 8px; border: 1px solid #d7dbe1; border-radius: 8px; font: inherit; font-size: 13px; }
.hk-side-periodo .hk-side-dica-curta { font-size: 11px; color: #7a8492; line-height: 1.35; }
.hk-side-periodo .link-button { background: none; border: 0; padding: 0; color: #1f6f8b; font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; text-decoration: underline; }

/* v0388 · resumo do recorte acima da Tabela de obras (layout B: tabela-resumo com linha Total) */
.hk-resumo { margin: 0 0 10px; }
.hk-resumo-tit { display: flex; align-items: baseline; gap: 10px; margin: 0 0 6px; }
.hk-resumo-tit b { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: #39424e; }
.hk-resumo-tit small { font-size: 10.5px; color: #7a8492; flex: 1; }
.hk-resumo-toggle { background: none; border: 1px solid #d7dbe1; border-radius: 999px; padding: 2px 10px; font: inherit; font-size: 10.5px; font-weight: 700; color: #39424e; cursor: pointer; }
.hk-resumo-toggle:hover { border-color: #39424e; }
.hk-resumo-tab { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border: 1px solid #e3e6ea; border-radius: 10px; overflow: hidden; font-size: 11.5px; }
/* alinhamento (Carlos: "configurar o alinhamento da tabela resumo"): igual à tabela de obras — Depósito à esquerda,
   colunas de número CENTRADAS (cabeçalho e valores na mesma coluna), larguras fixas para as colunas baterem */
.hk-resumo-tab { table-layout: fixed; }
.hk-resumo-tab th { background: #303234; color: #fff; font-size: 10px; letter-spacing: .04em; text-transform: uppercase; padding: 7px 10px; text-align: center; font-weight: 700; white-space: normal; line-height: 1.25; vertical-align: middle; }
.hk-resumo-tab td { padding: 6px 10px; border-bottom: 1px solid #eceef2; text-align: center; white-space: nowrap; vertical-align: middle; }
.hk-resumo-tab col.hk-resumo-col-pos { width: 44px; }
.hk-resumo-tab col.hk-resumo-col-dep { width: 24%; }
.hk-resumo-tab .hk-resumo-pos { color: #7a8492; font-weight: 700; }
.hk-resumo-tab tr:last-child td { border-bottom: 0; }
.hk-resumo-tab th.hk-left, .hk-resumo-tab td.hk-left { text-align: left; }
.hk-resumo-tab td b { font-weight: 800; color: #1f242a; }
.hk-resumo-tab .hk-resumo-nome { color: #7a8492; margin-left: 6px; }
.hk-resumo-tab tr.hk-resumo-total td { background: #f3f5f7; font-weight: 800; border-bottom: 2px solid #d7dbe1; }
.hk-resumo-tab .hk-resumo-red { color: #c0392b; }
.hk-resumo-tab .hk-resumo-pend { display: inline-block; min-width: 26px; text-align: center; border: 1px solid #d7dbe1; border-radius: 999px; padding: 0 8px; background: #fff; }
.hk-resumo-tab .hk-resumo-pend.tem { border-color: #c0392b; color: #c0392b; }
.hk-resumo.fechado .hk-resumo-tit { margin-bottom: 0; }

/* v0388 (Carlos: "deixar informações das colunas alinhadas, início e fim") · tabela de obras: a coluna Situação
   alinha cabeçalho e conteúdo ao INÍCIO (esquerda, como Obra / Material) e a última coluna, Diferença a baixar,
   alinha cabeçalho e valores ao FIM (direita, como o "Dif. a baixar" da barra de contexto). As colunas de número do
   meio seguem centradas. */
.hk-table thead th:nth-child(2) { text-align: left; }
.hk-table tbody tr.hk-obra-row > td:nth-child(2),
.hk-table tbody tr.hk-mat-row > td:nth-child(2) { text-align: left; }
.hk-table thead th:last-child,
.hk-table tbody tr.hk-obra-row > td:last-child,
.hk-table tbody tr.hk-mat-row > td:last-child { text-align: right; }
.hk-table thead th:last-child .hk-th-sub { text-align: right; }

/* v0389 · paginação só embaixo; resumo mais compacto para a tabela de materiais crescer */
.hk-resumo { margin-bottom: 8px; }
.hk-resumo-tit { margin-bottom: 4px; }
.hk-resumo-tab th { padding: 5px 10px; }
.hk-resumo-tab td { padding: 4px 10px; }
.hk-tab-main > .hk-table-wrap { margin-top: 0; }

/* v0389 · contador de requisições do resumo abre a Caixa só com elas */
button.hk-resumo-pend { font: inherit; font-weight: 800; cursor: pointer; }
button.hk-resumo-pend.tem:hover { background: #c0392b; color: #fff; }
.hk-fila-recorte .link-button { background: none; border: 0; padding: 0; color: #1f6f8b; font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; }

/* v0389 · Req. Hancock no bloco da grade (embaixo, à direita) */
.planning-cell-req-hk { display: block; text-align: right; font-weight: 700; color: #39424e; margin-top: 2px; }
.planning-cell.has-pager .planning-cell-req-hk { padding-right: 46px; }
/* v0389 · chip "NA PROGRAMAÇÃO" na seção NR/AC sem OS */
.hk-chip-prog { border-color: #0b7b80; color: #075e62; background: #eaf4f4; }
/* v0389 · aba Material da Medição: itens do Hancock */
.med-hk-cab { font-size: 12px; color: #39424e; margin: 0 0 6px; }
.med-hk-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 8px; }
.med-hk-wrap { max-height: 46vh; }
.med-hk-tab td.n, .med-hk-tab th.n { text-align: right; }
.med-hk-tab tr.med-hk-dev td { color: #8a93a0; }
.med-hk-tab tfoot td { background: #f3f5f7; font-weight: 700; }

/* v0389 · resumo com dois grupos: com obra SIAGO (comparação) × sem obra SIAGO (NR/AC/OS) */
.hk-resumo-tab tr.hk-resumo-grupos th { background: #1f2224; border-bottom: 1px solid #4a4e52; }
.hk-resumo-tab tr.hk-resumo-grupos th.hk-resumo-sem { background: #3b3a2a; }
.hk-resumo-tab th.hk-resumo-sem { background: #4a4836; }
.hk-resumo-tab td.hk-resumo-sem { background: #fbfaf3; }
.hk-resumo-tab tr.hk-resumo-total td.hk-resumo-sem { background: #f0eedf; }
.hk-resumo-tab th.hk-resumo-sep, .hk-resumo-tab td.hk-resumo-sep { border-left: 2px solid #d7dbe1; }
.hk-resumo-tab tr.hk-resumo-grupos th.hk-resumo-sep, .hk-resumo-tab thead tr:last-child th.hk-resumo-sep { border-left-color: #5a5e62; }
.hk-resumo-tab col.hk-resumo-col-dep { width: 17%; }

/* v0389 · seção NR/AC sem OS recolhível (cabeçalho clicável) */
.hk-secao-toggle { cursor: pointer; }
.hk-secao-toggle:hover td { background: #e9f6ef; }

/* v0390 · grupos e células do resumo filtram a tabela */
.hk-resumo-tab .hk-resumo-clique { cursor: pointer; }
.hk-resumo-tab td.hk-resumo-clique:hover { background: #e6f1f1; }
.hk-resumo-tab td.hk-resumo-sem.hk-resumo-clique:hover { background: #f0eedf; }
.hk-resumo-tab th.hk-resumo-clique:hover { filter: brightness(1.25); }
.hk-resumo-tab th.hk-resumo-clique.on { box-shadow: inset 0 -3px 0 #0b7b80; }
.hk-resumo-tab th.hk-resumo-sem.hk-resumo-clique.on { box-shadow: inset 0 -3px 0 #d9a400; }

/* v0392 · uma requisição do Hancock por bloco (a do dia) + "+N" com balão das demais */
.planning-req-mais { margin-left: 6px; padding: 0 6px; min-height: 0; height: 16px; line-height: 14px; border: 1px solid #a9cfd1; border-radius: 999px; background: #eaf4f4; color: #075e62; font: inherit; font-size: 10px; font-weight: 800; cursor: pointer; }
.planning-req-mais:hover { background: #0b7b80; color: #fff; }
.planning-req-pop { position: absolute; z-index: 220; background: #fff; border: 1px solid #d7dbe1; border-radius: 10px; box-shadow: 0 12px 28px rgba(20, 24, 28, 0.16); padding: 8px 10px; font-size: 11.5px; color: #1f242a; }
.planning-req-pop > b { display: block; font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; color: #39424e; margin-bottom: 6px; }
.planning-req-pop-item { display: flex; flex-direction: column; padding: 4px 0; border-top: 1px solid #eceef2; }
.planning-req-pop-item:first-of-type { border-top: 0; }
.planning-req-pop-item span { font-weight: 700; }
.planning-req-pop-item small { color: #68707a; }
.planning-req-pop-item.do-dia span { color: #075e62; }

/* v0397 (Carlos: "ajustar para não cortar valor — fazer para o app todo"): campos numéricos/moeda com algarismos de
   largura fixa e sem sobra lateral; a fonte diminui por JS (campoNumericoCabe) quando o valor não cabe. */
input.ger-moeda, input.ger-cel-man, input.planning-medicao-input, input.planning-medicao-qty {
  font-variant-numeric: tabular-nums;
  text-overflow: clip;
  min-width: 0;
}
input.ger-moeda { padding-left: 6px; padding-right: 6px; }

/* v0399 (Carlos): List Energisa no cabeçalho da ficha de AC da MT — protocolo p/ fiscalização e confirmação no List */
.med-list-mt { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.med-list-mt .med-list-campo { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25); border-radius: 10px; padding: 4px 6px 4px 10px; }
.med-list-mt .med-list-campo small { display: inline; font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; opacity: .85; white-space: nowrap; }
.med-list-mt input[type="date"] { width: 138px; height: 28px; border-radius: 7px; border: 1px solid rgba(255,255,255,.35); background: #fff; color: #1f2733; padding: 0 8px; font: inherit; font-weight: 700; font-size: 12px; }
.med-list-mt input[type="date"].vazio { background: #fffbea; }
.med-list-mt input[type="date"]:disabled { background: rgba(255,255,255,.35); color: #5a6472; cursor: not-allowed; }
body .med-ficha-cab .med-list-mt .est-tipo.list-ok { background: rgba(11,123,128,.6); color: #fff; }
body .med-ficha-cab .med-list-mt .est-tipo.list-pend { background: rgba(255,138,128,.35); color: #fff; }
.med-list-mt .ger-nota { color: rgba(255,255,255,.75); font-size: 10.5px; }
/* v0399: o bloco da esquerda do cabeçalho cede espaço (os botões ficam à direita enquanto couberem) */
.med-ficha-cab > div:first-child { flex: 1 1 420px; min-width: 0; }
.med-ficha-cab > .med-ficha-cab-acoes { flex: 0 0 auto; }

/* v0404: árvore "Módulos liberados" (módulo inteiro ou itens) no cadastro de usuários */
.auth-module-grid.auth-arvore { display: grid; grid-template-columns: 1fr; gap: 8px; }
.auth-arvore-ajuda { margin: 0; font-size: 11px; color: #5a6472; }
.auth-arvore .auth-grupo { font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: #7a8794; font-weight: 800; margin: 6px 0 0; }
.auth-arvore .auth-mod { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 6px 14px; align-items: start; padding: 8px 10px; border-radius: 8px; background: #f6f8fa; }
.auth-arvore .auth-mod.on { background: #e3f1f1; }
.auth-arvore label.auth-mod-cab { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: #1f2733; margin: 0; }
.auth-arvore label.auth-mod-cab input { width: 16px; height: 16px; accent-color: #0b7b80; margin: 0; flex: 0 0 auto; }
.auth-arvore label.auth-mod-cab small { display: block; font-size: 9.5px; font-weight: 600; color: #5a6472; letter-spacing: .04em; text-transform: uppercase; }
.auth-arvore .auth-mod-conta { margin-left: auto; font-size: 10px; font-weight: 700; color: #075e62; white-space: nowrap; }
.auth-arvore .auth-subs { display: flex; flex-wrap: wrap; gap: 6px; }
.auth-arvore label.auth-sub { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: #1f2733; background: #fff; border: 1px solid #d9dfe5; border-radius: 999px; padding: 3px 10px 3px 7px; margin: 0; }
.auth-arvore label.auth-sub input { width: 14px; height: 14px; accent-color: #0b7b80; margin: 0; }
.auth-arvore label.auth-sub.on, .auth-arvore label.auth-sub.herdado { background: #e3f1f1; border-color: #9ccfcf; }
.auth-arvore label.auth-sub.herdado { opacity: .8; }
.auth-arvore label.auth-sub.cargo { background: #fff8e8; border-color: #f0e0bd; color: #6b5312; }
.auth-arvore label.auth-sub-todas { font-weight: 800; }
.auth-arvore .auth-tag { display: inline-block; font-size: 8.5px; font-weight: 800; letter-spacing: .05em; padding: 1px 6px; border-radius: 999px; background: #fff1cf; color: #6b5312; text-transform: uppercase; margin-left: 4px; }
@media (max-width: 760px) { .auth-arvore .auth-mod { grid-template-columns: 1fr; } }
/* v0404: no gaveta do cadastro (estreita) cada módulo ocupa a linha toda e os itens vêm embaixo */
.auth-drawer .auth-module-grid.auth-arvore { grid-template-columns: 1fr; gap: 6px; }
.auth-drawer .auth-arvore .auth-mod { grid-template-columns: 1fr; gap: 6px; padding: 8px 10px; }
.auth-drawer .auth-arvore label.auth-mod-cab { border: 0; padding: 0; background: transparent; font-size: 12.5px; font-weight: 700; }
.auth-drawer .auth-arvore label.auth-mod-cab:has(input:checked) { border: 0; background: transparent; }
.auth-drawer .auth-arvore label.auth-mod-cab input { width: 16px; min-height: 16px; height: 16px; }
.auth-drawer .auth-arvore .auth-subs { padding-left: 24px; }
.auth-drawer .auth-arvore label.auth-sub { border-radius: 999px; padding: 3px 10px 3px 7px; font-size: 11px; font-weight: 600; width: auto; }
.auth-drawer .auth-arvore label.auth-sub input { width: 14px; min-height: 14px; height: 14px; }
.auth-drawer .auth-arvore label.auth-sub.cargo, .auth-drawer .auth-arvore label.auth-sub.cargo:has(input:checked) { background: #fff8e8; border-color: #f0e0bd; color: #6b5312; }
.auth-drawer .auth-arvore label.auth-sub.herdado:has(input:checked), .auth-drawer .auth-arvore label.auth-sub.on:has(input:checked) { background: #e3f1f1; border-color: #9ccfcf; }

/* v0406 · OS com NR/AC a conferir (Observação do SGM com outra NR/AC, ou equipe da OS de outro tipo/tarifa) */
.med-os-alerta-box { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 6px 0 12px; padding: 10px 14px; border: 1px solid #ecc979; border-left: 4px solid #d99a1e; border-radius: 8px; background: #fff9ec; color: #4d3a0c; font-size: 12px; line-height: 1.45; }
.med-os-alerta-ic { font-size: 18px; color: #c47f00; flex: none; }
.med-os-alerta-txt { display: flex; flex-direction: column; gap: 2px; flex: 1 1 420px; min-width: 0; }
.med-os-alerta-txt > b { font-size: 12.5px; color: #3d2d05; }
.med-os-alerta-acoes { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.med-os-alerta-acoes .ger-tab { white-space: nowrap; }
body .med-tabela-v2 .med-os.alerta { border-color: #d99a1e; border-style: solid; color: #7a4f00; background: #fff9ec; }
.med-tabela-v2 .med-sub.med-os-alerta-sub { color: #b06d00; font-weight: 700; }

/* v0407 · tabela da esteira desenhada em partes ("Mostrar mais") */
.med-tabela-v2 tr.med-mais td { text-align: center; padding: 12px 8px; background: #f7f9fb; }
.med-tabela-v2 tr.med-mais .ger-tab { margin-left: 6px; }

/* v0409 · busca de obra sem resultado: diagnóstico da C-6-1-1 lida + usar o número digitado */
.planning-obra-dropdown .planning-obra-diag { display: block; padding: 0 14px 8px; font-size: 11px; color: #6b7480; text-transform: none; letter-spacing: 0; font-weight: 500; }
.planning-obra-dropdown .planning-obra-usar { margin: 0 14px 12px; }

/* v0410 · chip "PROGRAMADA · aguardando feedback" clicável (leva ao feedback na Programação) */
.med-chip.med-chip-fb { cursor: pointer; font-family: inherit; border: 1px solid #c9d2dc; background: #fff; }
.med-chip.med-chip-fb:hover { border-color: #0f6e6e; color: #0f6e6e; box-shadow: 0 0 0 2px rgba(15, 110, 110, .12); }

/* v0411 · manutenção programada por OS e/ou obra — validação de cada campo */
.planning-dialog-field.planning-campo-erro input { border-color: #c0392b !important; box-shadow: 0 0 0 3px rgba(192, 57, 43, .12); }
.planning-dialog-field .planning-field-erro { display: block; margin-top: 4px; font-size: 11.5px; font-weight: 700; color: #b42318; text-transform: none; letter-spacing: 0; line-height: 1.4; }
.planning-man-nota { margin: 4px 0 10px; font-size: 11px; text-transform: none; letter-spacing: 0; }

/* v0415 · Previsão de faturamento — divisão entre ESTEIRA (1) e GARANTIDO (2) no tema VCR (opção B1) */
.ger-prev tr.ger-faixa-bloco td { background: var(--vcr-grafite, #3a3a3c) !important; color: #fff !important; font-weight: 800; text-align: left !important; padding: 9px 14px !important; letter-spacing: .07em; font-size: 12px; box-shadow: inset 6px 0 0 var(--vcr-teal, #0b7b80); border-bottom: 2px solid var(--vcr-teal, #0b7b80) !important; }
.ger-prev tr.ger-faixa-bloco td small { font-weight: 500; letter-spacing: 0; color: #c9ced3; margin-left: 10px; font-size: 11px; text-transform: none; }
.ger-prev tr.ger-faixa-bloco .ger-faixa-num { display: inline-block; min-width: 20px; text-align: center; background: var(--vcr-teal, #0b7b80); color: #fff; border-radius: 999px; padding: 1px 8px; margin-right: 10px; font-size: 11px; }
.ger-prev tr.ger-faixa-bloco.garantido td { box-shadow: inset 6px 0 0 var(--vcr-laranja, #f08430); border-bottom-color: var(--vcr-laranja, #f08430) !important; }
.ger-prev tr.ger-faixa-bloco.garantido .ger-faixa-num { background: var(--vcr-laranja, #f08430); }
.ger-prev tr.ger-total-bloco td { border-top: 0 !important; border-bottom: 3px solid var(--vcr-teal, #0b7b80) !important; background: var(--vcr-teal-suave, #e3f1f1) !important; color: var(--vcr-teal-escuro, #075e62); }
.ger-prev tr.ger-total-bloco.ger-bloco-garantido td { border-bottom-color: var(--vcr-laranja, #f08430) !important; background: #fdf1e6 !important; color: #8a4a0c; }
.ger-prev tr.ger-total-bloco td .ger-nota { color: #5a6472; }
.ger-prev tr.ger-respiro-bloco td { height: 16px; padding: 0 !important; background: var(--page, #e1e1e1) !important; border: 0 !important; }

/* v0416 · barra "Voltar" padrão em toda tela (modelo padrão dos módulos) */
.app-view:has([data-tela-voltar-propria]) > .view-back-bar[data-voltar-padrao] { display: none; }
.asbuilt-view > .view-back-bar { max-width: 560px; margin: 0 auto 10px; }
.gerencial-view > .view-back-bar { padding: 10px 12px 0; }
.hub-capa-view > .view-back-bar { margin: 10px var(--capa-recuo, 0) 0; }
.works-materials-view > .view-back-bar { margin-bottom: 10px; }

/* v0417 · tela de carregamento ao tocar no raio / "Atualizar app" (mesmo cartão VCR da atualizar.html) */
.app-atualizando { position: fixed; inset: 0; z-index: 100000; display: grid; place-items: center; background: rgba(225, 225, 225, 0.96); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); font-family: Poppins, Inter, "Segoe UI", Roboto, Arial, sans-serif; }
.app-atualizando[hidden] { display: none !important; }
.app-atualizando-card { width: min(400px, calc(100% - 32px)); padding: 22px 22px 18px; background: #fff; border: 1px solid #d9dee5; border-top: 5px solid var(--vcr-teal, #0b7b80); border-radius: 10px; box-shadow: 0 16px 36px rgba(20, 24, 28, 0.14); }
.app-atualizando-marca { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; }
.app-atualizando-marca img { height: 40px; width: auto; }
.app-atualizando-marca b { display: block; font-size: 15px; letter-spacing: 1.5px; color: var(--vcr-teal-escuro, #075e62); }
.app-atualizando-marca small { display: block; font-size: 11px; font-weight: 600; color: #68707a; }
.app-atualizando h2 { margin: 0 0 4px; font-size: 20px; color: #171a1d; }
.app-atualizando-versao { margin: 0 0 14px; font-size: 12px; color: #68707a; }
.app-atualizando-barra { height: 6px; border-radius: 99px; background: var(--vcr-teal-suave, #e3f1f1); overflow: hidden; margin-bottom: 12px; }
.app-atualizando-barra span { display: block; height: 100%; background: linear-gradient(90deg, var(--vcr-laranja, #f08430), var(--vcr-teal, #0b7b80)); border-radius: 99px; transition: width 0.35s ease; }
.app-atualizando ol { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.app-atualizando li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #9aa0a6; font-weight: 600; }
.app-atualizando li i { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #d9dee5; display: grid; place-items: center; font-style: normal; font-size: 12px; flex: none; box-sizing: border-box; }
.app-atualizando li.feito { color: var(--vcr-grafite, #3a3a3c); }
.app-atualizando li.feito i { background: var(--vcr-teal, #0b7b80); border-color: var(--vcr-teal, #0b7b80); color: #fff; }
.app-atualizando li.agora { color: var(--vcr-teal-escuro, #075e62); }
.app-atualizando li.agora i { border-color: #a9cfd1; border-top-color: var(--vcr-teal, #0b7b80); animation: app-atualizando-gira 0.9s linear infinite; }
.app-atualizando-nota { display: block; color: #68707a; font-weight: 600; font-size: 12px; line-height: 1.4; }
@keyframes app-atualizando-gira { to { transform: rotate(360deg); } }

/* v0421 · caixinha "arquivo completo" nas consultas gravadas no banco por chave (C-3-2-1) */
.siago-completa { display: inline-flex; margin-top: 4px; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: var(--vcr-grafite, #3a3a3c); white-space: nowrap; cursor: pointer; }
.siago-completa input { width: 14px; height: 14px; accent-color: var(--vcr-teal, #0b7b80); margin: 0; }

/* v0430: obra INDEFERIDA pela Energisa (status da C-6-1-1) — sinal vermelho na Tabela de obras */
.hk-chip.hk-chip-indef { border-color: #f1b5b5; background: #fdecec; color: #b42318; font-weight: 800; letter-spacing: .2px; }

/* v0431: ficha da NR/AC — uma linha por OS; medição gravada em outra programação aparece como aviso que não conta */
.med-ficha-tab [data-med-fora-da-os] { display: inline-block; margin: 3px 0 0 4px; white-space: normal; }
.med-ficha-tab [data-med-sem-os-propria] { color: #8a6212; }

/* v0445: pesquisa por obra / NR-AC / OS na barra da Programação (abre uma janela própria) */
.planning-busca-campo {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.planning-filter-bar .planning-busca input[data-planning-busca] {
  width: 124px !important;
  min-width: 0 !important;
}
.planning-busca .ghost-button {
  min-height: 34px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
}
.planning-busca .ghost-button svg {
  width: 14px;
  height: 14px;
}
@media (min-width: 1100px) {
  .works-planning-view:is(.planning-tool-planning) .planning-filter-bar .planning-busca input[data-planning-busca] {
    width: 124px !important;
  }
}
/* v0445: em telas menores que 1800 px a barra não cabe numa linha com o campo — fica só a lupa (o número é digitado na janela) */
@media (max-width: 1799px) {
  .planning-filter-bar .planning-busca input[data-planning-busca] { display: none; }
}
@media (min-width: 1100px) and (max-width: 1799px) {
  /* v0445: a lupa da pesquisa cabe na mesma linha — os seletores cedem um pouco de largura */
  .works-planning-view:is(.planning-tool-planning) .planning-filter-bar select,
  .works-planning-view:is(.planning-tool-planning) .planning-filter-bar .stock-menu-button {
    min-width: 122px;
    max-width: 158px;
  }
  .planning-busca .ghost-button {
    padding: 0 7px;
  }
}
@media (min-width: 1100px) and (max-width: 1400px) {
  /* v0445: notebook — a lupa cabe na linha: Estado, Base e Equipe cedem alguns pixels */
  .works-planning-view:is(.planning-tool-planning) .planning-filter-bar select {
    width: 146px;
    min-width: 130px;
  }
  .works-planning-view:is(.planning-tool-planning) .planning-filter-bar .stock-menu-button {
    width: 92px;
    min-width: 80px;
  }
}
@media (min-width: 1100px) and (max-width: 1330px) {
  .works-planning-view:is(.planning-tool-planning) .planning-filter-bar select {
    width: 136px;
    min-width: 124px;
  }
  .works-planning-view:is(.planning-tool-planning) .planning-filter-bar .stock-menu-button {
    width: 80px;
    min-width: 70px;
  }
  .planning-busca .ghost-button { padding: 0 6px; }
}

/* v0446: Pareto por grupo clicável (filtra os motivos do grupo) */
.gp-pareto-grupos tr.gp-grupo-linha { cursor: pointer; }
.gp-pareto-grupos tr.gp-grupo-linha:hover td { background: #f3f8f8; }
.gp-pareto-grupos tr.gp-grupo-linha.sel td { background: #e6f2f2; box-shadow: inset 3px 0 0 var(--marca, #0f7c80); }
.gp-pareto-grupos tr.gp-grupo-linha.sel td:not(:first-child) { box-shadow: none; }
/* v0452: NR/AC com OS SGM fora da linha 01 (bloco fechado) */
.ger-nr-fora { margin: 10px 0 4px; border: 1px solid #d9e0e8; border-radius: 8px; background: #f7f9fb; }
.ger-nr-fora > summary { cursor: pointer; padding: 8px 12px; font-size: 12px; color: #4b5a68; }
.ger-nr-fora[open] > summary { border-bottom: 1px solid #d9e0e8; }
.ger-nr-fora .hk-table-wrap { margin: 0; }
/* v0452: cada obra com as suas OS (esteira e ficha) */
.med-obra-os { display: block; font-size: 10px; color: #5d6b7a; margin: 0 0 3px; }
.med-siago-os .med-os { display: inline-block; margin: 1px 2px; }
.med-obra-par { margin-bottom: 2px; }
/* v0454: tabela de metas agrupada (grupo · subtotal · total geral) */
.ger-metas-grupos tbody th.ger-metas-grupo { background: #eef3f5 !important; color: #1f2733 !important; font-size: 11px; font-weight: 800; text-align: center; vertical-align: middle; border-right: 1px solid #d9e0e8 !important; letter-spacing: .02em; text-transform: none; position: static; }
.ger-metas-grupos tr.ger-subtotal td { background: #f3f6f8; font-weight: 800; border-top: 1px solid #c9d3dc; }
.ger-metas-grupos tr.ger-metas-primeira > * { border-top: 2px solid #c9d3dc; }
.ger-metas-grupos tr.ger-total td:first-child { font-weight: 800; letter-spacing: .03em; }

/* v0462: balão das requisições do Hancock — cada linha abre a requisição numa janela */
.planning-req-pop-link { width: 100%; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; text-align: left; background: none; border: 0; border-top: 1px solid #eceef2; padding: 6px 2px; font: inherit; color: inherit; cursor: pointer; }
.planning-req-pop > b + .planning-req-pop-link { border-top: 0; }
.planning-req-pop-link:hover { background: #f3f8f8; }
.planning-req-pop-txt { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.planning-req-pop-txt > span { font-weight: 700; }
.planning-req-pop-txt em { font-style: normal; font-weight: 700; }
.planning-req-pop-txt em.lig { color: #0f6b74; }
.planning-req-pop-txt em.lig-outro { color: #5d6b7a; }
.planning-req-pop-txt em.sem { color: #9a6b00; }
.planning-req-pop-abrir { font-size: 11px; font-weight: 700; color: #0f6b74; white-space: nowrap; }
.planning-cell-req-hk b { font-weight: 800; }

/* v0464: tabela da Medição — 20 · 40 · 100 · Todas */
.med-linhas-barra { display: flex; justify-content: flex-end; align-items: center; gap: 14px; margin: 0 0 8px; font-size: 12.5px; color: #5d6b7a; flex-wrap: wrap; }
.med-linhas-barra.rodape { justify-content: center; margin: 4px 0; }
.med-linhas-info b { color: #1d2733; }
.med-linhas-sel { display: inline-flex; align-items: center; gap: 0; border: 1px solid #cfd8dc; border-radius: 8px; overflow: hidden; background: #fff; }
.med-linhas-sel > span { padding: 0 10px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #5d6b7a; border-right: 1px solid #e1e6e8; line-height: 30px; }
.med-linhas-op { min-width: 46px; height: 30px; padding: 0 10px; border: 0; border-right: 1px solid #e1e6e8; background: #fff; color: #1d2733; font: inherit; font-weight: 700; cursor: pointer; }
.med-linhas-op:last-child { border-right: 0; }
.med-linhas-op:hover { background: #f3f8f8; }
.med-linhas-op.on { background: #0b7b80; color: #fff; }

/* v0468: incluir programação "sem OS" na OS do SGM da NR/AC */
.med-incluir-os { display: inline-flex; margin: 6px 4px 0 0; font-size: 11px; padding: 4px 10px; }
.med-incluida { display: block; color: #0f6b74; }
.med-link { background: none; border: 0; padding: 0; color: #0b7b80; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }

/* v0469: equipe da OS manual no popup Associar OS */
.med-assoc-add .med-assoc-equipe { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #5d6b7a; min-width: 190px; }
.med-assoc-add .med-assoc-equipe select, .med-os-equipe select { height: 38px; border: 1px solid #cfd8dc; border-radius: 8px; padding: 0 8px; font: inherit; font-size: 13px; text-transform: none; letter-spacing: 0; color: #1d2733; background: #fff; }
.med-os-equipe { display: flex; flex-direction: column; gap: 2px; font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #5d6b7a; }
.med-os-equipe select { height: 32px; font-size: 12px; }
.med-os-editar { margin-left: 8px; font-size: 11px; }
.med-os-edit { display: flex; gap: 6px; align-items: center; }
.med-os-edit input { width: 190px; height: 32px; border: 1px solid #0b7b80; border-radius: 6px; padding: 0 8px; font: inherit; font-weight: 700; }
.med-assoc-v2 .med-os-card { grid-template-columns: auto 1fr auto auto auto; }
@media (max-width: 640px) { .med-assoc-v2 .med-os-card { grid-template-columns: 1fr auto; } }
.med-assoc-v2 .med-assoc-add:has(.med-assoc-equipe) { grid-template-columns: 1fr auto auto; }
.med-assoc-v2 .med-assoc-add .med-assoc-equipe select { height: 46px; border-radius: 10px; font-weight: 700; }
/* v0470: equipe da OS manual trocável direto na ficha da Medição */
.med-os-equipe-sel { width: 100%; max-width: 190px; height: 30px; border: 1px solid #cfd8dc; border-radius: 7px; padding: 0 2px 0 6px; font: inherit; font-size: 11px; font-weight: 700; color: #1d2733; background: #fffdf3; cursor: pointer; }
.med-os-equipe-sel:hover, .med-os-equipe-sel:focus { border-color: #0b7b80; outline: none; }
.med-ficha-tab td .med-incluir-os[data-med-vincular-os] { white-space: nowrap; font-size: 10.5px; padding: 4px 8px; }

/* ===== v0478 — Programação de obras: cores do cancelado e do substituído, motivo da substituição, trava e listas ===== */
/* Cancelado (dia improdutivo): vermelho bem claro. Planejado que foi substituído: cinza. O verde fica só para o que foi feito. */
.planning-grid td.planning-cell.is-cancelled-page.tom-cancelado { background: #fdf1ef !important; }
.planning-grid td.planning-cell.tom-cancelado .planning-cell-line.warn-line { color: #9a2a22; }
.planning-grid td.planning-cell.tom-cancelado .planning-feedback-tag { background: #fbe1dd; color: #9a2a22; border-color: #f1bcb5; }
.planning-grid td.planning-cell.is-cancelled-page.tom-substituido { background: #eef0f3 !important; }
.planning-grid td.planning-cell.tom-substituido .planning-cell-line.warn-line { color: #56616d; }
.planning-grid td.planning-cell.tom-substituido .planning-feedback-tag,
.planning-grid td.planning-cell.tag-substituido .planning-feedback-tag.st-substituido { background: #e2e6eb; color: #46505b; border-color: #c5ccd6; }
.planning-cell-line.motivo-subst { font-weight: 700; color: #46505b; }

/* Feedback: por que foi substituído, serviço do dia e trava do cancelado */
.planning-feedback-ops.planning-feedback-ops-duas .planning-feedback-option,
.planning-feedback-dodia .planning-feedback-option { justify-content: flex-start; text-align: left; padding: 9px 11px; }
.planning-feedback-subtipo > span, .planning-feedback-dodia .planning-feedback-option > span { display: grid; gap: 1px; }
.planning-feedback-subtipo b, .planning-feedback-dodia .planning-feedback-option b { font-size: 12px; font-weight: 700; color: #171a1d; }
.planning-feedback-subtipo small, .planning-feedback-dodia .planning-feedback-option small { font-size: 10.5px; font-weight: 600; color: #68707a; }
.planning-feedback-dodia { display: grid; gap: 6px; margin-top: 10px; }
.planning-feedback-dodia-tit { font-size: 0.74rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .02em; }
.planning-feedback-trava { border: 2px solid #c9392f; background: #fde8e6; color: #7a1712; border-radius: 10px; padding: 10px 12px; display: grid; gap: 8px; margin-top: 10px; justify-items: start; }
.planning-feedback-trava p { margin: 0; display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; font-weight: 600; line-height: 1.45; }
.planning-feedback-trava p svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.planning-feedback-trava .primary-button { display: inline-flex; align-items: center; gap: 6px; }
.planning-feedback-trava .primary-button svg { width: 14px; height: 14px; }

/* Listas: histórico de substituições e cancelamentos; feedback para revisar */
.planning-head-acoes { display: inline-flex; gap: 5px; margin-left: 8px; vertical-align: middle; }
.planning-head-btn { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 6px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, .38); background: rgba(255, 255, 255, .1); color: #fff; font: inherit; font-size: 10px; font-weight: 700; letter-spacing: 0; text-transform: none; cursor: pointer; }
.planning-head-btn:hover { background: rgba(255, 255, 255, .22); }
.planning-head-btn svg { width: 12px; height: 12px; }
.planning-head-btn.revisar { border-color: #f1bcb5; }
.planning-head-btn.revisar b { background: #b3261e; color: #fff; border-radius: 999px; font-size: 10px; padding: 0 6px; line-height: 15px; }
.planning-lista-dialog { width: min(860px, 100%); }
.planning-lista-body { display: grid; gap: 10px; }
.planning-lista-filtros { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.planning-lista-chip { border: 1px solid #d5dee9; border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 11.5px; font-weight: 700; color: #39424e; background: #fff; cursor: pointer; }
.planning-lista-chip.on { background: var(--vcr-teal-suave, #e6f3f3); border-color: var(--vcr-teal, #0b7b80); color: var(--vcr-teal-escuro, #075f63); }
.planning-lista-filtros select, .planning-lista-filtros input { border: 1px solid #d5dee9; border-radius: 8px; padding: 5px 8px; font: inherit; font-size: 11.5px; font-weight: 600; background: #fff; max-width: 190px; }
.planning-lista-excel { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; }
.planning-lista-excel svg { width: 13px; height: 13px; }
.planning-lista-linhas { border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden; }
.planning-lista-item { display: grid; grid-template-columns: 118px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border-top: 1px solid #eef1f5; }
.planning-lista-item:first-child { border-top: 0; }
.planning-lista-item .d { font-size: 13px; font-weight: 800; color: #171a1d; display: grid; }
.planning-lista-item .d small { font-size: 10.5px; font-weight: 700; color: #68707a; }
.planning-lista-item .s { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.planning-lista-item .s b { font-size: 13px; color: #171a1d; }
.planning-lista-item .s em { font-style: normal; font-size: 10px; font-weight: 800; border-radius: 999px; padding: 2px 8px; text-transform: uppercase; letter-spacing: .03em; }
.planning-lista-item .s em.sub { background: #e2e6eb; color: #46505b; border: 1px solid #c5ccd6; }
.planning-lista-item .s em.cnc { background: #fbe1dd; color: #9a2a22; border: 1px solid #f1bcb5; }
.planning-lista-item .s em.rev { background: #b3261e; color: #fff; }
.planning-lista-item .s small { flex-basis: 100%; font-size: 11.5px; font-weight: 600; color: #68707a; }
.planning-lista-nota, .planning-lista-vazio { margin: 0; font-size: 11.5px; font-weight: 600; color: #68707a; line-height: 1.45; }
.planning-lista-vazio { padding: 16px 12px; }
@media (max-width: 640px) {
  .planning-lista-item { grid-template-columns: 1fr; gap: 6px; }
  .planning-lista-excel { margin-left: 0; }
}

/* ===== v0479 — Programação de obras: remanejar o cancelado ou substituído (faixa da semana) e lista "Para remanejar" ===== */
.planning-cell-line.rem-tag { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; margin-top: 3px; font-size: 10px; font-weight: 800; border-radius: 999px; padding: 2px 8px; background: #f3f8fc; color: var(--blue, #1d5f8a); border: 1px solid #bcd7e8; white-space: nowrap; text-decoration: none; }
.planning-cell-line.rem-tag svg { width: 11px; height: 11px; }
.planning-head-btn.remanejar b { background: var(--vcr-laranja, #f08430); color: #fff; border-radius: 999px; font-size: 10px; padding: 0 6px; line-height: 15px; }
.planning-head-btn[hidden] { display: none; }
.planning-rem-open { display: inline-flex; align-items: center; gap: 7px; margin-top: 8px; border: 1px solid var(--vcr-teal, #0b7b80); background: var(--vcr-teal-suave, #e3f1f1); color: var(--vcr-teal-escuro, #075f63); border-radius: 9px; padding: 8px 12px; font: inherit; font-size: 0.86rem; font-weight: 700; cursor: pointer; }
.planning-rem-open svg { width: 15px; height: 15px; }
.planning-rem-nota { margin: 8px 0 0; display: flex; gap: 7px; align-items: flex-start; font-size: 12px; font-weight: 600; color: #1d4f6e; background: #f3f8fc; border: 1px solid #bcd7e8; border-radius: 8px; padding: 7px 10px; line-height: 1.4; }
.planning-rem-nota svg { width: 14px; height: 14px; flex: none; margin-top: 1px; }
.planning-rem-dialog { width: min(780px, 100%); }
.planning-rem-body { display: grid; gap: 12px; }
.planning-rem-resumo { border: 1px solid #dcebe9; border-left: 4px solid var(--vcr-teal, #0b7b80); background: #f6fbfa; border-radius: 10px; padding: 10px 12px; display: grid; gap: 6px; }
.planning-rem-resumo > b { font-size: 0.72rem; text-transform: uppercase; letter-spacing: .03em; color: var(--vcr-teal-escuro, #075f63); }
.planning-rem-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.planning-rem-pills em { font-style: normal; font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 3px 10px; background: #fff; border: 1px solid #cfe3e0; color: #26323c; }
.planning-rem-resumo small { font-size: 11px; color: #68707a; font-weight: 600; line-height: 1.4; }
.planning-rem-campos { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 12px; align-items: end; }
.planning-rem-faixa-bloco { border: 1px solid #e2e8f0; border-radius: 12px; padding: 10px 10px 12px; display: grid; gap: 8px; background: #fbfcfd; }
.planning-rem-faixa-topo { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 0 4px; flex-wrap: wrap; }
.planning-rem-faixa-topo b { font-size: 13px; color: #171a1d; }
.planning-rem-faixa-topo small { font-size: 11px; font-weight: 700; color: #68707a; }
.planning-rem-faixa { display: grid; grid-template-columns: 34px repeat(7, minmax(0, 1fr)) 34px; gap: 6px; align-items: stretch; }
.planning-rem-seta { border: 1px solid #d5dee9; background: #fff; border-radius: 9px; display: grid; place-items: center; color: #26323c; font-size: 20px; font-weight: 800; line-height: 1; cursor: pointer; font-family: inherit; }
.planning-rem-seta:disabled { color: #c3cad3; background: #f3f5f8; border-color: #eef1f5; cursor: default; }
.planning-rem-dia { border: 1px solid #d5dee9; background: #fff; border-radius: 10px; padding: 7px 4px 8px; display: grid; gap: 2px; justify-items: center; text-align: center; align-content: start; min-width: 0; font: inherit; cursor: pointer; }
.planning-rem-dia u { text-decoration: none; font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #68707a; }
.planning-rem-dia b { font-size: 15px; font-weight: 800; color: #171a1d; line-height: 1.15; }
.planning-rem-dia .pts { display: flex; gap: 3px; margin: 2px 0 1px; }
.planning-rem-dia .pts i { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid #b9c3cf; display: block; background: #fff; }
.planning-rem-dia .pts i.on { background: var(--amber, #a56500); border-color: var(--amber, #a56500); }
.planning-rem-dia em { font-style: normal; font-size: 10.5px; font-weight: 800; color: var(--green, #13795b); line-height: 1.2; }
.planning-rem-dia small { font-size: 9.5px; font-weight: 700; color: #68707a; line-height: 1.2; }
.planning-rem-dia.oc em { color: #7a4b00; }
.planning-rem-dia.fds { background: #f6f8fa; }
.planning-rem-dia.hoje { border-style: dashed; border-color: #68707a; }
.planning-rem-dia.fora, .planning-rem-dia:disabled { background: #f3f5f8; border-color: #eef1f5; cursor: default; }
.planning-rem-dia.fora u, .planning-rem-dia.fora b, .planning-rem-dia.fora em, .planning-rem-dia.fora small { color: #b4bcc6; }
.planning-rem-dia.fora .pts { visibility: hidden; }
.planning-rem-dia.sel { border: 2px solid var(--vcr-teal, #0b7b80); background: var(--vcr-teal-suave, #e3f1f1); box-shadow: 0 0 0 3px rgba(11, 123, 128, .16); padding: 6px 3px 7px; }
.planning-rem-dia.sel.oc { border-color: var(--amber, #a56500); background: var(--amber-soft, #fdf3dc); box-shadow: 0 0 0 3px rgba(165, 101, 0, .16); }
.planning-rem-aviso { margin: 0; font-size: 12px; font-weight: 700; border-radius: 8px; padding: 9px 11px; display: flex; gap: 8px; align-items: flex-start; line-height: 1.45; }
.planning-rem-aviso svg { width: 15px; height: 15px; flex: none; margin-top: 1px; }
.planning-rem-aviso.neutro { color: #4a5560; background: #f3f5f8; border: 1px solid #e2e8f0; font-weight: 600; }
.planning-rem-aviso.ok { color: #0f5c46; background: var(--green-soft, #e4f3ec); border: 1px solid #b9dfcf; }
.planning-rem-aviso.serv { color: #5c3a00; background: var(--amber-soft, #fdf3dc); border: 2px solid #e2b25a; font-size: 12.5px; }
.planning-rem-aviso.serv b { color: #171a1d; }
.planning-rem-aviso.erro { color: #7a1712; background: #fde8e6; border: 1px solid #e6a19c; }
.planning-rem-confirmar { display: inline-flex; align-items: center; gap: 7px; }
.planning-rem-confirmar svg { width: 15px; height: 15px; }
.planning-lista-item .a { display: inline-flex; gap: 6px; align-items: center; }
.planning-lista-item .a .primary-button { display: inline-flex; align-items: center; gap: 5px; }
.planning-lista-item .a .primary-button svg { width: 13px; height: 13px; }
@media (max-width: 720px) {
  .planning-rem-campos { grid-template-columns: 1fr; }
  .planning-rem-faixa { grid-template-columns: 26px repeat(7, minmax(0, 1fr)) 26px; gap: 3px; }
  .planning-rem-dia small { display: none; }
  .planning-rem-dia b { font-size: 12px; }
}

/* ===== v0480 — Programação de obras: avisos de orçado e meta do dia; replicar pelo calendário ===== */
.planning-cell-line.aviso-tag { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; margin-top: 3px; font-size: 9.5px; font-weight: 800; border-radius: 6px; padding: 2px 7px; background: #fff6e0; color: #8a5200; border: 1px solid #d98a00; white-space: nowrap; }
.planning-cell-line.aviso-tag svg { width: 11px; height: 11px; flex: none; margin-right: 1px; }
.planning-aviso-painel { border: 1px solid #cbd5e1; border-radius: 10px; padding: 10px 12px 11px; display: grid; gap: 8px; background: #fff; margin-top: 10px; }
.planning-aviso-painel[hidden] { display: none; }
.planning-aviso-painel.alerta { border: 2px solid #d98a00; background: #fffaf0; }
.planning-aviso-linha { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; font-size: 12px; }
.planning-aviso-linha .rot { grid-column: 1; font-weight: 800; color: #171a1d; }
.planning-aviso-linha .rot small { margin-left: 6px; font-size: 10.5px; font-weight: 600; color: #68707a; }
.planning-aviso-linha .val { grid-column: 2; text-align: right; font-weight: 800; color: #171a1d; font-variant-numeric: tabular-nums; white-space: nowrap; }
.planning-aviso-linha .val small { font-weight: 600; color: #68707a; font-size: 11px; }
.planning-aviso-barra { grid-column: 1; height: 8px; border-radius: 999px; background: #e6ebf1; overflow: hidden; display: block; }
.planning-aviso-barra i { display: block; height: 100%; border-radius: 999px; background: #13795b; }
.planning-aviso-barra i.warn { background: #d98a00; }
.planning-aviso-barra i.over { background: #c9392f; }
.planning-aviso-linha .pct { grid-column: 2; font-size: 11.5px; font-weight: 800; color: #13795b; text-align: right; white-space: nowrap; }
.planning-aviso-linha .pct.warn { color: #8a5200; }
.planning-aviso-linha .pct.over { color: #a3261d; }
.planning-aviso-msg { margin: 0; font-size: 11.5px; font-weight: 600; color: #4a3000; line-height: 1.45; display: flex; gap: 7px; align-items: flex-start; border-top: 1px dashed #d9b36a; padding-top: 7px; }
.planning-aviso-msg svg { width: 15px; height: 15px; flex: none; color: #b36b00; margin-top: 1px; }
.planning-aviso-msg b { color: #171a1d; }
.planning-aviso-nota { margin: 0; font-size: 11.5px; font-weight: 600; color: #68707a; }
.planning-rep-open { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.planning-rep-open svg { width: 15px; height: 15px; }
.planning-rep-dialog { width: min(820px, 100%); }
.planning-rep-body { display: grid; gap: 12px; }
.planning-rep-cal { border: 1px solid #e2e8f0; border-radius: 12px; padding: 10px 10px 12px; display: grid; gap: 8px; background: #fbfcfd; }
.planning-rep-grade { display: grid; grid-template-columns: 62px repeat(7, minmax(0, 1fr)); gap: 4px; }
.planning-rep-grade > u { text-decoration: none; text-align: center; font-size: 9.5px; font-weight: 800; color: #68707a; text-transform: uppercase; letter-spacing: .05em; padding-bottom: 1px; }
.planning-rep-atalho { border: 1px solid #cfd8e3; background: #fff; border-radius: 8px; font: inherit; font-size: 9.5px; font-weight: 800; color: #39424e; cursor: pointer; padding: 2px; }
.planning-rep-atalho.on { background: var(--vcr-teal-suave, #e3f1f1); border-color: var(--vcr-teal, #0b7b80); color: var(--vcr-teal-escuro, #075f63); }
.planning-rep-atalho:disabled { background: transparent; border-color: transparent; color: transparent; cursor: default; }
.planning-rep-dia { border: 1px solid #d5dee9; background: #fff; border-radius: 8px; padding: 4px 7px 5px; min-height: 40px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-content: center; column-gap: 4px; row-gap: 1px; text-align: left; font: inherit; cursor: pointer; }
.planning-rep-dia b { font-size: 12.5px; font-weight: 800; color: #171a1d; line-height: 1.2; }
.planning-rep-dia .pts { display: flex; gap: 2px; align-items: center; }
.planning-rep-dia .pts i { width: 6px; height: 6px; border-radius: 50%; display: block; background: var(--amber, #a56500); }
.planning-rep-dia em { grid-column: 1 / -1; font-style: normal; font-size: 9.5px; font-weight: 800; color: #5c9a82; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.planning-rep-dia.fds { background: #f6f8fa; }
.planning-rep-dia.oc { background: #fffaf0; border-color: #e9cf9a; }
.planning-rep-dia.oc em { color: #7a4b00; }
.planning-rep-dia.fora, .planning-rep-dia:disabled { background: #f3f5f8; border-color: #eef1f5; cursor: default; }
.planning-rep-dia.fora b, .planning-rep-dia.fora em { color: #b4bcc6; }
.planning-rep-dia.hoje { border-style: dashed; border-color: #68707a; }
.planning-rep-dia.orig, .planning-rep-dia.orig:disabled { background: #3a3a3c; border-color: #3a3a3c; }
.planning-rep-dia.orig b { color: #fff; }
.planning-rep-dia.orig em { color: #d6d9dd; }
.planning-rep-dia.sel { background: var(--vcr-teal, #0b7b80); border-color: var(--vcr-teal, #0b7b80); box-shadow: 0 0 0 2px rgba(11, 123, 128, .2); }
.planning-rep-dia.sel b, .planning-rep-dia.sel em { color: #fff; }
.planning-rep-dia.sel svg { width: 13px; height: 13px; color: #fff; }
.planning-rep-dia.sel.oc { background: #a56500; border-color: #a56500; box-shadow: 0 0 0 2px rgba(165, 101, 0, .22); }
.planning-rep-legenda { display: flex; flex-wrap: wrap; gap: 5px 14px; font-size: 10.5px; font-weight: 700; color: #4a5560; padding: 0 2px; }
.planning-rep-legenda span { display: inline-flex; align-items: center; gap: 5px; }
.planning-rep-legenda i { width: 12px; height: 12px; border-radius: 3px; display: block; border: 1px solid #d5dee9; background: #fff; }
.planning-rep-legenda i.sel { background: var(--vcr-teal, #0b7b80); border-color: var(--vcr-teal, #0b7b80); }
.planning-rep-legenda i.oc { background: #fffaf0; border-color: #e9cf9a; }
.planning-rep-legenda i.s2 { background: #a56500; border-color: #a56500; }
.planning-rep-legenda i.orig { background: #3a3a3c; border-color: #3a3a3c; }
.planning-rep-legenda i.fora { background: #f3f5f8; border-color: #eef1f5; }
.planning-rep-escolhidos { border: 1px solid #e2e8f0; border-radius: 10px; padding: 9px 11px; display: grid; gap: 7px; }
.planning-rep-escolhidos-topo { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 12px; font-weight: 800; color: #171a1d; }
.planning-rep-limpar { border: 0; background: none; font: inherit; font-size: 11px; font-weight: 700; color: var(--vcr-teal-escuro, #075f63); text-decoration: underline; cursor: pointer; padding: 0; }
.planning-rep-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.planning-rep-chips button { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #a9cfd1; background: var(--vcr-teal-suave, #e3f1f1); color: var(--vcr-teal-escuro, #075f63); border-radius: 999px; padding: 3px 6px 3px 10px; font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; }
.planning-rep-chips button i { font-style: normal; font-size: 13px; line-height: 1; color: #68707a; }
.planning-rep-chips button.s2 { background: var(--amber-soft, #fdf3dc); border-color: #e2b25a; color: #7a4b00; }
.planning-rep-soma { display: flex; justify-content: space-between; gap: 10px; border-top: 1px dashed #cbd5e1; padding-top: 6px; font-size: 12px; font-weight: 700; color: #68707a; flex-wrap: wrap; }
.planning-rep-soma b { color: var(--blue, #1d5f8a); }
.planning-rep-orcado { border: 2px solid #d98a00; background: #fff6e0; border-radius: 10px; padding: 10px 12px 11px; display: grid; gap: 7px; color: #4a3000; }
.planning-rep-orcado p { margin: 0; display: flex; gap: 8px; align-items: flex-start; font-size: 13px; font-weight: 800; color: #171a1d; line-height: 1.35; }
.planning-rep-orcado p svg { width: 17px; height: 17px; flex: none; color: #b36b00; margin-top: 1px; }
.planning-rep-orcado dl { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 0; font-size: 12px; font-weight: 700; }
.planning-rep-orcado dt { color: #5c4a2a; font-weight: 600; }
.planning-rep-orcado dd { margin: 0; padding-left: 14px; text-align: right; font-variant-numeric: tabular-nums; }
.planning-rep-orcado .tot { border-top: 1px dashed #d9b36a; padding-top: 4px; font-weight: 800; color: #171a1d; }
.planning-rep-orcado .acima { color: #a3261d; font-weight: 800; }
.planning-rep-orcado small { font-size: 11px; font-weight: 600; color: #5c4a2a; }
@media (max-width: 720px) {
  .planning-rep-grade { grid-template-columns: 44px repeat(7, minmax(0, 1fr)); gap: 2px; }
  .planning-rep-dia { padding: 3px 3px 4px; }
  .planning-rep-dia b { font-size: 10.5px; }
  .planning-rep-dia em { font-size: 8px; }
}

/* ===== v0481 — Programação de obras: selo e quadro do PRIO (SIAGO 4-8-1); campo SO ===== */
.planning-flag.prio-selo { font-weight: 800; letter-spacing: .01em; border: 1px solid #cfd6de; background: #f1f4f7; color: #4a5560; white-space: nowrap; }
.planning-flag.prio-selo.st-ok { background: #e3f4ec; border-color: #8fcfb2; color: #0e6147; }
.planning-flag.prio-selo.st-warn { background: #fdf3dc; border-color: #e2b25a; color: #7a4b00; }
.planning-flag.prio-selo.st-bad { background: #fde8e6; border-color: #e6a59f; color: #8f231b; }
.planning-prio-quadro { border: 1px solid #cfd6de; border-left: 4px solid #8a94a0; border-radius: 10px; padding: 10px 12px 11px; display: grid; gap: 8px; background: #fafbfc; }
.planning-prio-quadro[hidden] { display: none; }
.planning-prio-quadro.st-ok { border-left-color: #13795b; }
.planning-prio-quadro.st-warn { border-left-color: #d98a00; }
.planning-prio-quadro.st-bad { border-left-color: #c9392f; }
.planning-prio-quadro.st-fora { border-color: #e2b25a; border-left-color: #d98a00; background: #fffaf0; }
.planning-prio-topo { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: #171a1d; }
.planning-prio-topo b { font-weight: 800; }
.planning-prio-topo small { margin-left: auto; font-size: 10.5px; font-weight: 700; color: #68707a; }
.planning-prio-quadro dl { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3px 12px; font-size: 12px; }
.planning-prio-quadro dt { color: #68707a; font-weight: 600; }
.planning-prio-quadro dd { margin: 0; font-weight: 700; color: #171a1d; }
.planning-prio-nota, .planning-prio-msg { margin: 0; display: flex; gap: 7px; align-items: flex-start; font-size: 11.5px; font-weight: 600; color: #4a3000; line-height: 1.45; }
.planning-prio-nota { border-top: 1px dashed #cbd5e1; padding-top: 7px; color: #39424e; }
.planning-prio-nota svg, .planning-prio-msg svg { width: 15px; height: 15px; flex: none; margin-top: 1px; color: #b36b00; }
.planning-prio-nota svg { color: #68707a; }
.planning-prio-msg b { color: #171a1d; }
.planning-prio-acao { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 1px dashed #cbd5e1; padding-top: 8px; }
.planning-prio-acao button { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font-size: 12.5px; padding: 7px 12px; min-height: 0; }
.planning-prio-acao button svg { width: 15px; height: 15px; }
.planning-prio-acao small { font-size: 11px; font-weight: 700; color: #4a5560; }
.planning-dialog-pair.tres { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 620px) { .planning-dialog-pair.tres { grid-template-columns: minmax(0, 1fr); } }
.planning-cell-line.prio-linha { display: block; margin-top: 2px; line-height: 1; }
.planning-cell-line.prio-linha .prio-selo { font-size: 9px; padding: 2px 6px; }

/* ===== v0482 — Programação de obras: Conferência PRIO e horário do PRIO no popup ===== */
.planning-head-btn.prio span { font-size: 9px; font-weight: 800; letter-spacing: .04em; }
.planning-head-btn.prio b { background: #fff; color: #171a1d !important; border-radius: 999px; font-size: 10px; padding: 0 6px; line-height: 15px; }
.planning-prio-hora-nota { display: block; padding-left: 28px; margin-top: -4px; font-size: 11px; font-weight: 600; color: #0e6147; }
.planning-prio-secao { display: grid; gap: 6px; }
.planning-prio-secao + .planning-prio-secao { margin-top: 14px; border-top: 1px solid #e2e8f0; padding-top: 12px; }
.planning-prio-secao h4 { margin: 0; font-size: 13px; font-weight: 800; color: #171a1d; }
.planning-prio-secao h4 b { display: inline-block; margin-left: 6px; min-width: 20px; padding: 1px 7px; border-radius: 999px; background: #e6ebf1; color: #39424e; font-size: 11px; text-align: center; }
.planning-prio-secao > p { margin: 0; font-size: 11.5px; font-weight: 600; color: #68707a; }
/* com o botão da Conferência PRIO os botões não cabem ao lado de "Equipe": vão para uma linha própria, mais baixos, sem aumentar o cabeçalho */


/* ===== v0483 — Programação de obras: "Deixou de produzir", carga da 4-8-1, mudar para o dia do PRIO, Excel da conferência ===== */
.planning-cell-line.nao-produzido { font-weight: 800; color: #8f231b; }
.planning-lista-item small b.np { color: #8f231b; font-weight: 800; }
.planning-head-btn.prio.velha { border-color: #f0b34a; }
.planning-prio-carga-velha { margin: 0 0 10px; display: flex; gap: 8px; align-items: flex-start; border: 1px solid #e2b25a; background: #fffaf0; border-radius: 10px; padding: 9px 11px; font-size: 12px; font-weight: 600; color: #4a3000; line-height: 1.45; }
.planning-prio-carga-velha svg { width: 16px; height: 16px; flex: none; color: #b36b00; margin-top: 1px; }
.planning-prio-excel { display: inline-flex; align-items: center; gap: 7px; }
.planning-prio-excel svg { width: 15px; height: 15px; }

/* ===== v0485 — Ajustes da Programação (documentação aprovada em 15/11/2026) ===== */
/* Ajuste 2: a caixa da lista cortava (overflow hidden) e, por isso, o corpo da janela não crescia nem rolava */
.planning-lista-linhas { overflow: visible; }
.planning-lista-linhas > :first-child { border-top-left-radius: 10px; border-top-right-radius: 10px; }
.planning-lista-linhas > :last-child { border-bottom-left-radius: 10px; border-bottom-right-radius: 10px; }
.planning-lista-body { padding-top: 0; }
.planning-lista-body > :first-child:not(.planning-lista-fixo) { margin-top: 14px; }
.planning-lista-fixo { position: sticky; top: 0; z-index: 3; background: #fff; margin: 0 -16px; padding: 12px 16px 10px; border-bottom: 1px solid #e2e8f0; box-shadow: 0 6px 10px -8px rgba(15, 23, 42, .25); }
.planning-lista-rodape { margin: 0 auto 0 0; font-size: 12px; font-weight: 600; color: #39424e; line-height: 1.4; max-width: 62ch; }
.planning-lista-rodape b { color: #171a1d; }
.planning-lista-rodape b.np { color: #8f231b; }
.planning-lista-rodape:empty { display: none; }
/* Ajuste 3: linha fixa de quatro botões abaixo de "Equipe"; o número fica no canto do botão */
/* altura: o cabeçalho "Equipe" não pode passar da altura das outras colunas do cabeçalho (check-0260: 18 equipes por tela) */
.planning-grid thead th.planning-team-head { padding-top: 5px; padding-bottom: 5px; }
.planning-head-acoes { display: grid; grid-template-columns: 1fr 1fr 1.6fr 1fr; gap: 5px; margin: 3px 0 0; }
.planning-head-acoes .planning-head-btn { position: relative; justify-content: center; height: 18px; padding: 0; gap: 0; }
.planning-head-acoes .planning-head-btn.prio { justify-content: flex-start; padding-left: 5px; }
.planning-head-acoes .planning-head-btn.prio span { font-size: 8.5px; font-weight: 800; letter-spacing: .03em; }
.planning-head-acoes .planning-head-btn b { position: absolute; top: -6px; right: -5px; min-width: 15px; height: 15px; padding: 0 4px; margin: 0; border-radius: 999px; font-size: 9px; line-height: 15px; font-weight: 800; text-align: center; box-shadow: 0 0 0 1.5px #3b4252; }
.planning-head-acoes .planning-head-btn.vazio { opacity: .45; }
.planning-head-acoes .planning-head-btn.revisar.vazio { border-color: rgba(255, 255, 255, .38); }
/* Ajuste 4: medição e percentual em cima, meta embaixo, sem aumentar a barra de filtros */
.planning-resumo-inline.com-meta { display: grid !important; gap: 1px; line-height: 1.05; justify-items: end; white-space: nowrap; }
.planning-resumo-inline.com-meta .l1 { display: flex; gap: 6px; align-items: baseline; }
.planning-resumo-inline.com-meta .l1 b { font-size: .8rem; font-weight: 900; color: #171a1d; }
.planning-resumo-inline.com-meta .l1 em { font-style: normal; font-size: .72rem; font-weight: 900; color: #8a5200; }
.works-planning-view .planning-resumo-inline.com-meta small { display: block !important; font-size: .54rem; font-weight: 800; letter-spacing: .03em; color: #68707a; text-transform: uppercase; }
.planning-resumo-inline.com-meta small b { font-size: inherit; font-weight: 900; color: #39424e; }
