﻿:root {
  color-scheme: light;
  --lactalis-blue: #173c96;
  --lactalis-blue-dark: #12306f;
  --lactalis-cyan: #19a7e0;
  --bg: #f7fafc;
  --surface: #ffffff;
  --surface-soft: #f9fbfe;
  --surface-2: #f0f5fa;
  --text: #1e2a36;
  --text-strong: #07111d;
  --muted: #5f6c7b;
  --line: #dce6f0;
  --success: #008f5a;
  --warn: #c1121f;
  --warn-soft: #ffe8eb;
  --warn-light: #ef4b5a;
  --blue-soft: #eef6fc;
  --success-soft: #eaf8f4;
  --font-base: Inter, "Segoe UI", Arial, sans-serif;
  --shadow: 0 10px 22px rgba(18, 48, 111, 0.055);
  --shadow-soft: 0 4px 10px rgba(18, 48, 111, 0.04);
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 12% 0%, rgba(25, 167, 224, 0.08), transparent 32%),
    linear-gradient(180deg, #fbfdff 0%, #f6fafd 48%, #eef6fb 100%);
  color: var(--text);
  font-family: var(--font-base);
}

html {
  scroll-behavior: smooth;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--lactalis-blue), var(--lactalis-cyan));
  z-index: 20;
}

.side-nav {
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 30;
  width: auto;
  max-height: none;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.side-nav-toggle {
  min-height: 42px;
  border: 1px solid rgba(25, 167, 224, 0.35);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--lactalis-blue-dark), var(--lactalis-blue));
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(18, 48, 111, 0.16);
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  padding: 10px 15px;
  cursor: pointer;
}

.side-nav-toggle::before {
  content: "☰";
  margin-right: 8px;
  font-size: 13px;
}

.side-nav-toggle:hover {
  filter: brightness(1.04);
}

.side-nav-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 220px;
  max-height: calc(100vh - 78px);
  overflow: auto;
  border: 1px solid rgba(217, 228, 238, 0.94);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
  padding: 14px;
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.16s ease,
    transform 0.16s ease,
    visibility 0.16s ease;
}

.side-nav.is-collapsed .side-nav-panel {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
}

.side-nav strong {
  display: block;
  margin-bottom: 10px;
  color: var(--lactalis-blue-dark);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.side-nav nav {
  display: grid;
  gap: 6px;
}

.side-nav a {
  position: relative;
  display: block;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.15;
  text-decoration: none;
  padding: 9px 10px 9px 12px;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    transform 0.16s ease;
}

.side-nav a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 999px;
  background: transparent;
}

.side-nav a:hover {
  border-color: rgba(25, 167, 224, 0.22);
  background: var(--blue-soft);
  color: var(--lactalis-blue-dark);
  transform: translateX(1px);
}

.side-nav a.active {
  border-color: rgba(25, 167, 224, 0.32);
  background: linear-gradient(135deg, rgba(23, 60, 150, 0.1), rgba(25, 167, 224, 0.12));
  color: var(--lactalis-blue-dark);
}

.side-nav a.active::before {
  background: linear-gradient(180deg, var(--lactalis-blue), var(--lactalis-cyan));
}

.shell {
  width: min(1660px, 100%);
  margin: 0 auto;
  padding: 22px 26px 28px;
}

.shell section[id] {
  scroll-margin-top: 18px;
}

.topbar,
.filters,
.kpis,
.grid {
  display: grid;
  gap: 16px;
}

.topbar {
  position: relative;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid rgba(217, 228, 238, 0.9);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(23, 60, 150, 0.96), rgba(18, 48, 111, 0.96) 58%, rgba(25, 167, 224, 0.92)),
    var(--lactalis-blue);
  box-shadow: var(--shadow-soft);
  padding: 16px 18px;
}

.topbar::after {
  display: none;
}

