/*a {
    color: #17a2b8;
}*/
input[type="text"] {
    border: 1px solid #ced4da;
    border-radius: .15rem;
}
.overlay {
    display: none;
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: rgba(255,255,255,.7);
    z-index: 9999;
}

.lds-ripple,
.lds-ripple div {
  box-sizing: border-box;
}
.lds-ripple img {
    width: 60px;
    display: block;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}
.lds-ripple {
  display: inline-block;
  position: relative;
  width: 80px;
  height: 80px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.lds-ripple div {
  position: absolute;
  border: 4px solid #17a2b8;
  opacity: 1;
  border-radius: 50%;
  animation: lds-ripple 1s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}
.lds-ripple div:nth-child(2) {
  animation-delay: -0.5s;
}
@keyframes lds-ripple {
  0% {
    top: 36px;
    left: 36px;
    width: 8px;
    height: 8px;
    opacity: 0;
  }
  4.9% {
    top: 36px;
    left: 36px;
    width: 8px;
    height: 8px;
    opacity: 0;
  }
  5% {
    top: 36px;
    left: 36px;
    width: 8px;
    height: 8px;
    opacity: 1;
  }
  100% {
    top: 0;
    left: 0;
    width: 80px;
    height: 80px;
    opacity: 0;
  }
}



/* The switch - the box around the slider */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
    zoom: 0.8;
}

/* Hide default HTML checkbox */
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* The slider */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
}

input:checked + .slider {
    background-color: #2196F3;
}

input:focus + .slider {
    box-shadow: 0 0 1px #2196F3;
}

input:checked + .slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}

/* Rounded sliders */
.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.group-view-bspt {
    display: flex;
    align-items: center;
}

.group-view-bspt p {
    margin: 0 10px 0 0;
}

.group-view-bspt label {
    margin: 0;
}

:not(.layout-fixed) .main-sidebar {
    position: fixed;
    /*top: 56px;*/
}
.card-cyan:not(.card-outline)>.card-header {
    background: #17a2b8;
}

.card.bg-gradient-light .bootstrap-datetimepicker-widget table td.active {
    color: #FFF;
    background-color: #28a745;
}

.card.bg-gradient-light .bootstrap-datetimepicker-widget table td.today::before {
    border-bottom-color: #FFF;
}

.card.bg-gradient-light .bootstrap-datetimepicker-widget table td.active:hover {
    background-color: #28a745;
    color: #FFF;
    opacity: 0.7;
}

.DashboardThongke table.dataTable {
    margin-top: 0 !important;
}

.tblHon5LoaiThuoc ul.pagination {
    position: relative;
    left: -45%;
    top: -0.3125rem;
    margin: 0.25rem 0 !important;
}

.tblHon5LoaiThuoc .page-link {
    padding: .4rem .75rem;
}

#html5-qrcode-button-camera-stop,
#html5-qrcode-button-camera-start {
    margin-top: 0.5rem;
    background: #FFF;
}

#html5-qrcode-anchor-scan-type-change {
    margin-top: 0.5rem;
}

.txtMainColor {
    color: #17a2b8;
}

.bgCyanCore {
    background-color: #17a2b8;
}

.popUpLink {
    cursor: pointer;
    color: #007bff;
}

.uploadImg .upload__inputfile {
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  z-index: -1;
}

.uploadImg .upload__img-wrap {
  display: flex;
  flex-wrap: wrap;
  margin: 10px -10px 0 -10px;
}

.uploadImg .upload__img-box {
  width: 200px;
  padding: 0 10px;
  margin-bottom: 12px;
}

.uploadImg .upload__img-close {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.5);
  position: absolute;
  top: 10px;
  right: 10px;
  text-align: center;
  line-height: 24px;
  z-index: 1;
  cursor: pointer;
}

.uploadImg .upload__img-close:after {
  content: "✖";
  font-size: 14px;
  color: white;
}

.uploadImg .img-bg {
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  position: relative;
  padding-bottom: 100%;
}

.lightBoxThumb {
    width: 120px;
    height: 120px;
    display: inline-block;
}

.iHinhAnhGTo {
    position: relative;
    display: inline-block;
}

.iHinhAnhGTo .delImage {
    position: absolute;
    right: 5px;
    top: 5px;
    background-color: rgba(255,255,255,.8);
    border-radius: 50%;
    padding: 1px;
    cursor: pointer;
}

td.tdCheckBox {
    vertical-align: middle;
    text-align: center;
}

.loader {
  width: 48px;
  height: 48px;
  border: 5px solid;
  border-color: rgb(0, 123, 255) transparent;
  border-radius: 50%;
  display: inline-block;
  box-sizing: border-box;
  animation: rotation 1s linear infinite;
}

span.inlineTextSpan {
    line-height: 2.4;
    display: inline-block;
    margin-right: 0.3rem;
}

@keyframes rotation {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}


.inputShort {
    max-width: 100px;
}

.dPre {
    white-space: pre;
}

.mwd-1000 {
    min-width: 1000px;
}

.tblHoverEn tbody tr:hover,
.tblHoverEn tbody tr.selected {
    background-color: #FEF6D5;
    cursor: pointer;
}

.tblHoverEn tbody tr.selectedTDT {
    background-color: mistyrose;
    cursor: pointer;
}

.tblHoverEn td {
    padding: 0.3rem 0.5rem;
}

.tblHoverEn td .btn-del,
.tblHoverEn td .btn-edit,
.tblHoverEn td .btn-tdt {
    padding: 0 0.4rem;
    line-height: 1.5;
}

tr.rowLocked > td  {
    color: red;
}

.tblTimKiemTH td {
    padding: 0.5rem;
}

.tblTimKiemTH tr {
    cursor: pointer;
}

.tblTimKiemTH tbody tr:hover,
.tblTimKiemTH tbody tr.selected {
    background-color: #FEF6D5;
    cursor: pointer;
}

.lstToDieuTriTime {
    padding: 1.25rem 0.75rem;
    max-height: 75vh;
    overflow-y: scroll;
}

.lstToDieuTriTime > p {
    cursor: pointer;
    padding: 0.25rem 0.75rem 0.25rem 3rem;
    color: #2b2b2b;
    margin-bottom: 0.5rem;
    position: relative;
}

.lstToDieuTriTime > p > i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translate(0,-50%);
}

.lstToDieuTriTime > p:last-child {
    margin-bottom: 0;
}

.lstToDieuTriTime p:hover,
.lstToDieuTriTime p.active {
    background-color: #007bff;
    color: #FFF;
    border-radius: 0.2rem;
}

.lstTimeTree {
    padding: 1.25rem 0.75rem;
    max-height: 75vh;
    overflow-y: scroll;
}

.lstTimeTree > p {
    cursor: pointer;
    padding: 0.25rem 0.75rem 0.25rem 3rem;
    color: #2b2b2b;
    margin-bottom: 0.5rem;
    position: relative;
}

.lstTimeTree > p > i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translate(0,-50%);
}

.lstTimeTree > p:last-child {
    margin-bottom: 0;
}

.lstTimeTree p:hover,
.lstTimeTree p.active {
    background-color: #007bff;
    color: #FFF;
    border-radius: 0.2rem;
}

.w92percent {
    width: 90%;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    line-height: 1.7;
}

.lh17 {
    line-height: 1.7;
}

#rptIframe {
    width: 100%;
    height: 65vh;
}

.pdfjs-viewer {
    width: 100%;
    height: 65vh;
}

.gbLink .nav-pills .nav-link {
    color: #343a40;
}

.gbLink .nav-pills .nav-link.active {
    background-color: #17a2b8;
    color: #FFF;
}

.gbLink  .nav-pills .nav-link:not(.active):hover {
    color: #17a2b8;
}

.gbLink .card-header>.card-tools {
    margin-right: 0;
    margin-top: 0.5rem;
}

