/* Escala global baseada em largura da viewport (afeta rem) */
:root {
  --app-scale: 1;
}

html {
  font-size: calc(16px * 1);
  font-size: calc(16px * var(--app-scale));
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #f5f5f5;
}

code {
  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
    monospace;
}

* {
  box-sizing: border-box;
}

#root {
  min-height: 100vh;
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
  width: 0.5rem;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 0.25rem;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Animações suaves */
.fade-in {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(0.625rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsividade: ajusta a escala global em telas menores */
@media (max-width: 1600px) {
  :root { --app-scale: 0.98; }
}
@media (max-width: 1440px) {
  :root { --app-scale: 0.95; }
}
@media (max-width: 1366px) {
  :root { --app-scale: 0.92; }
}
@media (max-width: 1280px) {
  :root { --app-scale: 0.90; }
}
@media (max-width: 1024px) {
  :root { --app-scale: 0.85; }
}
@media (max-width: 900px) {
  :root { --app-scale: 0.80; }
}
@media (max-width: 768px) {
  :root { --app-scale: 0.75; }
}

/* Overrides globais para react-data-grid (produção e dev)
   - Garante texto horizontal nos cabeçalhos
   - Evita compressão de colunas forçando largura mínima baseada no conteúdo */
.rdg-header-row .rdg-cell, .rdg-header-row .rdg-cell * {
  white-space: nowrap !important;
  writing-mode: horizontal-tb !important;
  -webkit-writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  transform: none !important;
}

.rdg {
  /* manter padrão; a largura da grid acompanha o container */
}
@layer rdg {
  @layer Defaults,
    FocusSink,
    CheckboxInput,
    CheckboxIcon,
    CheckboxLabel,
    Cell,
    HeaderCell,
    SummaryCell,
    EditCell,
    Row,
    HeaderRow,
    SummaryRow,
    GroupedRow,
    Root;
}

.mlln6zg7-0-0-beta-46 {
  @layer rdg.MeasuringCell {
    contain: strict;
    grid-row: 1;
    visibility: hidden;
  }
}


.cj343x07-0-0-beta-46 {
  @layer rdg.Cell {
    /* max-content does not work with size containment
     * dynamically switching between different containment styles incurs a heavy relayout penalty
     * Chromium bug: at odd zoom levels or subpixel positioning,
     * layout/paint/style containment can make cell borders disappear
     *   https://bugs.chromium.org/p/chromium/issues/detail?id=1326946
     */
    position: relative; /* needed for absolute positioning to work */
    padding-block: 0;
    padding-inline: 8px;
    -webkit-border-end: 1px solid var(--rdg-border-color);
            border-inline-end: 1px solid var(--rdg-border-color);
    -webkit-border-after: 1px solid var(--rdg-border-color);
            border-block-end: 1px solid var(--rdg-border-color);
    grid-row-start: var(--rdg-grid-row-start);
    align-content: center;
    background-color: inherit;

    white-space: nowrap;
    overflow: clip;
    text-overflow: ellipsis;
    outline: none;

    &[aria-selected='true'] {
      outline: 2px solid var(--rdg-selection-color);
      outline-offset: -2px;
    }
  }
}

.csofj7r7-0-0-beta-46 {
  @layer rdg.Cell {
    position: -webkit-sticky;
    position: sticky;
    /* Should have a higher value than 0 to show up above unfrozen cells */
    z-index: 1;

    /* Add box-shadow on the last frozen cell */
    &:nth-last-child(1 of &) {
      box-shadow: var(--rdg-cell-frozen-box-shadow);
    }
  }
}


.c1bn88vv7-0-0-beta-46 {
  @layer rdg.checkboxContainer {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    inset: 0;
  }
}

.c1qt073l7-0-0-beta-46 {
  @layer rdg.CheckboxInput {
    inline-size: 20px;
    block-size: 20px;

    &:focus-visible {
      outline: 2px solid var(--rdg-checkbox-focus-color);
      outline-offset: -3px;
    }

    &:enabled {
      cursor: pointer;
    }
  }
}


.g1s9ylgp7-0-0-beta-46 {
  @layer rdg.GroupCellContent {
    outline: none;
  }
}

.cz54e4y7-0-0-beta-46 {
  @layer rdg.GroupCellCaret {
    -webkit-margin-start: 4px;
            margin-inline-start: 4px;
    stroke: currentColor;
    stroke-width: 1.5px;
    fill: transparent;
    vertical-align: middle;

    > path {
      transition: d 0.1s;
    }
  }
}


.c1w9bbhr7-0-0-beta-46 {
  @layer rdg.DragHandle {
    --rdg-drag-handle-size: 8px;
    z-index: 0;
    cursor: move;
    inline-size: var(--rdg-drag-handle-size);
    block-size: var(--rdg-drag-handle-size);
    background-color: var(--rdg-selection-color);
    place-self: end;

    &:hover {
      --rdg-drag-handle-size: 16px;
      border: 2px solid var(--rdg-selection-color);
      background-color: var(--rdg-background-color);
    }
  }
}

.c1creorc7-0-0-beta-46 {
  @layer rdg.DragHandle {
    z-index: 1;
    position: -webkit-sticky;
    position: sticky;
  }
}


.cis5rrm7-0-0-beta-46 {
  @layer rdg.EditCell {
    padding: 0;
  }
}


.h44jtk67-0-0-beta-46 {
  @layer rdg.SortableHeaderCell {
    display: flex;
  }
}

.hcgkhxz7-0-0-beta-46 {
  @layer rdg.SortableHeaderCellName {
    flex-grow: 1;
    overflow: clip;
    text-overflow: ellipsis;
  }
}


.c6l2wv17-0-0-beta-46 {
  @layer rdg.HeaderCell {
    cursor: pointer;
  }
}

.c1kqdw7y7-0-0-beta-46 {
  @layer rdg.HeaderCell {
    touch-action: none;
  }
}

.r1y6ywlx7-0-0-beta-46 {
  @layer rdg.HeaderCell {
    cursor: col-resize;
    position: absolute;
    inset-block-start: 0;
    inset-inline-end: 0;
    inset-block-end: 0;
    inline-size: 10px;
  }
}

.c1bezg5o7-0-0-beta-46 {
  opacity: 0.5;
}

.c1vc96037-0-0-beta-46 {
  background-color: var(--rdg-header-draggable-background-color);
}


.r1upfr807-0-0-beta-46 {
  @layer rdg.Row {
    display: contents;
    background-color: var(--rdg-background-color);

    &:hover {
      background-color: var(--rdg-row-hover-background-color);
    }

    &[aria-selected='true'] {
      background-color: var(--rdg-row-selected-background-color);

      &:hover {
        background-color: var(--rdg-row-selected-hover-background-color);
      }
    }
  }
}

.r190mhd37-0-0-beta-46 {
  @layer rdg.FocusSink {
    outline: 2px solid var(--rdg-selection-color);
    outline-offset: -2px;
  }
}

.r139qu9m7-0-0-beta-46 {
  @layer rdg.FocusSink {
    &::before {
      content: '';
      display: inline-block;
      block-size: 100%;
      position: -webkit-sticky;
      position: sticky;
      inset-inline-start: 0;
      -webkit-border-start: 2px solid var(--rdg-selection-color);
              border-inline-start: 2px solid var(--rdg-selection-color);
    }
  }
}


.h10tskcx7-0-0-beta-46 {
  @layer rdg.HeaderRow {
    display: contents;
    background-color: var(--rdg-header-background-color);
    font-weight: bold;

    & > .cj343x07-0-0-beta-46 {
      /* Should have a higher value than 1 to show up above regular cells and the focus sink */
      z-index: 2;
      position: -webkit-sticky;
      position: sticky;
    }

    & > .csofj7r7-0-0-beta-46 {
      z-index: 3;
    }
  }
}


.c6ra8a37-0-0-beta-46 {
  @layer rdg.Cell {
    background-color: #ccccff;
  }
}

.cq910m07-0-0-beta-46 {
  @layer rdg.Cell {
    background-color: #ccccff;

    &.c6ra8a37-0-0-beta-46 {
      background-color: #9999ff;
    }
  }
}


.a3ejtar7-0-0-beta-46 {
  @layer rdg.SortIcon {
    fill: currentColor;

    > path {
      transition: d 0.1s;
    }
  }
}


.rnvodz57-0-0-beta-46 {
  @layer rdg.Defaults {
    *,
    *::before,
    *::after {
      box-sizing: inherit;
    }
  }

  @layer rdg.Root {
    --rdg-color: #000;   --rdg-border-color: #ddd;   --rdg-summary-border-color: #aaa;   --rdg-background-color: hsl(0deg 0% 100%);   --rdg-header-background-color: hsl(0deg 0% 97.5%);   --rdg-header-draggable-background-color: hsl(0deg 0% 90.5%);   --rdg-row-hover-background-color: hsl(0deg 0% 96%);   --rdg-row-selected-background-color: hsl(207deg 76% 92%);   --rdg-row-selected-hover-background-color: hsl(207deg 76% 88%);   --rdg-checkbox-focus-color: hsl(207deg 100% 69%);
    --rdg-selection-color: #66afe9;
    --rdg-font-size: 14px;
    --rdg-cell-frozen-box-shadow: 2px 0 5px -2px rgba(136, 136, 136, 0.3);

    &:dir(rtl) {
      --rdg-cell-frozen-box-shadow: -2px 0 5px -2px rgba(136, 136, 136, 0.3);
    }

    display: grid;

    color-scheme: light dark;

    color-scheme: var(--rdg-color-scheme, light dark);
    accent-color: light-dark(hsl(207deg 100% 29%), hsl(207deg 100% 79%));

    /* https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Positioning/Understanding_z_index/The_stacking_context */
    /* We set a stacking context so internal elements don't render on top of external elements. */
    /* size containment is not used as it could break "width: min-content" for example, and the grid would infinitely resize on Chromium browsers */
    contain: content;
    content-visibility: auto;
    block-size: 350px;
    border: 1px solid var(--rdg-border-color);
    box-sizing: border-box;
    overflow: auto;
    background-color: var(--rdg-background-color);
    color: var(--rdg-color);
    font-size: var(--rdg-font-size);

    /* needed on Firefox to fix scrollbars */
    &::before {
      content: '';
      grid-column: 1/-1;
      grid-row: 1/-1;
    }

    &.rdg-dark {
      --rdg-color-scheme: dark;
      --rdg-color: #ddd;   --rdg-border-color: #444;   --rdg-summary-border-color: #555;   --rdg-background-color: hsl(0deg 0% 13%);   --rdg-header-background-color: hsl(0deg 0% 10.5%);   --rdg-header-draggable-background-color: hsl(0deg 0% 17.5%);   --rdg-row-hover-background-color: hsl(0deg 0% 9%);   --rdg-row-selected-background-color: hsl(207deg 76% 42%);   --rdg-row-selected-hover-background-color: hsl(207deg 76% 38%);   --rdg-checkbox-focus-color: hsl(207deg 100% 89%);
    }

    &.rdg-light {
      --rdg-color-scheme: light;
    }

    @media (prefers-color-scheme: dark) {
      &:not(.rdg-light) {
        --rdg-color: #ddd;   --rdg-border-color: #444;   --rdg-summary-border-color: #555;   --rdg-background-color: hsl(0deg 0% 13%);   --rdg-header-background-color: hsl(0deg 0% 10.5%);   --rdg-header-draggable-background-color: hsl(0deg 0% 17.5%);   --rdg-row-hover-background-color: hsl(0deg 0% 9%);   --rdg-row-selected-background-color: hsl(207deg 76% 42%);   --rdg-row-selected-hover-background-color: hsl(207deg 76% 38%);   --rdg-checkbox-focus-color: hsl(207deg 100% 89%);
      }
    }

    > :nth-last-child(1 of .rdg-top-summary-row) {
      > .cj343x07-0-0-beta-46 {
        -webkit-border-after: 2px solid var(--rdg-summary-border-color);
                border-block-end: 2px solid var(--rdg-summary-border-color);
      }
    }

    > :nth-child(1 of .rdg-bottom-summary-row) {
      > .cj343x07-0-0-beta-46 {
        -webkit-border-before: 2px solid var(--rdg-summary-border-color);
                border-block-start: 2px solid var(--rdg-summary-border-color);
      }
    }
  }
}

.vlqv91k7-0-0-beta-46 {
  @layer rdg.Root {
    -webkit-user-select: none;
            user-select: none;

    & .r1upfr807-0-0-beta-46 {
      cursor: move;
    }
  }
}

.f1lsfrzw7-0-0-beta-46 {
  @layer rdg.FocusSink {
    grid-column: 1/-1;
    pointer-events: none;
    /* Should have a higher value than 1 to show up above regular frozen cells */
    z-index: 1;
  }
}

.f1cte0lg7-0-0-beta-46 {
  @layer rdg.FocusSink {
    /* Should have a higher value than 3 to show up above header and summary rows */
    z-index: 3;
  }
}


.s8wc6fl7-0-0-beta-46 {
  @layer rdg.SummaryCell {
    inset-block-start: var(--rdg-summary-row-top);
    inset-block-end: var(--rdg-summary-row-bottom);
  }
}


.skuhp557-0-0-beta-46 {
  @layer rdg.SummaryRow {
    > .cj343x07-0-0-beta-46 {
      position: -webkit-sticky;
      position: sticky;
    }
  }
}

.tf8l5ub7-0-0-beta-46 {
  @layer rdg.SummaryRow {
    > .cj343x07-0-0-beta-46 {
      z-index: 2;
    }

    > .csofj7r7-0-0-beta-46 {
      z-index: 3;
    }
  }
}


.g1yxluv37-0-0-beta-46 {
  @layer rdg.GroupedRow {
    &:not([aria-selected='true']) {
      background-color: var(--rdg-header-background-color);
    }

    > .cj343x07-0-0-beta-46:not(:last-child, .csofj7r7-0-0-beta-46),
    > :nth-last-child(n + 2 of .csofj7r7-0-0-beta-46) {
      -webkit-border-end: none;
              border-inline-end: none;
    }
  }
}


.t7vyx3i7-0-0-beta-46 {
  @layer rdg.TextEditor {
    -webkit-appearance: none;
            appearance: none;

    box-sizing: border-box;
    inline-size: 100%;
    block-size: 100%;
    padding-block: 0;
    padding-inline: 6px;
    border: 2px solid #ccc;
    vertical-align: top;
    color: var(--rdg-color);
    background-color: var(--rdg-background-color);

    font-family: inherit;
    font-size: var(--rdg-font-size);

    &:focus {
      border-color: var(--rdg-selection-color);
      outline: none;
    }

    &::placeholder {
      color: #999;
      opacity: 1;
    }
  }
}


/* Estilos para o componente FavoriteButton */

.favorite-wrapper {
  display: inline-flex;
  align-items: center;
  position: relative;
  z-index: 10;
  pointer-events: auto;
}

.favorite-button-container {
  display: inline-flex;
  align-items: center;
  gap: 0.125rem;
}

.favorite-button {
  padding: 0;
  border: none;
  background: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  border-radius: 0.25rem;
  cursor: pointer;
  pointer-events: auto;
  position: relative;
  z-index: 11;
}

.favorite-button:hover {
  background-color: rgba(0, 0, 0, 0.05);
  transform: scale(1.1);
}

.favorite-button:focus {
  box-shadow: 0 0 0 0.125rem rgba(255, 193, 7, 0.5);
  outline: none;
}

/* Tamanhos */
.favorite-btn-sm {
  width: 1.5rem;
  height: 1.5rem;
}

.favorite-btn-sm .favorite-icon {
  width: 0.875rem;
  height: 0.875rem;
}

.favorite-btn-md {
  width: 2rem;
  height: 2rem;
}

.favorite-btn-md .favorite-icon {
  width: 1.125rem;
  height: 1.125rem;
}

.favorite-btn-lg {
  width: 2.5rem;
  height: 2.5rem;
}

.favorite-btn-lg .favorite-icon {
  width: 1.5rem;
  height: 1.5rem;
}

/* Estados */
.favorite-inactive .favorite-icon {
  color: #6c757d;
}

.favorite-inactive:hover .favorite-icon {
  color: #ffc107;
}

.favorite-active .favorite-icon {
  color: #ffc107;
  filter: drop-shadow(0 0 0.125rem rgba(255, 193, 7, 0.3));
}

.favorite-active:hover .favorite-icon {
  color: #ffb300;
}

.favorite-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.favorite-disabled:hover {
  background-color: transparent;
  transform: none;
}

/* Botão de editar observação */
.favorite-edit-btn {
  padding: 0.125rem;
  border: none;
  background: none;
  color: #6c757d;
  transition: color 0.2s ease;
  border-radius: 0.125rem;
  width: 1.25rem;
  height: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.favorite-edit-btn:hover {
  color: #495057;
  background-color: rgba(0, 0, 0, 0.05);
}

.favorite-edit-btn:focus {
  box-shadow: 0 0 0 0.0625rem rgba(108, 117, 125, 0.5);
  outline: none;
}

/* Indicador de erro */
.favorite-error {
  position: absolute;
  top: -0.125rem;
  right: -0.125rem;
  font-size: 0.625rem;
  cursor: help;
  z-index: 1;
}

/* Tooltip customizado */
.favorite-tooltip-content {
  text-align: left;
  max-width: 12.5rem;
  word-wrap: break-word;
}

/* Animações */
@keyframes favoriteAdded {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.3);
  }
  100% {
    transform: scale(1);
  }
}

.favorite-active .favorite-icon {
  animation: favoriteAdded 0.3s ease-out;
}

/* Responsividade */
@media (max-width: 768px) {
  .favorite-btn-lg {
    width: 2.25rem;
    height: 2.25rem;
  }
  
  .favorite-btn-lg .favorite-icon {
    width: 1.25rem;
    height: 1.25rem;
  }
  
  .favorite-btn-md {
    width: 1.75rem;
    height: 1.75rem;
  }
  
  .favorite-btn-md .favorite-icon {
    width: 1rem;
    height: 1rem;
  }
}

/* Estados de loading */
.favorite-button .spinner-border {
  color: #ffc107;
}

/* Modal customizations */
.modal-body .form-control:focus {
  border-color: #ffc107;
  box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.25);
}

