/* ═══════════════════════════════════════════════════════
   PMS Rate Plan Manager — Light Warm Theme
   Matching pms-config.css design system
   Selector bar: uses cfg-selector-bar from pms-config.css
   ═══════════════════════════════════════════════════════ */

:root {
    --rp-bg0: #faf7f2;
    --rp-bg1: #f4f1ec;
    --rp-bg2: #fff;
    --rp-bg3: #f9f7f3;
    --rp-bg4: #f0ede6;
    --rp-accent: #c4841d;
    --rp-accent2: #d4a74f;
    --rp-accentA: rgba(196, 132, 29, .1);
    --rp-green: #0d9668;
    --rp-greenA: rgba(13, 150, 104, .08);
    --rp-blue: #0284c7;
    --rp-blueA: rgba(2, 132, 199, .08);
    --rp-yellow: #9a7420;
    --rp-yellowA: rgba(184, 137, 46, .08);
    --rp-purple: #7c3aed;
    --rp-purpleA: rgba(124, 58, 237, .08);
    --rp-pink: #db2777;
    --rp-pinkA: rgba(219, 39, 119, .07);
    --rp-cyan: #0891b2;
    --rp-t0: #1a1a2e;
    --rp-t1: #2d2d42;
    --rp-t2: #4a4a60;
    --rp-t3: #7a7a90;
    --rp-b1: #e0ddd6;
    --rp-b2: #ebe8e2;
    --rp-danger: #dc2626;
    --rp-r: 8px;
    --rp-rl: 12px;
}

/* ── App layout ── */
.rp-app {
    display: flex;
    height: calc(100vh - 90px);
    font-family: 'Be Vietnam Pro', sans-serif;
    background: var(--ez-bg, var(--rp-bg1));   /* ② Nền trang — cấu hình giao diện; fallback = màu hôm nay */
    color: var(--rp-t1);
    overflow: hidden;
}

/* ══ SIDEBAR ══ */
.rp-sidebar {
    width: 310px;
    min-width: 310px;
    background: var(--rp-bg2);
    border-right: 1px solid var(--rp-b1);
    display: flex;
    flex-direction: column;
}

.rp-sb-header {
    padding: 16px;
    border-bottom: 1px solid var(--rp-b1);
}

    .rp-sb-header h2 {
        font-size: 18px;
        font-weight: 700;
        margin-bottom: 10px;
        display: flex;
        align-items: center;
        gap: 7px;
    }

.rp-icon {
    color: var(--rp-accent);
    font-style: normal;
}

.rp-search {
    display: flex;
    align-items: center;
    background: var(--rp-bg0);
    border: 1px solid var(--rp-b1);
    border-radius: var(--rp-r);
    padding: 7px 10px;
    gap: 7px;
}

    .rp-search input {
        background: none;
        border: none;
        outline: none;
        color: var(--rp-t1);
        font-size: 13px;
        width: 100%;
        font-family: inherit;
    }

        .rp-search input::placeholder {
            color: var(--rp-t3);
        }

.rp-sb-filters {
    padding: 10px 16px;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--rp-b2);
}

.rp-chip {
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--rp-b1);
    background: none;
    color: var(--rp-t2);
    transition: .2s;
    font-family: inherit;
}

    .rp-chip:hover {
        border-color: var(--rp-accent);
        color: var(--rp-accent);
    }

    .rp-chip.active {
        background: var(--rp-accentA);
        border-color: var(--rp-accent);
        color: var(--rp-accent);
    }

.rp-sb-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
}

.rp-loading {
    padding: 20px;
    text-align: center;
    color: var(--rp-t3);
    font-size: 13px;
}

.rp-plan-item {
    padding: 10px 12px;
    border-radius: var(--rp-r);
    cursor: pointer;
    transition: .2s;
    margin-bottom: 3px;
    border: 1px solid transparent;
}

    .rp-plan-item:hover {
        background: var(--rp-bg3);
    }

    .rp-plan-item.active {
        background: var(--rp-bg3);
        border-color: var(--rp-accent);
        box-shadow: inset 3px 0 0 var(--rp-accent);
    }

.rp-plan-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--rp-t0);
}

.rp-badge-on {
    display: inline-flex;
    padding: 2px 7px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 600;
    background: var(--rp-greenA);
    color: var(--rp-green);
}

.rp-plan-meta {
    font-size: 11.5px;
    color: var(--rp-t2);
}

    .rp-plan-meta span {
        color: var(--rp-t2);
    }

.rp-plan-tags {
    display: flex;
    gap: 3px;
    margin-top: 5px;
    flex-wrap: wrap;
}