.btnTblLuuThuoc {
    position: relative;
    line-height: 3.9;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn.btn-quyuoc:hover {
    color: #FFF;
    background-color: #5a6268;
    border-color: #545b62;
}

.lst-quyuoc span {
    padding: .25em .4em;
    font-size: 1rem;
    color: #fff;
    background-color: #6c757d;
    text-align: left;
    display: inline-block;
    margin-bottom: 0.4rem;
}

.lst-quyuoc.item-fullW span {
    display: block;
}

.lst-quyuoc {
    height: 0;
    max-height: 30vh;
    overflow-y: scroll;
    position: absolute;
    top: 100%;
    padding: 0.75rem 0.5rem 0.2rem 0.5rem;
    background-color: #FFF;
    border: 1px solid rgba(0, 0, 0, .15);
    border-radius: .25rem;
    box-sizing: border-box;
    width: calc(100% - 14px);
    left: 7.5px;
    opacity: 0;
}

    .lst-quyuoc.is-open {
        z-index: 3;
        opacity: 1;
        height: initial;
    }
    .lst-quyuoc.drop-up {
        top: auto;
        bottom: 100%; 
    }
    .lst-quyuoc input.quyuoc-filter {
        width: 100%;
        padding: .25rem .5rem;
        font-size: 0.9rem;
        margin-bottom: .5rem;
        border: 1px solid #ccc;
        border-radius: .25rem;
        box-sizing: border-box;
    }

.selected-quyuoc {
    margin-top: 5px;
    min-height: 30px;
}

    .selected-quyuoc .tag {
        display: inline-block;
        background: #007bff;
        color: white;
        border-radius: 3px;
        padding: 3px 7px;
        margin: 2px;
        font-size: 14px;
    }

    .selected-quyuoc .remove-tag {
        background: transparent;
        border: none;
        color: white;
        margin-left: 5px;
        cursor: pointer;
        font-weight: bold;
        font-size: 16px;
        line-height: 1;
    }
textarea.fieldSizingFit {
    field-sizing: content;
}

.lst-quyuoc::-webkit-scrollbar {
  width: 3px;
}

/* Track */
.lst-quyuoc::-webkit-scrollbar-track {
  background: #f1f1f1; 
}
 
/* Handle */
.lst-quyuoc::-webkit-scrollbar-thumb {
  background: #888; 
}

/* Handle on hover */
.lst-quyuoc::-webkit-scrollbar-thumb:hover {
  background: #555; 
}

.form-control:disabled, .form-control[readonly] {
    cursor: not-allowed;
    pointer-events: none;
}

.badge-header {
    position: absolute;
    right: -5px;
    top: -10px;
}

.header-avatar {
    height: initial;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
}
.header-avatar > img {
    display: inline-block;
    width: 40px;
    margin: 0 5px 0 -5px;
}

.hide-canvas {
    height: 0;
    overflow: hidden;
}

.table-text-center td,
.table-text-center th {
    vertical-align: middle;
    text-align:center;
}

.table-text-center-v td {
    vertical-align: middle;
}

.eclip300 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
    display: inline-block; 
}

.eclip250 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
    display: inline-block; 
}

