@charset "utf-8";
/* CSS Document */
/* Reset CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary-color: #005ce6;
    --primary-light: #1268e9;
    --primary-dark: #0053d0;
    --white: #ffffff;
    --light-gray: #f5f5f5;
    --medium-gray: #e0e0e0;
    --dark-gray: #333333;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
    --header-height: 64px;
}

body {
    background-color: var(--light-gray);
    color: var(--dark-gray);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background-color: var(--primary-color);
    color: var(--white);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    z-index: 100;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info select {
    padding: 0.5rem;
    border: none;
    border-radius: 4px;
    background-color: var(--white);
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: var(--white);
    height: calc(100vh - var(--header-height));
    position: fixed;
    left: 0;
    top: var(--header-height);
    box-shadow: var(--shadow);
    z-index: 90;
    transition: var(--transition);
    overflow-y: auto;
}

.sidebar-menu {
    list-style: none;
    padding: 1rem 0;
}

.sidebar-menu li {
    padding: 0.5rem 1.5rem;
    margin-bottom: 0.5rem;
}

.sidebar-menu a {
    color: var(--dark-gray);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    transition: var(--transition);
}

.sidebar-menu a:hover {
    color: var(--primary-color);
}

.sidebar-menu li.active {
    background-color: var(--light-gray);
    border-left: 4px solid var(--primary-color);
}

.sidebar-menu li.active a {
    color: var(--primary-color);
    font-weight: 500;
}

/* Main Content */
.main-content {
    margin-left: 250px;
    padding: 2rem;
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
    transition: var(--transition);
}

.page-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    font-weight: 500;
}

/* Cards */
dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    width: 100%;
  }
  
  .dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    width: 100%;
    box-sizing: border-box;
    flex: 1;
  }
  
  .card {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 1.5rem;
    transition: var(--transition);
    height: 100%;
  }
  
  .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
  }
  
  .card-title {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: var(--primary-color);
  }
  
  .card-value {
    font-size: 2rem;
    font-weight: bold;
  }
  
  .card-subtitle {
    color: #777;
    font-size: 0.9rem;
    margin-top: 0.5rem;
  }
  
  /* Responsividade preservando outras partes da interface */
  @media (max-width: 992px) {
    .dashboard-cards {
      grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
  }
  
  @media (max-width: 768px) {
    .dashboard-cards {
      grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
  }
  
  @media (max-width: 480px) {
    .dashboard-cards {
      grid-template-columns: 1fr;
    }
  }

.table-container {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 1.5rem;
    overflow-x: auto;
    margin-top: 2rem;
    width: 100%; /* Garante que o container ocupe toda a largura disponível */
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 300px; /* Define uma largura mínima para a tabela */
}

th, td {
    padding: 0.75rem 1rem;
    text-align: center;
    border-bottom: 1px solid var(--medium-gray);
}

th {
    background-color: var(--light-gray);
    font-weight: 500;
    color: var(--primary-color);
}

tr:hover {
    background-color: var(--light-gray);
}

/* Media query para dispositivos móveis */
@media screen and (max-width: 768px) {
    .table-container {
        padding: 1rem; /* Reduz o padding em telas menores */
    }
    
    th, td {
        padding: 0.5rem; /* Reduz o padding das células */
        font-size: 0.9rem; /* Reduz ligeiramente o tamanho da fonte */
    }
}

/* Para telas muito pequenas */
@media screen and (max-width: 480px) {
    th, td {
        padding: 0.4rem;
        font-size: 0.85rem;
    }
}
/* Forms */
.form-container {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark-gray);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--medium-gray);
    border-radius: 4px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(230, 0, 0, 0.2);
}

.form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-col {
    flex: 1;
    min-width: 200px;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
}

/* Utilities */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--primary-color); }

.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge-success {
    background-color: #28a745;
    color: white;
}

.badge-warning {
    background-color: #ffc107;
    color: #333;
}

.badge-danger {
    background-color: var(--primary-color);
    color: white;
}

/* Mensagens/Notificações */
.mensagem {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    display: flex;
    align-items: center;
    animation: slideIn 0.3s ease-out forwards;
    max-width: 100%;
}

@keyframes slideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.mensagem-fadeout {
    animation: fadeOut 0.5s ease-out forwards;
}

.mensagem-icon {
    margin-right: 1rem;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.mensagem-content {
    flex-grow: 1;
}

.mensagem-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
}

.mensagem-text {
    margin: 0;
}

.mensagem-sucesso {
    background-color: #e8f6ee;
    border-left: 4px solid #28a745;
    color: #155724;
}

.mensagem-sucesso .mensagem-icon {
    color: #28a745;
}

