* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --sidebar-desktop-width: 385px;
  --desktop-page-gutter: 24px;
  --bg-app: #f1f3f6;
  --surface-1: #ffffff;
  --surface-2: #f2f5f9;
  --surface-3: #e8edf4;
  --text-primary: #172033;
  --text-strong: #0b1220;
  --text-secondary: #475569;
  --text-soft: #64748b;
  --text-inverse: #ffffff;
  --border-subtle: rgba(15, 23, 42, 0.08);
  --border-medium: rgba(15, 23, 42, 0.12);
  --accent-primary: rgb(0, 85, 255);
  --accent-error: #d34d62;
  --shadow-lg: 0 10px 24px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 6px 18px rgba(58, 67, 86, 0.05);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-panel: 0 14px 34px rgba(15, 23, 42, 0.12);
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--text-primary);
  background: var(--bg-app);
}

html {
  overflow-y: auto;
  scrollbar-gutter: stable;
}

body {
  overflow-y: visible;
}

#root-anual,
#root2 {
  position: relative;
  min-height: 100vh;
}

a {
  color: var(--accent-primary);
}

button,
select,
input {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

select,
input {
  width: 100%;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border-medium);
  border-radius: 10px;
  background: #ffffff;
  color: var(--text-primary);
  box-shadow: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

select:focus,
input:focus,
button:focus-visible {
  outline: none;
  border-color: rgba(31, 124, 255, 0.52);
  box-shadow: 0 0 0 5px rgba(31, 124, 255, 0.14);
}

button {
  -webkit-tap-highlight-color: transparent;
}

@keyframes slideIn {
  from {
    transform: translateY(22px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes chartAddPulse {
  0% {
    opacity: 0;
    transform: translateY(12px);
    filter: saturate(1);
  }

  55% {
    opacity: 1;
    transform: translateY(0);
    filter: saturate(1.08);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
    filter: saturate(1);
  }
}

@keyframes chartRemoveSoft {
  from {
    opacity: 1;
    transform: translateY(0);
    max-height: 760px;
  }

  to {
    opacity: 0;
    transform: translateY(-10px);
    max-height: 0;
  }
}

.app-layout {
  display: block;
  min-height: 100vh;
  width: 100%;
  padding: 0;
}

.app-body {
  display: block;
}

.empty-state__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
  font-weight: 700;
}

.empty-state__eyebrow::before {
  content: "";
  width: 20px;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
}

h1,
.empty-state__title {
  margin: 0;
  font-family: "Manrope", "Segoe UI", sans-serif;
  letter-spacing: -0.03em;
}

h1 {
  margin-top: 6px;
  font-size: clamp(1.55rem, 1.8vw, 2.1rem);
  line-height: 1.1;
  color: var(--text-strong);
  max-width: none;
}

.subtitle {
  max-width: 80ch;
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-secondary);
}

.sidebar-anual {
  position: fixed;
  inset: var(--desktop-page-gutter) auto var(--desktop-page-gutter) var(--desktop-page-gutter);
  z-index: 20;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-desktop-width);
  height: calc(100vh - (var(--desktop-page-gutter) * 2));
  border: 0;
  border-radius: 18px;
  background: var(--surface-1);
  box-shadow: var(--shadow-panel);
  overflow: hidden;
}

.sidebar-anual__top {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 8px;
  padding: 12px 10px 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-title-block {
  padding: 2px 2px 4px;
}

.brand-heading {
  display: flex;
  align-items: center;
  gap: 5px;
}

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  color: var(--text-strong);
}

.brand-icon svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.brand-icon__bar {
  fill: none;
  stroke-width: 4.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-icon__bar--green {
  stroke: #009c3b;
}

.brand-icon__bar--yellow {
  stroke: #ffdf00;
}

.brand-icon__bar--blue {
  stroke: #1d4ed8;
}

.legal-access-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 34px;
  margin-top: 10px;
  padding: 0 10px;
  border: 1px solid var(--border-medium);
  border-radius: 10px;
  background: #ffffff;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.legal-access-btn:hover {
  background: var(--surface-2);
}

.sidebar-title-block h1 {
  margin: 0;
  min-width: 0;
  font-size: 1.28rem;
  line-height: 1.08;
}

.sidebar-title-block .subtitle {
  max-width: none;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.36;
}

.sidebar-anual__scroll {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 8px;
  height: auto;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 10px 14px;
}

.sidebar-panel {
  display: flex;
  flex-direction: column;
  padding: 10px;
  border-radius: 12px;
  gap: 8px;
  border: 0;
  background: var(--surface-2);
  box-shadow: none;
}

.sidebar-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sidebar-section-title {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-strong);
  font-weight: 700;
}