/* DataGrid specific styles */
.rdg .favorite-wrapper {
  z-index: 10;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.rdg .favorite-button-container {
  pointer-events: auto;
  position: relative;
  z-index: 11;
  display: flex !important;
  align-items: center;
  gap: 0.25rem;
}

.rdg-cell:has(.favorite-wrapper) {
  overflow: visible;
  z-index: 10;
  padding: 0.25rem;
}

/* Material-UI IconButton overrides for DataGrid */
.rdg .MuiIconButton-root {
  padding: 0.25rem;
  margin: 0;
}

.rdg .MuiIconButton-sizeSmall {
  padding: 0.125rem;
}

.rdg .MuiIconButton-sizeLarge {
  padding: 0.375rem;
}

/* Ensure proper positioning of Material-UI Dialog */
.MuiDialog-root .MuiDialog-paper {
  margin: 2rem;
}

.MuiDialog-paper[style*="position: fixed"] {
  margin: 0 !important;
}

/* Melhorar posicionamento do modal */
.modal-dialog {
  margin: 1.75rem auto;
  max-width: 31.25rem;
}

.modal-content {
  border-radius: 0.5rem;
  box-shadow: 0 0.625rem 1.5625rem rgba(0, 0, 0, 0.2);
}

.modal-header {
  border-bottom: 1px solid #dee2e6;
  padding: 1rem 1.5rem;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  border-top: 1px solid #dee2e6;
  padding: 1rem 1.5rem;
  gap: 0.5rem;
}

/* Responsividade do modal */
@media (max-width: 576px) {
  .modal-dialog {
    margin: 0.5rem;
    max-width: none;
  }
  
  .modal-header,
  .modal-body,
  .modal-footer {
    padding: 1rem;
  }
}

/* Acessibilidade */
.favorite-button:focus-visible {
  outline: 2px solid #ffc107;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .favorite-button,
  .favorite-edit-btn,
  .favorite-icon {
    transition: none;
  }
  
  .favorite-active .favorite-icon {
    animation: none;
  }
  
  .favorite-button:hover {
    transform: none;
  }
}

/* Modo escuro (se aplicável) */
@media (prefers-color-scheme: dark) {
  .favorite-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }
  
  .favorite-edit-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }
  
  .favorite-inactive .favorite-icon {
    color: #adb5bd;
  }
}
.tv-corporativa {
  height: 100vh;
  width: 100vw;
  display: flex;
  flex-direction: column;
  background: #f5f5f5;
  overflow: hidden;
}