.mensagem-erro {
    background-color: #fbeaea;
    border-left: 4px solid #e60000;
    color: #721c24;
}

.mensagem-erro .mensagem-icon {
    color: #e60000;
}

.mensagem-alerta {
    background-color: #fff8e6;
    border-left: 4px solid #ffc107;
    color: #856404;
}

.mensagem-alerta .mensagem-icon {
    color: #ffc107;
}

.mensagem-info {
    background-color: #e6f5ff;
    border-left: 4px solid #17a2b8;
    color: #0c5460;
}

.mensagem-info .mensagem-icon {
    color: #17a2b8;
}

.mensagem-fechar {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #999;
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    transition: color 0.2s;
}

.mensagem-fechar:hover {
    color: #333;
}

/* Mensagens fixas no topo (toast) */
.mensagem-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    max-width: 400px;
    width: calc(100% - 2rem);
}

.mensagem-toast {
    margin-bottom: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateX(0);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.mensagem-toast.ocultar {
    transform: translateX(120%);
    opacity: 0;
}

/* Lista de erros dentro de mensagem */
.mensagem ul {
    margin: 0.5rem 0 0 0;
    padding-left: 1.5rem;
}

.mensagem ul li {
    margin-bottom: 0.25rem;
}

.mensagem ul li:last-child {
    margin-bottom: 0;
}

/* Forms Section */
.form-section {
    display: none;
}

.form-section.active {
    display: block;
}

.config-container {
    max-width: 100%;
    margin: 2rem auto;
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.btn-group {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.btn-toggle {
    padding: 7px 20px;
    border: none;
    border-radius: 6px;
    background-color: #005ce6;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

.btn-toggle:hover {
    background-color: #004bb5;
}

.submit-btn {
    margin-top: 15px;
    padding: 10px 20px;
    background-color: #005ce6;
    border: none;
    color: white;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
}

.submit-btn:hover {
    background-color: #004bb5;
}

h1 {
    text-align: center;
    margin-bottom: 20px;
}

/* Filtros */
.filtros {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    background: #f9f9f9;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    align-items: flex-end;
}

.filtros label {
    font-weight: bold;
    margin-bottom: 0.2rem;
    display: block;
    color: #0053d0;
}

.filtros input {
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    width: 180px;
    font-size: 14px;
}

.filtros button {
    padding: 0.6rem 1rem;
    background-color: #007BFF;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s ease;
}

.filtros button:hover {
    background-color: #0056b3;
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .sidebar {
        width: 64px;
        overflow-x: hidden;
    }
    
    .sidebar-menu a span {
        display: none;
    }
    
    .main-content {
        margin-left: 64px;
    }
}

@media (max-width: 767px) {
    .header {
        padding: 1rem;
    }
    
    .logo {
        font-size: 1.4rem;
    }
    
    .main-content {
        padding: 1rem;
        margin-left: 0;
    }
    
    .sidebar {
        position: fixed;
        left: -100%;
        transition: left 0.3s ease;
    }
    
    .sidebar.open {
        left: 0;
    }
    
    .dashboard-cards {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 1rem;
        padding: 1rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
      }
      
      /* Responsividade para diferentes tamanhos de tela */
      @media (max-width: 768px) {
        .dashboard-cards {
          grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        }
      }
      
      @media (max-width: 480px) {
        .dashboard-cards {
          grid-template-columns: 1fr;
        }
      }
    
    .filtros {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filtros input {
        width: 100%;
    }
    
    .filtros button {
        width: 100%;
    }
    
    .config-container {
        padding: 1rem;
        margin: 1rem;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn-toggle {
        width: 100%;
    }
}

/* Toggle button for mobile */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

@media (max-width: 767px) {
    .menu-toggle {
        display: block;
    }
    
    .header {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .logo {
        flex-grow: 1;
        text-align: center;
    }
}





.charts-container {
    position: relative;
    display: flex;
    gap: 20px;
    flex-wrap: wrap; /* Permite quebra de linha em telas menores */
    width: 100%;
}

#donutchart, #curve_chart {
    flex: 1;
    min-width: 280px; /* Estabelece uma largura mínima para cada gráfico */
    height: 350px;
}

/* Media query para dispositivos móveis */
@media screen and (max-width: 768px) {
    .charts-container {
        flex-direction: column; /* Empilha os gráficos em telas pequenas */
        gap: 30px; /* Aumenta o espaçamento vertical */
    }
    
    #donutchart, #curve_chart {
        width: 100%; /* Ocupa toda a largura da tela */
        min-height: 300px; /* Altura mínima ajustada */
    }
}
