﻿ 
.accordion-menu:not(.active) .accordion-button {
    font-weight: normal !important;
    background: transparent !important;
    color: #0a0a0a !important;
}
.accordion-menu.active .accordion-button {
    font-weight: bold !important;
    background: #b7e5e9 !important;
    color: #0a0a0a !important;
}


.accordion-body:not(.active) {
    font-weight: normal !important;
    background: transparent !important;
    color: #0a0a0a !important;
}

.accordion-body.active {
    font-weight: bold !important;
    background: #b7e5e9 !important;
    color: #0a0a0a !important;
}
.active {
    font-weight: bold !important;
    background: #b7e5e9 !important;
    color: #0a0a0a !important;
}
:root {
    --bs-body-font-family: system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !important;
}
.searchbox{
    display:contents!important;
}
.emailapp-wrap .emailapp-content .emailapp-aside header.aside-header{
    height:40px!important;
}
.emailapp-wrap .emailapp-content .emailapp-single-email header.email-header{
    height:40px!important;
}
.hk-sidebar-togglable{
    top:26px!important;
}


.tr-inspection:hover {
    cursor:pointer;
}

/* Custom Checkbox Style - Nguyên tắc: Đã tick = Xanh, Không tick = Cam */
.custom-checkbox-container {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin: 8px 0;
    border: 2px solid #ff9800; /* Cam cho trạng thái không tick */
    border-radius: 8px;
    background: #fff7ed; /* Nền cam nhạt */
    transition: all 0.3s ease;
    cursor: pointer;
}

