﻿@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600;700;800&family=Audiowide&family=Faster+One&display=swap');
:root {
    --animate-duration: 0.3s;
}
:root {
    --datagrid-height: calc( 100vh - var(--navbar-height) - var(--top-toolbar-height) - var(--chipset-container-height) - var(--table-toolbar-height) - var(--top-switch-height) - var(--table-pagination-height) - var(--component-gap) );
}
body {
    margin: 0;
    background: linear-gradient(rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 1) 100%), linear-gradient(90deg, #8d5acd48, #84d2ff54) !important;
    /* Dùng Roboto tải từ web để chữ tiếng Việt hiển thị giống nhau trên mọi thiết bị,
       các font sau chỉ là dự phòng khi mạng chậm. */
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Helvetica', 'Arial', sans-serif !important;
    /* Nét chữ mảnh và sắc hơn */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    --mud-default-borderradius: var(--radius-card, 16px);
}
/* Khung layout gốc phủ khít màn hình nên không bo góc như card */
.main-content {
    border-radius: 0 !important;
}
/* Ngăn cuộn vượt quá màn hình */
html, body {
    overscroll-behavior: none;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
   
}
/* Viewer.js */
.viewer-backdrop {
    background-color: rgba(0, 0, 0, 0.8) !important;
    backdrop-filter: blur(50px);
    -webkit-backdrop-filter: blur(50px);
}
.viewer-container {
    z-index: 9999 !important;
}

.auto-table-height .mud-table-container {
    min-height: var(--datagrid-height) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* Style dùng chung cho nhiều trang danh sách và báo cáo */
.mt-2, .my-2 {
    margin-top: 1px !important;
}
#hlpPaymentPoints {
    color: red;
    font-weight: bold;
    font-size: 10px;
}
/* Chữ trợ giúp, dùng chung ở các màn hình lập phiếu và thanh toán */
#hlpExchangePoints {
    color: red;
}
#hlpAddress {
    font-weight: bold;
}
/* Bỏ đường kẻ dưới của dòng cuối bảng dịch vụ, dùng chung ở các màn hình lập/xem phiếu.
   Lớp bill-detail-last-row do RowClassFunc của bảng gắn cho dòng cuối. */
.bill-detail-table .bill-detail-last-row .mud-table-cell {
    border-bottom: none !important;
}
/* Thu hẹp khoảng đệm tiêu đề, chỉ cho hộp thoại thanh toán */
.mud-dialog.dlg-payment .mud-dialog-title {
    padding-bottom: 2px !important;
}
.mud-drawer:not(.mud-drawer--open) {
    transform: translateX(100%) !important;
    transform: translateY(-100%) !important;
}

/* Nhãn trong cây phân quyền */
.mud-treeview-item-label {
    font-weight: bold !important;
    font-size: small !important;
}

/* Thanh công cụ giữ trên một hàng, chữ và chip không co lại */
#top-toolbar {
    height: auto !important;
    min-height: 48px;
    flex-wrap: nowrap;
    align-items: center;
}
#top-toolbar .mud-button-root {
    white-space: nowrap;
    min-width: 0;
    padding-left: 6px;
    padding-right: 6px;
}
#top-toolbar .mud-chipset { flex-wrap: nowrap; margin-bottom: 0 !important; }
#top-toolbar .mud-chip { margin: 2px 3px !important; flex: 0 0 auto; }

