@media screen and (min-width: 900px) {
  .dashboard-shell {
    zoom: 0.75;
    min-height: 133.333vh;
  }

  .dashboard-shell .sidebar {
    min-height: 133.333vh;
  }
}
/* Radar XML: acabamento dedicado para o tema escuro. */
html[data-content-theme="dark"] .dashboard-content .radar-page .radar-tabs{border-bottom-color:#3d5069;gap:6px}
html[data-content-theme="dark"] .dashboard-content .radar-page .radar-tabs a{background:#202c3e;border-color:#3d5069;color:#b9c8da}
html[data-content-theme="dark"] .dashboard-content .radar-page .radar-tabs a:hover{background:#26364b;color:#fff}
html[data-content-theme="dark"] .dashboard-content .radar-page .radar-tabs a.is-active{background:#1767b7;border-color:#4388cf;color:#fff}
html[data-content-theme="dark"] .dashboard-content .radar-page :where(.radar-key-card,.radar-list-card){background:#172033;border-color:#35445a;box-shadow:0 8px 20px rgba(0,0,0,.12)}
html[data-content-theme="dark"] .dashboard-content .radar-page .radar-card-heading .eyebrow{color:#8fb8ed}
html[data-content-theme="dark"] .dashboard-content .radar-page .radar-key-hint{background:#24354c;border:1px solid #466485;color:#d8e8fb}
html[data-content-theme="dark"] .dashboard-content .radar-page .radar-batch-bar{border-top-color:#35445a}
html[data-content-theme="dark"] .dashboard-content .radar-page .radar-table-wrap{background:#141d2b;border-color:#3a4a61}
html[data-content-theme="dark"] .dashboard-content .radar-page .radar-table tbody tr{background:#172033}
html[data-content-theme="dark"] .dashboard-content .radar-page .radar-table tbody tr:nth-child(even){background:#1b2637}
html[data-content-theme="dark"] .dashboard-content .radar-page .radar-table tbody tr:hover{background:#223149}
html[data-content-theme="dark"] .dashboard-content .radar-page .radar-copy-key{color:#62a8f3}
html[data-content-theme="dark"] .dashboard-content .radar-page :where(.radar-party small,.radar-key-cell small){color:#9eafc4}
html[data-content-theme="dark"] .dashboard-content .radar-page :where(.radar-status,.radar-import){border:1px solid transparent;border-radius:4px}
html[data-content-theme="dark"] .dashboard-content .radar-page :where(.radar-status-autorizada,.radar-import.is-imported){background:#173c30;border-color:#286c54;color:#8de0b9}
html[data-content-theme="dark"] .dashboard-content .radar-page :where(.radar-status-cancelada,.radar-status-erro){background:#472326;border-color:#804149;color:#ffb3ba}
html[data-content-theme="dark"] .dashboard-content .radar-page :where(.radar-status-resumo,.radar-status-aguardando_xml,.radar-import.is-waiting){background:#493b1d;border-color:#80682f;color:#f1d580}
html[data-content-theme="dark"] .dashboard-content .radar-page .radar-import.is-ready{background:#18385e;border-color:#376da7;color:#a9d0ff}
html[data-content-theme="dark"] .dashboard-content .radar-page .radar-actions .button.dark{background:#202c3e;border-color:#73849a;color:#fff}
html[data-content-theme="dark"] .dashboard-content .radar-page .radar-actions .button.dark:hover{background:#2a3a50;border-color:#9aa9bb}

:root {
  font-family: Inter, system-ui, Arial, sans-serif;
  --insight-blue-900: #0a2f63;
  --insight-blue-800: #0d3f84;
  --insight-blue-700: #1254aa;
  --insight-blue-600: #1d67c2;
  --insight-surface: #ffffff;
  --insight-bg: #eff4fb;
  --insight-bg-soft: #f7faff;
  --insight-border: #d8e2f1;
  --insight-border-strong: #b8cae4;
  --insight-text: #0f172a;
  --insight-text-soft: #475569;
  --insight-dark: #0b1220;
  --insight-danger-bg: #fef2f2;
  --insight-danger-text: #b91c1c;
  --insight-danger-border: #fecaca;
}

.financeiro-filters {
  display: grid;
  grid-template-columns: minmax(190px, 1.1fr) minmax(180px, 1fr) 145px 145px 130px 130px 110px;
  gap: 0.85rem;
  align-items: end;
  margin-bottom: 1rem;
}

.financeiro-filters label,
.financeiro-filters button,
.financeiro-page .inline-form label,
.financeiro-page .inline-form button {
  margin-bottom: 0;
}

.financeiro-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.finance-kpi {
  border: 0;
  color: #fff;
  min-height: 104px;
  overflow: hidden;
  position: relative;
}

.finance-kpi::after {
  content: "";
  position: absolute;
  width: 88px;
  height: 88px;
  right: -18px;
  top: -20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
}

.finance-kpi span {
  display: block;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
  font-size: 0.86rem;
}

.finance-kpi strong {
  color: #fff;
  font-size: clamp(1.15rem, 1.6vw, 1.65rem);
  margin-top: 0.5rem;
}

.finance-kpi.dark { background: linear-gradient(135deg, #050a14 0%, #09234b 100%); }
.finance-kpi.success { background: linear-gradient(135deg, #0d7a3f 0%, #19a05a 100%); }
.finance-kpi.danger { background: linear-gradient(135deg, #991b1b 0%, #dc2626 100%); }
.finance-kpi.warn { background: linear-gradient(135deg, #6b4c00 0%, #d19700 100%); }
.finance-kpi.info { background: linear-gradient(135deg, #0b56b3 0%, #123d78 100%); }

.finance-dashboard-card.saldo-anterior span,
.finance-dashboard-card.saldo-anterior strong {
  color: #020617;
}

.finance-dashboard {
  display: grid;
  gap: 1rem;
}

.finance-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
}

.finance-dashboard-card {
  position: relative;
  overflow: hidden;
  min-height: 104px;
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, #050a14 0%, #09234b 100%);
}

.finance-dashboard-card::after {
  content: "";
  position: absolute;
  right: -26px;
  top: -32px;
  width: 96px;
  height: 96px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
}

.finance-dashboard-card span {
  display: block;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.finance-dashboard-card strong {
  display: block;
  margin-top: 0.45rem;
  color: #fff;
  font-size: clamp(1.15rem, 1.6vw, 1.7rem);
}

.finance-dashboard-card small {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 0.3rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.78rem;
  font-weight: 800;
}

.finance-dashboard-card.success { background: linear-gradient(135deg, #0d7a3f 0%, #19a05a 100%); }
.finance-dashboard-card.danger { background: linear-gradient(135deg, #991b1b 0%, #dc2626 100%); }
.finance-dashboard-card.warn { background: linear-gradient(135deg, #6b4c00 0%, #d19700 100%); }
.finance-dashboard-card.info { background: linear-gradient(135deg, #0b56b3 0%, #123d78 100%); }

.finance-dashboard-panels {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.5fr);
  gap: 1rem;
  align-items: stretch;
}

.cartao-config-panels {
  grid-template-columns: minmax(320px, 1fr) minmax(360px, 1fr);
}

.cartao-dashboard-panels {
  grid-template-columns: minmax(360px, 1.25fr) minmax(300px, 0.75fr);
}

.cartao-dashboard-list {
  display: grid;
  gap: 0.65rem;
}

.cartao-dashboard-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem;
  border: 1px solid var(--insight-border);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(11, 86, 179, 0.08), rgba(248, 250, 252, 0.95));
}

.cartao-dashboard-row strong {
  color: var(--insight-text);
  font-size: 0.95rem;
}

.cartao-dashboard-row small {
  display: block;
  margin-top: 0.2rem;
  color: var(--insight-text-soft);
  font-weight: 700;
}

.cartao-dashboard-value {
  min-width: 118px;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: #06111f;
  color: #fff;
  font-weight: 900;
  text-align: center;
}

.cartao-dashboard-empty {
  padding: 0.85rem;
  border: 1px dashed var(--insight-border);
  border-radius: 12px;
  color: var(--insight-text-soft);
  font-weight: 800;
}

.cartao-sales-report {
  display: grid;
  gap: 0.9rem;
}

.cartao-report-totals {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.cartao-report-totals .finance-dashboard-card {
  min-height: 96px;
  padding: 0.9rem;
}

.cartao-sales-report-table tbody tr {
  transition: background 0.18s ease, transform 0.18s ease;
}

.cartao-sales-report-table tbody tr:hover {
  background: rgba(11, 86, 179, 0.05);
}

.cartao-sales-report-table td strong {
  color: var(--insight-blue-900);
}

.cartao-sales-report-table tfoot th {
  background: #06111f;
  color: #fff;
  font-size: 0.9rem;
}

.cartao-sales-report-table tfoot th:first-child {
  border-radius: 0 0 0 12px;
}

.cartao-sales-report-table tfoot th:last-child {
  border-radius: 0 0 12px 0;
}



.financeiro-page .table-wrap {
  overflow-x: auto;
  scrollbar-gutter: stable;
}

.finance-table-scrollbar {
  position: sticky;
  top: 0;
  z-index: 4;
  height: 14px;
  margin: 0.15rem 0 0.35rem;
  overflow-x: auto;
  overflow-y: hidden;
  background: linear-gradient(180deg, rgba(245, 249, 255, 0.95), rgba(245, 249, 255, 0.65));
  border-radius: 999px;
}

.finance-table-scrollbar div {
  height: 1px;
}

.cartao-recebiveis-table .cartao-recebivel-actions {
  display: grid;
  grid-template-columns: minmax(96px, 1fr);
  gap: 0.35rem;
}

.cartao-recebiveis-table .cartao-recebivel-actions .inline-form {
  display: block;
  margin: 0;
}

.cartao-recebiveis-table .cartao-recebivel-actions .button {
  width: 100%;
}

@media (max-width: 760px) {
  .finance-table-scrollbar {
    display: none;
  }
}

.cartao-recebiveis-table {
  overflow-x: auto;
}

.cartao-recebiveis-table .pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0.2rem 0 0.45rem;
  font-size: 0.86rem;
}

.cartao-recebiveis-table .pagination .button {
  min-height: 30px;
  padding: 0.35rem 0.55rem;
  font-size: 0.78rem;
}

.cartao-recebiveis-table table {
  width: 100%;
  min-width: 1180px;
  table-layout: fixed;
  font-size: 0.78rem;
}

.cartao-recebiveis-table th,
.cartao-recebiveis-table td {
  padding: 0.48rem 0.42rem;
  vertical-align: middle;
  overflow-wrap: anywhere;
  word-break: normal;
}

.cartao-recebiveis-table th {
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

.cartao-recebiveis-table td small {
  font-size: 0.7rem;
  line-height: 1.35;
}

.cartao-recebiveis-table td:nth-child(1) { width: 8%; }
.cartao-recebiveis-table td:nth-child(2) { width: 10%; }
.cartao-recebiveis-table td:nth-child(3) { width: 7.5%; }
.cartao-recebiveis-table td:nth-child(4) { width: 10%; }
.cartao-recebiveis-table td:nth-child(5) { width: 4.5%; }
.cartao-recebiveis-table td:nth-child(6) { width: 7%; }
.cartao-recebiveis-table td:nth-child(7) { width: 7%; }
.cartao-recebiveis-table td:nth-child(8) { width: 7.5%; }
.cartao-recebiveis-table td:nth-child(9) { width: 8%; }
.cartao-recebiveis-table td:nth-child(10) { width: 8%; }
.cartao-recebiveis-table td:nth-child(11) { width: 22.5%; }

.cartao-recebiveis-table .badge {
  padding: 0.32rem 0.55rem;
  font-size: 0.7rem;
  white-space: nowrap;
}

.cartao-recebiveis-table .inline-form {
  gap: 0.35rem;
  align-items: center;
  margin-bottom: 0.45rem;
}

.cartao-recebiveis-table .inline-form:last-child {
  margin-bottom: 0;
}

.cartao-recebiveis-table .inline-form input,
.cartao-recebiveis-table .inline-form select {
  min-height: 30px;
  padding: 0.34rem 0.45rem;
  font-size: 0.78rem;
}

.cartao-recebiveis-table .inline-form .button {
  min-height: 30px;
  padding: 0.34rem 0.5rem;
  font-size: 0.74rem;
  white-space: nowrap;
}

@media (max-width: 1280px) {
  .cartao-recebiveis-table table {
    font-size: 0.72rem;
  }

  .cartao-recebiveis-table th,
  .cartao-recebiveis-table td {
    padding: 0.42rem 0.34rem;
  }
}

.finance-inner-tabs {
  margin-top: -0.25rem;
  margin-bottom: 0.25rem;
}

.cartao-taxa-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  align-items: end;
}

.cartao-taxa-form > label {
  min-width: 0;
}

.cartao-taxa-form .cartao-bandeiras-box,
.cartao-taxa-form .cartao-prazo-presets,
.cartao-taxa-form .form-actions {
  grid-column: 1 / -1;
}

.cartao-autorizadora-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 0.85rem;
}

.cartao-conta-filter {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(320px, 1fr);
  gap: 0.75rem;
  align-items: end;
}

.cartao-conta-filter label {
  margin-bottom: 0;
}

.cartao-conta-filter .search-inline {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 0.5rem;
  align-items: end;
}

.cartao-conta-filter .search-inline .button {
  min-height: 42px;
}

.cartao-autorizadora-card {
  grid-template-columns: 1fr;
  align-items: stretch;
  min-height: 176px;
  padding: 1rem;
  background: linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%);
}

.cartao-autorizadora-card > div {
  display: grid;
  gap: 0.35rem;
}

.cartao-autorizadora-card strong {
  color: var(--insight-blue-900);
  font-size: 1.18rem;
}

.cartao-autorizadora-card select,
.cartao-autorizadora-card button {
  width: 100%;
}

.cartao-loja-pill {
  display: inline-block;
  width: fit-content;
  margin-top: 0.35rem;
  padding: 0.22rem 0.5rem;
  border: 1px solid rgba(18, 84, 170, 0.18);
  border-radius: 999px;
  background: #eaf2ff;
  color: var(--insight-blue-900);
  font-weight: 800;
}

.cartao-prazo-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.cartao-prazo-presets strong {
  color: var(--insight-blue-900);
  font-size: 0.86rem;
}

.cartao-prazo-presets span {
  padding: 0.35rem 0.6rem;
  border: 1px solid rgba(18, 84, 170, 0.18);
  border-radius: 999px;
  background: #eef6ff;
  color: var(--insight-blue-900);
  font-size: 0.82rem;
  font-weight: 850;
}

.finance-chart-card,
.finance-balance-card {
  display: grid;
  gap: 0.8rem;
}

.finance-card-section {
  display: grid;
  gap: 0.75rem;
}

.finance-list-stack {
  display: grid;
  gap: 0.7rem;
}

.finance-row-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.2fr) auto;
  gap: 0.7rem;
  align-items: end;
  padding: 0.85rem;
  border: 1px solid var(--insight-border);
  border-radius: 8px;
  background: var(--insight-bg-soft);
}

.finance-row-form.cartao-autorizadora-card {
  grid-template-columns: 1fr;
  align-items: stretch;
}

.finance-row-form strong,
.finance-row-form small {
  display: block;
}

.finance-row-form small {
  color: var(--insight-text-soft);
  margin-top: 0.2rem;
}

.finance-section-head.compact {
  margin-bottom: 0.6rem;
}

.finance-section-head.compact p {
  margin: 0.2rem 0 0;
  color: var(--insight-text-soft);
  font-size: 0.84rem;
}

.finance-section-head.compact h4 {
  margin: 0;
}

.cartao-bandeiras-box {
  padding: 0.85rem;
  border: 1px solid var(--insight-border);
  border-radius: 8px;
  background: var(--insight-bg-soft);
}

.cartao-bandeiras-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 0.65rem;
  max-height: 390px;
  overflow: auto;
  padding-right: 0.25rem;
}

.cartao-bandeira-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem;
  align-items: center;
  min-height: 58px;
  padding: 0.65rem;
  border: 1px solid var(--insight-border-strong);
  border-radius: 8px;
  background: #fff;
  margin: 0;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.cartao-bandeira-card:hover {
  border-color: var(--insight-blue-600);
  box-shadow: 0 10px 22px rgba(18, 84, 170, 0.12);
  transform: translateY(-1px);
}

.cartao-bandeira-card:has(input:checked) {
  border-color: var(--insight-blue-600);
  background: #eaf2ff;
  box-shadow: inset 0 0 0 1px rgba(18, 84, 170, 0.16);
}

.cartao-bandeira-card input {
  width: 18px;
  height: 18px;
}

.cartao-bandeira-card span,
.cartao-bandeira-card small {
  grid-column: 2;
}

.cartao-bandeira-card span {
  font-weight: 900;
}

.cartao-bandeira-card small {
  color: var(--insight-text-soft);
  margin-top: -0.25rem;
}

.cartao-empty-bandeiras {
  margin: 0.75rem 0 0;
  color: var(--insight-text-soft);
  font-weight: 800;
}

@media (max-width: 980px) {
  .cartao-taxa-form {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
}

@media (max-width: 640px) {
  .cartao-taxa-form,
  .cartao-autorizadora-grid {
    grid-template-columns: 1fr;
  }
}

.finance-chart-card h3,
.finance-balance-card h3 {
  margin: 0;
}

.finance-bar-row {
  display: grid;
  gap: 0.35rem;
}

.finance-bar-row > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--insight-text);
}

.finance-bar-row > div span {
  color: var(--insight-text-soft);
  font-weight: 800;
}

.finance-bar-row i {
  display: block;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5edf8;
}

.finance-bar-row em {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.finance-bar-row .bar-success { background: linear-gradient(90deg, #16a34a, #22c55e); }
.finance-bar-row .bar-danger { background: linear-gradient(90deg, #b91c1c, #ef4444); }
.finance-bar-row .bar-warn { background: linear-gradient(90deg, #b7791f, #facc15); }

.finance-balance-card {
  align-content: start;
}

.finance-balance-card p {
  margin: 0;
  color: var(--insight-text-soft);
}

.finance-balance-card div {
  padding: 0.85rem;
  border-radius: 8px;
  background: #f3f7ff;
}

.finance-balance-card div span {
  display: block;
  color: var(--insight-text-soft);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.finance-balance-card div strong {
  display: block;
  margin-top: 0.25rem;
  color: var(--insight-blue-800);
  font-size: 1.25rem;
}

.financeiro-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(420px, 0.85fr);
  align-items: start;
}

.financeiro-config {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.financeiro-page .inline-form {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(140px, 1fr) auto;
  gap: 0.45rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.financeiro-page .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0.25rem 0.58rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.78rem;
}

.financeiro-page .badge.success {
  background: #dcfce7;
  color: #166534;
}

.financeiro-page .badge.danger {
  background: #fee2e2;
  color: #991b1b;
}

.financeiro-page .badge.warn {
  background: #fef3c7;
  color: #92400e;
}

@media (max-width: 980px) {
  .financeiro-filters,
  .financeiro-kpis,
  .finance-dashboard-panels,
  .financeiro-grid,
  .financeiro-config {
    grid-template-columns: 1fr;
  }

  .financeiro-page .inline-form {
    grid-template-columns: 1fr;
  }
}

.financeiro-page .bank-card > strong {
  color: #fff;
}

.financeiro-page .finance-kpi strong,
.financeiro-page .finance-kpi span {
  color: #fff;
}

.financeiro-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0 0 1rem;
}

.financeiro-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--insight-border);
  border-radius: 8px;
  background: #fff;
  color: var(--insight-text);
  font-weight: 800;
}

.financeiro-tabs a.is-active {
  color: #fff;
  border-color: var(--insight-blue-700);
  background: linear-gradient(135deg, #050a14 0%, #09234b 55%, var(--insight-blue-800) 100%);
}

.finance-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.2rem 0.25rem 0.85rem;
  margin-bottom: 0.35rem;
}

.finance-section-head h3 {
  margin: 0;
}

.financeiro-page .table-wrap {
  padding: 1rem;
}

.financeiro-page .table-wrap table {
  margin-top: 0.35rem;
}

.finance-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  margin: 0.7rem 0;
  color: var(--insight-text-soft);
  font-weight: 700;
}

.finance-pager strong {
  color: var(--insight-text);
}

.finance-bank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.bank-card {
  display: grid;
  gap: 0.85rem;
  border-color: #b8d2f7;
}

.bank-card > div:first-child span {
  color: var(--insight-text-soft);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.bank-card h3 {
  margin: 0.18rem 0;
}

.bank-card > strong {
  display: block;
  padding: 0.85rem;
  border-radius: 8px;
  background: linear-gradient(135deg, #050a14 0%, #123d78 100%);
  color: #fff;
  font-size: 1.45rem;
}

.bank-card-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.bank-card-stats span {
  padding: 0.55rem;
  border-radius: 8px;
  background: var(--insight-bg-soft);
  color: var(--insight-text-soft);
  font-size: 0.78rem;
}

.bank-card-stats b {
  display: block;
  margin-top: 0.2rem;
  color: var(--insight-text);
}

.add-bank-card {
  border-style: dashed;
}

.finance-modal[hidden] {
  display: none;
}

.finance-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(3, 10, 23, 0.62);
}

.finance-modal-panel {
  position: relative;
  width: min(980px, 100%);
  max-height: min(86vh, 840px);
  overflow: auto;
  padding: 1rem;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(3, 10, 23, 0.32);
}

.finance-modal-panel.compact {
  width: min(680px, 100%);
}

.finance-modal-close {
  position: absolute;
  right: 0.75rem;
  top: 0.75rem;
  width: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 999px;
  background: var(--insight-dark);
}

.finance-person-search {
  display: grid;
  grid-template-columns: 180px minmax(220px, 1fr) 120px;
  gap: 0.7rem;
  align-items: end;
  margin-bottom: 0.8rem;
}

.finance-person-search label,
.finance-person-search button {
  margin-bottom: 0;
}

.finance-person-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}

.finance-person-results button {
  display: grid;
  justify-items: start;
  min-height: 58px;
  padding: 0.65rem;
  border: 1px solid var(--insight-border);
  background: var(--insight-bg-soft);
  color: var(--insight-text);
}

.finance-person-results button small {
  color: var(--insight-text-soft);
}

@media (max-width: 760px) {
  .finance-section-head,
  .finance-person-search,
  .finance-row-form,
  .cartao-conta-filter,
  .cartao-conta-filter .search-inline {
    grid-template-columns: 1fr;
    display: grid;
  }

  .bank-card-stats {
    grid-template-columns: 1fr;
  }
}

.purchase-summary-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.purchase-supplier-grid { display: grid; gap: 14px; }
.purchase-supplier-card { background: #fff; border: 1px solid #c8d8ec; border-left: 4px solid #1767b7; border-radius: 7px; break-inside: avoid; overflow: hidden; }
.purchase-supplier-header { align-items: center; background: #eef5fd; border-bottom: 1px solid #c8d8ec; display: grid; gap: 18px; grid-template-columns: minmax(240px, 1fr) minmax(500px, 1.35fr); padding: 14px 16px; }
.purchase-supplier-title { min-width: 0; }
.purchase-supplier-title > span { color: #536b8d; display: block; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.purchase-supplier-title h3 { color: #10233e; font-size: 16px; line-height: 1.3; margin: 3px 0; overflow-wrap: anywhere; }
.purchase-supplier-title small { color: #607089; font-size: 11px; }
.purchase-supplier-metrics { display: grid; gap: 8px; grid-template-columns: repeat(4, minmax(90px, 1fr)); margin: 0; }
.purchase-supplier-metrics div { background: #fff; border: 1px solid #d4dfed; border-radius: 5px; min-width: 0; padding: 8px 10px; }
.purchase-supplier-metrics div.is-total { border-color: #8bb2e3; }
.purchase-supplier-metrics dt { color: #607089; font-size: 10px; font-weight: 700; margin: 0 0 3px; }
.purchase-supplier-metrics dd { color: #10233e; font-size: 13px; font-weight: 800; margin: 0; overflow-wrap: anywhere; }
.purchase-items-wrap { overflow-x: auto; }
.purchase-items-table { font-size: 12px; min-width: 860px; width: 100%; }
.purchase-items-table th { background: #f7f9fc; color: #40536d; font-size: 10px; text-transform: uppercase; }
.purchase-items-table td, .purchase-items-table th { padding: 9px 12px; }
.purchase-items-table td:nth-child(n+4), .purchase-items-table th:nth-child(n+4) { text-align: right; }
.purchase-supplier-footer { align-items: center; background: #f8fafc; border-top: 1px solid #dbe4ef; display: flex; gap: 22px; justify-content: flex-end; padding: 10px 16px; }
.purchase-supplier-footer span { color: #607089; font-size: 11px; }
.purchase-supplier-footer strong { color: #10233e; font-size: 13px; margin-left: 5px; }

@media (max-width: 1180px) {
    .purchase-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .purchase-supplier-header { align-items: stretch; grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .purchase-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .purchase-supplier-header { gap: 12px; padding: 12px; }
    .purchase-supplier-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .purchase-items-wrap { overflow: visible; padding: 10px; }
    .purchase-items-table { display: block; min-width: 0; }
    .purchase-items-table thead { display: none; }
    .purchase-items-table tbody { display: grid; gap: 8px; }
    .purchase-items-table tr { border: 1px solid #d4dfed; border-radius: 5px; display: grid; overflow: hidden; }
    .report-page .purchase-items-table td { align-items: start; border: 0; border-bottom: 1px solid #e5ebf3; display: grid; gap: 8px; grid-template-columns: 92px minmax(0, 1fr); padding: 8px 9px; text-align: left; white-space: normal; }
    .report-page .purchase-items-table td:last-child { border-bottom: 0; }
    .purchase-items-table td::before { color: #607089; content: attr(data-label); font-size: 10px; font-weight: 800; text-transform: uppercase; }
    .purchase-supplier-footer { align-items: stretch; flex-direction: column; gap: 6px; }
    .purchase-supplier-footer span { display: flex; justify-content: space-between; }
}

@media print {
    .purchase-summary-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .purchase-supplier-grid { gap: 8px; }
    .purchase-supplier-card { border-color: #9ca3af; box-shadow: none; }
    .purchase-supplier-header { background: #f3f4f6; gap: 10px; grid-template-columns: 1fr 1.4fr; padding: 8px 10px; }
    .purchase-supplier-title h3 { font-size: 12px; }
    .purchase-supplier-metrics { gap: 4px; }
    .purchase-supplier-metrics div { padding: 5px 6px; }
    .purchase-items-table { font-size: 9px; min-width: 0; }
    .purchase-items-table td, .purchase-items-table th { padding: 5px 6px; white-space: normal; }
    .purchase-supplier-footer { padding: 6px 10px; }
}

/* Tema escuro restrito ao conteudo; o menu lateral mantem suas cores originais. */
html[data-content-theme="dark"] .dashboard-content,
html[data-content-theme="dark"] .modal-overlay,
html[data-content-theme="dark"] dialog {
  --insight-surface: #172033;
  --insight-bg: #0f1724;
  --insight-bg-soft: #202c3e;
  --insight-border: #35445a;
  --insight-border-strong: #52627a;
  --insight-text: #edf3fb;
  --insight-text-soft: #b5c2d3;
  --insight-dark: #070d17;
  color-scheme: dark;
  color: var(--insight-text);
}

html[data-content-theme="dark"] .dashboard-content { background: var(--insight-bg); }

html[data-content-theme="dark"] .dashboard-content :where(h1,h2,h3,h4,h5,h6,p,label,strong,small,span,legend,td,dt,dd),
html[data-content-theme="dark"] .modal-overlay :where(h1,h2,h3,h4,h5,h6,p,label,strong,small,span,legend,td,dt,dd),
html[data-content-theme="dark"] dialog :where(h1,h2,h3,h4,h5,h6,p,label,strong,small,span,legend,td,dt,dd) {
  border-color: var(--insight-border);
  color: var(--insight-text);
}

html[data-content-theme="dark"] .dashboard-content :where(.card,.section-page,.summary-card,.table-wrap,.topbar,fieldset,.modal-card,.dashboard-panel,.report-card,.form-section),
html[data-content-theme="dark"] .modal-overlay :where(.modal-card,.card,.summary-card,fieldset),
html[data-content-theme="dark"] dialog :where(.modal-card,.card,.summary-card,fieldset) {
  background-color: var(--insight-surface);
  border-color: var(--insight-border);
  color: var(--insight-text);
}

html[data-content-theme="dark"] .dashboard-content :where(input,select,textarea),
html[data-content-theme="dark"] .modal-overlay :where(input,select,textarea),
html[data-content-theme="dark"] dialog :where(input,select,textarea) {
  background: var(--insight-bg-soft);
  border-color: var(--insight-border-strong);
  color: var(--insight-text);
}

html[data-content-theme="dark"] .dashboard-content :where(input,textarea)::placeholder,
html[data-content-theme="dark"] .modal-overlay :where(input,textarea)::placeholder,
html[data-content-theme="dark"] dialog :where(input,textarea)::placeholder { color: #8fa0b7; }

html[data-content-theme="dark"] .dashboard-content input[readonly],
html[data-content-theme="dark"] .dashboard-content input:disabled,
html[data-content-theme="dark"] .dashboard-content select:disabled,
html[data-content-theme="dark"] .dashboard-content textarea:disabled {
  background: #131c2a;
  color: #9eacc0;
}

html[data-content-theme="dark"] .dashboard-content :where(th,.table-card-header),
html[data-content-theme="dark"] .modal-overlay th,
html[data-content-theme="dark"] dialog th {
  background: #202c3e;
  color: #cbd7e7;
  border-color: var(--insight-border);
}

html[data-content-theme="dark"] .dashboard-content :where(td,tr,table),
html[data-content-theme="dark"] .modal-overlay :where(td,tr,table),
html[data-content-theme="dark"] dialog :where(td,tr,table) { border-color: var(--insight-border); }

html[data-content-theme="dark"] .dashboard-content tbody tr:hover { background: #202c3e; }

html[data-content-theme="dark"] .dashboard-content :where(.shortcut-card,.fechamento-card,.fechamento-card-header,.fechamento-card-footer,.fechamento-status,.transform-report-note,.purchase-supplier-card,.purchase-supplier-metrics div,.coupon-report-card,.form-subsection,.radar-row-imported,.radar-row-waiting) {
  background: #1b2637;
  border-color: var(--insight-border);
  color: var(--insight-text);
}

html[data-content-theme="dark"] .dashboard-content :where(.muted,.topbar p,.topbar-actions>span,.section-header p,.summary-card h3,.shortcut-card p,.form-subsection-header p) { color: var(--insight-text-soft); }
html[data-content-theme="dark"] .dashboard-content :where(.topbar h1,.summary-card h3,.summary-card strong,.shortcut-card h3,.report-store-stocks strong) { color: var(--insight-text); }
html[data-content-theme="dark"] .dashboard-content .topbar-logo { background: #ffffff; }

html[data-content-theme="dark"] .dashboard-content :where(.product-data-group,.product-data-pricing,.imendes-product-panel,.fiscal-credit-option) {
  background: #1b2637;
  border-color: var(--insight-border);
}

html[data-content-theme="dark"] .dashboard-content :where(
  .sync-progress-card,
  .imendes-return-card,
  .imendes-loading-card,
  .checkbox-card,
  .promotion-club-card,
  .cartao-bandeira-card,
  .finance-modal-panel,
  .cesta-open-metrics article,
  .butcher-formula-result-row,
  .store-participant-card,
  .store-participants-toolbar,
  .store-stock-total,
  .nfe-data-group,
  .license-card,
  .license-inline,
  .business-active-toggle,
  .radar-manifest-form,
  .radar-manifest-options label
) {
  background: #1b2637;
  border-color: var(--insight-border);
  color: var(--insight-text);
}

html[data-content-theme="dark"] .dashboard-content :where(.sync-progress-head strong,#sync-percent) { color: #9fc5ff; }
html[data-content-theme="dark"] .dashboard-content :where(.sync-progress-head span,.sync-steps,.checkbox-card small,.promotion-club-info small,.imendes-return-card small) { color: var(--insight-text-soft); }
html[data-content-theme="dark"] .dashboard-content :where(.store-participants-toolbar>span,.store-participant-card small) { color: var(--insight-text-soft); }
html[data-content-theme="dark"] .dashboard-content :where(.store-stock-total,.store-participant-card strong) { color: var(--insight-text); }

html[data-content-theme="dark"] .dashboard-content .cesta-open-panel {
  background: #1b2637;
  border-color: var(--insight-border);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

html[data-content-theme="dark"] .dashboard-content .cesta-open-main :where(.eyebrow,h3) {
  color: var(--insight-text);
}

html[data-content-theme="dark"] .dashboard-content .cesta-open-main p,
html[data-content-theme="dark"] .dashboard-content .cesta-open-metrics span {
  color: var(--insight-text-soft);
}

html[data-content-theme="dark"] .dashboard-content .cesta-open-metrics strong {
  color: var(--insight-text);
}

html[data-content-theme="dark"] .dashboard-content .purchase-count-page {
  background: #0f1724;
  color: var(--insight-text);
}

html[data-content-theme="dark"] .dashboard-content .purchase-count-panel,
html[data-content-theme="dark"] .dashboard-content .purchase-quantity-card,
html[data-content-theme="dark"] .dashboard-content .purchase-link-card {
  background: #172033;
  border-color: var(--insight-border);
  color: var(--insight-text);
}

html[data-content-theme="dark"] .dashboard-content .purchase-count-page :where(h2,h3,strong,span,td) {
  color: var(--insight-text);
}

html[data-content-theme="dark"] .dashboard-content .purchase-count-page :where(.purchase-count-header p,.muted-text,.purchase-quantity-code) {
  color: var(--insight-text-soft);
}

html[data-content-theme="dark"] .dashboard-content .status-pill {
  background: #17345a;
  border: 1px solid #4777ad;
  color: #dceaff;
}

html[data-content-theme="dark"] .dashboard-content .selection-card,
html[data-content-theme="dark"] .dashboard-content .form-summary {
  background: #1b2637;
  border-color: var(--insight-border);
  color: var(--insight-text);
}

html[data-content-theme="dark"] .dashboard-content .selection-card :where(strong,small),
html[data-content-theme="dark"] .dashboard-content .form-summary :where(strong,small) {
  color: var(--insight-text);
}

html[data-content-theme="dark"] .dashboard-content :where(
  .checkbox-card:has(input:checked),
  .promotion-club-card.is-selected,
  .store-participant-card:has(input:checked),
  .cartao-bandeira-card:has(input:checked),
  .radar-manifest-options label:has(input:checked)
) {
  background: #17345a;
  border-color: #5591dc;
  color: #f4f8ff;
}

html[data-content-theme="dark"] .dashboard-content :where(
  .checkbox-card:has(input:checked),
  .promotion-club-card.is-selected,
  .store-participant-card:has(input:checked),
  .cartao-bandeira-card:has(input:checked),
  .radar-manifest-options label:has(input:checked)
) :where(strong,span,small) { color: #f4f8ff; }

html[data-content-theme="dark"] .dashboard-content .checkbox-card:has(input:checked),
html[data-content-theme="dark"] .dashboard-content .promotion-club-card.is-selected,
html[data-content-theme="dark"] .dashboard-content .store-participant-card:has(input:checked),
html[data-content-theme="dark"] .dashboard-content .store-participant-card.is-selected,
html[data-content-theme="dark"] .dashboard-content .cartao-bandeira-card:has(input:checked),
html[data-content-theme="dark"] .dashboard-content .radar-manifest-options label:has(input:checked) {
  background: #17345a;
  border-color: #5591dc;
}

html[data-content-theme="dark"] .dashboard-content :where(.product-data-group h3,.imendes-product-panel h3,.form-section legend,.form-subsection-header h3) {
  color: #9fc5ff;
}

html[data-content-theme="dark"] .dashboard-content :where(.imendes-product-panel p,.fiscal-credit-option small) {
  color: var(--insight-text-soft);
}

html[data-content-theme="dark"] .dashboard-content :where(.product-cost-field input,.product-sale-field input,.product-sale-secondary-field input) {
  background: #202c3e;
  border-color: var(--insight-border-strong);
  color: var(--insight-text);
}

html[data-content-theme="dark"] .dashboard-content .module-option-card {
  background: #202c3e;
  border-color: var(--insight-border);
}

html[data-content-theme="dark"] .dashboard-content .module-option-card strong { color: var(--insight-text); }

html[data-content-theme="dark"] .dashboard-content a:not(.button):not(.module-option-card) { color: #8fc0ff; }
html[data-content-theme="dark"] .dashboard-content .button.dark {
  background: #ffffff;
  border: 1px solid #ffffff;
  color: #111111;
}
html[data-content-theme="dark"] .dashboard-content .button.dark:hover {
  background: #e8edf4;
  border-color: #e8edf4;
  filter: none;
}

html[data-content-theme="dark"] .dashboard-content :where(.module-option-card.is-active,.integration-primary-card) {
  background: #edf4ff;
  border-color: #9cbbe2;
}

html[data-content-theme="dark"] .dashboard-content :where(.module-option-card.is-active,.integration-primary-card) strong {
  color: #0a2f63;
}

html[data-content-theme="dark"] .financeiro-page :where(.cartao-dashboard-row,.cartao-autorizadora-card,.cartao-prazo-presets span,.finance-balance-card div,.financeiro-tabs a,.finance-person-results button) {
  background: #1b2637;
  border-color: var(--insight-border);
  color: var(--insight-text);
}

html[data-content-theme="dark"] .financeiro-page :where(.cartao-loja-pill,.finance-table-scrollbar) {
  background: #202c3e;
  border-color: var(--insight-border);
  color: var(--insight-text);
}

html[data-content-theme="dark"] .financeiro-page :where(.finance-dashboard-card,.finance-kpi) :where(strong,span,small),
html[data-content-theme="dark"] .financeiro-page .finance-dashboard-card.saldo-anterior :where(strong,span,small) {
  color: #ffffff;
}

html[data-content-theme="dark"] .financeiro-page .financeiro-tabs a.is-active {
  background: linear-gradient(135deg,#07111f 0%,#123d78 100%);
  border-color: #4f83c4;
  color: #ffffff;
}

html[data-content-theme="dark"] .financeiro-page .badge.success { background:#174b32;color:#b9f6d2;border-color:#2f7653; }
html[data-content-theme="dark"] .financeiro-page .badge.danger { background:#552128;color:#ffd0d5;border-color:#8b3a45; }
html[data-content-theme="dark"] .financeiro-page .badge.warn { background:#554315;color:#ffe9a6;border-color:#8a6e25; }

html[data-content-theme="dark"] .finance-modal .finance-modal-panel {
  background: #172033;
  border: 1px solid var(--insight-border);
  color: var(--insight-text);
}

html[data-content-theme="dark"] .dashboard-content .dashboard-kpi-card:not(.dashboard-kpi-primary) {
  background: linear-gradient(135deg,#1b2637 0%,#202f45 100%);
  border-color: var(--insight-border);
}

html[data-content-theme="dark"] .dashboard-content .dashboard-kpi-card:not(.dashboard-kpi-primary) :where(h3,strong,span) { color: var(--insight-text); }
html[data-content-theme="dark"] .dashboard-content .dashboard-bar-track { background:#2a3a52; }

html[data-content-theme="dark"] .dashboard-content :where(.dashboard-rank-row,.dashboard-payment-row,.dashboard-cancel-row) {
  background:#1b2637;
  border-color:var(--insight-border);
}

html[data-content-theme="dark"] .dashboard-content :where(.dashboard-rank-info strong,.dashboard-cancel-row strong,.dashboard-rank-value,.dashboard-payment-row strong) { color:var(--insight-text); }
html[data-content-theme="dark"] .dashboard-content :where(.dashboard-rank-info span,.dashboard-cancel-row span,.dashboard-payment-row span) { color:var(--insight-text-soft); }
html[data-content-theme="dark"] .dashboard-content :where(.dashboard-rank-track,.dashboard-mini-track) { background:#2a3a52; }

html[data-content-theme="dark"] .dashboard-content .license-dashboard-alert,
html[data-content-theme="dark"] .dashboard-content .license-dashboard-alert :where(strong,span,small) {
  color:#533800;
}

html[data-content-theme="dark"] .dashboard-content .license-dashboard-alert b { color:#ffffff; }

html[data-content-theme="dark"] .dashboard-content :where(.metric-card,.info-grid>div,.totals-grid>span) {
  background:#1b2637;
  border-color:var(--insight-border);
  color:var(--insight-text);
}

html[data-content-theme="dark"] .dashboard-content :where(.metric-card:hover,.metric-card.is-active) {
  background:#17345a;
  border-color:#5591dc;
}

html[data-content-theme="dark"] .dashboard-content .etiqueta-selection-bar {
  background:#1b2637 !important;
  border-color:var(--insight-border) !important;
  color:var(--insight-text) !important;
}

html[data-content-theme="dark"] .dashboard-content .formacao-detail>div {
  background:#1b2637 !important;
  border-color:var(--insight-border) !important;
}

html[data-content-theme="dark"] .dashboard-content .formacao-detail :where(small,strong) { color:var(--insight-text) !important; }
html[data-content-theme="dark"] .dashboard-content .formacao-input { background:#202c3e !important;color:var(--insight-text) !important;border-color:var(--insight-border-strong) !important; }
html[data-content-theme="dark"] .dashboard-content .formacao-row.is-selected { background:#17345a !important; }

html[data-content-theme="dark"] body.inventory-count-mode .inventory-count-page,
html[data-content-theme="dark"] .inventory-count-page {
  background:#0f1724 !important;
  color:var(--insight-text) !important;
}

html[data-content-theme="dark"] .inventory-count-page .inventory-count-panel {
  background:#172033 !important;
  border-color:var(--insight-border) !important;
  color:var(--insight-text) !important;
}

html[data-content-theme="dark"] .scanntech-page :where(.scan-control-panel,.scan-period-panel,.scan-check) {
  background:#1b2637 !important;
  border-color:var(--insight-border) !important;
  color:var(--insight-text) !important;
}

html[data-content-theme="dark"] .scanntech-page .scan-period-panel>summary {
  background:#202c3e !important;
  color:var(--insight-text) !important;
}

html[data-content-theme="dark"] .scanntech-page .entry-tab-button:not(.is-active) {
  background:#202c3e !important;
  border-color:var(--insight-border) !important;
  color:var(--insight-text) !important;
}

html[data-content-theme="dark"] .dashboard-content tr.row-warning,
html[data-content-theme="dark"] .dashboard-content .row-warning {
  background:#493a19 !important;
  color:#fff2bf !important;
}

html[data-content-theme="dark"] .dashboard-content tr.row-warning :where(td,strong,small,span) { color:#fff2bf !important; }

html[data-content-theme="dark"] .dashboard-content .license-card .license-status,
html[data-content-theme="dark"] .dashboard-content .license-card .license-message {
  background:#202c3e;
  border:1px solid var(--insight-border);
  color:var(--insight-text);
}

html[data-content-theme="dark"] .dashboard-content .license-card.is-success :where(.license-status,.license-message) {
  background:#174b32;
  border-color:#2f7653;
  color:#c9f8dc;
}

html[data-content-theme="dark"] .dashboard-content .license-card.is-warning :where(.license-status,.license-message) {
  background:#554315;
  border-color:#8a6e25;
  color:#ffe9a6;
}

html[data-content-theme="dark"] .dashboard-content .license-card.is-danger :where(.license-status,.license-message) {
  background:#552128;
  border-color:#8b3a45;
  color:#ffd0d5;
}

@media print {
  html[data-content-theme="dark"] .dashboard-content,
  html[data-content-theme="dark"] .modal-overlay,
  html[data-content-theme="dark"] dialog {
    color-scheme: light;
    --insight-surface: #ffffff;
    --insight-bg: #ffffff;
    --insight-bg-soft: #f7faff;
    --insight-border: #d8e2f1;
    --insight-border-strong: #b8cae4;
    --insight-text: #0f172a;
    --insight-text-soft: #475569;
    background: #ffffff !important;
    color: #0f172a !important;
  }
}

/* Keep product reports in landscape after the global A4 print rules above. */
@media print {
    @page { size: A4 landscape; margin: 5mm; }

    .standard-report-print .table-wrap,
    .standard-report-print .table-wrap table {
        display: table !important;
        min-width: 0 !important;
        max-width: none !important;
        overflow: visible !important;
        table-layout: fixed !important;
        width: 100% !important;
    }

    .standard-report-print .table-wrap {
        display: block !important;
    }

    .standard-report-print .table-wrap th,
    .standard-report-print .table-wrap td {
        height: auto !important;
        min-height: 0 !important;
        min-width: 0 !important;
        max-width: none !important;
        overflow: visible !important;
        overflow-wrap: anywhere !important;
        word-break: break-word !important;
        white-space: normal !important;
    }

    .standard-report-print .table-wrap tr {
        display: table-row !important;
        height: auto !important;
    }
}

@media print {
    .standard-report-print .main-content,
    .standard-report-print .section-page.report-page,
    .standard-report-print .report-page { border: 0 !important; box-shadow: none !important; margin: 0 !important; max-width: none !important; padding: 0 !important; width: 100% !important; }
    .standard-report-print .print-summary,
    .standard-report-print > .report-page > .summary-grid,
    .standard-report-print .section-page.report-page > .summary-grid { display: none !important; }
    .standard-report-print .print-title { align-items: end; border-bottom: 1px solid #334155; display: flex !important; justify-content: space-between; margin: 0 0 2mm; padding: 0 0 1.5mm; }
    .standard-report-print .print-title h3 { font-size: 10pt; line-height: 1.1; margin: 0; }
    .standard-report-print .print-title small { font-size: 6pt; }
    .standard-report-print .section-header:not(.no-print) { border-bottom: 1px solid #334155; margin-bottom: 2mm; padding: 0 0 1.5mm; }
    .standard-report-print .section-header:not(.no-print) h2 { font-size: 10pt; margin: 0; }
    .standard-report-print .section-header:not(.no-print) p { font-size: 6pt; margin: .7mm 0 0; }
    .standard-report-print .table-card,
    .standard-report-print .table-wrap { border: 0 !important; box-shadow: none !important; overflow: visible !important; }
    .standard-report-print table { border-collapse: collapse !important; font-size: 4.8pt !important; line-height: 1.04 !important; min-width: 0 !important; table-layout: fixed !important; width: 100% !important; }
    .standard-report-print thead { display: table-header-group; }
    .standard-report-print tr { break-inside: avoid; }
    .standard-report-print th,
    .standard-report-print td { border: .25pt solid #94a3b8 !important; display: table-cell !important; overflow-wrap: anywhere; padding: .75mm .4mm !important; vertical-align: top; white-space: normal !important; }
    .standard-report-print th { background: #e8edf3 !important; color: #111827 !important; font-size: 4.4pt !important; }
    .standard-report-print .coupon-report-card,
    .standard-report-print .fechamento-card,
    .standard-report-print .purchase-supplier-card { break-inside: avoid; box-shadow: none !important; }
    .standard-report-print .coupon-report-header,
    .standard-report-print .fechamento-card-header,
    .standard-report-print .purchase-supplier-header { font-size: 6pt; gap: 2mm; padding: 2mm !important; }
    .standard-report-print .transform-report-columns { gap: 2mm; padding: 2mm; }
    .standard-report-print .fechamento-card-footer,
    .standard-report-print .purchase-supplier-footer { font-size: 6pt; padding: 1.5mm 2mm; }
}

.product-print-header { display: none; }

nav.pagination.report-pagination {
    align-items: center;
    border-top: 1px solid #d7e2ef;
    clear: both;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    margin: 16px 0;
    padding: 12px 0;
    width: 100%;
}

nav.pagination.report-pagination > span {
    color: #52647c;
    flex: 1 1 230px;
    font-size: 12px;
    line-height: 1.4;
    width: auto;
}

nav.pagination.report-pagination > .report-pagination-controls {
    align-items: center;
    display: flex;
    flex: 0 1 auto;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    width: auto;
}

nav.pagination.report-pagination .report-pagination-controls > a.button {
    align-items: center;
    background: #fff;
    border: 1px solid #b8cbe3;
    border-radius: 5px;
    color: #174d91;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 600;
    height: 34px;
    justify-content: center;
    line-height: 1;
    margin: 0;
    min-width: 78px;
    padding: 0 12px;
    text-decoration: none;
    width: auto;
}

nav.pagination.report-pagination .report-pagination-controls > a.button:hover {
    background: #edf4ff;
    border-color: #155bb5;
}

nav.pagination.report-pagination .report-pagination-controls > a.button:focus-visible {
    outline: 2px solid #155bb5;
    outline-offset: 2px;
}

@media screen and (max-width: 600px) {
    nav.pagination.report-pagination > .report-pagination-controls {
        flex: 1 1 100%;
        justify-content: flex-start;
    }
}

@media print {
    nav.pagination.report-pagination { display: none !important; }
}

@media print {
    @page { size: A4 landscape; margin: 5mm; }
    .product-report-print { background: #fff !important; color: #111827; font-family: Arial, sans-serif; }
    .product-report-print .main-content,
    .product-report-print .section-page.report-page { border: 0 !important; box-shadow: none !important; margin: 0 !important; max-width: none !important; padding: 0 !important; width: 100% !important; }
    .product-report-print .product-print-header { align-items: end; border-bottom: 1px solid #334155; display: flex !important; justify-content: space-between; margin: 0 0 3mm; padding: 0 0 2mm; }
    .product-report-print .product-print-header h1 { font-size: 10pt; line-height: 1.1; margin: 0; }
    .product-report-print .product-print-header p { color: #475569; font-size: 5.5pt; margin: .7mm 0 0; }
    .product-report-print .product-print-header > div:last-child { display: grid; font-size: 6pt; gap: .7mm; text-align: right; }
    .product-report-print .summary-grid { display: none !important; }
    .product-report-print .table-wrap { border: 0 !important; box-shadow: none !important; overflow: visible !important; }
    .product-report-print table { border-collapse: collapse !important; font-size: 4.8pt !important; line-height: 1.04 !important; min-width: 0 !important; table-layout: fixed !important; width: 100% !important; }
    .product-report-print thead { display: table-header-group; }
    .product-report-print tr { break-inside: avoid; }
    .product-report-print th,
    .product-report-print td { border: .25pt solid #94a3b8 !important; display: table-cell !important; overflow-wrap: anywhere; padding: .75mm .4mm !important; vertical-align: top; white-space: normal !important; }
    .product-report-print th { background: #e8edf3 !important; color: #111827 !important; font-size: 4.5pt !important; font-weight: 700; }
    .product-report-print.product-report-columns-13 table,
    .product-report-print.product-report-columns-14 table { font-size: 4pt !important; }
    .product-report-print.product-report-columns-13 th,
    .product-report-print.product-report-columns-14 th { font-size: 3.8pt !important; padding-left: .25mm !important; padding-right: .25mm !important; }
    .product-report-print td strong { font-size: inherit; }
    .product-report-print .report-store-stocks { gap: .5mm; min-width: 0; }
    .product-report-print .report-store-stocks span { background: transparent !important; border: 0 !important; border-radius: 0; display: block; padding: 0; }
}

.secret-input-row {
  align-items: stretch;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.secret-input-row .secret-toggle {
  min-width: 78px;
  padding-inline: 12px;
  white-space: nowrap;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--insight-bg);
  color: var(--insight-text);
  letter-spacing: 0;
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }

.auth-page,
.dashboard-shell { min-height: 100vh; }

.auth-page {
  display: grid;
  place-items: center;
  padding: 1.2rem;
  background: linear-gradient(130deg, #050a14, #101828 45%, var(--insight-blue-800));
}

.login-card {
  width: min(420px, 100%);
  background: var(--insight-surface);
  border-radius: 14px;
  padding: 1.6rem;
  border: 1px solid var(--insight-border);
  box-shadow: 0 18px 40px rgba(6, 14, 30, 0.4);
}

.login-logo {
  display: block;
  width: min(300px, 76%);
  max-height: 120px;
  height: auto;
  object-fit: contain;
  margin: 0 auto 0.85rem;
}

.login-card p {
  margin: 0 0 1rem;
  color: var(--insight-text-soft);
  text-align: center;
}

.login-captcha {
  display: flex;
  justify-content: center;
  width: 100%;
  min-height: 65px;
  overflow: hidden;
}

.login-captcha .cf-turnstile {
  max-width: 100%;
}

.card,
.section-page,
.summary-card,
.table-wrap {
  background: var(--insight-surface);
  border-radius: 14px;
  border: 1px solid var(--insight-border);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.card { padding: 1rem; }

label {
  display: block;
  margin-bottom: 0.75rem;
  font-weight: 600;
  color: var(--insight-text);
}

input, select {
  display: block;
  width: 100%;
  min-height: 42px;
  margin-top: 0.3rem;
  padding: 0.6rem 0.65rem;
  border: 1px solid var(--insight-border-strong);
  border-radius: 10px;
  background: var(--insight-bg-soft);
  color: var(--insight-text);
}

input:focus, select:focus {
  outline: none;
  border-color: var(--insight-blue-600);
  box-shadow: 0 0 0 3px rgba(29, 103, 194, 0.15);
}

input[readonly] {
  color: var(--insight-text-soft);
  background: #eef4fb;
}

button,
.button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  margin-top: 0.5rem;
  background: var(--insight-blue-700);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0.6rem 1rem;
  cursor: pointer;
  font-weight: 600;
}

button:hover,
.button:hover { filter: brightness(1.06); }

.button.dark,
.topbar-actions button { background: var(--insight-dark); }

.button.brasilapi-button {
  background: linear-gradient(135deg, #050a14 0%, var(--insight-dark) 58%, var(--insight-blue-900) 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 18px rgba(5, 10, 20, 0.22);
}

.button.brasilapi-button:hover {
  filter: none;
  background: linear-gradient(135deg, #000000 0%, #071325 52%, var(--insight-blue-800) 100%);
}

.alert,
.erro {
  background: var(--insight-danger-bg);
  color: var(--insight-danger-text);
  border: 1px solid var(--insight-danger-border);
  border-radius: 8px;
  padding: 0.8rem;
  margin-bottom: 1.1rem;
}

.dashboard-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  background: var(--insight-bg);
}

.sidebar {
  background: linear-gradient(180deg, #080d18 0%, #0e2446 44%, #0a2f63 100%);
  color: #dbeafe;
  padding: 1.4rem 1rem 1rem;
  border-right: 1px solid rgba(172, 196, 228, 0.22);
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  position: sticky;
  top: 0;
  min-height: 100vh;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.45rem 0.55rem;
}

.sidebar-logo {
  width: 50px;
  height: 50px;
  object-fit: contain;
  background: #ffffff;
  border-radius: 10px;
  padding: 4px;
}

.sidebar-brand strong {
  display: block;
  color: #ffffff;
  letter-spacing: 0.2px;
}

.sidebar-brand p {
  margin: 0;
  font-size: 0.82rem;
  color: #bfdbfe;
}

.sidebar-menu {
  display: grid;
  gap: 0.9rem;
}

.menu-group {
  display: grid;
  gap: 0.35rem;
}

.menu-group-title {
  margin: 0;
  padding: 0 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.74rem;
  color: rgba(219, 234, 254, 0.72);
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  border-radius: 10px;
  text-align: left;
  background: transparent;
  color: #eff6ff;
  padding: 0.65rem 0.7rem;
  border: 1px solid transparent;
  font-weight: 600;
  position: relative;
}

.menu-item::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(191, 219, 254, 0.58);
  flex: 0 0 auto;
}

.menu-item:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(147, 197, 253, 0.2);
}

.menu-item.is-active {
  background: linear-gradient(90deg, rgba(29, 103, 194, 0.66), rgba(18, 84, 170, 0.42));
  border-color: rgba(191, 219, 254, 0.48);
  color: #ffffff;
}

.menu-item.is-active::before {
  background: #ffffff;
}

.dashboard-content {
  padding: 1rem;
  min-width: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: var(--insight-surface);
  border: 1px solid var(--insight-border);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.topbar h1 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--insight-text);
}

.topbar p {
  margin: 0.1rem 0 0;
  color: var(--insight-text-soft);
  font-size: 0.9rem;
}

.topbar-logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--insight-surface);
  border: 1px solid var(--insight-border);
  object-fit: contain;
  padding: 4px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.topbar-actions span {
  font-size: 0.85rem;
  color: #334155;
}

.topbar-actions .button { margin-top: 0; }

.theme-toggle {
  position: relative;
  flex: 0 0 38px;
  width: 38px;
  min-height: 38px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--insight-border-strong);
  border-radius: 50%;
  background: var(--insight-bg-soft);
  color: var(--insight-text);
}

.theme-toggle-icon {
  position: relative;
  display: block;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 50%;
  box-shadow: 0 -7px 0 -6px currentColor, 0 7px 0 -6px currentColor, 7px 0 0 -6px currentColor, -7px 0 0 -6px currentColor, 5px 5px 0 -6px currentColor, -5px -5px 0 -6px currentColor, 5px -5px 0 -6px currentColor, -5px 5px 0 -6px currentColor;
}

html[data-content-theme="dark"] .theme-toggle-icon {
  border: 0;
  background: #dbeafe;
  box-shadow: inset 6px -3px 0 0 #172033;
}

html[data-content-theme="dark"] .theme-toggle {
  background: #172033;
  color: #dbeafe;
  border-color: #53657d;
}

.menu-toggle {
  display: none;
  margin: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--insight-dark);
  padding: 8px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 4px 0;
  background: #ffffff;
  border-radius: 4px;
}

.sidebar-overlay { display: none; }

.section-page {
  padding: 1rem;
}

.section-header {
  margin-bottom: 1rem;
}

.section-header h2 {
  margin: 0;
  font-size: 1.3rem;
}

.section-header p {
  margin: 0.25rem 0 0;
  color: var(--insight-text-soft);
}

.summary-grid,
.content-grid,
.shortcut-grid {
  display: grid;
  gap: 1rem;
}

.summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 1rem;
}

.summary-card {
  padding: 1rem;
}

.summary-card h3 {
  font-size: 0.95rem;
  margin: 0;
  color: #334155;
}

.summary-card strong {
  display: block;
  margin-top: 0.4rem;
  font-size: 1.5rem;
  color: var(--insight-text);
}

.shortcut-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  margin-bottom: 1rem;
}

.shortcut-card {
  background: var(--insight-bg-soft);
  border: 1px solid var(--insight-border);
  border-radius: 12px;
  padding: 0.95rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.shortcut-card:hover {
  transform: translateY(-1px);
  border-color: #b7ccec;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.09);
}

.shortcut-card h3 {
  margin: 0;
  font-size: 0.96rem;
}

.shortcut-card p {
  margin: 0.35rem 0 0.8rem;
  color: var(--insight-text-soft);
  font-size: 0.9rem;
}

.shortcut-card a {
  display: inline-block;
  color: var(--insight-blue-700);
  font-weight: 700;
}

.module-option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.module-option-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.module-option-card {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  min-height: 116px;
  padding: 0.9rem 0.75rem;
  background: var(--insight-bg-soft);
  border: 1px solid var(--insight-border);
  border-radius: 12px;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.module-option-card:hover {
  transform: translateY(-1px);
  border-color: #b7ccec;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.09);
}

.module-option-card.is-active {
  border-color: rgba(18, 84, 170, 0.52);
  background: #edf4ff;
}

.integration-options-primary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 0.75rem;
}

.integration-primary-card {
  min-height: 138px;
  padding: 1.15rem 1rem;
  background: #edf4ff;
  border-color: #b8cfea;
}

.integration-primary-card .module-option-symbol {
  width: 46px;
  height: 46px;
}

.integration-primary-card strong {
  color: var(--insight-blue-900);
  font-size: 1.05rem;
}

.integration-options-secondary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.integration-secondary-card {
  grid-template-columns: 32px minmax(0, 1fr);
  justify-items: start;
  align-items: center;
  min-height: 64px;
  padding: 0.65rem 0.85rem;
  text-align: left;
}

.integration-secondary-card .module-option-symbol {
  width: 32px;
  height: 32px;
}

.integration-secondary-card strong {
  font-size: 0.86rem;
}

@media (max-width: 820px) {
  .integration-options-primary {
    grid-template-columns: 1fr;
  }

  .integration-options-secondary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .integration-options-secondary {
    grid-template-columns: 1fr;
  }
}

.module-option-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--insight-dark);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
}

.module-option-symbol {
  position: relative;
  width: 42px;
  height: 42px;
  display: inline-block;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--insight-blue-700), var(--insight-dark));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.module-option-symbol::before,
.module-option-symbol::after {
  content: "";
  position: absolute;
  box-sizing: border-box;
}

.option-icon-product-add::before {
  left: 11px;
  top: 9px;
  width: 18px;
  height: 22px;
  border: 2px solid #ffffff;
  border-radius: 4px;
}

.option-icon-product-add::after {
  right: 7px;
  bottom: 7px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background:
    linear-gradient(#ffffff, #ffffff) center / 10px 2px no-repeat,
    linear-gradient(#ffffff, #ffffff) center / 2px 10px no-repeat,
    var(--insight-blue-600);
}

.option-icon-departments::before {
  left: 10px;
  top: 9px;
  width: 22px;
  height: 24px;
  border-left: 4px solid #ffffff;
  border-right: 4px solid #ffffff;
}

.option-icon-departments::after {
  left: 8px;
  top: 15px;
  width: 26px;
  height: 3px;
  background: #ffffff;
  box-shadow: 0 8px 0 #ffffff;
}

.option-icon-sections::before {
  left: 11px;
  top: 10px;
  width: 20px;
  height: 5px;
  border-radius: 2px;
  background: #ffffff;
  box-shadow: 0 9px 0 #ffffff, 0 18px 0 #ffffff;
}

.option-icon-sections::after {
  right: 9px;
  top: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--insight-blue-600);
  box-shadow: 0 9px 0 var(--insight-blue-600), 0 18px 0 var(--insight-blue-600);
}

.option-icon-associated::before {
  left: 10px;
  top: 12px;
  width: 22px;
  height: 18px;
  border-top: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: skewY(-22deg);
}

.option-icon-associated::after {
  left: 8px;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 18px 8px 0 #ffffff, 0 20px 0 #ffffff, 18px 28px 0 #ffffff;
}

.option-icon-tags::before {
  left: 11px;
  top: 12px;
  width: 21px;
  height: 16px;
  border-radius: 4px 4px 4px 8px;
  background: #ffffff;
  transform: rotate(-28deg);
}

.option-icon-tags::after {
  right: 13px;
  top: 15px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--insight-blue-700);
}

.option-icon-basket-add::before {
  left: 9px;
  top: 15px;
  width: 24px;
  height: 17px;
  border: 2px solid #ffffff;
  border-top: 0;
  border-radius: 3px 3px 7px 7px;
  background:
    linear-gradient(#ffffff, #ffffff) 6px 4px / 2px 9px no-repeat,
    linear-gradient(#ffffff, #ffffff) 13px 4px / 2px 9px no-repeat;
}

.option-icon-basket-add::after {
  right: 6px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background:
    linear-gradient(#ffffff, #ffffff) center / 10px 2px no-repeat,
    linear-gradient(#ffffff, #ffffff) center / 2px 10px no-repeat,
    var(--insight-blue-600);
}

.option-icon-store::before {
  left: 9px;
  top: 16px;
  width: 24px;
  height: 18px;
  border-radius: 3px;
  background: #ffffff;
  box-shadow: inset 6px 0 0 rgba(18, 84, 170, 0.35), inset -6px 0 0 rgba(18, 84, 170, 0.35);
}

.option-icon-store::after {
  left: 7px;
  top: 9px;
  width: 28px;
  height: 9px;
  border-radius: 6px 6px 2px 2px;
  background: #ffffff;
}

.option-icon-settings::before {
  left: 9px;
  top: 9px;
  width: 24px;
  height: 24px;
  border: 6px solid #ffffff;
  border-radius: 50%;
  box-shadow:
    0 -11px 0 -7px #ffffff,
    0 11px 0 -7px #ffffff,
    11px 0 0 -7px #ffffff,
    -11px 0 0 -7px #ffffff,
    8px 8px 0 -7px #ffffff,
    -8px 8px 0 -7px #ffffff,
    8px -8px 0 -7px #ffffff,
    -8px -8px 0 -7px #ffffff;
}

.option-icon-settings::after {
  left: 18px;
  top: 18px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
}

.option-icon-tax-adjust::before {
  left: 10px;
  top: 8px;
  width: 22px;
  height: 26px;
  border: 2px solid #ffffff;
  border-radius: 4px;
  background:
    linear-gradient(#ffffff, #ffffff) 5px 8px / 12px 2px no-repeat,
    linear-gradient(#ffffff, #ffffff) 5px 14px / 12px 2px no-repeat;
}

.option-icon-tax-adjust::after {
  right: 6px;
  bottom: 7px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background:
    linear-gradient(#ffffff, #ffffff) center / 10px 2px no-repeat,
    linear-gradient(#ffffff, #ffffff) center / 2px 10px no-repeat,
    var(--insight-blue-600);
  transform: rotate(45deg);
}

.option-icon-imendes::before {
  left: 8px;
  top: 10px;
  width: 26px;
  height: 22px;
  border: 2px solid #ffffff;
  border-radius: 6px;
}

.option-icon-imendes::after {
  left: 13px;
  top: 16px;
  width: 16px;
  height: 10px;
  color: #ffffff;
  content: "im";
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
}

.option-icon-sync-pdv::before {
  left: 8px;
  top: 9px;
  width: 26px;
  height: 24px;
  border: 2px solid #ffffff;
  border-radius: 4px;
  background:
    linear-gradient(#ffffff, #ffffff) center 17px / 12px 2px no-repeat,
    linear-gradient(#ffffff, #ffffff) center 21px / 20px 2px no-repeat;
}

.option-icon-sync-pdv::after {
  left: 13px;
  top: 13px;
  width: 16px;
  height: 10px;
  border: 2px solid #ffffff;
  border-left-color: transparent;
  border-right-color: transparent;
  border-radius: 50%;
  transform: rotate(-18deg);
}

.option-icon-scale::before {
  left: 9px;
  top: 9px;
  width: 24px;
  height: 22px;
  border: 2px solid #ffffff;
  border-radius: 7px 7px 4px 4px;
  background:
    radial-gradient(circle at 50% 38%, transparent 0 5px, #ffffff 6px 7px, transparent 8px),
    linear-gradient(#ffffff, #ffffff) center 23px / 16px 2px no-repeat;
}

.option-icon-scale::after {
  left: 20px;
  top: 17px;
  width: 10px;
  height: 2px;
  background: #ffffff;
  transform: rotate(-38deg);
  transform-origin: left center;
}

.option-icon-terminal::before {
  left: 14px;
  top: 7px;
  width: 14px;
  height: 28px;
  border: 2px solid #ffffff;
  border-radius: 5px;
  background:
    linear-gradient(#ffffff, #ffffff) center 6px / 7px 2px no-repeat,
    linear-gradient(#ffffff, #ffffff) center 20px / 8px 2px no-repeat;
}

.option-icon-terminal::after {
  left: 5px;
  top: 14px;
  width: 32px;
  height: 16px;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #ffffff;
  border-radius: 50%;
}

.option-icon-mobile::before {
  left: 12px;
  top: 6px;
  width: 18px;
  height: 30px;
  border: 2px solid #ffffff;
  border-radius: 4px;
}

.option-icon-mobile::after {
  left: 19px;
  bottom: 9px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ffffff;
}

.option-icon-client-add::before {
  left: 12px;
  top: 9px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 17px 0 4px #ffffff;
}

.option-icon-client-add::after {
  right: 7px;
  bottom: 8px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background:
    linear-gradient(var(--insight-blue-700), var(--insight-blue-700)) center / 9px 2px no-repeat,
    linear-gradient(var(--insight-blue-700), var(--insight-blue-700)) center / 2px 9px no-repeat,
    #ffffff;
}

.option-icon-convenio::before {
  left: 9px;
  top: 10px;
  width: 24px;
  height: 18px;
  border: 2px solid #ffffff;
  border-radius: 5px;
}

.option-icon-convenio::after {
  left: 13px;
  top: 17px;
  width: 16px;
  height: 2px;
  background: #ffffff;
  box-shadow: 0 7px 0 #ffffff;
}

.option-icon-reports::before {
  left: 11px;
  top: 8px;
  width: 20px;
  height: 25px;
  border: 2px solid #ffffff;
  border-radius: 4px;
}

.option-icon-reports::after {
  left: 16px;
  bottom: 10px;
  width: 3px;
  height: 8px;
  background: #ffffff;
  box-shadow: 6px -5px 0 #ffffff, 12px -1px 0 #ffffff;
}

.option-icon-user-add::before {
  left: 12px;
  top: 8px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 16px 0 5px #ffffff;
}

.option-icon-user-add::after {
  right: 7px;
  bottom: 8px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background:
    linear-gradient(var(--insight-blue-700), var(--insight-blue-700)) center / 9px 2px no-repeat,
    linear-gradient(var(--insight-blue-700), var(--insight-blue-700)) center / 2px 9px no-repeat,
    #ffffff;
}

.option-icon-users::before {
  left: 9px;
  top: 9px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 14px 0 0 #ffffff, 7px 17px 0 6px #ffffff;
}

.option-icon-users::after {
  left: 6px;
  bottom: 9px;
  width: 13px;
  height: 8px;
  border-radius: 8px 8px 3px 3px;
  background: #ffffff;
  box-shadow: 17px 0 0 #ffffff;
}

.option-icon-supplier-add::before,
.option-icon-suppliers::before {
  left: 9px;
  top: 12px;
  width: 24px;
  height: 18px;
  border: 2px solid #ffffff;
  border-radius: 5px;
}

.option-icon-supplier-add::after {
  right: 7px;
  bottom: 7px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background:
    linear-gradient(var(--insight-blue-700), var(--insight-blue-700)) center / 9px 2px no-repeat,
    linear-gradient(var(--insight-blue-700), var(--insight-blue-700)) center / 2px 9px no-repeat,
    #ffffff;
}

.option-icon-suppliers::after {
  left: 13px;
  top: 18px;
  width: 16px;
  height: 2px;
  background: #ffffff;
  box-shadow: 0 6px 0 #ffffff;
}

.option-icon-carrier-add::before,
.option-icon-carrier::before {
  left: 7px;
  top: 17px;
  width: 25px;
  height: 12px;
  border-radius: 3px;
  background: #ffffff;
}

.option-icon-carrier-add::after {
  right: 7px;
  bottom: 7px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background:
    linear-gradient(var(--insight-blue-700), var(--insight-blue-700)) center / 9px 2px no-repeat,
    linear-gradient(var(--insight-blue-700), var(--insight-blue-700)) center / 2px 9px no-repeat,
    #ffffff;
}

.option-icon-carrier::after {
  left: 11px;
  bottom: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--insight-blue-700);
  box-shadow: 17px 0 0 var(--insight-blue-700), 5px -13px 0 4px #ffffff;
}

.module-option-card strong {
  font-size: 1rem;
  color: var(--insight-text);
}

.imendes-option-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.85rem;
}

.imendes-option-grid > form {
  display: contents;
}

.imendes-option-grid .module-option-card {
  width: 100%;
  color: var(--insight-text);
  cursor: pointer;
}

.imendes-option-grid .module-option-card > span:not(.module-option-symbol) {
  color: var(--insight-text-soft);
  font-size: 0.86rem;
  line-height: 1.35;
}
.xml-store-link,
.xml-link-panel {
  border-color: #7aa8e8;
  background: #f5f9ff;
}

.xml-totals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.75rem;
}

.xml-totals-grid .summary-card {
  min-height: 88px;
}

.xml-totals-grid .summary-card strong {
  font-size: 1.15rem;
}

.xml-payment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
  width: 100%;
  max-width: 100%;
}

.xml-payment-grid > fieldset {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.xml-payment-grid .table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
}

.xml-payment-grid .form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.xml-payment-grid .form-grid > * {
  min-width: 0;
}

.xml-final-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1rem;
}

.xml-link-form {
  display: grid;
  grid-template-columns: minmax(140px, 0.7fr) minmax(140px, 0.7fr) repeat(2, auto) auto;
  align-items: end;
  gap: 0.65rem;
}

.xml-link-modal .modal-card {
  width: min(1100px, 100%);
}

.xml-product-results {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.xml-product-result {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(560px, 2fr);
  align-items: center;
  gap: 1rem;
}

.xml-product-result > div {
  display: grid;
  gap: 0.2rem;
}

.xml-linked-edit-form {
  margin-top: 1rem;
}

.section-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0;
  color: var(--insight-text-soft);
  font-size: 0.85rem;
}

.section-divider::before,
.section-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--insight-border);
}

.row-warning {
  background: #fff8e8;
}

.text-danger {
  color: #b42318;
}

.dashboard-block { margin-bottom: 0.75rem; }

.dashboard-block-header h3 {
  margin: 0;
  font-size: 1rem;
}

.dashboard-block-header p {
  margin: 0.25rem 0 0;
  color: var(--insight-text-soft);
  font-size: 0.9rem;
}

.dashboard-chart-card { margin-top: 1rem; }

.dashboard-chart-header h3 { margin: 0; }

.dashboard-chart-header p {
  margin: 0.3rem 0 1rem;
  color: var(--insight-text-soft);
}

.dashboard-chart {
  display: grid;
  gap: 0.85rem;
}

.dashboard-bar-row {
  display: grid;
  gap: 0.4rem;
}

.dashboard-bar-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.92rem;
  color: #1e293b;
}

.dashboard-bar-track {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: #d6e3f8;
  overflow: hidden;
}

.dashboard-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--insight-blue-700), var(--insight-blue-600));
}

.dashboard-sales-summary .summary-card {
  min-height: 112px;
}

.dashboard-kpi-card {
  position: relative;
  overflow: hidden;
  border-color: #c5d7f0;
  background: linear-gradient(135deg, #ffffff 0%, #eef5ff 100%);
}

.dashboard-kpi-card::after {
  content: "";
  position: absolute;
  right: -28px;
  top: -28px;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: rgba(18, 84, 170, 0.12);
}

.dashboard-kpi-primary {
  background: linear-gradient(135deg, #06101f 0%, #123f78 100%);
  border-color: #123f78;
  color: #fff;
}

.dashboard-kpi-primary h3,
.dashboard-kpi-primary strong,
.dashboard-kpi-primary span {
  color: #fff;
}

.dashboard-kpi-primary span {
  opacity: 0.95;
  font-weight: 700;
}

.dashboard-kpi-card span {
  display: block;
  margin-top: 0.35rem;
  color: var(--insight-text-soft);
  font-size: 0.86rem;
}

.dashboard-kpi-card.dashboard-kpi-primary span {
  color: #fff;
  opacity: 0.95;
  font-weight: 700;
}

.dashboard-analytics-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.85fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.dashboard-panel-large {
  display: flex;
  flex-direction: column;
  grid-row: span 2;
}

.dashboard-ranking-chart,
.dashboard-payment-list,
.dashboard-cancel-list {
  display: grid;
  gap: 0.75rem;
}

.dashboard-ranking-chart {
  align-content: start;
  flex: 1;
  min-height: 25rem;
}

.dashboard-ranking-pagination {
  align-items: center;
  border-top: 1px solid var(--insight-border);
  display: flex;
  gap: 0.65rem;
  justify-content: flex-end;
  margin-top: 0.85rem;
  padding-top: 0.75rem;
}

.dashboard-ranking-page-status {
  color: var(--insight-muted);
  font-size: 0.82rem;
  min-width: 4.5rem;
  text-align: center;
}

.dashboard-ranking-page-button {
  align-items: center;
  background: #0d315d;
  border: 1px solid #0d315d;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-size: 1.35rem;
  height: 2rem;
  justify-content: center;
  line-height: 1;
  text-decoration: none;
  width: 2rem;
}

.dashboard-ranking-pagination a.dashboard-ranking-page-button:hover {
  background: #164f8e;
  border-color: #164f8e;
}

.dashboard-ranking-page-button.is-disabled {
  cursor: default;
  opacity: 0.38;
}

html[data-content-theme="dark"] .dashboard-ranking-page-button {
  background: #fff;
  border-color: #fff;
  color: #0b1728;
}

html[data-content-theme="dark"] .dashboard-ranking-pagination a.dashboard-ranking-page-button:hover {
  background: #dfe9f7;
  border-color: #dfe9f7;
}

.supplier-order-products-table {
  font-size: 0.82rem;
}

.supplier-order-products-table th {
  font-size: 0.72rem;
  padding-block: 0.55rem;
}

.supplier-order-products-table td {
  padding-block: 0.55rem;
  vertical-align: middle;
}

.supplier-order-products-table td:nth-child(2) strong {
  font-size: 0.92rem;
  line-height: 1.2;
}

.supplier-order-products-table td:nth-child(2) small {
  color: var(--insight-muted);
  font-size: 0.7rem;
}

.supplier-order-products-table .formacao-input {
  font-size: 0.82rem;
  min-height: 34px;
  padding: 0.45rem 0.6rem;
}

.supplier-order-products-table input[type="checkbox"] {
  height: 18px;
  width: 18px;
}

.dashboard-rank-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem 0.75rem;
  align-items: center;
  padding: 0.75rem;
  border: 1px solid var(--insight-border);
  border-radius: 8px;
  background: #f8fbff;
}

.dashboard-rank-info {
  min-width: 0;
}

.dashboard-rank-info strong,
.dashboard-cancel-row strong {
  display: block;
  color: var(--insight-dark);
}

.dashboard-rank-info span,
.dashboard-cancel-row span {
  display: block;
  margin-top: 0.2rem;
  color: var(--insight-text-soft);
  font-size: 0.82rem;
}

.dashboard-rank-value {
  color: var(--insight-blue-800);
  font-weight: 800;
  white-space: nowrap;
}

.dashboard-rank-track,
.dashboard-mini-track {
  grid-column: 1 / -1;
  height: 10px;
  border-radius: 999px;
  background: #dce8f8;
  overflow: hidden;
}

.dashboard-rank-track span,
.dashboard-mini-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0a2a55, #1d67c2);
}

.dashboard-donut-wrap {
  display: grid;
  grid-template-columns: 138px 1fr;
  gap: 1rem;
  align-items: center;
}

.dashboard-donut {
  width: 138px;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--insight-surface) 0 47%, transparent 48%),
    conic-gradient(#0a2a55 0 var(--p1), #1d67c2 var(--p1) calc(var(--p1) + var(--p2)), #8fb5e8 0 100%);
  border: 1px solid #c5d7f0;
  box-shadow: inset 0 0 0 12px rgba(255,255,255,0.3);
}

.dashboard-payment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.35rem 0.75rem;
  align-items: center;
}

.dashboard-payment-row span {
  font-weight: 700;
  color: var(--insight-dark);
}

.dashboard-payment-row strong {
  color: var(--insight-blue-800);
  white-space: nowrap;
}

.dashboard-mini-track {
  height: 8px;
}

.dashboard-mini-track.is-danger span {
  background: linear-gradient(90deg, #6b1222, #d94b61);
}

.dashboard-cancel-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.4rem 0.75rem;
  padding: 0.75rem;
  border: 1px solid #f1c7cf;
  border-radius: 8px;
  background: #fff7f8;
}

.dashboard-empty-good {
  padding: 1rem;
  border: 1px solid #bde7cf;
  border-radius: 8px;
  background: #f1fff6;
  color: #176338;
  font-weight: 800;
}

.toolbar {
  display: grid;
  grid-template-columns: 190px minmax(180px, 1fr) 120px;
  gap: 0.75rem;
  align-items: end;
  margin-bottom: 1rem;
}

.toolbar label {
  margin-bottom: 0;
}

.toolbar button {
  width: 100%;
  min-height: 42px;
  margin-top: 0;
  margin-bottom: 0;
}

.promotions-search-toolbar {
  grid-template-columns: minmax(260px, 1fr) 150px;
}

.table-wrap {
  overflow: auto;
}

.fechamento-card-grid {
  display: grid;
  gap: 1rem;
}

.fechamento-card {
  border: 1px solid var(--insight-border);
  border-left: 5px solid #64748b;
  border-radius: 12px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.fechamento-card.is-closed { border-left-color: #0f7a45; }
.fechamento-card.is-over { border-left-color: #1d67c2; }
.fechamento-card.is-missing { border-left-color: #c2410c; }

.fechamento-card-header,
.fechamento-card-footer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: center;
  padding: 1rem;
}

.fechamento-card-header {
  background: #eef5ff;
  border-bottom: 1px solid var(--insight-border);
}

.fechamento-card-header strong,
.fechamento-card-footer strong {
  display: block;
  color: var(--insight-text);
}

.fechamento-card-header span,
.fechamento-card-footer span {
  color: var(--insight-text-soft);
  font-size: 0.88rem;
  font-weight: 700;
}

.fechamento-status {
  justify-self: end;
  min-width: 150px;
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  text-align: right;
  background: #fff;
  border: 1px solid var(--insight-border);
}

.fechamento-card.is-closed .fechamento-status {
  background: #ecfdf3;
  border-color: #86efac;
}

.fechamento-card.is-over .fechamento-status {
  background: #eff6ff;
  border-color: #93c5fd;
}

.fechamento-card.is-missing .fechamento-status {
  background: #fff7ed;
  border-color: #fdba74;
}

.fechamento-card table {
  min-width: 0;
}

.fechamento-card-footer {
  border-top: 1px solid var(--insight-border);
  background: #f8fbff;
}

.transform-report-wrap {
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
}

.transform-report-card table {
  min-width: 640px;
}

.transform-report-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding: 1rem;
}

.transform-report-items {
  min-width: 0;
  overflow: auto;
}

.transform-report-items h3 {
  margin: 0 0 0.65rem;
  font-size: 1rem;
  color: var(--insight-text);
}

.transform-report-note {
  margin: 1rem 1rem 0;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--insight-border);
  border-radius: 10px;
  background: #f8fbff;
  color: var(--insight-text-soft);
  font-weight: 700;
}

.transform-report-card .fechamento-card-footer {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
}

th, td {
  padding: 0.78rem 0.85rem;
  border-bottom: 1px solid var(--insight-border);
  text-align: left;
  font-size: 0.9rem;
}

th {
  color: #334155;
  background: var(--insight-bg-soft);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

tbody tr:hover { background: var(--insight-bg-soft); }

.button.small {
  min-height: 32px;
  margin-top: 0;
  padding: 0.4rem 0.7rem;
  font-size: 0.82rem;
}

.button.ghost {
  background: var(--insight-bg-soft);
  color: var(--insight-text);
  border: 1px solid var(--insight-border-strong);
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.button.danger {
  background: var(--insight-danger-bg);
  color: var(--insight-danger-text);
  border: 1px solid var(--insight-danger-border);
}

.page-actions,
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.page-actions {
  margin-bottom: 1rem;
}

.row-actions {
  min-width: 170px;
}

.table-input {
  width: 92px;
  min-height: 32px;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--insight-border-strong);
  border-radius: 8px;
  font: inherit;
}

.form-note {
  margin: 0.8rem 0 0;
  color: var(--insight-text-soft);
  font-size: 0.9rem;
}

.convenio-summary {
  margin-top: 1rem;
}

.convenio-client-panel {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid var(--insight-border);
  border-radius: 14px;
  background: var(--insight-surface);
  box-shadow: 0 12px 28px rgba(8, 18, 35, 0.06);
}

.convenio-client-panel h3 {
  margin: 0.2rem 0;
  color: var(--insight-blue-900);
}

.convenio-client-panel p {
  margin: 0;
  color: var(--insight-text-soft);
}

.convenio-action-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  justify-content: flex-end;
}

.cesta-open-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 1rem;
  align-items: center;
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid rgba(18, 84, 170, 0.35);
  border-left: 5px solid var(--insight-blue-700);
  border-radius: 14px;
  background: linear-gradient(135deg, #f7fbff 0%, #edf4ff 100%);
  box-shadow: 0 14px 30px rgba(8, 18, 35, 0.08);
}

.cesta-open-main h3 {
  margin: 0.2rem 0;
  color: var(--insight-blue-900);
  font-size: 1.25rem;
}

.cesta-open-main p {
  margin: 0;
  color: var(--insight-text-soft);
}

.cesta-open-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(110px, 1fr));
  gap: 0.7rem;
}

.cesta-open-metrics article {
  padding: 0.75rem;
  border: 1px solid var(--insight-border);
  border-radius: 12px;
  background: #ffffff;
}

.cesta-open-metrics span {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--insight-text-soft);
  font-size: 0.82rem;
  font-weight: 700;
}

.cesta-open-metrics strong {
  color: var(--insight-dark);
  font-size: 1.15rem;
}

.cesta-open-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
}

.cesta-workspace {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid var(--insight-border);
  border-radius: 14px;
  background: var(--insight-surface);
}

.convenio-actions-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: start;
  margin-bottom: 1rem;
}

.action-dialog {
  width: min(680px, calc(100vw - 2rem));
  border: 1px solid var(--insight-border);
  border-radius: 14px;
  padding: 1rem;
  background: var(--insight-surface);
  box-shadow: 0 24px 70px rgba(8, 18, 35, 0.25);
}

.action-dialog::backdrop {
  background: rgba(8, 18, 35, 0.42);
}

.etiqueta-product-dialog {
  width: min(1020px, calc(100vw - 2rem));
  max-height: min(85vh, 780px);
  overflow: auto;
  border-radius: 8px;
}

.etiqueta-product-head {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.etiqueta-product-head h2 { font-size: 1.1rem; margin: 0; }
.etiqueta-product-head p { color: var(--insight-text-soft); font-size: .84rem; margin: .25rem 0 0; }
.etiqueta-search-form { align-items: end; margin-bottom: 1rem; }
.etiqueta-search-form .form-grid-action { align-self: end; margin-bottom: 0.75rem; }
.etiqueta-search-form .form-grid-action::before { display: none; }
.etiqueta-search-results { max-height: 54vh; overflow: auto; }
.etiqueta-search-results table { font-size: .82rem; }
.etiqueta-search-results th, .etiqueta-search-results td { padding: .55rem; }
.etiqueta-search-results td:nth-child(3) { min-width: 220px; }
.etiqueta-search-results .inline-form { flex-wrap: nowrap; }
.etiqueta-search-results .compact-input { width: 64px; }
.etiqueta-search-empty { margin: 0; padding: .75rem 0; }

@media (max-width: 700px) {
  .etiqueta-product-dialog { width: calc(100vw - 1rem); padding: .75rem; }
  .etiqueta-search-results td:nth-child(3) { min-width: 180px; }
}

.dialog-close {
  min-height: 34px;
  margin-top: 0;
  padding: 0.35rem 0.7rem;
  background: var(--insight-bg-soft);
  color: var(--insight-text);
  border: 1px solid var(--insight-border-strong);
}

.report-toolbar {
  grid-template-columns: minmax(180px, 1.1fr) minmax(160px, 0.8fr) minmax(150px, 0.7fr) minmax(150px, 0.7fr) 120px;
}

.report-print-page {
  background: #ffffff;
}

.report-page {
  padding: 1.5rem;
}

.coupon-report-list {
  display: grid;
  gap: 1rem;
}

.coupon-report-card {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.coupon-report-header {
  display: grid;
  grid-template-columns: 1.1fr 1.4fr 1.1fr minmax(160px, 0.8fr);
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  background: #f3f7ff;
  border-bottom: 1px solid var(--border-color);
}

.coupon-report-header div {
  min-width: 0;
}

.coupon-report-header span {
  display: block;
  color: var(--muted-color);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.coupon-report-header strong,
.coupon-report-header small {
  display: block;
  overflow-wrap: anywhere;
}

.coupon-report-header strong {
  margin-top: 0.18rem;
  color: var(--ink-color);
  font-size: 0.98rem;
}

.coupon-report-header small {
  margin-top: 0.15rem;
  color: var(--muted-color);
  font-weight: 700;
}

.coupon-report-total {
  text-align: right;
}

.convenio-paid-total {
  padding-left: 0.8rem;
  border-left: 3px solid #1f9d62;
}

.convenio-paid-total strong {
  color: #157347;
}

.report-debtors-filter {
  align-self: end;
  min-height: 42px;
  padding: 0 0.35rem;
}

.convenio-list-summary {
  grid-template-columns: repeat(2, minmax(180px, 260px));
  margin-bottom: 0.85rem;
}

.convenio-debt-total strong {
  color: #b42318;
}

.convenio-movement-sale > td {
  background: #fff1f1;
  color: #8f1d1d;
}

.convenio-movement-payment > td {
  background: #edf9f1;
  color: #12633a;
}

.convenio-movement-sale:hover > td {
  background: #ffe7e7;
}

.convenio-movement-payment:hover > td {
  background: #def3e6;
}

@media print {
  .convenio-movement-sale > td,
  .convenio-movement-payment > td {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}

/* Print overrides must follow the responsive report rules. */
@media print {
  .standard-report-print .table-wrap,
  .standard-report-print .table-wrap table {
    min-width: 0 !important;
    max-width: none !important;
    overflow: visible !important;
    table-layout: fixed !important;
    width: 100% !important;
  }

  .standard-report-print .table-wrap th,
  .standard-report-print .table-wrap td {
    height: auto !important;
    min-height: 0 !important;
    min-width: 0 !important;
    max-width: none !important;
    overflow: visible !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    white-space: normal !important;
  }

  .standard-report-print .table-wrap tr {
    height: auto !important;
  }
}

.coupon-report-items {
  margin: 0;
  border: 0;
}

.coupon-report-items thead th {
  background: #f8fafc;
}

@media (max-width: 760px) {
  .coupon-report-header {
    grid-template-columns: 1fr;
  }

  .coupon-report-total {
    text-align: left;
  }
}

@media (max-width: 960px) {
  .report-page .report-table,
  .report-page .table-wrap,
  .cartao-sales-report.table-wrap {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }

  .report-page .report-table > table,
  .report-page .table-wrap > table,
  .report-page .table-wrap table,
  .coupon-report-items,
  .cartao-sales-report-table {
    display: table !important;
    width: max-content !important;
    min-width: 900px !important;
    max-width: none !important;
    table-layout: auto !important;
  }

  .report-page .report-table th,
  .report-page .report-table td,
  .report-page .table-wrap th,
  .report-page .table-wrap td,
  .coupon-report-items th,
  .coupon-report-items td,
  .cartao-sales-report-table th,
  .cartao-sales-report-table td {
    display: table-cell !important;
    white-space: nowrap;
  }
}
@media print {
  .report-print-page {
    color: #000000;
  }

  .report-page {
    padding: 0;
  }

  .report-page .summary-card,
  .report-page .table-wrap {
    box-shadow: none;
    border: 1px solid #d1d5db;
  }

  .report-page table {
    min-width: 0;
  }

  .coupon-report-card {
    break-inside: avoid;
    box-shadow: none;
  }
}

.product-form {
  display: grid;
  gap: 1rem;
}

.copy-product-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 170px minmax(220px, 1fr) 130px;
  gap: 0.85rem;
  align-items: end;
  padding: 1rem;
  border: 1px solid var(--insight-border);
  border-radius: 12px;
  background: var(--insight-bg-soft);
}

.copy-product-panel h3,
.copy-product-panel p {
  margin: 0;
}

.copy-product-panel h3 {
  color: var(--insight-blue-900);
  font-size: 1rem;
}

.copy-product-panel p {
  margin-top: 0.25rem;
  color: var(--insight-text-soft);
  font-size: 0.9rem;
}

.copy-product-panel label,
.copy-product-panel button {
  margin-bottom: 0;
}

.promotion-product-search {
  grid-template-columns: minmax(180px, 0.7fr) minmax(300px, 1.3fr) minmax(180px, 0.65fr);
}

.promotion-product-search .form-grid-action,
.promotion-product-search .form-grid-action .button {
  width: 100%;
}

.copy-product-results[hidden] { display: none; }

.copy-product-table table {
  min-width: 680px;
}

.copy-product-table .button {
  white-space: nowrap;
}

.form-section {
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--insight-border);
  border-radius: 12px;
  background: var(--insight-bg-soft);
}

.form-section legend {
  padding: 0 0.45rem;
  color: var(--insight-blue-900);
  font-weight: 800;
}

.product-data-sections {
  display: grid;
  gap: 0.9rem;
}

.product-data-group {
  border: 1px solid #d4e0ef;
  border-radius: 7px;
  background: #fff;
  padding: 0.9rem;
}

.product-data-group h3 {
  margin: 0 0 0.75rem;
  color: var(--insight-blue-900);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
}

.product-data-group > div > label,
.product-pricing-grid label {
  font-size: 0.92rem;
  font-weight: 700;
}

.product-data-grid,
.product-pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: end;
}

.product-description-field {
  grid-column: span 2;
}

.product-data-identification .product-data-grid > label {
  margin-bottom: 0;
}

.product-data-pricing {
  border-color: #b9d0ed;
  background: #f5f9ff;
}

.product-pricing-grid input {
  min-height: 46px;
  text-align: right;
  font-size: 1.12rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.product-pricing-grid > label,
.product-markup-field label {
  margin: 0;
}

.product-cost-field input {
  border-color: #aebdd0;
  background: #f3f6fa;
}

.product-sale-field input {
  border-color: #3979c7;
  background: #e7f1ff;
  color: #073d80;
}

.product-sale-secondary-field input {
  border-color: #6d99cf;
  background: #f0f6ff;
  color: #164f91;
}

.product-markup-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px;
  gap: 0.45rem;
  align-items: end;
}

.product-markup-field .button {
  align-self: end;
  height: 46px;
  min-height: 46px;
  margin: 0;
  padding: 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 800;
}

.product-operation-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.product-pdv-grid {
  grid-template-columns: repeat(2, minmax(210px, 1fr));
  max-width: 50%;
}

@media (max-width: 980px) {
  .product-data-grid,
  .product-pricing-grid,
  .product-operation-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-pdv-grid {
    max-width: none;
  }
}

@media (max-width: 620px) {
  .product-data-group {
    padding: 0.75rem;
  }

  .product-data-grid,
  .product-pricing-grid,
  .product-operation-grid,
  .product-pdv-grid {
    grid-template-columns: 1fr;
  }

  .product-description-field {
    grid-column: auto;
  }
}

.promotion-clubs-panel {
  display: grid;
  gap: 1rem;
}

.promotion-clubs-setting,
.promotion-clubs-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.promotion-clubs-setting > div,
.promotion-clubs-toolbar > div,
.promotion-club-info {
  display: grid;
  gap: 0.25rem;
}

.promotion-clubs-setting small,
.promotion-clubs-toolbar small,
.promotion-club-info small {
  color: var(--insight-text-soft);
}

.promotion-clubs-setting select {
  width: 9rem;
  flex: 0 0 9rem;
}

.promotion-clubs-content {
  display: grid;
  gap: 0.85rem;
  padding-top: 1rem;
  border-top: 1px solid var(--insight-border);
}

.promotion-clubs-content[hidden] {
  display: none;
}

.promotion-clubs-check-all {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  width: auto;
  cursor: pointer;
  font-weight: 700;
}

.promotion-clubs-check-all input,
.promotion-club-card input {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
}

.promotion-clubs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.75rem;
}

.promotion-club-card {
  display: grid;
  grid-template-columns: 1.2rem minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  min-height: 4.6rem;
  padding: 0.85rem;
  border: 1px solid var(--insight-border);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.promotion-club-card > input {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
}

.promotion-club-check {
  display: none;
}

.promotion-club-info {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}

.promotion-club-card:hover {
  border-color: var(--insight-blue-600);
}

.promotion-club-card.is-selected {
  border-color: var(--insight-blue-600);
  background: #eaf3ff;
  box-shadow: 0 0 0 1px rgba(20, 92, 176, 0.12);
}

.promotion-club-info strong,
.promotion-club-info small {
  overflow-wrap: anywhere;
}

.promotion-clubs-empty {
  margin: 0;
  padding: 1rem;
  color: var(--insight-text-soft);
}

.client-clubs-panel {
  margin-top: 1rem;
}

.client-clubs-search {
  display: grid;
  gap: 0.4rem;
  max-width: 34rem;
}

.client-clubs-panel .promotion-clubs-grid {
  padding-top: 0.15rem;
}

@media (max-width: 720px) {
  .promotion-clubs-setting,
  .promotion-clubs-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .promotion-clubs-setting select {
    width: 100%;
    flex-basis: auto;
  }

  .promotion-clubs-grid {
    grid-template-columns: 1fr;
  }
}

.form-subsection {
  margin-top: 0.75rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--insight-border);
}

.form-subsection-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.form-subsection h3 {
  margin: 0;
  color: var(--insight-blue-900);
  font-size: 1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.85rem;
}

.featured-field {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--insight-blue-900);
}

.featured-field input {
  border-color: rgba(18, 84, 170, 0.45);
  background: #eaf2ff;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(18, 84, 170, 0.08);
}

.featured-field input:focus {
  border-color: var(--insight-blue-600);
  box-shadow: 0 0 0 3px rgba(29, 103, 194, 0.18);
}

.product-ean-field > label {
  display: block;
  margin-bottom: 0;
}

.product-ean-control {
  align-items: stretch;
  display: grid;
  gap: 0.4rem;
  grid-template-columns: minmax(0, 1fr) auto;
}

.product-ean-control .button {
  align-self: stretch;
  margin: 0.3rem 0 0;
  min-width: 58px;
  padding-inline: 0.65rem;
}

.product-ean-generate::before {
  content: "\21bb";
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
}

.product-ean-generate.is-loading::before {
  animation: product-ean-spin 0.7s linear infinite;
}

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

.butcher-formula-toolbar,
.butcher-formula-summary {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
}

.butcher-formula-toolbar label { flex: 1 1 360px; }
.butcher-formula-summary { margin: 12px 0; }
.butcher-formula-summary span { padding: 7px 10px; border: 1px solid var(--insight-border); background: var(--insight-bg-soft); }
.butcher-formula-results { margin-top: 8px; border: 1px solid var(--insight-border); max-height: 210px; overflow: auto; }
.butcher-formula-result-row {
  display: grid;
  grid-template-columns: minmax(110px, 160px) 1fr auto;
  align-items: center;
  width: 100%;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--insight-border);
  background: #fff;
  color: var(--insight-text);
  text-align: left;
}
.butcher-formula-result-row:hover {
  background: var(--insight-bg-soft);
}
.butcher-formula-result-row strong {
  color: var(--insight-blue-800);
  font-variant-numeric: tabular-nums;
}
.butcher-formula-result-row span { color: var(--insight-text); }
.butcher-formula-result-row .button { margin: 0; }
.butcher-formula-modal { width: min(560px, calc(100vw - 24px)); }
.butcher-formula-modal-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.butcher-formula-modal-actions { justify-content: flex-end; margin-top: 18px; }

@media (max-width: 720px) {
  .butcher-formula-result-row { grid-template-columns: 1fr auto; }
  .butcher-formula-result-row span { grid-column: 1 / -1; grid-row: 2; }
  .butcher-formula-modal-fields { grid-template-columns: 1fr; }
}

.featured-field-wide {
  grid-column: span 2;
}

@media (max-width: 720px) {
  .featured-field-wide {
    grid-column: auto;
  }
}

.form-grid-action {
  display: grid;
  align-content: start;
  gap: 0.35rem;
}

.form-grid-action::before {
  content: "";
  display: block;
  min-height: 1.2rem;
}

.form-grid-action .button {
  width: 100%;
  margin-top: 0;
  min-height: 42px;
  white-space: nowrap;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.form-actions .button,
.form-actions button {
  margin-top: 0;
}

.store-participants-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(18, 84, 170, 0.18);
  border-radius: 10px;
  background: #f8fbff;
  color: var(--insight-blue-900);
  font-weight: 700;
}

.store-participants-toolbar > span {
  color: var(--insight-text-soft);
  font-size: 0.9rem;
  font-weight: 700;
}

.store-check-all,
.store-participant-card {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
}

.store-check-all {
  align-items: center;
  cursor: pointer;
}

.store-check-all input,
.store-participant-card input {
  width: 18px;
  height: 18px;
  margin-top: 0.1rem;
  accent-color: var(--insight-blue-700);
}

.store-participants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.75rem;
}

.store-participant-card {
  min-height: 74px;
  padding: 0.85rem;
  border: 1px solid var(--insight-border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.store-participant-card strong {
  display: block;
  color: var(--insight-blue-950);
  line-height: 1.35;
}

.store-participant-card small {
  display: block;
  margin-top: 0.2rem;
  color: var(--insight-text-soft);
  font-weight: 700;
}

.store-participant-card.is-selected {
  border-color: rgba(29, 103, 194, 0.55);
  background: #eef5ff;
  box-shadow: 0 10px 22px rgba(18, 84, 170, 0.08);
}

.linked-products-grid {
  margin-top: -0.25rem;
}

.linked-products-grid table {
  min-width: 620px;
}

.store-stock-section {
  display: grid;
  gap: 0.85rem;
}

.store-stock-section .form-subsection-header {
  margin-bottom: 0;
}

.store-stock-section .form-subsection-header p {
  margin: 0.2rem 0 0;
  color: var(--insight-text-soft);
  font-size: 0.9rem;
}

.store-stock-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.store-stock-total {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0.45rem 0.75rem;
  border: 1px solid rgba(18, 84, 170, 0.22);
  border-radius: 8px;
  background: #eef5ff;
  color: var(--insight-blue-800);
  font-weight: 800;
  white-space: nowrap;
}

.store-stock-table th,
.store-stock-table td {
  vertical-align: middle;
}

.store-stock-table input {
  width: 132px;
  min-width: 112px;
  margin: 0;
}

.alert.success {
  background: #ecfdf5;
  border-color: #bbf7d0;
  color: #166534;
}

.pnfe-pending-alert {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--insight-danger-border);
  border-left: 6px solid #dc2626;
  border-radius: 8px;
  background: linear-gradient(90deg, #fef2f2, #fff7f7);
  color: #7f1d1d;
}

.pnfe-pending-alert span {
  font-weight: 900;
}

.pnfe-pending-alert strong {
  min-width: 44px;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  text-align: center;
}

.pnfe-pending-alert small {
  color: #991b1b;
  font-weight: 700;
}

.metric-grid,
.info-grid,
.totals-grid {
  display: grid;
  gap: 0.85rem;
}

.metric-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.info-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.totals-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.metric-card,
.info-grid > div,
.totals-grid > span {
  border: 1px solid var(--insight-border);
  border-radius: 8px;
  background: var(--insight-bg-soft);
  padding: 0.9rem;
}

.metric-card {
  color: var(--insight-text);
  text-decoration: none;
}

.metric-card:hover,
.metric-card.is-active {
  border-color: var(--insight-blue-600);
  background: #eaf2ff;
}

.metric-card span,
.info-grid span,
.totals-grid span {
  display: block;
  color: var(--insight-text-soft);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.metric-card strong,
.info-grid strong,
.totals-grid strong {
  display: block;
  color: var(--insight-text);
  font-size: 1.1rem;
  margin-top: 0.18rem;
}

.info-grid small {
  display: block;
  color: var(--insight-text-soft);
  margin-top: 0.2rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 0.65rem;
  background: #dbeafe;
  color: var(--insight-blue-900);
  font-weight: 900;
  font-size: 0.78rem;
}

.is-selected-row {
  background: #edf5ff;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(7, 13, 25, 0.64);
}

.modal-overlay[hidden] { display: none; }

body.modal-open { overflow: hidden; }

.modal-card {
  width: min(900px, 100%);
  max-height: min(92vh, 820px);
  overflow: auto;
  background: var(--insight-surface);
  border: 1px solid var(--insight-border);
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(3, 7, 18, 0.42);
  padding: 1rem;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.modal-header h2,
.modal-header p {
  margin: 0;
}

.modal-header h2 {
  color: var(--insight-blue-900);
  font-size: 1.2rem;
}

.modal-header p {
  color: var(--insight-text-soft);
  font-size: 0.9rem;
}

.entry-tabs {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin: 1rem 0 0.75rem;
  border-bottom: 1px solid var(--insight-border);
}

.entry-tab-button {
  appearance: none;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: transparent;
  color: var(--insight-text-soft);
  font-weight: 800;
  padding: 0.75rem 1rem;
  cursor: pointer;
}

.entry-tab-button.is-active {
  background: var(--insight-surface);
  border-color: var(--insight-border);
  color: var(--insight-blue-900);
  box-shadow: 0 -8px 22px rgba(17, 85, 177, 0.08);
}

.entry-tab-panel[hidden] {
  display: none;
}

.sync-progress-card {
  border: 1px solid var(--insight-border);
  background: linear-gradient(135deg, #f8fbff 0%, #eef5ff 100%);
  border-radius: 8px;
  padding: 18px;
  margin-top: 16px;
  box-shadow: var(--insight-shadow-soft);
}

.sync-progress-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  color: var(--insight-text);
}

.sync-progress-head strong,
.sync-progress-head span {
  display: block;
}

.sync-progress-head strong {
  color: var(--insight-blue-900);
  font-size: 1rem;
}

.sync-progress-head span {
  color: var(--insight-text-soft);
  font-size: 0.9rem;
}

#sync-percent {
  color: var(--insight-blue-900);
  font-weight: 800;
  font-size: 1.15rem;
}

.sync-progress-track {
  height: 12px;
  background: #dbeafe;
  border-radius: 999px;
  overflow: hidden;
  margin: 16px 0 12px;
}

.sync-progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--insight-blue-700), var(--insight-blue-900));
  border-radius: inherit;
  transition: width 0.35s ease;
}

.sync-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  color: var(--insight-text-soft);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.config-password-card {
  width: min(420px, 100%);
  border-radius: 10px;
}

.config-password-card label {
  display: grid;
  gap: 0.35rem;
  font-weight: 700;
  color: var(--insight-text);
}

.config-password-card input {
  letter-spacing: 0;
}

.config-password-error {
  margin: 0.85rem 0 0;
}

.calculadora-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.calculadora-results div {
  display: grid;
  gap: 0.25rem;
  padding: 0.85rem;
  border: 1px solid var(--insight-border);
  border-radius: 10px;
  background: var(--insight-bg-soft);
}

.calculadora-results span,
.calculadora-results small {
  color: var(--insight-text-soft);
}

.calculadora-results strong {
  color: var(--insight-blue-900);
  font-size: 1.3rem;
}

.calculadora-results em {
  color: var(--insight-text);
  font-style: normal;
  font-weight: 700;
}

.placeholder-card {
  border: 1px dashed var(--insight-border-strong);
  border-radius: 12px;
  background: var(--insight-bg-soft);
  min-height: 220px;
  padding: 1.2rem;
  display: grid;
  align-content: start;
  gap: 0.5rem;
}

.placeholder-card h3,
.placeholder-card p { margin: 0; }

.placeholder-card p { color: var(--insight-text-soft); }

@media (max-width: 960px) {
  .dashboard-shell { grid-template-columns: 1fr; }

  .dashboard-analytics-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-panel-large {
    grid-row: auto;
  }

  .dashboard-donut-wrap {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    transform: translateX(-100%);
    width: min(280px, 82vw);
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(2.5rem + env(safe-area-inset-bottom));
    z-index: 30;
    transition: transform 0.2s ease;
  }

  .sidebar-menu {
    padding-bottom: calc(3.5rem + env(safe-area-inset-bottom));
  }

  .sidebar.is-open { transform: translateX(0); }

  body.menu-open {
    overflow: hidden;
    touch-action: none;
  }

  body.menu-open .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    margin: 0;
    border: none;
    background: rgba(7, 13, 25, 0.5);
    z-index: 20;
    border-radius: 0;
    padding: 0;
  }

  .menu-toggle { display: inline-block; }
  .dashboard-content { padding: 0.8rem; }
}

@media (max-width: 640px) {
  .xml-payment-grid {
    grid-template-columns: 1fr;
  }

  .xml-payment-grid .form-grid {
    grid-template-columns: 1fr;
  }

  .xml-product-result,
  .xml-link-form {
    grid-template-columns: 1fr;
  }

  .xml-final-actions {
    position: sticky;
    bottom: 0;
    z-index: 15;
    flex-direction: column;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid #d6e1f2;
  }

  .xml-final-actions .button {
    width: 100%;
  }

  .section-page:has(.module-option-primary ~ .module-option-sub) .module-option-primary:has(.module-option-card.is-active) .module-option-card:not(.is-active) {
    display: none;
  }

  .section-page:has(.module-option-primary ~ .module-option-sub) .module-option-primary:has(.module-option-card.is-active) {
    grid-template-columns: 1fr;
  }

  .module-option-sub:has(.module-option-card.is-active) .module-option-card:not(.is-active) {
    display: none;
  }

  .module-option-sub:has(.module-option-card.is-active) {
    grid-template-columns: 1fr;
  }

  .copy-product-panel { grid-template-columns: 1fr; }
  .login-card { padding: 1.25rem; }
  .login-logo { width: min(240px, 82%); max-height: 92px; }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .content-grid,
  .toolbar { grid-template-columns: 1fr; }

  .table-wrap {
    overflow: visible;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
  }

  .table-wrap table {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0 0.8rem;
  }

  .table-wrap thead {
    display: none;
  }

  .table-wrap tbody,
  .table-wrap tr,
  .table-wrap td {
    display: block;
    width: 100%;
  }

  .table-wrap tbody tr {
    background: var(--insight-surface);
    border: 1px solid var(--insight-border);
    border-radius: 12px;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
    padding: 0.7rem;
  }

  .table-wrap tbody tr:hover {
    background: var(--insight-surface);
  }

  .table-wrap td {
    display: grid;
    grid-template-columns: minmax(95px, 38%) minmax(0, 1fr);
    gap: 0.65rem;
    align-items: center;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    padding: 0.62rem 0.15rem;
    word-break: break-word;
  }

  .table-wrap td:last-child {
    border-bottom: 0;
    grid-template-columns: 1fr;
  }

  .table-wrap td::before {
    content: attr(data-label);
    color: var(--insight-text-soft);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  .table-wrap td:empty {
    display: none;
  }

  .table-wrap td[data-label="Acoes"],
  .table-wrap td[data-label="AÃ§Ãµes"] {
    grid-template-columns: 1fr;
  }

  .table-wrap td[data-label="Acoes"]::before,
  .table-wrap td[data-label="AÃ§Ãµes"]::before {
    margin-bottom: 0.15rem;
  }

  .table-wrap .button.small,
  .table-wrap .button {
    width: 100%;
    justify-content: center;
  }

  .transform-report-columns,
  .transform-report-card .fechamento-card-header,
  .transform-report-card .fechamento-card-footer {
    grid-template-columns: 1fr;
  }

  .transform-report-card table {
    min-width: 0;
  }

  .table-wrap form.inline-form,
  .table-wrap .inline-form {
    display: block !important;
    width: 100%;
    margin-top: 0.45rem;
  }

  .cesta-open-panel,
  .cesta-open-metrics {
    grid-template-columns: 1fr;
  }

  .cesta-open-actions {
    justify-content: flex-start;
  }

  .section-page { padding: 0.85rem; }
}




@media (max-width: 960px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .dashboard-content {
    min-width: 0;
    overflow-x: hidden;
  }

  .topbar,
  .section-page,
  .report-page,
  .financeiro-page,
  .cartao-sales-report,
  .coupon-report-card,
  .fechamento-card,
  .transform-report-card {
    max-width: 100%;
    min-width: 0;
  }

  .module-option-grid,
  .module-option-grid.compact,
  .summary-grid,
  .content-grid,
  .shortcut-grid,
  .dashboard-analytics-grid,
  .cartao-report-totals,
  .coupon-report-header,
  .fechamento-card-header,
  .fechamento-card-footer,
  .transform-report-columns,
  .xml-totals-grid,
  .nfe-summary-grid,
  .finance-dashboard-grid,
  .finance-card-grid,
  .cartao-config-grid,
  .cartao-overview-grid {
    grid-template-columns: 1fr !important;
  }

  .module-option-card,
  .summary-card,
  .shortcut-card,
  .finance-dashboard-card,
  .coupon-report-card,
  .fechamento-card,
  .transform-report-card {
    min-width: 0;
  }

  .toolbar,
  .report-toolbar,
  .form-grid,
  .copy-product-panel,
  .action-row,
  .search-row,
  .search-inline,
  .filter-row,
  .filters-row,
  .report-filters,
  .cartao-filter-grid,
  .cartao-tax-form,
  .finance-filter-grid,
  .finance-form-grid,
  .nfe-form-grid,
  .xml-link-form,
  .xml-product-result,
  .xml-payment-grid,
  .xml-payment-grid .form-grid {
    grid-template-columns: 1fr !important;
    align-items: stretch;
  }

  .action-row,
  .form-actions,
  .topbar-actions,
  .pagination,
  .report-toolbar {
    flex-wrap: wrap;
  }

  label,
  input,
  select,
  textarea,
  button,
  .button {
    max-width: 100%;
  }

  .button,
  button,
  .toolbar button,
  .report-toolbar button,
  .action-row .button,
  .form-actions .button,
  .form-actions button {
    width: 100%;
    justify-content: center;
  }

  .pagination {
    display: flex;
    align-items: center;
    gap: 0.4rem;
  }

  .pagination span {
    width: 100%;
    font-size: 0.9rem;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 640px) {
  .dashboard-content {
    padding: 0.65rem;
  }

  .topbar {
    gap: 0.75rem;
    padding: 0.75rem;
  }

  .topbar-left {
    width: 100%;
    min-width: 0;
  }

  .topbar-left h1,
  .section-header h2,
  .section-page h2 {
    font-size: 1.08rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  .topbar-left p,
  .section-header p,
  .section-page p {
    font-size: 0.86rem;
    line-height: 1.35;
  }

  .section-page,
  .report-page {
    padding: 0.75rem;
    border-radius: 10px;
    overflow: hidden;
  }

  .module-option-grid,
  .module-option-grid.compact,
  .module-option-primary,
  .module-option-sub {
    grid-template-columns: 1fr !important;
    gap: 0.65rem;
  }

  .module-option-card {
    min-height: auto;
    padding: 0.85rem;
  }

  .summary-grid {
    gap: 0.65rem;
  }

  .summary-card {
    padding: 0.8rem;
  }

  .summary-card strong {
    font-size: 1.22rem;
    overflow-wrap: anywhere;
  }

  .toolbar,
  .report-toolbar,
  .form-grid,
  .content-grid,
  .shortcut-grid,
  .copy-product-panel {
    gap: 0.65rem;
  }

  .table-wrap {
    overflow: visible !important;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    width: 100%;
  }

  .table-wrap table,
  .coupon-report-items,
  .cartao-sales-report-table {
    min-width: 0 !important;
    width: 100% !important;
    border-collapse: separate;
    border-spacing: 0 0.75rem;
  }

  .table-wrap thead {
    display: none;
  }

  .table-wrap tbody,
  .table-wrap tr,
  .table-wrap td {
    display: block;
    width: 100%;
  }

  .table-wrap tbody tr {
    background: var(--insight-surface);
    border: 1px solid var(--insight-border);
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
    margin-bottom: 0.75rem;
    padding: 0.68rem;
  }

  .table-wrap tbody tr:hover {
    background: var(--insight-surface);
  }

  .table-wrap td {
    display: grid;
    grid-template-columns: minmax(92px, 36%) minmax(0, 1fr);
    gap: 0.55rem;
    align-items: start;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    padding: 0.55rem 0.1rem;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .table-wrap td:last-child {
    border-bottom: 0;
    grid-template-columns: 1fr;
  }

  .table-wrap td::before {
    content: attr(data-label);
    color: var(--insight-text-soft);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.03em;
    line-height: 1.2;
    text-transform: uppercase;
  }

  .table-wrap td:not([data-label]),
  .table-wrap td[data-label=""] {
    grid-template-columns: 1fr;
  }

  .table-wrap td:not([data-label])::before,
  .table-wrap td[data-label=""]::before {
    display: none;
  }

  .table-wrap td:empty {
    display: none;
  }

  .table-wrap td[data-label="Acoes"],
  .table-wrap td[data-label="AÃ§Ãµes"],
  .table-wrap td[data-label="AÃƒÂ§ÃƒÂµes"] {
    grid-template-columns: 1fr;
  }

  .table-wrap td[data-label="Acoes"]::before,
  .table-wrap td[data-label="AÃ§Ãµes"]::before,
  .table-wrap td[data-label="AÃƒÂ§ÃƒÂµes"]::before {
    margin-bottom: 0.15rem;
  }

  .table-wrap .button.small,
  .table-wrap .button,
  .table-wrap button,
  .table-wrap input,
  .table-wrap select {
    width: 100%;
  }

  .coupon-report-card {
    border-radius: 10px;
  }

  .coupon-report-header {
    grid-template-columns: 1fr !important;
    padding: 0.75rem;
  }

  .coupon-report-total {
    text-align: left;
  }

  .fechamento-status {
    justify-self: stretch;
    min-width: 0;
    text-align: left;
  }
}

@media (max-width: 960px) {
  .report-page .table-wrap,
  .cartao-sales-report.table-wrap,
  .coupon-report-card {
    overflow: visible !important;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    width: 100%;
  }

  .report-page .table-wrap table,
  .report-page .table-wrap thead,
  .report-page .table-wrap tbody,
  .report-page .table-wrap tfoot,
  .report-page .table-wrap tr,
  .report-page .table-wrap td,
  .report-page .table-wrap tfoot th,
  .coupon-report-items,
  .coupon-report-items thead,
  .coupon-report-items tbody,
  .coupon-report-items tfoot,
  .coupon-report-items tr,
  .coupon-report-items td,
  .coupon-report-items tfoot th,
  .cartao-sales-report-table,
  .cartao-sales-report-table thead,
  .cartao-sales-report-table tbody,
  .cartao-sales-report-table tfoot,
  .cartao-sales-report-table tr,
  .cartao-sales-report-table td,
  .cartao-sales-report-table tfoot th {
    display: block;
    width: 100%;
    min-width: 0 !important;
  }

  .report-page .table-wrap thead,
  .report-page .report-table thead,
  .coupon-report-items thead,
  .cartao-sales-report-table thead {
    display: none;
  }

  .report-page .table-wrap table,
  .report-page .report-table table,
  .coupon-report-items,
  .cartao-sales-report-table {
    border-collapse: separate;
    border-spacing: 0;
    table-layout: auto !important;
  }

  .report-page .table-wrap tbody tr,
  .report-page .table-wrap tfoot tr,
  .coupon-report-items tbody tr,
  .coupon-report-items tfoot tr,
  .cartao-sales-report-table tbody tr,
  .cartao-sales-report-table tfoot tr {
    display: block;
    margin: 0 0 0.8rem;
    padding: 0.75rem;
    border: 1px solid var(--insight-border);
    border-radius: 12px;
    background: var(--insight-surface);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
  }

  .report-page .table-wrap tbody tr:hover,
  .coupon-report-items tbody tr:hover,
  .cartao-sales-report-table tbody tr:hover {
    background: var(--insight-surface);
  }

  .report-page .table-wrap td,
  .coupon-report-items td,
  .cartao-sales-report-table td {
    display: grid;
    grid-template-columns: minmax(96px, 36%) minmax(0, 1fr);
    gap: 0.55rem;
    align-items: start;
    border: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    padding: 0.55rem 0.1rem;
    overflow-wrap: anywhere;
    word-break: normal;
    white-space: normal;
  }

  .report-page .table-wrap td:last-child,
  .coupon-report-items td:last-child,
  .cartao-sales-report-table td:last-child {
    border-bottom: 0;
    grid-template-columns: 1fr;
  }

  .report-page .table-wrap td::before,
  .report-page .report-table td::before,
  .coupon-report-items td::before,
  .cartao-sales-report-table td::before {
    content: attr(data-label);
    color: var(--insight-text-soft);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.03em;
    line-height: 1.2;
    text-transform: uppercase;
  }

  .report-page .table-wrap td:not([data-label])::before,
  .report-page .table-wrap td[data-label=""]::before,
  .coupon-report-items td:not([data-label])::before,
  .coupon-report-items td[data-label=""]::before,
  .cartao-sales-report-table td:not([data-label])::before,
  .cartao-sales-report-table td[data-label=""]::before {
    display: none;
  }

  .report-page .table-wrap td:not([data-label]),
  .report-page .table-wrap td[data-label=""],
  .coupon-report-items td:not([data-label]),
  .coupon-report-items td[data-label=""],
  .cartao-sales-report-table td:not([data-label]),
  .cartao-sales-report-table td[data-label=""] {
    grid-template-columns: 1fr;
  }

  .report-page .table-wrap td:empty,
  .coupon-report-items td:empty,
  .cartao-sales-report-table td:empty {
    display: none;
  }

  .report-page .table-wrap .button,
  .report-page .table-wrap button,
  .report-page .report-table .button,
  .report-page .report-table button,
  .report-page .table-wrap input,
  .report-page .table-wrap select,
  .cartao-sales-report-table .button,
  .cartao-sales-report-table button,
  .cartao-sales-report-table input,
  .cartao-sales-report-table select {
    width: 100%;
  }
}


@media (max-width: 960px) {
  .report-page .table-wrap,
  .report-page .report-table,
  .cartao-sales-report.table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto !important;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
    background: var(--insight-surface);
    border: 1px solid var(--insight-border);
    border-radius: 10px;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
    padding: 0.25rem;
  }

  .report-page .table-wrap table,
  .report-page .report-table table,
  .coupon-report-items,
  .cartao-sales-report-table {
    display: table !important;
    width: max-content !important;
    min-width: 760px !important;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    table-layout: auto !important;
  }

  .report-page .table-wrap thead,
  .report-page .report-table thead,
  .coupon-report-items thead,
  .cartao-sales-report-table thead {
    display: table-header-group !important;
  }

  .report-page .table-wrap tbody,
  .report-page .report-table tbody,
  .coupon-report-items tbody,
  .cartao-sales-report-table tbody {
    display: table-row-group !important;
  }

  .report-page .table-wrap tfoot,
  .report-page .report-table tfoot,
  .coupon-report-items tfoot,
  .cartao-sales-report-table tfoot {
    display: table-footer-group !important;
  }

  .report-page .table-wrap tr,
  .report-page .report-table tr,
  .coupon-report-items tr,
  .cartao-sales-report-table tr {
    display: table-row !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
  }

  .report-page .table-wrap th,
  .report-page .table-wrap td,
  .report-page .report-table th,
  .report-page .report-table td,
  .coupon-report-items th,
  .coupon-report-items td,
  .cartao-sales-report-table th,
  .cartao-sales-report-table td,
  .cartao-sales-report-table tfoot th {
    display: table-cell !important;
    width: auto !important;
    min-width: 110px !important;
    max-width: 240px;
    border-bottom: 1px solid var(--insight-border) !important;
    padding: 0.62rem 0.7rem !important;
    white-space: normal;
    overflow-wrap: anywhere;
    vertical-align: middle;
  }

  .report-page .table-wrap th,
  .report-page .report-table th,
  .coupon-report-items th,
  .cartao-sales-report-table th {
    white-space: nowrap;
  }

  .report-page .table-wrap td::before,
  .report-page .report-table td::before,
  .coupon-report-items td::before,
  .cartao-sales-report-table td::before {
    content: none !important;
    display: none !important;
  }

  .report-page .table-wrap .button,
  .report-page .table-wrap button,
  .report-page .report-table .button,
  .report-page .report-table button,
  .cartao-sales-report-table .button,
  .cartao-sales-report-table button {
    width: auto;
    min-width: 92px;
    white-space: nowrap;
  }
}

@media (max-width: 960px) {
  .report-page .report-table,
  .report-page .table-wrap,
  .cartao-sales-report.table-wrap {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }

  .report-page .report-table > table,
  .report-page .table-wrap > table,
  .report-page .table-wrap table,
  .coupon-report-items,
  .cartao-sales-report-table {
    display: table !important;
    width: max-content !important;
    min-width: 900px !important;
    max-width: none !important;
    table-layout: auto !important;
  }

  .report-page .report-table th,
  .report-page .report-table td,
  .report-page .table-wrap th,
  .report-page .table-wrap td,
  .coupon-report-items th,
  .coupon-report-items td,
  .cartao-sales-report-table th,
  .cartao-sales-report-table td {
    display: table-cell !important;
    white-space: nowrap;
  }
}
/* Insight reports mobile scroll normalizer */
@media (max-width: 960px) {
  .section-page.report-page,
  .report-page {
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  .report-page .report-table,
  .report-page .table-wrap,
  .cartao-sales-report.table-wrap,
  .coupon-report-card {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }

  .coupon-report-card {
    background: #ffffff !important;
    border: 1px solid var(--insight-border) !important;
    border-radius: 10px !important;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08) !important;
  }

  .coupon-report-header {
    display: grid !important;
    grid-template-columns: minmax(180px, 1.1fr) minmax(220px, 1.35fr) minmax(160px, 1fr) minmax(180px, 0.9fr) !important;
    width: 920px !important;
    min-width: 920px !important;
    max-width: none !important;
    box-sizing: border-box;
  }

  .report-page .report-table > table,
  .report-page .table-wrap > table,
  .report-page .table-wrap table,
  .coupon-report-items,
  .cartao-sales-report-table {
    display: table !important;
    width: max-content !important;
    min-width: 920px !important;
    max-width: none !important;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    table-layout: auto !important;
  }

  .report-page .report-table thead,
  .report-page .table-wrap thead,
  .coupon-report-items thead,
  .cartao-sales-report-table thead {
    display: table-header-group !important;
  }

  .report-page .report-table tbody,
  .report-page .table-wrap tbody,
  .coupon-report-items tbody,
  .cartao-sales-report-table tbody {
    display: table-row-group !important;
  }

  .report-page .report-table tfoot,
  .report-page .table-wrap tfoot,
  .coupon-report-items tfoot,
  .cartao-sales-report-table tfoot {
    display: table-footer-group !important;
  }

  .report-page .report-table tr,
  .report-page .table-wrap tr,
  .coupon-report-items tr,
  .cartao-sales-report-table tr {
    display: table-row !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
  }

  .report-page .report-table th,
  .report-page .report-table td,
  .report-page .table-wrap th,
  .report-page .table-wrap td,
  .coupon-report-items th,
  .coupon-report-items td,
  .cartao-sales-report-table th,
  .cartao-sales-report-table td,
  .cartao-sales-report-table tfoot th {
    display: table-cell !important;
    width: auto !important;
    min-width: 105px !important;
    max-width: 260px;
    padding: 0.56rem 0.65rem !important;
    border-bottom: 1px solid var(--insight-border) !important;
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    vertical-align: middle !important;
  }

  .report-page .report-table td::before,
  .report-page .table-wrap td::before,
  .coupon-report-items td::before,
  .cartao-sales-report-table td::before {
    content: none !important;
    display: none !important;
  }

  .report-page .report-table .button,
  .report-page .table-wrap .button,
  .report-page .report-table button,
  .report-page .table-wrap button,
  .cartao-sales-report-table .button,
  .cartao-sales-report-table button {
    width: auto !important;
    min-width: 90px;
    white-space: nowrap;
  }
}

@media (max-width: 640px) {
  .coupon-report-header,
  .report-page .report-table > table,
  .report-page .table-wrap > table,
  .report-page .table-wrap table,
  .coupon-report-items,
  .cartao-sales-report-table {
    width: 860px !important;
    min-width: 860px !important;
    max-width: none !important;
  }
}
/* End Insight reports mobile scroll normalizer */
/* Insight mobile sidebar safe space */
@media (max-width: 960px) {
  .sidebar {
    height: 100vh;
    height: 100svh;
    height: 100dvh;
    max-height: 100dvh;
    overflow-y: auto !important;
    padding-bottom: calc(7rem + env(safe-area-inset-bottom)) !important;
    scroll-padding-bottom: calc(7rem + env(safe-area-inset-bottom));
  }

  .sidebar-menu {
    padding-bottom: calc(8rem + env(safe-area-inset-bottom)) !important;
  }
}
/* End Insight mobile sidebar safe space */
/* Insight card reconciliation mobile scroll */
@media (max-width: 960px) {
  .financeiro-page .cartao-recebiveis-table,
  .financeiro-page .cartao-sales-report,
  .financeiro-page .cartao-report-summary,
  .financeiro-page .table-wrap.cartao-recebiveis-table,
  .financeiro-page .table-wrap.cartao-sales-report {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }

  .financeiro-page .cartao-recebiveis-table > table,
  .financeiro-page .cartao-sales-report > table,
  .financeiro-page .cartao-report-summary > table,
  .financeiro-page .cartao-sales-report-table {
    display: table !important;
    width: max-content !important;
    max-width: none !important;
    min-width: 1080px !important;
    table-layout: auto !important;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
  }

  .financeiro-page .cartao-recebiveis-table > table {
    min-width: 1180px !important;
  }

  .financeiro-page .cartao-recebiveis-table thead,
  .financeiro-page .cartao-sales-report-table thead {
    display: table-header-group !important;
  }

  .financeiro-page .cartao-recebiveis-table tbody,
  .financeiro-page .cartao-sales-report-table tbody {
    display: table-row-group !important;
  }

  .financeiro-page .cartao-recebiveis-table tfoot,
  .financeiro-page .cartao-sales-report-table tfoot {
    display: table-footer-group !important;
  }

  .financeiro-page .cartao-recebiveis-table tr,
  .financeiro-page .cartao-sales-report-table tr {
    display: table-row !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
  }

  .financeiro-page .cartao-recebiveis-table th,
  .financeiro-page .cartao-recebiveis-table td,
  .financeiro-page .cartao-sales-report-table th,
  .financeiro-page .cartao-sales-report-table td,
  .financeiro-page .cartao-sales-report-table tfoot th {
    display: table-cell !important;
    width: auto !important;
    min-width: 98px !important;
    max-width: 250px;
    padding: 0.52rem 0.56rem !important;
    border-bottom: 1px solid var(--insight-border) !important;
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    vertical-align: middle !important;
  }

  .financeiro-page .cartao-recebiveis-table td::before,
  .financeiro-page .cartao-sales-report-table td::before {
    content: none !important;
    display: none !important;
  }

  .financeiro-page .cartao-recebiveis-table td:nth-child(11),
  .financeiro-page .cartao-recebiveis-table th:nth-child(11) {
    min-width: 128px !important;
    max-width: 150px;
  }

  .financeiro-page .cartao-recebivel-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0.35rem !important;
    min-width: 108px;
  }

  .financeiro-page .cartao-recebiveis-table .inline-form,
  .financeiro-page .cartao-recebiveis-table .inline-form:last-child {
    display: block !important;
    margin: 0 !important;
  }

  .financeiro-page .cartao-recebiveis-table .button,
  .financeiro-page .cartao-recebiveis-table button,
  .financeiro-page .cartao-sales-report-table .button,
  .financeiro-page .cartao-sales-report-table button {
    width: 100% !important;
    min-width: 96px;
    white-space: nowrap;
  }

  .financeiro-page .finance-table-scrollbar {
    display: block !important;
  }
}

@media (max-width: 640px) {
  .financeiro-page .cartao-recebiveis-table > table {
    min-width: 1120px !important;
  }

  .financeiro-page .cartao-sales-report > table,
  .financeiro-page .cartao-report-summary > table,
  .financeiro-page .cartao-sales-report-table {
    min-width: 980px !important;
  }

  .financeiro-page .cartao-recebiveis-table th,
  .financeiro-page .cartao-recebiveis-table td,
  .financeiro-page .cartao-sales-report-table th,
  .financeiro-page .cartao-sales-report-table td,
  .financeiro-page .cartao-sales-report-table tfoot th {
    min-width: 88px !important;
    padding: 0.48rem 0.5rem !important;
    font-size: 0.76rem;
  }
}
/* End Insight card reconciliation mobile scroll */
@media print {
  @page { size: A4; margin: 10mm; }
  .no-print,
  .sidebar,
  .mobile-topbar,
  .sidebar-overlay {
    display: none !important;
  }
  .dashboard-shell,
  .main-content,
  .section-page.report-page {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #ffffff !important;
    box-shadow: none !important;
  }

  .cartao-sales-report.report-page {
    border: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
    padding: 0 !important;
  }

  .cartao-sales-report.report-page .cartao-report-totals {
    grid-template-columns: repeat(5, 1fr);
    gap: 0.45rem;
  }

  .cartao-sales-report.report-page .finance-dashboard-card {
    min-height: 72px;
    padding: 0.55rem;
    color: #000;
    background: #f8fafc !important;
    border: 1px solid #cbd5e1;
  }

  .cartao-sales-report.report-page .finance-dashboard-card::after {
    display: none;
  }

  .cartao-sales-report.report-page .finance-dashboard-card span,
  .cartao-sales-report.report-page .finance-dashboard-card strong,
  .cartao-sales-report.report-page .finance-dashboard-card small {
    color: #000 !important;
  }

  .cartao-sales-report.report-page table {
    min-width: 0 !important;
    width: 100%;
    font-size: 0.72rem;
  }

  .cartao-sales-report.report-page th,
  .cartao-sales-report.report-page td {
    padding: 0.35rem;
  }
}


.cce-actions {
  justify-content: flex-start;
  margin-bottom: 0.75rem;
}

.cce-modal-card {
  width: min(760px, calc(100vw - 2rem));
}

.mdfe-modal-card { width:min(1120px,calc(100vw - 24px)); }
.mdfe-form { display:grid; gap:12px; }
.mdfe-form fieldset { margin:0; }
.mdfe-note-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-bottom:14px; }
.mdfe-note-summary>div { background:#eef5ff; border:1px solid var(--insight-border); padding:10px 12px; }
.mdfe-note-summary span { color:var(--insight-text-soft); display:block; font-size:12px; font-weight:700; }
.mdfe-note-summary strong { color:var(--insight-blue-900); display:block; margin-top:3px; }
.mdfe-modal-actions { justify-content:flex-end; }
.button.mdfe-close-action { background:#c62828; border:1px solid #9f1f1f; color:#fff; }
.button.mdfe-close-action:hover { background:#ad2020; filter:none; }
.button.mdfe-status-closed,
.button.mdfe-status-closed:disabled { background:#fff; border:1px solid #111; color:#111; cursor:default; opacity:1; }
.mdfe-key-value { font-family:Consolas,monospace; font-size:12px; overflow-wrap:anywhere; }
.mdfe-emitting-overlay { align-items:center; background:rgba(3,10,24,.78); display:flex; inset:0; justify-content:center; padding:20px; position:fixed; z-index:10030; }
.mdfe-emitting-overlay[hidden] { display:none; }
.mdfe-emitting-card { background:#fff; border:1px solid #8eb9f2; box-shadow:0 24px 72px rgba(2,16,40,.38); display:grid; gap:16px; max-width:600px; padding:28px; width:min(94vw,600px); }
.mdfe-emitting-card h2 { color:#072f72; margin:0; }
.mdfe-emitting-card p { color:#3b4b63; margin:4px 0 0; }
.mdfe-emitting-card small { color:#607089; }
.mdfe-emitting-spinner { animation:mdfe-spin .8s linear infinite; border:4px solid #d4e3f7; border-radius:50%; border-top-color:#0b55b7; height:42px; width:42px; }
.mdfe-emitting-progress { background:#dce9fa; height:10px; overflow:hidden; }
.mdfe-emitting-progress span { animation:mdfe-progress 1.4s ease-in-out infinite; background:#0b55b7; display:block; height:100%; width:38%; }
.mdfe-emitting-card ol { display:grid; gap:8px; grid-template-columns:repeat(4,1fr); list-style:none; margin:0; padding:0; }
.mdfe-emitting-card li { border-top:3px solid #cad6e6; color:#718096; font-size:12px; font-weight:800; padding-top:7px; text-align:center; }
.mdfe-emitting-card li.is-active { border-color:#0b55b7; color:#0b55b7; }
@keyframes mdfe-spin { to { transform:rotate(360deg); } }
@keyframes mdfe-progress { from { transform:translateX(-110%); } to { transform:translateX(300%); } }

html[data-content-theme="dark"] .mdfe-modal .mdfe-modal-card,
html[data-content-theme="dark"] .mdfe-emitting-card { background:#172033; border-color:var(--insight-border); color:var(--insight-text); }
html[data-content-theme="dark"] .mdfe-note-summary>div { background:#1b2637; border-color:var(--insight-border); }
html[data-content-theme="dark"] .mdfe-note-summary :where(span,strong),
html[data-content-theme="dark"] .mdfe-emitting-card :where(h2,p,small) { color:var(--insight-text); }
html[data-content-theme="dark"] .mdfe-emitting-progress { background:#2a3a52; }
html[data-content-theme="dark"] .mdfe-emitting-card li { border-color:#40516a; color:#9eacc0; }
html[data-content-theme="dark"] .mdfe-emitting-card li.is-active { border-color:#69a7f5; color:#bcd9ff; }
html[data-content-theme="dark"] .button.mdfe-status-closed,
html[data-content-theme="dark"] .button.mdfe-status-closed:disabled { background:#050505; border-color:#fff; color:#fff; }

@media (max-width:760px) {
  .mdfe-note-summary,.mdfe-emitting-card ol { grid-template-columns:1fr; }
  .mdfe-emitting-card li { border-left:3px solid #cad6e6; border-top:0; padding:4px 0 4px 9px; text-align:left; }
}

.cce-legal-note {
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid #bfdbfe;
  border-left: 4px solid var(--insight-blue-700);
  border-radius: 8px;
  background: #eff6ff;
  color: #0f172a;
}

.cce-legal-note strong {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--insight-blue-900);
}

.cce-legal-note p {
  margin: 0 0 0.45rem;
  line-height: 1.45;
}

.cce-legal-note p:last-child {
  margin-bottom: 0;
  font-weight: 700;
}

.cce-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

.cce-form .cce-textarea-field,
.cce-form .form-actions {
  grid-column: 1 / -1;
}

.cce-form textarea[name="correcao"] {
  width: 100%;
  min-height: 190px;
  resize: vertical;
  line-height: 1.45;
}

.cce-form .form-actions {
  justify-content: flex-end;
  margin-top: 0.2rem;
}

/* Impressao de etiquetas */
.checkbox-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
    margin: 10px 0 16px;
}

.checkbox-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border: 1px solid #bfd2ee;
    border-radius: 8px;
    background: #f4f8ff;
    cursor: pointer;
}

.checkbox-card input {
    width: 18px;
    height: 18px;
    margin-top: 3px;
}

.checkbox-card span {
    display: grid;
    gap: 4px;
}

.checkbox-card small,
.muted {
    color: #53657c;
}

.compact-input {
    max-width: 90px;
}

.inline-form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.toolbar-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 14px;
    flex-wrap: wrap;
}

.etiqueta-config-grid {
    margin-top: 12px;
}

.check-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
}

.check-row input[type="checkbox"] {
    width: 20px;
    height: 20px;
}

.toolbar-actions.no-margin { margin-top: 0; }


.imendes-product-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 0.9rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid var(--insight-border);
  border-radius: 8px;
  background: #f4f8ff;
}

.imendes-product-panel h3,
.imendes-product-panel p {
  margin: 0;
}

.imendes-product-panel h3 {
  color: var(--insight-blue-900);
  font-size: 1rem;
}

.imendes-product-panel p {
  margin-top: 0.25rem;
  color: var(--insight-text-soft);
}

.imendes-product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: flex-end;
}

.imendes-product-panel .alert,
.imendes-product-result {
  grid-column: 1 / -1;
}

.imendes-return-card {
  display: grid;
  gap: 0.35rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid #bcd2f5;
  border-radius: 8px;
  background: #ffffff;
  color: var(--insight-text);
}

.imendes-return-card strong {
  color: var(--insight-blue-900);
}

@media (max-width: 760px) {
  .imendes-product-panel {
    grid-template-columns: 1fr;
  }

  .imendes-product-actions {
    justify-content: stretch;
  }

  .imendes-product-actions .button,
  .imendes-product-actions button {
    width: 100%;
    justify-content: center;
  }
}
.imendes-loading-overlay {
    align-items: center;
    background: rgba(3, 10, 24, 0.58);
    display: flex;
    inset: 0;
    justify-content: center;
    position: fixed;
    z-index: 9999;
}

.imendes-loading-overlay[hidden] {
    display: none;
}

.imendes-loading-card {
    background: #ffffff;
    border: 1px solid #bcd4ff;
    border-radius: 12px;
    box-shadow: 0 22px 70px rgba(5, 24, 55, 0.26);
    color: #071326;
    display: grid;
    gap: 10px;
    max-width: 460px;
    padding: 24px;
    width: min(92vw, 460px);
}

.imendes-loading-card strong {
    color: #002f87;
    font-size: 18px;
}

.imendes-loading-card span {
    color: #31415c;
}

.imendes-loading-bar {
    background: #dbe8ff;
    border-radius: 999px;
    height: 10px;
    overflow: hidden;
}

.imendes-loading-bar span {
    animation: imendes-loading-move 1.1s infinite ease-in-out;
    background: #0b55b7;
    border-radius: inherit;
    display: block;
    height: 100%;
    width: 42%;
}

.imendes-return-selectable {
    align-items: center;
    display: flex;
    gap: 14px;
    justify-content: space-between;
}

@keyframes imendes-loading-move {
    0% { transform: translateX(-110%); }
    100% { transform: translateX(250%); }
}
.imendes-description-card {
    width: min(980px, calc(100vw - 2rem));
}

.imendes-description-search {
    align-items: end;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) 210px;
}

.imendes-description-results {
    display: grid;
    gap: 10px;
    margin-top: 12px;
    max-height: 46vh;
    overflow: auto;
    padding-right: 4px;
}

.imendes-description-results[hidden] {
    display: none;
}

.imendes-return-selectable .button {
    flex: 0 0 auto;
    white-space: nowrap;
}

@media (max-width: 760px) {
    .imendes-description-search {
        grid-template-columns: 1fr;
    }

    .imendes-return-selectable {
        align-items: stretch;
        flex-direction: column;
    }
}
.fiscal-credit-option {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 64px;
    padding: 10px 12px;
    border: 1px solid #b9d2f4;
    background: #eef5ff;
    border-radius: 6px;
}

.fiscal-credit-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
}

.fiscal-credit-option span {
    display: grid;
    gap: 3px;
}

.fiscal-credit-option small {
    color: #53657f;
    font-weight: 400;
}

.license-summary-grid { margin: 14px 0; }
.license-kpi-success strong { color: #087443; }
.license-kpi-warning strong { color: #9a5a00; }
.license-kpi-danger strong { color: #b42318; }
.license-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); }
.license-card { background: #fff; border: 1px solid #c8d8ed; border-left: 5px solid #718096; border-radius: 6px; padding: 18px; }
.license-card.is-success { border-left-color: #0b8f55; }
.license-card.is-warning { border-left-color: #d58a00; }
.license-card.is-danger { border-left-color: #c52b24; }
.license-card header { align-items: start; display: flex; gap: 16px; justify-content: space-between; }
.license-card header span { color: #64748b; font-size: .8rem; }
.license-card header h3 { margin: 4px 0 0; }
.license-status { background: #edf3fb; border-radius: 4px; padding: 7px 10px; white-space: nowrap; }
.license-card dl { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; margin: 18px 0; }
.license-card dl div { border-top: 1px solid #dbe5f2; padding-top: 8px; }
.license-card dt { color: #64748b; font-size: .78rem; }
.license-card dd { font-weight: 700; margin: 3px 0 0; }
.license-message { background: #f5f8fc; border-radius: 4px; padding: 10px; }
.license-inline { align-items: center; background: #fff; border: 1px solid #c8d8ed; border-left: 5px solid #c52b24; display: flex; gap: 20px; justify-content: space-between; margin-bottom: 14px; padding: 16px; }
.license-inline.is-success { border-left-color: #0b8f55; }
.license-inline h3, .license-inline p { margin: 3px 0; }

.business-groups-layout { align-items: start; display: grid; gap: 16px; grid-template-columns: minmax(320px, .8fr) minmax(420px, 1.2fr); }
.business-group-form, .business-group-card { padding: 18px; }
.business-group-form > header, .business-group-card > header { align-items: start; display: flex; gap: 12px; justify-content: space-between; }
.business-group-form h3, .business-group-card h3 { margin: 3px 0 14px; }
.business-group-form fieldset { margin-top: 16px; }
.business-active-toggle { align-items: center; background: #f6f9fd; border: 1px solid #ccdaec; display: flex; gap: 14px; justify-content: space-between; margin-top: 14px; padding: 12px 14px; }
.business-active-toggle > span { display: grid; gap: 2px; }
.business-active-toggle small { color: #607089; font-weight: 400; }
.business-active-toggle input { height: 1px; opacity: 0; position: absolute; width: 1px; }
.business-active-toggle i { background: #9aa9bc; border-radius: 12px; flex: 0 0 42px; height: 24px; position: relative; transition: background .18s ease; }
.business-active-toggle i::after { background: #fff; border-radius: 50%; box-shadow: 0 1px 4px rgba(15,31,54,.28); content: ''; height: 18px; left: 3px; position: absolute; top: 3px; transition: transform .18s ease; width: 18px; }
.business-active-toggle input:checked + i { background: #1460b8; }
.business-active-toggle input:checked + i::after { transform: translateX(18px); }
.business-active-toggle input:focus-visible + i { outline: 3px solid rgba(20,96,184,.25); outline-offset: 2px; }

.store-price-toggle { align-items: center; cursor: pointer; display: inline-flex; gap: 8px; justify-content: center; min-width: 122px; white-space: nowrap; }
.store-price-toggle input { height: 1px; opacity: 0; position: absolute; width: 1px; }
.store-price-toggle i { background: #9aa9bc; border-radius: 12px; flex: 0 0 42px; height: 24px; position: relative; transition: background .18s ease; }
.store-price-toggle i::after { background: #fff; border-radius: 50%; box-shadow: 0 1px 4px rgba(15,31,54,.28); content: ''; height: 18px; left: 3px; position: absolute; top: 3px; transition: transform .18s ease; width: 18px; }
.store-price-toggle input:checked + i { background: #1460b8; }
.store-price-toggle input:checked + i::after { transform: translateX(18px); }
.store-price-toggle input:focus-visible + i { outline: 3px solid rgba(20,96,184,.25); outline-offset: 2px; }
.store-price-toggle span { color: #52647c; font-size: 12px; font-weight: 700; }
.store-price-toggle input:checked ~ span { color: #0e4f9b; }
.compact-toggle { align-items: center; cursor: pointer; display: inline-flex; gap: 8px; min-height: 32px; white-space: nowrap; }
.compact-toggle input { height: 1px; opacity: 0; position: absolute; width: 1px; }
.compact-toggle i { background: #9aa9bc; border-radius: 12px; flex: 0 0 42px; height: 24px; position: relative; transition: background .18s ease; }
.compact-toggle i::after { background: #fff; border-radius: 50%; box-shadow: 0 1px 4px rgba(15,31,54,.28); content: ''; height: 18px; left: 3px; position: absolute; top: 3px; transition: transform .18s ease; width: 18px; }
.compact-toggle input:checked + i { background: #1460b8; }
.compact-toggle input:checked + i::after { transform: translateX(18px); }
.compact-toggle input:focus-visible + i { outline: 3px solid rgba(20,96,184,.25); outline-offset: 2px; }
.compact-toggle span { color: #52647c; font-size: 12px; font-weight: 700; }
.compact-toggle input:checked ~ span { color: #0e4f9b; }

.transfer-filters { margin:0 0 14px; }
.transfer-filter-grid { align-items:end; display:grid; gap:12px; grid-template-columns:repeat(2,minmax(130px,.65fr)) repeat(2,minmax(190px,1fr)) auto; margin-top:14px; }
.transfer-filter-grid label { margin:0; }
.transfer-create-dialog { width:min(760px,calc(100vw - 24px)); }
.transfer-create-dialog .form-subsection-header { align-items:flex-start; border-bottom:1px solid #d7e1ee; margin-bottom:14px; padding-bottom:12px; }
.transfer-create-dialog .form-subsection-header h3 { margin:2px 0 3px; }
.transfer-create-dialog .form-subsection-header p { color:#607089; margin:0; }
.transfer-create-dialog .business-active-toggle { margin-top:0; }
.transfer-create-dialog .form-actions { justify-content:flex-end; margin-top:16px; }
.card-title-row,.transfer-detail-head { align-items:flex-start; display:flex; gap:16px; justify-content:space-between; }
.card-title-row h3,.transfer-detail-head h3 { margin:2px 0 0; }
.eyebrow { color:#607089; display:block; font-size:11px; font-weight:800; text-transform:uppercase; }
.transfer-step { align-items:center; background:#0e4f9b; border-radius:50%; color:#fff; display:flex; flex:0 0 30px; font-weight:800; height:30px; justify-content:center; }
.transfer-flow { align-items:end; display:grid; gap:12px; grid-template-columns:1fr 34px 1fr; margin:16px 0; }
.flow-arrow { color:#1460b8; font-size:25px; font-weight:800; padding-bottom:6px; text-align:center; }
.transfer-options { display:grid; gap:10px; grid-template-columns:1fr 1fr; margin-bottom:14px; }
.transfer-detail-head { align-items:flex-start; border-bottom:1px solid #d7e1ee; margin-bottom:14px; max-width:100%; padding-bottom:14px; }
.transfer-detail-head p { color:#607089; margin:4px 0 0; }
.transfer-header-actions { align-items:center; display:flex; flex:0 0 auto; gap:8px; justify-content:flex-end; margin-left:auto; }
.transfer-header-actions .button { align-items:center; display:inline-flex; justify-content:center; margin:0; min-height:38px; white-space:nowrap; }
.transfer-data-panel fieldset { border:1px solid #cbdcf2; border-radius:8px; margin:0 0 14px; padding:14px; }
.transfer-data-panel legend { color:#0b376e; font-weight:800; padding:0 6px; }
.transfer-data-panel,.transfer-product-panel,.transfer-items-panel { max-width:100%; min-width:0; overflow:hidden; }
.transfer-data-grid { align-items:end; display:grid; gap:12px; grid-template-columns:minmax(0,1.35fr) 28px minmax(0,1.35fr) repeat(3,minmax(0,.7fr)); min-width:0; }
.transfer-data-grid label { margin:0; min-width:0; }
.transfer-data-grid input[readonly] { background:#edf4ff; color:#0b2340; font-weight:800; }
.transfer-route-arrow { color:#1460b8; font-size:25px; font-weight:800; padding-bottom:7px; text-align:center; }
.transfer-settings-form { align-items:end; border-top:1px solid #d7e4f6; display:grid; gap:12px; grid-template-columns:minmax(280px,1fr) minmax(280px,.8fr) auto; margin-top:14px; padding-top:14px; }
.transfer-settings-form label,.transfer-settings-form .form-actions { margin:0; min-width:0; }
.transfer-settings-form>label:first-of-type { display:grid; gap:6px; }
.transfer-settings-form textarea { box-sizing:border-box; min-height:66px; resize:vertical; width:100%; }
.transfer-readonly-note { border-top:1px solid #d7e4f6; display:grid; gap:4px; margin-top:14px; padding-top:12px; }
.transfer-readonly-note span { color:#52647c; }
.product-search { align-items:end; display:grid; gap:12px; grid-template-columns:1fr auto; margin-bottom:12px; }
.product-search label { margin:0; }
.transfer-product-panel,.transfer-items-panel { margin-bottom:14px; }
.transfer-product-panel>h3,.transfer-items-panel h3 { margin:0 0 10px; }
.transfer-items-panel .card-title-row { align-items:center; margin-bottom:10px; }
.transfer-items-panel .card-title-row h3 { margin:0; }
.transfer-items-panel .card-title-row p { color:#607089; margin:3px 0 0; }
.transfer-grand-total { color:#07111f; font-size:20px; }
.search-results { margin-bottom:14px; }
.table-wrap td small { color:#607089; display:block; font-size:10px; margin-top:2px; }
.transfer-main-actions { border-top:1px solid #d7e4f6; justify-content:flex-end; padding-top:14px; }
.transfer-main-actions form { margin:0; }
.transfer-page .button.dark { background:#07111f; border-color:#07111f; color:#fff; }
.transfer-status { background:#e8eef6; border-radius:12px; display:inline-block; font-size:11px; font-weight:800; padding:4px 9px; }
.transfer-status.status-concluida { background:#dcf4e7; color:#11643a; }.transfer-status.status-aguardando_emissao { background:#fff0cf; color:#805500; }
@media(max-width:1200px){.transfer-data-grid{grid-template-columns:1fr 34px 1fr}.transfer-settings-form{grid-template-columns:1fr 1fr}.transfer-settings-form .form-actions{grid-column:1/-1}}
@media(max-width:900px){.transfer-filter-grid{grid-template-columns:1fr 1fr}.transfer-filter-grid .button{width:100%}.transfer-options{grid-template-columns:1fr}.transfer-flow,.transfer-data-grid{grid-template-columns:1fr}.flow-arrow,.transfer-route-arrow{transform:rotate(90deg)}.transfer-settings-form{grid-template-columns:1fr}.transfer-settings-form .form-actions{grid-column:auto}.transfer-detail-head{align-items:stretch;flex-direction:column}.action-row{flex-wrap:wrap}}
@media(max-width:560px){.transfer-filter-grid{grid-template-columns:1fr}.transfer-filters .card-title-row{align-items:stretch;flex-direction:column}.transfer-filters .card-title-row .button{width:100%}}

/* Radar XML */
.radar-page{display:grid;gap:14px}.radar-head{align-items:center}.radar-card-heading{align-items:center;display:flex;justify-content:space-between;margin-bottom:12px}.radar-card-heading h3{font-size:17px;margin:2px 0}.radar-card-heading .eyebrow{color:#536b8d;font-size:11px;font-weight:700;text-transform:uppercase}.radar-key-hint{background:#e8f1ff;color:#174d91;font-size:12px;font-weight:700;padding:6px 9px}.radar-key-form{align-items:end;display:grid;gap:12px;grid-template-columns:minmax(220px,.7fr) minmax(420px,2fr) auto}.radar-key-form label,.radar-filter-grid label{margin:0}.radar-key-input input{font-family:Consolas,monospace;letter-spacing:0}.radar-filter-grid{align-items:end;display:grid;gap:10px;grid-template-columns:minmax(180px,1fr) repeat(4,minmax(130px,.55fr)) minmax(260px,1.3fr) auto auto}.radar-search{min-width:0}.radar-batch-bar{align-items:center;border-top:1px solid #d9e3f2;display:flex;justify-content:space-between;margin-top:14px;padding:12px 0}.radar-table-wrap{max-height:620px}.radar-table{font-size:12px;min-width:1480px}.radar-table th{position:sticky;top:0;z-index:2}.radar-table td{vertical-align:middle}.radar-row-imported{background:#f1fbf5}.radar-row-waiting{background:#fffaf0}.radar-key-cell{max-width:270px}.radar-copy-key{background:none;border:0;color:#075fbd;cursor:pointer;font-family:Consolas,monospace;font-size:11px;padding:0;text-align:left;white-space:normal;word-break:break-all}.radar-status,.radar-import{display:inline-block;font-size:11px;font-weight:700;padding:5px 8px;white-space:nowrap}.radar-status-autorizada,.radar-import.is-imported{background:#dff5e8;color:#14633a}.radar-status-cancelada,.radar-status-erro{background:#fde4e4;color:#a32222}.radar-status-resumo,.radar-status-aguardando_xml,.radar-import.is-waiting{background:#fff0c9;color:#745500}.radar-import.is-ready{background:#e4efff;color:#174d91}.radar-actions{display:flex;gap:6px;white-space:nowrap}.pagination{align-items:center;display:flex;justify-content:space-between;padding-top:12px}.pagination>div{display:flex;gap:6px}
@media(max-width:1150px){.radar-filter-grid{grid-template-columns:repeat(3,1fr)}.radar-search{grid-column:span 2}.radar-key-form{grid-template-columns:1fr 2fr auto}}
@media(max-width:720px){.radar-key-form,.radar-filter-grid{grid-template-columns:1fr}.radar-search{grid-column:auto}.radar-card-heading,.radar-batch-bar,.pagination{align-items:stretch;flex-direction:column;gap:10px}.radar-key-form .button,.radar-filter-grid .button,.radar-filter-grid>a{width:100%}}
.business-store-list { display: grid; gap: 8px; margin-top: 12px; max-height: 390px; overflow-y: auto; }
.business-store-option { align-items: center; background: #f6f9fd; border: 1px solid #ccdaec; display: flex; gap: 12px; padding: 12px; }
.business-store-option input { flex: 0 0 auto; height: 20px; width: 20px; }
.business-store-option span { display: grid; gap: 3px; min-width: 0; }
.business-store-option small { color: #607089; }
.business-group-list { display: grid; gap: 12px; }
.business-group-stores { display: flex; flex-wrap: wrap; gap: 7px; margin: 4px 0 16px; }
.business-group-stores span { background: #edf4fd; border: 1px solid #c7d8ee; border-radius: 4px; padding: 7px 9px; }
.business-group-card .form-actions form { margin: 0; }
@media (max-width: 900px) { .business-groups-layout { grid-template-columns: 1fr; } }
.license-inline-actions { align-items: center; display: flex; gap: 10px; }
.license-dashboard-alert { align-items: center; background: #fff3cd; border: 1px solid #e5b94c; color: #533800; display: flex; justify-content: space-between; margin-bottom: 14px; padding: 14px 16px; text-decoration: none; }
.license-dashboard-alert span { display: grid; gap: 3px; }
.license-dashboard-alert b { background: #0b1424; color: #fff; padding: 9px 12px; }
@media (max-width: 760px) {
    .license-grid { grid-template-columns: 1fr; }
    .license-card header, .license-inline, .license-inline-actions, .license-dashboard-alert { align-items: stretch; flex-direction: column; }
    .license-card dl { grid-template-columns: 1fr; }
}
.transfer-pdf{color:#172033;font-size:11px}.transfer-pdf-header{display:flex;align-items:flex-start;justify-content:space-between;border-bottom:2px solid #163f7a;padding:0 0 10px;margin-bottom:14px}.transfer-pdf-header h1{font-size:19px;margin:3px 0 0;letter-spacing:0;color:#163f7a}.transfer-pdf-number{text-align:right;display:grid;gap:3px}.transfer-pdf-number strong{font-size:18px;color:#163f7a}.transfer-pdf-number span{font-size:9px;font-weight:700;color:#52627a}.transfer-pdf-info{display:grid;grid-template-columns:1fr;gap:7px;border:1px solid #ccd6e5;padding:11px 12px;margin-bottom:12px}.transfer-pdf-info div{display:flex;align-items:baseline;gap:6px;line-height:1.35}.transfer-pdf-info small{flex:0 0 92px;font-size:9px;text-transform:uppercase;color:#637086}.transfer-pdf-info strong{font-size:10px}.transfer-pdf-note{border-left:3px solid #163f7a;padding:7px 9px;margin:0 0 12px;background:#f5f7fa}.transfer-pdf-table{width:100%;border-collapse:collapse;font-size:9px}.transfer-pdf-table th{background:#edf2f8;text-align:left;text-transform:uppercase;font-size:8px}.transfer-pdf-table th,.transfer-pdf-table td{border:1px solid #ccd6e5;padding:6px}.transfer-pdf-table .num{text-align:right;white-space:nowrap}.transfer-pdf-table small{color:#637086}.transfer-pdf-footer{display:flex;justify-content:space-between;align-items:center;border-top:2px solid #163f7a;margin-top:10px;padding-top:8px}.transfer-pdf-footer strong{font-size:13px}
.report-store-stocks{display:flex;flex-direction:column;align-items:stretch;gap:5px;min-width:260px}.report-store-stocks span{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:6px 9px;border:1px solid #b9cce8;border-left:4px solid #1767b7;border-radius:5px;background:#edf5ff;white-space:normal}.report-store-stocks span:nth-child(even){border-color:#bddbc9;border-left-color:#218653;background:#eef9f2}.report-store-stocks span:nth-child(3n){border-color:#dfcf9e;border-left-color:#a97910;background:#fff9e8}.report-store-stocks strong{margin:0;color:#16243a}.report-store-stocks span::after{content:none}
.nfe-data-sections {
  display: grid;
  gap: 0.85rem;
}

.nfe-data-group {
  border: 1px solid #d4e0ef;
  border-radius: 7px;
  background: #fff;
  padding: 0.9rem;
}

.nfe-document-group {
  border-color: #b9d0ed;
  background: #f5f9ff;
}

.nfe-data-group h3 {
  margin: 0 0 0.75rem;
  color: var(--insight-blue-900);
  font-size: 1rem;
  font-weight: 800;
}

.nfe-document-grid,
.nfe-recipient-grid,
.nfe-address-grid,
.nfe-contact-grid,
.nfe-produtor-rural-fields:not([hidden]) {
  display: grid;
  gap: 0.75rem;
  align-items: end;
}

.nfe-document-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.nfe-document-grid > label,
.nfe-recipient-grid > label,
.nfe-address-grid > label,
.nfe-contact-grid > label,
.nfe-produtor-rural-fields > label,
.nfe-field-action label {
  margin: 0;
}

.nfe-nature-field,
.nfe-chave-ref {
  grid-column: span 2;
}

.nfe-status-field input[readonly] {
  border-color: #9eb7d8;
  background: #e7f0fc;
  color: #0b3d78;
  font-weight: 800;
}

.nfe-produtor-rural-fields:not([hidden]) {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #cfdef0;
}

.nfe-document-notes {
  display: block;
  margin: 0.75rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px solid #cfdef0;
}

.nfe-document-notes textarea {
  width: 100%;
  min-height: 76px;
  resize: vertical;
}

.nfe-recipient-grid {
  grid-template-columns: minmax(360px, 2fr) minmax(280px, 1.35fr) minmax(160px, 0.7fr);
}

.nfe-recipient-subsection {
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid #e0e8f3;
}

.nfe-recipient-subsection h4 {
  margin: 0 0 0.65rem;
  color: #4c607a;
  font-size: 0.82rem;
  font-weight: 800;
}

.nfe-field-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem;
  align-items: end;
}

.nfe-field-action .button {
  align-self: end;
  height: 34px;
  min-height: 34px;
  margin: 0 0 4px;
  padding: 0 0.7rem;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.nfe-address-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.nfe-address-field,
.nfe-address-grid label:has(input[name="cidade"]) {
  grid-column: span 2;
}

.nfe-contact-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.nfe-contact-grid .nfe-infadic {
  grid-column: 1 / -1;
}

.nfe-contact-grid textarea {
  width: 100%;
  min-height: 86px;
  resize: vertical;
}

.nfe-data-form > .form-actions {
  margin-top: 0.85rem;
}

.nfe-charge-form {
  display: grid;
  gap: 0.65rem;
}

.nfe-charge-form + .nfe-charge-form {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid #dbe5f1;
}

.nfe-charge-payment-grid {
  max-width: 50%;
}

.nfe-charge-payment-grid label,
.nfe-charge-fields label {
  margin: 0;
}

.nfe-charge-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.nfe-charge-actions {
  margin: 0;
}

.nfe-charge-actions .button {
  width: auto;
  min-width: 190px;
}

.nfe-charge-card .table-wrap {
  margin-top: 0.85rem;
}

@media (max-width: 1100px) {
  .nfe-document-grid,
  .nfe-address-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nfe-recipient-grid {
    grid-template-columns: 1fr 1fr;
  }

  .nfe-recipient-grid > label:last-child {
    max-width: none;
  }

  .nfe-produtor-rural-fields:not([hidden]) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .nfe-document-grid,
  .nfe-recipient-grid,
  .nfe-address-grid,
  .nfe-contact-grid,
  .nfe-produtor-rural-fields:not([hidden]) {
    grid-template-columns: 1fr;
  }

  .nfe-nature-field,
  .nfe-chave-ref,
  .nfe-address-field,
  .nfe-address-grid label:has(input[name="cidade"]) {
    grid-column: auto;
  }

  .nfe-field-action {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .nfe-charge-payment-grid {
    max-width: none;
  }

  .nfe-charge-fields {
    grid-template-columns: 1fr;
  }
}

.radar-key-form {
    grid-template-columns: minmax(420px, 1fr) auto;
}

.xml-radar-shortcut {
    display: flex;
    justify-content: flex-start;
    margin: 0 0 8px;
}

.xml-radar-shortcut .button {
    gap: 8px;
    margin: 0;
    min-height: 36px;
    padding: 7px 13px;
}

.xml-radar-icon {
    border: 2px solid currentColor;
    border-radius: 50%;
    display: inline-block;
    height: 12px;
    position: relative;
    width: 12px;
}

.xml-radar-icon::after {
    background: currentColor;
    content: "";
    height: 2px;
    position: absolute;
    right: -6px;
    top: 10px;
    transform: rotate(45deg);
    width: 7px;
}

.radar-select-all {
    align-items: center;
    cursor: pointer;
    display: inline-flex;
    gap: 9px;
    margin: 0;
}

.radar-select-all input,
.radar-table input[type="checkbox"] {
    accent-color: var(--insight-blue-700);
    cursor: pointer;
    flex: 0 0 18px;
    height: 18px;
    margin: 0;
    min-height: 0;
    padding: 0;
    width: 18px;
}

.radar-select-all span {
    font-size: 13px;
    font-weight: 600;
}

.radar-party {
    line-height: 1.3;
    max-width: 270px;
    min-width: 190px;
}

.radar-party strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.radar-party small {
    font-size: 10px;
    font-weight: 400;
    margin-top: 5px;
}

.radar-manifest-dialog{border:0;border-radius:8px;padding:0;width:min(620px,calc(100vw - 24px))}.radar-manifest-dialog::backdrop{background:rgba(3,10,23,.58)}.radar-manifest-form{background:#fff;padding:18px}.radar-manifest-head{align-items:flex-start;border-bottom:1px solid #d7e4f6;display:flex;gap:16px;justify-content:space-between;margin-bottom:14px;padding-bottom:12px}.radar-manifest-head h3{margin:3px 0}.radar-manifest-head small{color:#607089;font-family:Consolas,monospace;font-size:10px;overflow-wrap:anywhere}.radar-manifest-options{border:1px solid #cbdcf2;border-radius:6px;display:grid;gap:8px;margin:0;padding:12px}.radar-manifest-options legend{color:#0b376e;font-weight:800;padding:0 6px}.radar-manifest-options label{align-items:center;background:#f6f9fd;border:1px solid #d3dfef;border-radius:5px;cursor:pointer;display:flex;gap:12px;margin:0;padding:11px}.radar-manifest-options label:has(input:checked){background:#eaf3ff;border-color:#2871c7}.radar-manifest-options input{accent-color:#155bb5;flex:0 0 18px;height:18px;margin:0;min-height:0;width:18px}.radar-manifest-options span{display:grid;gap:2px}.radar-manifest-options strong{font-size:13px}.radar-manifest-options small{color:#607089;font-size:11px}.radar-manifest-reason{display:grid;gap:6px;margin-top:12px}.radar-manifest-reason textarea{min-height:82px;resize:vertical}.radar-manifest-form .form-actions{justify-content:flex-end;margin-top:14px}
.radar-tabs{border-bottom:1px solid #cbdcf2;display:flex;gap:4px}.radar-tabs a{background:#edf3fb;border:1px solid #cbdcf2;border-bottom:0;color:#294463;font-size:13px;font-weight:700;padding:10px 14px;text-decoration:none}.radar-tabs a.is-active{background:#fff;color:#0b55b7;position:relative;top:1px}.radar-summary-filters{grid-template-columns:minmax(190px,1fr) repeat(3,minmax(140px,.65fr)) minmax(280px,1.4fr) auto auto}.radar-summary-table{min-width:1420px}.radar-summary-table .radar-key-cell small{display:block;margin-top:4px}

@media (max-width: 720px) {
    .radar-key-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .radar-page { gap: 10px; }
    .radar-head { align-items: stretch; gap: 10px; }
    .radar-head .action-row, .radar-head .button { width: 100%; }
    .radar-tabs { overflow-x: auto; }
    .radar-tabs a { flex: 1 0 auto; text-align: center; }
    .radar-key-card, .radar-list-card { padding: 12px; }
    .radar-key-hint { align-self: flex-start; }
    .radar-key-input input { font-size: 14px; }
    .radar-filter-grid, .radar-summary-filters { grid-template-columns: 1fr; }
    .radar-filter-grid label, .radar-filter-grid input,
    .radar-filter-grid select, .radar-filter-grid .button,
    .radar-filter-grid > a { min-width: 0; width: 100%; }
    .radar-batch-bar .button { width: 100%; }
    .radar-table-wrap { max-height: none; overflow: visible; }
    .radar-table, .radar-summary-table { display: block; min-width: 0; width: 100%; }
    .radar-table thead { display: none; }
    .radar-table tbody { display: grid; gap: 10px; }
    .radar-table tr { background: #fff; border: 1px solid #cbdcf2; border-radius: 6px; display: grid; overflow: hidden; }
    .radar-table tr.radar-row-imported { background: #f1fbf5; }
    .radar-table tr.radar-row-waiting { background: #fffaf0; }
    .radar-table td { align-items: start; border: 0; border-bottom: 1px solid #e1e9f4; display: grid; gap: 8px; grid-template-columns: minmax(88px, .35fr) minmax(0, 1fr); padding: 9px 10px; text-align: left; white-space: normal; }
    .radar-table td:last-child { border-bottom: 0; }
    .radar-table td::before { color: #536b8d; content: attr(data-label); font-size: 10px; font-weight: 800; text-transform: uppercase; }
    .radar-table td[colspan] { display: block; padding: 16px; }
    .radar-table td[colspan]::before { content: none; }
    .radar-key-cell, .radar-party { max-width: none; min-width: 0; }
    .radar-copy-key { max-width: 100%; overflow-wrap: anywhere; }
    .radar-party strong { font-size: 12px; }
    .radar-actions { display: grid; gap: 7px; grid-template-columns: repeat(2, minmax(0, 1fr)); white-space: normal; }
    .radar-actions .button { justify-content: center; margin: 0; min-width: 0; width: 100%; }
    .radar-status, .radar-import { justify-self: start; }
    .pagination > div, .pagination .button { width: 100%; }
    .pagination > div { display: grid; grid-template-columns: repeat(2, 1fr); }
    .radar-manifest-form { padding: 14px; }
    .radar-manifest-head { align-items: stretch; flex-direction: column; }
    .radar-manifest-options label { align-items: flex-start; }
    .radar-manifest-form .form-actions { display: grid; grid-template-columns: 1fr; }
    .radar-manifest-form .button { width: 100%; }
}

@media print {
    @page { size: A4 landscape; margin: 5mm; }

    .standard-report-print .table-wrap {
        display: block !important;
        min-width: 0 !important;
        overflow: visible !important;
    }

    .standard-report-print .table-wrap table {
        display: table !important;
        min-width: 0 !important;
        max-width: none !important;
        table-layout: fixed !important;
        width: 100% !important;
    }

    .standard-report-print .table-wrap tr {
        display: table-row !important;
        height: auto !important;
    }

    .standard-report-print .table-wrap th,
    .standard-report-print .table-wrap td {
        display: table-cell !important;
        height: auto !important;
        min-height: 0 !important;
        min-width: 0 !important;
        max-width: none !important;
        overflow: visible !important;
        overflow-wrap: anywhere !important;
        word-break: break-word !important;
        white-space: normal !important;
    }
}