.ui-datepicker {
  background: #fff;
  border: 1px solid #007bff;
  border-radius: 10px;
  /*padding: 12px;*/
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.ui-datepicker-header {
  background: #D1F2F7;
  color: black ;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  padding: 10px 0;
  font-weight: 500;
}

.ui-datepicker-title {
  font-weight: bold;
}

.ui-datepicker-prev, .ui-datepicker-next {
  cursor: pointer;
  color: #fff;
  transition: opacity 0.3s;
}

.ui-datepicker-prev:hover, .ui-datepicker-next:hover {
  opacity: 0.7;
}

.ui-datepicker-calendar th {
  background: #f8f9fa;
  padding: 6px;
  font-weight: 500;
}

.ui-datepicker-calendar td a {
  background-color: #f6f6f6 ;
  display: block;
  /*padding: 10px;*/
  text-align: center;
  border-radius: 6px;
  transition: all 0.3s ease;
  font-weight: 500;
}

.ui-datepicker-calendar td a:hover {
  box-shadow: 0 4px 8px rgba(209, 242, 247, 0.8) !important;
  background: transparent !important;
  color: inherit !important;
}

.ui-datepicker-calendar .ui-state-highlight {
  background: #ffeb99 !important;
  font-weight: 700;
}

.ui-datepicker-calendar .ui-state-active {
  background: #17a2b8 !important;
  border-color: #17a2b8;
  color: #FFFFFF !important;
  font-weight: 600;
}

.table-stick {
    max-height: 300px;
    overflow-y: auto; 
}

.table-stick .table thead th {
    /*stick cho header*/
    position: sticky;
    top: 0;
    background: white;
    z-index: 100;
}

@media (max-width: 1024px) {
    .w92percent {
        width: 85%;
        text-overflow: ellipsis;
        overflow: hidden;
        white-space: nowrap;
    }
}

@media (max-width: 821px) { /* Áp dụng cho iPad Air hoặc thiết bị nhỏ hơn */
    .modal-fullscreen {
        max-width: 100%;
        margin: 0;
    }

    .modal-dialog.modal-fullscreen {
        width: 100%;
        max-width: 100%;
        height: 100%;
        margin: 0;
    }

    .modal-content.modal-fullscreen {
        height: 100%;
        border-radius: 0; /* Loại bỏ góc bo tròn */
    }

    .pdfjs-viewer {
        height: 85vh;
    }
    
    .container {
        max-width: 100% !important;
        padding-left: 15px;
        padding-right: 15px;
    }
}


@media (max-width: 480px) {
    /*div.dataTables_paginate {
        zoom: 0.75;
    }

    table.table-bordered.dataTable tbody th,
    table.table-bordered.dataTable tbody td,
    table.dataTable thead > tr > th.sorting_asc,
    table.dataTable thead > tr > th.sorting_desc,
    table.dataTable thead > tr > th.sorting,
    table.dataTable thead > tr > td.sorting_asc,
    table.dataTable thead > tr > td.sorting_desc,
    table.dataTable thead > tr > td.sorting,
    table.table-bordered.dataTable th,
    table.table-bordered.dataTable td {
        font-size: 0.85rem;
    }*/

    div.dataTables_wrapper div.dataTables_paginate ul.pagination {
        justify-content: center;
    }

    .wrapper {
        max-width: 100%;
        overflow: hidden;
    }

    .group-view-bspt {
        margin-top: 10px;
    }

    .card-body {
        padding: .75rem;
    }

    .dataTables_filter input,
    .dataTables_length select {
        font-size: 1rem;
    }

    .subTitlePage {
        zoom: 0.85;
    }

    .lightBoxThumb {
        width: 80px;
        height: 80px;
    }

    .sp-max-1000px {
        min-width: 1000px;
    }

    .sp-overflow-scroll {
        overflow: scroll;
    }
}
.BNHeader {
    position: sticky;
    top: 0;
    z-index: 99;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
    padding: 12px 0;
}
    .BNHeader h4 {
        font-weight: 600;
        margin: 0;
    }

    .BNHeader .breadcrumb {
        margin-bottom: 0;
        background: transparent;
    }

/* For Safari: Buộc hiện thanh cuộn */
@media not all and (min-resolution:.001dpcm) {
    @supports (-webkit-appearance:none) {
        .sidebar {
                min-height: calc(100vh - 56px); /* Điều chỉnh theo chiều cao header nếu có */
            overflow-y: scroll !important;
            -webkit-overflow-scrolling:touch;
        }
    }
}

.sidebar {
    min-height: calc(100vh - 56px); /* Điều chỉnh theo chiều cao header nếu có */
    overflow-y: auto;
}

.wrapper, html, body {
    height: 100%;
}

.scroll-box {
    max-height: 200px; 
    overflow-y: auto;
}

.scroll-box p {
    padding: 0.75rem;
    box-sizing: border-box;
    margin-bottom: 0;
    text-align: justify;
}



.device-warning-wrapper {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    
}
.device-warning-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: .25rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    width: 100%;
    overflow: hidden;
    animation: slideIn 0.6s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.device-warning-header {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 25px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.device-warning-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0%, 100% {
        transform: rotate(0deg);
    }

    50% {
        transform: rotate(90deg);
    }
}

.device-warning-icon {
    font-size: 48px;
    margin-bottom: 10px;
    display: block;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.device-warning-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    position: relative;
    z-index: 1;
}

.device-warning-content {
    padding: 40px 30px;
    text-align: center;
}

.main-message {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
    line-height: 1.6;
}

.sub-message {
    font-size: 15px;
    color: #7f8c8d;
    line-height: 1.6;
    margin-bottom: 35px;
}

.device-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

@media (max-width: 480px) {
    .warning-container {
        margin: 10px;
        border-radius: 15px;
    }

    .warning-header {
        padding: 20px;
    }

    .warning-title {
        font-size: 20px;
    }

    .warning-content {
        padding: 30px 20px;
    }

    
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.login-item {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 12px;
    border-radius: 12px;
    border-left: 4px solid #17a2b8;
    transition: all 0.3s ease;
    transition: all 0.3s ease;
    animation: slideUp 0.6s ease-out;
    background: #fff;
    cursor:pointer
}

.login-info {
    flex: 1;
}

.login-device {
    font-weight: 600;
    color: #2c3e50;
}

.login-details {
    font-size: 14px;
    color: #6c757d;
}

.login-time {
    font-size: 13px;
    color: #17a2b8;
    font-weight: 500;
}

.device-icon {
    font-size: 24px;
    margin-right: 15px;
    opacity: 0.7;
}


.modal.fullscreen-modal .modal-dialog {
  width: 100vw;
  max-width: 100%;
  height: 100%;
  margin: 0;
}

.modal.fullscreen-modal .modal-content {
  height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: 0;
}

.modal.fullscreen-modal .modal-body {
  flex-grow: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* tablet màn hình nhỏ */
}
@media (max-width: 480px) {
    .main-message {
        font-size: 16px;
    }

    .sub-message {
        font-size: 13px;
    }

    .device-button-container .btn {
        width: 100%;
        font-size: 15px;
    }
    .device-warning-wrapper {
        padding: .75rem;
    }

    .lstToDieuTriTime {
        max-height: 35vh;
    }

    .lstTimeTree {
        max-height: 35vh;
    }

    .table-responsive > table {
        width: 900px;
    }
}
.image-upload-container {
    max-height: 1000px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    flex-wrap: wrap;
}

    .image-upload-container:hover {
        border-color: #007bff;
        background: #f0f8ff;
    }

    .image-upload-container.has-image {
        border-style: solid;
        border-color: #28a745;
        background: #f8fff9;
    }

.upload-area {
    cursor: pointer;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.upload-icon {
    font-size: 3rem;
    color: #6c757d;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}


.file-input {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    top: 0;
    left: 0;
}


.preview-image {
    display: block;
    max-width: 200px;
    max-height: 200px;
    width: auto;
    height: auto;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
}
.btn-remove-image {
    content: "✖";
    font-size: 14px;
    color: white;
}
.tui-image-editor-help-menu {
    display: none !important;
}
.tui-image-editor-header-logo {
    display: none !important;
}

.tui-image-editor-container ::-webkit-scrollbar {
    width: 8px;
}

.tui-image-editor-container ::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.tui-image-editor-container ::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

    .tui-image-editor-container ::-webkit-scrollbar-thumb:hover {
        background: #555;
    }

#ChuKiTay_TenDayDu {
    text-transform: capitalize !important;
}
.ellipsis-cell {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tr-disable {
    background-color: #e9ecef !important;  /* giống màu disabled */
    pointer-events: none;                  /* ngăn click */
    opacity: 0.6;         
}

.td-disable {
    pointer-events: none;                  /* ngăn click */
    opacity: 0.6;         
}

.user-panel .info {
    white-space: normal;
}

.card-body.p-0 #tbThuocBN_wrapper .table tbody>tr>td:last-of-type {
    padding-right: 0;
}

/* Giữ cố định cột thao tác cuối để người dùng sửa/xóa thuận tiện khi cuộn ngang */
@media (min-width: 992px) {
    #tbThuocBN_wrapper .dataTables_scrollHead table th:last-child,
    #tbThuocBN_wrapper .dataTables_scrollBody table td:last-child {
        position: sticky;
        right: 0;
        background-color: #fff;
        z-index: 3;
    }

    /* Đồng bộ màu nền với dòng bị khóa để không che mất trạng thái */
    #tbThuocBN_wrapper .dataTables_scrollBody table tr.rowLocked td:last-child {
        background-color: #e9ecef;
    }
}

a.disabled {
    pointer-events: none;
    color: #6c757d; /* giống màu "disabled" của Bootstrap */
    cursor: not-allowed;
    text-decoration: none;
    opacity: 0.4;
}

a.hoso-nhom-disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

a.hoso-nhom-disabled .info-box {
    filter: grayscale(20%);
}

.hoso-duyet-alert {
    display: none;
}

.hoso-duyet-alert-btn {
    background: #ffffff;
    border: 1px solid #7a4b00;
    color: #5c3900 !important;
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(92, 57, 0, 0.18);
}

.hoso-duyet-alert-btn:hover {
    background: #7a4b00;
    border-color: #7a4b00;
    color: #ffffff !important;
}

/*#pdf-container {
    background-color: #f0f0f0;*/    /* Xám nhẹ */
    /*padding: 30px 10px;*/           /* Canh giữa và tạo khoảng cách viền */
    /*overflow-y: auto;
    max-height: 80vh;
}

#pdf-container canvas {
    display: block;
    margin: 0 auto 30px auto;
    max-width: 100%;
    height: auto;
    background: #ffffff;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.textLayer {
    font-family: sans-serif;
    line-height: 1;
    white-space: pre;
    overflow: hidden;
    transform-origin: 0 0;
    z-index: 2;
}*/
input.skeleton-input {
    background-color: #e2e2e2 !important;
    color: transparent !important;
    position: relative;
}

    input.skeleton-input::after {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        height: 100%;
        width: 100%;
        background: linear-gradient(to right, #e2e2e2 0%, #f0f0f0 50%, #e2e2e2 100%);
        animation: shimmer 1.2s infinite;
    }

@keyframes shimmer {
    100% {
        left: 100%;
    }
}
.tag {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: white;
}

.tag-yellow {
    background-color: #ffc107;
    color: #212529;
}

.tag-success {
    background-color: #28a745;
    color: #fff;
}

.tag-danger {
    background-color: #dc3545;
    color: #fff;
}

.changes-section {
    margin-top: 1.5rem;
}

.change-item {
    margin-bottom: 1rem;
    background-color: #f9f9f9;
    border-radius: 0.4rem;
    padding: 1rem;
    position: relative;
    transition: all 0.2s ease-in-out;
    border-left: 3px solid #ddd;
}

    .change-item:hover {
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    }

.change-code {
    font-weight: 600;
    color: #0d6efd;
    margin-bottom: 0.5rem;
    display: block;
}

.change-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.change-old {
    flex: 1;
    text-decoration: line-through;
    opacity: 0.7;
    padding-right: 1rem;
    word-break: break-word;
}

.change-arrow {
    margin: 0 0.75rem;
    color: var(--secondary-color);
    font-size: 1.2rem;
}

.change-new {
    flex: 1;
    color: #22bb33;
    font-weight: 500;
    word-break: break-word;
}

table.dataTable.dtr-inline.collapsed>tbody>tr[role="row"]>td:first-child:before, table.dataTable.dtr-inline.collapsed>tbody>tr[role="row"]>th:first-child:before {
    top: 50%;
    transform: translate(0, -50%);
    border: none;
    box-shadow: none;
}

@media (min-width: 992px) {
  .text-nowrap-lg {
    white-space: nowrap !important;
  }
}
.drug-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.drug-card {
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 0.2rem 0.8rem rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid #e1e8ed;
}
    .drug-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 4px;
    }
.drug-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.drug-code {
    font-size: 0.9rem;
    color: #7f8c8d;
    font-weight: 500;
    margin-bottom: 0.75rem;
}
.analysis-section {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    border: 1px solid #e1e8ed;
    box-shadow: 0 0.2rem 0.8rem rgba(0, 0, 0, 0.08);
}
.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2980b9;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #ecf0f1;
}

.section-content {
    line-height: 1.6;
    color: #34495e;
    margin-bottom: 1.5rem;
}
.reason-section {
    border-radius: 12px;
    padding: .25rem;
    margin-top: 1.5rem;
}

.reason-title {
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.reason-textarea {
    width: 100%;
    min-height: 100px;
    padding: 1rem;
    border: 2px solid #bdc3c7;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.3s ease;
}

    .reason-textarea:focus {
        outline: none;
        border-color: #3498db;
        background: white;
    }
.voice-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
}