.rp-tag {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.rp-tag-type {
    background: var(--rp-blueA);
    color: var(--rp-blue);
}

.rp-tag-seg {
    background: var(--rp-purpleA);
    color: var(--rp-purple);
}

.rp-tag-comp {
    background: var(--rp-yellowA);
    color: var(--rp-yellow);
}

.rp-sb-bottom {
    padding: 12px 16px;
    border-top: 1px solid var(--rp-b1);
}

.rp-btn-new {
    width: 100%;
    padding: 9px;
    background: linear-gradient(135deg, var(--rp-accent), var(--rp-accent2));
    color: #fff;
    border: none;
    border-radius: var(--rp-r);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

    .rp-btn-new:hover {
        filter: brightness(1.1);
        transform: translateY(-1px);
    }

/* ══ MAIN PANEL ══ */
.rp-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.rp-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--rp-t3);
}

.rp-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    color: var(--rp-accent);
    opacity: .4;
}

.rp-empty h3 {
    font-size: 16px;
    margin-bottom: 8px;
    color: var(--rp-t1);
}

.rp-empty p {
    font-size: 13px;
}

.rp-main-header {
    padding: 12px 20px;
    border-bottom: 1px solid var(--rp-b1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--rp-bg2);
}

    .rp-main-header h1 {
        font-size: 20px;
        font-weight: 700;
        color: var(--rp-t0);
    }

.rp-header-actions {
    display: flex;
    gap: 6px;
}

/* ── Buttons ── */
.rp-btn {
    padding: 7px 14px;
    border-radius: var(--rp-r);
    font-size: 12.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: .15s;
    border: 1px solid var(--rp-b1);
    display: flex;
    align-items: center;
    gap: 5px;
}

.rp-btn-ghost {
    background: none;
    color: var(--rp-t2);
}

    .rp-btn-ghost:hover {
        background: var(--rp-bg4);
        color: var(--rp-t1);
    }

.rp-btn-primary {
    background: linear-gradient(135deg, var(--rp-accent), var(--rp-accent2));
    color: #fff;
    border-color: transparent;
}

    .rp-btn-primary:hover {
        filter: brightness(1.1);
    }

    .rp-btn-primary:disabled {
        opacity: .5;
        cursor: not-allowed;
    }

.rp-btn-danger {
    background: none;
    color: var(--rp-danger);
    border-color: rgba(220, 38, 38, .2);
}

    .rp-btn-danger:hover {
        background: rgba(220, 38, 38, .06);
    }

/* ── Tab bar ── */
.rp-tabbar {
    display: flex;
    padding: 0 20px;
    background: var(--rp-bg3);
    border-bottom: 1px solid var(--rp-b1);
    overflow-x: auto;
}

.rp-tab {
    padding: 11px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--rp-t2);
    cursor: pointer;
    border: none;
    background: none;
    border-bottom: 2px solid transparent;
    transition: .2s;
    white-space: nowrap;
    font-family: inherit;
}

    .rp-tab:hover {
        color: var(--rp-t2);
    }

    .rp-tab.active {
        color: var(--rp-accent);
        border-bottom-color: var(--rp-accent);
        font-weight: 600;
    }

/* ── Content ── */
.rp-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    background: var(--rp-bg0);
}

/* ── Section card ── */
.rp-section {
    background: var(--rp-bg2);
    border: 1px solid var(--rp-b2);
    border-radius: var(--rp-rl);
    padding: 18px;
    margin-bottom: 14px;
    animation: rp-fi .3s ease;
}

@keyframes rp-fi {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rp-section-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--rp-b2);
    color: var(--rp-t0);
}

    .rp-section-title.rp-green {
        color: var(--rp-green);
    }

.rp-note {
    font-size: 12.5px;
    color: var(--rp-t2);
    margin-bottom: 12px;
}

.rp-hint {
    font-size: 11.5px;
    color: var(--rp-t2);
    margin-top: 4px;
}

/* ── Grid & Field ── */
.rp-grid3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 14px;
}

.rp-grid2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.rp-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.rp-label {
    font-size: 11.5px;
    font-weight: 700;
    color: #555568;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.rp-input {
    background: var(--rp-bg0);
    border: 1px solid var(--rp-b1);
    border-radius: var(--rp-r);
    padding: 9px 11px;
    color: var(--rp-t0);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: .2s;
}

    .rp-input:focus {
        border-color: var(--rp-accent);
    }

    .rp-input::placeholder {
        color: var(--rp-t3);
    }

.rp-select {
    cursor: pointer;
}

    .rp-select option {
        background: var(--rp-bg2);
    }