.brand-heading {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.brand-card {
  flex: 0 0 auto;
  width: 218px;
  height: 84px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.brand-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.eyebrow {
  margin: 0 0 8px;
  color: #d8f3ff;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  color: #ffffff;
  font-size: clamp(25px, 2.5vw, 36px);
  font-weight: 900;
  line-height: 1.04;
}

h2 {
  color: var(--text);
  font-size: 20px;
  font-weight: 750;
}

.source {
  color: var(--muted);
  font-size: 13px;
}

.top-source {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.78);
}

.actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

button,
.upload {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 750;
  min-height: 40px;
  padding: 9px 14px;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease,
    color 0.16s ease;
}

.actions button,
.actions .upload {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  backdrop-filter: blur(8px);
}

button:hover,
.upload:hover {
  border-color: var(--lactalis-cyan);
  box-shadow: 0 8px 18px rgba(18, 48, 111, 0.1);
  transform: translateY(-1px);
}

.actions button:hover,
.actions .upload:hover {
  background: rgba(255, 255, 255, 0.24);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.upload input {
  display: none;
}

.filters {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 14px;
  border: 1px solid rgba(217, 228, 238, 0.92);
  border-left: 1px solid rgba(217, 228, 238, 0.92);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: var(--shadow-soft);
  padding: 12px 14px 14px 16px;
}

/* Portal polish 2026-07 — somente acabamento visual, sem alterar estrutura/dados */
:root {
  --font-base: Aptos, "Segoe UI", Tahoma, sans-serif;
  --bg: #f2f7fb;
  --surface: rgba(255, 255, 255, 0.96);
  --surface-soft: #f8fbfe;
  --surface-2: #edf5fb;
  --text: #142238;
  --text-strong: #061a38;
  --muted: #5d6f84;
  --line: #d7e7f3;
  --shadow: 0 18px 44px rgba(6, 26, 56, 0.10);
  --shadow-soft: 0 10px 24px rgba(6, 26, 56, 0.07);
  --radius: 18px;
}

body {
  background:
    radial-gradient(circle at 12% 0%, rgba(25, 167, 224, 0.12), transparent 30%),
    radial-gradient(circle at 92% 8%, rgba(23, 60, 150, 0.10), transparent 26%),
    linear-gradient(180deg, #fafdff 0%, #f3f8fc 42%, #edf6fb 100%);
}

.topbar,
.filters,
.health-panel,
.kpi-card,
.panel {
  border-color: rgba(183, 211, 232, 0.86);
  box-shadow: var(--shadow-soft);
}

.topbar {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(243, 249, 253, 0.96));
  border-radius: 24px;
}

.brand-card,
.kpi-card,
.panel,
.filters {
  border-radius: 20px;
}

.filters {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 252, 255, 0.96));
}

.filters::before,
.panel-title h2::before {
  background: linear-gradient(180deg, var(--lactalis-blue), var(--lactalis-cyan));
}

.multi-toggle,
select,
input,
button,
.table-toggle {
  border-radius: 14px;
}

.multi-toggle,
select,
input {
  background-color: #fbfdff;
  border-color: #cfe0ee;
}

.tabs {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(203, 224, 239, 0.84);
  border-radius: 22px;
  padding: 7px;
  box-shadow: 0 12px 28px rgba(6, 26, 56, 0.06);
}

.tabs button,
.tab-button {
  border-radius: 16px;
}

