:root {
    /* Paleta de cores 60-30-10 */
    --primary-color: #2c3e50;    /* Cor principal (60%) - Azul escuro */
    --secondary-color: #3498db;  /* Cor secundária (30%) - Azul médio */
    --accent-color: #e74c3c;     /* Cor de destaque (10%) - Vermelho */
    --positive-color: #2ecc71;   /* Verde para valores positivos */
    --negative-color: #e74c3c;   /* Vermelho para valores negativos */
    --neutral-color: #f5f5f5;    /* Cinza claro para fundos */
    --text-color: #333333;       /* Cor de texto principal */
    --text-light: #ffffff;       /* Cor de texto clara */
    --text-muted: #7f8c8d;       /* Cor de texto secundária */
    --border-color: #dcdcdc;     /* Cor de borda */
    --shadow-color: rgba(0,0,0,0.1); /* Cor de sombra */
    
    /* Cores para tema escuro */
    --dark-bg: #1a1a1a;
    --dark-card: #2d2d2d;
    --dark-text: #f0f0f0;
    --dark-border: #444444;
    --dark-shadow: rgba(0,0,0,0.3);
}

/* Reset e estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: #f8f9fa;
    color: var(--text-color);
    line-height: 1.6;
    font-size: 16px;
}

/* Layout principal */
.container {
    display: flex;
    min-height: 100vh;
    width: 100%;
    position: relative;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: var(--primary-color);
    color: var(--text-light);
    position: fixed;
    height: 100vh;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo i {
    font-size: 2rem;
    margin-bottom: 10px;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.nav-list {
    list-style: none;
}

.nav-item {
    margin-bottom: 5px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.nav-link i {
    margin-right: 15px;
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

.nav-link:hover, .nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    border-left-color: var(--secondary-color);
}

.sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.version {
    font-size: 0.8rem;
    opacity: 0.7;
}

.btn-tema {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 8px 0;
    font-size: 0.9rem;
}

.btn-tema i {
    margin-right: 10px;
}

/* Conteúdo principal */
.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 20px;
    transition: all 0.3s ease;
}

/* Seções de conteúdo */
.content-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.content-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Cabeçalho da seção */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.section-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--primary-color);
}

.section-actions {
    display: flex;
    gap: 10px;
}

/* Cards de métricas */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px var(--shadow-color);
}

.metric-title {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    font-weight: 500;
}

.metric-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.metric-value.positive {
    color: var(--positive-color);
}

.metric-value.negative {
    color: var(--negative-color);
}

.metric-trend {
    margin-top: auto;
    font-size: 0.9rem;
}

.trend-up {
    color: var(--positive-color);
}

.trend-down {
    color: var(--negative-color);
}

.trend-neutral {
    color: var(--text-muted);
}

/* Seções do dashboard */
.dashboard-section {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px var(--shadow-color);
    margin-bottom: 30px;
}

.dashboard-section-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.dashboard-section-title i {
    margin-right: 10px;
}

/* Tabelas */
.table-container {
    overflow-x: auto;
    margin-bottom: 20px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.data-table th, 
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background-color: var(--neutral-color);
    font-weight: 600;
    color: var(--primary-color);
    position: sticky;
    top: 0;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Gráficos */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.chart-card {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px var(--shadow-color);
}

.chart-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.chart-container {
    height: 300px;
    position: relative;
}

.no-data-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-muted);
    font-style: italic;
}

/* Simulador */
.simulator-container {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px var(--shadow-color);
    margin-bottom: 30px;
}

