:root {
    --primary-color: #4e73df;
    --secondary-color: #6f42c1;
    --success-color: #1cc88a;
    --info-color: #36b9cc;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
    --light-color: #f8f9fc;
    --dark-color: #f5f5f5;
    --body-bg: #f5f5f5;
    --body-no-bg: #f5f5f5;
    --body-color: #333;
    --font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

[data-theme="dark"] {
    --body-bg: #2e3440;
    --body-color: #d8dee9;
    --light-color: #3b4252;
    --dark-color: #eceff4;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    background-color: var(--body-bg);
    color: var(--body-color);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.btn-acoes a {
    font-size: 0.9rem;
}

/* Header */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 1rem 0;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    color: #fff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.95) !important;
    font-weight: 600;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-nav .nav-link:hover {
    color: #fff !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.3);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Tema claro para navbar - mantém contraste */
html:not([data-theme="dark"]) .navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

html:not([data-theme="dark"]) .navbar-brand,
html:not([data-theme="dark"]) .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.95) !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

html:not([data-theme="dark"]) .dropdown-menu {
    background-color: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

html:not([data-theme="dark"]) .dropdown-item {
    color: #333;
    font-weight: 500;
}

html:not([data-theme="dark"]) .dropdown-item:hover {
    background-color: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

html:not([data-theme="dark"]) .theme-toggle {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.dropdown-menu {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.dropdown-item {
    color: #333;
    font-weight: 500;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background-color: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.theme-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all 0.3s ease;
    margin-left: 1rem;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

img.logo {
    width: 600px;
    height: 450px; 
    border-radius:7px;
}

/* Cards com Glassmorphism */
.card {
    border: none;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.2);
    backdrop-filter: blur(12px);
}

[data-theme="dark"] .card {
    background: rgba(59, 66, 82, 0.7);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.card-header {
    background-color: #f8f9fc;
    border-bottom: 1px solid #e3e6f0;
    padding: 1rem 1.35rem;
}

.card-text .text-muted,
.text-muted, h4 {
    color: var(--body-color) !important;
}

.card-header h2 {
    color: var(--dark-color);
}

.me-3 h5.card-title, 
.me-3 h2.card-text,
.bi {
    color: var(--body-no-bg);
}

h1,
.container h2.text-center,
.text-muted .container p,
pre {
    color: var(--dark-color) !important;
}

.card-body {
    padding: 1.35rem;
    color: var(--body-color);
}

/* Buttons */
.btn {
    border-radius: 10px;
    font-weight: 600;
    padding: 0.6rem 1.2rem;
    transition: all 0.3s ease;
    margin-bottom: 7px;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.btn-secondary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.6);
}

.btn-success {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.6);
}

/* Forms */
.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--body-color);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.form-control {
    border: 2px solid var(--input-border);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    background: var(--input-bg);
    color: var(--input-color);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
    background: var(--input-bg);
    color: var(--input-color);
}

.form-control::placeholder {
    color: var(--input-color);
    opacity: 0.8 !important;
}

/* Navigation */
.list-group-item {
    border: 1px solid #e3e6f0;
    padding: 0.75rem 1.25rem;
    color: var(--dark-color);
}

.list-group-item.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    line-height: 50px;
    font-size: 1.5rem;
    z-index: 1000;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    cursor: pointer;
}

.back-to-top:hover {
    background-color: #2e59d9;
}

/* Theme toggle */
.theme-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark-color);
}

/* Responsive design */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.2rem;
    }

    img.logo {
        margin-top: 25px;
        width: 100%;
        height: 100%;
    }
    
    .card {
        border-radius: 12px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .container {
        padding: 0 10px;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .row {
        margin: -0.5rem;
    }
    
    .col-md-4,
    .col-md-6,
    .col-lg-3 {
        padding: 0.5rem;
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .display-4 {
        font-size: 2rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
}

/* Print styles for PDF */
@media print {
    .navbar, .btn, .theme-toggle, .back-to-top {
        display: none !important;
    }
    
    body {
        background-color: white;
        color: black;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .container {
        width: 100%;
        max-width: 100%;
    }
}

.financial-section {
    border: 1px solid #e3e6f0;
    border-radius: 0.35rem;
    padding: 1rem;
    margin-bottom: 1rem;
    background-color: #f8f9fc;
}

.financial-section h6 {
    color: #4e73df;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.financial-item {
    padding: 0.5rem;
    border-bottom: 1px solid #e3e6f0;
}

.financial-item:last-child {
    border-bottom: none;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.input-group-text {
    background-color: #eaecf4;
    color: #6e707e;
}

/* Responsividade */
@media (max-width: 768px) {
    .financial-item .col-md-3,
    .financial-item .col-md-4,
    .financial-item .col-md-2 {
        margin-bottom: 0.5rem;
    }
    
    .financial-item .col-md-1 {
        text-align: center;
    }
}

/* Tables */
.table {
    border-collapse: collapse;
    transition: all 0.3s ease;
    background-color: transparent;
    font-size: 0.95rem;
}

.table thead th {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    border-bottom: 2px solid var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    color: var(--body-color);
    padding: 1rem;
}

.table tbody tr {
    border-bottom: 1px solid rgba(119, 121, 145, 0.15);
    transition: all 0.3s ease;
}

.table tbody td {
    padding: 0.75rem 1rem;
}

.table tbody tr:nth-child(odd) {
    background-color: rgba(102, 126, 234, 0.02);
}

.table tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.08);
}

[data-theme="dark"] .table thead th {
    background: rgba(102, 126, 234, 0.25);
    border-bottom-color: rgba(111, 142, 253, 0.5);
}

[data-theme="dark"] .table tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.25) !important;
}

/* Homepage Styles */
.hero-section {
    position: relative;
}

.hero-section h1 {
    line-height: 1.2;
}

.hero-section .display-3 {
    font-weight: 800;
}

.hero-section .lead {
    font-size: 1.25rem;
    line-height: 1.6;
}

.hero-section .btn-light {
    background: rgba(255, 255, 255, 0.95);
    color: #667eea !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.hero-section .btn-light:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    color: #764ba2 !important;
}

.hero-section .btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.hero-section .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    transform: translateY(-2px);
}

/* Animações */
@media (prefers-reduced-motion: no-preference) {
    .fade-in {
        animation: fadeIn 0.8s ease-out;
    }

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

/* Stats styling */
.hero-section .display-6 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* Responsividade para hero */
@media (max-width: 992px) {
    .hero-section {
        min-height: auto;
        padding: 60px 0;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section .lead {
        font-size: 1.1rem;
    }

    .hero-section .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .hero-section .d-flex.gap-3 {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 40px 0;
    }

    .hero-section h1 {
        font-size: 1.75rem;
    }

    .hero-section .display-6 {
        font-size: 1.5rem;
    }

    .hero-section img {
        max-height: 300px;
        object-fit: cover;
    }
}

/* Section spacing */
section {
    padding: 20px 0;
}

@media (max-width: 768px) {
    section {
        padding: 40px 0;
    }
}

/* Pagination */
.pagination {
    gap: 0.5rem;
}

.page-link {
    border-radius: 8px;
    border: 1px solid var(--card-border);
    transition: all 0.3s ease;
    color: var(--body-color);
}

.page-link:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.page-item.active .page-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
}

::placeholder {
    opacity: 0.5 !important; /* Valor de 0 (transparente) a 1 (opaco) */
}
