﻿:root {
  --bg: #07101b;
  --bg-deep: #040a12;
  --panel: rgba(13, 29, 49, 0.88);
  --panel-strong: rgba(14, 36, 61, 0.98);
  --line: rgba(112, 166, 255, 0.16);
  --text: #f5f9ff;
  --muted: #a7bfdc;
  --cyan: #74d4ff;
  --lime: #c4ff4d;
  --gold: #ffc857;
  --pink: #fb7185;
  --blue: #4f7dff;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] {
  --bg: #fafcff;
  --bg-deep: #f2f6fb;
  --panel: #ffffff;
  --panel-strong: #ffffff;
  --line: rgba(0, 40, 100, 0.08);
  --text: #0d2040;
  --muted: #4a6b8a;
  --cyan: #1456a8;
  --lime: #2d7a2d;
  --gold: #b87c1a;
  --pink: #c0334d;
  --blue: #1456a8;
  --shadow: 0 2px 16px rgba(0, 40, 100, 0.07);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Plus Jakarta Sans", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(71, 132, 255, 0.2), transparent 24%),
    radial-gradient(circle at top right, rgba(196, 255, 77, 0.13), transparent 18%),
    linear-gradient(180deg, #0d1b2d 0%, var(--bg) 38%, var(--bg-deep) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(255, 255, 255, 0.75), transparent);
}

[data-theme="light"] body {
  background: linear-gradient(180deg, #f4f8ff 0%, #ffffff 60%);
}

[data-theme="light"] body::before { opacity: 0; }

[data-theme="light"] .dashboard-home {
  border-color: rgba(0, 42, 92, 0.08);
  background:
    radial-gradient(circle at 18% 18%, rgba(20, 86, 168, 0.1), transparent 30%),
    radial-gradient(circle at 80% 24%, rgba(45, 122, 45, 0.06), transparent 24%),
    linear-gradient(135deg, #ffffff 0%, #f4f8ff 52%, #eaf2ff 100%);
}

[data-theme="light"] .dashboard-home::before {
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(20, 86, 168, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 86, 168, 0.04) 1px, transparent 1px);
}

[data-theme="light"] .dashboard-home-mark img {
  opacity: 0.22;
  filter: invert(1) brightness(0.34) sepia(1) saturate(6) hue-rotate(174deg);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

input,
select {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

p,
h1,
h2,
h3,
h4,
pre {
  margin: 0;
}

code,
pre,
.nav-icon,
.matrix-row span,
.ranking-list b,
.ranking-list span,
.status-pill,
.filter-chip,
.executive-kpi strong {
  font-family: "JetBrains Mono", monospace;
}

.app-shell {
  display: grid;
  grid-template-columns: 278px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow-y: auto;
  padding: 18px 16px;
  border-right: 1px solid rgba(116, 212, 255, 0.12);
  background: linear-gradient(180deg, rgba(7, 16, 27, 0.97), rgba(3, 8, 15, 0.95));
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-logo-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 0 4px;
  text-align: center;
}

.sidebar-floating-logo {
  width: 124px;
  max-width: 100%;
  opacity: 1;
  filter: drop-shadow(0 16px 24px rgba(255, 255, 255, 0.08));
}

.sidebar-logo-credit {
  color: #ffffff;
  font-size: 0.62rem;
  font-style: italic;
  opacity: 0.80;
  margin-top: -18px;
  line-height: 1.2;
  text-align: center;
}

.user-session-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  padding: 5px 9px;
  border: 1px solid rgba(185, 210, 232, 0.22);
  border-radius: 8px;
  background: rgba(7, 16, 27, 0.72);
  color: #e8f1ff;
  font: 700 0.68rem "Segoe UI", Arial, sans-serif;
}

.user-session-bar button {
  border: 0;
  border-radius: 6px;
  background: #e2b85e;
  color: #111820;
  font: inherit;
  padding: 4px 7px;
  cursor: pointer;
}

.sidebar-dev-credit {
  color: #ffffff;
  font-size: 0.75rem;
  font-style: italic;
  opacity: 0.80;
  margin: 10px 0 4px;
  text-align: center;
  line-height: 1.2;
}

.brand-panel,
.panel,
.sidebar-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.brand-panel::after,
.panel::after,
.sidebar-card::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.03);
  pointer-events: none;
}

.brand-panel {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 15px;
  display: grid;
  align-items: center;
  justify-items: center;
  text-align: center;
  background:
    radial-gradient(circle at top right, rgba(196, 255, 77, 0.16), transparent 28%),
    linear-gradient(160deg, rgba(116, 212, 255, 0.12), transparent 52%),
    var(--panel-strong);
}

.brand-panel-copy {
  display: grid;
  align-items: center;
  justify-items: center;
  height: 100%;
}

.brand-logo {
  width: 132px;
  margin-bottom: 18px;
  filter: drop-shadow(0 16px 24px rgba(255, 255, 255, 0.08));
}

.eyebrow,
.label {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--cyan);
}

.brand-panel h1 {
  font-size: 1.22rem;
  letter-spacing: 0.08em;
  line-height: 1;
  text-align: center;
}

.brand-copy,
.hero-text,
.section-heading p:last-child,
.hero-stat small,
.kpi-card small,
.chart-note,
.matrix-row,
.contact-card a:last-of-type,
.mini-card p {
  color: var(--muted);
  line-height: 1.65;
}

.brand-copy {
  margin-top: 12px;
  font-size: 0.92rem;
  max-width: 24ch;
  text-align: center;
}

.side-nav {
  display: grid;
  gap: 12px;
}

.nav-group {
  display: grid;
  gap: 5px;
}

.nav-cluster {
  display: grid;
  gap: 5px;
}

.nav-cluster-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #88a2c8;
  font-size: 0.82rem;
  line-height: 1.15;
  cursor: pointer;
  transition: 180ms ease;
}

.nav-cluster-toggle:hover,
.nav-cluster.is-open .nav-cluster-toggle {
  color: var(--text);
  background: linear-gradient(90deg, rgba(14, 63, 92, 0.94), rgba(11, 55, 77, 0.82));
  border-color: rgba(36, 190, 255, 0.18);
  box-shadow: inset 3px 0 0 #15c8ff;
}

.nav-cluster.nav-priority .nav-cluster-toggle {
  background: rgba(255, 222, 122, 0.16);
  border-color: rgba(255, 213, 79, 0.3);
  color: #ffe99a;
}

.nav-cluster.nav-priority .nav-cluster-toggle:hover,
.nav-cluster.nav-priority.is-open .nav-cluster-toggle {
  color: #3d2c00;
  background: linear-gradient(90deg, rgba(255, 241, 173, 0.95), rgba(255, 209, 92, 0.95));
  border-color: rgba(255, 196, 25, 0.35);
  box-shadow: inset 3px 0 0 rgba(255, 189, 27, 0.85);
}

.nav-cluster.nav-priority .nav-icon {
  background: rgba(255, 223, 108, 0.18);
  color: #ffdc73;
  box-shadow: 0 0 0 1px rgba(255, 220, 120, 0.14);
}

.nav-cluster-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  color: inherit;
  text-decoration: none;
}

.nav-chevron-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  border-radius: 8px;
  transition: background 150ms;
}

.nav-chevron-btn:hover {
  background: rgba(255, 255, 255, 0.06);
}

.nav-chevron {
  width: 10px;
  height: 10px;
  border-right: 2px solid rgba(167, 191, 220, 0.9);
  border-bottom: 2px solid rgba(167, 191, 220, 0.9);
  transform: rotate(45deg);
  transition: transform 180ms ease, margin 180ms ease;
  margin-top: -4px;
}

.nav-cluster.is-open .nav-chevron {
  transform: rotate(225deg);
  margin-top: 4px;
}

