/* Zahren 0.10 · integridade, relatórios e leitura executiva */
.brand-mark {
  width: 50px;
  height: 50px;
  padding: 2px;
  overflow: visible;
  border: 1px solid rgba(225, 38, 47, .24);
  background: #fff;
  box-shadow: 0 9px 24px rgba(19, 19, 22, .12);
}
.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(.88);
  transform-origin: center;
  filter:
    drop-shadow(1px 0 0 rgba(255,255,255,.95))
    drop-shadow(-1px 0 0 rgba(255,255,255,.95))
    drop-shadow(0 1px 0 rgba(255,255,255,.95))
    drop-shadow(0 -1px 0 rgba(255,255,255,.95))
    drop-shadow(0 5px 7px rgba(0,0,0,.2));
}
.auth-brand .brand-mark { width: 66px; height: 66px; }

.insight-card,
[data-theme="dark"] .insight-card {
  color: #f7fbff;
  background: linear-gradient(145deg, #111114, #27272c 58%, #9f1821);
}
.insight-card h2,
.insight-card p,
.insight-card .eyebrow { color: #f7fbff; }
.insight-card p { opacity: .88; }

.metric-bars > div > small {
  display: block;
  margin: 3px 0 7px;
  color: var(--muted);
  font-size: 11px;
}
.chart-series-legend { display: flex; gap: 16px; justify-content: flex-end; padding: 2px 10px 0; font-size: 11px; color: var(--muted); }
.chart-series-legend span::before { content: ""; display: inline-block; width: 17px; height: 3px; margin-right: 5px; vertical-align: middle; border-radius: 5px; }
.chart-series-legend .total::before { background: #12b8aa; }
.chart-series-legend .white::before { background: #e1262f; }
.chart-series-legend .portable::before { background: #19191d; }
.donut-legend span small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; }

.report-model-builder[open] { border-color: rgba(18,184,170,.38); }
.model-form-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.export-favorites { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: var(--soft); }
.export-favorites > div:first-child { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.export-favorites label { display: grid; gap: 6px; font-weight: 700; }

.phase-filter-panel { margin-bottom: 16px; }
.phase-filter-grid { display: grid; grid-template-columns: minmax(150px,1fr) auto minmax(150px,1fr) minmax(220px,1.4fr) auto auto; gap: 12px; align-items: end; }
.phase-filter-grid > span { align-self: center; padding-bottom: 10px; font-size: 24px; color: var(--teal); }
.phase-filter-grid label { display: grid; gap: 6px; font-weight: 750; }

.sync-map { margin-top: 18px; }
.sync-map-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.sync-map-grid article { display: grid; gap: 6px; min-height: 118px; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: var(--soft); }
.sync-map-grid article > strong { font-size: 15px; }
.sync-map-grid article > span { color: var(--teal); font-weight: 800; font-size: 12px; }
.sync-map-grid article > small { color: var(--muted); line-height: 1.45; }

/* Identidade Zahren · vermelho, preto e branco */
:root {
  --teal: #e1262f;
  --teal-dark: #b71822;
  --teal-soft: #fff0f1;
  --red: #e1262f;
  --red-soft: #fff0f1;
  --navy-950: #111114;
  --navy-900: #1b1b1f;
  --navy-800: #2b2b31;
  --v4-cyan: #e1262f;
}

body {
  background:
    radial-gradient(circle at 83% 3%, rgba(225, 38, 47, .08), transparent 29%),
    radial-gradient(circle at 54% 0%, rgba(17, 17, 20, .045), transparent 23%),
    #f6f6f7;
}

.sidebar {
  border-right: 1px solid #e2e2e5;
  background: linear-gradient(180deg, #fff 0%, #f8f8f9 58%, #efeff1 100%);
  color: #111114;
  box-shadow: 15px 0 42px rgba(17, 17, 20, .07);
}

.brand > div:last-child strong { color: #111114; }
.brand > div:last-child span,
.nav-label { color: #777780; }

.nav-item { color: #4b4b53; }
.nav-item span { color: #777780; }
.nav-item:hover {
  background: #f0f0f2;
  color: #111114;
}
.nav-item.active {
  background: linear-gradient(100deg, #e1262f, #bd1822);
  color: #fff;
  border-color: rgba(225, 38, 47, .3);
  box-shadow: 0 8px 20px rgba(225, 38, 47, .18), inset 3px 0 0 #111114;
}
.nav-item.active::before { background: #fff; box-shadow: none; }
.nav-item.active span { color: #fff; }
.nav-item.active em {
  background: rgba(255,255,255,.2);
  color: #fff;
}
.nav-item em {
  background: #e8e8eb;
  color: #55555e;
}

.connection-card {
  border-color: #dedee2;
  background: #fff;
}
.connection-line { color: #1c1c20; }
.connection-card p { color: #6f6f78; }
.connection-card small { color: #8a8a92; }

.topbar {
  border-bottom-color: rgba(202, 202, 207, .8);
  background: rgba(255,255,255,.94);
  box-shadow: 0 7px 24px rgba(17,17,20,.045);
}

.btn-primary {
  border-color: #b71822;
  background: linear-gradient(180deg, #ed3039, #c51b25);
  color: #fff;
  box-shadow: 0 7px 17px rgba(225,38,47,.2);
}
.btn-primary:hover { box-shadow: 0 10px 24px rgba(225,38,47,.28); }
.theme-toggle:hover { border-color: #e1262f; color: #b71822; }

.kpi-card.teal { border-top-color: #e1262f; background: linear-gradient(145deg, #fff0f1, #fff); }
.metric-bars u,
.metric-bars.teal u { background: linear-gradient(90deg, #e1262f, #7f1018); }
.program-pulse button {
  border-color: #f0c5c8;
  background: linear-gradient(135deg, #fff5f5, #fff);
}
.program-pulse strong { color: #b71822; }
.coverage-track i { background: linear-gradient(90deg, #e1262f, #202025); }
.export-context,
.export-help,
.flow-map,
.parts-update-scope { border-color: #ead5d7; background: linear-gradient(135deg, #fff5f5, #fafafa); }

[data-theme="dark"] body {
  --canvas: #0e0e11;
  --card: #18181d;
  --ink: #f6f6f7;
  --muted: #b1b1b9;
  --soft: #8d8d96;
  --line: #34343b;
  --teal-soft: #3b171b;
  background: #0e0e11;
}
[data-theme="dark"] .sidebar {
  border-right-color: #34343a;
  background: linear-gradient(180deg, #242429 0%, #19191d 62%, #111114 100%);
  color: #fff;
}
[data-theme="dark"] .brand > div:last-child strong { color: #fff; }
[data-theme="dark"] .brand > div:last-child span,
[data-theme="dark"] .nav-label { color: #aaaab2; }
[data-theme="dark"] .brand-mark { background: #fff; border-color: rgba(255,255,255,.28); }
[data-theme="dark"] .nav-item { color: #d1d1d6; }
[data-theme="dark"] .nav-item span { color: #aaaab2; }
[data-theme="dark"] .nav-item:hover { background: #2e2e34; color: #fff; }
[data-theme="dark"] .nav-item.active { background: linear-gradient(100deg, #e1262f, #a8111a); color: #fff; }
[data-theme="dark"] .connection-card { border-color: #3c3c43; background: #202025; }
[data-theme="dark"] .connection-line { color: #fff; }
[data-theme="dark"] .topbar { background: rgba(24,24,29,.94); border-bottom-color: #34343b; }
[data-theme="dark"] .program-pulse button,
[data-theme="dark"] .export-context,
[data-theme="dark"] .export-help,
[data-theme="dark"] .flow-map,
[data-theme="dark"] .parts-update-scope { background: #241a1d; border-color: #5b292f; }
[data-theme="dark"] .program-guard,
[data-theme="dark"] .program-confirm-panel,
[data-theme="dark"] .report-runner {
  border-color: #3b3b43;
  background: #1b1b20;
  color: #f7f7f8;
}
[data-theme="dark"] .program-guard strong,
[data-theme="dark"] .program-confirm-panel h2,
[data-theme="dark"] .report-runner h2 { color: #fff; }
[data-theme="dark"] .program-guard span,
[data-theme="dark"] .program-confirm-panel > p,
[data-theme="dark"] .report-runner > p,
[data-theme="dark"] .report-runner label { color: #bdbdc5; }
[data-theme="dark"] .program-confirm-panel input,
[data-theme="dark"] .program-confirm-panel textarea,
[data-theme="dark"] .program-confirm-panel select,
[data-theme="dark"] .report-runner select {
  border-color: #474750;
  background: #24242a;
  color: #fff;
}

@media (max-width: 1050px) {
  .phase-filter-grid { grid-template-columns: 1fr 30px 1fr; }
  .phase-filter-grid .multi-filter, .phase-filter-grid .btn { grid-column: auto / span 1; }
  .sync-map-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .export-favorites > div:first-child { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .sync-map-grid { grid-template-columns: 1fr; }
}

.report-preview-modal {
  width: min(1180px, calc(100vw - 30px));
  height: calc(100vh - 30px);
  max-height: none;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}
.report-preview-modal iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #d9dadd;
}
.report-preview-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  background: var(--card);
}

/* Cadastro intencional de modelos: a tela só abre pelo botão da Programação. */
.report-model-modal {
  width: min(1180px, calc(100vw - 34px));
  max-height: calc(100vh - 34px);
  overflow-y: auto;
  background: var(--card);
}
.modal-head .icon-btn { pointer-events: auto; filter: none; }
.report-model-modal .report-model-builder {
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 22px 24px 28px;
}
.report-model-builder-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
  padding: 0 2px 14px;
}
.report-model-builder-head span { color: var(--muted); }

/* Tempo entre status: o painel precisa permitir que o menu múltiplo transborde. */
.phase-filter-panel {
  position: relative;
  z-index: 25;
  overflow: visible;
}
.phase-registration-grid {
  grid-template-columns: minmax(190px, 1fr) 34px minmax(190px, 1fr) auto;
  padding: 18px 20px 10px;
}
.phase-client-filter {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(300px, 1.2fr);
  align-items: center;
  gap: 18px;
  padding: 10px 20px 20px;
}
.phase-client-filter > div:first-child { display: grid; gap: 4px; }
.phase-client-filter small { color: var(--muted); line-height: 1.45; }
.phase-client-filter .multi-filter { z-index: 40; }
.phase-client-filter .multi-filter > div { z-index: 60; width: min(520px, 82vw); }
.phase-saved-panel { margin-bottom: 16px; }
.phase-saved-list { display: grid; gap: 11px; padding: 18px 20px 22px; }
.phase-saved-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfcfd;
  padding: 13px 15px;
}
.phase-saved-card.active { border-color: var(--teal); box-shadow: 0 0 0 2px color-mix(in srgb, var(--teal) 14%, transparent); }
.phase-saved-main {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 5px 16px;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 4px 3px;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.phase-saved-main > span { font-weight: 850; }
.phase-saved-main > span b { color: var(--teal); }
.phase-saved-main > strong { color: var(--teal-dark); font-size: 20px; }
.phase-saved-main > small { grid-column: 1 / -1; color: var(--muted); line-height: 1.45; }
.phase-details-panel { margin-top: 16px; }

/* Respiro interno comum: evita textos encostados nos limites dos cards. */
.kpi-card,
.phase-kpis article,
.capacity-kpis article,
.manager-summary article,
.batch-card,
.decision-tile,
.client-picking-cards article {
  padding-left: max(17px, 1.1vw);
  padding-right: max(17px, 1.1vw);
}
.kpi-card *,
.phase-kpis article *,
.capacity-kpis article *,
.manager-summary article *,
.batch-card *,
.decision-tile * { overflow-wrap: anywhere; }

[data-theme="dark"] .phase-saved-card { background: #202025; }
[data-theme="dark"] .report-model-modal { background: #18181d; }
[data-theme="dark"] .report-model-modal .modal-head,
[data-theme="dark"] .report-model-modal .report-model-builder {
  border-color: #34343b;
  background: #18181d;
  color: #f6f6f7;
}
[data-theme="dark"] .report-model-modal .report-model-builder-head,
[data-theme="dark"] .report-model-modal .model-sort-row {
  border-color: #34343b;
}
[data-theme="dark"] .report-model-modal .model-core-grid label,
[data-theme="dark"] .report-model-modal .model-layout-grid label,
[data-theme="dark"] .report-model-modal .model-sort-row label {
  color: #d1d1d6;
}
[data-theme="dark"] .report-model-modal .model-core-grid input,
[data-theme="dark"] .report-model-modal .model-layout-grid input,
[data-theme="dark"] .report-model-modal .model-layout-grid select,
[data-theme="dark"] .report-model-modal .model-sort-row select {
  border-color: #474750;
  background: #24242a;
  color: #fff;
}
[data-theme="dark"] .report-model-modal .model-field-grid label,
[data-theme="dark"] .report-model-modal .saved-report-models article {
  border-color: #3b3b43;
  background: #202025;
  color: #f1f1f3;
}
[data-theme="dark"] .report-model-modal .model-sort-builder {
  border-color: #3b3b43;
  background: #1e1e23;
}
[data-theme="dark"] .report-model-modal .report-model-help {
  border-color: #5b292f;
  background: #241a1d;
  color: #d6d6dc;
}

/* 0.10.0-test.15 · hierarquia visual, respiro e leitura operacional */
.page-heading {
  gap: 22px;
  margin-bottom: 18px;
  border: 1px solid #e4e4e8;
  border-radius: 18px;
  background: linear-gradient(112deg, #fff 0%, #fbfbfc 64%, #fff1f2 100%);
  padding: 22px 24px;
  box-shadow: 0 10px 28px rgba(17, 17, 20, .055);
}
.page-heading > div:first-child { min-width: 260px; padding: 2px 0; }
.page-heading h1 { margin-top: 5px; }
.page-heading p { max-width: 760px; line-height: 1.55; }
.page-heading .page-actions { gap: 10px; align-items: stretch; }
.page-heading .page-actions .btn {
  min-width: 162px;
  min-height: 43px;
  padding-inline: 16px;
}

.panel-head { min-height: 70px; padding: 16px 20px; }
.panel-head h2 { font-size: 15px; }
.panel-head p { margin-top: 4px; font-size: 11px; line-height: 1.45; }
.panel > .table-wrap {
  width: auto;
  margin: 14px 16px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.panel > .pagination { padding: 2px 18px 17px; }
.metric-bars { padding: 12px 20px 20px; }
.trend-chart.single-line { padding: 10px 18px 16px; }
.donut-chart { padding-inline: 18px; }
.filter-bar {
  gap: 12px;
  margin-bottom: 16px;
  border-radius: 15px;
  padding: 14px 16px;
  box-shadow: 0 6px 18px rgba(17,17,20,.035);
}
.filter-bar label { display: grid; gap: 5px; color: var(--muted); font-size: 10px; font-weight: 800; }
.filter-bar input,
.filter-bar select { height: 43px; padding-inline: 13px; }

.kpi-card,
.phase-kpis article,
.capacity-kpis article,
.manager-summary article,
.batch-card,
.decision-tile,
.client-picking-cards article,
.scope-list > div,
.sync-map-grid article,
.drawer-summary > div,
.detail-grid > div,
.finalized-mini-card {
  box-sizing: border-box;
  padding-left: 20px;
  padding-right: 20px;
}
.client-picking-cards article { padding-top: 15px; padding-bottom: 15px; }
.scope-list { padding: 16px 18px 20px; }
.phase-average-list,
.phase-saved-list { padding-left: 20px; padding-right: 20px; }
.phase-source-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 16px;
  border: 1px solid #b9e3d6;
  border-left: 5px solid #159462;
  border-radius: 14px;
  background: #f0faf6;
  padding: 14px 18px;
}
.phase-source-banner div { display: grid; gap: 4px; }
.phase-source-banner strong { color: #0d6747; font-size: 12px; }
.phase-source-banner span,
.phase-source-banner small { color: #53675f; font-size: 10px; line-height: 1.45; }
.phase-source-banner > small { flex: 0 0 auto; font-weight: 800; }
.phase-source-banner.is-error { border-color: #efc2c7; border-left-color: #d74859; background: #fff3f4; }

.history-list { display: grid; gap: 9px; padding: 14px 16px 18px; }
.history-list > div {
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: 12px;
  padding: 14px 16px;
}
.history-list > .history-reserved {
  border-left-color: #159462;
  background: #edf9f3;
}
.history-list > .history-reserved strong,
.history-list > .history-reserved time { color: #0c7149; }
.history-list > .history-waiting {
  border-left-color: #d9a11d;
  background: #fff8df;
}
.history-list > .history-waiting strong,
.history-list > .history-waiting time { color: #8a6307; }
.history-list > .history-repeat-old {
  border-left-color: #d74859;
  background: #fff0f2;
}

.finalized-primary-kpis,
.finalized-people-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.finalized-secondary-kpis {
  display: grid;
  grid-template-columns: repeat(7, minmax(145px, 1fr));
  gap: 10px;
  margin: 0 0 16px;
  overflow-x: auto;
  padding: 2px 1px 7px;
}
.finalized-mini-card {
  min-height: 104px;
  border: 1px solid var(--line);
  border-top: 3px solid #8c8c96;
  border-radius: 14px;
  background: var(--card);
  padding-top: 14px;
  padding-bottom: 14px;
  box-shadow: 0 7px 20px rgba(17,17,20,.045);
}
.finalized-mini-card > span,
.finalized-mini-card > strong,
.finalized-mini-card > small { display: block; }
.finalized-mini-card > span { color: var(--muted); font-size: 10px; font-weight: 850; text-transform: uppercase; }
.finalized-mini-card > strong { margin-top: 7px; color: var(--ink); font-size: 23px; }
.finalized-mini-card > small { margin-top: 6px; color: var(--soft); font-size: 9px; line-height: 1.35; }
.finalized-mini-card.amber { border-top-color: #d9a11d; }
.finalized-mini-card.red { border-top-color: #d74859; }
.finalized-mini-card.purple { border-top-color: #7655f8; }
.finalized-mini-card.blue { border-top-color: #4667dc; }
.finalized-people-charts .chart-panel { min-height: 350px; }

.chart-series-legend { padding: 3px 4px 3px; }
.chart-series-legend .total::before { background: #12b8aa; }
.chart-series-legend .white::before { background: #4667dc; }
.chart-series-legend .portable::before { background: #f0a229; }

.sync-map-grid article {
  min-height: 132px;
  border-color: #dedee3;
  background: #f7f7f9;
  padding-top: 18px;
  padding-bottom: 18px;
}
.sync-map-grid article > span { color: #bd1822; }
.sync-map-grid article > small { color: #62626c; }

[data-theme="dark"] .page-heading {
  border-color: #34343b;
  background: linear-gradient(112deg, #1b1b20, #202025 66%, #32171b);
}
[data-theme="dark"] .history-list > .history-reserved { border-color: #236f51; background: #162c23; }
[data-theme="dark"] .history-list > .history-waiting { border-color: #8c6a1d; background: #302817; }
[data-theme="dark"] .history-list > .history-repeat-old { border-color: #8f3540; background: #331b20; }
[data-theme="dark"] .sync-map-grid article { border-color: #3b3b43; background: #202025; }
[data-theme="dark"] .sync-map-grid article > small { color: #b6b6bf; }
[data-theme="dark"] .phase-source-banner { border-color: #285e4c; background: #152821; }
[data-theme="dark"] .phase-source-banner strong { color: #69d6ad; }
[data-theme="dark"] .phase-source-banner span,
[data-theme="dark"] .phase-source-banner small { color: #b7cfc6; }

@media (max-width: 1280px) {
  .finalized-primary-kpis,
  .finalized-people-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .page-heading { padding: 18px; }
  .page-heading .page-actions .btn { min-width: 0; width: 100%; }
  .panel > .table-wrap { margin-inline: 10px; }
  .finalized-primary-kpis,
  .finalized-people-kpis { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .phase-registration-grid,
  .phase-client-filter { grid-template-columns: 1fr; }
  .phase-registration-grid > span { display: none; }
  .phase-saved-main { grid-template-columns: 1fr; }
  .phase-saved-main > small { grid-column: 1; }
}

/* Cabeçalho único · mesma espessura e ações sempre contidas no card */
.page-heading {
  display: grid;
  grid-template-columns: minmax(230px, 340px) minmax(0, 1fr);
  width: 100%;
  height: 176px;
  min-height: 176px;
  align-items: center;
  gap: 22px;
  overflow: hidden;
  box-sizing: border-box;
}

.page-heading.without-page-actions {
  grid-template-columns: minmax(0, 1fr);
}

.page-heading > .heading-copy {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 0;
  padding: 0;
}

.page-heading .heading-meta {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
  margin-bottom: 3px;
}

.page-heading .heading-meta .eyebrow {
  min-width: 0;
}

.page-heading .heading-meta .scope-chip {
  flex: 0 0 auto;
  margin: 0;
}

.page-heading h1 {
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  line-height: 1.12;
}

.page-heading p {
  display: -webkit-box;
  min-width: 0;
  max-width: none;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.page-heading .page-actions {
  display: grid;
  grid-template-columns: repeat(var(--heading-action-count), minmax(0, 172px));
  width: 100%;
  min-width: 0;
  max-width: none;
  align-items: stretch;
  justify-content: end;
  gap: 10px;
  margin: 0;
}

.page-heading .page-actions:empty {
  display: none;
}

.page-heading.many-page-actions {
  grid-template-columns: minmax(190px, 260px) minmax(0, 1fr);
}

.page-heading.many-page-actions .page-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 48px;
  max-width: 620px;
  align-content: center;
  row-gap: 8px;
}

.page-heading .page-actions .btn {
  display: inline-flex;
  width: 100%;
  min-width: 0;
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  overflow: hidden;
  line-height: 1.12;
  white-space: normal;
}

@media (max-width: 1180px) {
  .page-heading {
    grid-template-columns: minmax(190px, 270px) minmax(0, 1fr);
    gap: 16px;
    padding-inline: 20px;
  }

  .page-heading .page-actions {
    gap: 8px;
  }

  .page-heading .page-actions .btn {
    padding-inline: 6px;
    font-size: 12px;
  }
}

@media (max-width: 900px) {
  .page-heading,
  .page-heading.without-page-actions {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    height: 196px;
    min-height: 196px;
    align-content: center;
    gap: 12px;
  }

  .page-heading.without-page-actions {
    grid-template-rows: minmax(0, 1fr);
  }

  .page-heading .page-actions {
    grid-template-columns: repeat(var(--heading-action-count), minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .page-heading,
  .page-heading.without-page-actions {
    height: auto;
    min-height: 176px;
    overflow: visible;
  }

  .page-heading.many-page-actions {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
  }

  .page-heading .page-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-heading.many-page-actions .page-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
  }

  .page-heading .page-actions .btn {
    min-width: 0;
  }
}

/* Menus múltiplos: uma opção por linha, com checkbox e nome lado a lado. */
.multi-filter > div > label,
.filter-bar .multi-filter > div > label {
  display: flex !important;
  grid-template-columns: none !important;
  width: 100%;
  min-height: 38px;
  align-items: center;
  gap: 10px;
  padding: 8px 9px;
  box-sizing: border-box;
}

.multi-filter > div > label input[type="checkbox"],
.filter-bar .multi-filter > div > label input[type="checkbox"] {
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  margin: 0;
  padding: 0;
}

.multi-filter > div > label span {
  display: block;
  min-width: 0;
  flex: 1 1 auto;
  line-height: 1.35;
  text-align: left;
}

/* Indicadores compactos das carteiras de Picking e Aguardando peças. */
.operational-snapshot {
  display: grid;
  gap: 11px;
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--card);
  padding: 14px 16px;
  box-shadow: 0 8px 24px rgba(22, 35, 55, .045);
}

.snapshot-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.snapshot-heading > div { display: grid; gap: 3px; }
.snapshot-heading > strong { color: var(--ink); }
.snapshot-heading > b { color: var(--teal-dark); font-size: 16px; white-space: nowrap; }

.snapshot-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.purchase-coverage-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.snapshot-cards article {
  display: grid;
  min-width: 0;
  gap: 4px;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 11px;
  background: #fbfcfd;
  padding: 10px 12px;
}

.snapshot-cards article > span { color: var(--muted); font-size: 10px; font-weight: 850; text-transform: uppercase; }
.snapshot-cards article > strong { color: var(--ink); font-size: 21px; line-height: 1; }
.snapshot-cards article > small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.snapshot-cards .tone-green { border-left-color: #20a66a; }
.snapshot-cards .tone-blue { border-left-color: #3974f6; }
.snapshot-cards .tone-amber { border-left-color: #ef9d25; }
.snapshot-cards .tone-red { border-left-color: #df4b5f; }

[data-theme="dark"] .operational-snapshot,
[data-theme="dark"] .snapshot-cards article {
  border-color: var(--line);
  background: var(--card);
}

@media (max-width: 820px) {
  .snapshot-cards,
  .purchase-coverage-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .snapshot-heading { align-items: flex-start; }
  .snapshot-cards,
  .purchase-coverage-cards { grid-template-columns: 1fr; }
}