.rp-mono {
    font-family: 'JetBrains Mono', monospace;
}

.rp-textarea {
    resize: vertical;
    min-height: 60px;
    width: 100% !important;
}

/* ── Color helpers ── */
.rp-price-color {
    color: var(--rp-yellow) !important;
}

.rp-cyan {
    color: var(--rp-cyan) !important;
}

.rp-purple {
    color: var(--rp-purple) !important;
}

/* ── Checkbox group ── */
.rp-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.rp-checkbox-item {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border: 1px solid var(--rp-b1);
    border-radius: var(--rp-r);
    cursor: pointer;
    font-size: 12.5px;
    transition: .2s;
    user-select: none;
    color: var(--rp-t1);
}

    .rp-checkbox-item:hover {
        border-color: var(--rp-accent);
    }

    .rp-checkbox-item.checked {
        background: var(--rp-accentA);
        border-color: var(--rp-accent);
        color: var(--rp-accent);
    }

.rp-checkbox-box {
    width: 14px;
    height: 14px;
    border: 2px solid var(--rp-b1);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10.5px;
    transition: .2s;
}

.rp-checkbox-item.checked .rp-checkbox-box {
    background: var(--rp-accent);
    border-color: var(--rp-accent);
    color: #fff;
}

.rp-checkbox-code {
    color: var(--rp-t3);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11.5px;
    margin-left: 6px;
}

/* ══ SEASON BLOCK ══ */
.rp-season-block {
    background: var(--rp-bg3);
    border: 1px solid var(--rp-b1);
    border-radius: var(--rp-rl);
    margin-bottom: 14px;
    overflow: hidden;
}

.rp-season-header {
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--rp-b1);
    background: var(--rp-bg4);
}

.rp-season-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* O NHAP TEN MUA.
   Truoc day: background:none + border:none => trong y HET mot tieu de tinh, nguoi dung khong biet la
   sua duoc ("mua co nhap ten dau"). Giu ve ngoai gon nhung phai co DAU HIEU BAM DUOC: gach chan cham
   mo, hover len nen, focus thi thanh o that. */
.rp-season-name {
    font-weight: 700;
    font-size: 15px;
    background: none;
    border: none;
    border-bottom: 1px dashed #c9c9d4;
    border-radius: 4px 4px 0 0;
    padding: 2px 6px;
    color: var(--rp-t0);
    outline: none;
    font-family: inherit;
    width: 200px;
    cursor: text;
    transition: background .15s, border-color .15s;
}

    .rp-season-name:hover {
        background: var(--rp-bg0);
        border-bottom-color: var(--rp-accent);
    }

    .rp-season-name:focus {
        background: #fff;
        border: 1px solid var(--rp-accent);
        border-radius: 6px;
    }

    .rp-season-name::placeholder {
        font-weight: 500;
        color: #a0a0b0;
    }

.rp-season-date {
    font-size: 12.5px;
    color: var(--rp-t3);
    font-family: 'JetBrains Mono', monospace;
    display: flex;
    align-items: center;
    gap: 4px;
}

.rp-date-input {
    background: var(--rp-bg2);
    border: 1px solid var(--rp-b1);
    border-radius: 5px;
    padding: 3px 6px;
    color: var(--rp-t1);
    font-size: 12.5px;
    font-family: 'JetBrains Mono', monospace;
    outline: none;
}

.rp-season-actions {
    display: flex;
    gap: 4px;
}

.rp-btn-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--rp-r);
    border: 1px solid var(--rp-b1);
    background: none;
    color: var(--rp-t3);
    cursor: pointer;
    font-size: 13px;
    transition: .15s;
}

    .rp-btn-icon:hover {
        background: var(--rp-bg4);
        color: var(--rp-t1);
    }

    .rp-btn-icon.rp-danger:hover {
        color: var(--rp-danger);
        border-color: var(--rp-danger);
    }

.rp-season-body {
    padding: 12px 14px;
}

.rp-price-table-wrapper {
    overflow-x: auto;
}

/* ── Price table (NightRate) ── */
.rp-price-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

    .rp-price-table th {
        padding: 8px 10px;
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .7px;
        color: #555568;
        text-align: center;
        border-bottom: 1px solid var(--rp-b1);
    }

        .rp-price-table th:first-child {
            text-align: left;
        }

        .rp-price-table th.rp-weekend {
            color: var(--rp-accent);
        }

    .rp-price-table td {
        padding: 5px 6px;
        text-align: center;
        border-bottom: 1px solid var(--rp-b2);
    }

        .rp-price-table td:first-child {
            text-align: left;
        }

    .rp-price-table tr:last-child td {
        border-bottom: none;
    }