.nav-group-title {
  padding: 0 2px 4px;
  color: rgba(140, 169, 214, 0.72);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.58rem;
  font-weight: 800;
}

.side-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 12px;
  color: #88a2c8;
  font-size: 0.82rem;
  line-height: 1.15;
  border: 1px solid transparent;
  transition: 180ms ease;
}

.side-nav a:hover,
.side-nav a.is-current {
  color: var(--text);
  background: linear-gradient(90deg, rgba(14, 63, 92, 0.94), rgba(11, 55, 77, 0.82));
  border-color: rgba(36, 190, 255, 0.18);
  box-shadow: inset 3px 0 0 #15c8ff;
  transform: translateX(2px);
}

.sub-nav {
  display: grid;
  gap: 3px;
  margin: 0 0 4px 38px;
  padding-left: 10px;
  border-left: 1px solid rgba(116, 212, 255, 0.14);
}

.nav-cluster:not(.is-open) .sub-nav {
  display: none;
}

.sub-nav a {
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 9px;
  font-size: 0.7rem;
  color: rgba(173, 197, 230, 0.88);
}

.sub-nav a:hover,
.sub-nav a.is-current {
  box-shadow: inset 2px 0 0 #15c8ff;
}

.nav-icon {
  width: 28px;
  min-width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--cyan);
}

.nav-dev-badge {
  font-size: 0.56rem;
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  line-height: 1.4;
  white-space: nowrap;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 140, 0, 0.16);
  color: #ffb347;
  border: 1px solid rgba(255, 140, 0, 0.32);
}

.side-nav a.nav-dev,
.nav-cluster.nav-dev > .nav-cluster-toggle {
  border-color: rgba(255, 140, 0, 0.2);
  background: rgba(255, 120, 0, 0.07);
}

.side-nav a.nav-dev:hover,
.nav-cluster.nav-dev > .nav-cluster-toggle:hover,
.nav-cluster.nav-dev.is-open > .nav-cluster-toggle {
  color: var(--text);
  background: linear-gradient(90deg, rgba(88, 46, 6, 0.75), rgba(60, 32, 5, 0.58));
  border-color: rgba(255, 140, 0, 0.32);
  box-shadow: inset 3px 0 0 #ffb347;
}

.side-nav a.nav-dev .nav-icon,
.nav-cluster.nav-dev .nav-icon {
  color: #ffb347;
  background: rgba(255, 130, 0, 0.13);
}

.filter-chip {
  min-height: 44px;
  border: 1px solid rgba(116, 212, 255, 0.16);
  border-radius: 16px;
  padding: 0 14px;
  background: rgba(8, 20, 34, 0.76);
  color: #cde2ff;
  text-align: left;
  cursor: pointer;
  transition: 180ms ease;
}

.filter-chip:hover,
.filter-chip.active {
  background: linear-gradient(90deg, rgba(14, 63, 92, 0.94), rgba(11, 55, 77, 0.82));
  border-color: rgba(196, 255, 77, 0.24);
  color: var(--text);
}

.sidebar-card {
  padding: 18px;
}

.mini-card,
.contact-card {
  text-align: center;
}

.mini-card strong,
.contact-card a:first-of-type {
  display: block;
  margin: 10px 0 8px;
  font-size: 1rem;
}

.contact-card {
  margin-top: auto;
  display: grid;
  gap: 8px;
}

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

.finance-card {
  display: grid;
  gap: 14px;
  min-height: 220px;
}

.finance-card-head {
  display: grid;
  gap: 8px;
}

.finance-card-head strong {
  font-size: 1.18rem;
  line-height: 1.2;
}

.finance-card p {
  color: var(--muted);
  line-height: 1.7;
}

.finance-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}

.finance-tag {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(20, 86, 168, 0.18);
  background: rgba(7, 18, 30, 0.75);
  color: #dcebff;
  font-size: 0.82rem;
  font-family: "JetBrains Mono", monospace;
}

.stock-kpi-strip {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  margin-top: 6px;
}

.stock-kpi-strip .kpi-card {
  min-width: 0;
  padding: 22px 26px;
}

.stock-kpi-strip .kpi-card strong {
  font-size: clamp(1.25rem, 1.45vw, 1.55rem);
  line-height: 1.18;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  word-break: normal;
}

.stock-kpi-strip .kpi-card small {
  max-width: 28ch;
  font-size: 0.86rem;
}

.produtos-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.produtos-query-status {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid rgba(116, 212, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  flex-shrink: 0;
  margin-top: 4px;
}

.produtos-query-status .status-dot {
  color: rgba(154, 168, 183, 0.35);
  font-size: 14px;
  line-height: 1;
  transition: color 0.2s, text-shadow 0.2s;
}

.produtos-query-status .status-dot.active {
  text-shadow: 0 0 10px currentColor;
}

.produtos-query-status #prodStatusProcessing.active {
  color: #24beff;
  animation: spin 1s linear infinite;
}

.produtos-query-status #prodStatusSuccess.active {
  color: #4ade80;
}

.produtos-query-status #prodStatusWarning.active {
  color: #e2b85e;
}

.produtos-query-status #prodStatusError.active {
  color: #f87171;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.products-filter-panel {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  padding: 16px;
  align-items: stretch;
}

.products-filter-panel .slicer {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 112px;
  box-sizing: border-box;
}

.products-filter-panel .slicer > small {
  display: block;
  min-height: 18px;
}

.products-filter-panel .slicer > input,
.products-filter-panel .slicer > select,
.products-filter-panel .filter-multi-control {
  height: 46px;
  min-height: 46px;
  box-sizing: border-box;
}

.products-filter-panel .filter-multi {
  margin-top: 10px;
}

.products-filter-panel .filter-multi-control {
  flex-wrap: nowrap;
  overflow: hidden;
  padding: 5px 14px;
  border-radius: 14px;
  border-color: rgba(116, 212, 255, 0.14);
  background: rgba(7, 16, 27, 0.82);
}

.products-filter-panel .filter-multi-chip {
  max-width: 105px;
  flex: 0 1 auto;
  white-space: nowrap;
}

.products-filter-panel .filter-multi-input {
  min-width: 24px;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 0 !important;
}

.products-filter-actions,
.products-pagination {
  display: flex;
  gap: 10px;
  align-items: center;
}

.products-filter-actions {
  grid-column: 1 / -1;
  justify-content: flex-end;
  padding-top: 4px;
}

.products-export-status {
  margin-right: auto;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.products-kpi-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 6px;
}

.kpi-card.is-clickable {
  cursor: pointer;
}

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

.product-quality-list {
  display: grid;
  gap: 10px;
}

.product-quality-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.products-ranking-shell,
.products-detail-panel {
  display: grid;
  gap: 16px;
}

.products-ranking-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.products-ranking-card {
  min-width: 0;
}

.products-ranking-card h5 {
  margin: 0 0 10px;
  font-size: 0.9rem;
  color: var(--muted);
}

.classification-insights-panel {
  display: grid;
  gap: 18px;
}

.classification-decision-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.classification-decision-card {
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid rgba(116, 212, 255, 0.14);
  background: rgba(10, 24, 39, 0.74);
}

.classification-decision-card span,
.classification-ranking-grid h5 {
  color: var(--cyan);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.classification-decision-card strong {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.25;
}

.classification-decision-card b {
  color: var(--gold);
  font-size: 1.25rem;
}

.classification-decision-card small {
  color: var(--muted);
  line-height: 1.4;
}

.classification-decision-card.warn {
  border-color: rgba(255, 200, 87, 0.34);
}

.classification-ranking-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.classification-ranking-grid h5 {
  margin: 0 0 10px;
}

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

.classification-list article {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(10, 24, 39, 0.78);
  border: 1px solid rgba(116, 212, 255, 0.1);
}

.classification-list b {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #08111c;
  background: linear-gradient(135deg, var(--lime), var(--gold));
}

.classification-list strong {
  display: block;
  color: var(--text);
  font-size: 0.92rem;
}

.classification-list small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
}