.sidebar-date-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.sidebar-date-field {
  display: flex;
  flex-direction: column;
}

.sidebar-date-field span {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-strong);
}

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

.view-toggle-btn {
  min-height: 32px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #ffffff;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.view-toggle-btn:hover {
  background: var(--surface-2);
}

.view-toggle-btn.ativo {
  background: var(--text-soft);
  color: var(--text-inverse);
}

.sidebar-action-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.share-view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 32px;
  border: 1px solid var(--border-medium);
  border-radius: 10px;
  background: #ffffff;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.share-view-btn:hover {
  background: var(--surface-2);
}

.share-view-btn.copiado {
  border-color: rgba(24, 165, 102, 0.28);
  background: rgba(24, 165, 102, 0.1);
  color: #11784c;
}

.share-copy-message {
  display: flex;
  align-items: center;
  min-height: 28px;
  padding: 7px 9px;
  border-radius: 10px;
  background: rgba(24, 165, 102, 0.1);
  color: #11784c;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}

.cat-label {
  display: flex;
  align-items: center;
  border: 0;
  border-radius: 10px;
  padding: 8px 10px;
  background: var(--surface-2);
  color: var(--text-strong);
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}

.sidebar-category {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.cat-label:hover {
  background: #e8edf4;
}

.cat-label:active {
  background: var(--surface-2);
  color: var(--text-strong);
}

.cat-label-text {
  flex: 1;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.cat-label-count {
  margin-left: 8px;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

.ind-grid-wrapper {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  contain: layout paint;
  will-change: grid-template-rows;
  transition: grid-template-rows 0.28s ease;
}

.ind-grid-wrapper.aberta {
  grid-template-rows: 1fr;
}

.ind-grid-inner {
  min-height: 0;
  overflow: hidden;
}

.ind-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 0 1px 8px;
}

.ind-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 9px;
  border: 0;
  border-radius: 9px;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}

.ind-btn:hover {
  background: var(--surface-2);
}

.ind-btn.ativo {
  background: #eef3f8;
  box-shadow: none;
}

.ind-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  box-shadow: none;
  flex-shrink: 0;
}

.ind-content {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.ind-label {
  flex: 1;
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text-strong);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
}

.ind-source-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 999px;
  border: 0;
  background: var(--surface-3);
  color: var(--text-primary);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.main-content-anual {
  width: calc(100% - var(--sidebar-desktop-width) - var(--desktop-page-gutter));
  margin-left: calc(var(--sidebar-desktop-width) + var(--desktop-page-gutter));
  padding: 24px 24px 0;
  min-width: 0;
  overflow: visible;
  border: 0;
  border-radius: 18px;
  box-shadow: none;
}

.dashboard-shell {
  display: flex;
  flex-direction: column;
  margin-bottom: 25px;
}

.empty-state__eyebrow {
  color: var(--text-soft);
}

.cards-wrapper {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding-bottom: 0;
  overflow: visible;
  margin-bottom: 15px;
}

.dashboard-shell:not(.dashboard-shell--has-visible-cards) .cards-wrapper {
  margin-bottom: 0;
}

.chart-card-shell {
  overflow: visible;
  padding: 3px;
  margin: -3px 0;
  scroll-margin-top: 16px;
}

.chart-card-shell--reordenando {
  position: relative;
  z-index: 2;
  transition: transform 0.34s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}

.chart-card-shell--entrada .chart-box {
  animation: chartAddPulse 0.58s ease both;
}

.chart-card-shell--saida {
  margin: -3px 0;
  pointer-events: none;
  overflow: hidden;
  animation: chartRemoveSoft 0.28s ease forwards;
}

.app-layout--compact .chart-title {
  font-size: 15px;
}

.app-layout--compact .chart-title__unit {
  max-width: 100%;
  min-height: 0;
  padding-block: 3px;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}

.empty-state {
  padding: 32px;
  border: 0;
  border-radius: 20px;
  background: var(--surface-2);
  text-align: left;
  box-shadow: none;
}

.empty-state__title {
  margin-top: 14px;
  max-width: 14ch;
  font-size: clamp(1.6rem, 1.7vw, 2rem);
  line-height: 1.1;
  color: var(--text-strong);
}

.empty-state__text {
  max-width: 58ch;
  margin: 14px 0 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.chart-box {
  display: flex;
  flex-direction: column;
  position: relative;
  padding: 12px;
  gap: 10px;
  border: 0;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--shadow-panel);
}

.chart-box--compact {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
}

.chart-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 104px;
}

.chart-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-strong);
}

