:root {
    --primary-color: #2E7D32;
    --secondary-color: #66BB6A;
    --accent-color: #1B5E20;
    --light-bg: #F1F8E9;
    --danger-color: #D32F2F;
    --warning-color: #F57C00;
    --info-color: #0288D1;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* Navbar */
.navbar-dark.bg-success {
    background-color: var(--primary-color) !important;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 56px;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
    overflow-y: auto;
}

.sidebar .nav-link {
    font-weight: 500;
    color: #333;
    padding: 12px 20px;
    transition: all 0.3s;
}

.sidebar .nav-link:hover {
    background-color: var(--light-bg);
    color: var(--primary-color);
}

.sidebar .nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

.sidebar .nav-link i {
    margin-right: 8px;
}

/* Main content */
main {
    margin-top: 56px;
    padding-top: 20px;
}

/* Stat cards */
.stat-card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.stat-card.stat-primary {
    border-left: 4px solid var(--primary-color);
}

.stat-card.stat-success {
    border-left: 4px solid var(--secondary-color);
}

.stat-card.stat-danger {
    border-left: 4px solid var(--danger-color);
}

.stat-card.stat-warning {
    border-left: 4px solid var(--warning-color);
}

.stat-card.stat-info {
    border-left: 4px solid var(--info-color);
}

.stat-icon {
    font-size: 40px;
    color: var(--primary-color);
    opacity: 0.3;
}

/* Cards */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.card-header {
    background-color: var(--light-bg);
    border-bottom: 2px solid var(--primary-color);
    font-weight: 600;
}

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

.table thead th {
    background-color: var(--light-bg);
    color: var(--accent-color);
    font-weight: 600;
    border-bottom: 2px solid var(--primary-color);
}

.table-hover tbody tr:hover {
    background-color: var(--light-bg);
}

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

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

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

/* Badges */
.badge {
    padding: 6px 12px;
    font-weight: 500;
}

/* Forms */
.form-control:focus,
.form-select:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 187, 106, 0.25);
}

/* User info in navbar */
.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Offcanvas móvil */
.offcanvas .nav-link {
    font-weight: 500;
    color: #333;
    padding: 12px 20px;
    transition: all 0.3s;
    border-radius: 8px;
    margin-bottom: 5px;
}

.offcanvas .nav-link:hover {
    background-color: var(--light-bg);
    color: var(--primary-color);
}

.offcanvas .nav-link i {
    margin-right: 8px;
    width: 20px;
    text-align: center;
}

.offcanvas .nav-link.text-danger:hover {
    background-color: #ffebee;
    color: var(--danger-color) !important;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        position: relative;
        top: 0;
    }
    
    main {
        margin-top: 0;
        padding-top: 10px;
    }
    
    .stat-card {
        margin-bottom: 15px;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
}

/* Image preview */
.image-preview {
    max-width: 200px;
    max-height: 200px;
    margin-top: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Loading spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Alert animations */
.alert {
    animation: slideIn 0.3s ease-in-out;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