.classification-list span {
  color: var(--cyan);
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.products-detail-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.products-detail-tabs button,
.btn-ghost {
  min-height: 38px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
}

.products-detail-tabs button.active {
  border-color: rgba(116, 212, 255, 0.6);
  color: var(--cyan);
}

.products-detail-table {
  display: grid;
  gap: 8px;
  overflow-x: auto;
}

.products-detail-head,
.products-detail-row {
  display: grid;
  grid-template-columns: 110px 90px 90px minmax(220px, 1.4fr) 130px 130px 90px 90px 100px 100px minmax(150px, 1fr);
  gap: 10px;
  min-width: 1320px;
  align-items: center;
}

.products-detail-head {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.products-detail-row {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.86rem;
}

.stock-grid {
  margin-top: 4px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.decision-stock-shell .chart-card,
.decision-stock-shell .panel,
.decision-stock-shell .card-header,
.decision-stock-shell .card-header > div,
.decision-stock-shell .card-header h4,
.decision-stock-shell .chart-highlight {
  min-width: 0;
}

.decision-stock-shell .card-header h4,
.decision-stock-shell .chart-highlight,
.decision-stock-shell .decision-note,
.decision-stock-shell .decision-row-proof {
  overflow-wrap: anywhere;
}

.decision-stock-shell .chart-highlight {
  white-space: normal;
  text-align: right;
}

.decision-stock-shell {
  gap: 18px;
}

.decision-rules-panel {
  display: grid;
  gap: 16px;
}

.stock-filter-panel {
  display: grid;
  gap: 16px;
}

.stock-filter-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.stock-filter-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.stock-filter-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.stock-filter-actions .primary-button,
.stock-filter-actions .ghost-button {
  min-height: 48px;
  white-space: nowrap;
}

.query-status-indicators {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 6px 12px;
  background: rgba(71, 132, 255, 0.08);
  border-radius: 8px;
  border: 1px solid rgba(71, 132, 255, 0.2);
}

.status-dot {
  font-size: 18px;
  cursor: help;
  transition: all 0.3s ease;
  opacity: 0.4;
  color: #888;
}

.status-dot#statusProcessing {
  animation: pulse 1.5s ease-in-out infinite;
}

.status-dot#statusProcessing.active {
  opacity: 1;
  color: #4f7dff;
}

.status-dot#statusSuccess.active {
  opacity: 1;
  color: #c4ff4d;
}

.status-dot#statusWarning.active {
  opacity: 1;
  color: #ffc857;
}

.status-dot#statusError.active {
  opacity: 1;
  color: #fb7185;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.status-dot#statusProcessing.active {
  animation: spin 1s linear infinite;
}

[data-theme="light"] .query-status-indicators {
  background: rgba(20, 86, 168, 0.08);
  border-color: rgba(20, 86, 168, 0.2);
}

[data-theme="light"] .status-dot#statusProcessing.active {
  color: #1456a8;
}

[data-theme="light"] .status-dot#statusSuccess.active {
  color: #2d7a2d;
}

[data-theme="light"] .status-dot#statusWarning.active {
  color: #b87c1a;
}

[data-theme="light"] .status-dot#statusError.active {
  color: #c0334d;
}

.decision-rule-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.decision-rule {
  padding: 14px;
  border: 1px solid rgba(116, 212, 255, 0.14);
  border-radius: 14px;
  background: rgba(7, 16, 27, 0.22);
}