.simulator-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.simulator-content {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.simulator-controls {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.simulator-result {
    flex: 1;
    min-width: 200px;
    background-color: var(--neutral-color);
    padding: 20px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.simulator-result h4 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 10px;
    color: var(--text-muted);
}

.simulator-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.simulator-value.positive {
    color: var(--positive-color);
}

.simulator-value.negative {
    color: var(--negative-color);
}

/* Configurações */
.config-container {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px var(--shadow-color);
    margin-bottom: 30px;
}

.config-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.config-form {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.config-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Botões */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 0.95rem;
}

.btn i {
    margin-right: 8px;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: var(--neutral-color);
    color: var(--text-color);
}

.btn-secondary:hover {
    background-color: #e0e0e0;
}

.btn-danger {
    background-color: var(--accent-color);
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-success {
    background-color: var(--positive-color);
    color: white;
}

.btn-success:hover {
    background-color: #27ae60;
}

/* Formulários */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

.form-static {
    padding: 10px 0;
    font-weight: 500;
}

/* Modais */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    overflow: auto;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: white;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Tema escuro */
body.dark-theme {
    background-color: var(--dark-bg);
    color: var(--dark-text);
}

body.dark-theme .main-content {
    background-color: var(--dark-bg);
}

body.dark-theme .metric-card,
body.dark-theme .dashboard-section,
body.dark-theme .chart-card,
body.dark-theme .simulator-container,
body.dark-theme .config-container,
body.dark-theme .modal-content {
    background-color: var(--dark-card);
    box-shadow: 0 4px 6px var(--dark-shadow);
}

body.dark-theme .section-title,
body.dark-theme .metric-title,
body.dark-theme .metric-value,
body.dark-theme .dashboard-section-title,
body.dark-theme .chart-title,
body.dark-theme .simulator-title,
body.dark-theme .config-title,
body.dark-theme .modal-title,
body.dark-theme .form-group label {
    color: var(--dark-text);
}

body.dark-theme .section-header,
body.dark-theme .modal-header,
body.dark-theme .modal-footer {
    border-color: var(--dark-border);
}

body.dark-theme .data-table th,
body.dark-theme .data-table td {
    border-color: var(--dark-border);
}

body.dark-theme .data-table th {
    background-color: rgba(255, 255, 255, 0.05);
}

body.dark-theme .data-table tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

body.dark-theme .form-control {
    background-color: var(--dark-bg);
    border-color: var(--dark-border);
    color: var(--dark-text);
}

body.dark-theme .btn-secondary {
    background-color: #444;
    color: var(--dark-text);
}

body.dark-theme .btn-secondary:hover {
    background-color: #555;
}

body.dark-theme .simulator-result {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Responsividade */
@media (max-width: 992px) {
    .sidebar {
        width: 70px;
    }
    
    .sidebar .logo span,
    .sidebar .nav-link span,
    .sidebar .version,
    .sidebar .btn-tema span {
        display: none;
    }
    
    .sidebar .logo i {
        margin-bottom: 0;
    }
    
    .sidebar .nav-link i {
        margin-right: 0;
    }
    
    .main-content {
        margin-left: 70px;
    }
    
    .metrics-grid,
    .charts-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 250px;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .sidebar.show .logo span,
    .sidebar.show .nav-link span,
    .sidebar.show .version,
    .sidebar.show .btn-tema span {
        display: inline;
    }
    
    .sidebar.show .logo i {
        margin-bottom: 10px;
    }
    
    .sidebar.show .nav-link i {
        margin-right: 15px;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .section-actions {
        width: 100%;
    }
    
    .metrics-grid,
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .simulator-content {
        flex-direction: column;
    }
    
    .config-actions {
        flex-direction: column;
    }
    
    .config-actions .btn {
        width: 100%;
    }
}

/* Utilitários */
.positive {
    color: var(--positive-color);
}

.negative {
    color: var(--negative-color);
}

.text-muted {
    color: var(--text-muted);
}

.d-flex {
    display: flex;
}

.align-items-center {
    align-items: center;
}

.justify-content-between {
    justify-content: space-between;
}

.gap-10 {
    gap: 10px;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-30 {
    margin-bottom: 30px;
}

/* Botão de menu para mobile */
.menu-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1100;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .main-content {
        padding-top: 60px;
    }
}




/* Estilo específico para botão Cancelar no rodapé do modal */
.modal-footer .btn-secondary {
    background-color: var(--accent-color); /* Vermelho */
    color: var(--text-light); /* Branco */
}

.modal-footer .btn-secondary:hover {
    background-color: #c0392b; /* Vermelho mais escuro no hover */
}

