:root {
--primary: #0D7C4A;
--primary-dark: #0A6338;
--primary-light: #12A362;
--secondary: #D4A843;
--secondary-dark: #C49A35;
--dark: #1B1B2F;
--light-bg: #F8F9FA;
--sidebar-width: 250px;
--sidebar-collapsed: 70px;
--transition-speed: 0.3s;
}

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

body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background: var(--light-bg);
overflow-x: hidden;
}

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

.sidebar {
width: var(--sidebar-width);
min-height: 100vh;
background: var(--primary);
color: #fff;
position: fixed;
left: 0;
top: 0;
z-index: 1000;
transition: all var(--transition-speed) ease;
display: flex;
flex-direction: column;
overflow-y: auto;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: rgba(255,255,255,0.1); }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.3); border-radius: 4px; }
.sidebar::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.5); }

.sidebar-logo {
padding: 20px 20px 10px;
border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo h5 { font-size: 1.1rem; letter-spacing: 0.5px; }
.sidebar-logo small { font-size: 0.75rem; }

.sidebar-nav {
padding: 10px 0;
flex: 1;
}

.sidebar-nav .nav-link {
color: rgba(255,255,255,0.8);
padding: 12px 20px;
font-size: 0.9rem;
display: flex;
align-items: center;
gap: 12px;
transition: all var(--transition-speed) ease;
border-left: 3px solid transparent;
}

.sidebar-nav .nav-link:hover {
color: #fff;
background: rgba(255,255,255,0.1);
border-left-color: var(--secondary);
}

.sidebar-nav .nav-link.active {
color: #fff;
background: rgba(255,255,255,0.15);
border-left-color: var(--secondary);
font-weight: 600;
}

.sidebar-nav .nav-link i { width: 20px; text-align: center; font-size: 1.1rem; }

.sidebar-footer {
padding: 15px 20px;
border-top: 1px solid rgba(255,255,255,0.1);
}

#page-content-wrapper {
width: calc(100% - var(--sidebar-width));
margin-left: var(--sidebar-width);
transition: all var(--transition-speed) ease;
display: flex;
flex-direction: column;
min-height: 100vh;
}

#content { flex: 1; }

#menu-toggle {
background: var(--primary);
color: #fff;
border: none;
padding: 6px 12px;
border-radius: 6px;
cursor: pointer;
}

#menu-toggle:hover { background: var(--primary-dark); }

.navbar { min-height: 60px; }

.bg-emerald { background-color: var(--primary) !important; }
.text-emerald { color: var(--primary) !important; }
.bg-gold { background-color: var(--secondary) !important; }
.text-gold { color: var(--secondary) !important; }
.btn-emerald {
background-color: var(--primary);
color: #fff;
border: none;
}
.btn-emerald:hover {
background-color: var(--primary-dark);
color: #fff;
}
.btn-emerald-outline {
background: transparent;
color: var(--primary);
border: 1px solid var(--primary);
}
.btn-emerald-outline:hover {
background: var(--primary);
color: #fff;
}
.btn-gold {
background-color: var(--secondary);
color: #1B1B2F;
border: none;
}
.btn-gold:hover {
background-color: var(--secondary-dark);
color: #1B1B2F;
}

.card {
border: none;
border-radius: 12px;
box-shadow: 0 2px 12px rgba(0,0,0,0.06);
transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.1); }

.card-header {
background: transparent;
border-bottom: 1px solid rgba(0,0,0,0.05);
font-weight: 600;
padding: 15px 20px;
}

.stat-card {
padding: 20px;
border-radius: 12px;
color: #fff;
position: relative;
overflow: hidden;
}

.stat-card .stat-icon {
font-size: 2.5rem;
opacity: 0.3;
position: absolute;
right: 15px;
top: 15px;
}

.stat-card .stat-label { font-size: 0.85rem; opacity: 0.85; }
.stat-card .stat-value { font-size: 1.8rem; font-weight: 700; margin: 5px 0; }