.decision-rule span,
.decision-table-head {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.decision-rule strong {
  display: block;
  margin: 8px 0 6px;
  color: var(--text);
  font-size: 1rem;
}

.decision-rule small,
.decision-note,
.decision-row small,
.progress-list small {
  color: var(--muted);
  line-height: 1.4;
}

.decision-stock-shell .decision-wide {
  grid-column: 1 / -1;
}

.decision-table {
  display: grid;
  gap: 10px;
  overflow: visible;
}

.decision-table-head {
  display: grid;
  grid-template-columns: repeat(4, minmax(118px, 1fr));
  gap: 10px;
  padding: 0 8px 4px;
}

.decision-table-head span:nth-child(n+5) {
  display: none;
}

.decision-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(118px, 1fr));
  gap: 10px;
  align-items: start;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(116, 212, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.decision-row > * {
  min-width: 0;
}

.decision-row > span:nth-of-type(n+4) {
  display: none;
}

.decision-row-proof {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  padding-top: 10px;
  border-top: 1px solid rgba(116, 212, 255, 0.1);
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.decision-row strong {
  display: block;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.decision-row span,
.decision-row b {
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.decision-row span small {
  display: block;
  margin-top: 3px;
}

.stock-alert-list {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.stock-alert-item {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 16px;
  border-radius: 18px;
  background: rgba(9, 21, 35, 0.86);
  border: 1px solid rgba(20, 86, 168, 0.12);
}

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

.stock-alert-head strong {
  font-size: 0.96rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.stock-alert-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.stock-alert-pill.is-critical {
  color: #ffe1a3;
  background: rgba(255, 200, 87, 0.14);
  border: 1px solid rgba(255, 200, 87, 0.2);
}

.stock-alert-pill.is-watch {
  color: #8fe5ff;
  background: rgba(116, 212, 255, 0.12);
  border: 1px solid rgba(116, 212, 255, 0.2);
}

.stock-alert-pill.is-good {
  color: #dbff9c;
  background: rgba(196, 255, 77, 0.12);
  border: 1px solid rgba(196, 255, 77, 0.2);
}

.stock-alert-pill.is-warning {
  color: #ffe1a3;
  background: rgba(255, 200, 87, 0.14);
  border: 1px solid rgba(255, 200, 87, 0.2);
}

.stock-alert-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.stock-alert-metrics span {
  color: var(--muted);
  font-size: 0.83rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.finance-detail-heading {
  margin-top: 8px;
}

.bank-kpi-strip,
.bank-grid {
  margin-top: 6px;
}

.bank-filters-panel {
  margin: 6px 0 18px;
  display: grid;
  gap: 16px;
}

.bank-filter-header {
  align-items: center;
}

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

.bank-action-row {
  padding-top: 4px;
}

.bank-extract-card {
  grid-column: 1 / -1;
}

.bank-extract-table {
  display: grid;
  gap: 10px;
  max-height: 420px;
  overflow: auto;
}

.bank-extract-row {
  display: grid;
  grid-template-columns: 120px 70px 1.1fr 1fr 1fr 120px;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(9, 21, 35, 0.86);
  border: 1px solid rgba(20, 86, 168, 0.12);
  color: #dcebff;
  align-items: center;
}

.bank-extract-row strong {
  font-size: 0.84rem;
}

.bank-extract-row span,
.bank-extract-row small {
  color: var(--muted);
  line-height: 1.4;
}

.main-content {
  padding: 28px;
  display: grid;
  gap: 22px;
}

.dashboard-home {
  position: relative;
  min-height: calc(100vh - 56px);
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: clamp(28px, 6vw, 72px);
  border: 1px solid rgba(116, 212, 255, 0.14);
  border-radius: 28px;
  background:
    radial-gradient(circle at 18% 18%, rgba(116, 212, 255, 0.18), transparent 30%),
    radial-gradient(circle at 78% 28%, rgba(196, 255, 77, 0.11), transparent 24%),
    linear-gradient(135deg, rgba(9, 24, 42, 0.94), rgba(3, 10, 18, 0.98));
  box-shadow: var(--shadow);
}

.dashboard-home::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.8;
}

.dashboard-home-mark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.dashboard-home-mark img {
  width: min(62vw, 720px);
  opacity: 0.2;
  filter: drop-shadow(0 32px 80px rgba(0, 0, 0, 0.45));
}

#filtros {
  order: -3;
}

#comercial {
  order: -2;
}

#evolucao {
  order: -1;
}

.dashboard-section-hidden {
  display: none !important;
}

.main-content > section,
.main-content article[id] {
  scroll-margin-top: 24px;
}

.panel {
  padding: 28px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.8fr);
  gap: 24px;
  align-items: stretch;
  background:
    radial-gradient(circle at right top, rgba(196, 255, 77, 0.18), transparent 22%),
    linear-gradient(135deg, rgba(116, 212, 255, 0.12), transparent 38%),
    var(--panel-strong);
}

.hero-side {
  display: grid;
  gap: 14px;
  align-content: start;
  justify-items: stretch;
}

.commercial-hero {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.95fr);
}

.commercial-hero-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.compact-hero {
  padding-top: 22px;
  padding-bottom: 22px;
}

.hero-copy h2 {
  margin-top: 12px;
  font-size: clamp(1.55rem, 2.2vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: -0.04em;
  max-width: 16ch;
}

.hero-text {
  margin-top: 12px;
  max-width: 62ch;
  font-size: 0.98rem;
}

.commercial-hero .hero-copy {
  display: flex;
  flex-direction: column;
}

.commercial-spotlight {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 12px;
  flex: 1;
  min-height: 0;
  margin-top: 16px;
}

.commercial-panel {
  display: flex;
  flex-direction: column;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(116, 212, 255, 0.1);
  background: rgba(7, 19, 31, 0.66);
  min-height: 0;
}

.commercial-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.commercial-panel-head strong {
  font-size: 0.88rem;
  color: var(--text);
}

.commercial-rank-list {
  flex: 1;
  display: grid;
  align-content: start;
  gap: 8px;
  overflow-y: auto;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(116, 212, 255, 0.2) transparent;
}

.commercial-rank-list::-webkit-scrollbar {
  width: 3px;
}

.commercial-rank-list::-webkit-scrollbar-thumb {
  background: rgba(116, 212, 255, 0.25);
  border-radius: 999px;
}

.commercial-rank-list::-webkit-scrollbar-track {
  background: transparent;
}

#heroDepartmentList {
  overflow-y: visible;
}

#heroDepartmentList,
.hero-mini-list {
  scrollbar-width: thin;
  scrollbar-color: rgba(116, 212, 255, 0.25) transparent;
}

#heroDepartmentList::-webkit-scrollbar,
.hero-mini-list::-webkit-scrollbar {
  width: 3px;
}

#heroDepartmentList::-webkit-scrollbar-thumb,
.hero-mini-list::-webkit-scrollbar-thumb {
  background: rgba(116, 212, 255, 0.25);
  border-radius: 999px;
}

#heroDepartmentList::-webkit-scrollbar-track,
.hero-mini-list::-webkit-scrollbar-track {
  background: transparent;
}

.commercial-rank-item {
  display: grid;
  gap: 5px;
}

.commercial-rank-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.commercial-rank-top strong {
  font-size: 0.76rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.commercial-rank-top span {
  color: #9fe8ff;
  font-size: 0.72rem;
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  white-space: nowrap;
}

.commercial-rank-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.commercial-rank-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22d3ee 0%, #6366f1 60%, #a855f7 100%);
  box-shadow: 0 0 6px rgba(99, 102, 241, 0.35);
}

.commercial-rank-empty {
  color: var(--muted);
  font-size: 0.88rem;
}

.commercial-command {
  display: grid;
  gap: 12px;
  padding: 18px;
  background:
    radial-gradient(circle at 88% 0%, rgba(196, 255, 77, 0.1), transparent 24%),
    linear-gradient(145deg, rgba(27, 70, 104, 0.28), transparent 46%),
    var(--panel-strong);
}

.commercial-command-head,
.commercial-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.commercial-command-head h2 {
  margin-top: 4px;
  font-size: clamp(1.5rem, 2vw, 2.1rem);
  letter-spacing: -0.04em;
}

.commercial-command-head .hero-text {
  margin-top: 4px;
  font-size: 0.84rem;
}

.commercial-period-chip {
  min-width: 200px;
  padding: 9px 12px;
  border: 1px solid rgba(116, 212, 255, 0.14);
  border-radius: 14px;
  background: rgba(5, 17, 29, 0.7);
}

.commercial-period-chip span,
.commercial-period-chip strong {
  display: block;
}

.commercial-period-chip span {
  color: var(--muted);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.commercial-period-chip strong {
  margin-top: 4px;
  color: var(--text);
  font-size: 0.78rem;
}

.commercial-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.commercial-kpi {
  min-width: 0;
  padding: 11px 13px;
  border: 1px solid rgba(116, 212, 255, 0.1);
  border-radius: 15px;
  background: rgba(5, 17, 29, 0.74);
}

.commercial-kpi.is-primary {
  border-color: rgba(34, 211, 238, 0.28);
  background: linear-gradient(135deg, rgba(20, 96, 130, 0.45), rgba(5, 17, 29, 0.78));
}

.commercial-kpi span,
.commercial-kpi small {
  display: block;
}

.commercial-kpi span {
  color: #7edfff;
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.commercial-kpi strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: clamp(1.05rem, 1.5vw, 1.45rem);
  line-height: 1.1;
}

.commercial-kpi small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.68rem;
}

.commercial-decision-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.commercial-performance-card,
.commercial-actions-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(116, 212, 255, 0.1);
  border-radius: 17px;
  background: rgba(5, 16, 28, 0.72);
}

.commercial-actions-card {
  grid-column: 1 / -1;
}

.commercial-card-head {
  align-items: center;
  margin-bottom: 8px;
}

.commercial-card-head h3 {
  margin-top: 4px;
  color: var(--text);
  font-size: 1rem;
}

.commercial-card-head > strong {
  flex-shrink: 0;
  color: #9fe8ff;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
}

.commercial-table {
  overflow: hidden;
  border: 1px solid rgba(116, 212, 255, 0.08);
  border-radius: 12px;
}

.commercial-table-head,
.commercial-table-row {
  display: grid;
  grid-template-columns: minmax(105px, 1.5fr) minmax(82px, 1fr) 48px minmax(62px, 0.75fr);
  gap: 8px;
  align-items: center;
}

