:root {
    --primary-color: #4267B2;
    --secondary-color: #365899;
    --light-bg: #f0f2f5;
    --border-color: #ddd;
    --text-color: #333;
    --sidebar-width: 250px;
}

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

/* Sidebar Styles */
.sidebar {
    background-color: var(--primary-color);
    transition: all 0.3s;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar .nav-link {
    color: #fff;
    border-radius: 5px;
    margin-bottom: 5px;
    padding:7px;
    transition: all 0.2s;
}

.sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    font-weight: 500;
}

/* Card styles */
.card {
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
    border: none;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    padding: 15px 20px;
    border-top-left-radius: 10px !important;
    border-top-right-radius: 10px !important;
}

.card-body {
    padding: 20px;
}

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

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn {
    border-radius: 5px;
    padding: 8px 16px;
}

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

.form-control:focus {
    box-shadow: 0 0 0 0.25rem rgba(66, 103, 178, 0.25);
    border-color: var(--primary-color);
}

/* Dashboard Stats */
.stat-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    padding: 20px;
    margin-bottom: 20px;
    transition: transform 0.2s;
}

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

.stat-card .stat-icon {
    font-size: 32px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: rgba(66, 103, 178, 0.1);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.stat-card .stat-value {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-card .stat-label {
    color: #777;
    font-size: 14px;
}

/* Table Styles */
.table {
    border-collapse: separate;
    border-spacing: 0;
}

.table th {
    background-color: #f8f9fa;
    vertical-align: middle;
}

.table-striped > tbody > tr:nth-child(odd) > td,
.table-striped > tbody > tr:nth-child(odd) > th {
    background-color: #f8f9fa;
}

.table-hover tbody tr:hover {
    background-color: rgba(66, 103, 178, 0.05);
}

/* Badges */
.badge {
    font-weight: normal;
    padding: 6px 10px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: fixed;
        z-index: 999;
        height: 100%;
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .card-deck {
        display: block;
    }
    
    .card {
        margin-bottom: 20px;
    }
}

/* Data tables */
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 5px 10px;
}

.dataTables_wrapper .dataTables_length select {
    padding: 5px;
    border-radius: 5px;
    border: 1px solid var(--border-color);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--primary-color);
    color: white !important;
    border: 1px solid var(--primary-color);
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--secondary-color);
    color: white !important;
    border: 1px solid var(--secondary-color);
}

/* Attendance status colors */
.hadir { color: #198754; }
.sakit { color: #ffc107; }
.izin { color: #0dcaf0; }
.alpa { color: #dc3545; }

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

/* Animations */
.fade-in {
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
