/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #06b6d4;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f1f5f9;
    color: #334155;
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header i {
    font-size: 60px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.login-header h2 {
    color: var(--dark-color);
    margin-bottom: 10px;
}

.login-header p {
    color: var(--secondary-color);
}

.login-footer {
    text-align: center;
    margin-top: 20px;
}

/* Wrapper & Sidebar */
.wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #1e3a8a 0%, #1e40af 100%);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: all 0.3s;
    z-index: 1000;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-header {
    padding: 25px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header i {
    font-size: 40px;
    margin-bottom: 10px;
}

.sidebar-header h3 {
    font-size: 20px;
    font-weight: 600;
}

.sidebar.collapsed .sidebar-header h3 {
    display: none;
}

.sidebar-menu {
    list-style: none;
    padding: 15px 0;
}

.sidebar-menu li {
    margin: 5px 0;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-left: 4px solid white;
}

.sidebar-menu a i {
    width: 30px;
    font-size: 18px;
}

.sidebar.collapsed .sidebar-menu a span {
    display: none;
}

.menu-divider {
    padding: 15px 20px 5px;
    font-size: 12px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
}

/* Main Content */
#content {
    width: calc(100% - var(--sidebar-width));
    margin-left: var(--sidebar-width);
    transition: all 0.3s;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.sidebar.collapsed ~ #content {
    width: calc(100% - var(--sidebar-collapsed-width));
    margin-left: var(--sidebar-collapsed-width);
}

/* Top Navigation */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 15px 20px;
}

#sidebarCollapse {
    border: none;
    background: transparent;
    font-size: 20px;
}

.navbar .dropdown-toggle {
    text-decoration: none;
    color: var(--dark-color);
}

.navbar .dropdown-toggle:hover {
    color: var(--primary-color);
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.page-header h2 {
    color: var(--dark-color);
    font-size: 28px;
    font-weight: 600;
    margin: 0;
}

.page-header h2 i {
    margin-right: 10px;
    color: var(--primary-color);
}

.page-actions {
    display: flex;
    gap: 10px;
}

/* Cards */
.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: none;
    margin-bottom: 25px;
}

.card-header {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 20px;
    border-radius: 10px 10px 0 0;
}

.card-header h5 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--dark-color);
}

.card-body {
    padding: 25px;
}

/* Stat Cards */
.stat-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
}

.stat-primary .stat-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.stat-success .stat-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.stat-warning .stat-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.stat-info .stat-icon {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: white;
}

.stat-content h3 {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 5px 0;
    color: var(--dark-color);
}

.stat-content p {
    margin: 0;
    color: var(--secondary-color);
    font-size: 14px;
}

/* Today Stats */
.today-stats {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.today-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
}

.today-item .label {
    font-weight: 600;
    color: var(--secondary-color);
}

.today-item .value {
    font-weight: 700;
    font-size: 18px;
    color: var(--dark-color);
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table thead th {
    background: #f8fafc;
    color: var(--dark-color);
    font-weight: 600;
    border-bottom: 2px solid #e2e8f0;
    padding: 15px;
}

.table tbody td {
    padding: 15px;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: #f8fafc;
}

/* Badges */
.badge {
    padding: 6px 12px;
    font-weight: 500;
    font-size: 12px;
}

.badge-primary {
    background-color: var(--primary-color);
}

.badge-success {
    background-color: var(--success-color);
}

.badge-warning {
    background-color: var(--warning-color);
}

.badge-danger {
    background-color: var(--danger-color);
}

.badge-info {
    background-color: var(--info-color);
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn i {
    margin-right: 5px;
}

.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 13px;
}

/* Footer */
.footer {
    background: white;
    padding: 20px;
    text-align: center;
    border-top: 1px solid #e2e8f0;
    margin-top: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
    }
    
    .sidebar.active {
        margin-left: 0;
    }
    
    #content {
        width: 100%;
        margin-left: 0;
    }
    
    .stat-card {
        margin-bottom: 15px;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Alerts */
.alert {
    border-radius: 8px;
    border: none;
    padding: 15px 20px;
}

/* Form Controls */
.form-control,
.form-select {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 10px 15px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.15);
}

.form-label {
    font-weight: 500;
    color: var(--dark-color);
    margin-bottom: 8px;
}

/* Pagination */
.pagination {
    margin-top: 20px;
}

.page-link {
    border-radius: 8px;
    margin: 0 3px;
    color: var(--primary-color);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Loading Spinner */
.spinner-border {
    width: 1.5rem;
    height: 1.5rem;
}