.kpi-card {
  background:
    radial-gradient(circle at 100% 100%, rgba(25, 167, 224, 0.12), transparent 34%),
    linear-gradient(180deg, #ffffff, #f8fbfe);
}

.kpi-card:hover,
.panel:hover {
  box-shadow: var(--shadow);
}

.panel-title {
  border-bottom-color: #e5eff7;
}

.table-wrap {
  border-color: #d8e7f2;
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

thead th {
  background: linear-gradient(180deg, #eaf4fb, #dfedf7);
  color: #003b71;
}

tbody tr:hover {
  background: #f4faff;
}

.filters::before {
  content: none;
}

.filters-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.filters-header strong {
  display: block;
  color: var(--lactalis-blue-dark);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.filters-header span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-transform: none;
}

.filters-collapse-toggle {
  min-height: 32px;
  border: 1px solid #cfe1f3;
  border-radius: 999px;
  background: linear-gradient(180deg, #eef7ff 0%, #e4f1fc 100%);
  color: var(--lactalis-blue-dark);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  padding: 6px 14px;
  white-space: nowrap;
}

.filters-collapse-toggle::after {
  content: "▴";
  display: inline-block;
  margin-left: 8px;
  font-size: 10px;
}

.filters.collapsed .filters-collapse-toggle::after {
  content: "▾";
}

.filters-body {
  display: grid;
  grid-template-columns:
    minmax(130px, 160px)
    minmax(170px, 230px)
    minmax(150px, 190px)
    minmax(230px, 290px)
    minmax(260px, 1fr);
  align-items: end;
  column-gap: 14px;
  row-gap: 12px;
}

.filters.collapsed {
  padding-bottom: 12px;
}

.filters.collapsed .filters-body {
  display: none;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  color: var(--text);
  font: inherit;
  font-weight: 750;
  padding: 8px 12px;
  outline: none;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

select:focus,
.multi-toggle:focus {
  border-color: var(--lactalis-cyan);
  box-shadow: 0 0 0 4px rgba(25, 167, 224, 0.14);
}

.multi-filter {
  position: relative;
}

.multi-toggle {
  position: relative;
  display: block;
  width: 100%;
  min-height: 38px;
  overflow: hidden;
  padding: 8px 36px 8px 12px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multi-toggle::after {
  content: "⌄";
  position: absolute;
  top: 50%;
  right: 12px;
  color: var(--lactalis-blue);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  transform: translateY(-50%);
}

.multi-filter:has(.check-filter:not([hidden])) .multi-toggle::after {
  content: "⌃";
}

.check-filter {
  position: absolute;
  z-index: 10;
  top: calc(100% + 8px);
  left: 0;
  right: auto;
  display: grid;
  gap: 4px;
  width: max(100%, 280px);
  max-height: 280px;
  min-height: 42px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 8px;
  box-shadow: 0 12px 28px rgba(18, 48, 111, 0.12);
}

.check-filter[hidden] {
  display: none;
}

.check-filter label {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.2;
  min-height: 28px;
  padding: 4px 7px;
  text-transform: none;
}

.check-filter label:hover {
  background: #eef7fd;
}

.check-filter input {
  accent-color: var(--lactalis-blue);
  flex: 0 0 auto;
}

.main-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 2px 0 14px;
  border: 1px solid rgba(217, 228, 238, 0.92);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%);
  box-shadow: var(--shadow-soft);
  padding: 8px;
}

.main-tab-button {
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.01em;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    box-shadow 0.16s ease;
}

.health-panel {
  margin-top: 0;
}

.health-panel .update-ribbon {
  margin-bottom: 0;
}

.main-tab-button:hover {
  background: #eef7fd;
  color: var(--lactalis-blue-dark);
}

.main-tab-button.active {
  border-color: rgba(25, 167, 224, 0.26);
  background: linear-gradient(135deg, var(--lactalis-blue) 0%, #173c96 100%);
  box-shadow: 0 12px 24px rgba(18, 48, 111, 0.16);
  color: #ffffff;
}

.main-tab-panel {
  display: none;
}

.main-tab-panel.active {
  display: block;
}

.kpis {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 12px;
}

.kpi-card,
.panel {
  border: 1px solid rgba(217, 228, 238, 0.94);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.kpi-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 108px;
  overflow: hidden;
  padding: 15px 16px 14px;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.kpi-card:hover {
  border-color: rgba(25, 167, 224, 0.28);
  box-shadow: 0 8px 20px rgba(18, 48, 111, 0.07);
  transform: translateY(-1px);
}

.kpi-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--lactalis-blue);
}

.kpi-card::after {
  display: none;
}

.kpi-primary::before {
  background: var(--success);
}

.kpi-card:nth-child(2)::before,
.kpi-card:nth-child(3)::before,
.kpi-card:nth-child(5)::before {
  background: linear-gradient(180deg, var(--lactalis-blue-dark), var(--lactalis-cyan));
}

.kpis span,
.panel-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.kpis strong {
  position: relative;
  color: var(--text-strong);
  font-size: clamp(25px, 2.1vw, 35px);
  font-weight: 820;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.kpis strong.positive {
  color: var(--success);
  font-weight: 900;
}

.kpis strong.negative {
  color: var(--warn);
  font-weight: 900;
}

.kpis small {
  color: var(--muted);
  font-size: 12px;
}

.kpis em {
  justify-self: start;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 750;
  padding: 4px 8px;
}

.kpis em.positive {
  background: rgba(0, 143, 90, 0.14);
  color: var(--success);
  border: 1px solid rgba(0, 143, 90, 0.2);
}

.kpis em.negative {
  background: rgba(193, 18, 31, 0.14);
  color: var(--warn);
  border: 1px solid rgba(193, 18, 31, 0.2);
}

.executive-panel {
  margin-bottom: 14px;
}

.executive-grid {
  display: grid;
  grid-template-columns: 1.25fr repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.executive-card,
.audit-grid article {
  position: relative;
  display: grid;
  gap: 6px;
  min-height: 104px;
  border: 1px solid rgba(217, 228, 238, 0.94);
  border-radius: 14px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
  padding: 14px 15px;
}

.executive-card::before,
.audit-grid article::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 14px 0 0 14px;
  background: linear-gradient(180deg, var(--lactalis-blue), var(--lactalis-cyan));
}

.executive-card.warning::before {
  background: linear-gradient(180deg, var(--warn), var(--warn-light));
}

.executive-card span,
.audit-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.executive-card strong,
.audit-grid strong {
  color: var(--text-strong);
  font-size: clamp(22px, 1.7vw, 30px);
  font-weight: 850;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.executive-card em,
.executive-card small,
.audit-grid small {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
}

.executive-card small.positive-value,
.executive-card small.negative-value {
  font-weight: 850;
}

.growth-ranking {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.growth-ranking article {
  border: 1px solid rgba(217, 228, 238, 0.94);
  border-radius: 14px;
  background: #ffffff;
  padding: 12px;
}

.growth-ranking h3 {
  margin-bottom: 8px;
  color: var(--lactalis-blue-dark);
  font-size: 13px;
  font-weight: 820;
}

.growth-list {
  display: grid;
  gap: 7px;
}

.growth-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  border-radius: 10px;
  background: #f7fbff;
  padding: 8px 10px;
}

.growth-row span {
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.growth-row strong {
  font-size: 12px;
  font-weight: 850;
}

.growth-row em,
.empty-inline {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.audit-panel {
  margin-top: 14px;
}

.audit-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.audit-click-card {
  cursor: pointer;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease,
    background 0.16s ease;
}

.audit-click-card:hover,
.audit-click-card:focus-visible {
  border-color: rgba(25, 167, 224, 0.46);
  box-shadow: 0 12px 24px rgba(18, 48, 111, 0.12);
  outline: none;
  transform: translateY(-1px);
}

.audit-click-card.active {
  border-color: rgba(0, 84, 155, 0.38);
  border-left-color: var(--lactalis-blue);
  background: linear-gradient(180deg, #ffffff 0%, #f3f9ff 100%);
  box-shadow: 0 12px 24px rgba(18, 48, 111, 0.12);
}

.audit-details {
  margin-top: 14px;
}

.compact-title {
  margin-bottom: 8px;
}

.compact-title h3 {
  color: var(--lactalis-blue-dark);
  font-size: 16px;
  margin: 0;
}

.audit-details .table-wrap {
  max-height: 360px;
}

.grid {
  align-items: start;
  grid-template-columns: 1fr;
  margin-bottom: 14px;
}

.panel {
  min-width: 0;
  padding: 17px;
}

.panel.wide {
  padding-bottom: 17px;
}

.panel-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.panel-title h2 {
  position: relative;
  padding-left: 14px;
  color: #111c28;
  font-size: 19px;
  font-weight: 800;
}

.panel-title h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 4px;
  height: 17px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--lactalis-blue), var(--lactalis-cyan));
}

canvas {
  width: 100%;
  max-width: 100%;
}

.chart-wrap {
  position: relative;
}

.chart-tooltip {
  position: absolute;
  z-index: 15;
  pointer-events: none;
  min-width: 240px;
  border: 1px solid rgba(25, 167, 224, 0.36);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(0, 84, 155, 0.98) 0%, rgba(23, 60, 150, 0.98) 100%);
  box-shadow: 0 18px 38px rgba(18, 48, 111, 0.28);
  color: #ffffff;
  line-height: 1.15;
  padding: 14px 16px;
  transform: scale(1.02);
}

.chart-tooltip strong {
  display: block;
  color: #ffffff;
  font-size: 17px;
  font-weight: 950;
  margin-top: 4px;
}

.chart-tooltip span {
  display: inline-flex;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #dff5ff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.02em;
  padding: 4px 8px;
  text-transform: uppercase;
}

.chart-tooltip em {
  display: block;
  color: #ffffff;
  font-size: clamp(25px, 2vw, 34px);
  font-style: normal;
  font-weight: 950;
  margin-top: 8px;
}

.chart-hovering {
  cursor: zoom-in;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  margin-top: 6px;
  color: #526172;
  font-size: 11px;
  font-weight: 650;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-bar,
.legend-dot {
  display: inline-block;
  flex: 0 0 auto;
}

.legend-bar {
  width: 16px;
  height: 7px;
  border-radius: 3px;
  background: var(--lactalis-cyan);
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--lactalis-blue);
}

.legend-dot.min {
  background: var(--warn);
}

.legend-dot.last {
  background: var(--success);
}

.fortnight-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(280px, 0.72fr);
  gap: 12px;
}

.fortnight-card {
  position: relative;
  display: grid;
  align-content: center;
  gap: 7px;
  min-height: 124px;
  overflow: hidden;
  border: 1px solid rgba(217, 228, 238, 0.96);
  border-radius: 14px;
  background: linear-gradient(135deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: var(--shadow-soft);
  padding: 17px 18px;
}

.fortnight-meter {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(217, 228, 238, 0.7);
}

.fortnight-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--lactalis-blue), var(--lactalis-cyan));
}

.fortnight-card.warn .fortnight-meter i {
  background: linear-gradient(90deg, var(--warn), var(--warn-light));
}

.fortnight-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--lactalis-blue), var(--lactalis-cyan));
}

