/* Importação de fontes modernas do Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Inter:wght@400;500;600&display=swap');

/* Variáveis globais */
:root {
    --primary-color: #6a11cb;
    --primary-hover: #5a0fb5;
    --primary-gradient: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --sidebar-width: 260px;
    --header-height: 60px;
    --footer-height: 50px;
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Inter', sans-serif;
    --border-radius: 10px;
    --card-shadow: 0 5px 15px rgba(0,0,0,0.08);
    --sidebar-shadow: 0 0 20px rgba(0,0,0,0.15);
    --transition-speed: 0.3s;
}

/* Estilos Base */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    display: flex;
    flex-direction: column;
    font-family: var(--font-primary);
    font-weight: 400;
    line-height: 1.6;
    color: #2c3e50;
    background-color: #f5f7fa;
}

/* Layout Principal */
.container-fluid {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0;
}

.row {
    flex: 1;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--primary-gradient);
    color: #fff;
    transition: all var(--transition-speed) ease-in-out;
    position: fixed;
    top: 0;
    left: 0;
    overflow-y: auto;
    z-index: 1040;
    box-shadow: var(--sidebar-shadow);
    font-family: var(--font-primary);
}

.sidebar::-webkit-scrollbar {
    width: 5px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.sidebar.active {
    margin-left: calc(-1 * var(--sidebar-width));
}

/* Logo Container */
.logo-container {
    padding: 1.5rem 1rem;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 1rem;
}

.logo-container img {
    max-width: 120px;
    height: auto;
    margin-bottom: 1rem;
    border-radius: 10px;
    padding: 5px;
    background: rgba(255, 255, 255, 0.1);
}

.logo-container h4 {
    color: white;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Menu Links */
.nav-link {
    color: rgba(255,255,255,0.8);
    padding: 0.9rem 1.5rem;
    display: flex;
    align-items: center;
    transition: all var(--transition-speed) ease;
    border-radius: 10px;
    margin: 3px 10px;
    font-weight: 500;
    letter-spacing: 0.02em;
    font-size: 0.9rem;
}

.nav-link i {
    width: 24px;
    margin-right: 12px;
    text-align: center;
    font-size: 1rem;
}

.nav-link:hover {
    color: white;
    background: rgba(255,255,255,0.15);
    transform: translateX(5px);
}

.nav-link.active {
    background: rgba(255,255,255,0.2);
    color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Toggle Sidebar Button */
#sidebarCollapse {
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1050;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-speed) ease;
}

#sidebarCollapse:hover {
    transform: scale(1.1);
}

/* Conteúdo Principal */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem;
    width: calc(100% - var(--sidebar-width));
    min-height: calc(100vh - var(--footer-height));
    overflow-x: hidden;
    margin-bottom: var(--footer-height);
    transition: all var(--transition-speed) ease-in-out;
}

/* Content Wrapper */
.content-wrapper {
    max-width: 1600px;
    margin: 0 auto;
}

.content-wrapper h2 {
    font-family: var(--font-primary);
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.content-wrapper h2 .page-title {
    font-weight: 700;
    color: var(--primary-color);
}

.content-wrapper h2 .divider {
    margin: 0 10px;
    opacity: 0.5;
}

.content-wrapper h2 .system-title {
    font-size: 0.9rem;
    opacity: 0.6;
    font-weight: 500;
}

/* Cards do Dashboard */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    transition: all var(--transition-speed) ease;
    overflow: hidden;
    background: white;
    height: 100%;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
    color: var(--dark-color);
    display: flex;
    align-items: center;
}

.card-title i {
    margin-right: 10px;
    color: var(--primary-color);
}

/* Dashboard Card Stats */
.dashboard-card {
    position: relative;
    overflow: hidden;
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    transition: all var(--transition-speed) ease;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.dashboard-card .card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.9;
    color: white;
}

.dashboard-card .stat-title {
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    opacity: 0.9;
    font-family: var(--font-primary);
    font-weight: 600;
    color: white;
}

.dashboard-card .stat-value {
    font-size: 2.2rem;
    font-weight: bold;
    margin: 10px 0;
    font-family: var(--font-primary);
    font-weight: 700;
    color: white;
}

.dashboard-card .stat-subtitle {
    font-size: 0.85rem;
    opacity: 0.8;
    color: white;
}

/* Cores dos Cards */
.bg-gradient-primary {
    background: var(--primary-gradient);
}

