/* ====== VARIÁVEIS DE CORES ====== */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --body-bg: #f5f7fa;
    --card-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

/* ====== ESTILOS GERAIS ====== */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--body-bg);
    color: var(--dark-color);
    padding-top: 10px;
    min-height: 100vh;
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

.container-fluid {
    padding-left: 2rem;
    padding-right: 2rem;
}

@media (max-width: 768px) {
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* ====== NAVEGAÇÃO ====== */
.navbar {
    padding: 0.5rem 1rem;
    background-color: var(--primary-color) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 600;
    display: flex;
    align-items: center;
}

.navbar-brand img {
    height: 40px;
    transition: transform 0.3s;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    transition: all 0.3s;
    color: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
}

.nav-link i {
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

.nav-link:hover, .nav-link:focus {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    font-weight: 600;
    color: white;
}

.dropdown-menu {
    border: none;
    box-shadow: var(--card-shadow);
    padding: 0.5rem 0;
}

.dropdown-item {
    padding: 0.5rem 1.5rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}

.dropdown-item i {
    width: 1.5rem;
    text-align: center;
    margin-right: 0.75rem;
}

.dropdown-item:hover, .dropdown-item:focus {
    background-color: var(--primary-color);
    color: white;
}

.dropdown-divider {
    margin: 0.5rem 0;
}

/* ====== BREADCRUMB ====== */
.breadcrumb {
    padding: 0.75rem 1.25rem;
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: var(--card-shadow);
    margin-bottom: 1.5rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.breadcrumb-item a:hover {
    color: #0a58ca;
}

.breadcrumb-item.active {
    color: var(--secondary-color);
}

.breadcrumb-item + .breadcrumb-item::before {
    display: inline-block;
    padding-right: 0.5rem;
    color: var(--secondary-color);
    content: ">";
}

/* ====== CARDS ====== */
.card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: var(--card-shadow);
    margin-bottom: 1.5rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    font-weight: 600;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem 0.5rem 0 0 !important;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    background-color: white;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding: 1rem 1.5rem;
    border-radius: 0 0 0.5rem 0.5rem !important;
}

/* ====== TABELAS ====== */
.table {
    margin-bottom: 0;
}

.table-responsive {
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.table thead th {
    background-color: var(--primary-color);
    color: white;
    border-bottom: none;
    padding: 1rem;
    vertical-align: middle;
}

.table tbody tr {
    transition: background-color 0.2s;
}

.table tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

.table td, .table th {
    padding: 0.75rem 1rem;
    vertical-align: middle;
}

.table-bordered {
    border: none;
}

.table-bordered thead th {
    border: none;
}

.table-bordered td, .table-bordered th {
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* ====== FORMULÁRIOS ====== */
.form-control, .form-select {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.input-group-text {
    background-color: var(--light-color);
    border-radius: 0.5rem 0 0 0.5rem;
}

.btn {
    padding: 0.5rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s;
}

.btn i {
    margin-right: 0.5rem;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
}

/* ====== ESTATÍSTICAS ====== */
.stat-card {
    background-color: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--secondary-color);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

/* ====== GRÁFICOS ====== */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* ====== ALERTAS ====== */
.alert {
    border-radius: 0.5rem;
    padding: 1rem 1.5rem;
    border: none;
}

.alert-primary {
    background-color: rgba(13, 110, 253, 0.1);
    color: var(--primary-color);
}

.alert-success {
    background-color: rgba(25, 135, 84, 0.1);
    color: var(--success-color);
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
}

/* ====== PAGINAÇÃO ====== */
.pagination {
    justify-content: center;
    margin-top: 1.5rem;
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.page-link {
    color: var(--primary-color);
    border-radius: 0.5rem !important;
    margin: 0 0.25rem;
    border: none;
    padding: 0.5rem 1rem;
}

.page-link:hover {
    color: #0a58ca;
    background-color: rgba(13, 110, 253, 0.1);
}

/* ====== LOGIN PAGE ====== */
.login-container {
    max-width: 400px;
    margin: 5rem auto;
    padding: 2rem;
    background-color: white;
    border-radius: 1rem;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.1);
}

.login-container .logo {
    height: 60px;
    margin-bottom: 1.5rem;
}

/* ====== IMPRESSÃO ====== */
@media print {
    body * {
        visibility: hidden;
    }
    
    .print-section, .print-section * {
        visibility: visible;
    }
    
    .print-section {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
    
    .no-print {
        display: none !important;
    }
    
    table {
        width: 100% !important;
        font-size: 10px;
    }
    
    .table-responsive {
        overflow: visible !important;
    }
    
    .page-break {
        page-break-after: always;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
}

/* ====== RESPONSIVIDADE ====== */
@media (max-width: 991.98px) {
    .navbar-collapse {
        padding: 1rem 0;
    }
    
    .nav-item {
        margin-bottom: 0.25rem;
    }
    
    .dropdown-menu {
        margin-left: 1rem;
        box-shadow: none;
        border: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .stat-card {
        margin-bottom: 1rem;
    }
}

@media (max-width: 767.98px) {
    .breadcrumb {
        padding: 0.5rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .table-responsive {
        margin-bottom: 1rem;
    }
}

/* ====== ANIMAÇÕES ====== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

/* ====== UTILITÁRIOS ====== */
.shadow-sm {
    box-shadow: var(--card-shadow) !important;
}

.rounded-lg {
    border-radius: 0.5rem !important;
}

.mt-nav {
    margin-top: 6rem;
}

.cursor-pointer {
    cursor: pointer;
}

.text-primary {
    color: var(--primary-color) !important;
}

.bg-light {
    background-color: var(--light-color) !important;
}

/* ====== BADGES ====== */
.badge {
    padding: 0.35em 0.65em;
    font-weight: 500;
    border-radius: 0.5rem;
}

.badge-primary {
    background-color: var(--primary-color);
}

.badge-success {
    background-color: var(--success-color);
}

.badge-danger {
    background-color: var(--danger-color);
}

.badge-warning {
    background-color: var(--warning-color);
    color: var(--dark-color);
}

.badge-info {
    background-color: var(--info-color);
    color: var(--dark-color);
}