.rp-row-label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--rp-t1);
    width: 110px;
}

.rp-price-input {
    width: 100%;
    max-width: 110px;
    background: var(--rp-bg0);
    border: 1px solid var(--rp-b1);
    border-radius: 5px;
    padding: 7px 8px;
    color: var(--rp-yellow);
    font-size: 14px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    text-align: right;
    outline: none;
    transition: .2s;
}

    .rp-price-input:focus {
        border-color: var(--rp-accent);
        box-shadow: 0 0 0 2px var(--rp-accentA);
    }

    .rp-price-input.weekend {
        color: var(--rp-accent);
    }

    .rp-price-input.surcharge {
        color: var(--rp-green) !important;
        background: var(--rp-greenA);
    }

/* ── Quick fill ── */
.rp-quickfill {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 0;
    margin-bottom: 6px;
}

    .rp-quickfill label {
        font-size: 11.5px;
        color: var(--rp-t3);
        font-weight: 600;
        white-space: nowrap;
    }

.rp-qf-input {
    width: 100px;
    background: var(--rp-bg0);
    border: 1px solid var(--rp-b1);
    border-radius: 5px;
    padding: 6px 10px;
    color: var(--rp-yellow);
    font-size: 14px;
    font-family: 'JetBrains Mono', monospace;
    text-align: right;
    outline: none;
}

.rp-btn-qf {
    padding: 5px 10px;
    background: var(--rp-accentA);
    border: 1px solid var(--rp-accent);
    border-radius: 5px;
    color: var(--rp-accent);
    font-size: 11.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}

    .rp-btn-qf:hover {
        background: var(--rp-accent);
        color: #fff;
    }

/* ── Add button ── */
.rp-btn-add {
    width: 100%;
    padding: 10px;
    border: 2px dashed var(--rp-b1);
    border-radius: var(--rp-rl);
    background: none;
    color: var(--rp-t3);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

    .rp-btn-add:hover {
        border-color: var(--rp-accent);
        color: var(--rp-accent);
        background: rgba(196, 132, 29, .04);
    }

.rp-btn-add-small {
    padding: 6px 12px;
    border: 1px dashed var(--rp-b1);
    border-radius: var(--rp-r);
    background: none;
    color: var(--rp-t3);
    font-size: 11.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: .2s;
    margin-top: 6px;
}

    .rp-btn-add-small:hover {
        border-color: var(--rp-accent);
        color: var(--rp-accent);
    }

/* ── Mode selector ── */
.rp-mode-select {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}

.rp-mode-opt {
    padding: 6px 14px;
    border: 1px solid var(--rp-b1);
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    color: var(--rp-t2);
    transition: .2s;
}

    .rp-mode-opt:hover {
        border-color: var(--rp-accent);
    }

    .rp-mode-opt.active {
        background: var(--rp-accentA);
        border-color: var(--rp-accent);
        color: var(--rp-accent);
    }

/* ── Tier table (LoveHotel / LongStay) ── */
.rp-tier-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

    .rp-tier-table th {
        padding: 8px 12px;
        font-size: 10.5px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .7px;
        color: #555568;
        text-align: left;
        border-bottom: 1px solid var(--rp-b1);
        background: var(--rp-bg4);
    }

    .rp-tier-table td {
        padding: 6px 12px;
        border-bottom: 1px solid var(--rp-b2);
        font-size: 13px;
        color: var(--rp-t1);
    }

    .rp-tier-table tr:last-child td {
        border-bottom: none;
    }

.rp-tier-input {
    width: 120px;
    background: var(--rp-bg0);
    border: 1px solid var(--rp-b1);
    border-radius: 5px;
    padding: 8px 10px;
    color: var(--rp-t1);
    font-size: 14px;
    font-family: 'JetBrains Mono', monospace;
    text-align: center;
    outline: none;
}

    .rp-tier-input:focus {
        border-color: var(--rp-accent);
        box-shadow: 0 0 0 2px var(--rp-accentA);
    }

    .rp-tier-input.rp-price-color {
        color: var(--rp-yellow);
        text-align: right;
        width: 140px;
    }

.rp-hour-input {
    width: 80px;
    background: var(--rp-bg0);
    border: 1px solid var(--rp-b1);
    border-radius: 5px;
    padding: 6px 8px;
    color: var(--rp-cyan);
    font-size: 15px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    text-align: center;
    outline: none;
}

/* ── Overnight box ── */
.rp-overnight-box {
    background: linear-gradient(135deg, var(--rp-greenA), var(--rp-blueA));
    border: 1px solid var(--rp-green);
}

/* ── Surcharge grid ── */
.rp-surcharge-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.rp-surcharge-card {
    background: var(--rp-bg3);
    border: 1px solid var(--rp-b2);
    border-radius: var(--rp-rl);
    padding: 16px;
}

    .rp-surcharge-card:hover {
        border-color: var(--rp-accent);
    }

.rp-surcharge-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--rp-t0);
}