.fortnight-card.warn::before {
  background: linear-gradient(180deg, var(--warn), var(--warn-light));
}

.fortnight-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.fortnight-card strong {
  color: var(--text-strong);
  font-size: clamp(24px, 2vw, 32px);
  font-weight: 820;
  line-height: 1;
}

.fortnight-card .fortnight-average {
  color: var(--lactalis-blue);
  font-size: 15px;
  font-weight: 800;
}

.fortnight-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.fortnight-diff {
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 68px;
  margin: 0;
  border: 1px solid rgba(25, 167, 224, 0.16);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(25, 167, 224, 0.14), rgba(23, 60, 150, 0.07)),
    #f6fbff;
  color: var(--lactalis-blue-dark);
  box-shadow: none;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
  padding: 14px 16px;
  text-align: center;
}

.table-filter {
  min-width: 260px;
  position: relative;
}

.table-toggle {
  min-height: 40px;
  border-color: var(--line);
  background: var(--surface-soft);
  font-size: 13px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.table-check-filter {
  left: auto;
  min-width: 300px;
  right: 0;
}

.table-wrap {
  overflow: auto;
  scrollbar-color: rgba(23, 60, 150, 0.24) rgba(217, 228, 238, 0.35);
  scrollbar-width: thin;
}

.routes-panel .table-wrap,
.operations-panel .table-wrap {
  max-height: 520px;
}

.operations-panel .material-wrap {
  max-height: 220px;
}

.table-wrap::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.table-wrap::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(217, 228, 238, 0.35);
}

.table-wrap::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(23, 60, 150, 0.22);
}

.table-wrap::-webkit-scrollbar-thumb:hover {
  background: rgba(23, 60, 150, 0.34);
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 6px;
  font-size: 13px;
  table-layout: fixed;
}

