﻿/* ═══════════════════════════════════════════════════════════════
   POS Configuration — pos-config.css
   Dùng chung CSS variables với pms-config.css
   ═══════════════════════════════════════════════════════════════ */

/* ── Category Filter Combo ────────────────────────────────── */
.pos-filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-bottom: 1px solid var(--cfg-border-light, #f2ede6);
    background: var(--cfg-card, #fff);
}

.pos-filter-label {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--cfg-text-muted, #7a7570);
    white-space: nowrap;
}

.pos-filter-combo {
    position: relative;
    flex: 1;
}

.pos-filter-input {
    width: 100%;
    padding: 6px 10px 6px 28px;
    border-radius: 6px;
    border: 1px solid var(--cfg-border, #ebe6df);
    background: var(--cfg-bg, #faf7f2);
    font-size: 12px;
    font-family: inherit;
    color: var(--cfg-text, #2d2a26);
    outline: none;
}

    .pos-filter-input:focus {
        border-color: var(--cfg-accent, #c4841d);
        background: #fff;
    }

.pos-filter-icon {
    position: absolute;
    left: 9px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    pointer-events: none;
    color: var(--cfg-text-muted, #b0a99f);
}

.pos-filter-clear {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: none;
    background: var(--cfg-border, #ebe6df);
    color: var(--cfg-text-muted, #b0a99f);
    font-size: 9px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
}

    .pos-filter-clear.show {
        display: flex;
    }

    .pos-filter-clear:hover {
        background: #fdf0f0;
        color: #c44040;
    }

.pos-filter-dropdown {
    position: absolute;
    top: calc(100% + 3px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--cfg-border, #ebe6df);
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(45,42,38,0.10);
    max-height: 220px;
    overflow-y: auto;
    z-index: 200;
    display: none;
}

    .pos-filter-dropdown.show {
        display: block;
    }

    .pos-filter-dropdown::-webkit-scrollbar {
        width: 4px;
    }

    .pos-filter-dropdown::-webkit-scrollbar-thumb {
        background: #ebe6df;
        border-radius: 4px;
    }

.pos-filter-option {
    padding: 7px 12px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .pos-filter-option:hover {
        background: #fdf4e7;
    }

    .pos-filter-option.active {
        background: #fdf4e7;
        color: #c4841d;
        font-weight: 600;
    }

    .pos-filter-option .fopt-code {
        font-size: 10px;
        font-weight: 600;
        color: #c4841d;
        background: #fdf4e7;
        padding: 1px 5px;
        border-radius: 3px;
        min-width: 36px;
        text-align: center;
    }

    .pos-filter-option .fopt-name {
        flex: 1;
    }

    .pos-filter-option .fopt-count {
        font-size: 10px;
        color: #b0a99f;
    }

/* ── Type Badge ───────────────────────────────────────────── */
.pos-type {
    font-size: 10px;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 4px;
    white-space: nowrap;
    display: inline-block;
}

.pos-type-pos {
    background: #eef6fb;
    color: #4a8fb8;
}

.pos-type-wh {
    background: #edf7f0;
    color: #3a9a5c;
}

.pos-type-kitchen {
    background: #fef3e2;
    color: #b8860b;
}

.pos-type-beverage {
    background: #f0e6ff;
    color: #7c3aed;
}

.pos-type-service {
    background: #f2ede6;
    color: #7a7570;
}

.pos-type-direct {
    background: #fdf4e7;
    color: #c4841d;
}

.pos-type-nvl {
    background: #e8f5e9;
    color: #2e7d32;
}

/* ── Modal ────────────────────────────────────────────────── */
.pos-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(45,42,38,0.4);
    z-index: 500;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

    .pos-modal-overlay.show {
        display: flex;
    }

.pos-modal {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(45,42,38,0.10);
    width: 560px;
    max-height: 72vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: pos-modal-in 0.2s ease;
}

@keyframes pos-modal-in {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.pos-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #f2ede6;
}

.pos-modal-title {
    font-size: 14px;
    font-weight: 700;
}

.pos-modal-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: #faf7f2;
    color: #7a7570;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .pos-modal-close:hover {
        background: #fdf0f0;
        color: #c44040;
    }

.pos-modal-search {
    padding: 10px 18px;
    border-bottom: 1px solid #f2ede6;
}

.pos-modal-search-row {
    display: flex;
    gap: 8px;
}

.pos-modal-search input {
    flex: 1;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #ebe6df;
    background: #faf7f2;
    font-size: 12.5px;
    font-family: inherit;
    color: #2d2a26;
    outline: none;
}

    .pos-modal-search input:focus {
        border-color: #c4841d;
        background: #fff;
    }

.pos-modal-search select {
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #ebe6df;
    background: #faf7f2;
    font-size: 12px;
    font-family: inherit;
    color: #2d2a26;
    outline: none;
    cursor: pointer;
    min-width: 140px;
}

    .pos-modal-search select:focus {
        border-color: #c4841d;
    }

.pos-modal-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
}

    .pos-modal-list::-webkit-scrollbar {
        width: 4px;
    }

    .pos-modal-list::-webkit-scrollbar-thumb {
        background: #ebe6df;
        border-radius: 4px;
    }

.pos-modal-list-head {
    display: flex;
    padding: 4px 10px;
    gap: 8px;
    font-size: 10px;
    font-weight: 600;
    color: #b0a99f;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #f2ede6;
    margin-bottom: 4px;
}

    .pos-modal-list-head span {
        flex: 1;
    }

.pos-mi {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
}

    .pos-mi:hover {
        background: #fdf4e7;
    }

    .pos-mi.added {
        opacity: 0.4;
        pointer-events: none;
    }

.pos-mi-code {
    font-size: 10px;
    font-weight: 600;
    color: #c4841d;
    background: #fdf4e7;
    padding: 2px 7px;
    border-radius: 3px;
    min-width: 44px;
    text-align: center;
}

.pos-mi-name {
    flex: 1;
    font-size: 12.5px;
    font-weight: 500;
}

.pos-mi-meta {
    font-size: 11px;
    color: #b0a99f;
    min-width: 50px;
}

.pos-mi-add {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid #c4841d;
    background: transparent;
    color: #c4841d;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .pos-mi-add:hover {
        background: #c4841d;
        color: #fff;
    }

.pos-mi.added .pos-mi-add {
    background: #3a9a5c;
    color: #fff;
    border-color: #3a9a5c;
}

.pos-modal-foot {
    padding: 10px 18px;
    border-top: 1px solid #f2ede6;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pos-modal-foot-info {
    font-size: 11px;
    color: #b0a99f;
}

    .pos-modal-foot-info b {
        color: #c4841d;
    }

/* ── Outlet Price Panel (full-width) ─────────────────────── */
.pos-price-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pos-price-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #fff;
    border-bottom: 1px solid #f2ede6;
    /* 2 combo + ô tìm + 2 nút: màn hẹp phải xuống hàng, không thì nút "Thêm SP" bị đẩy khỏi khung */
    flex-wrap: wrap;
}

    /* ⚠ `.pos-price-toolbar input` bên dưới là (0,1,1) — CAO HƠN `.pos-filter-input` (0,1,0) nên nó
       ép combo về 180px và dropdown lệch khỏi ô. Phải ghi đè bằng (0,2,0). Cùng họ bẫy với
       reset theo tag đã trả giá ở pos-sales. */
    .pos-price-toolbar .pos-filter-combo {
        flex: 0 1 auto;
        min-width: 170px;
    }

    .pos-price-toolbar .pos-fc-outlet {
        max-width: 280px;
    }

    .pos-price-toolbar .pos-fc-cat {
        max-width: 230px;
    }

    .pos-price-toolbar .pos-filter-input {
        width: 100%;
    }

    .pos-price-toolbar select {
        flex: 1;
        padding: 7px 10px;
        border-radius: 6px;
        border: 1px solid #ebe6df;
        background: #faf7f2;
        font-size: 12px;
        font-family: inherit;
        cursor: pointer;
        outline: none;
    }

        .pos-price-toolbar select:focus {
            border-color: #c4841d;
        }

    .pos-price-toolbar input {
        width: 180px;
        padding: 7px 10px;
        border-radius: 6px;
        border: 1px solid #ebe6df;
        background: #faf7f2;
        font-size: 12px;
        font-family: inherit;
        color: #2d2a26;
        outline: none;
    }

        .pos-price-toolbar input:focus {
            border-color: #c4841d;
        }

.pos-price-wrap {
    flex: 1;
    overflow-y: auto;
}

    .pos-price-wrap::-webkit-scrollbar {
        width: 4px;
    }

    .pos-price-wrap::-webkit-scrollbar-thumb {
        background: #ebe6df;
        border-radius: 4px;
    }

.pos-price-table {
    width: 100%;
    border-collapse: collapse;
}

    .pos-price-table thead {
        position: sticky;
        top: 0;
        z-index: 10;
    }

    .pos-price-table th {
        text-align: left;
        font-size: 10px;
        font-weight: 600;
        color: #b0a99f;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        padding: 9px 14px;
        background: #fff;
        border-bottom: 2px solid #ebe6df;
    }

    .pos-price-table td {
        padding: 9px 14px;
        border-bottom: 1px solid #f2ede6;
        font-size: 12.5px;
        background: #fff;
    }

    .pos-price-table tr:hover td {
        background: #fdf4e7;
    }

    .pos-price-table .p-input {
        padding: 5px 8px;
        border-radius: 6px;
        border: 1px solid #ebe6df;
        background: #faf7f2;
        font-size: 12.5px;
        font-family: inherit;
        outline: none;
        width: 110px;
        text-align: right;
    }

        .pos-price-table .p-input:focus {
            border-color: #c4841d;
            background: #fff;
        }

.pos-price-diff {
    font-size: 10px;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 3px;
}

    .pos-price-diff.up {
        color: #c44040;
        background: #fdf0f0;
    }

    .pos-price-diff.same {
        color: #b0a99f;
        background: #f2ede6;
    }

    .pos-price-diff.down {
        color: #3a9a5c;
        background: #edf7f0;
    }

.pos-price-footer {
    padding: 10px 18px;
    background: #fff;
    border-top: 1px solid #ebe6df;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: #b0a99f;
}

    .pos-price-footer b {
        color: #2d2a26;
    }

/* ── Giá theo điểm bán: cột dịch vụ kèm booking + nhóm thuế ─────────────────────
   Màu/giá trị lấy từ docs/Projects/Vuon Vua/rates/mockup-dich-vu-kem.html (màn 2).
   ⚠ `.pos-price-diff` ở trên KHÔNG còn được dùng — mockup đã bỏ chip chênh lệch %
   cùng lúc với việc bỏ cột "Giá gốc" (mất mốc so sánh nhìn thấy được). Giữ nguyên
   khai báo cũ, ⛔ đừng gắn lại chip đó vào bảng. */

/* Dòng "Nhóm thuế mới chỉ là chỗ khai" — cùng giọng với cảnh báo ở UnitPackageServices. */
.pos-price-hint {
    padding: 9px 18px;
    background: #fdfaf4;
    border-bottom: 1px solid #ebe6df;
    font-size: 12.5px;
    line-height: 1.55;
    color: #6b6357;
}

    .pos-price-hint b {
        color: #a1651b;
    }

.pos-price-table th.num,
.pos-price-table td.num {
    text-align: right;
}

.pos-price-table th.ctr,
.pos-price-table td.ctr {
    text-align: center;
}

.pos-price-table td {
    vertical-align: middle;
}

    /* Mã SP vỡ thành 3 dòng khi cột hẹp — cột này là mã, không phải câu văn. */
    .pos-price-table .cfg-li-code {
        display: inline-block;
        white-space: nowrap;
    }

.pos-price-table .cat-chip {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: #6b6b7b;
    background: #f2efe9;
    padding: 2px 8px;
    border-radius: 20px;
    white-space: nowrap;
}

/* Ô tiền: canh phải + font số bảng (chữ số cùng bề rộng ⇒ cột số thẳng hàng). */
.pos-price-table .p-input {
    width: 104px;
    font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace;
    font-weight: 600;
    color: #9a7420;
    font-variant-numeric: tabular-nums;
}

    /* Đang kế thừa giá điểm bán ⇒ số hiện mờ, để phân biệt với số KHAI RIÊNG. */
    .pos-price-table .p-input.ghost {
        color: #a9a196;
        font-weight: 400;
        background: #fbfaf7;
    }

    .pos-price-table .p-input:disabled {
        opacity: .35;
        cursor: not-allowed;
    }

/* Nhóm thuế: kế thừa = xám, khai riêng = tím (khác biệt nhìn thấy từ xa). */
.pos-price-table .taxsel {
    max-width: 100%;
    width: 100%;
    padding: 5px 8px;
    border-radius: 6px;
    border: 1px solid #ebe6df;
    background: #faf7f2;
    font-size: 11.5px;
    font-family: inherit;
    color: #8a8496;
    outline: none;
    cursor: pointer;
}

    .pos-price-table .taxsel:focus {
        border-color: #c4841d;
        background: #fff;
    }

    .pos-price-table .taxsel.own {
        color: #7c3aed;
        border-color: #c9b6f5;
        background: #f7f4ff;
        font-weight: 600;
    }

/* Dòng đang bán kèm booking: nền nhạt + vạch xanh bên trái. */
.pos-price-table tr.bk-on td {
    background: #fbfefc;
}

    .pos-price-table tr.bk-on td:first-child {
        box-shadow: inset 3px 0 0 #0d9668;
    }

.pos-price-table tr.bk-on:hover td {
    background: #f4fbf7;
}

.pos-price-table .rowchk {
    width: 15px;
    height: 15px;
    accent-color: #0d9668;
    cursor: pointer;
    vertical-align: middle;
}

/* Công tắc "kèm booking" trên dòng. */
.pos-price-table .bk-tog {
    position: relative;
    width: 38px;
    height: 21px;
    border-radius: 20px;
    background: #ded9d1;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: .18s;
    vertical-align: middle;
}

    .pos-price-table .bk-tog::after {
        content: '';
        position: absolute;
        top: 2px;
        left: 2px;
        width: 17px;
        height: 17px;
        border-radius: 50%;
        background: #fff;
        box-shadow: 0 1px 3px rgba(0,0,0,.2);
        transition: .18s;
    }

    .pos-price-table .bk-tog.on {
        background: #0d9668;
    }

        .pos-price-table .bk-tog.on::after {
            transform: translateX(17px);
        }

/* Ô tích LOẠI bán kèm — mỗi loại MỘT CỘT riêng (Combo · Ngoài combo), nhãn nằm ở tiêu đề cột.
   Ô để TRỐNG khi công tắc "Kèm booking" của dòng đang tắt: lúc đó loại chưa có nghĩa, mà vẽ một ô
   tích bỏ trống thì nó trông y hệt "đã bỏ tick" — hai nghĩa khác hẳn nhau. */
/* Ba cột hẹp (Kèm booking · Combo · Ngoài combo): đệm ngang nhỏ hơn cột thường.
   Bảng để `table-layout: auto` ⇒ bề rộng cột do NỘI DUNG dài nhất quyết định, mà ở ba cột này nội dung
   dài nhất là dòng chữ TIÊU ĐỀ chứ không phải ô tích 15px. Mỗi cột tiết kiệm được 16px đệm, và cột
   "Tên sản phẩm" (cột duy nhất không khai width) nhận lại đúng phần đó. */
.pos-price-table th.ctr-narrow,
.pos-price-table td.ctr-narrow {
    padding-left: 6px;
    padding-right: 6px;
}

.pos-price-table th.ctr-narrow {
    line-height: 1.25;
}

.pos-price-table .kind-chk {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: #0d9668;
    cursor: pointer;
    vertical-align: middle;
}

/* Ô tích + ghi chú phụ trong đầu modal (vd lọc "chưa có giá ở đâu cả"). */
.pos-modal-chk {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 12.5px;
    color: #5b5348;
    cursor: pointer;
}

    .pos-modal-chk input[type="checkbox"] {
        width: 14px;
        height: 14px;
        margin: 0;
        accent-color: #0d9668;
        cursor: pointer;
    }

.pos-modal-note {
    margin-top: 8px;
    font-size: 12px;
    color: #a9a196;
}

/* Cột "Bán ở" (chế độ Đối chiếu điểm bán) — số điểm bán đang có dòng giá cho mặt hàng đó. */
.pos-price-table .cmp-chip {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 999px;
    background: #f1efea;
    color: #5b5348;
    font-size: 10.5px;
    font-weight: 600;
    white-space: nowrap;
}

    .pos-price-table .cmp-chip.warn {
        background: #fdf2e2;
        color: #9a6b12;
    }

/* Nhãn "lệch giá" — NÓI RA, không phải lỗi. Luôn chiếm chỗ riêng một dòng dưới chip. */
.pos-price-table .cmp-warn {
    display: block;
    margin-top: 2px;
    font-size: 10px;
    font-weight: 600;
    color: #b8892e;
    white-space: nowrap;
}

/* Nút lọc dạng cảnh báo trên thanh công cụ (vd "N mặt hàng chưa có giá"). */
.filter-toggle.warn {
    border-color: #e6c98f;
    background: #fdf6e9;
    color: #8a6414;
}

/* Ô chọn lọc theo loại — chỉ hiện khi bộ lọc gift đang bật. */
.kindsel {
    height: 32px;
    padding: 0 8px;
    border: 1px solid #ded9d1;
    border-radius: 8px;
    background: #fff;
    font-size: 12.5px;
    color: #3c352c;
    cursor: pointer;
}

/* 🔴 Nhãn LUÔN chiếm chỗ kể cả khi rỗng (min-height) — nếu để nó co lại thì dòng bật và dòng
   tắt cao thấp so le, cả bảng nhấp nhô mỗi lần bấm công tắc. Thủ pháp lấy từ pms-rate.css. */
.pos-price-table .bk-badge {
    display: block;
    font-size: 10px;
    font-weight: 600;
    margin-top: 3px;
    letter-spacing: .2px;
    min-height: 14px;
    white-space: nowrap;
}

    .pos-price-table .bk-badge.same {
        color: #a9a196;
    }

    .pos-price-table .bk-badge.own {
        color: #0d9668;
    }

    .pos-price-table .bk-badge.free {
        color: #0284c7;
    }

/* Nút lọc "🎁 Chỉ dịch vụ kèm booking". */
.filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border-radius: 20px;
    border: 1px solid #ebe6df;
    background: none;
    color: #4a4a60;
    font-size: 11.5px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

    .filter-toggle.on {
        background: rgba(13,150,104,.08);
        border-color: #0d9668;
        color: #0b7a55;
    }

/* Thanh thao tác hàng loạt — hiện khi có dòng được tick. */
.bulkbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 18px;
    background: #1f5138;
    color: #eaf5ef;
    font-size: 12.5px;
    flex-wrap: wrap;
}

    .bulkbar b {
        color: #fff;
    }

    .bulkbar button {
        padding: 5px 12px;
        border-radius: 6px;
        border: 1px solid rgba(255,255,255,.28);
        background: rgba(255,255,255,.1);
        color: #fff;
        font-size: 12px;
        font-family: inherit;
        font-weight: 600;
        cursor: pointer;
    }

        .bulkbar button:hover {
            background: rgba(255,255,255,.2);
        }

        .bulkbar button.x {
            margin-left: auto;
            background: none;
            border: none;
            font-size: 14px;
        }

/* ── BOM / UnitConversion editable table ─────────────────── */
.pos-edit-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
}

    .pos-edit-table th {
        text-align: left;
        font-size: 10px;
        font-weight: 600;
        color: #b0a99f;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        padding: 5px 8px;
        border-bottom: 1px solid #ebe6df;
    }

    .pos-edit-table td {
        padding: 7px 8px;
        border-bottom: 1px solid #f2ede6;
        font-size: 12.5px;
    }

    .pos-edit-table input, .pos-edit-table select {
        width: 100%;
        padding: 5px 8px;
        border-radius: 5px;
        border: 1px solid #ebe6df;
        background: #faf7f2;
        font-size: 12.5px;
        font-family: inherit;
        outline: none;
    }

        .pos-edit-table input:focus, .pos-edit-table select:focus {
            border-color: #c4841d;
            background: #fff;
        }

    .pos-edit-table select {
        cursor: pointer;
    }

/* ── Inline helpers ──────────────────────────────────────── */
.pos-price-preview {
    background: #faf7f2;
    border-radius: 6px;
    padding: 12px 14px;
    margin-top: 10px;
    border: 1px solid #f2ede6;
}

.pos-price-preview-row {
    display: flex;
    justify-content: space-between;
    padding: 2px 0;
    font-size: 12.5px;
}

.pos-toggle-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
}

.pos-toggle-label {
    font-size: 12.5px;
    font-weight: 500;
}

/* ══ Toggle switch ══════════════════════════════════════ */
.pos-toggle-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
    cursor: pointer;
    user-select: none;
    width: fit-content;
}

.cfg-toggle {
    position: relative;
    width: 40px;
    height: 22px;
    background: #d8d2c6;
    border-radius: 11px;
    transition: background .18s ease;
    flex: 0 0 auto;
}

    .cfg-toggle::after {
        content: '';
        position: absolute;
        top: 2px;
        left: 2px;
        width: 18px;
        height: 18px;
        background: #fff;
        border-radius: 50%;
        box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
        transition: left .18s ease;
    }

    .cfg-toggle.active {
        background: #b08b4a; /* màu nâu vàng theo theme */
    }

        .cfg-toggle.active::after {
            left: 20px;
        }

.pos-toggle-label {
    font-size: 14px;
    color: #3a3a3a;
}

.pos-toggle-row:hover .cfg-toggle {
    filter: brightness(.95);
}

.cfg-toggle-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 12px;
    border: 1px solid var(--cfg-line, #e5e7eb);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
}

    .cfg-toggle-row:hover {
        background: var(--cfg-surface-2, #f9fafb);
    }

    .cfg-toggle-row input[type="checkbox"] {
        margin-top: 3px;
        flex: 0 0 auto;
    }

.cfg-toggle-title {
    font-weight: 600;
    font-size: 13px;
    color: var(--cfg-t1, #111827);
}

.cfg-toggle-hint {
    font-size: 11.5px;
    color: var(--cfg-t3, #6b7280);
    margin-top: 2px;
    line-height: 1.4;
}

/* Nhãn "chưa mở" cạnh tên kênh chưa triển khai — để người cấu hình biết ô tắt là CÓ CHỦ ĐÍCH,
   không phải lỗi hiển thị. Amber theo primary của hệ, không dùng xám (xám đọc như "vô hiệu tạm"). */
.cfg-badge-soft {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 999px;
    background: #fbf0dc;
    border: 1px solid #f0dfbd;
    color: #8a5f14;
    font-size: 10.5px;
    font-weight: 600;
    vertical-align: middle;
}

.cfg-banner-warn {
    margin-top: 12px;
    padding: 8px 12px;
    background: #fef3c7;
    color: #92400e;
    border-radius: 6px;
    font-size: 12.5px;
}
.cfg-subgroup {
    margin-top: 14px;
    padding: 12px;
    background: var(--cfg-surface-2, #f9fafb);
    border-radius: 8px;
}

.cfg-subgroup-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--cfg-t2, #374151);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 10px;
}

.cfg-hint {
    margin-top: 8px;
    font-size: 11.5px;
    color: var(--cfg-t3, #6b7280);
    line-height: 1.4;
}

/* Cảnh báo cấu hình mâu thuẫn — khác `.cfg-hint` (chỉ gợi ý) ở chỗ nó báo MỘT LỖI sẽ bị
   backend từ chối khi bấm Lưu. Hai sắc thái khác nhau, ⛔ đừng dùng lẫn. */
.cfg-warn {
    margin-top: 8px;
    padding: 7px 10px;
    border-radius: 6px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.45;
}

.cfg-image-preview {
    margin-top: 10px;
    border: 1px solid var(--cfg-line, #e5e7eb);
    border-radius: 6px;
    overflow: hidden;
    background: var(--cfg-surface-2, #f9fafb);
    max-width: 280px;
}

    .cfg-image-preview img {
        display: block;
        width: 100%;
        height: auto;
        max-height: 180px;
        object-fit: cover;
    }
/* VVR 2026-09-01 — hàng ô tick "Trường bắt buộc" (Cấu hình PMS).
   Dùng flex align-items:flex-start để ô tick thẳng hàng với DÒNG ĐẦU của nhãn khi nhãn xuống dòng —
   canh giữa thì ô tick trôi xuống giữa khối chữ và nhìn như thuộc về dòng phụ. */
.cfg-rf-row {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    line-height: 1.45;
    cursor: pointer;
}

.cfg-rf-row input[type="checkbox"] {
    margin-top: 3px;
    flex: 0 0 auto;
}

.cfg-rf-row .cfg-rf-sub {
    color: #6c757d;
    font-weight: 400;
}

/* ── 05/11/2026 — ĐÈN ONLINE + IN THỬ máy in (Cấu hình POS · Máy in). Mức đèn do máy chủ quyết (PrinterStatusRules). ── */
.prn-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: 0 0 10px; background: #c9c4bb; margin-right: 8px; vertical-align: middle; }
.prn-dot.prn-ok { background: #12a66b; box-shadow: 0 0 0 3px rgba(18,166,107,.18); }
.prn-dot.prn-warn { background: #d99a1e; box-shadow: 0 0 0 3px rgba(217,154,30,.2); }
.prn-dot.prn-down { background: #dc3b3b; box-shadow: 0 0 0 3px rgba(220,59,59,.18); }
.prn-dot.prn-unknown { background: #c9c4bb; }
.prn-agentbar { display: flex; align-items: center; gap: 6px; padding: 8px 10px; margin: 0 0 8px; border: 1px solid var(--cfg-line, #e5e7eb); border-radius: 8px; background: var(--cfg-surface-2, #f9fafb); font-size: 12px; color: var(--cfg-t2, #374151); }
.prn-agentbar-text { flex: 1 1 auto; min-width: 0; line-height: 1.35; }
.prn-btn { padding: 6px 12px; border-radius: 7px; border: 1px solid #e0ddd6; background: #fff; color: #3a352e; font-size: 12.5px; font-weight: 600; cursor: pointer; font-family: inherit; white-space: nowrap; width: auto; }
.prn-btn:hover { background: #f0ede6; }
.prn-btn:disabled { opacity: .55; cursor: not-allowed; }
.prn-btn-primary { background: #b8892e; border-color: #b8892e; color: #fff; }
.prn-btn-primary:hover { background: #a07828; }
.prn-st { display: flex; align-items: flex-start; gap: 4px; padding: 10px 12px; border-radius: 8px; border: 1px solid #e5e1da; background: #faf8f5; }
.prn-st .prn-dot { margin-top: 4px; }
.prn-st-ok { background: #effaf4; border-color: #bfe6d2; }
.prn-st-warn { background: #fff8eb; border-color: #f1d9a6; }
.prn-st-down { background: #fef2f2; border-color: #fecaca; }
.prn-st-body { flex: 1 1 auto; min-width: 0; }
.prn-st-main { font-size: 14px; font-weight: 700; color: #2a2520; }
.prn-st-sub { font-size: 12px; color: var(--cfg-t3, #6b7280); margin-top: 2px; line-height: 1.4; overflow-wrap: anywhere; }
.prn-st-adv { font-size: 12.5px; color: #3a352e; margin-top: 6px; line-height: 1.45; }
.prn-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.prn-test { margin-top: 8px; padding: 7px 10px; border-radius: 6px; font-size: 12.5px; line-height: 1.45; border: 1px solid #e5e1da; background: #faf8f5; color: #3a352e; }
.prn-test-ok { background: #effaf4; border-color: #bfe6d2; color: #0f6b46; }
.prn-test-warn { background: #fff8eb; border-color: #f1d9a6; color: #8a5a08; }
.prn-test-down { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }

/* POS-G01-07 — thẻ từ chối màn Cấu hình POS khi thiếu quyền pos/config (khuôn .pbd-deny của Chi tiết bill). */
.cfg-deny {
    margin: 16px;
    padding: 12px 14px;
    border: 1px solid #e3b4ad;
    background: #fbefed;
    color: #8a2d22;
    border-radius: 8px;
    font-size: 13.5px;
}