.voice-btn {
  position: absolute;
  right: 5px;
  top: 5px;
  cursor: pointer;
  color: #6c757d; /* màu icon mặc định */
}

.voice-btn.active {
  color: #dc3545; /* màu đỏ khi đang ghi âm */
}

.voice-wrapper .btn {
    border-radius: 0 0.25rem 0.25rem 0;
}

.voice-wrapper .start-voice {
    border-color: #17a2b8;
    background-color: #FFF;
}

.voice-wrapper .start-voice i {
    line-height: 20px;
    color: #17a2b8; /* xanh micro */
}

.voice-wrapper .stop-voice {
    background-color: #FFF;
}

.voice-wrapper .stop-voice i {
    color: #dc3545; /* đỏ stop */
    line-height: 20px;
}

.voice-wrapper .voice-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    width:30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-content: center;
    border-radius: 50%;
}

.voice-wrapper textarea {
    padding-right: 40px; /* chừa chỗ cho icon */
}

.voice-input.listening {
    border: 1px solid rgba(23, 162, 184, 0.6) !important;
    box-shadow: 0 0 8px rgba(23, 162, 184, 0.6);
    animation: pulse-border 1.5s infinite;
    transition: all 0.3s ease;
}

@keyframes pulse-border {
    0% {
        box-shadow: 0 0 4px rgba(23, 162, 184, 0.4);
    }
    50% {
        box-shadow: 0 0 12px rgba(23, 162, 184, 0.9);
    }
    100% {
        box-shadow: 0 0 4px rgba(23, 162, 184, 0.4);
    }
}
@media (max-width: 768px) {
    .drug-info-grid {
        grid-template-columns: 1fr;
    }
}


.timeline-khambenh {
    position: relative;
    margin: 0;
    padding: 0;
    list-style: none;
}
.timeline-khambenh::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #17a2b8; /* line nhạt xanh ngọc */
    left: 10px;
    margin: 0;
}
.timeline-khambenh > li {
    position: relative;
    margin-bottom: 30px;
    margin-left: 36px;
}
.timeline-khambenh > li::before {
    content: '';
    position: absolute;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    left: -32px;
    top: 5px;
    background: #17a2b8; /* chấm xanh ngọc đậm */
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px #17a2b8;
}

/* thẻ a bọc card */
.timeline-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* card bên trong link */
.timeline-card {
    background: #fff;
    border-radius: 10px;
    padding: 15px 20px;
    border: 1px solid transparent;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: all 0.2s ease-in-out;
}

/* hover card */
.timeline-card-link:hover .timeline-card {
    background: #f8ffff;
    border-color: #17a2b8;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

/* nội dung */
.timeline-date {
    display: inline-block;
    font-weight: bold;
    color: #fff;
    background: #17a2b8;
    padding: 4px 10px;
    border-radius: 50px; /* pill */
    margin-bottom: 8px;
    font-size: 0.9rem;
}
.timeline-date .fas {
    margin-right: 5px;
}

.timeline-room {
    color: #555;
    margin-bottom: 5px;
}
.timeline-diagnosis {
    color: #333;
}
.timeline-patient {
    color: #666;
    margin-bottom: 5px;
}
.timeline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.timeline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

    .timeline-actions .btn {
        flex: 1 1 auto;
        min-width: 140px; /* tránh nút quá bé trên mobile */
    }
.timeline-btn {
    flex: 1 1 calc(50% - 8px); /* 2 nút 1 hàng */
    background: #f1f9fa;
    border: 1px solid #17a2b8;
    border-radius: 6px;
    padding: 6px 10px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 500;
    color: #17a2b8;
    text-decoration: none;
    transition: all 0.2s;
}

.timeline-btn:hover {
    background: #17a2b8;
    color: #fff;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}
.pulse {
  animation: pulse 0.4s ease;
}

.btn-group-responsive {
    display: flex;
    flex-wrap: wrap;
    gap: 5px; /* khoảng cách giữa các button */
}

    .btn-group-responsive .btn {
        flex: 0 0 auto; /* không grow */
        width: auto; /* theo content */
        white-space: nowrap; /* cho button tự co giãn đều nhau */
    }

.timeline-header {
    margin-bottom: 5px;
}
.change {
    margin-top: 5px;
}

.removed {
    color: red;
    text-decoration: line-through;
    margin-right: 5px;
}
.present {
    color: #17a2b8;
    font-weight: bold
}
/* Card tổng */
.editor-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Toolbar */
.editor-toolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap; /* Cho mobile */
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.5rem;
    background: #f8f9fa;
}

/* Nhóm nút */
.editor-toolbar .group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Nút chính */
.btn-main {
    background-color: #17a2b8;
    border-color: #17a2b8;
    color: #fff;
}

.btn-main:hover {
    background-color: #138496;
    border-color: #117a8b;
    color: #fff;
}

/* Canvas wrapper */
.canvas-wrap {
    position: relative;
    flex: 1;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    background: #f1f3f4;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 300px;
    padding: 1rem 0;
}

.canvas-container {
    margin: 1rem 0;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff
}

.canvas-container canvas {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Footer */
.editor-card .card-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .editor-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .editor-toolbar .group {
        flex-wrap: wrap;
        width: 100%;
        justify-content: center;
    }

    .editor-card .card-footer {
        flex-direction: column;
        align-items: flex-start;
    }

}
#listMau .list-group-item {
    cursor: pointer;
    padding: .35rem .5rem;
}

    #listMau .list-group-item.active {
        background-color: #3c8dbc; /* màu xanh AdminLTE */
        border-color: #367fa9;
        color: #fff;
    }
.table-modify {
    max-height: 500px;
    overflow-y: auto;
}

.btn-orange {
    background-color: rgba(240, 140, 0, 1); /* Cam hổ phách */
}

    .btn-orange:hover {
        background-color: rgba(214, 124, 0, 1); /* Cam hổ phách đậm hơn */
    }

table.dataTable tbody tr.table-orange {
    background-color: rgba(240, 140, 0, 0.45) !important; /* Cam hổ phách nhạt */
    border-color: rgba(240, 140, 0, 0.8) !important;
}

.bo-dung-cu {
  display: flex;
  gap: 6px;
}

.bo-dung-cu span {
  width: 22px;
  height: 28px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 600;
  font-size: 14px;
  background: #FFF;
  border: 1px solid;
  border-top: 5px solid;
  cursor: pointer;
}

/* màu pastel theo thứ tự */
/*.bo-dung-cu span:nth-child(1) { border-color: blue; color: blue; }*/ /* Ống xanh dương */
/*.bo-dung-cu span:nth-child(2) { border-color: green; color: green; }*/ /* Ống xanh lá */
/*.bo-dung-cu span:nth-child(3) { border-color: red; color: red;}*/ /* Ống đỏ */
/*.bo-dung-cu span:nth-child(4) { border-color: black; color: black; }*/ /* Ống đen */
/*.bo-dung-cu span:nth-child(5) { border: 1px solid goldenrod; color: goldenrod; }*/ /* Lọ nắp vàng */
/*.bo-dung-cu span:nth-child(6) { border: 1px solid orangered; color: orangered; }*/ /* Lọ nắp đỏ vô trùng */
/*.bo-dung-cu span:nth-child(7) { border: 1px solid purple; color: purple; }*/ /* Que tăm bông trong ống vô trùng */

.input-highlight {
    border-color: red !important;
    box-shadow: 0 0 5px red;
    transition: 0.3s;
}

table.dataTable {
    margin-top: 0 !important;
}

.disabled-row {
    opacity: 0.6;
    pointer-events: none; /* Không cho hover, click */
}
/*
.skeleton {
    position: relative;
    background-color: #e2e2e2;
    overflow: hidden;
    border-radius: 4px;
}
    .skeleton::after {
        content: "";
        position: absolute;
        top: 0;
        left: -150px;
        height: 100%;
        width: 150px;
        background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.6) 50%, rgba(255,255,255,0) 100%);
        animation: loadingShimmer 1.2s infinite;
    }
@keyframes loadingShimmer {
    0% {
        left: -150px;
    }

    100% {
        left: 100%;
    }
}
.skeleton-text {
    height: 16px;
    width: 100%;
    margin-bottom: 8px;
}

.skeleton-title {
    height: 24px;
    width: 50%;
    margin-bottom: 12px;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}*/