/* Checkbox confirm - hover màu xanh */
.confirmation-checkbox-container:hover {
    border-color: #22c55e; /* Xanh khi hover */
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

/* Checkbox khác - hover màu cam như cũ */
.custom-checkbox-container:not(.confirmation-checkbox-container):hover {
    border-color: #e65100; /* Cam đậm hơn khi hover */
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
}


.custom-checkbox {
    width: 24px;
    height: 24px;
    margin-right: 12px;
    border: 2px solid #ff9800; /* Cam cho trạng thái không tick */
    border-radius: 4px;
    background: #fff3e0; /* Nền cam nhạt */
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

/* Container đã tick - toàn bộ màu xanh */
.custom-checkbox-container.checked {
    border-color: #4caf50 !important; /* Xanh cho trạng thái đã tick */
    background: #f8fff8 !important; /* Nền xanh nhạt */
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2) !important;
}

.custom-checkbox-container.checked .custom-checkbox {
    border-color: #4caf50 !important; /* Xanh cho trạng thái đã tick */
    background: #4caf50 !important; /* Nền xanh */
}

.custom-checkbox-container.checked .custom-checkbox-label {
    color: #2e7d32 !important; /* Xanh đậm cho trạng thái đã tick */
    font-weight: 600 !important;
}

/* Checkbox confirm - hover màu xanh */
.confirmation-checkbox-container:hover .custom-checkbox {
    border-color: #22c55e; /* Xanh khi hover */
    background: #22c55e; /* Xanh khi hover */
}

/* Checkbox khác - hover màu cam như cũ */
.custom-checkbox-container:not(.confirmation-checkbox-container):hover .custom-checkbox {
    border-color: #e65100; /* Cam đậm hơn khi hover */
    background: #ffcc80; /* Cam đậm hơn */
}


.custom-checkbox::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.custom-checkbox-container.checked .custom-checkbox::after {
    opacity: 1;
}

.custom-checkbox-label {
    font-size: 16px;
    font-weight: 500;
    color: #e65100; /* Cam cho trạng thái không tick */
    transition: color 0.3s ease;
    flex: 1;
    border: none !important; /* Không có border */
    box-shadow: none !important; /* Không có shadow */
    outline: none !important; /* Không có outline */
    background: transparent !important; /* Không có background */
    padding: 0 !important; /* Không có padding */
    margin: 0 !important; /* Không có margin */
}

/* Checkbox confirm - hover màu xanh */
.confirmation-checkbox-container:hover .custom-checkbox-label {
    color: #22c55e; /* Xanh khi hover */
}

/* Checkbox khác - hover màu cam như cũ */
.custom-checkbox-container:not(.confirmation-checkbox-container):hover .custom-checkbox-label {
    color: #bf360c; /* Cam đậm hơn khi hover */
}


/* Hidden original checkbox */
.custom-checkbox-input {
    display: none;
}

/* TẤT CẢ input text - hover và focus màu xanh (override mọi CSS khác) */
.form-control:hover,
.form-control:focus,
input:hover,
input:focus,
textarea:hover,
textarea:focus,
select:hover,
select:focus {
    border-color: #22c55e !important;
    box-shadow: 0 0 5px rgba(34, 197, 94, 0.3) !important;
    outline: none !important;
}

/* Label không có border - chỉ là text */
.custom-checkbox-label:hover,
.custom-checkbox-label:focus {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Đặc biệt: Textbox bên trong container đã tick - hover màu xanh */
.custom-checkbox-container.checked .form-control:hover,
.custom-checkbox-container.checked input:hover,
.custom-checkbox-container.checked textarea:hover,
.custom-checkbox-container.checked select:hover {
    border-color: #22c55e !important;
    box-shadow: 0 0 5px rgba(34, 197, 94, 0.3) !important;
    outline: none !important;
}

/* Input checkbox thật - hover màu xanh */
.custom-checkbox-input:hover,
.custom-checkbox-input:focus {
    border-color: #22c55e !important;
    box-shadow: 0 0 5px rgba(34, 197, 94, 0.3) !important;
    outline: none !important;
}

/* Input checkbox thật trong container đã tick - hover màu xanh */
.custom-checkbox-container.checked .custom-checkbox-input:hover,
.custom-checkbox-container.checked .custom-checkbox-input:focus {
    border-color: #22c55e !important;
    box-shadow: 0 0 5px rgba(34, 197, 94, 0.3) !important;
    outline: none !important;
}

/* Container checkbox - focus màu xanh */
.custom-checkbox-container:focus,
.custom-checkbox-container:focus-within {
    border-color: #22c55e !important;
    box-shadow: 0 0 5px rgba(34, 197, 94, 0.3) !important;
    outline: none !important;
}


/* Khi form có checkbox đã tick - tất cả input trong form focus màu xanh */
form:has(.custom-checkbox-container.checked) .form-control:focus,
form:has(.custom-checkbox-container.checked) input:focus,
form:has(.custom-checkbox-container.checked) textarea:focus,
form:has(.custom-checkbox-container.checked) select:focus {
    border-color: #4caf50 !important;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.3) !important;
    outline: none !important;
}


/* Phục hồi border cho input textbox thông thường (không phải trong checkbox container) */
.form-control:not(.custom-checkbox-container .form-control),
input[type="text"]:not(.custom-checkbox-container input),
input[type="email"]:not(.custom-checkbox-container input),
input[type="number"]:not(.custom-checkbox-container input),
input[type="date"]:not(.custom-checkbox-container input),
input[type="time"]:not(.custom-checkbox-container input),
textarea:not(.custom-checkbox-container textarea),
select:not(.custom-checkbox-container select) {
    border: 1px solid #ced4da !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Border khi hover và focus cho input textbox thông thường - độ ưu tiên cao */
.form-control:not(.custom-checkbox-container .form-control):hover,
.form-control:not(.custom-checkbox-container .form-control):focus,
input:not(.custom-checkbox-container input):hover,
input:not(.custom-checkbox-container input):focus,
textarea:not(.custom-checkbox-container textarea):hover,
textarea:not(.custom-checkbox-container textarea):focus,
select:not(.custom-checkbox-container select):hover,
select:not(.custom-checkbox-container select):focus,
form .form-control:hover:not(.custom-checkbox-container .form-control),
form .form-control:focus:not(.custom-checkbox-container .form-control),
form input:hover:not(.custom-checkbox-container input),
form input:focus:not(.custom-checkbox-container input),
form textarea:hover:not(.custom-checkbox-container textarea),
form textarea:focus:not(.custom-checkbox-container textarea),
form select:hover:not(.custom-checkbox-container select),
form select:focus:not(.custom-checkbox-container select) {
    border-color: #22c55e !important;
    box-shadow: 0 0 5px rgba(34, 197, 94, 0.3) !important;
    outline: none !important;
}

textarea.note {
    display: block !important;
}
.emailapp-wrap .emailapp-content .emailapp-aside{
    width:100%!important;
    flex-grow:1!important;
}

.material-icons.md-18 {
    font-size: 18px;
}

.material-icons.md-24 {
    font-size: 24px;
}

.material-icons.md-36 {
    font-size: 36px;
}

.material-icons.md-48 {
    font-size: 48px;
}

.th-title{
    font-size:12px!important;
    font-weight:600!important;
}
.td-data{
    font-size:13px!important;
    color:black!important;
    font-weight:500!important;
}

@media only screen and (max-width: 600px){
    .offcanvas-end {
        width: 100% !important;
    }

    .supportInformation {
        display: none;
    }
    
}

@media only screen and (min-width: 600px) {
    .offcanvas-end {
        width: 70% !important;
    }
    .supportInformation {
        display: block;
    }

}
.offcanvas-header {
    padding: 5px !important;
    color: white!important;
}
#offcanvasRightLabel{
    color:white!important;
}
.offcanvas-body{
    padding:10px!important;
}
table.table-file td{
    padding:5px!important;
}
table.table-file th {
    padding: 5px !important;
}
.preview-file {
    overflow: auto !important;
    height: 800px !important;
}

.table-advance tbody tr td.td-noboder {
    border: none !important;
    padding: 0px !important;
    text-align: center !important;
}
.table-advance tbody tr td.td-noboder:after {
    border: none !important;
    background-color: transparent !important;
}
.td-noboder {
    background-color: transparent !important;
}

.input-group-text{
    min-width:30px!important;
    padding:5px!important;
}
/* layout */
.wrap {
    display: flex;
}

.left {
    margin-right: 10px;
}

.right {
    flex-grow: 1;
}

/* ===== LANGUAGE SELECTOR STYLES ===== */
.language-selector {
    margin-left: 1rem;
}

.language-dropdown {
    position: relative;
    display: inline-block;
}

.language-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: transparent;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    color: #6c757d;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 140px;
    justify-content: space-between;
    height: 48px;
}

.language-toggle:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
    color: #495057;
}