.commercial-table-head {
  padding: 8px 11px;
  color: #7194bd;
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.commercial-table-body {
  display: grid;
}

.commercial-table-row {
  min-height: 42px;
  padding: 6px 9px;
  border-top: 1px solid rgba(116, 212, 255, 0.07);
}

.commercial-table-row > span {
  color: var(--text);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.69rem;
  text-align: right;
}

.commercial-entity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.commercial-entity b {
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: rgba(34, 211, 238, 0.1);
  color: #72ddff;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.65rem;
}

.commercial-entity strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 0.73rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.commercial-share {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.commercial-share > strong {
  color: #9fe8ff;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.64rem;
  text-align: right;
}

.commercial-share > div {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.commercial-share > div span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22d3ee, #8b5cf6);
}

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

.commercial-decision-card {
  position: relative;
  min-width: 0;
  min-height: 118px;
  display: flex;
  flex-direction: column;
  padding: 12px;
  overflow: hidden;
  border: 1px solid rgba(116, 212, 255, 0.1);
  border-radius: 14px;
  background: rgba(9, 24, 39, 0.72);
}

.commercial-decision-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: #38bdf8;
}

.commercial-decision-card.warning::before { background: #fbbf24; }
.commercial-decision-card.danger::before { background: #fb7185; }
.commercial-decision-card.success::before { background: #a3e635; }
.commercial-decision-card.opportunity::before { background: #c084fc; }

.commercial-decision-card > span {
  color: #7edfff;
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.commercial-decision-card > strong {
  margin-top: 5px;
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1.35;
}

.commercial-decision-card > b {
  margin-top: 4px;
  color: #d7ff7c;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
}

.commercial-decision-card > p {
  margin-top: auto;
  padding-top: 7px;
  color: var(--muted);
  font-size: 0.69rem;
  line-height: 1.5;
}

.commercial-empty {
  padding: 22px;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 18px;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.primary-button {
  color: #0b1017;
  background: linear-gradient(135deg, var(--lime), var(--gold));
  box-shadow: 0 16px 34px rgba(196, 255, 77, 0.18);
}

.ghost-button {
  border: 1px solid rgba(116, 212, 255, 0.18);
  background: rgba(8, 20, 34, 0.78);
  color: var(--text);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
}

.hero-board,
.kpi-strip,
.dashboard-grid,
.section-block,
.sql-layout {
  display: grid;
  gap: 18px;
}

.brand-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  margin-top: auto;
  padding-top: 12px;
}

.hero-credit {
  align-self: end;
  margin-top: auto;
}

.hero-chart-card,
.sector-shell {
  border: 1px solid rgba(116, 212, 255, 0.12);
  border-radius: 22px;
  background: rgba(6, 17, 29, 0.72);
  padding: 18px;
  align-self: stretch;
}

.mini-card-head {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.mini-card-head strong {
  font-size: 0.98rem;
  line-height: 1.35;
  font-weight: 600;
  color: var(--text);
}

.hero-card-note {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.hero-sales-table {
  display: grid;
  gap: 8px;
  min-height: auto;
}

.hero-sales-table-head,
.hero-sales-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 92px) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.hero-sales-bar-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.hero-sales-table-head {
  padding: 0 2px;
  color: #8eb2ea;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: "JetBrains Mono", monospace;
}

.hero-sales-table-body {
  display: grid;
  gap: 6px;
  grid-template-rows: repeat(6, minmax(0, 1fr));
}

.hero-sales-row {
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(10, 24, 39, 0.68);
  border:  1px solid rgba(116, 212, 255, 0.08);
}

.hero-sales-row span,
.hero-sales-row strong {
  min-width: 0;
  font-family: "JetBrains Mono", monospace;
}

.hero-sales-row span:first-child {
  color: #9cc7ff;
  font-size: 0.68rem;
  line-height: 1.25;
}

.hero-sales-row strong {
  color: var(--text);
  font-size: 0.68rem;
  font-weight: 600;
}

.hero-heat-track {
  display: block;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.hero-heat-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.hero-heat-fill.is-cold {
  background: linear-gradient(90deg, #7dd3fc 0%, #2563eb 100%);
}

.hero-heat-fill.is-warm {
  background: linear-gradient(90deg, #7dd3fc 0%, #d8ff7b 100%);
}

.hero-heat-fill.is-hot {
  background: linear-gradient(90deg, #ffc857 0%, #fb7185 100%);
}

.hero-mini-list {
  display: grid;
  gap: 8px;
  max-height: 290px;
  overflow-y: auto;
}

.hero-mini-list-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(10, 24, 39, 0.68);
  border:  1px solid rgba(116, 212, 255, 0.08);
}

.hero-mini-list b {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #08111c;
  background: linear-gradient(135deg, var(--lime), var(--gold));
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
}

.hero-mini-list-copy {
  display: grid;
  gap: 4px;
}

.hero-mini-list span {
  color: var(--text);
  font-size: 0.8rem;
  line-height: 1.3;
  font-weight: 500;
}

.hero-mini-list small {
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.3;
}

.hero-mini-value-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.hero-rank-pct {
  color: #9fe8ff;
  font-size: 0.62rem;
  font-family: "JetBrains Mono", monospace;
  white-space: nowrap;
  flex-shrink: 0;
}

.hero-logo {
  width: 132px;
  max-width: 100%;
  opacity: 1;
}

.brand-credit {
  color: #8eb2ea;
  font-size: 0.58rem;
  font-style: italic;
  opacity: 0.62;
  text-align: center;
  margin-top: -3px;
}

.kpi-card span,
.slicer small {
  color: var(--muted);
}

.toolbar {
  display: grid;
  gap: 18px;
}

#filtros {
  gap: 12px;
  padding: 18px;
}

#filtros .toolbar-head h3 {
  font-size: 1.08rem;
}

#filtros .form-grid {
  gap: 8px;
}

#filtros .slicer {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

#filtros .slicer input,
#filtros .slicer select {
  min-height: 38px;
  margin-top: 5px;
  padding: 0 11px;
  border-radius: 9px;
}

#filtros .filter-multi-control {
  min-height: 38px;
  margin-top: 5px;
  padding: 4px 8px;
  border-radius: 9px;
}

#filtros .filter-multi-input {
  min-height: 26px;
  margin: 0;
}

#filtros .action-row {
  gap: 8px;
}

#filtros .primary-button,
#filtros .ghost-button {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 10px;
}

#filtros .inline-status {
  font-size: 0.78rem;
}

.toolbar-head,
.card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.toolbar-head h3,
.section-heading h3,
.chart-card h4,
.sql-card h4 {
  font-size: 1.28rem;
  letter-spacing: -0.02em;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(116, 212, 255, 0.09);
  border: 1px solid rgba(116, 212, 255, 0.18);
  color: var(--cyan);
  font-size: 0.76rem;
}

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

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

.slicer,
.executive-kpi,
.department-card {
  padding: 16px;
  border-radius: 18px;
  background: rgba(10, 24, 39, 0.84);
  border:  1px solid rgba(116, 212, 255, 0.08);
}

.slicer strong {
  display: block;
  margin-top: 8px;
  font-size: 0.98rem;
  line-height: 1.45;
}

.slicer input,
.slicer select {
  width: 100%;
  margin-top: 10px;
  min-height: 46px;
  border-radius: 14px;
  border:  1px solid rgba(116, 212, 255, 0.14);
  background: rgba(7, 16, 27, 0.82);
  color: var(--text);
  padding: 0 14px;
  outline: none;
}

.slicer input:focus,
.slicer select:focus {
  border-color: rgba(196, 255, 77, 0.3);
  box-shadow: 0 0 0 3px rgba(196, 255, 77, 0.08);
}

.slicer input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(1.8);
  opacity: 1;
  cursor: pointer;
}

.section-heading p:last-child {
  margin-top: 10px;
  max-width: 780px;
}

