/* Reset e configurações básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    font-size: 18px;
    line-height: 1.6;
    color: #1f2937;
    background-color: #f8fafc;
}

/* Container principal */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background-color: #1e3a8a;
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

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

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Layout principal - apenas sidebar responsiva */
.main-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    margin: 30px 0;
    min-height: calc(100vh - 200px);
}

/* Sidebar - CORRIGIDA PARA SCROLL INDEPENDENTE */
.sidebar {
    background-color: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: sticky;
    top: 30px;
    height: calc(100vh - 60px);
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
}

/* Estilização da scrollbar para Webkit (Chrome, Safari, Edge) */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

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

.sidebar h3 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: #1e3a8a;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 10px;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 8px;
}

.sidebar-menu a {
    color: #4b5563;
    text-decoration: none;
    font-size: 1rem;
    padding: 12px 15px;
    border-radius: 8px;
    display: block;
    transition: all 0.3s ease;
}

.sidebar-menu a:hover {
    background-color: #f3f4f6;
    color: #1e3a8a;
    transform: translateX(5px);
}

.sidebar-menu a.active {
    background-color: #1e3a8a;
    color: white;
}

/* Conteúdo principal */
.main-content {
    background-color: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Títulos */
h1 {
    font-size: 2.5rem;
    color: #1e3a8a;
    margin-bottom: 20px;
    text-align: center;
}

h2 {
    font-size: 2rem;
    color: #1e3a8a;
    margin: 30px 0 20px 0;
    border-bottom: 3px solid #3b82f6;
    padding-bottom: 10px;
}

h3 {
    font-size: 1.5rem;
    color: #374151;
    margin: 25px 0 15px 0;
}

/* Cards de destaque */
.highlight-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.highlight-card {
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.3);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.highlight-card:hover {
    transform: translateY(-5px);
}

.highlight-card h3 {
    font-size: 1.6rem;
    margin-bottom: 15px;
}

.highlight-card p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.highlight-card .btn {
    background-color: rgba(255,255,255,0.2);
    border: 2px solid;
    margin-top: 15px;
}

.highlight-card .btn:hover {
    background-color: white;
    color: #ef4444;
}

/* Botões */
.btn {
    display: inline-block;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-align: center;
    min-width: 150px;
}

.btn-primary {
    background-color: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background-color: #2563eb;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #6b7280;
    color: white;
}

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

/* Alertas */
.alert {
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    font-size: 1.1rem;
    border-left: 5px solid;
}

.alert-info {
    background-color: #dbeafe;
    border-color: #3b82f6;
    color: #1e40af;
}

.alert-warning {
    background-color: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
}

.alert-danger {
    background-color: #fee2e2;
    border-color: #ef4444;
    color: #dc2626;
}

.alert-success {
    background-color: #d1fae5;
    border-color: #10b981;
    color: #065f46;
}

/* Listas */
ul, ol {
    margin: 15px 0;
    padding-left: 30px;
}

li {
    margin-bottom: 8px;
    font-size: 1.1rem;
}

/* Tabelas */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 1rem;
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #374151;
}

tr:hover {
    background-color: #f9fafb;
}

/* Footer */
.footer {
    background-color: #1e3a8a;
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 20px;
}

.footer-section h4 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #93c5fd;
}

.footer-section p, .footer-section a {
    color: #d1d5db;
    text-decoration: none;
    font-size: 1rem;
}

.footer-section a:hover {
    color: white;
}

/* Busca */
.search-container {
    margin: 20px 0;
    text-align: center;
}

.search-input {
    width: 100%;
    max-width: 500px;
    padding: 15px 20px;
    font-size: 1.1rem;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    border-color: #3b82f6;
}

/* Menu hambúrguer para mobile */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
    padding: 10px;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    background-color: #1e3a8a;
    border-radius: 8px;
}

/* Responsividade */
@media (max-width: 1024px) {
    .main-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        max-height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
        overflow-y: auto;
        overflow-x: hidden;
        border-radius: 0;
        scrollbar-width: thin;
    }
    
    .sidebar.open {
        left: 0;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .main-content {
        margin-top: 0;
    }
    
    /* Overlay para fechar sidebar */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
    
    .sidebar-overlay.show {
        display: block;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header-content {
        text-align: center;
    }
    
    .logo {
        font-size: 1.8rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.6rem;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .highlight-cards {
        grid-template-columns: 1fr;
    }
    
    .btn {
        width: 100%;
        margin: 5px 0;
    }
    
    .sidebar {
        width: 100%;
        left: -100%;
    }
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Scroll suave */
html {
    scroll-behavior: smooth;
}

/* Botão voltar ao topo */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #3b82f6;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    display: none;
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top:hover {
    background-color: #2563eb;
    transform: translateY(-3px);
}

.back-to-top.show {
    display: block;
}