.tv-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.25rem 0.5rem;
  background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  z-index: 1000;
}

.tv-info {
  display: flex;
  align-items: center;
  font-weight: 600;
}

.tv-status {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.connection-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-indicator {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.status-indicator.connected {
  background-color: #4caf50;
}

.status-indicator.error {
  background-color: #f44336;
}

.status-indicator.connecting {
  background-color: #ff9800;
}

@keyframes pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

.dashboard-info {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.125rem 0.375rem;
  border-radius: 0.5rem;
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
}

.progress-bar {
  background: rgba(255, 255, 255, 0.2);
}

.progress-bar .MuiLinearProgress-bar {
  background: linear-gradient(90deg, #4caf50 0%, #8bc34a 100%);
}

.tv-content {
  flex: 1 1;
  position: relative;
  overflow: hidden;
  padding: 0.25rem;
}

.dashboard-container {
  height: 100%;
  width: 100%;
  position: relative;
}

/* Ocultar filtros no modo TV */
.tv-corporativa .MuiFormControl-root,
.tv-corporativa .filter-container,
.tv-corporativa .filters-section,
.tv-corporativa .search-container {
  display: none !important;
}

/* Ajustar layout dos dashboards para TV */
.tv-corporativa .MuiGrid-container {
  height: 100%;
}

.tv-corporativa .MuiCard-root {
  height: 100%;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-radius: 0.75rem;
  margin: 0.0625rem !important;
}

.tv-corporativa .recharts-wrapper {
  font-size: 0.875rem;
}

.tv-corporativa .recharts-text {
  font-size: 0.75rem;
}

.tv-corporativa .recharts-legend-wrapper {
  font-size: 0.8125rem;
}

/* Overlay de transição */
.transition-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 999;
  -webkit-backdrop-filter: blur(5px);
          backdrop-filter: blur(5px);
}

/* Estados de loading e erro */
.tv-loading,
.tv-error {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #f5f5f5;
}

.tv-loading .MuiCircularProgress-root {
  color: #1976d2;
}

/* Responsividade para diferentes tamanhos de tela */
@media (max-width: 1200px) {
  .tv-header {
    padding: 0.125rem 0.25rem;
  }
  
  .tv-content {
    padding: 0.125rem;
  }
  
  .tv-corporativa .recharts-wrapper {
    font-size: 0.375rem;
  }
}

@media (max-width: 768px) {
  .tv-header {
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.125rem;
  }
  
  .tv-status {
    gap: 0.5rem;
  }
  
  .dashboard-info {
    padding: 0.0625rem 0.25rem;
  }
}

/* Animações suaves */
.tv-corporativa * {
  transition: all 0.3s ease;
}

/* Ocultar scrollbars */
.tv-corporativa::-webkit-scrollbar,
.tv-corporativa *::-webkit-scrollbar {
  display: none;
}

.tv-corporativa,
.tv-corporativa * {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Maximizar uso do espaço */
.tv-corporativa .MuiContainer-root {
  max-width: none !important;
  padding: 0 !important;
  margin: 0.0625rem !important;
}

.tv-corporativa .MuiBox-root {
  max-width: none;
  margin-right: 0.125rem !important;
  padding: 0 !important;
}

/* Remover margens dos grids */
.tv-corporativa .MuiGrid-container {
  margin: 0.0625rem !important;
  padding: 0 !important;
}

.tv-corporativa .MuiGrid-item {
  padding: 0.125rem !important;
}

/* Ajustes específicos para gráficos */
.tv-corporativa .recharts-responsive-container {
  min-height: 18.75rem;
}

.tv-corporativa .MuiDataGrid-root {
  border: none;
  font-size: 0.8125rem;
}

.tv-corporativa .MuiDataGrid-columnHeaders {
  font-weight: 600;
}

/* Cores e temas otimizados para TV */
.tv-corporativa .MuiPaper-root {
  background: #ffffff;
}

.tv-corporativa .MuiTypography-h4,
.tv-corporativa .MuiTypography-h5,
.tv-corporativa .MuiTypography-h6 {
  font-weight: 600;
}

/* Remover margens de componentes comuns */
.tv-corporativa .MuiPaper-root {
  margin: 0.0625rem !important;
}

.tv-corporativa .MuiCardContent-root {
  padding: 8px !important;
}

.tv-corporativa .MuiCardHeader-root {
  padding: 4px 8px !important;
}

.tv-corporativa .MuiTypography-root {
  margin: 1px !important;
}

/* Maximizar altura dos gráficos */
.tv-corporativa .recharts-responsive-container {
  min-height: 300px;
  margin: 1px !important;
  padding: 0 !important;
}
.App {
  text-align: center;
}

.App-logo {
  height: 40vmin;
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  .App-logo {
    animation: App-logo-spin infinite 20s linear;
  }
}

.App-header {
  background-color: #282c34;
  padding: 1.25rem;
  color: white;
}

.App-link {
  color: #61dafb;
}

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

/* Layout personalizado */
.dashboard-container {
  padding: 1.25rem;
  background-color: #f5f5f5;
  min-height: calc(100vh - 4rem);
}

.chart-container {
  background: white;
  border-radius: 0.5rem;
  padding: 1rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-bottom: 1rem;
}

.metric-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 0.5rem;
  padding: 1.25rem;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.metric-value {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.metric-label {
  font-size: 1rem;
  opacity: 0.9;
}

/* Grid layout para dashboards */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18.75rem, 1fr));
  grid-gap: 1rem;
  gap: 1rem;
  padding: 1rem;
}

/* Sidebar personalizada */
.sidebar-item {
  transition: background-color 0.2s ease;
}

.sidebar-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.sidebar-item.active {
  background-color: rgba(255, 255, 255, 0.2);
  border-right: 3px solid #1976d2;
}

/* Loading spinner */
.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 12.5rem;
}

/* Responsividade para mobile */
@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
    padding: 0.5rem;
  }
  
  .dashboard-container {
    padding: 0.625rem;
  }
  
  .chart-container {
    padding: 0.75rem;
  }
}

/* Animações para cards */
.card-hover {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Estilo para tabelas */
.data-table {
  background: white;
  border-radius: 0.5rem;
  overflow: auto;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Cores personalizadas para gráficos */
.chart-primary { color: #1976d2; }
.chart-secondary { color: #dc004e; }
.chart-success { color: #2e7d32; }
.chart-warning { color: #ed6c02; }
.chart-error { color: #d32f2f; }
.chart-info { color: #0288d1; }