.kpi-strip {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.sector-shell {
  padding: 22px 24px;
}

.kpi-card strong {
  display: block;
  margin: 10px 0 8px;
  font-size: clamp(1.35rem, 1.9vw, 1.8rem);
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.dashboard-grid-pro {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.dashboard-grid-pro > article {
  grid-column: span 4;
}

.dashboard-grid-pro > .dashboard-hero-card {
  grid-column: span 8;
}

.chart-card,
.sql-card {
  display: grid;
  gap: 18px;
  align-content: start;
  align-items: start;
}

.chart-highlight {
  color: var(--gold);
  font-size: 1.1rem;
}

.executive-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.executive-kpi small {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
}

.attendance-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.8fr);
  gap: 18px;
  padding: 24px;
}

.attendance-visual-card,
.attendance-insight-card {
  min-width: 0;
}

.attendance-line-chart {
  min-height: 300px;
  display: grid;
  align-content: start;
}

.attendance-line-chart svg {
  width: 100%;
  height: auto;
  display: block;
}

.attendance-guides line {
  stroke: rgba(146, 214, 207, 0.18);
  stroke-dasharray: 5 5;
}

.attendance-guides text,
.attendance-labels text {
  fill: #a9c5e8;
  font-size: 12px;
}

.attendance-area {
  fill: rgba(68, 255, 240, 0.12);
  stroke: none;
}

.attendance-path {
  fill: none;
  stroke: #55f7ef;
  stroke-width: 3;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.attendance-dots circle {
  fill: #ffffff;
  stroke: #55f7ef;
  stroke-width: 3;
}

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

.attendance-stats div {
  display: grid;
  gap: 5px;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid rgba(85, 247, 239, 0.14);
  background: rgba(17, 61, 61, 0.48);
}

.attendance-stats span,
.attendance-callout span {
  color: #92d6cf;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.attendance-stats strong {
  font-size: 1.35rem;
}

.attendance-stats b {
  color: #ccf6f0;
  font-size: 0.86rem;
}

.attendance-callout {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid rgba(85, 247, 239, 0.18);
  background: linear-gradient(135deg, rgba(29, 103, 99, 0.72), rgba(9, 35, 42, 0.92));
}

.attendance-callout strong {
  font-size: 1.08rem;
  line-height: 1.35;
}

.attendance-callout.queda {
  border-color: rgba(251, 188, 96, 0.28);
}

.attendance-callout.alta {
  border-color: rgba(85, 247, 139, 0.28);
}

.attendance-mini-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(146, 214, 207, 0.16);
}

.attendance-mini-row span {
  color: #92d6cf;
}

.attendance-mini-row strong {
  text-align: right;
}

.attendance-insight-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.attendance-insight-list div {
  padding: 12px 14px;
  border-left: 4px solid #55f7ef;
  background: rgba(17, 61, 61, 0.48);
  color: #d8f8f4;
  font-size: 0.9rem;
}

.exploded-bars,
.hourly-bars {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 14px;
  min-height: 230px;
  align-items: end;
}

.exploded-bar,
.hourly-bars div {
  display: grid;
  justify-items: center;
  gap: 12px;
}

.exploded-bar span,
.hourly-bars span {
  width: 100%;
  min-height: 36px;
  border-radius: 18px 18px 6px 6px;
  background: linear-gradient(180deg, #d8ff7b 0%, #7dd3fc 48%, #2563eb 100%);
  box-shadow: 0 18px 30px rgba(37, 99, 235, 0.18);
}

.exploded-bar:nth-child(2) span,
.hourly-bars div:nth-child(2) span {
  transform: translateY(-6px);
}

.exploded-bar:nth-child(4) span,
.hourly-bars div:nth-child(4) span {
  transform: translateY(-10px);
}

.exploded-bar:nth-child(6) span,
.hourly-bars div:nth-child(6) span {
  transform: translateY(-18px);
}

.exploded-bar small,
.hourly-bars small {
  color: var(--muted);
}

.ranking-list,
.matrix-table {
  display: grid;
  gap: 12px;
}

.ranking-list div,
.matrix-row {
  display: grid;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(10, 24, 39, 0.88);
  border: 1px solid rgba(20, 86, 168, 0.12);
}

.ranking-list div {
  grid-template-columns: 36px minmax(0, 1fr) auto;
}

.ranking-list b {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #08111c;
  background: linear-gradient(135deg, var(--lime), var(--gold));
}

.ranking-list label {
  color: var(--text);
  font-size: 0.95rem;
}

.ranking-list span {
  color: var(--cyan);
  font-size: 0.88rem;
  font-weight: 700;
}

.progress-list {
  display: grid;
  gap: 14px;
  align-self: start;
}

.progress-list div {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr) 92px;
  gap: 12px;
  align-items: center;
}

.progress-list label {
  color: var(--text);
  font-size: 0.92rem;
}

.progress-list span {
  color: var(--cyan);
  font-size: 0.82rem;
  text-align: right;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.inline-status {
  color: var(--muted);
  font-size: 0.9rem;
}

.inline-status[data-tone="ok"] {
  color: var(--lime);
}

.inline-status[data-tone="warn"] {
  color: var(--gold);
}

.inline-status[data-tone="loading"] {
  color: var(--cyan);
}

.status-pill[data-state="ok"],
#sidebarStatus[data-state="ok"] {
  display: none;
}

.status-pill[data-state="warn"] {
  color: var(--gold);
  border-color: rgba(255, 200, 87, 0.24);
}

.bars-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(48px, 1fr));
  gap: 12px;
  min-height: 260px;
  align-items: end;
}

.bar-item {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.bar-item span {
  width: 100%;
  min-height: 24px;
  border-radius: 16px 16px 6px 6px;
  background: linear-gradient(180deg, #d8ff7b 0%, #7dd3fc 48%, #2563eb 100%);
  box-shadow: 0 18px 30px rgba(37, 99, 235, 0.18);
}

.bar-item small {
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
}

.empty-card {
  padding: 16px;
  border-radius: 16px;
  background: rgba(10, 24, 39, 0.88);
  border: 1px solid rgba(20, 86, 168, 0.12);
  color: var(--muted);
}

.prog-track {
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.22);
}

.prog-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue) 0%, #a78bfa 55%, var(--pink) 100%);
  border-radius: 999px;
  transition: width 0.35s ease;
}

[data-theme="light"] .prog-track {
  background: rgba(0, 40, 100, 0.09);
  box-shadow: inset 0 1px 3px rgba(0, 40, 100, 0.14);
}

[data-theme="light"] .prog-fill {
  background: linear-gradient(90deg, var(--blue) 0%, #7c3aed 55%, var(--pink) 100%);
}

.pie-panel {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.pie-chart-strong {
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(8, 17, 28, 0.96) 31%, transparent 32%),
    conic-gradient(
      #c4ff4d 0 29%,
      #74d4ff 29% 52%,
      #ffc857 52% 70%,
      #fb7185 70% 86%,
      #4f7dff 86% 100%
    );
  box-shadow: inset 0 0 0 16px rgba(255, 255, 255, 0.02);
}

.legend-list {
  display: grid;
  gap: 10px;
  color: var(--muted);
}

.legend-tight {
  gap: 12px;
}

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
}

.dot-lime {
  background: var(--lime);
}

.dot-cyan {
  background: var(--cyan);
}

.dot-gold {
  background: var(--gold);
}

.dot-pink {
  background: var(--pink);
}

.dot-blue {
  background: var(--blue);
}

.matrix-row {
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  color: #dcebff;
  font-size: 0.84rem;
}

.matrix-row.head {
  color: var(--cyan);
  background: rgba(116, 212, 255, 0.08);
}

.sql-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sql-layout .wide {
  grid-column: span 2;
}

pre {
  overflow-x: auto;
  padding: 18px;
  border-radius: 20px;
  background: rgba(6, 17, 29, 0.92);
  border: 1px solid rgba(20, 86, 168, 0.12);
  color: #dce9ff;
  line-height: 1.6;
}

@media (max-width: 1280px) {
  .toolbar-grid,
  .kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .sidebar {
    position: relative;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(116, 212, 255, 0.12);
  }
}

@media (max-width: 980px) {
  .main-content,
  .sidebar {
    padding: 20px;
  }

  .hero,
  .commercial-hero,
  .executive-strip,
  .toolbar-grid,
  .form-grid,
  .sql-layout,
  .kpi-strip {
    grid-template-columns: 1fr;
  }

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

  .finance-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-grid-pro > article,
  .dashboard-grid-pro > .dashboard-hero-card,
  .sql-layout .wide {
    grid-column: auto;
  }

  .products-filter-panel,
  .stock-filter-grid,
  .products-grid,
  .products-ranking-grid,
  .classification-decision-grid,
  .decision-rule-grid,
  .classification-ranking-grid,
  .attendance-dashboard,
  .attendance-stats {
    grid-template-columns: 1fr;
  }

  .decision-wide {
    grid-column: auto;
  }

  .commercial-hero-grid {
    grid-template-columns: 1fr;
  }

  .commercial-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .commercial-decision-layout {
    grid-template-columns: 1fr;
  }

  .commercial-actions-card {
    grid-column: auto;
  }

  .commercial-decision-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .commercial-spotlight {
    grid-template-columns: 1fr;
    flex: none;
    grid-auto-rows: auto;
    max-height: 520px;
    overflow-y: auto;
  }

  .hero-copy h2 {
    font-size: 2.3rem;
  }
}