.language-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 2px #0d6efd;
}

.flag-emoji {
    font-size: 1.2rem;
    line-height: 1;
}

.language-text {
    font-size: 0.875rem;
    font-weight: 500;
}

.language-toggle i {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.language-dropdown.active .language-toggle i {
    transform: rotate(180deg);
}

.language-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    min-width: 160px;
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    margin-top: 0.5rem;
}

.language-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-form {
    margin: 0;
}

.language-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f1f3f4;
}

.language-option:last-child {
    border-bottom: none;
}

.language-option:hover {
    background: #f8f9fa;
    color: #0d6efd;
}

.language-option .flag-emoji {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.language-option .language-text {
    font-size: 0.875rem;
    font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .language-selector {
        margin-left: 0.5rem;
    }
    
    .language-toggle {
        min-width: 120px;
        padding: 0.5rem 0.75rem;
    }
    
    .language-menu {
        right: -0.5rem;
        min-width: 140px;
    }
}


/* Mobile và Tablet - Layout 2 hàng đàng hoàng */
@media (max-width: 1024px) {
    /* Ẩn "Trang chủ" hoàn toàn trên mobile */
    .navbar-nav.me-auto .nav-link[href*="Home"],
    .navbar-nav.me-auto .nav-item:has(.nav-link[href*="Home"]) {
        display: none !important;
        visibility: hidden !important;
    }
    
    /* Ẩn toàn bộ navbar-nav.me-auto (bao gồm cả menu Quản trị) */
    .navbar-nav.me-auto {
        display: none !important;
        visibility: hidden !important;
    }
    
    /* Ẩn navbar cũ trên mobile - chỉ hiện navbar thứ 2 */
    .nav-end-wrap {
        display: none !important;
        visibility: hidden !important;
    }
    
    /* Tạo layout 2 hàng cho mobile */
    .navbar {
        flex-direction: column !important;
        padding: 0.5rem 1rem !important;
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }
    
    /* Đảm bảo container không bị tràn */
    .container-fluid,
    .container {
        max-width: 100vw !important;
        overflow-x: hidden !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    
    .navbar-brand {
        width: 100% !important;
        margin-bottom: 0.5rem !important;
        text-align: left !important;
        padding: 0.5rem 0 !important;
    }
    
    .navbar-brand img {
        max-height: 40px !important;
        width: auto !important;
    }
    
    .navbar-brand .brand-text {
        font-size: 1.1rem !important;
        font-weight: 600 !important;
    }
    
    /* Hàng thứ 2 - chứa buttons */
    .navbar-nav.ms-auto {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 0.75rem !important;
        width: 100% !important;
        margin-left: 0 !important;
        padding: 0.5rem 0 !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
        flex-wrap: nowrap !important;
        overflow: visible !important;
    }
    
    .nav-item {
        display: inline-block !important;
        margin: 0 !important;
        padding: 0 !important;
        width: auto !important;
        flex-shrink: 0 !important;
    }
    
    .nav-item.dropdown {
        display: inline-block !important;
    }
    
    .nav-item.language-selector {
        display: inline-block !important;
    }
    
    /* Language selector - chỉ hiện lá cờ */
    .language-toggle .language-text {
        display: none !important;
    }
    
    .language-toggle {
        min-width: 60px !important;
        padding: 0.5rem !important;
    }
    
    .language-menu {
        right: -1rem !important;
        min-width: 120px !important;
    }
    
    /* Đảm bảo language selector hiện */
    .language-selector,
    .language-dropdown {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* User dropdown hiện đầy đủ */
    .user-info,
    .user-name,
    .user-id {
        display: block !important;
        visibility: visible !important;
    }
    
    /* Điều chỉnh kích thước button trên mobile */
    .nav-item .btn {
        padding: 0.4rem 0.8rem !important;
        font-size: 0.85rem !important;
        min-width: auto !important;
        border-radius: 6px !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
        max-width: 120px !important;
    }
    
    /* Đảm bảo button hiển thị đầy đủ */
    .nav-item {
        flex-shrink: 0 !important;
        max-width: 45% !important;
    }
    
    .nav-item.language-selector {
        flex-shrink: 0 !important;
        max-width: 40% !important;
    }
    
    .nav-item .btn-primary {
        background-color: #22c55e !important;
        border-color: #22c55e !important;
    }
    
    .nav-item .btn-primary:hover {
        background-color: #16a34a !important;
        border-color: #16a34a !important;
    }
    
}

/* Header Contact Info for Default Header */
.header-contact {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-left: 2rem;
    margin-right: 2rem;
    flex-wrap: wrap;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6c757d;
    white-space: nowrap;
}

.contact-item i {
    color: #22c55e;
    font-size: 1rem;
}

@media (max-width: 768px) {
    /* Ẩn thông tin bệnh viện trên mobile */
    .header-contact {
        display: none !important;
        visibility: hidden !important;
    }
}

/* Responsive improvements for very small screens */
@media (max-width: 480px) {
    /* Đảm bảo thông tin bệnh viện vẫn ẩn */
    .header-contact {
        display: none !important;
        visibility: hidden !important;
    }
}

/* ===== CUSTOM CHECKBOX GROUP STYLES ===== */
.checkbox-group-container {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-top: 10px;
}

.custom-checkbox-item {
    position: relative;
}

.custom-checkbox-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.custom-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 12px 16px;
    background: #fff;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #495057;
    min-height: 50px;
}

.custom-checkbox-label:hover {
    border-color: #f97316;
    background: #fff7ed;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.15);
}

.checkbox-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #e9ecef;
    border-radius: 4px;
    margin-right: 12px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkbox-icon i {
    color: #fff;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.checkbox-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
}

/* Checked state */
.custom-checkbox-input:checked + .custom-checkbox-label {
    border-color: #f97316;
    background: #fff7ed;
    color: #ea580c;
}

.custom-checkbox-input:checked + .custom-checkbox-label .checkbox-icon {
    background: #f97316;
}

.custom-checkbox-input:checked + .custom-checkbox-label .checkbox-icon i {
    opacity: 1;
}

/* Focus state */
.custom-checkbox-input:focus + .custom-checkbox-label {
    outline: 2px solid #f97316;
    outline-offset: 2px;
}

/* Responsive */
@media (max-width: 768px) {
    .checkbox-group-container {
        padding: 15px;
    }
    
    .custom-checkbox-label {
        padding: 10px 12px;
        min-height: 45px;
    }
    
    .checkbox-icon {
        width: 20px;
        height: 20px;
        margin-right: 10px;
    }
    
    .checkbox-text {
        font-size: 13px;
    }
}

/* Animation for smooth transitions */
.custom-checkbox-item {
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

