body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-image: url('/public/images/bg_portal.jpg');
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    margin: 0px auto;
    
}

.footer {
    width: 100%;
}
.page-title { color: #d71920; font-weight: bold; text-transform: uppercase; border-bottom: 2px solid #d71920; padding-bottom: 10px; }
.no-print { @media print { display: none !important; } }

.table-schedule { border-collapse: collapse; width: 100%; background: #fff; }
.table-schedule th { background-color: #d71920; color: #fff; text-align: center; vertical-align: middle; border: 1px solid #999; }
.table-schedule td { border: 1px solid #999; vertical-align: top; padding: 8px; position: relative; }

.table-schedule th.th-today { background-color: #ff0000 !important; color: #ffff00 !important; position: relative; }
.table-schedule th.th-today::before { content: "★"; display: block; color: #ffff00; font-size: 0.8rem; margin-bottom: -5px; background-color: var(--yellow-accent);}

/* Nút thêm nhanh xuất hiện khi hover vào ô */
.td-event-cell {     position: relative;     padding-top: 25px !important; /* Tạo khoảng trống phía trên cho nút thêm nhanh */
    min-height: 100px;    transition: background 0.2s;}
.td-event-cell:hover { background-color: #fff9c4 !important; cursor: pointer; }
/* Nút thêm nhanh - Nằm cố định ở góc trên bên phải của ô */
.btn-quick-add {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #28a745 !important;
    color: #fff !important;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: none; /* Chỉ hiện khi hover */
    align-items: center;
    justify-content: center;
    font-size: 12px;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.td-event-cell:hover .btn-quick-add { display: flex; }

.event-attachment a {
    background: rgba(0, 123, 255, 0.1);
    padding: 2px 5px;
    border-radius: 4px;
    display: inline-block;
    transition: all 0.2s;
}
.event-attachment a:hover {
    background: #007bff;
    color: #fff !important;
}
/* Item sự kiện phiên bản mới */
.event-item-v2 {
    background: #fff;
    border-left: 3px solid #d71920;
    padding: 6px; /* Padding phải rộng để nút sửa/xóa không đè lên chữ */
    margin-bottom: 5px;
    border-radius: 4px;
    font-size: 0.85rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}
.event-item-v2:hover { background: #fdf2f2; transform: translateY(-1px); }

.event-actions {
    position: absolute; right: 5px; top: 50%;
    transform: translateY(-50%); display: none;
    background: rgba(255,255,255,0.9); padding: 2px 5px;
    border-radius: 4px;
}
.event-item-v2:hover .event-actions { display: flex; }
.event-time { color: #d71920; font-weight: bold; margin-right: 3px; }
.event-actions-hover {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    display: none; /* Chỉ hiện khi hover vào item */
    align-items: center;
    background: linear-gradient(to left, rgba(255,255,255,1) 70%, rgba(255,255,255,0));
    padding: 0 5px;
}
    
    .event-item-v2:hover .event-actions-hover {display: flex;align-items: flex-end;background: #ff000000;
}
    .event-actions-hover i {
    cursor: pointer;
    font-size: 14px;
    padding: 5px;
    transition: transform 0.1s;
}
.event-actions-hover i:hover { transform: scale(1.2); }
/* --- PHÂN LOẠI MÀU SẮC SỰ KIỆN (Bản Desktop) --- */

/* 1. Lịch Cơ quan (Mặc định - Đỏ) */
.event-item-v2.event-type-coquan {
    border-left: 4px solid #d71920 !important;
    background-color: #ffffff !important;
    color: #333 !important;
}
.event-item-v2.event-type-coquan .event-time { color: #d71920 !important; }

/* 2. Lịch Cá nhân (Xanh Lá) */
.event-item-v2.event-type-canhan {
    border-left: 4px solid #28a745 !important;
    background-color: #f4fff6 !important;
    color: #155724 !important;
}
.event-item-v2.event-type-canhan .event-time { color: #28a745 !important; }

/* 3. Lịch Lãnh đạo (Xanh Dương) */
.event-item-v2.event-type-lanhdao, 
.event-item-v2.event-type-khac {
    border-left: 4px solid #007bff !important;
    background-color: #f0f7ff !important;
    color: #004085 !important;
}
.event-item-v2.event-type-lanhdao .event-time { color: #007bff !important; }
.sticky-filter-bar {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-image: url('/public/images/bg_portal.jpg');
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    margin: 0px auto;
}
@media (min-width: 992px) {
    /* Ngăn rớt dòng cho form */
    #filterFormMain {
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
    }

    /* Đảm bảo các cột có độ rộng cố định hoặc tự co giãn hợp lý */
    #filterFormMain .col-md-3 {
        flex: 0 0 22%; /* Độ rộng cho 2 ô select */
        max-width: 22%;
    }

    #filterFormMain .col-md-2 {
        flex: 0 0 12%; /* Độ rộng cho nút Xóa lọc */
        max-width: 12%;
    }

    #filterFormMain .col-md-4 {
        flex: 0 0 40%; /* Độ rộng cho cụm nút chức năng */
        max-width: 40%;
    }

    /* Đảm bảo các nút trong group có kích thước đều */
    .btn-group .btn {
        white-space: nowrap;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* CSS Tùy chỉnh cho Sticky Filter trên Desktop */

        .sticky-filter-bar {
            position: -webkit-sticky;
            position: sticky;
            top: 0;
            z-index: 1020; /* Đảm bảo nằm trên bảng nhưng dưới modal */
            background-color: #f8f9fa; /* Màu nền tiệp với container */
            padding-top: 15px;
            padding-bottom: 5px;
            margin-bottom: 20px !important;
        }
        
        /* Hiệu ứng đổ bóng khi dính để phân biệt với nội dung bên dưới */
        .sticky-filter-bar .card {
            border-bottom: 3px solid #d71920 !important; /* Điểm nhấn màu Đỏ Chính phủ */
            box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
        }
    }
    /* END CSS Tùy chỉnh cho Sticky Filter trên Desktop */
/* Fix lỗi hiển thị Select2 nếu nó bị tràn */
.select2-container--bootstrap-5 {
    display: block;
    width: 100% !important;
}