/* label đẹp hơn */
.signature-label {
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 8px;
    display: inline-block;
}

/* container chính */
.signature-image-section {
    width: 100%;
    height: 350px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f6f8fb 0%, #f1f4f9 100%);
    border: 2px dashed #cbd5e1;
    border-radius: .25rem;
    padding: 12px;
    transition: all 0.25s ease;
}
    /* khi có chữ ký */
    .signature-image-section.show {
        background: linear-gradient(135deg, #f6f8fb 0%, #f1f4f9 100%);
    }

/* ảnh chữ ký */
.signature-image-bg {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 10px;
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.25s ease;
    filter: contrast(1.1) brightness(1.05);
}

/* khi có ảnh */
.signature-image-section.show .signature-image-bg {
    opacity: 1;
    transform: scale(1);
}

/* empty state */
.signature-empty {
    position: absolute;
    text-align: center;
    color: #64748b;
    transition: all 0.2s ease;
}

/* icon */
.empty-icon {
    font-size: 32px;
    margin-bottom: 6px;
    opacity: 0.7;
}

/* text */
.signature-empty p {
    margin: 0;
    font-weight: 500;
}

.signature-empty span {
    font-size: 13px;
    color: #94a3b8;
}

/* hide empty khi có chữ ký */
.signature-image-section.show .signature-empty {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
}
.form-actions {
    margin-top: 24px;
    padding-top: 20px;
}

.KSYeuCau_ChuThich {
    position: absolute;
    top: 50%;
    transform: translate(0,-50%);
    right: 1rem;
}
.category-header {
    font-weight: bold;
    padding: 6px 12px;
}

.category-xet-nghiem {
    background: #f8d7da;
    color: #721c24;
    border-left: 3px solid #dc3545;
}

.category-chan-doan-hinh-anh {
    background: #e9d8fd;
    color: #4a235a;
    border-left: 3px solid #6f42c1;
}

.category-tham-do-chuc-nang {
    background: #fce4ec;
    color: #880e4f;
    border-left: 3px solid #e83e8c;
}

.category-dich-vu-ky-thuat {
    background: #fde8d0;
    color: #7d3b00;
    border-left: 3px solid #fd7e14;
}

.category-mau-che-pham {
    background: #fadbd8;
    color: #6b0000;
    border-left: 3px solid #c0392b;
}

.category-thuoc-dich-truyen {
    background: #d4edda;
    color: #155724;
    border-left: 3px solid #20c997;
}

.category-vat-tu-y-te {
    background: #e9ecef;
    color: #343a40;
    border-left: 4px solid #6c757d;
}
.cls-section {
    border-radius: 4px;
    padding: 12px 16px;
}

.cls-section--primary {
    border-left: 4px solid #007bff;
    background: #f8fbff;
}

.cls-section--success {
    border-left: 4px solid #28a745;
    background: #f6fdf8;
}

.cls-section__title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.cls-section__title--primary {
    color: #007bff;
}

.cls-section__title--success {
    color: #28a745;
}

.cls-table {
    font-size: 14px;
}

    .cls-table thead.thead--primary {
        background: #e3f0ff;
    }

    .cls-table thead.thead--success {
        background: #e9f7ef;
    }

.cls-badge {
    font-size: 11px;
    border-radius: 10px;
}

.btn-pill {
    border-radius: 20px;
    font-size: 12px;
}
/* ── Page title block ── */
.ls-page-top {
    background: #fff;
    border-bottom: 1px solid #e3e6ea;
    padding: 20px 24px 0;
}

.ls-page-top h4 {
    font-size: 18px;
    font-weight: 700;
    color: #1a1f36;
    margin: 0 0 3px;
}

.ls-page-top p {
    font-size: 12px;
    color: #8898aa;
    margin: 0 0 16px;
}

/* ── Stats row (tab-style) ── */
.ls-stats-row {
    display: flex;
    border-top: 1px solid #e3e6ea;
}

.ls-stat-item {
    flex: 1;
    padding: 12px 20px;
    border-right: 1px solid #e3e6ea;
    text-align: center;
}

    .ls-stat-item:last-child {
        border-right: none;
    }

.ls-stat-val {
    font-size: 20px;
    font-weight: 700;
    color: #1a1f36;
    line-height: 1;
}

.ls-stat-lbl {
    font-size: 11px;
    color: #8898aa;
    margin-top: 3px;
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* ── Filter toolbar ── */
.ls-toolbar {
    background: #fff;
    border-bottom: 1px solid #e3e6ea;
    padding: 12px 24px;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

    .ls-toolbar .form-control,
    .ls-toolbar .select2-container--bootstrap4 .select2-selection--single {
        font-size: 13px;
        height: 36px !important;
        border-radius: 6px !important;
        border-color: #d0d5dd;
        color: #1a1f36;
        min-width: 0;
    }

        .ls-toolbar .form-control:focus {
            border-color: #0073b7;
            box-shadow: 0 0 0 3px rgba(0,115,183,.12);
        }

    .ls-toolbar .input-group {
        width: 220px;
    }

    .ls-toolbar .input-group-text {
        background: #fff;
        border-color: #d0d5dd;
        border-radius: 6px 0 0 6px !important;
        color: #8898aa;
        font-size: 13px;
        height: 36px;
        padding: 0 10px;
    }

    .ls-toolbar .input-group .form-control {
        border-left: 0;
        border-radius: 0 6px 6px 0 !important;
    }

    .ls-toolbar .select2-container {
        width: 185px !important;
    }

.ls-filter-date {
    width: 140px;
    font-size: 13px;
}

.ls-toolbar .btn {
    height: 36px;
    font-size: 13px;
    border-radius: 6px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.btn-ls-apply {
    background: #0073b7;
    border-color: #0073b7;
    color: #fff;
    font-weight: 600;
}

    .btn-ls-apply:hover {
        background: #005f9e;
        color: #fff;
    }

.btn-ls-reset {
    background: #fff;
    border: 1px solid #d0d5dd;
    color: #4a5568;
}

    .btn-ls-reset:hover {
        background: #f4f6f9;
    }

.btn-ls-refresh {
    background: #0073b7;
    border-color: #0073b7;
    color: #fff;
    font-weight: 600;
    margin-left: auto;
}

    .btn-ls-refresh:hover {
        background: #005f9e;
        color: #fff;
    }

/* ── Main table card ── */
.ls-table-card {
    background: #fff;
    border: 1px solid #e3e6ea;
    border-radius: 10px;
    overflow: hidden;
}

    .ls-table-card table {
        margin: 0;
        font-size: 13px;
        color: #1a1f36;
    }

    .ls-table-card thead th {
        background: #f8f9fb;
        border-bottom: 1px solid #e3e6ea;
        border-top: none;
        font-size: 11px;
        font-weight: 700;
        color: #8898aa;
        text-transform: uppercase;
        letter-spacing: .06em;
        padding: 11px 16px;
        white-space: nowrap;
    }

    .ls-table-card tbody tr {
        border-bottom: 1px solid #f0f2f5;
        transition: background .12s;
    }

        .ls-table-card tbody tr:last-child {
            border-bottom: none;
        }

        .ls-table-card tbody tr:hover {
            background: #f8f9fb;
        }

    .ls-table-card tbody td {
        padding: 13px 16px;
        vertical-align: middle;
        border: none;
    }

/* ── Avatar initials ── */
.ls-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    color: #fff;
}

.ls-avatar-teal {
    background: #0f7b6c;
}

.ls-avatar-blue {
    background: #2355a0;
}

.ls-avatar-orange {
    background: #d97706;
}

.ls-avatar-pink {
    background: #db2777;
}

.ls-avatar-purple {
    background: #7c3aed;
}

.ls-avatar-green {
    background: #059669;
}

/* ── Doc name cell ── */
.ls-doc-primary {
    font-weight: 600;
    color: #1a1f36;
    font-size: 13px;
    line-height: 1.3;
}

.ls-doc-secondary {
    font-size: 11px;
    color: #8898aa;
    margin-top: 2px;
}

/* ── Action badge ── */
.ls-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

    .ls-badge i {
        font-size: 11px;
    }

.ls-badge-create {
    background: #ecfdf5;
    color: #065f46;
}

.ls-badge-update {
    background: #fffbeb;
    color: #92400e;
}

.ls-badge-delete {
    background: #fef2f2;
    color: #991b1b;
}

.ls-badge-sign {
    background: #eff6ff;
    color: #17a2b8;
}

.ls-badge-delete-sign {
    background: #fff1f0;
    color: #cf1322;
}

.ls-badge-view {
    background: #f5f3ff;
    color: #5b21b6;
}

.ls-badge-other {
    background: #f4f6f9;
    color: #4a5568;
}

/* ── Footer pagination ── */
.ls-table-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 10px 14px;
    border-top: 1px solid #e3e6ea;
    gap: 12px;
    font-size: 13px;
    color: #4a5568;
    flex-wrap: wrap;
}

.ls-rows-per-page {
    display: flex;
    align-items: center;
    gap: 6px;
}

    .ls-rows-per-page select {
        font-size: 13px;
        height: 30px;
        border-radius: 5px;
        border: 1px solid #d0d5dd;
        padding: 0 6px;
        color: #1a1f36;
    }

.ls-page-info {
    color: #8898aa;
}

.ls-pagination {
    display: flex;
    gap: 4px;
    align-items: center;
}

    .ls-pagination .btn {
        height: 30px;
        min-width: 30px;
        font-size: 12px;
        border-radius: 5px;
        padding: 0 8px;
        border: 1px solid #d0d5dd;
        background: #fff;
        color: #4a5568;
    }

        .ls-pagination .btn.active {
            background: #17a2b8;
            border-color: #17a2b8;
            color: #fff;
            font-weight: 600;
        }

        .ls-pagination .btn:disabled {
            opacity: .4;
            cursor: not-allowed;
        }

/* ── Empty / Loading ── */
.ls-state {
    text-align: center;
    padding: 60px 0;
    color: #8898aa;
}

    .ls-state i {
        font-size: 32px;
        margin-bottom: 12px;
        display: block;
        opacity: .4;
    }

    .ls-state p {
        font-size: 14px;
        margin: 0;
    }

.ls-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid #e3e6ea;
    border-top-color: #0073b7;
    border-radius: 50%;
    animation: lsSpin .65s linear infinite;
    margin: 0 auto 12px;
}

.ls-avatar-red {
    background: #f5222d;
    color: #fff;
}

.ls-avatar-indigo {
    background: #2f54eb;
    color: #fff;
}

.ls-avatar-cyan {
    background: #13c2c2;
    color: #fff;
}

.ls-avatar-lime {
    background: #a0d911;
    color: #000;
}

.ls-avatar-amber {
    background: #faad14;
    color: #000;
}

.ls-avatar-deeporange {
    background: #fa541c;
    color: #fff;
}

.ls-avatar-brown {
    background: #8d6e63;
    color: #fff;
}

.ls-avatar-grey {
    background: #8c8c8c;
    color: #fff;
}

.ls-avatar-sky {
    background: #38bdf8;
    color: #000;
}

.ls-avatar-violet {
    background: #7c3aed;
    color: #fff;
}
#PhanLoaiBenhTaiKhoa .patient-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 14px;
}