th,
td {
  padding: 7px 11px;
  border-bottom: 0;
  text-align: right;
  white-space: nowrap;
}

th:first-child,
td:first-child {
  text-align: left;
  width: 28%;
}

th:not(:first-child),
td:not(:first-child) {
  width: 18%;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f7fafd;
  color: var(--lactalis-blue-dark);
  font-size: 11px;
  font-weight: 800;
  padding-top: 8px;
  padding-bottom: 7px;
  text-transform: uppercase;
}

thead tr {
  background: transparent;
}

tbody tr {
  background: var(--surface);
  transition:
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

tbody tr:hover {
  box-shadow: 0 5px 12px rgba(18, 48, 111, 0.05);
  transform: translateY(-1px);
}

tbody td {
  border-top: 1px solid rgba(217, 228, 238, 0.92);
  border-bottom: 1px solid rgba(217, 228, 238, 0.92);
  background: #ffffff;
}

tbody tr:nth-child(even) td {
  background: #fbfdff;
}

tbody td:first-child {
  border-left: 1px solid rgba(217, 228, 238, 0.92);
  border-radius: 12px 0 0 12px;
  color: var(--text-strong);
  font-size: 14px;
  font-weight: 760;
  padding-left: 16px;
}

.supplier-name {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.rank-badge {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--lactalis-blue-dark);
  font-size: 12px;
  font-weight: 750;
}

.top-supplier .rank-badge {
  background: linear-gradient(135deg, var(--lactalis-blue), var(--lactalis-cyan));
  color: #ffffff;
}

.supplier-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

tbody td:last-child {
  border-right: 1px solid rgba(217, 228, 238, 0.92);
  border-radius: 0 12px 12px 0;
  background: #f8fbfe;
}

.empty-row {
  border: 1px solid var(--line) !important;
  border-radius: 14px !important;
  color: var(--muted);
  font-weight: 800;
  padding: 22px !important;
  text-align: center !important;
}

.period-cell {
  display: grid;
  gap: 4px;
  justify-items: end;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.period-cell strong {
  color: var(--text-strong);
  font-size: 16px;
  font-weight: 780;
}

.total-cell {
  position: relative;
  gap: 6px;
}

.total-bar {
  width: min(190px, 100%);
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(217, 228, 238, 0.9);
}

.total-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--lactalis-blue), var(--lactalis-cyan));
}

.period-cell span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  border: 1px solid rgba(23, 60, 150, 0.16);
  border-radius: 999px;
  background: rgba(23, 60, 150, 0.08);
  color: var(--lactalis-blue-dark);
  font-size: 11px;
  font-weight: 750;
  padding: 2px 7px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.total-cell span {
  background: rgba(25, 167, 224, 0.1);
  border-color: rgba(25, 167, 224, 0.2);
}

.period-cell em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.growth-cell {
  display: inline-grid;
  justify-items: center;
  min-width: 76px;
  border-radius: 999px;
  line-height: 1.05;
  padding: 5px 9px;
  font-variant-numeric: tabular-nums;
}

.growth-cell strong,
.growth-cell {
  font-size: 12px;
  font-weight: 800;
}

.growth-cell span {
  font-size: 10px;
  font-weight: 800;
}

.growth-cell.positive {
  background: rgba(0, 143, 90, 0.14);
  border: 1px solid rgba(0, 143, 90, 0.2);
  color: var(--success);
}

.growth-cell.negative {
  background: rgba(193, 18, 31, 0.14);
  border: 1px solid rgba(193, 18, 31, 0.2);
  color: var(--warn);
}

.growth-cell.neutral {
  background: var(--surface-2);
  color: var(--muted);
}

.quality-panel,
.routes-panel,
.operations-panel {
  margin-top: 16px;
}

.tabs {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(217, 228, 238, 0.92);
  padding-bottom: 9px;
}

.quality-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 9px;
  margin-bottom: 12px;
  border: 1px solid rgba(217, 228, 238, 0.92);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%);
  padding: 9px;
}

.route-filters,
.quality-filters {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.quality-filters label {
  min-width: 170px;
}

.quality-filters input {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  padding: 8px 10px;
}

.quality-filters button {
  min-height: 36px;
  background: var(--lactalis-blue);
  color: #ffffff;
}

.tab-button,
.route-tab-button,
.operation-tab-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--lactalis-blue-dark);
  font-size: 12px;
  font-weight: 760;
  padding: 7px 13px;
}

.tab-button.active,
.route-tab-button.active,
.operation-tab-button.active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--lactalis-blue-dark), var(--lactalis-blue));
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(23, 60, 150, 0.14);
}

.tab-button:not(.active):hover,
.route-tab-button:not(.active):hover,
.operation-tab-button:not(.active):hover {
  background: #f5faff;
  border-color: rgba(25, 167, 224, 0.34);
  box-shadow: none;
}

.tab-panel,
.route-tab-panel,
.operation-tab-panel {
  display: none;
}

.tab-panel.active,
.route-tab-panel.active,
.operation-tab-panel.active {
  display: block;
}

