/* Variables */
:root {
    --primary: #0066cc;
    --primary-dark: #004c99;
    --primary-light: #e6f0ff;
    --text-dark: #000000;
    --text-light: #ffffff;
    --background-light: #f8f9fc;
    --border-color: #e3e6f0;
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --success-color: #2ecc71;
    --danger-color: #e74c3c;
    --warning-color: #f1c40f;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --sidebar-width: 250px;
    --top-nav-height: 60px;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', sans-serif;
    background-color: var(--background-light);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Layout Structure */
.wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
#sidebar {
    width: var(--sidebar-width);
    background: var(--primary-color);
    color: var(--text-light);
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

#sidebar.active {
    margin-left: calc(-1 * var(--sidebar-width));
}

.sidebar-wrapper {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h5 {
    margin: 0;
    font-size: 1.25rem;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.3s ease;
}

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

.sidebar-nav li a i {
    margin-right: 10px;
    width: 20px;
}

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

/* Content Area */
#content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background: var(--background-light);
    transition: all 0.3s ease;
    width: calc(100% - var(--sidebar-width));
}

#content.active {
    margin-left: 0;
    width: 100%;
}

.content-wrapper {
    padding: 20px;
}

/* Toggle Button */
#sidebarToggle {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    #sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
    }
    
    #sidebar.active {
        margin-left: 0;
    }
    
    #content {
        margin-left: 0;
        width: 100%;
    }
    
    #content.active {
        margin-left: var(--sidebar-width);
        width: calc(100% - var(--sidebar-width));
    }
    
    #sidebarToggle {
        display: block;
        margin: 10px;
    }
}

/* Card Styles */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    }

.card-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    background-color: white;
}

.card-body {
    padding: 1rem;
}

/* Table Styles */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.table th,
.table td {
    padding: 0.75rem;
    vertical-align: middle;
    border-top: 1px solid var(--border-color);
}

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid var(--border-color);
    background-color: var(--background-light);
}

/* Button Styles */
.btn-group {
    display: flex;
    gap: 0.5rem;
}

.btn {
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    transition: all 0.15s ease-in-out;
}

.btn-primary {
    background-color: var(--primary);
    border: 1px solid var(--primary);
    color: white;
}

.btn-danger {
    background-color: var(--danger-color);
    border: 1px solid var(--danger-color);
    color: white;
}

.btn-success {
    background-color: var(--success-color);
    border: 1px solid var(--success-color);
    color: white;
}

/* Alert Styles */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.25rem;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

/* Chart Styles */
canvas {
    max-width: 100%;
    height: auto;
}