:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --info-color: #16a085;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --sidebar-width: 250px;
}

h1, h2, h3, h4, h5, h6 { font-size: 14px; font-weight: 600; margin: 0; }
h2 { font-size: 16px; }
h3 { font-size: 15px; }
h4 { font-size: 14px; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 12px;
    background-color: #f4f6f9;
    overflow-x: hidden;
}

.wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--primary-color);
    color: #fff;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: all 0.3s;
}

.sidebar-header {
    padding: 20px;
    background: #1a252f;
    text-align: center;
}

.sidebar-header h4 {
    margin: 0;
    font-weight: 600;
}

.sidebar .nav-link {
    color: #bdc3c7;
    padding: 10px 15px;
    font-size: 12px;
    border-left: 3px solid transparent;
    transition: all 0.3s;
}

.sidebar .nav-link:hover, .sidebar .nav-link.active {
    background: #1a252f;
    color: #fff;
    border-left-color: var(--secondary-color);
}

.sidebar .nav-link i {
    width: 25px;
    margin-right: 10px;
}

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 20px;
    transition: all 0.3s;
}

.topbar {
    background: #fff;
    padding: 15px 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    border-radius: 5px;
}

.card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.card-header {
    background: #fff;
    border-bottom: 1px solid #eee;
    font-weight: 600;
    padding: 15px 20px;
}

.stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.stat-card .icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 15px;
}

.stat-card .icon.blue { background: rgba(52, 152, 219, 0.1); color: var(--secondary-color); }
.stat-card .icon.green { background: rgba(39, 174, 96, 0.1); color: var(--success-color); }
.stat-card .icon.orange { background: rgba(243, 156, 18, 0.1); color: var(--warning-color); }
.stat-card .icon.red { background: rgba(231, 76, 60, 0.1); color: var(--danger-color); }

.stat-card h3 {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}

.stat-card p {
    color: #7f8c8d;
    margin: 5px 0 0 0;
}

.table-responsive {
    overflow-x: auto;
}

.dataTables_wrapper {
    padding: 15px 0;
}

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

.btn-primary { background: var(--secondary-color); border: none; }
.btn-primary:hover { background: #2980b9; }

.btn-success { background: var(--success-color); border: none; }
.btn-danger { background: var(--danger-color); border: none; }
.btn-warning { background: var(--warning-color); border: none; }

.badge {
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
}

.form-control {
    border-radius: 5px;
    border: 1px solid #ddd;
    padding: 10px 15px;
}

.form-control:focus {
    border-color: var(--secondary-color);
    box-shadow: none;
}

.modal-content {
    border-radius: 10px;
}

.page-header {
    margin-bottom: 20px;
}

.page-header h2 {
    margin: 0;
    font-weight: 600;
    color: var(--primary-color);
}

.alert {
    border-radius: 5px;
}

.nav-tabs .nav-link {
    border: none;
    color: #7f8c8d;
}

.nav-tabs .nav-link.active {
    border-bottom: 3px solid var(--secondary-color);
    color: var(--secondary-color);
}

.time-table {
    width: 100%;
}

.time-table th, .time-table td {
    padding: 10px;
    text-align: center;
    border: 1px solid #ddd;
}

.time-table th {
    background: var(--primary-color);
    color: #fff;
}

.time-table tr:nth-child(even) {
    background: #f9f9f9;
}

.student-photo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--secondary-color);
}

@media (max-width: 768px) {
    .sidebar {
        margin-left: -250px;
    }
    .sidebar.active {
        margin-left: 0;
    }
    .main-content {
        margin-left: 0;
    }
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.login-box {
    background: #fff;
    border-radius: 10px;
    padding: 40px;
    width: 400px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.login-box h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.attendance-mark {
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 5px;
    display: inline-block;
}

.attendance-mark.present { background: #d4edda; color: #155724; }
.attendance-mark.absent { background: #f8d7da; color: #721c24; }
.attendance-mark.late { background: #fff3cd; color: #856404; }

.print-only { display: none; }

@media print {
    .no-print { display: none !important; }
    .print-only { display: block !important; }
    body { background: #fff; }
    .card { box-shadow: none; border: 1px solid #ddd; }
}