#PhanLoaiBenhTaiKhoa .patient-item {
    width: 207px;
    padding: 8px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.3;
    background-position: right 2px bottom 2px;
    background-repeat: no-repeat;
    background-size: 50px auto;
}

/* 1. GIƯỜNG BỆNH (Xanh dương pastel - trùng khớp hình mẫu) */
#PhanLoaiBenhTaiKhoa .patient-item.bed-type-bed {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 70'%3E%3Cg fill='none' stroke='%234C7CC2' stroke-width='4' stroke-linecap='round' stroke-linejoin='round' opacity='0.35'%3E%3Cpath d='M20 14v40M80 24v30M20 30h60M20 38h60'/%3E%3Crect x='23' y='21' width='18' height='9' rx='4.5' transform='rotate(-20 23 21)'/%3E%3C/g%3E%3C/svg%3E");
}

/* 2. BĂNG CA (Đỏ hồng pastel - trùng khớp hình mẫu) */
#PhanLoaiBenhTaiKhoa .patient-item.bed-type-stretcher {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 70'%3E%3Cg fill='none' stroke='%23D9534F' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round' opacity='0.35'%3E%3Crect x='18' y='22' width='64' height='6' rx='3'/%3E%3Cpath d='M12 22h6M82 22h6M18 22v-6M82 22v-6M28 28v18M72 28v18M28 37h44'/%3E%3Ccircle cx='28' cy='49' r='3.5'/%3E%3Ccircle cx='28' cy='49' r='1'/%3E%3Ccircle cx='72' cy='49' r='3.5'/%3E%3Ccircle cx='72' cy='49' r='1'/%3E%3C/g%3E%3C/svg%3E");
}

#PhanLoaiBenhTaiKhoa .status-red {
    background-color: #f8d7da;
}

#PhanLoaiBenhTaiKhoa .status-orange {
    background-color: #ffe5d0;
}

#PhanLoaiBenhTaiKhoa .status-yellow {
    background-color: #fff3cd;
}

#PhanLoaiBenhTaiKhoa .status-pink {
    background-color: #ffd6e7;
}

#PhanLoaiBenhTaiKhoa .status-green {
    background-color: #d4edda;
}

#PhanLoaiBenhTaiKhoa .status-blue {
    background-color: #dbeafe;
}

#PhanLoaiBenhTaiKhoa .status-white {
    background-color: #ffffff;
}

#PhanLoaiBenhTaiKhoa .patient-code {
    font-weight: 600;
    margin-bottom: 2px;
}

#PhanLoaiBenhTaiKhoa .summary-badge {
    font-size: 14px;
    margin-right: 8px;
    margin-bottom: 8px;
}

@media (max-width: 768px) {
    #PhanLoaiBenhTaiKhoa .patient-item {
        min-width: 140px;
        max-width: 100%;
        flex: 1 1 calc(50% - 8px);
    }
}

#PhanLoaiBenhTaiKhoa .room-stat-group .btn {
    min-width: 92px;
    font-weight: 600;
}

#PhanLoaiBenhTaiKhoa .patient-item {
    font-size: 1rem;
    line-height: 1.45;
    padding: 0.65rem 0.8rem;
}

#PhanLoaiBenhTaiKhoa .patient-code {
    display: inline-block;
    font-size: 1rem;
    font-weight: 700;
    color: #0c5460;
    text-decoration: underline;
    margin-bottom: 0.15rem;
}

    #PhanLoaiBenhTaiKhoa .patient-code:hover {
        color: #0a3d47;
    }

#PhanLoaiBenhTaiKhoa .patient-name {
    font-size: 1.02rem;
    font-weight: 600;
    color: #1f2d3d;
}

#PhanLoaiBenhTaiKhoa .patient-meta {
    font-size: 0.95rem;
}

#PhanLoaiBenhTaiKhoa .maximized-card .card-body {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#PhanLoaiBenhTaiKhoa .maximized-card .table-responsive {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

#PhanLoaiBenhTaiKhoa .patient-item.bed-duplicate {
    border: 2px solid #dc3545;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.15);
    animation: blinkDuplicateBed 1s linear infinite;
}

@keyframes blinkDuplicateBed {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.55;
    }

    100% {
        opacity: 1;
    }
}

#PhanLoaiBenhTaiKhoa .btnChiDinhChuaTH {
    padding: 0 0.25rem;
    border: 0;
    background: transparent;
    color: #dc3545;
    font-size: 1rem;
    line-height: 1;
}

#PhanLoaiBenhTaiKhoa .btnChiDinhChuaTH:hover,
#PhanLoaiBenhTaiKhoa .btnChiDinhChuaTH:focus {
    color: #bd2130;
    box-shadow: none;
}

.card500H {
    height: 500px;
}

/* Hiệu ứng nhẹ khi card được render trên màn hình. */
.cardFade {
    animation: cardSoftAppear 0.28s ease-out both;
}

@keyframes cardSoftAppear {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .cardFade {
        animation: none;
    }
}

