/* --------------------------
   Global Styles
----------------------------- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
    background-color: #f5f5f5;
    margin: 0;
    display: flex;
    height: 100vh; /* Ajuste para garantir que o body ocupe a altura total da viewport */
    overflow: hidden;
  }
  
  /* --------------------------
     Sidebar Styles
  ----------------------------- */
  .sidebar {
    width: 240px;
    background-color: #007aff;
    color: #fff;
    height: 100vh;
    padding: 20px;
    box-sizing: border-box;
    flex-shrink: 0;
  }
  
  .sidebar h2 {
    font-size: 20px;
    margin-bottom: 30px;
  }
  
  .sidebar a {
    display: block;
    color: #fff;
    text-decoration: none;
    padding: 10px 0;
    font-size: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    transition: background-color 0.3s ease;
  }
  
  .sidebar a:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }
  
  /* --------------------------
     Main Content Styles
  ----------------------------- */
  .main-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #f5f5f5; /* Ajuste para garantir que o fundo da área de conteúdo seja consistente */
  }
  
  h1 {
    font-size: 26px;
    color: #333;
    margin: 10px 0;
  }
  
  /* --------------------------
     Filtros Dinâmicos
  ----------------------------- */
  .filters-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
  }
  
  .filters-container label {
    font-size: 14px;
    color: #333;
  }
  
  .filters-container input,
  .filters-container select {
    padding: 5px;
    font-size: 14px;
  }
  
  .filters-container button {
    padding: 5px 10px;
    font-size: 14px;
    background-color: #007aff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
  }
  
  .filters-container button:hover {
    background-color: #005bb5;
  }
  
  /* --------------------------
     Indicadores de Tendência
  ----------------------------- */
  .kpi-indicators {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
  }
  
  .kpi-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #fff;
    padding: 12px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
  }
  
  .kpi-indicator h3 {
    font-size: 16px;
    color: #555;
    margin-bottom: 6px;
  }
  
  .kpi-indicator p {
    font-size: 20px;
    color: #333;
    margin: 0;
  }
  
  .trend-up {
    color: green;
    font-size: 20px;
  }
  
  .trend-down {
    color: red;
    font-size: 20px;
  }
  
  /* --------------------------
     Cards Styles
  ----------------------------- */
  .cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
  }
  
  .card {
    background-color: #fff;
    padding: 12px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
  }
  
  .card h3 {
    font-size: 16px;
    color: #555;
    margin-bottom: 6px;
  }
  
  .card p {
    font-size: 20px;
    color: #333;
    margin: 0;
  }
  
  .card.small {
    padding: 10px;
  }
  
  /* --------------------------
     Charts Layout
  ----------------------------- */
  .charts-container {
    display: flex;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
    justify-content: space-between;
    align-items: flex-start;
  }
  
  /* Cada gráfico em seu container */
  .chart-container {
    background-color: #fff;
    padding: 12px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
    flex: 1;
  }
  
  /* --------------------------
     Canvas & Chart Sizing
  ----------------------------- */
  canvas {
    width: 100% !important;
    height: 100% !important;
  }
  
  #lineChart,
  #weeklyChart,
  #occupancyChart {
    height: 200px !important;
    max-width: 400px;
    margin: 0 auto;
  }
  
  /* Ajuste específico para o gráfico de donuts */
  #occupancyChart {
    height: 150px !important; /* Diminui a altura do gráfico */
    max-width: 300px; /* Diminui a largura do gráfico */
  }
  
  .chart-legend {
    font-size: 12px; /* Diminui o tamanho da fonte das legendas */
  }
  
  /* Adiciona padding entre o título e o gráfico de donuts */
  .chart-container.donut {
    padding-top: 20px; /* Ajuste conforme necessário */
  }
  
  /* --------------------------
     Tabela de KPIs Estilos
  ----------------------------- */
  .kpi-table-container {
    max-width: 800px;
    margin: 20px auto;
    background: #fff;
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  }
  
  .kpi-table-container h2 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 24px;
    color: #333;
  }
  
  table.kpi-table {
    width: 100%;
    border-collapse: collapse;
  }
  
  table.kpi-table th,
  table.kpi-table td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: center;
  }
  
  table.kpi-table th {
    background: #007aff;
    color: #fff;
    font-size: 16px;
  }
  
  table.kpi-table tbody tr:nth-child(odd) {
    background: #fafafa;
  }
  
  table.kpi-table tbody tr:hover {
    background: #f0f8ff;
  }
  
  table.kpi-table tfoot th {
    background: #f5f5f5;
    font-weight: bold;
  }
  
  .flag {
    display: inline-block;
    width: 15px;
    height: 15px;
    border-radius: 50%;
  }
  
  .flag.green {
    background-color: green;
  }
  
  .flag.yellow {
    background-color: yellow;
  }
  
  .flag.red {
    background-color: red;
  }
  
  /* --------------------------
     Modal Styles
  ----------------------------- */
  .modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0,0,0);
    background-color: rgba(0,0,0,0.4);
  }
  
  .modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 800px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  }
  
  .close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
  }
  
  .close:hover,
  .close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
  }