@media (max-width: 640px) {
  .sidebar-logo-slot {
    padding-top: 34px;
  }

  .commercial-command {
    padding: 16px;
  }

  .commercial-command-head {
    display: grid;
  }

  .commercial-period-chip {
    min-width: 0;
  }

  .commercial-kpi-grid,
  .commercial-decision-grid {
    grid-template-columns: 1fr;
  }

  .commercial-table {
    overflow: hidden;
  }

  .commercial-table-head {
    display: none;
  }

  .commercial-table-row {
    min-width: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 8px;
    padding: 12px;
  }

  .commercial-entity {
    grid-column: 1 / -1;
  }

  .commercial-table-row > span {
    text-align: left;
  }

  .commercial-table-row > span::before,
  .commercial-share::before {
    display: block;
    margin-bottom: 4px;
    color: #7194bd;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .commercial-table-row > span:nth-child(2)::before {
    content: "Venda";
  }

  .commercial-table-row > span:nth-child(3)::before {
    content: "Quantidade";
  }

  .commercial-share::before {
    content: "Participação";
  }

  .commercial-share > strong {
    text-align: left;
  }

  .panel,
  .brand-panel,
  .sidebar-card {
    border-radius: 22px;
  }

  .hero-copy h2 {
    font-size: 1.9rem;
  }

  .sidebar-floating-logo,
  .brand-logo {
    width: 120px;
  }

  .brand-logo,
  .hero-logo {
    width: 120px;
  }

  .theme-toggle {
    top: 8px;
    right: 8px;
    min-width: 124px;
    height: 34px;
    padding: 3px;
    font-size: 0.68rem;
  }

  .primary-button,
  .ghost-button {
    width: 100%;
  }

  .action-row {
    align-items: stretch;
  }

  .progress-list div,
  .matrix-row,
  .ranking-list div {
    grid-template-columns: 1fr;
  }

  .bank-extract-row {
    grid-template-columns: 1fr;
  }

  .hourly-bars,
  .exploded-bars {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ============================================================
   MODO CLARO â€” paleta Branco + Marinho
   ============================================================ */

/* Sidebar permanece marinho para o logo branco continuar visÃ­vel */
[data-theme="light"] .sidebar {
  background: linear-gradient(180deg, #002a5c 0%, #001840 100%);
  border-right-color: rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .sidebar .nav-group-title {
  color: rgba(180, 210, 255, 0.55);
}

[data-theme="light"] .sidebar .side-nav a,
[data-theme="light"] .sidebar .nav-cluster-toggle {
  color: rgba(180, 210, 255, 0.85);
}

[data-theme="light"] .sidebar .side-nav a:hover,
[data-theme="light"] .sidebar .side-nav a.is-current,
[data-theme="light"] .sidebar .nav-cluster-toggle:hover,
[data-theme="light"] .sidebar .nav-cluster.is-open .nav-cluster-toggle {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: inset 3px 0 0 #74d4ff;
}

[data-theme="light"] .sidebar .sub-nav a { color: rgba(180, 210, 255, 0.75); }
[data-theme="light"] .sidebar .sub-nav a:hover,
[data-theme="light"] .sidebar .sub-nav a.is-current {
  color: #ffffff;
  box-shadow: inset 2px 0 0 #74d4ff;
}

[data-theme="light"] .sidebar .nav-icon {
  background: rgba(255, 255, 255, 0.08);
  color: #74d4ff;
}

[data-theme="light"] .sidebar .filter-chip {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.14);
  color: rgba(200, 225, 255, 0.88);
}

[data-theme="light"] .sidebar .filter-chip:hover,
[data-theme="light"] .sidebar .filter-chip.active {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
  color: #ffffff;
}

[data-theme="light"] .sidebar .brand-panel,
[data-theme="light"] .sidebar .sidebar-card {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

[data-theme="light"] .sidebar .brand-panel h1,
[data-theme="light"] .sidebar .mini-card strong,
[data-theme="light"] .sidebar .contact-card a {
  color: rgba(220, 235, 255, 0.92);
}

[data-theme="light"] .sidebar .brand-copy,
[data-theme="light"] .sidebar .mini-card p,
[data-theme="light"] .sidebar .contact-card a:last-of-type {
  color: rgba(160, 195, 235, 0.72);
}

[data-theme="light"] .sidebar .sidebar-logo-credit { color: rgba(160, 195, 235, 0.55); }

[data-theme="light"] .sidebar .nav-chevron {
  border-color: rgba(180, 210, 255, 0.6);
}

/* ConteÃºdo principal â€” painÃ©is/cards ficam brancos */
[data-theme="light"] .panel::after,
[data-theme="light"] .brand-panel::after,
[data-theme="light"] .sidebar-card::after {
  border-color: rgba(0, 40, 100, 0.05);
}

/* Labels e eyebrows: marinho ao invÃ©s de ciano */
[data-theme="light"] .eyebrow,
[data-theme="light"] .label {
  color: #1456a8;
}

/* BotÃµes */
[data-theme="light"] .primary-button {
  background: #003580;
  border-color: #003580;
  color: #ffffff;
}
[data-theme="light"] .primary-button:hover { background: #00297a; }

[data-theme="light"] .ghost-button {
  background: #ffffff;
  border-color: rgba(0, 53, 128, 0.28);
  color: #003580;
  font-weight: 800;
}
[data-theme="light"] .ghost-button:hover {
  background: #eaf2ff;
  border-color: rgba(0, 53, 128, 0.42);
}

/* Slicer / inputs no conteÃºdo */
[data-theme="light"] .slicer input,
[data-theme="light"] .slicer select,
[data-theme="light"] input[type="text"],
[data-theme="light"] input[type="date"],
[data-theme="light"] input[type="number"],
[data-theme="light"] select {
  background: #ffffff;
  border-color: rgba(0, 40, 100, 0.18);
  color: #0d2040;
}

[data-theme="light"] .slicer input[type="date"]::-webkit-calendar-picker-indicator,
[data-theme="light"] input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(18%) sepia(46%) saturate(1970%) hue-rotate(190deg) brightness(88%) contrast(96%);
  opacity: 1;
}

[data-theme="light"] #filtros {
  background: #ffffff;
  border-color: rgba(18, 67, 125, 0.14);
  box-shadow: 0 8px 24px rgba(24, 65, 110, 0.06);
}

[data-theme="light"] #filtros .slicer {
  background: transparent;
  border: 0;
}

[data-theme="light"] #filtros .slicer input,
[data-theme="light"] #filtros .slicer select,
[data-theme="light"] #filtros .filter-multi-control {
  background: #f7f9fc;
  border-color: #cdd8e6;
  color: #10264a;
}

[data-theme="light"] #filtros .filter-multi-input::placeholder,
[data-theme="light"] #filtros input::placeholder {
  color: #71839b;
}

[data-theme="light"] .commercial-command {
  background: #ffffff;
  border-color: rgba(18, 67, 125, 0.14);
  box-shadow: 0 8px 24px rgba(24, 65, 110, 0.06);
}