.route-filters {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(220px, 320px) minmax(190px, 260px) 1fr;
  gap: 10px;
  margin-bottom: 12px;
  border: 1px solid rgba(217, 228, 238, 0.92);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%);
  padding: 9px;
}

.operation-filters {
  grid-template-columns: minmax(160px, 220px) minmax(190px, 260px) 1fr;
}

.operation-tabs-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(217, 228, 238, 0.92);
  padding-bottom: 9px;
}

.operation-tabs {
  align-items: flex-start;
  flex: 1 1 auto;
  margin-bottom: 0;
  border-bottom: 0;
  padding-bottom: 0;
}

.complementary-summary {
  display: grid;
  min-width: 0;
  border: 1px solid rgba(25, 167, 224, 0.24);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%);
  padding: 9px 13px;
  text-align: left;
}

.complementary-panel {
  margin-top: 14px;
  margin-bottom: 14px;
}

.complementary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.complementary-grid .complementary-summary {
  border-left: 1px solid rgba(217, 228, 238, 0.92);
  min-height: 104px;
  padding: 14px 16px;
}

.complementary-grid .impact-card {
  border-color: rgba(0, 143, 90, 0.24);
  border-left-color: var(--success);
  background: linear-gradient(135deg, #ffffff 0%, rgba(0, 143, 90, 0.07) 100%);
}

.complementary-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.complementary-summary strong {
  color: var(--lactalis-blue-dark);
  font-size: clamp(24px, 2vw, 34px);
  font-weight: 850;
  line-height: 1.1;
}

.complementary-summary em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.operation-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.operation-kpis article {
  min-height: 84px;
  border: 1px solid rgba(217, 228, 238, 0.92);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  padding: 12px;
}

.operation-kpis article:nth-child(3) {
  border-color: rgba(23, 60, 150, 0.22);
  background: linear-gradient(135deg, #ffffff 0%, rgba(25, 167, 224, 0.09) 100%);
}

.operation-kpis span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.operation-kpis strong {
  display: block;
  margin-top: 7px;
  color: var(--text-strong);
  font-size: clamp(20px, 1.8vw, 26px);
  font-weight: 820;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.operation-kpis small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.material-wrap {
  margin-top: 12px;
}

.quality-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.quality-kpis article.is-hidden {
  display: none;
}

.quality-kpis article {
  border: 1px solid rgba(217, 228, 238, 0.92);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  padding: 12px;
}

.quality-kpis span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.quality-kpis strong {
  display: block;
  margin-top: 6px;
  color: var(--lactalis-blue-dark);
  font-size: clamp(21px, 1.85vw, 27px);
  font-weight: 820;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.quality-kpis article:last-child {
  border-color: rgba(25, 167, 224, 0.22);
  background: linear-gradient(135deg, #ffffff 0%, rgba(25, 167, 224, 0.09) 100%);
}

.quality-kpis article:first-child strong {
  color: var(--warn);
}

.quality-panel tbody td:first-child {
  width: auto;
}

.quality-panel tbody td {
  font-variant-numeric: tabular-nums;
}

.quality-panel table {
  min-width: 1080px;
  table-layout: auto;
}

.quality-panel th,
.quality-panel td {
  white-space: nowrap;
}

.quality-panel th:nth-child(6),
.quality-panel td:nth-child(6) {
  min-width: 190px;
}

.routes-panel table,
.operations-panel table {
  min-width: 980px;
}

.routes-panel tbody tr:nth-child(-n + 3) .rank-badge {
  border: 1px solid rgba(25, 167, 224, 0.2);
  background: linear-gradient(135deg, #ffffff, var(--blue-soft));
  color: var(--lactalis-blue);
}

.operations-panel #operationTransporterTable,
.operations-panel #operationPlateTable {
  font-size: 13px;
}

.positive-value,
.negative-value {
  display: inline-block;
  border-radius: 999px;
  font-weight: 900;
  padding: 5px 10px;
}

.positive-value {
  border: 1px solid rgba(0, 143, 90, 0.22);
  background: rgba(0, 143, 90, 0.14);
  color: var(--success);
}

.negative-value {
  border: 1px solid rgba(193, 18, 31, 0.22);
  background: rgba(193, 18, 31, 0.14);
  color: var(--warn);
}

.neutral-value {
  display: inline-block;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 850;
  padding: 5px 10px;
}

.negative-value strong,
.positive-value strong {
  color: inherit;
}

.share-cell,
.share-bar {
  display: none;
}

@media (max-width: 1180px) {
  .kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .fortnight-cards {
    grid-template-columns: 1fr;
  }

  .quality-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .executive-grid,
  .audit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .growth-ranking {
    grid-template-columns: 1fr;
  }

  .operation-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .complementary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .topbar,
  .filters {
    grid-template-columns: 1fr;
  }

  .filters-body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .actions {
    justify-content: flex-start;
  }

  .brand-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .route-filters {
    grid-template-columns: 1fr;
  }

  .operation-tabs-row {
    flex-direction: column;
  }

  .complementary-summary {
    min-width: 0;
    text-align: left;
  }
}

@media (max-width: 720px) {
  .shell {
    padding: 22px 16px 26px;
  }

  .side-nav {
    top: 12px;
    left: 12px;
  }

  .side-nav-panel {
    width: min(280px, calc(100vw - 24px));
  }

  .side-nav strong {
    margin-bottom: 8px;
  }

  .topbar,
  .panel,
  .filters {
    border-radius: 16px;
  }

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

  .filters-body {
    grid-template-columns: 1fr;
  }

  .brand-card {
    width: min(100%, 238px);
    height: 92px;
  }

  .kpis {
    grid-template-columns: 1fr;
  }

  .panel-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .table-filter {
    width: 100%;
  }

  .quality-kpis {
    grid-template-columns: 1fr;
  }

  .executive-grid,
  .audit-grid {
    grid-template-columns: 1fr;
  }

  .growth-row {
    grid-template-columns: 1fr;
  }

  .operation-kpis {
    grid-template-columns: 1fr;
  }

  .complementary-grid {
    grid-template-columns: 1fr;
  }
}

.creator-signature {
  margin: 4px 0 8px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

/* Menu flutuante removido - navegação fica nas abas principais */
.side-nav {
  display: none !important;
}

/* Bordas coloridas de leitura rápida - 2026-07-24 */
.kpi-card,
.executive-card,
.quality-kpis article,
.operation-kpis article,
.audit-click-card,
.complementary-summary,
.update-ribbon article,
.tab-summary-card {
  border-left-width: 1px;
  border-left-style: solid;
}

.kpi-card,
.executive-card,
.operation-kpis article,
.quality-kpis article,
.audit-click-card,
.update-ribbon article,
.tab-summary-card {
  border-left-color: var(--lactalis-blue);
}

.kpi-card::before,
.executive-card::before {
  width: 5px;
}

.kpi-primary,
.complementary-grid .impact-card,
.tab-summary-card.positive,
.operation-kpis article:nth-child(6),
.update-ribbon article:first-child {
  border-left-color: var(--success);
}

.kpi-primary::before,
.complementary-grid .impact-card::before,
.tab-summary-card.positive::before {
  background: var(--success);
}

.executive-card.warning,
.tab-summary-card.danger,
.quality-kpis article:first-child,
.quality-kpis article:last-child,
.operation-kpis article:nth-child(5),
.audit-click-card[data-audit-type="highDifference"],
.audit-click-card[data-audit-type="zeroVolume"] {
  border-left-color: var(--warn);
}

.operation-kpis article:nth-child(3),
.audit-click-card[data-audit-type="missingRoute"],
.audit-click-card[data-audit-type="missingPlate"],
.audit-click-card[data-audit-type="missingTransporter"] {
  border-left-color: #f59e0b;
}

.complementary-summary:first-child {
  border-left-color: var(--lactalis-blue);
}

.complementary-summary:nth-child(2) {
  border-left-color: #f59e0b;
}

.audit-click-card.active {
  box-shadow:
    inset 5px 0 0 var(--audit-accent, var(--lactalis-blue)),
    0 12px 24px rgba(18, 48, 111, 0.12);
}

.audit-click-card[data-audit-type="missingRoute"].active,
.audit-click-card[data-audit-type="missingPlate"].active,
.audit-click-card[data-audit-type="missingTransporter"].active {
  --audit-accent: #f59e0b;
}

.audit-click-card[data-audit-type="highDifference"].active,
.audit-click-card[data-audit-type="zeroVolume"].active {
  --audit-accent: var(--warn);
}

/* Ajustes finais de profissionalização - 2026-07-24 */
.filters {
  position: sticky;
  top: 8px;
  z-index: 30;
  backdrop-filter: blur(10px);
}

.filters label {
  min-width: 0;
}

.update-ribbon,
.tab-dashboard-summary {
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
}

.update-ribbon,
.tab-dashboard-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.update-ribbon article,
.tab-summary-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(217, 228, 238, 0.94);
  border-left: 1px solid rgba(217, 228, 238, 0.94);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(246, 251, 255, 0.98));
  box-shadow: 0 8px 20px rgba(18, 48, 111, 0.06);
  padding: 10px 13px;
}

.update-ribbon article::after,
.tab-summary-card::after {
  content: "";
  position: absolute;
  inset: auto -20px -28px auto;
  width: 74px;
  height: 74px;
  border-radius: 999px;
  background: rgba(25, 167, 224, 0.08);
}

.update-ribbon span,
.tab-summary-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.update-ribbon strong,
.tab-summary-card strong {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 5px;
  color: #10213a;
  font-size: clamp(18px, 2vw, 25px);
  font-weight: 950;
  letter-spacing: -0.04em;
}

.tab-summary-card.danger {
  border-left-color: #e3232d;
}

.tab-summary-card.danger strong {
  color: #e3232d;
}

.tab-summary-card.positive {
  border-left-color: #13a153;
}

.tab-summary-card.positive strong {
  color: #13a153;
}

.panel {
  overflow: hidden;
}

.panel-title {
  align-items: start;
}

.panel-title h2 {
  font-size: 19px;
}

.panel-title span {
  line-height: 1.35;
}

.table-wrap {
  border: 1px solid rgba(217, 228, 238, 0.76);
  border-radius: 14px;
  background: #ffffff;
}

table {
  border-spacing: 0;
  font-size: 12.5px;
}

th {
  background: linear-gradient(180deg, #eaf4fc 0%, #dfeef8 100%);
  box-shadow: inset 0 -1px 0 rgba(217, 228, 238, 0.92);
}

td {
  color: #243246;
}

tbody td {
  border-top: 0;
  border-right: 0;
  border-left: 0;
  border-bottom: 1px solid rgba(217, 228, 238, 0.7);
}

tbody tr:hover td {
  background: #f3f9fe;
}

.quality-kpis,
.operation-kpis,
.audit-grid {
  gap: 10px;
}

.quality-kpis article,
.operation-kpis article,
.audit-click-card {
  min-height: 86px;
  padding: 12px 13px;
}

.main-tabs {
  position: sticky;
  top: 116px;
  z-index: 24;
}

@media (max-width: 1180px) {
  .update-ribbon,
  .tab-dashboard-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .main-tabs {
    top: 8px;
  }
}

@media (max-width: 760px) {
  .update-ribbon,
  .tab-dashboard-summary {
    grid-template-columns: 1fr;
  }
}

/* Portal polish final layer — mantém estrutura e reforça acabamento */
.topbar,
.filters,
.health-panel,
.kpi-card,
.panel,
.tabs {
  border-color: rgba(183, 211, 232, 0.86);
  box-shadow: 0 10px 24px rgba(6, 26, 56, 0.075);
}

.topbar,
.filters,
.panel {
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,252,255,.96));
  border-radius: 20px;
}

.kpi-card {
  background:
    radial-gradient(circle at 100% 100%, rgba(25, 167, 224, 0.11), transparent 34%),
    linear-gradient(180deg, #ffffff, #f8fbfe);
  border-radius: 18px;
}

.table-wrap {
  border-color: #d8e7f2;
  border-radius: 16px;
}

/* Correção: topo do dashboard de Volume precisa manter contraste alto */
.topbar {
  background:
    radial-gradient(circle at 88% 18%, rgba(25, 167, 224, 0.25), transparent 28%),
    linear-gradient(135deg, #031943 0%, #063b78 58%, #005aa8 100%);
  border-color: rgba(255, 255, 255, 0.22);
  border-radius: 22px;
  box-shadow: 0 18px 44px rgba(3, 25, 67, 0.18);
}

.topbar .eyebrow,
.topbar h1,
.topbar .creator-signature,
.topbar .source,
.topbar .top-source {
  color: #ffffff;
}

.topbar .creator-signature,
.topbar .top-source {
  opacity: 0.86;
}

.topbar .actions button,
.topbar .upload {
  border-color: rgba(255, 255, 255, 0.34);
}

/* Ajuste de navegação: abas compactas e sem sobrepor os indicadores */
.main-tabs {
  position: relative !important;
  top: auto !important;
  z-index: 4 !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin: 8px 0 12px !important;
  padding: 6px !important;
  border-radius: 16px !important;
  background: rgba(255, 255, 255, 0.9) !important;
  box-shadow: 0 8px 22px rgba(16, 47, 91, 0.08) !important;
}

.main-tab-button {
  min-height: 44px !important;
  padding: 8px 12px !important;
  border-radius: 12px !important;
  font-size: 13px !important;
  line-height: 1.1 !important;
}

.main-tab-button.active {
  box-shadow: 0 8px 16px rgba(18, 48, 111, 0.14) !important;
}

.tabs {
  gap: 6px !important;
  margin-bottom: 8px !important;
  padding-bottom: 6px !important;
}

.tab-button,
.route-tab-button,
.operation-tab-button {
  min-height: 44px !important;
  padding: 6px 11px !important;
  border-radius: 12px !important;
  font-size: 11.5px !important;
}

@media (max-width: 900px) {
  .main-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Padrao visual compartilhado 2026-07 - ajuste fino final */
html {
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

.topbar {
  position: relative;
  overflow: hidden;
  min-height: 142px;
}

.topbar::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  background: linear-gradient(180deg, #d71920, #ff7b7f 48%, #12a8df);
}

.topbar > * {
  position: relative;
  z-index: 1;
}

.topbar h1 {
  letter-spacing: -.045em;
  text-wrap: balance;
}

.topbar .actions button,
.topbar .upload,
.filters select,
.filters input,
.select-like,
.filter-dropdown-trigger {
  border-radius: 13px !important;
}

.filters {
  border-left: 1px solid var(--line, #d7e6f2);
}

.kpi-card,
.metric-card,
.audit-click-card,
.quality-kpis article,
.operation-kpis article {
  border-left-width: 1px !important;
}

[role="tab"]:focus-visible {
  outline: 3px solid rgba(18, 168, 223, 0.72);
  outline-offset: 2px;
}

[role="tabpanel"]:focus {
  outline: none;
}

.panel h2::before,
.card-title::before,
.section-title::before {
  border-radius: 999px;
}