.stat-card.gradient-1 { background: linear-gradient(135deg, #0D7C4A, #12A362); }
.stat-card.gradient-2 { background: linear-gradient(135deg, #D4A843, #E8C45A); }
.stat-card.gradient-3 { background: linear-gradient(135deg, #1B1B2F, #2D2D4F); }
.stat-card.gradient-4 { background: linear-gradient(135deg, #E74C3C, #FF6B6B); }
.stat-card.gradient-5 { background: linear-gradient(135deg, #3498DB, #5DADE2); }
.stat-card.gradient-6 { background: linear-gradient(135deg, #9B59B6, #AF7AC5); }

.table {
margin-bottom: 0;
font-size: 0.9rem;
}

.table thead th {
background: var(--light-bg);
color: var(--dark);
font-weight: 600;
font-size: 0.8rem;
text-transform: uppercase;
letter-spacing: 0.5px;
border-bottom: 2px solid var(--primary);
padding: 12px 15px;
}

.table td { padding: 12px 15px; vertical-align: middle; }
.table-hover tbody tr:hover { background: rgba(13,124,74,0.03); }

.badge { padding: 5px 10px; font-weight: 500; font-size: 0.75rem; border-radius: 20px; }
.badge.bg-warning { background: #F39C12 !important; color: #fff; }
.badge.bg-success { background: var(--primary) !important; }
.badge.bg-danger { background: #E74C3C !important; }
.badge.bg-info { background: #3498DB !important; }
.badge.bg-secondary { background: #95A5A6 !important; }

.dataTables_wrapper .dataTables_filter input {
border: 1px solid #ddd;
border-radius: 8px;
padding: 6px 12px;
}

.dataTables_wrapper .dataTables_filter input:focus {
border-color: var(--primary);
box-shadow: 0 0 0 2px rgba(13,124,74,0.2);
outline: none;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
background: var(--primary) !important;
border-color: var(--primary) !important;
color: #fff !important;
border-radius: 6px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
background: var(--primary-light) !important;
border-color: var(--primary-light) !important;
color: #fff !important;
}

.form-control, .form-select {
border-radius: 8px;
border: 1px solid #ddd;
padding: 10px 14px;
font-size: 0.9rem;
transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus, .form-select:focus {
border-color: var(--primary);
box-shadow: 0 0 0 3px rgba(13,124,74,0.15);
outline: none;
}

.form-switch .form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }

.modal-content { border: none; border-radius: 12px; }
.modal-header { border-bottom: 1px solid rgba(0,0,0,0.05); }
.modal-footer { border-top: 1px solid rgba(0,0,0,0.05); }
.modal .btn-close:focus { box-shadow: none; }

.progress {
border-radius: 10px;
height: 8px;
background: #eee;
}

.progress-bar { background: var(--primary); border-radius: 10px; }

.nav-tabs .nav-link {
color: var(--dark);
font-weight: 500;
border: none;
padding: 10px 20px;
}

.nav-tabs .nav-link.active {
color: var(--primary);
border-bottom: 2px solid var(--primary);
background: transparent;
}

.nav-tabs .nav-link:hover { color: var(--primary); border-bottom: 2px solid transparent; }

.chart-container { position: relative; height: 300px; width: 100%; }

.cursor-pointer { cursor: pointer; }

.page-loader {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(255,255,255,0.8);
display: flex;
align-items: center;
justify-content: center;
z-index: 9999;
}

.toast { border-radius: 10px; }

@media (max-width: 768px) {
.sidebar {
margin-left: calc(var(--sidebar-width) * -1);
}
.sidebar.show {
margin-left: 0;
}
#page-content-wrapper {
width: 100%;
margin-left: 0;
}
.stat-card .stat-value { font-size: 1.4rem; }
}

@media (min-width: 769px) and (max-width: 1024px) {
.sidebar { width: 200px; }
#page-content-wrapper { width: calc(100% - 200px); margin-left: 200px; }
}