.chart-title__left {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 7px;
  align-items: center;
  min-width: 0;
  flex: 1;
}

.chart-title__text {
  min-width: 0;
  font-family: "Manrope", "Segoe UI", sans-serif;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.chart-title__source {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.chart-title__unit {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--chart-accent-medium);
  color: var(--text-strong);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.chart-tooltip {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.2;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
}

.chart-tooltip__value {
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
}

.chart-tooltip__year {
  color: #ffffff;
}

.chart-card-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.chart-order-btn,
.chart-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.chart-order-btn:hover:not(:disabled) {
  color: var(--text-strong);
  background: #f3f6fa;
}

.chart-order-btn:disabled {
  color: rgba(105, 117, 134, 0.38);
  cursor: not-allowed;
}

.chart-close-btn:hover {
  color: var(--accent-error);
  background: #f3f6fa;
}

.chart-description {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

.chart-primary-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: #fafbfd;
}

.chart-box--compact .chart-primary-card {
  padding: 0;
  border: 0;
  background: transparent;
}

.chart-visual {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.chart-source-line {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.45;
}

.chart-source-line strong {
  color: var(--text-strong);
  font-weight: 800;
}

.chart-box--compact .chart-source-line {
  display: none;
}

.no-data {
  padding: 18px;
  border: 1px dashed var(--border-medium);
  border-radius: 14px;
  background: #fafbfd;
  color: var(--text-secondary);
  font-size: 13px;
}

.chart-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  border: 0;
}

.field-block {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: #fafbfd;
  color: var(--text-primary);
  font-size: 12px;
  line-height: 1.55;
}

.field-block--eventos_externos,
.field-block--fontes_links,
.chart-actions,
.extra-fields {
  grid-column: 1 / -1;
}

.field-label {
  display: block;
  margin-bottom: 4px;
  color: var(--text-strong);
  font-weight: 800;
}

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

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

.event-list__column {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.event-item {
  display: block;
  padding: 8px;
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--chart-accent-soft);
  border-radius: 9px;
  background: #ffffff;
}

.event-item__title {
  font-weight: 800;
  color: var(--text-strong);
}

.event-item__desc {
  margin: 4px 0 0;
  color: var(--text-primary);
  font-size: 12px;
  line-height: 1.55;
}

.sources-list {
  margin: 8px 0 0;
  padding-left: 20px;
}

.sources-list li+li {
  margin-top: 4px;
}

.chart-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.validation-ai-btn {
  margin-top: 10px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border-medium);
  border-radius: 9px;
  background: #ffffff;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.action-btn:hover {
  border-color: var(--border-medium);
  background: #fafbfd;
  box-shadow: var(--shadow-md);
}

.action-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.clear-selection-btn {
  width: 100%;
  justify-content: center;
}

.expand-btn__icon {
  transition: transform 0.2s ease;
}

.expand-btn__icon.rotated {
  transform: rotate(180deg);
}

.event-detail {
  position: relative;
  padding: 8px 34px 8px 8px;
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--chart-accent-soft);
  border-radius: 9px;
  background: #ffffff;
  box-shadow: none;
}

.event-detail__close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: transparent;
  color: var(--text-soft);
  font-size: 0;
  cursor: pointer;
}

.event-detail__close::before,
.toast-close::before {
  content: "x";
  font-size: 18px;
  line-height: 1;
}

.event-detail__title {
  font-weight: 800;
  color: var(--text-strong);
}

.event-detail__desc {
  margin-top: 4px;
  color: var(--text-primary);
  font-size: 12px;
  line-height: 1.55;
}

.validation-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10000;
  width: min(380px, calc(100vw - 32px));
  padding: 16px;
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  background: #ffffff;
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.35s ease;
}

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

.toast-header__left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(180deg, #22c97a, #159257);
}

.toast-close {
  border: none;
  background: transparent;
  color: var(--text-soft);
  font-size: 0;
  line-height: 1;
  cursor: pointer;
}

.toast-body {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: #fafbfd;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

.legal-disclaimer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: 12px;
  margin-bottom: 15px;
  gap: 10px;
  border: 0;
  border-radius: 12px;
  background: #ffffff;
  color: var(--text-secondary);
  font-size: 12.5px;
  line-height: 1.55;
  box-shadow: var(--shadow-panel);
}

.legal-disclaimer p {
  margin: 0;
  text-align: justify;
}

.legal-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(2, 6, 14, 0.56);
  backdrop-filter: blur(5px);
}

.legal-modal {
  display: flex;
  flex-direction: column;
  width: min(880px, 100%);
  max-height: min(780px, calc(100vh - 48px));
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  background: #ffffff;
  color: var(--text-primary);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.32);
  overflow: hidden;
}