/* ── Package grid (LongStay) ── */
.rp-pkg-header, .rp-pkg-row {
    display: grid;
    grid-template-columns: 1fr 90px 70px 1fr 90px 32px;
    gap: 8px;
    align-items: center;
    padding: 6px 0;
}

.rp-pkg-header {
    border-bottom: 1px solid var(--rp-b1);
    margin-bottom: 4px;
}

.rp-pkg-row {
    border-bottom: 1px solid var(--rp-b2);
    padding: 8px 0;
}

    .rp-pkg-row:last-of-type {
        border-bottom: none;
    }

.rp-nightly-calc {
    font-size: 12.5px;
    color: var(--rp-t2);
    text-align: right;
}

/* ── Recurring charges (LongStay) ── */
.rp-rc-header, .rp-rc-row {
    display: grid;
    grid-template-columns: 1fr 80px 1fr 60px 80px 50px 32px;
    gap: 6px;
    align-items: center;
    padding: 6px 0;
}

.rp-rc-header {
    border-bottom: 1px solid var(--rp-b1);
    margin-bottom: 4px;
}

.rp-rc-row {
    border-bottom: 1px solid var(--rp-b2);
    padding: 8px 0;
}

    .rp-rc-row:last-of-type {
        border-bottom: none;
    }

/* ── Block rate ── */
.rp-block-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.rp-block-card {
    background: var(--rp-bg3);
    border: 1px solid var(--rp-b2);
    border-radius: var(--rp-rl);
    padding: 20px;
    text-align: center;
}

.rp-block-label {
    font-size: 11.5px;
    color: var(--rp-t3);
    text-transform: uppercase;
    letter-spacing: .5px;
    font-weight: 600;
    margin-bottom: 10px;
}

.rp-block-input {
    width: 160px;
    background: var(--rp-bg0);
    border: 1px solid var(--rp-b1);
    border-radius: var(--rp-r);
    padding: 10px;
    color: var(--rp-cyan);
    font-size: 28px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    text-align: center;
    outline: none;
}

    .rp-block-input:focus {
        border-color: var(--rp-accent);
    }

.rp-example-box {
    background: var(--rp-bg3);
    border-radius: var(--rp-r);
    padding: 14px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--rp-t2);
    line-height: 1.8;
}

.rp-example-total {
    border-top: 1px solid var(--rp-b1);
    padding-top: 6px;
    margin-top: 6px;
    color: var(--rp-green);
    font-weight: 600;
    font-size: 15px;
}

/* ── Discount table ── */
.rp-discount-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

    .rp-discount-table th {
        padding: 8px 12px;
        font-size: 10.5px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .7px;
        color: #555568;
        text-align: left;
        border-bottom: 1px solid var(--rp-b1);
        background: var(--rp-bg4);
    }

    .rp-discount-table td {
        padding: 8px 12px;
        border-bottom: 1px solid var(--rp-b2);
        color: var(--rp-t1);
    }

    .rp-discount-table tr:last-child td {
        border-bottom: none;
    }

.rp-disc-name {
    font-weight: 600;
    color: var(--rp-t0);
}

.rp-disc-code {
    color: var(--rp-t3);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11.5px;
    margin-left: 6px;
}

.rp-disc-input {
    width: 70px;
    background: var(--rp-bg0);
    border: 1px solid var(--rp-b1);
    border-radius: 5px;
    padding: 7px 8px;
    color: var(--rp-purple);
    font-size: 14px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    text-align: center;
    outline: none;
}

    .rp-disc-input:focus {
        border-color: var(--rp-purple);
        box-shadow: 0 0 0 2px var(--rp-purpleA);
    }

.rp-disc-pct {
    font-size: 13px;
    color: var(--rp-t3);
    margin-left: 3px;
    font-weight: 600;
}

/* ── Holiday table ── */
.rp-holiday-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

    .rp-holiday-table th {
        padding: 8px 12px;
        font-size: 10.5px;
        font-weight: 700;
        text-transform: uppercase;
        color: #555568;
        text-align: left;
        border-bottom: 1px solid var(--rp-b1);
    }

    .rp-holiday-table td {
        padding: 6px 12px;
        border-bottom: 1px solid var(--rp-b2);
        color: var(--rp-t1);
    }

    .rp-holiday-table tr:last-child td {
        border-bottom: none;
    }

