/* ============================================
   CSS BASE - Header, Footer e Accessibility
   Versão Simplificada e Funcional
   ============================================ */

/* Variáveis */
:root {
    --primary: #1A3E74;
    --accent: #00bcd4;
    --light: #f4f6f9;
    --dark: #1f2937;
}

/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
}

/* Links */
a {
    text-decoration: none;
    color: inherit;
}

/* Listas */
ul {
    list-style: none;
}

/* ===== TOP BAR ===== */
.top-bar {
    background: linear-gradient(135deg, #1A3E74 0%, #0d2847 100%);
    padding: 8px 0;
    font-size: 13px;
}

.top-bar a {
    color: white;
    text-decoration: none;
}

/* ===== MAIN HEADER ===== */
.main-header {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* ===== MEGA MENU ===== */
.mega-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

.nav-item:hover .mega-menu {
    display: block;
}

.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px;
}

.mega-menu-title {
    color: #1A3E74;
    font-size: 14px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #00bcd4;
}

.mega-menu-list li {
    margin-bottom: 10px;
}

.mega-menu-list a {
    color: #666;
    font-size: 14px;
    transition: color 0.2s;
}

.mega-menu-list a:hover {
    color: #1A3E74;
}

/* ===== MOBILE DRAWER ===== */
.mobile-drawer {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: white;
    z-index: 10001;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.2);
    transition: right 0.3s ease;
    overflow-y: auto;
}

.mobile-drawer.open {
    right: 0;
}

.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 62, 116, 0.5);
    z-index: 10000;
}

.mobile-overlay.active {
    display: block;
}

/* ===== STATS GRID ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
}

.stat-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-label i {
    color: var(--primary);
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* ===== SECTION TITLE ===== */
.section-title {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 20px;
    font-weight: 700;
    margin: 32px 0 20px 0;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title i {
    color: var(--primary);
}

/* ===== CARDS GRID ===== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.feature-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
}

.feature-card h3 {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.feature-card h3 i {
    color: var(--accent);
}

.feature-card p {
    color: #666;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 16px;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 15px;
    background: var(--primary);
    color: white;
}

.btn:hover {
    background: #152c4f;
    transform: translateY(-2px);
}

.btn-secondary {
    display: inline-block;
    padding: 10px 20px;
    background: #ff9800;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 14px;
}

.btn-secondary:hover {
    background: #F57C00;
    transform: translateY(-2px);
}

/* ===== META SECTION ===== */
.meta-section {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.meta-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.meta-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.meta-label i {
    color: var(--accent);
}

.meta-percentage {
    font-size: 14px;
    color: #666;
}

.meta-description {
    font-size: 13px;
    color: #666;
    margin-top: 8px;
}

/* ===== NOTIFICATION CARD ===== */
.notification-card {
    background: #FFF3E0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.notification-icon {
    font-size: 32px;
    color: #ff9800;
    flex-shrink: 0;
}

.notification-main {
    font-size: 18px;
    font-weight: 700;
    color: #E65100;
    margin-bottom: 8px;
}

/* ===== FOOTER ===== */
.main-footer {
    background: var(--primary);
    color: white;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-social {
    margin-top: 20px;
}

.footer-social a {
    display: inline-block;
    margin-right: 15px;
    font-size: 20px;
    opacity: 0.9;
}

.footer-social a:hover {
    opacity: 1;
}

/* ===== ACCESSIBILITY PANEL ===== */
.accessibility-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.accessibility-toggle {
    background: var(--primary);
    color: white;
    border: none;
    padding: 15px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.accessibility-toggle:hover {
    background: #152c4f;
}

.accessibility-menu {
    display: none;
    position: absolute;
    bottom: 70px;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    width: 280px;
}

.accessibility-menu.open {
    display: block;
}

.accessibility-header {
    background: var(--primary);
    color: white;
    padding: 15px 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accessibility-content {
    padding: 15px;
}

.accessibility-btn {
    width: 100%;
    background: #f5f7fa;
    border: 1px solid #e2e8f0;
    padding: 12px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    text-align: left;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
}

.accessibility-btn:hover {
    background: #e2e8f0;
}

.accessibility-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ===== DARK MODE ===== */
body.dark-mode {
    background: #1f2937;
    color: #f0f4f8;
}

body.dark-mode .stat-card,
body.dark-mode .feature-card,
body.dark-mode .meta-section,
body.dark-mode .notification-card {
    background: #2d3748;
    color: #f0f4f8;
}

body.dark-mode .stat-label,
body.dark-mode .feature-card p,
body.dark-mode .meta-description {
    color: #cbd5e1;
}

body.dark-mode .feature-card h3,
body.dark-mode .stat-value,
body.dark-mode .meta-label,
body.dark-mode .section-title {
    color: #f0f4f8;
}

/* ===== HIGH CONTRAST ===== */
body.high-contrast .stat-card,
body.high-contrast .feature-card,
body.high-contrast .meta-section {
    border: 2px solid var(--primary);
}

/* ===== LARGE TEXT ===== */
body.large-text {
    font-size: 120%;
}

/* ===== REDUCE MOTION ===== */
body.reduce-motion * {
    animation: none !important;
    transition: none !important;
}

/* ===== BACK TO TOP ===== */
.back-to-top {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 1000;
    transition: all 0.3s ease;
}

.back-to-top:hover {
    background: #152c4f;
    transform: translateY(-2px);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .page-wrapper {
        padding: 24px 16px;
    }
    
    .dashboard-header h1 {
        font-size: 24px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .feature-card {
        padding: 20px;
    }
    
    .feature-card h3 {
        font-size: 18px;
    }
    
    .notification-card {
        flex-direction: column;
        gap: 16px;
        padding: 20px;
    }
    
    .notification-main {
        font-size: 16px;
    }
    
    .meta-section {
        padding: 20px;
    }
}