/* PhanHoiBenhAn/Index.cshtml */
.phanhoi-page {
            padding-bottom: 8px;
        }

        .phanhoi-patient-title {
            font-size: 18px;
            font-weight: 700;
            color: #001f3f;
            margin-bottom: 4px;
        }

        .phanhoi-patient-info {
            color: #6c757d;
            font-size: 12px;
            line-height: 1.4;
            margin-bottom: 0;
        }

        .phanhoi-toolbar {
            display: flex;
            justify-content: flex-end;
            align-items: center;
            gap: 6px;
            flex-wrap: wrap;
            margin-top: 4px;
        }

        .phanhoi-duyet-status {
            display: inline-flex;
            align-items: center;
            min-height: 31px;
            padding: 6px 10px;
            border-radius: 4px;
            font-size: 13px;
            line-height: 1;
        }

        .phanhoi-toolbar-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-height: 31px;
            padding: 5px 10px;
            border-radius: 4px;
            line-height: 1;
            white-space: nowrap;
        }

        .phanhoi-toolbar-btn i {
            margin-right: 4px;
        }

        .phanhoi-card {
            border: 1px solid #dfe3e8;
            border-radius: 5px;
            box-shadow: 0 1px 4px rgba(0,0,0,0.04);
        }

        .phanhoi-ticket-card {
            height: calc(100vh - 260px);
            min-height: 360px;
            max-height: calc(100vh - 260px);
            display: flex;
            flex-direction: column;
        }

        .phanhoi-ticket-header {
            padding: 9px 12px;
            border-bottom: 1px solid #e9ecef;
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-weight: 700;
            color: #001f3f;
            background: #ffffff;
        }

        .lstPhanHoiTree {
            padding: 8px;
            overflow-y: auto;
            flex: 1;
        }

        .lstPhanHoiTree p {
            position: relative;
            margin: 0 0 7px 0;
            padding: 9px 10px 9px 34px;
            border: 1px solid #e4e7eb;
            border-radius: 5px;
            background: #ffffff;
            color: #001f3f;
            cursor: pointer;
            transition: background-color 0.15s ease, border-color 0.15s ease;
        }

        .lstPhanHoiTree p:hover {
            background: #f7fbff;
            border-color: #b8daff;
        }

        .lstTimeTree.lstPhanHoiTree p.active {
            background: #edf6ff !important;
            border-color: #6bb6ff !important;
            box-shadow: inset 4px 0 0 #0d6efd;
        }

        .lstTimeTree.lstPhanHoiTree p.active,
        .lstTimeTree.lstPhanHoiTree p.active b,
        .lstTimeTree.lstPhanHoiTree p.active .phanhoi-ticket-title {
            color: #001f3f !important;
        }

        .lstTimeTree.lstPhanHoiTree p.active .phanhoi-ticket-meta {
            color: #4f6478 !important;
        }

        .lstTimeTree.lstPhanHoiTree p.active i {
            color: #0d6efd !important;
        }

        .lstPhanHoiTree p i {
            position: absolute;
            left: 12px;
            top: 17px;
            color: #001f3f;
        }

        .phanhoi-ticket-title {
            display: block;
            font-weight: 700;
            line-height: 1.25;
            margin-top: 2px;
        }

        .phanhoi-ticket-meta {
            display: block;
            color: #6c757d;
            font-size: 12px;
            margin: 2px 0 5px;
            line-height: 1.35;
        }

        .phanhoi-chat-card {
            height: calc(100vh - 260px);
            min-height: 360px;
            max-height: calc(100vh - 260px);
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .phanhoi-chat-header {
            padding: 9px 14px;
            border-bottom: 1px solid #e9ecef;
            background: #ffffff;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .phanhoi-chat-title {
            font-size: 15px;
            font-weight: 700;
            color: #001f3f;
            margin: 0;
        }

        .phanhoi-chat-subtitle {
            color: #6c757d;
            font-size: 12px;
            margin-top: 2px;
        }

        #chiTietPhanHoi .card-body {
            flex: 1;
            min-height: 0;
            padding: 0;
            background: #f4f6f9;
        }

        #chiTietPhanHoi .direct-chat-messages {
            height: 100% !important;
            padding: 10px 14px;
        }

        #chiTietPhanHoi .direct-chat-text {
            border-radius: 6px;
            border: 1px solid #dee2e6;
            background: #ffffff;
            color: #001f3f;
            line-height: 1.35;
            padding: 7px 10px;
            margin: 2px 0 0 44px;
        }

        #chiTietPhanHoi .direct-chat-msg {
            margin-bottom: 7px;
        }

        #chiTietPhanHoi .direct-chat-infos {
            margin-bottom: 2px;
        }

        #chiTietPhanHoi .direct-chat-img {
            width: 32px;
            height: 32px;
        }

        #chiTietPhanHoi .right .direct-chat-text {
            background: #eaf4ff;
            border-color: #b8daff;
            margin-right: 44px;
            margin-left: 0;
        }

        #chiTietPhanHoi .card-footer {
            background: #ffffff;
            border-top: 1px solid #e9ecef;
            padding: 9px 12px;
        }

        #chiTietPhanHoi .card-footer .form-control {
            min-height: 68px;
            font-size: 14px;
            resize: vertical;
        }

        #chiTietPhanHoi .card-footer .btn {
            min-height: 68px;
            font-size: 14px;
        }

        .phanhoi-readonly {
            opacity: 0.62;
        }

        .phanhoi-readonly .lstPhanHoiTree p,
        .phanhoi-readonly .card-footer textarea,
        .phanhoi-readonly .card-footer button {
            cursor: not-allowed;
        }

        .phanhoi-readonly .lstPhanHoiTree p {
            pointer-events: none;
        }

        .phanhoi-empty {
            height: 100%;
            min-height: 220px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #6c757d;
            text-align: center;
        }

        @media (max-width: 768px) {
            .phanhoi-ticket-card, .phanhoi-chat-card {
                height: auto;
                min-height: 0;
            }

            .lstPhanHoiTree {
                max-height: 260px;
            }

            .phanhoi-chat-card {
                min-height: 430px;
            }
        }


