* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f4f9;
    color: #333;
    line-height: 1.6;
}

.main-content {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.dashboard-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.subtitle {
    font-size: 14px;
    font-weight: 400;
    color: #666;
}

/* Lịch dạy hôm nay */
.schedule-item {
    display: block;
}

.schedule-details {
    width: 100%;
}

.time-slot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

.time-slot:last-child {
    border-bottom: none;
}

.time-slot.header-row {
    font-weight: 600;
    padding-bottom: 12px;
    margin-bottom: 8px;
    border-bottom: 2px solid #e0e0e0;
}

.time-slot .time {
    font-size: 14px;
    color: #333;
    min-width: 100px;
}

.time-slot .teacher {
    font-size: 14px;
    color: #a4d65e;
    font-weight: 500;
    text-align: right;
}

.time-slot.header-row .time {
    color: #333;
    font-weight: 600;
}

.time-slot.header-row .teacher {
    color: #666;
    font-weight: 600;
}

/* Tin tức và sự kiện */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.news-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
}

.news-item:last-child {
    border-bottom: none;
}

.news-date {
    font-size: 14px;
    color: #666;
    min-width: 100px;
}

.news-title {
    font-size: 14px;
    color: #a4d65e;
    font-weight: 500;
    text-align: right;
    flex: 1;
}

/* Thống kê giờ dạy */
.chart-container {
    position: relative;
    height: 300px;
    margin-top: 10px;
}

#teachingHoursChart {
    max-height: 300px;
}

/* Thông báo mới */
.notification-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.notification-item {
    padding: 16px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #e0e0e0;
}

.notification-item.urgent {
    background-color: #fff3cd;
    border-left-color: #ffc107;
}

.notification-text {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 768px) {
    .main-content {
        padding: 15px;
    }
    
    .dashboard-container {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-top: 15px;
    }
    
    .card {
        padding: 20px;
        overflow-x: auto; /* Cho phép scroll ngang nếu cần */
    }
    
    .card-title {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .schedule-item {
        display: block;
        min-width: 300px; /* Đảm bảo có đủ không gian */
    }
    
    .time-slot {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        white-space: nowrap; /* Không cho text xuống hàng */
    }
    
    .time-slot.header-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-weight: 600;
        padding-bottom: 12px;
        margin-bottom: 8px;
        border-bottom: 2px solid #e0e0e0;
    }
    
    .time-slot .time {
        font-size: 14px;
        color: #333;
        min-width: 100px;
    }
    
    .time-slot .teacher {
        font-size: 14px;
        color: #a4d65e;
        font-weight: 500;
        text-align: right;
    }
    
    .time-slot.header-row .time {
        color: #333;
        font-weight: 600;
    }
    
    .time-slot.header-row .teacher {
        color: #666;
        font-weight: 600;
        text-align: right;
    }
    
    .news-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 0;
        border-bottom: 1px solid #f5f5f5;
        white-space: nowrap;
        min-width: 300px;
    }
    
    .news-date {
        font-size: 14px;
        color: #666;
        min-width: 100px;
    }
    
    .news-title {
        font-size: 14px;
        color: #a4d65e;
        font-weight: 500;
        text-align: right;
        flex: 1;
    }
    
    .chart-container {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 10px;
    }
    
    .card {
        padding: 16px;
        overflow-x: auto;
    }
    
    .card-title {
        font-size: 15px;
    }
    
    .schedule-item {
        min-width: 280px;
    }
    
    .time-slot {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        white-space: nowrap;
    }
    
    .time-slot.header-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .time-slot .time {
        font-size: 13px;
        min-width: 90px;
    }
    
    .time-slot .teacher {
        font-size: 13px;
        text-align: right;
    }
    
    .news-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        white-space: nowrap;
        min-width: 280px;
    }
    
    .news-date {
        font-size: 13px;
        min-width: 90px;
    }
    
    .news-title {
        font-size: 13px;
        text-align: right;
    }
    
    .chart-container {
        height: 200px;
    }
}