.legal-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border-subtle);
  background: #fafbfd;
}

.legal-modal__eyebrow {
  display: block;
  margin-bottom: 4px;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.legal-modal h2 {
  margin: 0;
  color: var(--text-strong);
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.legal-modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border-medium);
  border-radius: 10px;
  background: #ffffff;
  color: var(--text-primary);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.legal-modal__body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 20px 20px;
  overflow-y: auto;
}

.legal-notice {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: #ffffff;
}

.legal-notice h3 {
  margin: 0 0 6px;
  color: var(--text-strong);
  font-size: 13px;
  line-height: 1.3;
}

.legal-notice p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.62;
}

.menu-btn-anual {
  display: none;
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1001;
  width: 52px;
  height: 52px;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  background: var(--text-strong);
  color: var(--text-inverse);
  box-shadow: var(--shadow-md);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.overlay-anual {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 14, 0.52);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 999;
}

.overlay-anual.visivel {
  opacity: 1;
  pointer-events: auto;
}

.sidebar-anual__scroll {
  scrollbar-width: thin;
  scrollbar-color: rgba(118, 137, 168, 0.55) transparent;
}

.sidebar-anual__scroll::-webkit-scrollbar {
  width: 8px;
}

.sidebar-anual__scroll::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-anual__scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(118, 137, 168, 0.55);
}

.sidebar-anual__scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(85, 106, 143, 0.75);
}

@media (max-width: 1024px) {
  :root {
    --sidebar-desktop-width: 330px;
    --desktop-page-gutter: 0px;
  }

  .app-layout {
    padding: 0;
  }

  .app-body {
    display: block;
  }

  .sidebar-anual {
    inset: 0 auto 0 0;
    width: var(--sidebar-desktop-width);
    height: 100vh;
    border-radius: 0;
  }

  .main-content-anual {
    width: calc(100% - var(--sidebar-desktop-width));
    margin-left: var(--sidebar-desktop-width);
    padding: 12px 12px 0;
  }
}

@media (max-width: 768px) {

  html,
  body {
    overflow-x: hidden;
  }

  html {
    overflow-y: auto;
    scrollbar-gutter: auto;
  }

  body {
    overflow-y: visible;
  }

  .app-layout {
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    padding: 0;
    gap: 10px;
  }

  .subtitle {
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  h1 {
    max-width: none;
    font-size: 1.55rem;
  }

  .subtitle {
    font-size: 12px;
    line-height: 1.42;
  }

  .app-body {
    min-height: auto;
    min-width: 0;
    max-width: 100%;
  }

  .sidebar-anual {
    position: fixed;
    top: 12px;
    bottom: 12px;
    left: 12px;
    align-self: auto;
    width: min(340px, calc(100vw - 24px));
    height: auto;
    border-radius: 18px;
    transform: translateX(calc(-100% - 16px));
    transition: transform 0.28s ease;
    z-index: 1000;
  }

  .sidebar-anual__scroll {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    overflow-y: auto;
    padding: 14px 12px 18px;
  }

  .sidebar-anual.aberto {
    transform: translateX(0);
  }

  .main-content-anual {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    padding: 15px 10px 0;
    border-radius: 16px;
  }

  .dashboard-shell {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: visible;
  }

  .sidebar-date-values {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cards-wrapper {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding-bottom: 16px;
    padding-inline: 4px;
    overflow: visible;
  }

  .chart-box {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 10px;
    border-radius: 12px;
  }

  .chart-title {
    font-size: 15px;
  }

  .chart-title__left {
    align-items: flex-start;
  }

  .chart-visual {
    border-radius: 0;
  }

  .chart-description,
  .chart-meta .field-block,
  .event-item__desc {
    text-align: left;
  }

  .chart-meta,
  .extra-fields,
  .event-list {
    grid-template-columns: 1fr;
  }

  .chart-actions {
    flex-direction: column;
  }

  .action-btn {
    width: 100%;
    justify-content: center;
  }

  .legal-disclaimer {
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    margin-left: 8px;
    margin-right: 8px;
  }

  .legal-modal-backdrop {
    align-items: stretch;
    padding: 12px;
  }

  .legal-modal {
    max-height: calc(100vh - 24px);
  }

  .legal-modal__header {
    padding: 15px 14px 12px;
  }

  .legal-modal__body {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px 14px 16px;
  }

  .empty-state {
    padding: 22px 18px;
    border-radius: 16px;
  }

  .empty-state__title {
    max-width: none;
    font-size: 1.8rem;
  }

  .menu-btn-anual {
    display: flex;
  }

  .validation-toast {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
  }
}