/* PhanHoiBenhAn/DuyetHS.cshtml */
/*body {
        background: #f4f6f9;
        color: #001f3f;
    }*/

    .hoso-page {
        padding-top: 12px;
    }

    .patient-header {
        margin-bottom: 8px;
    }

    .patient-title {
        font-size: 22px;
        font-weight: 700;
        color: #001f3f;
        margin-bottom: 6px;
    }

    .patient-info {
        font-size: 14px;
        color: #5f6c7b;
        line-height: 1.6;
        margin-bottom: 0;
    }

    /*.breadcrumb-action-row {
        background: #ffffff;
        border: 1px solid #e4e7eb;
        border-radius: 4px;
        padding: 8px 12px;
        margin-bottom: 12px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    }

    .breadcrumb {
        margin-bottom: 0;
        padding: 0;
        background: transparent;
        font-size: 14px;
    }*/

    /*.card {
        border: 1px solid #dfe3e8;
        border-radius: 5px;
        box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    }

    .card-header {
        padding: 12px 14px;
        border-bottom: 1px solid #dfe3e8;
    }

    .card-title-custom {
        font-weight: 700;
        font-size: 15px;
        margin-bottom: 0;
        color: #001f3f;
    }*/

    .phieu-list {
        max-height: calc(100vh - 220px);
        overflow-y: auto;
    }

    .phieu-item {
        padding: 13px 14px;
        border-bottom: 1px solid #edf0f2;
        cursor: pointer;
        transition: all 0.15s ease-in-out;
        background: #ffffff;
    }

        .phieu-item b {
            display: block;
            font-size: 15px;
            line-height: 1.35;
            color: #001f3f;
        }

        .phieu-item:hover {
            background: #f7fbff;
        }

        .phieu-item.active {
            background: #eaf4ff;
            border-left: 4px solid #007bff;
            padding-left: 10px;
        }

        .phieu-item.disabled {
            opacity: 0.55;
            pointer-events: none;
            background: #f8f9fa;
        }

    /*.table th {
        vertical-align: middle !important;
        background: #f8fafc;
        color: #001f3f;
        font-weight: 700;
        border-bottom: 1px solid #dfe3e8 !important;
        white-space: nowrap;
    }

    .table td {
        vertical-align: middle !important;
        color: #001f3f;
    }

    .table-hover tbody tr:hover {
        background-color: #f8fbff;
    }
*/
    .btn-xs-custom {
        padding: 4px 9px;
        font-size: 12px;
        line-height: 1.4;
        border-radius: 4px;
    }

    .hoso-status {
        font-size: 12px;
        padding: 5px 9px;
        border-radius: 4px;
    }

    /*.footer-alert {
        margin-top: 12px;
    }

    .modal-section-title {
        font-weight: 700;
        color: #343a40;
        margin-bottom: 8px;
    }*/

    .selected-phieu-box {
        background: #f8f9fa;
        border: 1px solid #dee2e6;
        border-radius: 4px;
        padding: 12px;
        margin-bottom: 15px;
    }

    .history-item {
        border: 1px solid #e3e8ef;
        border-left: 4px solid #17a2b8;
        border-radius: 5px;
        padding: 12px 14px;
        margin-bottom: 12px;
        background: #ffffff;
    }

    .history-time {
        font-size: 12px;
        color: #6c757d;
        margin-bottom: 6px;
    }

    .history-content {
        color: #001f3f;
    }

    .history-title {
        font-size: 16px;
        font-weight: 700;
        margin-bottom: 6px;
    }

    .history-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 6px 14px;
        color: #6c757d;
        font-size: 13px;
        line-height: 1.4;
        margin-bottom: 8px;
    }

    .history-note {
        background: #f8fafc;
        border: 1px solid #edf0f2;
        border-radius: 4px;
        padding: 8px 10px;
        line-height: 1.5;
        color: #001f3f;
    }

    .history-note-label {
        font-weight: 700;
        margin-right: 4px;
    }

    .btn-exchange-group .btn {
        margin-left: 6px;
    }

    /* =========================
           RIGHT SIDEBAR TRAO ĐỔI KHTH
           AdminLTE style
        ========================= */

    .khtn-chat-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.18);
        z-index: 1038;
        display: none;
    }

        .khtn-chat-overlay.show {
            display: block;
        }

    .khtn-chat-sidebar {
        position: fixed;
        top: 0;
        right: -760px;
        width: 760px;
        height: 100vh;
        background: #ffffff;
        z-index: 1039;
        box-shadow: -4px 0 16px rgba(0, 0, 0, 0.18);
        transition: right 0.25s ease-in-out;
        display: flex;
        flex-direction: column;
        border-left: 1px solid #dee2e6;
    }

        .khtn-chat-sidebar.open {
            right: 0;
        }

    .khtn-chat-header {
        padding: 14px 16px;
        border-bottom: 1px solid #dee2e6;
        background: #17a2b8;
        color: #ffffff;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .khtn-chat-title {
        font-size: 16px;
        font-weight: 700;
        margin: 0;
    }

    .khtn-chat-close {
        border: none;
        background: transparent;
        color: #ffffff;
        font-size: 24px;
        line-height: 1;
        cursor: pointer;
        padding: 0;
    }

    .khtn-chat-status {
        padding: 10px 16px;
        border-bottom: 1px solid #e9ecef;
        background: #ffffff;
    }

    .khtn-chat-main {
        flex: 1;
        min-height: 0;
        display: flex;
    }

    .khtn-ticket-panel {
        width: 280px;
        border-right: 1px solid #dee2e6;
        background: #ffffff;
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    .khtn-ticket-header {
        padding: 10px 12px;
        border-bottom: 1px solid #e9ecef;
        background: #f8f9fa;
        font-weight: 700;
        color: #001f3f;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .khtn-ticket-filter {
        padding: 8px;
        border-bottom: 1px solid #e9ecef;
        display: flex;
        gap: 6px;
    }

        .khtn-ticket-filter .btn {
            flex: 1;
            padding: 4px 6px;
            font-size: 12px;
        }

    .khtn-ticket-list {
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        padding: 8px;
    }

    .khtn-ticket-item {
        width: 100%;
        border: 1px solid #e4e7eb;
        background: #ffffff;
        border-radius: 4px;
        padding: 9px 10px;
        margin-bottom: 8px;
        text-align: left;
        cursor: pointer;
    }

        .khtn-ticket-item:hover {
            background: #f7fbff;
            border-color: #b8daff;
        }

        .khtn-ticket-item.active {
            background: #eaf4ff;
            border-color: #007bff;
            box-shadow: inset 3px 0 0 #007bff;
        }

    .khtn-ticket-name {
        font-weight: 700;
        color: #001f3f;
        line-height: 1.35;
        margin-bottom: 4px;
    }

    .khtn-ticket-meta {
        font-size: 12px;
        color: #6c757d;
        line-height: 1.45;
    }

    .khtn-conversation {
        flex: 1;
        min-width: 0;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

    .khtn-chat-body {
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        padding: 14px;
        background: #f4f6f9;
    }

    .khtn-message {
        margin-bottom: 14px;
        max-width: 86%;
    }

    .khtn-message-left {
        margin-right: auto;
    }

    .khtn-message-right {
        margin-left: auto;
        text-align: right;
    }

    .khtn-message-meta {
        font-size: 12px;
        color: #6c757d;
        margin-bottom: 4px;
    }

    .khtn-message-content {
        display: inline-block;
        padding: 9px 12px;
        border-radius: 10px;
        background: #ffffff;
        border: 1px solid #dee2e6;
        text-align: left;
        line-height: 1.5;
        color: #001f3f;
        word-break: break-word;
    }

    .khtn-message-right .khtn-message-content {
        background: #eaf4ff;
        border-color: #b8daff;
    }

    .khtn-system-message {
        max-width: 100%;
        text-align: center;
    }

        .khtn-system-message .khtn-message-content {
            background: #fff3cd;
            border-color: #ffeeba;
            color: #856404;
            font-size: 13px;
        }

    .khtn-chat-footer {
        border-top: 1px solid #dee2e6;
        padding: 12px;
        background: #ffffff;
    }

        .khtn-chat-footer textarea {
            resize: none;
        }

    .khtn-chat-actions {
        display: flex;
        justify-content: space-between;
        margin-top: 8px;
    }

        .khtn-chat-actions .btn {
            font-size: 13px;
        }

    .khtn-closed-box {
        background: #f8d7da;
        color: #721c24;
        border: 1px solid #f5c6cb;
        border-radius: 4px;
        padding: 8px 10px;
        font-size: 13px;
        margin-bottom: 10px;
    }

    @media (max-width: 768px) {
        .patient-title {
            font-size: 18px;
        }

        .breadcrumb-action-row {
            align-items: flex-start;
        }

        .btn-exchange-group {
            margin-top: 8px;
            width: 100%;
            flex-wrap: wrap;
        }

            .btn-exchange-group .btn {
                margin-left: 0;
                margin-right: 6px;
                margin-bottom: 6px;
            }

        .phieu-list {
            max-height: none;
        }

        .khtn-chat-sidebar {
            width: 100%;
            right: -100%;
        }

        .khtn-chat-main {
            flex-direction: column;
        }

        .khtn-ticket-panel {
            width: 100%;
            max-height: 210px;
            border-right: none;
            border-bottom: 1px solid #dee2e6;
        }

        .khtn-message {
            max-width: 95%;
        }

        .khtn-chat-actions {
            flex-wrap: wrap;
        }

            .khtn-chat-actions .btn {
                margin-bottom: 6px;
            }
    }

.badgeHeaderGiuong {
    font-size: 55%;
    display: inline-block;
    position: relative;
    bottom: 3px;
}

/* Scroll navigation buttons (goto top / goto bottom) */
.scroll-nav-btn {
    display: none;
    position: fixed;
    right: 1.25rem;
    bottom: 1.5rem;
    z-index: 1050;
    width: 2.625rem;
    height: 2.625rem;
    border: none;
    border-radius: 50%;
    background-color: #17a2b8;
    color: #fff;
    font-size: 1.125rem;
    cursor: pointer;
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.25);
    outline: none;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    align-items: center;
    justify-content: center;
}

/* Responsive cho Mobile */
@media (max-width: 767.98px) {
    .scroll-nav-btn {
        bottom: 8rem;
        right: 0.5rem;
        width: 2.2rem;
        height: 2.2rem;
    }
}

.scroll-nav-btn.show {
    display: flex;
    opacity: 0.8;
}

.scroll-nav-btn:hover {
    background-color: #138496;
    transform: scale(1.1);
}

.scroll-nav-btn:active {
    transform: scale(0.95);
}