.bg-gradient-success {
    background: linear-gradient(45deg, #2ecc71, #1abc9c);
}

.bg-gradient-warning {
    background: linear-gradient(45deg, #f39c12, #f1c40f);
}

.bg-gradient-danger {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
}

.bg-gradient-info {
    background: linear-gradient(45deg, #3498db, #2980b9);
}

/* Gráficos */
.chart-container {
    position: relative;
    width: 100%;
    min-height: 200px;
    max-height: 300px;
    margin: 0 auto;
}

/* Formulários */
.form-control {
    border-radius: 8px;
    padding: 0.75rem 1rem;
    border: 1px solid #e0e0e0;
    font-family: var(--font-primary);
    transition: all 0.2s;
    font-size: 0.95rem;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(106, 17, 203, 0.25);
}

.form-control:hover {
    border-color: #adb5bd;
}

.form-label {
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: #495057;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group .form-control {
    border-radius: 0 8px 8px 0;
}

.input-group-text {
    background-color: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px 0 0 8px;
    font-size: 0.9rem;
    color: #6c757d;
}

.input-group-text i {
    width: 16px;
    text-align: center;
}

/* Botões */
.btn {
    border-radius: 8px;
    padding: 0.6rem 1.25rem;
    font-weight: 500;
    transition: all 0.2s;
    font-size: 0.95rem;
    font-family: var(--font-primary);
    box-shadow: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.btn-primary {
    background: var(--primary-gradient);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a0fb5 0%, #1565C0 100%);
}

/* Tabelas */
.table {
    --bs-table-hover-bg: rgba(106, 17, 203, 0.05);
    margin-bottom: 0;
}

.table thead {
    background-color: rgba(106, 17, 203, 0.1);
}

.table thead th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.03em;
    border-bottom: none;
    padding: 1rem;
    vertical-align: middle;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-color: rgba(0,0,0,0.05);
}

.table-striped>tbody>tr:nth-of-type(odd) {
    --bs-table-accent-bg: rgba(106, 17, 203, 0.02);
}

/* DataTables */
.dataTables_wrapper .dataTables_length, 
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 1.5rem;
}

.dataTables_wrapper .dataTables_info, 
.dataTables_wrapper .dataTables_paginate {
    margin-top: 1.5rem;
}

.dataTables_wrapper .dataTables_filter input {
    margin-left: 0.5rem;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    padding: 0.5rem 1rem;
}

.dataTables_wrapper .dataTables_length select {
    margin: 0 0.5rem;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    padding: 0.5rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    margin: 0 3px;
    border-radius: 6px;
    border: none !important;
    background: none !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--primary-gradient) !important;
    color: white !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: rgba(106, 17, 203, 0.1) !important;
    color: var(--primary-color) !important;
}

/* Footer */
.footer {
    background-color: white;
    border-top: 1px solid rgba(0,0,0,0.05);
    padding: 0.75rem 0;
    height: var(--footer-height);
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 1030;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
    font-size: 0.85rem;
    color: #6c757d;
}

.footer-brand,
.footer-email,
.footer-contact {
    color: #6c757d;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
}

.footer-brand:hover,
.footer-email:hover,
.footer-contact:hover {
    color: var(--primary-color);
}

.footer-divider {
    margin: 0 10px;
    color: #adb5bd;
}

/* Perfil de Usuário */
.profile-pic {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.profile-pic-large {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.profile-pic-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.profile-pic-placeholder-large {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 32px;
    margin: 0 auto;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

/* Dropdown Menu do Usuário */
.dropdown-menu {
    border: none;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    padding: 0.5rem 0;
}

.dropdown-header {
    background-color: #f8f9fa;
    padding: 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.dropdown-item {
    padding: 0.75rem 1.5rem;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.dropdown-item:hover {
    background-color: rgba(106, 17, 203, 0.05);
    transform: translateX(5px);
}

.dropdown-item.text-danger:hover {
    background-color: #dc3545;
    color: white !important;
}

.dropdown-item i {
    width: 20px;
    margin-right: 10px;
    text-align: center;
}

#userMenu {
    border: 1px solid #e0e0e0;
    padding: 0.5rem 1rem;
    font-weight: 500;
    border-radius: 8px;
    background-color: white;
    display: flex;
    align-items: center;
}

#userMenu:hover {
    background-color: #f8f9fa;
    border-color: #adb5bd;
}

/* Alertas */
.alert {
    border-radius: 10px;
    border: none;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    padding: 1rem 1.5rem;
}

.alert-success {
    background-color: rgba(46, 204, 113, 0.1);
    color: #27ae60;
}

.alert-danger {
    background-color: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

.alert-warning {
    background-color: rgba(241, 196, 15, 0.1);
    color: #f39c12;
}

.alert-info {
    background-color: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.slide-in {
    animation: slideInDown 0.5s ease-out;
}

/* Responsividade */
@media (max-width: 992px) {
    .content-wrapper h2 {
        font-size: 1.3rem;
    }
    
    .content-wrapper h2 .system-title {
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    :root {
        --sidebar-width: 250px;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 1.5rem;
    }
    
    #sidebarCollapse {
        display: flex;
    }
    
    .sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
        box-shadow: none;
    }
    
    .sidebar.active {
        margin-left: 0;
        box-shadow: var(--sidebar-shadow);
    }
    
    .content-wrapper h2 {
        font-size: 1.2rem;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .content-wrapper h2 .system-title {
        font-size: 0.7rem;
        margin-top: 5px;
    }
    
    .content-wrapper h2 .divider {
        display: none;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 2px;
        font-size: 0.75rem;
    }
    
    .footer-divider {
        display: none;
    }
}

@media (max-width: 576px) {
    .main-content {
        padding: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .form-control {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }
} 