:root {
  --bg: #e9edf2;
  --ink: #15202b;
  --muted: #5b6b7c;
  --card: #ffffff;
  --line: #d7dee7;
  --up: #0f7a4a;
  --down: #b42318;
}

* { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html, body {
  margin: 0;
  padding: 0;
  font-family: "DM Sans", sans-serif;
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
}
.wrap {
  max-width: 1600px;
  margin: 0 auto;
  padding: 1.2rem 1.25rem 2.5rem;
}
.top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}
.brand {
  font-family: "Fraunces", Georgia, serif;
  font-size: 2.1rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.15;
}
.tagline {
  color: var(--muted);
  margin: 0.15rem 0 0;
}
.meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.9rem;
  font-size: 0.92rem;
  color: var(--ink);
}
.meta-muted { color: var(--muted); font-weight: 400; }
.origem-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: end;
  margin-bottom: 0.9rem;
}
.origem-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 0;
  width: fit-content;
  max-width: 100%;
}
.origem-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.6rem 1.15rem;
  border-radius: 9px;
  min-height: 40px;
}
.origem-tab.active {
  background: var(--ink);
  color: #fff;
}
.origem-combo {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.65rem;
  align-items: end;
}
.origem-combo .multi-filtro {
  min-width: 230px;
}
.origem-combo .btn {
  min-height: 44px;
}
.periodo-box {
  background: #f4f7fa;
  border-radius: 10px;
  padding: 0.7rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.92rem;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.periodo-box strong { color: var(--ink); }
.periodo-dias { color: var(--muted); font-variant-numeric: tabular-nums; }
.aviso {
  background: #fff7e8;
  border: 1px solid #f0d59a;
  color: #7a5a12;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin: 0 0 1rem;
  font-size: 0.92rem;
}
h2 {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.35rem;
  margin: 1.4rem 0 0.25rem;
  line-height: 1.2;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  border-radius: 10px;
  padding: 0.7rem 1rem;
  font-weight: 600;
  white-space: nowrap;
  min-height: 44px;
}
.btn-ghost {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-sm {
  min-height: 36px;
  padding: 0.4rem 0.75rem;
  font-size: 0.82rem;
}
.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 0 0 0.45rem;
}
.card-head h2 {
  margin: 0;
}
.export-acoes {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}
body.is-exporting .export-acoes,
body.is-exporting .filtros-acoes {
  visibility: hidden;
}
body.is-exporting .onda-hover,
body.is-exporting .multi-panel,
body.is-exporting .bi-toast {
  display: none !important;
}
body.is-exporting .chart-scroll {
  overflow: visible;
}
.top-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.1rem 1.2rem 1.3rem;
  box-shadow: 0 1px 0 rgba(21, 32, 43, 0.04);
}
.filters {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1rem;
}
.filters-3 {
  grid-template-columns: minmax(200px, 280px) minmax(140px, 180px) 1fr;
}
.filters-4 {
  grid-template-columns: minmax(200px, 280px) minmax(170px, 220px) minmax(280px, 1fr) auto;
}
.filters-prod {
  grid-template-columns: repeat(auto-fit, minmax(200px, 260px));
}
.filters-prod .hint {
  grid-column: 1 / -1;
}
.filters input[type="number"],
.filters input[type="search"],
.filters input[type="date"] {
  font: inherit;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  background: #fff;
  width: 100%;
  min-height: 44px;
}
.card + .card { margin-top: 1rem; }
.obs-block { margin-top: 1.25rem; }
.obs-block h3 {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.15rem;
  margin: 0 0 0.2rem;
}
.chart-sm { min-height: 260px; }
.chart-bars { min-height: 280px; flex: 1; min-width: 280px; }
.chart-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0.25rem 0 0.5rem;
  padding-bottom: 0.15rem;
}
.chart-scroll-y {
  max-height: min(72vh, 820px);
  overflow: auto;
}
.bar-with-skus {
  display: flex;
  align-items: stretch;
  gap: 0.65rem;
  min-width: min(100%, 720px);
}
.sku-label-list {
  list-style: none;
  margin: 0;
  padding: 0;
  width: min(42vw, 300px);
  min-width: 140px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  box-sizing: border-box;
  font-size: 0.72rem;
  line-height: 1.15;
  color: var(--ink);
  user-select: text;
  -webkit-user-select: text;
}
.sku-label-list li {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  min-height: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.sku-code {
  font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
  font-weight: 600;
  color: var(--ink);
  cursor: text;
  user-select: all;
  -webkit-user-select: all;
  flex-shrink: 0;
  max-width: 100%;
}
.sku-code:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.sku-nome {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: text;
  -webkit-user-select: text;
}
.hint-sm {
  font-size: 0.82rem;
  margin: 0.15rem 0 0.35rem;
}
.bi-toast {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%) translateY(120%);
  background: #15202b;
  color: #fff;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
  max-width: min(92vw, 420px);
  box-shadow: 0 8px 24px rgba(21, 32, 43, 0.25);
}
.bi-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.empty.ok {
  background: #eaf7ef;
  color: #0f7a4a;
}
.filters label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 600;
}
.filters select {
  font: inherit;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  background: #fff;
  width: 100%;
  min-height: 44px;
}
.filtro-seg {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}
.filtro-seg-label {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.2;
}
.seg {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 4px;
  min-height: 44px;
  align-items: stretch;
}
.seg-btn {
  font: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 8px;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
  flex: 1 1 auto;
  min-height: 34px;
  white-space: nowrap;
}
.seg-btn:hover { background: #f4f7fa; color: var(--ink); }
.seg-btn.is-on {
  background: #15202b;
  color: #fff;
}
.multi-filtro {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 600;
  z-index: 2;
}
.multi-filtro.is-open { z-index: 30; }
.multi-filtro-largo .multi-panel {
  min-width: min(440px, 92vw);
  right: auto;
}
.multi-filtro-label { line-height: 1.2; }
.multi-toggle {
  font: inherit;
  font-weight: 500;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.65rem 2.1rem 0.65rem 0.75rem;
  background: #fff;
  width: 100%;
  min-height: 44px;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  position: relative;
}
.multi-toggle::after {
  content: "";
  position: absolute;
  right: 0.85rem;
  top: 50%;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #5a6a7a;
  transform: translateY(-40%);
}
.multi-panel {
  position: absolute;
  z-index: 31;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  min-width: 240px;
  max-height: 360px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(21, 32, 43, 0.14);
  padding: 0.4rem;
}
.multi-panel[hidden],
.multi-opt[hidden],
.multi-vazio[hidden] {
  display: none !important;
}
.multi-busca {
  font: inherit;
  font-weight: 500;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
  margin: 0 0 0.35rem;
  width: 100%;
  min-height: 38px;
  background: #fff;
}
.multi-busca:focus {
  outline: 2px solid #15202b;
  outline-offset: 1px;
}
.multi-opts {
  overflow: auto;
  flex: 1 1 auto;
  min-height: 0;
  max-height: 220px;
}
.multi-vazio {
  margin: 0.35rem 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
}
.multi-opt {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 0.55rem;
  font-weight: 500;
  color: var(--ink);
  padding: 0.42rem 0.5rem;
  border-radius: 8px;
  cursor: pointer;
}
.multi-opt:hover { background: #f4f7fa; }
.multi-opt input { width: 1.05rem; height: 1.05rem; accent-color: #15202b; flex: none; }
.multi-acoes {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.4rem;
}
.multi-acoes .btn {
  flex: 1;
  cursor: pointer;
}
.multi-aplicar {
  width: 100%;
  border: 0;
  cursor: pointer;
}
.multi-limpar {
  border: 1px solid var(--line);
}
.filtros-acoes {
  display: flex;
  align-items: end;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.filtros-acoes .btn {
  min-height: 44px;
}
.hint {
  color: var(--muted);
  margin: 0;
  font-size: 0.95rem;
  align-self: center;
  line-height: 1.35;
}
.hint a { color: var(--ink); font-weight: 700; }
.kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.85rem;
}
.kpis-2,
.kpis-3 {
  grid-template-columns: repeat(2, minmax(0, 320px));
  margin: 0.5rem 0 1.2rem;
}
.kpis-1,
.kpis-3 {
  grid-template-columns: repeat(3, minmax(0, 320px));
}
.kpis-1 {
  grid-template-columns: minmax(0, 320px);
}
.kpis-4 {
  grid-template-columns: repeat(4, minmax(0, 300px));
  margin: 0.5rem 0 1.2rem;
}
.kpis-bloco { margin: 0 0 1.15rem; }
.chart + .kpis-bloco,
.empty + .kpis-bloco { margin-top: 1.25rem; }
.kpis-bloco .kpis { margin: 0; }
.kpis-periodo-titulo {
  margin: 0 0 0.55rem;
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--muted);
}
.chart-sub {
  margin: 1.1rem 0 0.25rem;
  font-size: 1.05rem;
  font-weight: 650;
}
.vend-block {
  margin-top: 1.35rem;
}
.vend-block h3 {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
}
.table-wrap {
  overflow-x: auto;
  margin-top: 0.5rem;
}
.vend-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.vend-table th,
.vend-table td {
  text-align: left;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.vend-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.vend-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.vend-table tbody tr:hover {
  background: #f4f7fa;
}
.kpi {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: 0 1px 0 rgba(21, 32, 43, 0.04);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}
.kpi-label {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}
.kpi-value {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  word-break: break-word;
}
.kpi-delta {
  font-size: 0.9rem;
  font-weight: 600;
}
.up { color: var(--up); }
.down { color: var(--down); }
.chart { width: 100%; min-height: 420px; }
.chart-barras-home { min-height: 380px; }
.chart-onda-wrap { position: relative; width: 100%; overflow: hidden; }
.onda-hover {
  position: absolute;
  z-index: 20;
  min-width: min(420px, calc(100vw - 2rem));
  max-width: min(640px, calc(100vw - 1.5rem));
  padding: 0.7rem 0.85rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(21, 32, 43, 0.12);
  pointer-events: none;
  font-size: 0.84rem;
  color: var(--ink);
}
.onda-hover-date {
  font-weight: 700;
  margin-bottom: 0.45rem;
}
.onda-hover-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1.1rem;
}
.onda-hover-h {
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.3rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.onda-hover-row,
.onda-hover-total {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 0.35rem;
  align-items: center;
  padding: 0.12rem 0;
}
.onda-hover-row i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.onda-hover-row span,
.onda-hover-total span {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.onda-hover-row b,
.onda-hover-total b {
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.onda-hover-total {
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--line);
}
.onda-hover-total span,
.onda-hover-total b { color: var(--ink); font-weight: 700; }

.login-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1.5rem 7.5rem;
  position: relative;
  z-index: 1;
}
.login-page {
  --home-yellow: #F5C400;
  --home-ink: #111111;
  --home-muted: #5a5a5a;
  --home-cream: #f7f4ee;
  font-family: Poppins, "DM Sans", sans-serif;
  background-color: var(--home-cream);
  background-image: url("../img/pata-tile.png");
  background-size: 270px 258px;
  background-repeat: repeat;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  color: var(--home-ink);
}
.login-page .home-bar {
  grid-template-columns: auto 1fr;
}
.login-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border: 1px solid #ece8e0;
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(17, 17, 17, 0.07);
  padding: 1.7rem 1.5rem 1.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.login-card .brand {
  font-family: Poppins, "DM Sans", sans-serif;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--home-ink);
}
.login-card .tagline {
  color: var(--home-muted);
  margin: 0;
  font-size: 0.95rem;
}
.login-card label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.88rem;
  color: var(--home-muted);
  font-weight: 600;
}
.login-card input[type="password"],
.login-card input[type="text"] {
  border: 1px solid #ece8e0;
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  font: inherit;
  color: var(--home-ink);
  background: #fff;
  min-height: 44px;
  width: 100%;
}
.login-card .btn {
  width: 100%;
  text-align: center;
  border: 0;
  cursor: pointer;
  margin-top: 0.25rem;
  background: var(--home-yellow);
  color: var(--home-ink);
  font-weight: 700;
  border-radius: 12px;
}
.login-card .btn:hover { filter: brightness(0.97); }
.login-erro {
  margin: 0;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  background: #fdecec;
  color: var(--down);
  font-size: 0.9rem;
}
.login-voltar {
  text-align: center;
  color: var(--home-muted);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
}
.login-voltar:hover { color: var(--home-ink); }
.home-page {
  --home-yellow: #F5C400;
  --home-ink: #111111;
  --home-muted: #5a5a5a;
  --home-cream: #f7f4ee;
  font-family: Poppins, "DM Sans", sans-serif;
  background-color: var(--home-cream);
  background-image: url("../img/pata-tile.png");
  background-size: 270px 258px;
  background-repeat: repeat;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  color: var(--home-ink);
}
.home-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.25rem;
  padding: 1.1rem 2.2rem 0.6rem;
  position: relative;
  z-index: 2;
}
.home-logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--home-ink);
}
.home-logo-img {
  height: 52px;
  width: auto;
  display: block;
}
.home-nav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1.6rem;
  margin-right: 0.4rem;
}
.home-nav a {
  color: var(--home-ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.98rem;
}
.home-nav a:hover { color: #8a6b00; }
.home-sair {
  background: var(--home-yellow);
  color: var(--home-ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.55rem 1.35rem;
  border-radius: 12px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
}
.home-sair:hover { filter: brightness(0.97); }
.home-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.6rem 1.2rem 7.5rem;
  position: relative;
  z-index: 1;
}
.home-titulo {
  margin: 0.4rem 0 0.35rem;
  font-size: clamp(2rem, 4.2vw, 3.15rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  text-align: center;
}
.home-titulo em {
  font-style: normal;
  color: var(--home-yellow);
  -webkit-text-stroke: 0.6px #111;
}
.home-sub {
  margin: 0 0 2.1rem;
  color: var(--home-muted);
  font-size: 1.05rem;
  font-weight: 400;
  text-align: center;
}
.home-areas {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  justify-content: center;
  gap: 1rem;
  width: 100%;
  max-width: 1280px;
}
.home-card {
  background: #fff;
  border: 1px solid #ece8e0;
  border-radius: 18px;
  min-height: 260px;
  padding: 1.25rem 0.85rem 1.05rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: var(--home-ink);
  box-shadow: 0 8px 22px rgba(17, 17, 17, 0.07);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.home-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(17, 17, 17, 0.12);
}
.home-card-icone {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  margin-bottom: 0.85rem;
}
.home-card-icone svg { width: 64px; height: 64px; }
.home-card-nome {
  font-family: inherit;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-shadow: none;
  margin-bottom: 0.35rem;
}
.home-card-desc {
  color: var(--home-muted);
  font-size: 0.86rem;
  line-height: 1.35;
  font-weight: 400;
  min-height: 2.5em;
}
.home-card-seta {
  margin-top: auto;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #ffe27a;
  display: grid;
  place-items: center;
}
.home-card-seta svg { width: 20px; height: 20px; }
.home-onda {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 140px;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  isolation: isolate;
}
.home-onda svg:first-child {
  width: 100%;
  height: 100%;
  display: block;
}
.home-onda::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 56px;
  background: var(--home-yellow);
}
.home-usuario {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
}
.areas-campo {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.6rem 0.75rem 0.7rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.9rem;
  min-width: 0;
}
.areas-campo legend {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0 0.25rem;
}
.areas-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 500;
  white-space: nowrap;
}
.areas-item input { width: auto; min-height: 0; }
button.btn {
  border: 0;
  cursor: pointer;
  font: inherit;
}
.vend-resumo {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
  margin-top: 0.85rem;
}
.vend-loja-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  background: #f8fafc;
  min-height: 88px;
}
.vend-loja-card header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}
.vend-loja-card header strong { color: var(--ink); }
.vend-loja-card header span {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
}
.vend-loja-card ul {
  margin: 0;
  padding: 0 0 0 1.1rem;
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1.45;
}
.vend-vazio {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}
.vend-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(160px, 220px) auto auto;
  gap: 0.75rem 1rem;
  align-items: end;
  margin: 0.85rem 0 0.75rem;
}
.vend-toolbar label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 600;
}
.filters > .btn {
  align-self: end;
  min-height: 44px;
}
.forn-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem 1rem;
  align-items: end;
  margin: 0.85rem 0 0.25rem;
}
.forn-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 600;
}
.forn-form input,
.forn-form select,
.forn-acoes input,
.vend-toolbar input,
.vend-toolbar select,
.vend-table select {
  font: inherit;
  font-weight: 500;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  background: #fff;
  width: 100%;
  min-height: 42px;
}
.vend-table-wrap {
  overflow: auto;
  max-height: 70vh;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.vend-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.vend-table th,
.vend-table td {
  text-align: left;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.vend-table th {
  position: sticky;
  top: 0;
  background: #f4f7fa;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  z-index: 1;
}
.vend-table tbody tr:hover { background: #f8fafc; }
.vend-table tbody tr[hidden] { display: none !important; }
.vend-table td:last-child { min-width: 200px; }
.ordenar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 0.5rem 0 0.6rem;
}
.ordenar-label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  margin-right: 0.15rem;
}
.ordenar .is-ativo {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.tabela-sku td:last-child { min-width: 0; }
.tabela-sku td:nth-child(2) {
  min-width: 220px;
  max-width: 360px;
}
.forn-acoes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin: 0.15rem 0;
}
.forn-acoes input {
  width: auto;
  min-width: 140px;
  min-height: 36px;
  padding: 0.4rem 0.55rem;
}
.empty {
  background: #f4f7fa;
  border-radius: 10px;
  padding: 1rem;
  color: var(--muted);
}
.vars {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.var-item {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.92rem;
  color: var(--muted);
  background: #f4f7fa;
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
}
.var-item strong { color: var(--ink); }
.var-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 0.75rem;
}
.var-metric {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}
.var-metric em {
  font-style: normal;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
}
.conta-nova {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-top: 0.75rem;
}
.conta-nova-campos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem 1rem;
}
.conta-nova-campos label,
.conta-senha label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 600;
}
.conta-nova-campos input,
.conta-senha input {
  font: inherit;
  font-weight: 500;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  background: #fff;
  width: 100%;
  min-height: 42px;
}
.conta-nova-perms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.conta-nova-acao {
  display: flex;
  justify-content: flex-end;
}
.conta-lista {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-top: 0.75rem;
}
.conta-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  background: #fff;
}
.conta-card.is-off { opacity: 0.7; }
.conta-card-topo {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}
.conta-user {
  display: block;
  font-size: 1.05rem;
  color: var(--ink);
}
.conta-nome {
  margin: 0.15rem 0 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.conta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.conta-pill {
  background: #f4f7fa;
  border-radius: 999px;
  padding: 0.18rem 0.6rem;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--ink);
}
.conta-pill.is-aba {
  background: #fff6cc;
}
.conta-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  flex-shrink: 0;
}
.conta-status {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}
.conta-status.is-on { color: #15803d; }
.conta-acesso {
  font-size: 0.78rem;
  color: var(--muted);
}
.conta-edit {
  margin-top: 0.7rem;
  border-top: 1px solid var(--line);
  padding-top: 0.45rem;
}
.conta-edit summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--ink);
  list-style: none;
}
.conta-edit summary::-webkit-details-marker { display: none; }
.conta-edit summary::after {
  content: " ▾";
  color: var(--muted);
}
.conta-edit[open] summary::after { content: " ▴"; }
.conta-edit-corpo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: 1rem;
  margin-top: 0.75rem;
}
.conta-edit-lado {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.conta-senha {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.conta-edit-form .btn { margin-top: 0.75rem; }

@media (max-width: 1200px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .wrap { padding: 1rem 0.9rem 2rem; }
  .home-areas { grid-template-columns: repeat(2, minmax(0, 240px)); }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .filters, .filters-3, .filters-4, .filters-prod { grid-template-columns: 1fr; gap: 0.75rem; }
  .vend-toolbar,
  .forn-form,
  .conta-nova-campos,
  .conta-nova-perms,
  .conta-edit-corpo { grid-template-columns: 1fr; }
  .conta-card-topo { flex-direction: column; }
  .conta-meta { align-items: flex-start; }
  .kpis-1,
  .kpis-2,
  .kpis-3,
  .kpis-4 { grid-template-columns: 1fr; }
  .filters .hint { align-self: start; }
  .filtros-acoes .btn { flex: 1; }
  .vars { grid-template-columns: 1fr; }
  .top { flex-direction: column; align-items: stretch; }
  .top-actions { width: 100%; }
  .top-actions .btn { flex: 1; }
  .chart { min-height: 320px; }
  .chart-barras-home { min-height: 300px; }
  .chart-sm { min-height: 220px; }
  .onda-hover-cols { grid-template-columns: 1fr; }
  .onda-hover { font-size: 0.8rem; }
  .chart-scroll .chart-bars {
    min-width: 420px;
  }
  .bar-with-skus { min-width: 640px; }
  .sku-label-list {
    width: 180px;
    font-size: 0.68rem;
  }
}

@media (max-width: 560px) {
  .wrap { padding: 0.75rem 0.7rem 1.75rem; }
  .brand { font-size: 1.45rem; }
  .tagline { font-size: 0.86rem; }
  .card { padding: 0.9rem 0.85rem 1.05rem; border-radius: 12px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
  .kpi { padding: 12px; }
  .kpi-value { font-size: 1.2rem; }
  .kpi-label { font-size: 0.78rem; }
  .kpi-delta { font-size: 0.8rem; }
  h2 { font-size: 1.15rem; margin-top: 1.1rem; }
  .hint { font-size: 0.86rem; }
  .meta-bar {
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.86rem;
    padding: 0.7rem 0.85rem;
  }
  .var-metrics { grid-template-columns: 1fr 1fr; }
  .home-bar {
    grid-template-columns: 1fr auto;
    padding: 0.9rem 1rem 0.4rem;
    gap: 0.7rem;
  }
  .login-page .home-bar { grid-template-columns: auto 1fr; }
  .login-wrap { padding: 1rem 1rem 6.5rem; }
  .home-nav { display: none; }
  .home-main { padding: 1.1rem 1rem 6.5rem; }
  .home-areas { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; }
  .home-card { min-height: 220px; padding: 1rem 0.8rem 0.95rem; }
  .home-card-nome { font-size: 1.1rem; }
  .home-logo-img { height: 42px; }
  .home-onda { height: 90px; }
  .login-wrap { padding: 1rem; }
  .login-card { padding: 1.25rem 1.1rem 1.15rem; }
  .btn { padding: 0.65rem 0.85rem; font-size: 0.92rem; }
  .export-acoes { width: 100%; }
  .export-acoes .btn { flex: 1; }
  .chart-scroll .chart-bars { min-width: 380px; }
  .bar-with-skus { min-width: 560px; }
  .sku-label-list { width: 150px; }
}

@media (max-width: 380px) {
  .kpis { grid-template-columns: 1fr; }
  .top-actions { flex-direction: column; }
  .top-actions .btn { width: 100%; }
}
