/* Estilos gerais */
:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --success-color: #2ecc71;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --info-color: #3498db;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --body-bg: #f5f8fa;
    --sidebar-bg: #2c3e50;
    --sidebar-color: #ecf0f1;
    --header-bg: #ffffff;
    --card-bg: #ffffff;
    --border-color: #dee2e6;
    --transition-speed: 0.3s;
}

body {
    background-color: var(--body-bg);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: background-color var(--transition-speed);
}

.wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 999;
    background: var(--sidebar-bg);
    color: var(--sidebar-color);
    transition: all var(--transition-speed);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar.collapsed {
    width: 80px;
}

.sidebar-header {
    padding: 20px;
    background: rgba(0, 0, 0, 0.1);
    text-align: center;
}

.logo-container {
    margin-bottom: 10px;
}

.logo {
    max-width: 100%;
    height: 60px;
}

.sidebar .list-unstyled {
    padding: 20px 0;
}

.sidebar .list-unstyled li {
    padding: 0;
}

.sidebar .list-unstyled li a {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    color: var(--sidebar-color);
    text-decoration: none;
    transition: all var(--transition-speed);
}

.sidebar .list-unstyled li a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar .list-unstyled li.active a {
    background: var(--primary-color);
    color: white;
}

.sidebar .list-unstyled li a i {
    margin-right: 10px;
    font-size: 1.2rem;
    min-width: 25px;
    text-align: center;
}

.sidebar.collapsed .list-unstyled li a span {
    display: none;
}

.sidebar.collapsed .sidebar-header h3 {
    display: none;
}

/* Content */
.content-wrapper {
    width: calc(100% - 250px);
    margin-left: 250px;
    transition: all var(--transition-speed);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.sidebar.collapsed + .content-wrapper {
    width: calc(100% - 80px);
    margin-left: 80px;
}

/* Header */
.main-header {
    background: var(--header-bg);
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.sidebar-toggle {
    color: var(--dark-color);
    font-size: 1.5rem;
    padding: 0;
}

/* Main content */
.main-content {
    padding: 20px;
    flex: 1;
}

/* Footer */
.main-footer {
    background: var(--header-bg);
    padding: 15px 0;
    border-top: 1px solid var(--border-color);
}

/* Cards */
.card {
    border-radius: 10px;
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    background: var(--card-bg);
    transition: all var(--transition-speed);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 15px 20px;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table th {
    border-top: none;
    font-weight: 600;
}

/* Forms */
.form-control, .form-select {
    border-radius: 5px;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
}

.form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 0.25rem rgba(52, 152, 219, 0.25);
    border-color: var(--primary-color);
}

/* Buttons */
.btn {
    border-radius: 5px;
    padding: 8px 16px;
    transition: all var(--transition-speed);
}

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

.btn-primary:hover {
    background-color: #2980b9;
    border-color: #2980b9;
}

/* Theme switch */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
}

.theme-switch {
    display: inline-block;
    position: relative;
    width: 50px;
    height: 25px;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 19px;
    width: 19px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    z-index: 2;
}

.slider .bi-sun {
    color: #f39c12;
    font-size: 12px;
    margin-left: auto;
}

.slider .bi-moon-stars {
    color: #2c3e50;
    font-size: 12px;
}

input:checked + .slider {
    background-color: #2c3e50;
}

input:checked + .slider:before {
    transform: translateX(25px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        margin-left: -250px;
    }
    
    .sidebar.active {
        margin-left: 0;
    }
    
    .content-wrapper {
        width: 100%;
        margin-left: 0;
    }
    
    .sidebar.active + .content-wrapper {
        width: calc(100% - 250px);
        margin-left: 250px;
    }
}

/* Modal */
.modal-content {
    border-radius: 10px;
    border: none;
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    background-color: var(--light-color);
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
}

/* Dashboard cards */
.dashboard-card {
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    color: white;
    transition: all var(--transition-speed);
}

.dashboard-card.primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.dashboard-card.success {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.dashboard-card.warning {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.dashboard-card.danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.dashboard-card .icon {
    font-size: 3rem;
    opacity: 0.5;
}

.dashboard-card .count {
    font-size: 2rem;
    font-weight: bold;
}

.dashboard-card .title {
    font-size: 1rem;
    opacity: 0.8;
}

/* Filtros */
.filter-section {
    margin-bottom: 20px;
    padding: 15px;
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* Paginação */
.pagination {
    margin-bottom: 0;
}

.pagination .page-item .page-link {
    color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Login page */
.login-page {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3498db, #2c3e50);
}

.login-box {
    width: 400px;
    padding: 30px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo img {
    height: 80px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form .btn {
    width: 100%;
    padding: 12px;
}