.rp-date-pair {
    display: flex;
    align-items: center;
    gap: 2px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12.5px;
    color: var(--rp-t3);
}

.rp-dm-input {
    width: 44px;
    padding: 6px 3px;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12.5px;
    background: var(--rp-bg0);
    border: 1px solid var(--rp-b1);
    border-radius: 5px;
    color: var(--rp-t1);
    outline: none;
}

/* ── Toast ── */
.rp-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 20px;
    border-radius: var(--rp-r);
    font-size: 13px;
    font-weight: 600;
    z-index: 9999;
    animation: rp-ti .3s ease;
}

    .rp-toast.success {
        background: var(--rp-greenA);
        color: var(--rp-green);
        border: 1px solid var(--rp-green);
    }

    .rp-toast.error {
        background: rgba(220, 38, 38, .08);
        color: var(--rp-danger);
        border: 1px solid var(--rp-danger);
    }

@keyframes rp-ti {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Scrollbar ── */
.rp-sb-list::-webkit-scrollbar, .rp-content::-webkit-scrollbar {
    width: 5px;
}

.rp-sb-list::-webkit-scrollbar-thumb, .rp-content::-webkit-scrollbar-thumb {
    background: var(--rp-b1);
    border-radius: 4px;
}

/* ══ VVR — DỊCH VỤ KÈM THEO của một BẢNG GIÁ (tab "Dịch vụ kèm theo") ══
   Bảng chỉ liệt kê thứ ĐƯỢC HƯỞNG (vắng mặt ≡ khách mua vé) nên số dòng nhỏ; thứ dễ vỡ khung là
   TÊN dịch vụ + TÊN điểm bán của site thật (rất dài). Cả bảng nằm trong .rp-price-table-wrapper
   (overflow-x:auto) để tràn thì cuộn ngang chứ không đẩy vỡ bố cục trang. */

/* ── Khối "Chép cấu hình từ" ──
   TRƯỚC 2026-08-17 khối này KHÔNG có một dòng CSS nào: nhãn / select / checkbox / nút rơi mỗi thứ
   một hàng, trông như lỗi render. */
.ups-copy {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 11px 13px;
    background: var(--rp-bg3, #f9f7f3);
    border: 1px solid var(--rp-b2, #ebe8e2);
    border-radius: var(--rp-r, 8px);
    margin-bottom: 13px;
}

    .ups-copy .rp-label {
        margin: 0;
        white-space: nowrap;
    }

.ups-copy-chk {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    cursor: pointer;
    user-select: none;
}

/* ── Thanh công cụ trên bảng ── */
.ups-toolbar {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.ups-add {
    padding: 7px 14px;
    border-radius: var(--rp-r, 8px);
    border: 1px dashed var(--rp-accent, #c4841d);
    background: var(--rp-accentA, rgba(196,132,29,.1));
    color: var(--rp-accent, #c4841d);
    font-size: 12.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}

    .ups-add:hover {
        background: var(--rp-accent, #c4841d);
        color: #fff;
        border-style: solid;
    }

.ups-search {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--rp-bg0, #faf7f2);
    border: 1px solid var(--rp-b1, #e0ddd6);
    border-radius: var(--rp-r, 8px);
    padding: 6px 10px;
    width: 250px;
    max-width: 100%;
}

.ups-search-ic {
    font-size: 12px;
    opacity: .6;
}

.ups-search-in {
    flex: 1;
    min-width: 0;
    background: none;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 13px;
    color: inherit;
}

.ups-count {
    font-size: 12px;
    color: var(--rp-t3, #7a7a90);
    margin-left: auto;
}

/* ── Bảng ── */
.rp-price-table.ups-tbl td {
    padding: 7px 8px;
    vertical-align: middle;
}

/* "Dịch vụ" + "Điểm bán" căn TRÁI — mặc định của .rp-price-table td là center, mà đây là văn bản
   đọc: căn giữa làm mắt phải nhảy giữa các dòng dài ngắn khác nhau. */
.rp-price-table.ups-tbl td.ups-svc,
.rp-price-table.ups-tbl td.ups-outlet {
    text-align: left;
}

.rp-price-table.ups-tbl th:nth-child(2) {
    text-align: left;
}

.rp-price-table.ups-tbl th:nth-child(3) {
    text-align: right;
}

.ups-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--rp-t0, #1a1a2e);
    line-height: 1.3;
}

.ups-code {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--rp-t3, #7a7a90);
}

.rp-price-table.ups-tbl td.ups-price {
    text-align: right;
    white-space: nowrap;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 700;
    color: var(--rp-yellow, #9a7420);
}

.rp-price-table.ups-tbl td.ups-cell {
    text-align: center;
}

/* Điểm bán sửa được ngay trên dòng — đổi điểm bán là ĐỔI ĐƠN GIÁ, nên nó phải trông như một ô nhập
   thật chứ không phải nhãn. */
.ups-outletsel {
    max-width: 190px;
    width: 100%;
    padding: 5px 8px;
    border-radius: 6px;
    border: 1px solid var(--rp-b1, #e0ddd6);
    background: var(--rp-bg0, #faf7f2);
    font-family: inherit;
    font-size: 12px;
    color: var(--rp-t2, #4a4a60);
    outline: none;
    cursor: pointer;
}

    .ups-outletsel:focus {
        border-color: var(--rp-accent, #c4841d);
        background: #fff;
    }

.ups-warn {
    font-size: 11.5px;
    font-weight: 600;
    color: #b3261e;
    background: rgba(179,38,30,.07);
    border-radius: 5px;
    padding: 3px 8px;
    white-space: nowrap;
}

.ups-qtywrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* MÀU nói đúng NGHĨA TIỀN, không phải trang trí:
   xanh lá = có số lượng  -> TRỪ vào tiền phòng
   xanh dương (∞ bật) = được hưởng nhưng KHÔNG trừ (không có số lượng) */
.ups-qty {
    width: 62px;
    padding: 6px;
    text-align: center;
    border-radius: 6px;
    border: 1px solid #2ea55e;
    background: #edf8f2;
    color: #1f5138;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 13px;
    outline: none;
}

.ups-inf {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    border: 1px solid var(--rp-b1, #e0ddd6);
    background: none;
    color: var(--rp-t3, #7a7a90);
    white-space: nowrap;
}

    .ups-inf.on {
        background: #eaf3fb;
        border-color: #4a90c2;
        color: #1a4f7a;
    }

.ups-scopesel {
    padding: 5px 8px;
    border-radius: 6px;
    border: 1px solid var(--rp-b1, #e0ddd6);
    background: var(--rp-bg0, #faf7f2);
    font-family: inherit;
    font-size: 12px;
    color: var(--rp-t2, #4a4a60);
    outline: none;
    cursor: pointer;
}

/* 🔴 visibility:hidden, ⛔ KHÔNG display:none — ô phải GIỮ CHỖ, nếu không dòng ∞ và dòng có số lượng
   cao thấp so le và cả cột trông răng cưa. (visibility:hidden cũng đã loại phần tử khỏi thứ tự Tab.) */
.ups-row.unl .ups-qty,
.ups-row.unl .ups-scopesel {
    visibility: hidden;
}

.ups-rm {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: none;
    background: rgba(225,29,72,.07);
    color: #e11d48;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
}

    .ups-rm:hover {
        background: #e11d48;
        color: #fff;
    }

.rp-price-table.ups-tbl tr.ups-total td {
    border-top: 2px solid var(--rp-b1, #e0ddd6);
    border-bottom: none;
    padding-top: 11px;
    font-size: 13.5px;
}

.rp-price-table.ups-tbl tr.ups-total .big {
    font-family: 'JetBrains Mono', monospace;
    font-size: 17px;
    font-weight: 700;
    color: var(--rp-yellow, #9a7420);
}

.rp-price-table.ups-tbl td.ups-note-cell {
    text-align: left;
    padding-left: 12px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--rp-t3, #7a7a90);
}

/* ── Trạng thái RỖNG ── */
.ups-empty {
    padding: 34px 16px;
    text-align: center;
    color: var(--rp-t3, #7a7a90);
    border: 2px dashed var(--rp-b1, #e0ddd6);
    border-radius: var(--rp-rl, 12px);
}

    .ups-empty .ic {
        font-size: 30px;
        opacity: .35;
        display: block;
        margin-bottom: 8px;
    }

    .ups-empty .sub {
        font-size: 12.5px;
    }

    .ups-empty .act {
        margin-top: 13px;
    }

/* ══ Modal "Thêm dịch vụ" — dùng khuôn .pos-modal* của Cấu hình POS ══
   ⚠️ pos-config.css nạp SAU pms-rate.css trong App.razor ⇒ mọi override phải THẮNG SPECIFICITY,
   khai lại cùng một class là bị bản kia đè ngược. */
.pos-modal.ups-modal {
    width: 860px;
    max-width: 96vw;
    /* Danh sách mặt hàng rất dài (site thật 1.113 mã) ⇒ lấy gần hết chiều cao màn hình.
       `height` chứ không chỉ `max-height`: để khung ổn định, danh sách tự cuộn bên trong thay vì
       modal co giãn theo số dòng khớp bộ lọc (gõ một chữ là modal nhảy chiều cao, rất khó thao tác). */
    height: 88vh;
    max-height: 88vh;
}

/* Vùng cuộn phải là DANH SÁCH, không phải cả modal — đầu (ô tìm) và chân (nút Xong) luôn thấy được. */
.ups-modal .pos-modal-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.ups-modal .pos-modal-search {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.ups-modal-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    /* Hai bo loc (Diem ban + Danh muc) tren mot hang; man hep thi XUONG DONG chu KHONG cuon ngang —
       mot o loc bi khuat ben phai la mot bo loc KHONG TON TAI voi nguoi dung. */
    flex-wrap: wrap;
}

    .ups-modal-filters .pos-filter-combo {
        flex: 1;
        max-width: 340px;
    }

/* Cột của danh sách: (0,2,0) — thắng `.pos-modal-list-head span { flex:1 }` (0,1,1). */
.ups-modal .ups-mi-code {
    flex: 0 0 116px;
    text-align: center;
}

.ups-modal .ups-mi-cat {
    flex: 0 0 132px;
    font-size: 11.5px;
    color: var(--rp-t3, #7a7a90);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ups-modal .ups-mi-outlet {
    flex: 0 0 148px;
    font-size: 12px;
    color: var(--rp-t2, #4a4a60);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ups-modal .ups-mi-price {
    flex: 0 0 96px;
    text-align: right;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 12.5px;
    color: var(--rp-yellow, #9a7420);
}

.ups-modal .ups-mi-btn {
    flex: 0 0 30px;
}

.ups-mi-warn {
    padding: 9px 12px;
    margin: 6px 4px;
    border-radius: 7px;
    background: #fdf6e8;
    border: 1px solid #ecd9ae;
    font-size: 12px;
    color: #7a6224;
}

/* ── Khối CHIP nhiều điểm bán ở ma trận dịch vụ kèm (2026-08-17) ──────────────────────────────
   Một dòng cấu hình = một dịch vụ, nhưng khách được dùng ở NHIỀU POS và mọi nơi trừ CÙNG một quỹ.
   🔴 Chip ĐẦU là ĐẠI DIỆN: nó quyết định đơn giá cắt khỏi tiền phòng và nơi ghi doanh thu ⇒
   thứ tự hiển thị PHẢI khớp thứ tự lưu, ⛔ không sắp xếp lại ở CSS lẫn ở code. */
.ups-obox {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.ups-ochip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 7px;
    border-radius: 20px;
    font-size: 11.5px;
    line-height: 1.3;
    background: var(--rp-bg4);
    border: 1px solid var(--rp-b1);
    color: var(--rp-t2);
    max-width: 100%;
}

    /* Đại diện: tô rõ hơn hẳn — nhìn một cái phải biết tiền đi về đâu. */
    .ups-ochip.head {
        background: var(--rp-accentA);
        border-color: var(--rp-accent);
        color: var(--rp-accent);
        font-weight: 600;
    }

.ups-ohead {
    font-size: 10px;
    line-height: 1;
}

.ups-oname {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 150px;
}

.ups-ox {
    border: none;
    background: none;
    color: var(--rp-t3);
    font-size: 10px;
    line-height: 1;
    cursor: pointer;
    padding: 0 1px;
}

    .ups-ox:hover {
        color: var(--rp-danger);
    }

/* Ô "＋ thêm điểm bán" — chỉ render khi CÒN nơi để thêm. Dịch vụ chỉ bật ở đúng một điểm bán thì
   không có ô này, và điểm bán đó đã tự thành đại diện. */
.ups-oadd {
    padding: 3px 6px;
    border-radius: 20px;
    border: 1px dashed var(--rp-b1);
    background: none;
    color: var(--rp-t3);
    font-size: 11.5px;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    max-width: 150px;
}

    .ups-oadd:hover {
        border-color: var(--rp-accent);
        color: var(--rp-accent);
    }

/* Mặt hàng bật ở NHIỀU điểm bán: hiện SỐ NƠI thay vì liệt kê (liệt kê làm vỡ dòng, mà thêm xong thì
   ô tự nhận trọn danh sách nên tên từng nơi ở đây không giúp quyết định gì). Tên đầy đủ nằm ở `title`. */
.ups-mi-omulti {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    background: var(--rp-accentA, rgba(196,132,29,.1));
    color: var(--rp-accent, #c4841d);
    font-size: 11px;
    font-weight: 600;
}