[data-theme="light"] .commercial-period-chip,
[data-theme="light"] .commercial-kpi,
[data-theme="light"] .commercial-performance-card,
[data-theme="light"] .commercial-actions-card,
[data-theme="light"] .commercial-decision-card {
  background: #f7f9fc;
  border-color: #d8e1ec;
}

[data-theme="light"] .commercial-kpi.is-primary {
  background: #edf7fb;
  border-color: #9fd7e5;
}

[data-theme="light"] .commercial-command-head h2,
[data-theme="light"] .commercial-period-chip strong,
[data-theme="light"] .commercial-kpi strong,
[data-theme="light"] .commercial-card-head h3,
[data-theme="light"] .commercial-entity strong,
[data-theme="light"] .commercial-table-row > span,
[data-theme="light"] .commercial-decision-card > strong {
  color: #10264a;
}

[data-theme="light"] .commercial-period-chip span,
[data-theme="light"] .commercial-kpi small,
[data-theme="light"] .commercial-decision-card > p {
  color: #5d7088;
}

[data-theme="light"] .commercial-kpi span,
[data-theme="light"] .commercial-card-head > strong,
[data-theme="light"] .commercial-share > strong,
[data-theme="light"] .commercial-decision-card > span {
  color: #0b6b91;
}

[data-theme="light"] .commercial-decision-card > b {
  color: #536f00;
}

[data-theme="light"] .commercial-table,
[data-theme="light"] .commercial-table-row {
  border-color: #dce4ee;
}

[data-theme="light"] .commercial-table-head {
  background: #eef3f8;
  color: #58708c;
}

[data-theme="light"] .commercial-entity b {
  background: #e3f3f8;
  color: #0b6b91;
}

[data-theme="light"] .commercial-share > div {
  background: #dce5ef;
}

/* ---- Seletor de tema ---- */
.theme-toggle {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 9999;
  width: auto;
  min-width: 142px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  gap: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
  padding: 4px;
}

.theme-toggle:hover {
  border-color: var(--cyan);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}

.theme-toggle-option {
  display: grid;
  place-items: center;
  min-height: 30px;
  border-radius: 999px;
  color: var(--muted);
  letter-spacing: 0;
}

.theme-toggle-option.active {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #ffffff;
}

[data-theme="light"] .theme-toggle {
  background: #ffffff;
  border-color: rgba(0, 40, 100, 0.14);
  color: #0d2040;
  box-shadow: 0 2px 10px rgba(0, 53, 128, 0.2);
}

[data-theme="light"] .theme-toggle:hover {
  background: #ffffff;
  box-shadow: 0 2px 14px rgba(0, 53, 128, 0.35);
}

[data-theme="light"] .theme-toggle-option.active {
  background: #003580;
  color: #ffffff;
}



/* Light mode: fundos dos módulos mais claros */
[data-theme="light"] .commercial-panel,
[data-theme="light"] .hero-chart-card,
[data-theme="light"] .sector-shell,
[data-theme="light"] .slicer,
[data-theme="light"] .executive-kpi,
[data-theme="light"] .department-card {
  background: #eef4fb;
  border-color: rgba(20, 86, 168, 0.12);
}

[data-theme="light"] .hero-sales-row,
[data-theme="light"] .hero-mini-list-item {
  background: #e8f0f8;
  border-color: rgba(20, 86, 168, 0.12);
}

[data-theme="light"] .commercial-rank-top strong,
[data-theme="light"] .hero-mini-list span,
[data-theme="light"] .ranking-list label,
[data-theme="light"] .progress-list label,
[data-theme="light"] .matrix-row span {
  color: #10264a;
}

[data-theme="light"] .commercial-rank-top span,
[data-theme="light"] .ranking-list span,
[data-theme="light"] .progress-list span,
[data-theme="light"] .chart-highlight,
[data-theme="light"] .hero-rank-pct {
  color: #003580;
}

[data-theme="light"] .commercial-rank-bar {
  background: #dce8f6;
}

[data-theme="light"] .commercial-rank-bar span {
  background: linear-gradient(90deg, #0ea5e9 0%, #6366f1 60%, #9333ea 100%);
  box-shadow: 0 0 5px rgba(99, 102, 241, 0.25);
}

[data-theme="light"] .commercial-panel {
  background: rgba(240, 247, 255, 0.9);
  border-color: rgba(20, 86, 168, 0.14);
}

[data-theme="light"] .ranking-list div,
[data-theme="light"] .matrix-row,
[data-theme="light"] .classification-list article {
  background: #f4f8fd;
  border-color: rgba(20, 86, 168, 0.16);
  color: #10264a;
}

[data-theme="light"] .ranking-list b,
[data-theme="light"] .classification-list b {
  color: #ffffff;
  background: linear-gradient(135deg, #0f6b3d, #0b4fa3);
}

[data-theme="light"] .classification-decision-card {
  background: #f4f8fd;
  border-color: rgba(20, 86, 168, 0.16);
}

[data-theme="light"] .decision-rule,
[data-theme="light"] .decision-row {
  background: #f4f8fd;
  border-color: rgba(20, 86, 168, 0.16);
}

[data-theme="light"] .classification-decision-card span,
[data-theme="light"] .classification-ranking-grid h5,
[data-theme="light"] .classification-list span {
  color: #003580;
}

[data-theme="light"] .classification-decision-card strong,
[data-theme="light"] .classification-list strong {
  color: #10264a;
}

[data-theme="light"] .classification-decision-card b {
  color: #8a5a00;
}

[data-theme="light"] .classification-decision-card small,
[data-theme="light"] .classification-list small {
  color: #426487;
}

[data-theme="light"] .kpi-card span,
[data-theme="light"] .kpi-card small,
[data-theme="light"] .slicer small,
[data-theme="light"] .section-heading p,
[data-theme="light"] .hero-text {
  color: #426487;
}

[data-theme="light"] .kpi-card strong {
  color: #081a36;
}

[data-theme="light"] .inline-status {
  color: #9a5a00;
  font-weight: 700;
}

[data-theme="light"] .status-pill {
  background: #eaf2ff;
  border-color: rgba(0, 53, 128, 0.18);
  color: #003580;
}

[data-theme="light"] .attendance-stats div,
[data-theme="light"] .attendance-insight-list div,
[data-theme="light"] .attendance-callout {
  background: #e8f5f7;
  border-color: rgba(20, 86, 168, 0.14);
  color: #0d2040;
}

[data-theme="light"] .attendance-stats b,
[data-theme="light"] .attendance-insight-list div {
  color: #0d2040;
}

[data-theme="light"] .attendance-mini-row span,
[data-theme="light"] .attendance-stats span,
[data-theme="light"] .attendance-callout span {
  color: #1456a8;
}

/* ── Stock alert cards — light mode ── */
[data-theme="light"] .stock-alert-item {
  background: #f0f4fa;
  border-color: rgba(20, 86, 168, 0.14);
}

[data-theme="light"] .stock-alert-head strong {
  color: #0d1d35;
}

[data-theme="light"] .stock-alert-metrics span,
[data-theme="light"] .decision-note {
  color: #3a5470;
}

[data-theme="light"] .stock-alert-pill.is-critical,
[data-theme="light"] .stock-alert-pill.is-warning {
  color: #7a3c00;
  background: rgba(180, 90, 0, 0.1);
  border-color: rgba(180, 90, 0, 0.22);
}

[data-theme="light"] .stock-alert-pill.is-watch {
  color: #003f80;
  background: rgba(0, 70, 160, 0.1);
  border-color: rgba(0, 70, 160, 0.2);
}

[data-theme="light"] .stock-alert-pill.is-good {
  color: #1a5200;
  background: rgba(30, 120, 0, 0.1);
  border-color: rgba(30, 120, 0, 0.2);
}
