/* PRESENSI HEADER & STATS */
.page-header {
    margin-bottom: 25px;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.page-header p {
    color: var(--text-gray);
    font-size: 0.95rem;
}

.presensi-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.p-stat-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e2e8f0;
    transition: var(--transition);
}

.p-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.p-stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.p-stat-info h3 {
    font-size: 1.4rem;
    color: var(--text-dark);
    margin-bottom: 2px;
    font-weight: 700;
}

.p-stat-info p {
    font-size: 13px;
    color: var(--text-gray);
    font-weight: 600;
}

/* Legend section */
.legend-section {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e2e8f0;
}

.legend-title {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 14px;
    border-right: 2px solid #e2e8f0;
    padding-right: 20px;
}

.legend-items {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-gray);
}

.symbol-box {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

/* Status Colors */
.status-hadir {
    background-color: var(--success-light);
    color: var(--success);
}

.status-absen {
    background-color: var(--danger-light);
    color: var(--danger);
}

.status-sakit {
    background-color: var(--warning-light);
    color: var(--warning);
}

.status-izin {
    background-color: var(--info-light);
    color: var(--info);
}

.status-empty {
    background-color: var(--bg-color);
    color: var(--text-light);
}

/* TABLE CARD */
.table-container {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 40px;
    border: 1px solid #e2e8f0;
}

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

.presensi-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

.presensi-table th {
    background: var(--bg-color);
    padding: 16px 12px;
    font-size: 12px;
    color: var(--text-gray);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e2e8f0;
    text-align: center;
}

.presensi-table th:first-child {
    text-align: left;
    padding-left: 24px;
    width: 250px;
}

.presensi-table td {
    padding: 12px;
    border-bottom: 1px solid #e2e8f0;
    text-align: center;
    vertical-align: middle;
}

.presensi-table td:first-child {
    text-align: left;
    padding-left: 24px;
    font-weight: 600;
    color: var(--text-dark);
}

.presensi-table tbody tr {
    transition: var(--transition);
}

.presensi-table tbody tr:hover {
    background-color: var(--primary-light);
}

/* Percentage Bar in Mapel Name */
.mapel-name-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.progress-container {
    width: 100%;
    background-color: #e2e8f0;
    border-radius: 4px;
    height: 6px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary-color);
    border-radius: 4px;
}

.progress-text {
    font-size: 11px;
    color: var(--text-light);
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .presensi-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .presensi-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .legend-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .legend-title {
        border-right: none;
        border-bottom: 2px solid #e2e8f0;
        padding-right: 0;
        padding-bottom: 10px;
        width: 100%;
    }
}