/* Trang danh sách phiếu cao bằng màn hình, bảng tự cuộn bên trong (chỉ desktop) */
@media (min-width: 1024px) {
    html:has(.bills-page),
    body:has(.bills-page) {
        overflow: hidden;
    }

    /* Bảng tự lấp phần còn lại của màn hình ở mọi độ phân giải */
    .bills-page {
        height: calc(100dvh - var(--navbar-height, 69px) - 16px);
        display: flex;
        flex-direction: column;
        min-height: 0;
        overflow: hidden;
    }

    .bills-page > .bills-table-shell {
        flex: 1 1 auto;
        min-height: 0;
        margin-bottom: 5px;
    }

    .bills-page .mud-height-full,
    .bills-page .auto-table-height {
        height: 100%;
        min-height: 0;
    }

    .bills-page .auto-table-height .mud-table {
        height: 100%;
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    .bills-page .auto-table-height .mud-table > .mud-toolbar {
        flex: 0 0 auto;
    }
}

/* Khung lọc bên phải ở desktop: viền trái và đổ bóng để tách khỏi danh sách */
.uv-filter-drawer {
    border-left: 1px solid var(--color-border, #E2DFEE);
    box-shadow: -6px 0 16px rgba(46, 40, 90, .10);
}
/* Kiểu chung cho các ô nhập liệu nền đặc, màu lấy từ token của app */
.mud-input-filled {
    background: color-mix(in srgb, var(--primary-dark, #4A3BD4) 2%, transparent) !important;
    border: 1px solid color-mix(in srgb, var(--primary-dark, #4A3BD4) 42%, transparent);
    border-radius: var(--r-md, 12px) !important;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
/* Chỉ bỏ gạch chân ở ô nền đặc, ô kiểu chữ trơn vẫn cần gạch chân để nhận ra */
.mud-input-filled.mud-input-underline::before,
.mud-input-filled.mud-input-underline::after {
    display: none;
}
/* Khi chọn ô chỉ đậm màu viền, không đổi độ dày để hàng không bị nhích */
.mud-input-control:focus-within .mud-input-filled {
    border-color: color-mix(in srgb, var(--primary-dark, #4A3BD4) 85%, transparent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-dark, #4A3BD4) 16%, transparent);
}
/* Nhãn đậm hơn mặc định nhưng vẫn nhạt hơn giá trị nhập */
.mud-input:not(:focus-within) ~ label.mud-input-label.mud-input-label-filled:not(.mud-disabled) {
    color: rgba(0,0,0,.78);
}
.mud-input-filled:not(.mud-disabled) input,
.mud-input-filled:not(.mud-disabled) .mud-input-slot {
    color: var(--color-text-primary, rgba(0,0,0,.87));
}
/* Chữ gợi ý trong ô rỗng đỡ mờ hơn mặc định */
.mud-input-filled:not(.mud-disabled) input.mud-input-root::placeholder,
.mud-input-filled:not(.mud-disabled) .mud-input-slot.mud-input-root::placeholder {
    opacity: .62;
}
/* Ô không có nhãn thì bỏ khoảng chừa phía trên để hộp không cao vống lên */
.mud-input.mud-input-filled:not(.mud-input-filled-with-label) > input.mud-input-root.mud-input-root-filled,
.mud-input.mud-input-filled:not(.mud-input-filled-with-label) > .mud-input-slot.mud-input-root.mud-input-root-filled {
    padding-top: 6px;
    padding-bottom: 6px;
}
/* Cho ô chọn và ô nhập cùng ăn một khai báo kiểu chữ */
.mud-input-filled {
    font-weight: inherit;
}

/* Card viền mảnh và bóng nhẹ, trừ các card cố ý để phẳng */
.mud-card:not(.mud-elevation-0) {
    border: 1px solid var(--color-border-card, rgba(20,30,60,.08));
    box-shadow: var(--shadow-card-soft, 0 1px 2px rgba(20,30,60,.04), 0 4px 16px rgba(20,30,60,.06));
}

/* Chừa chỗ cho khung lọc bên phải để nó đẩy nội dung thay vì đè lên */
.mud-drawer.mud-drawer-persistent.mud-drawer-pos-right.mud-drawer--open ~ div.row,
.mud-drawer.mud-drawer-mini.mud-drawer-pos-right.mud-drawer--open ~ div.row {
    margin-right: var(--mud-drawer-width, var(--mud-drawer-width-right)) !important;
}

.note-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px; 
    word-break: break-word;
}
.mud-table-dense * .mud-table-row .mud-table-cell:last-child {
    padding-inline-end: 8px !important;
}
.main-content {
    min-height: calc( 100vh - var(--navbar-height) - var(--top-toolbar-height) - var(--chipset-container-height)- var(--table-toolbar-height) - var(--top-switch-height) - var(--table-pagination-height) - var(--component-gap) ) !important;
    overflow: auto;
    position: relative;
    /* Cố ý không đặt -webkit-overflow-scrolling ở đây: trên iOS nó làm các bảng chọn bị che */
    scroll-behavior: smooth;
}
.dialog-backdrop {
    backdrop-filter: blur(20px);
}
.mud-drawer {
    overflow: visible !important;
}
.mud-table .mud-table-pagination .mud-table-pagination-toolbar {
    padding-top: 6px;
    padding-top: 6px;
    padding-right: 16px;
    padding-inline-end: 16px;
    padding-inline-start: unset;
    min-height: 35px;
}
.mud-dialog .mud-dialog-title {
    padding: 10px 24px !important;
}

.list-group-item {
    padding: 0.1rem .2rem !important;
}
.table-bill-inf td {
    padding-top: 1px;
    padding-bottom: 2px;
}
.top-nav {
    background: var(--primary, #594AE2);
    border-bottom: solid #ff8900;
}

.top-nav-mobie {
    background: var(--primary, #594AE2);
}

@media (min-width: 1400px) {
    .navbar-expand-xxl .top-nav-mobie.offcanvas.w-100 {
        width: auto !important;
        max-width: 100%;
        min-width: 0;
        flex: 1 1 auto;
    }

    .navbar-expand-xxl .top-nav-mobie .offcanvas-body,
    .navbar-expand-xxl .top-nav-mobie .navbar-nav {
        min-width: 0;
    }
}

.logo {
    height: 20px;
    opacity: 0.8;
}

.user-icon {
    height: 20px;
}

.logo-text {
    font-family: 'Audiowide', sans-serif;
    color: lavenderblush;
    font-size: 26px;
}

.logo-text-primary {
    font-family: 'Audiowide', sans-serif;
    color: var(--primary, #594AE2);
    font-size: 2.5rem;
}

.logo-text-u {
    font-family: 'Audiowide', sans-serif;
    color: white !important;
    font-weight: 800;
    font-size: 2.5rem;
}

.logo-text-slogan {
    font-family: 'Roboto', sans-serif;
    color: var(--primary, #594AE2);
    font-size: .68rem;
}

.badge {
    font-size: .9em !important;
}

.nav-link {
    color: white !important;
    background-color: rgb(255 255 255 / 6%) !important;
    border-radius: 10px;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
    font-size: .86rem !important;
    font-weight: 500 !important;
}

    .nav-link:hover {
        color: white !important;
        background-color: rgb(255 255 255 / 30%) !important;
    }

.nav-item {
    margin-right: .5rem !important;
    margin-top: .2rem !important;
    margin-bottom: .2rem !important;
}

.nav-link.active {
    color: white !important;
    background-color: rgb(255 255 255 / 30%) !important;
}

.navbar-toggler {
    border: none !important;
}

a, .btn-link {
    color: #0366d6;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    color: red !important;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.text-purple {
    color: #ff4081;
}

.floating-button {
    position: fixed !important;
    bottom: 75px;
    right: 60px;
}

.mud-list-item-icon {
    min-width: 15px !important;
}

/* Lớp phủ của cảnh báo mất kết nối, để nhạt cho thấy được nội dung trang phía sau */
.conn-overlay .mud-overlay-scrim {
    background-color: rgba(18, 16, 40, .32) !important;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

#mud-snackbar-container {
    margin-top: 35px !important;
}

.mud-list-item-gutters {
    border-bottom: 1px !important;
    border-bottom-style: dotted !important;
    border-bottom-color: #dee2e6 !important;
}

.mud-chip.mud-chip-size-large {
    border-radius: 25px !important;
    height: 49px !important;
}

.mud-button-filled-size-large {
    padding: 11px 22px !important;
    font-size: 1rem !important;
}

.mud-table-dense * .mud-table-row .mud-table-cell {
    font-weight: bold !important;
}

.mud-table-root .mud-table-head .mud-table-cell {
    font-weight: bold !important;
}

.mud-dialog-width-full {
    width: calc(100% - 20px) !important;
}

.textbox-radius {
    --mud-default-borderradius: 19px !important;
}

.mud-toolbar-dense {
    --mud-internal-toolbar-height: 39px !important;
}

.mud-dialog {
    margin-left: 0.5rem !important;
    margin-right: 0.5rem !important
}
    .mud-dialog .mud-dialog-actions {
        padding: 8px 18px !important;
    }
    .mud-dialog .mud-dialog-content {
        padding: 8px 15px !important;
    }
    /* Hộp thoại có biểu mẫu: nội dung cuộn được và nút bấm luôn nằm ở đáy */
    .mud-dialog > form {
        display: flex;
        flex-direction: column;
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden;
    }
        .mud-input.mud-disabled {
        color: rgb(0 0 0 / 60%) !important;
    }

.mud-link.mud-link-disabled {
    opacity: 0.6 !important;
}

.mud-chip.mud-disabled {
    opacity: 0.6 !important;
}

.mud-xl-table.mud-table-dense .mud-table-cell {
    padding: 2px 8px;
}

h1:focus {
    outline: none;
}
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}
.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}
.blazor-error-boundary::after {
    content: "An error has occurred."
}
.progress-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    flex-direction: column;
}
.progress {
    width: 120px;
    height: 20px;
    background-color: #fff !important;
    border: solid 2px var(--primary, #594AE2);
    align-items: center;
    position: relative;
   
}

.progress-bar {
    width: var(--blazor-load-percentage, 0%);
    background-color: rgba(89, 74, 226, 1) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.loading-progress-text {
    font-size: 10px !important;
    color: rgb(255 255 255 / 6%) !important;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "0%");
    color: white !important;
}
.progress-text {
    font-size: 9px;
    margin-bottom: 6px;
    color: darkslateblue;
    font-weight: 600;
}
.row {
    --bs-gutter-x: 0;
    margin: 0px !important;
}
.dot-container {
    display: flex;
    align-items: center;
}
.dot-green {
    width: 8px;
    height: 8px;
    background-color: rgb(0 200 83);
    border-radius: 50%;
    margin-right: 3px;
}
.dot-yellow {
    width: 7px;
    height: 7px;
    background-color: rgb(255 152 0);
    border-radius: 50%;
    margin-right: 3px;
}
.text-glow {
    color: #ff5722;
    text-align: center;
    animation: glowSpread 2s ease-out infinite;
}
@keyframes glowSpread {
    0% {
        transform: scale(0.5);
        opacity: 0.5;
        text-shadow: 0 0 20px rgba(255, 87, 34, 0.3), 0 0 40px rgba(255, 87, 34, 0.3), 0 0 60px rgba(255, 87, 34, 0.3);
    }

    50% {
        transform: scale(1);
        opacity: 1;
        text-shadow: 0 0 40px rgba(255, 87, 34, 1), 0 0 60px rgba(255, 87, 34, 0.8), 0 0 80px rgba(255, 87, 34, 0.6);
    }

    100% {
        transform: scale(0.5);
        opacity: 0.5;
        text-shadow: 0 0 20px rgba(255, 87, 34, 0.3), 0 0 40px rgba(255, 87, 34, 0.3), 0 0 60px rgba(255, 87, 34, 0.3);
    }
}


/* Lớp mờ khi đang lọc tìm kiếm, dùng chung mobile và desktop.
   Rule tắt lớp mờ phải đặt TRƯỚC rule bật, nếu đảo thứ tự sẽ mất hiệu ứng. */
.list, .auto-table-height, .search-busy-host {
    transition: filter .16s ease-out, opacity .16s ease-out;
}
.search-busy {
    filter: blur(2.5px);
    opacity: .55;
    pointer-events: none;
    /* Bật tức thì, không chuyển động, vì lúc này đang bận lọc dữ liệu */
    transition: none;
}

/* Chi bao trang thai: nen sang, vien mach, bong nhe cho do doi chu y khi cuon */
.uv-loading-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--color-card, #FFFFFF);
    color: var(--color-text-secondary, rgba(0,0,0,.60));
    font-weight: 600;
    border: 1px solid var(--color-border, #E2DFEE);
    box-shadow: 0 6px 20px rgba(46, 40, 90, .12);
}
/* Mau thuong hieu cho vong quay dang tai */
.uv-loading-pill .mud-progress-circular {
    color: var(--color-primary, #594AE2);
}

/* Chi bao nap them o bang desktop: ghim day khung nhin */
.uv-loadmore-pill {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1400;
}

/* Goc dinh vi cho chi bao dang lay du lieu */
.uv-grid-wrap {
    position: relative;
}

/* Chi bao nap lan dau, can giua vung bang */
.uv-loading-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1400;
}

/* Màn chờ phủ cả khung nhìn, đặt ngoài dòng chảy nên không làm trang cao thêm */
.uv-loading-fullpage {
    position: fixed;
    inset: 0;
}

/* Tooltip đang đóng không chiếm chỗ trong trang */
.mud-popover-provider > .mud-tooltip:not(.mud-popover-open) {
    height: 0;
    padding: 0;
    overflow: hidden;
}

/* O bang desktop: dung the HTML thuan thay component de bang dai van nhe */
.gcell {
    font-family: Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 20.02px;
    letter-spacing: 0.14994px;
    color: rgb(66, 66, 66);
}
/* Cot doc trong mot o */
.gcell.gcol,
.gcell .gcol { display: flex; flex-direction: column; gap: 4px; }
/* Hang ngang */
.gcell.grow,
.gcell .grow { display: flex; flex-direction: row; }
/* Bien the hang ngang: can giua doc, khoang cach 4/8px, can dinh */
.gcell.grow.gmid,
.gcell .grow.gmid { align-items: center; }
.gcell.grow.ggap,
.gcell .grow.ggap { gap: 4px; }
.gcell.grow.ggap2,
.gcell .grow.ggap2 { gap: 8px; }
.gcell.grow.gtop,
.gcell .grow.gtop { align-items: flex-start; }
/* Cot doc khong khoang cach */
.gcell.gcol0,
.gcell .gcol0 { display: flex; flex-direction: column; gap: 0; }
/* Nut tac vu nhanh khong co lai */
.gcell .mud-menu { flex: none; }
/* Nhan mo dan truoc gia tri, khong duoc co lai keo bi roi dong */
.gcell .glabel { color: rgba(0, 0, 0, .5); margin-right: 4px; flex: none; white-space: nowrap; }
/* Gia tri dam */
.gcell .gval { font-weight: 700; }
.gcell .gml1 { margin-left: 4px; }
/* Icon trong dong chu */
.gcell .gicon { width: 13px; height: 24px; flex: none; }

/* Ten khach hang bam duoc */
.gcell .glink {
    font-size: 16px; font-weight: 700; line-height: 24px; letter-spacing: 0.15008px;
    color: rgb(89, 74, 226); cursor: pointer; text-decoration: none;
    text-align: left; background: none; border: none; padding: 0; font-family: inherit;
}
.gcell .glink:hover { text-decoration: underline; }

/* Chip trang thai */
.gcell .gchip {
    display: inline-flex; align-items: center; justify-content: center;
    height: 18px; padding: 0 8px; margin: 4px; border-radius: 12px;
    font-size: 12px; font-weight: 700; letter-spacing: 0.14994px; line-height: normal;
    color: rgb(255, 255, 255); cursor: pointer; white-space: nowrap; border: none;
    font-family: inherit;
    /* Giu nguyen kich thuoc chip, phan bi cat la ten khach */
    flex: none;
}
.gcell .gchip.gchip-default { color: var(--mud-palette-text-primary); }

/* Chu nho */
.gcell .gcap {
    font-size: 12px; font-weight: 400; line-height: 19.92px; letter-spacing: 0.39996px;
    color: rgb(66, 66, 66);
}
/* Khuyen mai va ghi chu */
.gcell .gcap.gnote { font-weight: 700; font-style: italic; }
/* Chu mo. Phai dat SAU rule chu nho vi cung do uu tien */
.gcell .gmuted { color: rgba(0, 0, 0, .5); }

/* So tien in dam */
.gcell .gmoney { font-size: 16px; font-weight: 900; line-height: 19.0016px; color: rgb(66, 66, 66); }
.gcell .ghelper { font-size: 12px; font-weight: 400; line-height: 19.92px; color: rgba(0, 0, 0, .537); }

/* Chu thich hien khi ro chuot, chi ap cho phan tu co thuoc tinh data-tip */
.gcell .gtip { position: relative; }
.gcell .gtip[data-tip]:hover::after {
    content: attr(data-tip);
    position: absolute; bottom: calc(100% + 6px); left: 0;
    background: rgba(33, 33, 33, .92);
    color: rgb(255, 255, 255);
    font-size: 12px; font-weight: 400; font-style: normal; line-height: 1.4;
    letter-spacing: normal; padding: 6px 10px; border-radius: 4px;
    width: max-content; max-width: 320px;
    /* Cho ngat giua tu de chuoi dai khong tran ra ngoai khung */
    white-space: normal; overflow-wrap: anywhere; word-break: break-word;
    z-index: 30; pointer-events: none;
}

/* Cat con mot dong ma khong lam o phinh be ngang theo do dai chuoi */
.gcell .g1line,
.gcell .glink,
.gcell .gnote {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    overflow: hidden;
    overflow-wrap: anywhere;
    min-width: 0;
    max-width: 100%;
}

/* Cot tien: tieu de va gia tri cung can trai */
th.uv-money,
td.uv-money { text-align: left; }
/* Giu icon sap xep nam cung hang voi tieu de cot */
th.uv-money .mud-table-sort-label { flex-direction: row; }
/* O tien la nut nen phai tu can trai */
td.uv-money .gamount { margin-right: auto; align-items: flex-start; }

/* So tien bam duoc o cot tong tien */
.gcell .gamount {
    display: flex; flex-direction: column; align-items: flex-start;
    background: none; border: none; padding: 0; cursor: pointer;
    font-family: inherit; color: inherit; text-align: left;
}
.gcell .gamount:hover .gval { text-decoration: underline; }
.gcell .gpoint { color: var(--mud-palette-secondary); }

/* Lop mo khi loc, ban chi lam mo than bang de o tim kiem van go duoc.
   Rule tat dat TRUOC rule bat, giong nhu o lop mo phia tren. */
.auto-table-height .mud-table-container { transition: filter .16s ease-out, opacity .16s ease-out; }
.search-busy-body .mud-table-container {
    filter: blur(2.5px);
    opacity: .55;
    pointer-events: none;
    /* Bat tuc thi, khong chuyen dong */
    transition: none;
}


/* Khoa ty le cot cho bang desktop de cot khong nhay ngang khi cuon.
   Ty le tung cot khai thang tren the cot trong file razor, khong dat o day. */
.uv-tbl .mud-table-root { table-layout: fixed; width: 100%; }
/* Chuoi dai khong khoang trang phai xuong dong trong o */
.uv-tbl .mud-table-root > tbody > tr > td { overflow-wrap: anywhere; }

/* Cho ten khach hay dia chi nam ngoai bang: card, hero mobile, o thong tin trong hop thoai */
.uv-wrap-any { overflow-wrap: anywhere; word-break: break-word; }

/* Cho thanh cong cu cua bang cao theo noi dung khi phan thong tin can hon mot dong */
.uv-bar-auto .mud-table-toolbar { height: auto; }

/* Ghi chú của dòng dịch vụ, dùng chung ở các màn hình lập phiếu và sửa phiếu.
   Ô nhập chỉ hiện khi rê chuột vào dòng; khi đã có nội dung thì hiện dạng caption mảnh bấm được. */
.note-input {
    display: none;
}

.note-label {
    display: block;
}

.hover-group:hover .note-input {
    display: block !important;
}

.hover-group:hover .note-label {
    display: none !important;
}

.note-view {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    padding: 3px 2px 0;
    margin-top: 2px;
}

.note-view .mud-icon-root {
    width: 13px !important;
    height: 13px !important;
    font-size: 13px !important;
    flex: none;
    color: var(--mud-palette-text-secondary, #9a9a9a);
}

.note-view span {
    font-size: 0.78rem;
    font-style: italic;
    color: var(--mud-palette-text-secondary, #757575);
    line-height: 1.3;
}

/* Bố cục cột trái của màn hình lập phiếu và sửa phiếu ở desktop: panel dịch vụ giãn hết chiều cao
   còn lại, kèm nút thu gọn nằm giữa mép panel. Khi thu gọn thì bảng dịch vụ co theo số dòng. */
@media (min-width: 1024px) {
    .bill-left-col {
        display: flex;
        flex-direction: column;
        height: 100%;
    }

    .bill-detail-panel {
        position: relative;
    }

    .bill-service-panel-wrap {
        position: relative;
        flex: 1 1 auto;
        min-height: 0;
        overflow: visible;
    }

    .bill-service-panel-wrap .bill-service-panel {
        height: 100%;
    }

    .bill-service-toggle-anchor {
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        z-index: 4;
        line-height: 0;
    }

    .bill-service-toggle-anchor-hidden {
        top: auto;
        bottom: 0;
    }

    .bill-service-toggle {
        background-color: #fff !important;
        border: 1px solid var(--mud-palette-lines-default);
        border-top: 0;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
        color: var(--mud-palette-info) !important;
        width: 34px !important;
        height: 18px !important;
        min-width: 34px !important;
        min-height: 18px !important;
        padding: 0 !important;
        border-radius: 0 0 10px 10px !important;
    }

    .bill-service-toggle .mud-icon-root {
        font-size: 0.9rem !important;
    }

    .bill-service-toggle-hidden {
        border-top: 1px solid var(--mud-palette-lines-default);
        border-bottom: 0;
        border-radius: 10px 10px 0 0 !important;
        box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.12);
    }

    .bill-left-col.bill-service-hidden .bill-detail-panel {
        flex: 1 1 auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
        margin-bottom: 0 !important;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .bill-left-col.bill-service-hidden .bill-detail-panel .mud-autocomplete {
        flex: 0 0 auto !important;
    }

    .bill-left-col.bill-service-hidden .bill-detail-table,
    .bill-left-col.bill-service-hidden .bill-detail-table .mud-table-container {
        flex: 0 0 auto;
        min-height: 0;
        max-height: none;
        height: auto !important;
    }

    .bill-left-col.bill-service-hidden .bill-detail-table {
        display: flex;
        flex-direction: column;
    }
}
