body {
    background-color: #f8f9fa;
}
html,body { height: 100%; width: 100%;}
.body-panel{
    display: flex;
    flex-direction: column;
}
.main-panel { flex: 1 1 auto;overflow:hidden}
.main-container { height:100%;overflow:scroll}
.navbar-brand {
    font-weight: bold;
    font-size: 0.8rem;
}
.navbar {
    font-size: 0.8rem;
    padding: .2rem .5rem;
}
.nav-link{
    padding: 0;
line-height: 2;
}

.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.table {
    background-color: white;
}

.badge {
    padding: 0.35em 0.65em;
}

.btn {
    margin-right: 0.25rem;
}

.alert {
    margin-bottom: 1rem;
}

.form-check {
    margin-bottom: 0.5rem;
}

.dropdown-menu {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* ── BillMaster Block (Rule 7.4: .wt-cms- prefix) ── */
.wt-cms-billmaster-room-section {
    margin-bottom: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.wt-cms-billmaster-room-heading {
    font-size: 11px;
    font-weight: 600;
    color: #1565c0;
    background: #e3f2fd;
    padding: 4px 8px;
    border-bottom: 1px solid #bbdefb;
}

.wt-cms-billmaster-spinner {
    padding: 12px;
    text-align: center;
    color: #667781;
}

.wt-cms-billmaster-error {
    padding: 8px;
    background: #fff5f5;
    border-top: 1px solid #fde8e8;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.wt-cms-billmaster-error-msg {
    color: #e53935;
    flex: 1;
}

.wt-cms-billmaster-retry-btn {
    white-space: nowrap;
}

/* Sticky header for BillMaster table (task 5.2) */
.wt-cms-billmaster-room-section .wt-cms-customer-scroll {
    max-height: 220px;
    overflow-y: auto;
}

.wt-cms-billmaster-room-section .wt-cms-customer-table thead th {
    position: sticky;
    top: 0;
    background: #f0f2f5;
    z-index: 1;
}

/* ── BillMaster Language Toggle (Spec 11) ── */
.wt-bm-lang-toggle-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: #f5f5f5;
    border-radius: 4px;
}

.wt-bm-lang-toggle-label {
    font-size: 12px;
    font-weight: 600;
    color: #555;
}

.wt-bm-lang-toggle-btn {
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid #ccc;
    background: white;
    color: #555;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wt-bm-lang-toggle-btn:hover {
    background: #f0f0f0;
    border-color: #999;
}

.wt-bm-lang-toggle-btn--active {
    background: #1565c0;
    color: white;
    border-color: #1565c0;
}

.wt-bm-lang-toggle-btn:focus {
    outline: 2px solid #1565c0;
    outline-offset: 2px;
}

/* ── BillMaster PDF Buttons (Spec 11) ── */
.bm-sum-pdf-cell {
    text-align: center;
    padding: 4px;
}

.wt-bm-pdf-btn {
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid #1565c0;
    background: white;
    color: #1565c0;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.wt-bm-pdf-btn:hover:not(:disabled) {
    background: #1565c0;
    color: white;
}

.wt-bm-pdf-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.wt-bm-pdf-btn-label {
    display: inline-block;
}

/* PDF error message (temporary, shown below button) */
.wt-bm-pdf-error {
    margin-top: 4px;
    padding: 4px 6px;
    font-size: 10px;
    color: #e53935;
    background: #ffebee;
    border-radius: 3px;
    text-align: center;
    animation: wtBmFadeIn 0.3s ease;
}

@keyframes wtBmFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── BillMaster PDF Preview (Spec 11) ── */
.wt-pdf-preview-wrap {
    margin: 8px 0;
    padding: 10px 12px;
    background: #e3f2fd;
    border: 2px solid #1565c0;
    border-radius: 6px;
    animation: wtBmSlideDown 0.3s ease;
}

@keyframes wtBmSlideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.wt-pdf-preview-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.wt-pdf-preview-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.wt-pdf-preview-filename {
    flex: 1;
    font-size: 12px;
    font-weight: 600;
    color: #1565c0;
    word-break: break-all;
}

.wt-pdf-preview-remove {
    padding: 2px 7px;
    font-size: 13px;
    font-weight: bold;
    border: none;
    background: transparent;
    color: #e53935;
    cursor: pointer;
    border-radius: 3px;
    flex-shrink: 0;
    transition: background 0.15s;
}

.wt-pdf-preview-remove:hover {
    background: rgba(229, 57, 53, 0.12);
}

.wt-pdf-preview-info {
    font-size: 10px;
    color: #555;
    font-style: italic;
}

/* ── BillMaster Checkbox Update Animation (Spec 11) ── */
.wt-bm-chk-pill--updated {
    animation: wtBmCheckboxPulse 1s ease;
}

@keyframes wtBmCheckboxPulse {
    0%,  100% { transform: scale(1); }
    50%        { transform: scale(1.2); box-shadow: 0 0 8px rgba(21, 101, 192, 0.5); }
}

/* ── BillMaster Summary Table ── */
.wt-cms-billmaster-summary {
    margin-bottom: 8px;
    border: 1px solid #c02615;
    border-radius: 4px;
    overflow-x: auto;
    font-size: 11px;
}
.wt-cms-billmaster-summary table {
    width: 100%;
    border-collapse: collapse;
    min-width: max-content;
}
.wt-cms-billmaster-summary th {
    background: #c02615;
    color: white;
    padding: 3px 6px;
    text-align: right;
    font-weight: 600;
    white-space: nowrap;
}
.wt-cms-billmaster-summary th:first-child {
    text-align: left;
}
.wt-cms-billmaster-summary td {
    padding: 3px 6px;
    border-bottom: 1px solid #e3f2fd;
    vertical-align: middle;
    white-space: nowrap;
}
.wt-cms-billmaster-summary tr:last-child td { border-bottom: none; }
.wt-cms-billmaster-summary tr:hover td { background: #f5f9ff; }
.wt-cms-billmaster-summary .bm-sum-room  { text-align: left; color: #1565c0; font-weight: 600; }
.wt-cms-billmaster-summary .bm-sum-bal   { text-align: right; font-weight: 700; color: #e53935; }
.wt-cms-billmaster-summary .bm-sum-mcell { text-align: right; color: #333; }
.wt-cms-billmaster-summary .bm-subtotal td {
    background: #F9E9FA;
    font-weight: 600;
    border-top: 1px solid #90caf9;
}
.wt-cms-billmaster-summary .bm-subtotal .bm-sum-bal { color: #1565c0; }
.wt-cms-billmaster-summary .bm-grandtotal td {
    background: #1565c0;
    color: white;
    font-weight: 700;
    border-top: 2px solid #0d47a1;
}
.wt-cms-billmaster-summary .bm-grandtotal .bm-sum-bal { color: white; }

/* BillMaster row — matched Customer_ID highlight on first column cell */
.wt-cms-bm-linked-row td:first-child {
    background: #e3f2fd;
    /* border-left: 3px solid #1565c0; */
    font-weight: 700;
    color: #0d47a1;
}

/* ── Payment Modal (Spec 10, Rule 7.4: .wt-cms- prefix) ── */

/* Task 2.1: Modal overlay, dialog, header, footer, shared section, image panel, form grid */
.wt-cms-payment-modal-overlay {
    display: none; position: fixed; z-index: 10000;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.55);
    justify-content: center; align-items: flex-start; padding-top: 30px;
}
.wt-cms-payment-modal {
    background: white; border-radius: 8px;
    width: 672px; max-width: 96vw; max-height: 95vh;
    overflow-y: auto; box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    display: flex; flex-direction: column;
}
.wt-cms-payment-modal-header {
    padding: 9px 14px; background: #1565c0; color: white;
    display: flex; align-items: center; justify-content: space-between;
    border-radius: 8px 8px 0 0; position: sticky; top: 0; z-index: 2;
}
.wt-cms-payment-modal-title { font-weight: 600; font-size: 13px; }
.wt-cms-payment-modal-close {
    background: none; border: none; color: white;
    font-size: 20px; cursor: pointer; padding: 0 4px; line-height: 1;
}
.wt-cms-payment-shared {
    display: flex; gap: 10px; padding: 10px 14px;
    border-bottom: 1px solid #f0f0f0;
}
.wt-cms-payment-image-panel {
    flex: 0 0 160px; display: flex; align-items: center; justify-content: center;
    background: #f5f5f5; border-radius: 4px; min-height: 120px;
    border: 1px solid #e0e0e0; overflow: hidden;
}
.wt-cms-payment-image-placeholder {
    text-align: center; color: #aaa; font-size: 11px; padding: 10px;
}
.wt-cms-payment-header-fields { flex: 1; }
.wt-cms-payment-form-grid {
    display: grid; grid-template-columns: 70px 1fr;
    gap: 5px 8px; align-items: center; font-size: 12px;
}
.wt-cms-payment-input {
    width: 100%; padding: 3px 5px; border: 1px solid #ddd;
    border-radius: 3px; font-size: 11px; box-sizing: border-box;
}
.wt-cms-payment-input[readonly] { background: #f5f5f5; color: #555; }
.wt-cms-payment-section { padding: 8px 14px; border-bottom: 1px solid #f0f0f0; }
.wt-cms-payment-section-title {
    font-size: 10px; font-weight: 600; text-transform: uppercase;
    color: #667781; margin-bottom: 6px;
}
.wt-cms-payment-error {
    margin: 4px 14px; padding: 4px 8px; background: #fff5f5;
    color: #e53935; border-radius: 3px; font-size: 11px;
}
.wt-cms-payment-modal-footer {
    padding: 8px 14px; display: flex; justify-content: flex-end; gap: 8px;
    position: sticky; bottom: 0; background: white; z-index: 2;
    border-top: 1px solid #f0f0f0;
}
.wt-cms-payment-save-btn { background: #1565c0; color: white; border-color: #1565c0; }
.wt-cms-payment-save-btn:hover { background: #0d47a1; border-color: #0d47a1; }
.wt-cms-payment-save-btn:disabled { background: #ccc; border-color: #ccc; cursor: not-allowed; }
.wt-cms-payment-update-btn { font-size: 10px; padding: 2px 6px; }
.wt-cms-payment-badge {
    display: inline-block; width: 8px; height: 8px; border-radius: 50%;
    background: #27ae60; margin-left: 3px; vertical-align: middle;
}

/* Task 2.2: Sub-form factory — horizontal card layout (centered, scrollable when overflow) */
.wt-cms-payment-factory-scroll {
    display: flex;
    flex-direction: row;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    min-width: 0;
}
.wt-cms-payment-room-card {
    border: 1px solid #bbdefb; border-radius: 6px;
    min-width: 200px; max-width: 220px;
    flex-shrink: 0;
    overflow: hidden;
}
.wt-cms-payment-room-card-header {
    background: #1565c0; color: white;
    padding: 5px 10px; font-size: 12px; font-weight: 600;
    display: flex; align-items: center; gap: 8px;
}
.wt-cms-payment-room-card-header input[type="checkbox"] {
    width: 14px; height: 14px; cursor: pointer; accent-color: white;
}
.wt-cms-payment-room-card-body {
    padding: 8px 10px;
    display: grid; grid-template-columns: 90px 1fr;
    gap: 5px 8px; align-items: center; font-size: 12px;
    background: #f9fbff;
}
.wt-cms-payment-room-card-body label { color: #555; font-size: 11px; }
.wt-cms-payment-room-readonly {
    padding: 3px 5px; background: #f0f2f5; border-radius: 3px;
    font-size: 11px; color: #333; font-weight: 600;
}

/* Task 2.3: Workflow 2 evidence overlay button */
.wt-cms-use-evidence-btn {
    position: absolute; bottom: 4px; right: 4px;
    background: #1565c0; color: white; border: none;
    border-radius: 4px; padding: 2px 6px; font-size: 10px;
    cursor: pointer; z-index: 10; white-space: nowrap;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    transition: background 0.15s;
}
.wt-cms-use-evidence-btn:hover { background: #0d47a1; }
.message-bubble.wt-cms-payment-selected .message-content {
    outline: 2px solid #1565c0;
}

/* ── 07_conversation-task-bar-enhancement ── */

/* ── Task 2.1: Dashboard container and card layout ── */
.wt-taskbar-dashboard-header {
    padding: 4px 8px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #667781;
    border-bottom: 1px solid #e0e0e0;
    letter-spacing: 0.4px;
}

.wt-taskbar-card {
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    /* collapsed cards shrink to header height only */
    flex-shrink: 0;
}

/* The one active (open) card expands to fill all remaining panel height */
.wt-taskbar-card--active {
    flex: 1 1 0;
    min-height: 0;
}

.wt-taskbar-card--placeholder .wt-taskbar-card-header {
    opacity: 0.5;
    cursor: default;
}

.wt-taskbar-card-header {
    display: flex;
    align-items: center;
    padding: 5px 8px;
    gap: 4px;
    cursor: pointer;
    background: #f8f9fa;
    user-select: none;
    flex-shrink: 0;
}

.wt-taskbar-card-header:hover {
    background: #e9ecef;
}

/* Active card header gets a subtle highlight */
.wt-taskbar-card--active > .wt-taskbar-card-header {
    background: #e6f4f1;
    border-left: 3px solid #00a884;
}
.wt-taskbar-card--active > .wt-taskbar-card-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction:column
}
.wt-bm-block--buildings{
    flex: 1 1 auto;
}


.wt-taskbar-card-title {
    flex: 1;
    font-size: 10px;
    font-weight: 700;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.wt-taskbar-card-chevron {
    font-size: 9px;
    color: #888;
}

.wt-taskbar-card-body {
    overflow-y: auto;
    /* No fixed max-height — active card fills available space via flex */
    flex: 1 1 0;
    min-height: 0;
}

/* ── Task 2.2: Card 1 toggle and badge styles ── */
.wt-taskbar-toggle {
    position: relative;
    display: inline-block;
    width: 28px;
    height: 16px;
    margin: 0;
    flex-shrink: 0;
}

.wt-taskbar-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.wt-taskbar-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ccc;
    border-radius: 16px;
    transition: 0.3s;
}

.wt-taskbar-toggle-slider:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 2px;
    bottom: 2px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.wt-taskbar-toggle input:checked + .wt-taskbar-toggle-slider {
    background: #00a884;
}

.wt-taskbar-toggle input:checked + .wt-taskbar-toggle-slider:before {
    transform: translateX(12px);
}

.wt-taskbar-badge {
    background: #dc3545;
    color: white;
    border-radius: 10px;
    padding: 1px 5px;
    font-size: 9px;
    font-weight: 700;
    min-width: 16px;
    text-align: center;
}

.wt-taskbar-spinner {
    padding: 8px;
    text-align: center;
}

.wt-taskbar-empty {
    padding: 8px;
    font-size: 10px;
    text-align: center;
    color: #888;
}

.wt-taskbar-error {
    padding: 6px 8px;
    font-size: 10px;
    color: #dc3545;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wt-taskbar-error button {
    padding: 2px 6px;
    font-size: 10px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

/* ── Bugfix: payment-list-refresh-flicker — refresh controls (countdown style) ── */
.wt-taskbar-refresh-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 6px 3px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.wt-taskbar-refresh-now {
    background: none;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 11px;
    color: #555;
    cursor: pointer;
    line-height: 1.4;
    flex-shrink: 0;
}
.wt-taskbar-refresh-now:hover { color: #00a884; border-color: #00a884; }
.wt-taskbar-refresh-now.spinning i { animation: spin 0.8s linear infinite; }

.wt-taskbar-ar-toggle {
    position: relative;
    display: inline-block;
    width: 28px;
    height: 16px;
    margin: 0;
    flex-shrink: 0;
}
.wt-taskbar-ar-toggle input { opacity: 0; width: 0; height: 0; }
.wt-taskbar-ar-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #ccc;
    border-radius: 16px;
    transition: 0.3s;
}
.wt-taskbar-ar-slider:before {
    position: absolute;
    content: "";
    height: 12px; width: 12px;
    left: 2px; bottom: 2px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}
.wt-taskbar-ar-toggle input:checked + .wt-taskbar-ar-slider { background: #00a884; }
.wt-taskbar-ar-toggle input:checked + .wt-taskbar-ar-slider:before { transform: translateX(12px); }

.wt-taskbar-ar-input {
    width: 36px;
    padding: 1px 3px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 10px;
    text-align: center;
    flex-shrink: 0;
}
.wt-taskbar-ar-input:focus { outline: none; border-color: #00a884; }

.wt-taskbar-ar-label {
    font-size: 10px;
    color: #888;
    flex-shrink: 0;
}

.wt-taskbar-ar-countdown {
    font-size: 10px;
    color: #00a884;
    font-weight: 600;
    min-width: 18px;
    text-align: right;
    flex: 1;
}

/* ── Task 2.3: Card 2 Bill Management styles ── */
.wt-bm-controls {
    padding: 5px 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-bottom: 1px solid #f0f0f0;
}

.wt-bm-select {
    width: 100%;
    padding: 2px 4px;
    font-size: 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.wt-bm-controls button {
    padding: 2px 6px;
    font-size: 10px;
    background: #1565c0;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.wt-bm-controls button:hover {
    background: #0d47a1;
}

.wt-bm-controls button:disabled {
    background: #aaa;
    cursor: not-allowed;
}

.wt-bm-table-scroll {
    overflow-x: auto;
}

.wt-bm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 9px;
    min-width: 200px;
}

.wt-bm-table th {
    background: #f0f2f5;
    padding: 2px 3px;
    font-weight: 600;
    border-bottom: 1px solid #e0e0e0;
    white-space: nowrap;
    position: sticky;
    top: 0;
}

.wt-bm-table td {
    padding: 2px 3px;
    border-bottom: 1px solid #f5f5f5;
    vertical-align: middle;
}

.wt-bm-table tr:hover td {
    background: #f9f9f9;
}

.wt-bm-empty, .wt-bm-error {
    padding: 8px;
    font-size: 10px;
    text-align: center;
    color: #888;
}

.wt-bm-error {
    color: #dc3545;
}

.wt-bm-spinner {
    padding: 10px;
    text-align: center;
}

.wt-bm-actions {
    padding: 4px 6px;
    border-top: 1px solid #f0f0f0;
}

.wt-bm-actions button {
    width: 100%;
    padding: 3px 6px;
    font-size: 10px;
    background: #f0f2f5;
    border: 1px solid #ddd;
    border-radius: 3px;
    cursor: pointer;
    color: #333;
}

.wt-bm-actions button:hover {
    background: #e2e6ea;
}

.wt-bm-icon {
    width: 12px;
    height: 12px;
    vertical-align: middle;
}

.wt-bm-inline-error {
    font-size: 10px;
    color: #dc3545;
    padding: 4px 6px;
}

/* ── Block 1: Filter Contacts — label + wt-taskbar-toggle ── */
.wt-bm-block--filter {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}
.wt-bm-filter-label {
    flex: 1;
    font-size: 10px;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    user-select: none;
}
.wt-bm-filter-count {
    font-size: 9px;
    color: #00a884;
    font-weight: 700;
    white-space: nowrap;
}
    padding: 4px 6px;
}

/* ── Block 3: Dynamic building columns ── */
.wt-bm-block--buildings {
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.wt-bm-cols {
    display: flex;
    flex: 1 1 0;
    min-height: 100%;
    height: 100%;
    border-top: 1px solid #e0e0e0;
}
.wt-bm-col {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e0e0e0;
}
.wt-bm-col:last-child { border-right: none; }
.wt-bm-col-header {
    padding: 3px 6px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    color: #667781;
    background: #f0f2f5;
    border-bottom: 1px solid #e0e0e0;
    letter-spacing: 0.4px;
    flex-shrink: 0;
    text-align: center;
}
.wt-bm-col-list {
    flex: 1 1 0;
    overflow-y: auto;
    /* display: flex; */
    flex-direction: column;
}
.wt-bm-building-btn {
    width: 100%;
    padding: 4px 5px;
    font-size: 10px;
    background: none;
    border: none;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    text-align: left;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background 0.12s;
}
.wt-bm-building-btn:hover { background: #e6f4f1; color: #00a884; }
.wt-bm-building-btn--active {
    background: #e6f4f1;
    color: #00a884;
    font-weight: 700;
    border-left: 3px solid #00a884;
}

/* ── Block 4: Room table block ── */
.wt-bm-block--rooms {
    flex-shrink: 0;
    border-top: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
}
.wt-bm-room-header {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 6px;
    font-size: 10px;
    font-weight: 600;
    color: #333;
    background: #f0f2f5;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
}
.wt-bm-room-back {
    background: none;
    border: none;
    cursor: pointer;
    color: #00a884;
    font-size: 13px;
    padding: 0 3px 0 0;
    line-height: 1;
    flex-shrink: 0;
}
.wt-bm-room-back:hover { color: #008f72; }

/* ── Block 2: Month toggle buttons ── */
.wt-bm-block--months {
    display: flex;
    gap: 3px;
    padding: 4px 6px;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
}
.wt-bm-month-btn {
    flex: 1;
    padding: 3px 2px;
    font-size: 11px;
    font-weight: 600;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    color: #555;
    text-align: center;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    line-height: 1.4;
}
.wt-bm-month-btn:hover {
    background: #e6f4f1;
    border-color: #00a884;
    color: #00a884;
}
.wt-bm-month-btn--active {
    background: #00a884;
    border-color: #00a884;
    color: #fff;
}
.wt-bm-month-btn--active:hover {
    background: #008f72;
    border-color: #008f72;
}

/* ── Room list: card-per-row layout (replaces wt-bm-table) ── */
.wt-bm-room-list {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    flex: 1 1 0;
    min-height: 0;
}

/* One card per room */
.wt-bm-room-card {
    padding: 5px 2px;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
    transition: background 0.12s;
}
.wt-bm-room-card:hover { background: #f9fafb; }

/* Row 1: Room ID + channel icon + finished badge */
.wt-bm-room-row {
    display: flex;
    align-items: center;
    gap: 4px;
}
.wt-bm-room-row--top {
    margin-bottom: 4px;
}
.wt-bm-room-id {
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    color: #1565c0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70px;
    flex-shrink: 1;
}
.wt-bm-room-id:hover { text-decoration: underline; }

/* AccLessMoney colour overrides on the room ID */
.wt-bm-room-id.alert-danger  { color: #c62828; }
.wt-bm-room-id.alert-info    { color: #0277bd; }
.wt-bm-room-id.alert-warning { color: #e65100; }

.wt-bm-chan-icon {
    font-size: 11px;
    flex-shrink: 0;
    line-height: 1;
}
.wt-bm-room-spacer { flex: 1; }

/* Finished / Open badge */
.wt-bm-badge {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 4px;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.2px;
}
.wt-bm-badge--done {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}
.wt-bm-badge--open {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffcc80;
}

/* Row 2: Status pill checkboxes */
.wt-bm-room-row--checks {
    gap: 3px;
}
.wt-bm-chk-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
    width: 18px;
}
/* Remark cell: ellipsis, tooltip on desktop, tap to show on mobile */
.wt-bm-chk-remark {
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  position: relative;
  color: #333;
  font-size: 11px;
  line-height: 1.4;
}

/* Desktop: show browser tooltip on hover */
@media (hover: hover) and (pointer: fine) {
  .wt-bm-chk-remark[title] {
    /* Native browser tooltip will show */
  }
}

/* Mobile: custom tap effect (handled by JS) */
@media (hover: none) and (pointer: coarse) {
  .wt-bm-chk-remark {
    /* Optionally style for tap feedback */
  }
}

/* Optional: custom tooltip style for mobile (hidden by default) */
.wt-bm-remark-tooltip {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  z-index: 100;
  background: #222;
  color: #fff;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: pre-line;
  max-width: 260px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  margin-top: 4px;
}
.wt-bm-chk-remark.show-tooltip + .wt-bm-remark-tooltip {
  display: block;
}

/* Hide the native checkbox */
.wt-bm-chk {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}
/* Pill that acts as the visible checkbox */
.wt-bm-chk-pill {
    display: block;
    width: 100%;
    text-align: center;
    font-size: 9px;
    font-weight: 600;
    padding: 2px 3px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background: #f5f5f5;
    color: #888;
    cursor: pointer;
    user-select: none;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
    white-space: nowrap;
}
/* Checked state: pill turns green */
.wt-bm-chk:checked + .wt-bm-chk-pill {
    background: #00a884;
    border-color: #00a884;
    color: #fff;
}
.wt-bm-chk:checked + .wt-bm-chk-pill.warning{
    background: #6500a8;
    border-color: #934cc2;
}
.wt-bm-chk:checked + .wt-bm-chk-pill.danger{
    background: #ec3737;
    border-color: #ec3737;
}
.wt-bm-chk-label:hover .wt-bm-chk-pill {
    border-color: #00a884;
    color: #00a884;
}
.wt-bm-chk-label:hover .wt-bm-chk-pill.warning {
    border-color: #643385;
    color: #643385;
}
.wt-bm-chk-label:hover .wt-bm-chk-pill.danger {
    border-color: #ec3737;
    color: #ec3737;
}

.wt-bm-chk:checked + .wt-bm-chk-pill.warning:hover {
    background: #480079;
    border-color: #643385;
}
.wt-bm-chk:checked + .wt-bm-chk-pill.danger:hover {
    background: #ec3737;
    border-color: #ec3737;
}
.wt-bm-chk:checked + .wt-bm-chk-pill:hover {
    background: #008f72;
    border-color: #008f72;
    color:  #ffff;
}

/* ── Task bar resizer handle ── */
#wtTaskbarResizer {
    width: 5px;
    flex-shrink: 0;
    cursor: col-resize;
    background: transparent;
    position: relative;
    z-index: 10;
    transition: background 0.15s;
    order: 0;   /* sits between task bar (order:0) and conversations panel (order:1) */
}
#wtTaskbarResizer::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    left: 2px;
    width: 1px;
    background: #e0e0e0;
    transition: background 0.15s, width 0.15s, left 0.15s;
}
#wtTaskbarResizer:hover::after,
#wtTaskbarResizer.wt-resizing::after {
    left: 1px;
    width: 3px;
    background: #00a884;
}
/* Reset button in dashboard header */
.wt-taskbar-reset-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #aaa;
    font-size: 13px;
    padding: 0 2px;
    line-height: 1;
    flex-shrink: 0;
    transition: color 0.15s;
}
.wt-taskbar-reset-btn:hover { color: #00a884; }
/* Hide resizer on mobile */
@media (max-width: 767px) {
    #wtTaskbarResizer { display: none; }
}

/* ── Room Search UI Controls (Spec 12, Rule 7.4: .wt-cms- prefix) ── */
.wt-cms-room-search-input {
    max-width: 100px;
    padding: 2px 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 11px;
    margin-left: 6px;
}
.wt-cms-room-search-input:focus {
    outline: none;
    border-color: #00a884;
}
.wt-cms-room-search-btn {
    background: none;
    border: none;
    color: #667781;
    cursor: pointer;
    padding: 2px 6px;
    font-size: 11px;
    transition: color 0.15s;
}
.wt-cms-room-search-btn:hover { color: #00a884; }
.wt-cms-room-search-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.wt-cms-room-search-error {
    font-size: 10px;
    color: #e53935;
    padding: 3px 8px;
    margin-top: 2px;
}

/* Active contact info strip */
.wt-cms-contact-info-strip {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    background: #000000;
    border-bottom: 1px solid #dbeafe;
    font-size: 11px;
    flex-wrap: wrap;
    min-height: 24px;
     flex: 1;
     overflow-x: scroll;
     border-radius: 5px;
}
/* CMS contact info strip */

.wt-cms-contact-info-strip .wt-cms-contact-info-name {
    color: #81b2eb;
    font-weight: 600; white-space: nowrap; 
    /* overflow: hidden; text-overflow: ellipsis; max-width: 110px; */
}
.wt-cms-contact-info-strip .wt-cms-contact-info-phone { color: #b3cbd9; white-space: nowrap; }
.wt-cms-contact-info-strip .wt-cms-contact-info-sep { color: #aaa; flex-shrink: 0; }
.wt-cms-contact-info-strip .wt-cms-contact-info-icon { color: #25d366; font-size: 11px; flex-shrink: 0; }
.wt-cms-contact-info-strip .wt-cms-contact-info-room { color: #4e99ef; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 80px; }
/* WhatsApp name in CMS strip */

.wt-cms-contact-info-name {
    font-weight: 700;
    color: #81b2eb;
    /* max-width: 120px; */
    /* overflow: hidden; */
    /* text-overflow: ellipsis; */
    /* white-space: nowrap; */
}
.wt-cms-contact-info-sep {
    color: #aaa;
    font-size: 10px;
}
.wt-cms-contact-info-icon {
    font-size: 11px;
    color: #25D366;
    flex-shrink: 0;
}
.wt-cms-contact-info-icon.fa-door-open {
    color: #667781;
}
.wt-cms-contact-info-phone {
    color: #333;
    font-family: monospace;
    font-size: 11px;
}
.wt-cms-contact-info-room {
    color: #1565c0;
    font-size: 10px;
    font-weight: 600;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Room Search Modal (Spec 12) — same pattern as .wt-cms-payment-modal-overlay */
.wt-cms-room-search-modal-overlay {
    display: none; position: fixed; z-index: 10000;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.55);
    justify-content: center; align-items: flex-start; padding-top: 40px;
}
.wt-cms-room-search-modal {
    background: white;
    border-radius: 8px;
    width: 96%;
    max-width: 1100px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}
.wt-cms-room-search-modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.wt-cms-room-search-modal-header h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: #333;
}
.wt-cms-room-search-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #667781;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}
.wt-cms-room-search-modal-close:hover { color: #333; }
.wt-cms-room-search-modal-body {
    padding: 16px 20px;
    overflow-y: auto;
    overflow-x: auto;
    flex: 1;
}
.wt-cms-room-search-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.wt-cms-room-search-table th {
    background: #f0f2f5;
    color: #667781;
    font-weight: 600;
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
    white-space: nowrap;
    position: sticky;
    top: 0;
}
.wt-cms-room-search-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
}
.wt-cms-room-search-table tr:hover td { background: #f9f9f9; }
.wt-cms-link-room-btn {
    background: none;
    border: 1px solid #00a884;
    color: #00a884;
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 10px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}
.wt-cms-link-room-btn:hover { background: #00a884; color: white; }
.wt-cms-link-room-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* DB instance badge */
.wt-cms-rs-db-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    background: #e3f2fd;
    color: #1565c0;
    white-space: nowrap;
}
.wt-cms-room-search-empty {
    text-align: center;
    color: #667781;
    font-size: 13px;
    padding: 40px 20px;
}
.wt-cms-link-error-row td {
    color: #e53935;
    font-size: 11px;
    padding: 4px 10px;
}

/* ── Room Search Browser — two-panel layout ── */
.wt-rs-shell {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 340px;
}
.wt-rs-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 2px 8px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 8px;
    flex-shrink: 0;
}
.wt-rs-nav-back {
    background: none;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 3px 10px;
    font-size: 11px;
    cursor: pointer;
    color: #1565c0;
    white-space: nowrap;
    transition: background 0.15s;
}
.wt-rs-nav-back:hover { background: #e3f2fd; }
.wt-rs-nav-crumb { font-size: 12px; font-weight: 600; color: #333; flex: 1; }
.wt-rs-panels {
    display: flex;
    flex: 1;
    min-height: 0;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}
.wt-rs-left { display: flex; flex-shrink: 0; border-right: 2px solid #e0e0e0; overflow-y: auto; }
.wt-rs-left-col { min-width: 72px; max-width: 88px; border-right: 1px solid #f0f0f0; display: flex; flex-direction: column; }
.wt-rs-left-col:last-child { border-right: none; }
.wt-rs-left-col-hdr { background: #1565c0; color: white; font-size: 10px; font-weight: 700; padding: 4px 6px; text-align: center; letter-spacing: 0.5px; flex-shrink: 0; }
.wt-rs-left-col-list { overflow-y: auto; flex: 1; }
.wt-rs-bldg-btn { width: 100%; padding: 5px 6px; font-size: 11px; background: none; border: none; border-bottom: 1px solid #f5f5f5; cursor: pointer; text-align: left; color: #333; white-space: nowrap; transition: background 0.1s, color 0.1s; }
.wt-rs-bldg-btn:hover { background: #e3f2fd; color: #1565c0; }
.wt-rs-bldg-btn--active { background: #1565c0; color: white; font-weight: 700; }
.wt-rs-right { flex: 1; padding: 10px 12px; overflow-y: auto; }
.wt-rs-right-hint { color: #aaa; font-size: 12px; font-style: italic; text-align: center; padding-top: 20px; }
.wt-rs-rooms-count { font-size: 11px; font-weight: 700; color: #1565c0; margin-bottom: 8px; }
.wt-rs-room-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.wt-rs-room-chip { padding: 3px 10px; font-size: 11px; font-weight: 600; border: 1px solid #1565c0; background: white; color: #1565c0; border-radius: 12px; cursor: pointer; transition: background 0.15s, color 0.15s; }
.wt-rs-room-chip:hover { background: #1565c0; color: white; }

/* Results table inside right panel */
.wt-rs-results-wrap {
    overflow-x: auto;
}
.wt-rs-results-wrap .wt-cms-room-search-table {
    font-size: 11px;
}
.wt-rs-results-wrap .wt-cms-room-search-table th,
.wt-rs-results-wrap .wt-cms-room-search-table td {
    padding: 5px 7px;
}

/* Expired contract end date highlight */
.wt-cms-room-search-table td.wt-rs-expired {
    color: #e53935;
    font-weight: 600;
    background: #fff3f3;
}

/* ── Payment Modal V2 (Spec 13, Rule 7.4: .wt-cms-pmv2- prefix) ── */

/* Overlay — full-screen fixed backdrop */
.wt-cms-pmv2-overlay {
    display: none;
    position: fixed;
    z-index: 10100;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.30);
    justify-content: center;
    align-items: center;
}
.wt-cms-pmv2-overlay.active {
    display: flex;
}

/* Dialog — centered two-panel modal */
.wt-cms-pmv2-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 92vw;
    max-width: 70%;
    height: 88vh;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header — draggable title bar */
.wt-cms-pmv2-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    background: #f0f2f5;
    border-bottom: 1px solid #e0e0e0;
    cursor: grab;
    flex-shrink: 0;
    user-select: none;
}
.wt-cms-pmv2-header:active {
    cursor: grabbing;
}

/* Title span */
.wt-cms-pmv2-title {
    font-size: 13px;
    font-weight: 600;
    color: #111;
}

/* × close button */
.wt-cms-pmv2-close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #667781;
    padding: 0 2px;
    transition: color 0.15s;
}
.wt-cms-pmv2-close:hover {
    color: #111;
}

/* Body — two-panel container */
.wt-cms-pmv2-body {
    display: flex;
    flex-direction: row;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* Left panel — entry form list */
.wt-cms-pmv2-left {
    width: 280px;
    flex-shrink: 0;
    border-right: 1px solid #e0e0e0;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
}

/* Right panel — date shortcuts + bill results */
.wt-cms-pmv2-right {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    overflow-y: auto;

}

/* Date shortcuts bar */
.wt-cms-pmv2-date-shortcuts {
    display: flex;
    gap: 4px;
    /* padding: 8px 0px; */
    border-bottom: 1px solid #e0e0e0;
    flex-wrap: wrap;
    flex-shrink: 0;
    background: #fafafa;
    padding-bottom: 4px;
}

/* Individual date shortcut button */
.wt-cms-pmv2-date-btn {
    padding: 3px 8px;
    font-size: 11px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    color: #333;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.wt-cms-pmv2-date-btn:hover {
    background: #f0f2f5;
    border-color: #00a884;
    color: #00a884;
}

/* Active / selected state — filled green */
.wt-cms-pmv2-date-btn--active {
    background: #00a884 !important;
    border-color: #00a884 !important;
    color: white !important;
}
.wt-cms-pmv2-date-btn--active .pmv2-date-btn-top,
.wt-cms-pmv2-date-btn--active .pmv2-date-btn-bottom {
    color: white !important;
}

/* Two-line date button (all 6 buttons use this for uniform height): 今天/昨天 show single centred text; offsets -2 to -5 show d/m on top, day name below */
.wt-cms-pmv2-date-btn--two-line {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2px 6px;
    line-height: 1.2;
    min-width: 36px;
    min-height: 32px;
}
.wt-cms-pmv2-date-btn--two-line .pmv2-date-btn-top {
    font-size: 11px;
    font-weight: 600;
    color: #333;
}
.wt-cms-pmv2-date-btn--two-line .pmv2-date-btn-bottom {
    font-size: 9px;
    color: #888;
    font-weight: normal;
}
.wt-cms-pmv2-date-btn--two-line:hover .pmv2-date-btn-top,
.wt-cms-pmv2-date-btn--two-line:hover .pmv2-date-btn-bottom {
    color: #00a884;
}

/* Bill results — scrollable table area */
.wt-cms-pmv2-bill-results {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

/* Bill table */
.wt-cms-pmv2-bill-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.wt-cms-pmv2-bill-table th {
    background: #f0f2f5;
    padding: 5px 8px;
    font-weight: 600;
    color: #667781;
    border-bottom: 1px solid #e0e0e0;
    white-space: nowrap;
    text-align: right;
}
.wt-cms-pmv2-bill-table th:first-child {
    text-align: left;
}
.wt-cms-pmv2-bill-table td {
    padding: 5px 8px;
    border-bottom: 1px solid #f0f0f0;
    text-align: right;
    vertical-align: middle;
}
.wt-cms-pmv2-bill-table td:first-child {
    text-align: left;
}
.wt-cms-pmv2-bill-table tr:last-child td {
    border-bottom: none;
}
.wt-cms-pmv2-bill-table tr:hover td {
    background: #f9fafb;
}

/* Paid history row — muted */
.wt-cms-pmv2-paid-row td {
    color: #999;
    font-style: italic;
}

/* Result message below table */
.wt-cms-pmv2-result-msg {
    font-size: 12px;
    padding: 8px;
    color: #333;
    font-weight: 500;
    white-space: pre-line;
    border-top: 1px solid #f0f0f0;
    margin-top: 4px;
}

/* Entry card */
.wt-cms-pmv2-entry-card {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 8px;
    padding: 10px;
    background: white;
    transition: border-color 0.15s, box-shadow 0.15s;
    display: flex;
    flex-direction: column;
    
}

/* Active entry highlight */
.wt-cms-pmv2-entry-active {
    border-color: #00a884;
    box-shadow: 0 0 0 1px #00a884;
}

.wt-cms-pmv2-entry-card-left {

}
.wt-cms-pmv2-entry-card-right{

}
/* Entry card header row */
.wt-cms-pmv2-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

/* "收款 #N" label */
.wt-cms-pmv2-entry-num {
    font-size: 11px;
    font-weight: 600;
    color: #667781;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ✕ remove button */
.wt-cms-pmv2-remove-btn {
    background: none;
    border: none;
    color: #e53935;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 0 2px;
    transition: color 0.15s;
}
.wt-cms-pmv2-remove-btn:hover {
    color: #b71c1c;
}

/* 2-column label/input grid */
.wt-cms-pmv2-form-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 8px;
    align-items: center;
    font-size: 12px;
}

/* Consistent input/select styling */
.wt-cms-pmv2-input {
    width: 100%;
    padding: 3px 6px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 11px;
    box-sizing: border-box;
    transition: border-color 0.15s;
}
.wt-cms-pmv2-input:focus {
    outline: none;
    border-color: #00a884;
}

/* Photo button row */
.wt-cms-pmv2-entry-actions {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 📷 select receipt button */
.wt-cms-pmv2-photo-btn {
    padding: 3px 8px;
    font-size: 11px;
    border: 1px solid #ccc;
    border-radius: 3px;
    background: none;
    cursor: pointer;
    color: #333;
    transition: background 0.15s, border-color 0.15s;
}
.wt-cms-pmv2-photo-btn:hover {
    background: #f0f2f5;
    border-color: #999;
}

/* Photo filename */
.wt-cms-pmv2-photo-name {
    font-size: 10px;
    color: #667781;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 140px;
}

/* + 新增入帳記錄 button */
.wt-cms-pmv2-add-btn {
    width: 100%;
    border: 1px dashed #00a884;
    color: #00a884;
    background: none;
    padding: 6px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 11px;
    margin-top: 8px;
    transition: background 0.15s;
}
.wt-cms-pmv2-add-btn:hover {
    background: #e6f4f1;
}

/* Footer row */
.wt-cms-pmv2-footer {
    padding: 10px 16px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    background: white;
}

/* Error message */
.wt-cms-pmv2-error {
    font-size: 11px;
    color: #e53935;
    margin-right: auto;
}

/* Save button — matches .wt-cms-apply-btn style, green when active */
.wt-cms-pmv2-save-btn {
    padding: 4px 14px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #f0f2f5;
    color: #555;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.wt-cms-pmv2-save-btn:not(:disabled):hover {
    background: #00a884;
    border-color: #00a884;
    color: white;
}
.wt-cms-pmv2-save-btn.active,
.wt-cms-pmv2-save-btn--active {
    background: #00a884;
    border-color: #00a884;
    color: white;
}
.wt-cms-pmv2-save-btn.active:hover,
.wt-cms-pmv2-save-btn--active:hover {
    background: #008f72;
    border-color: #008f72;
}
.wt-cms-pmv2-save-btn:disabled {
    background: #e0e0e0;
    border-color: #e0e0e0;
    color: #aaa;
    cursor: not-allowed;
}

/* ── Payment Modal V2 — Number Pad (Spec 10 Enhancement) ── */
.wt-cms-pmv2-numpad-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.97);
    z-index: 100;
    display: none;
    flex-direction: column;
    padding: 12px;
    border-radius: 0 0 8px 0;
}
.wt-cms-pmv2-numpad-overlay.active { display: flex; }

.wt-cms-pmv2-numpad-display {
    background: #f0f2f5;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 10px;
    text-align: right;
    flex-shrink: 0;
}
.wt-cms-pmv2-numpad-expr {
    font-size: 11px;
    color: #667781;
    min-height: 14px;
    word-break: break-all;
}
.wt-cms-pmv2-numpad-result {
    font-size: 22px;
    font-weight: 600;
    color: #111;
    min-height: 28px;
}

.wt-cms-pmv2-numpad-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    flex: 1;
}
.wt-cms-pmv2-numpad-btn {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: white;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    min-height: 44px;
    transition: background 0.1s;
    color: #333;
}
.wt-cms-pmv2-numpad-btn:hover { background: #f0f2f5; }
.wt-cms-pmv2-numpad-btn:active { background: #e0e0e0; }
.wt-cms-pmv2-numpad-btn--op {
    background: #fff3e0;
    color: #e65100;
    border-color: #ffcc80;
}
.wt-cms-pmv2-numpad-btn--op:hover { background: #ffe0b2; }
.wt-cms-pmv2-numpad-btn--eq {
    background: #00a884;
    color: white;
    border-color: #00a884;
    font-size: 20px;
}
.wt-cms-pmv2-numpad-btn--eq:hover { background: #008f72; }
.wt-cms-pmv2-numpad-btn--clear {
    background: #ffebee;
    color: #c62828;
    border-color: #ef9a9a;
    font-size: 13px;
}
.wt-cms-pmv2-numpad-btn--clear:hover { background: #fce4ec; }
.wt-cms-pmv2-numpad-btn--close {
    background: #f5f5f5;
    color: #667781;
    font-size: 12px;
    grid-column: span 2;
}
.wt-cms-pmv2-numpad-btn--close:hover { background: #e0e0e0; }
.wt-cms-pmv2-numpad-trigger {
    background: none;
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 2px 5px;
    font-size: 11px;
    cursor: pointer;
    color: #667781;
    margin-left: 4px;
    transition: background 0.15s;
}
.wt-cms-pmv2-numpad-trigger:hover { background: #f0f2f5; color: #00a884; border-color: #00a884; }

/* ── Payment Modal V2 — Receipt Photo Picker Overlay ── */
.wt-cms-pmv2-photo-overlay {
    position: relative;
    top: 0; left: 0; right: 0; bottom: 0;
    background: white;
    z-index: 101;
    display: none;
    flex-direction: column;
    border-radius: 0 0 8px 0;
}
.wt-cms-pmv2-photo-overlay.active { display: flex; }
.wt-cms-pmv2-photo-overlay-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 12px;
    font-weight: 600;
    color: #333;
    flex-shrink: 0;
}
.wt-cms-pmv2-photo-overlay-close {
    background: none; border: none; font-size: 18px;
    cursor: pointer; color: #667781; padding: 0 4px;
}
.wt-cms-pmv2-photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 10px;
    /* overflow-y: auto; */
    flex: 1;
}
.wt-cms-pmv2-photo-item {
    position: relative;
    aspect-ratio: 1;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    transition: border-color 0.15s;
}
.wt-cms-pmv2-photo-item:hover { border-color: #00a884; }
.wt-cms-pmv2-photo-item.selected { border-color: #00a884; }
.wt-cms-pmv2-photo-item img {
    height: 100%; width: auto; object-fit: contain; display: block;
}
.wt-cms-pmv2-photo-item-check {
    position: absolute;
    top: 3px; right: 3px;
    width: 18px; height: 18px;
    background: #00a884;
    border-radius: 50%;
    color: white;
    font-size: 11px;
    display: none;
    align-items: center;
    justify-content: center;
}
.wt-cms-pmv2-photo-item.selected .wt-cms-pmv2-photo-item-check { display: flex; }
.wt-cms-pmv2-photo-empty {
    padding: 20px; text-align: center; color: #999; font-size: 12px;
}

/* Receipt thumbnails in left panel */
.wt-cms-pmv2-photo-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 6px;
}
.wt-cms-pmv2-thumb-wrap {
    position: relative;
    width: 56px;
    border-radius: 4px;
    overflow: visible;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}
.wt-cms-pmv2-thumb-wrap img {
    width: 100%; height: 48px; object-fit: cover;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    display: block;
    flex-shrink: 0;
}
.wt-cms-pmv2-thumb-remove {
    position: absolute;
    top: -5px; right: -5px;
    width: 16px; height: 16px;
    background: #e53935;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 10px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 5;
}
.wt-cms-pmv2-combine-btn {
    width: 100%;
    margin-top: 6px;
    padding: 4px 8px;
    font-size: 11px;
    border: 1px dashed #00a884;
    color: #00a884;
    background: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s;
}
.wt-cms-pmv2-combine-btn:hover { background: #e6f4f1; }

/* ── Photo Grid Item — timestamp badge (top-right floating) ── */
.wt-cms-pmv2-photo-item-time {
    position: absolute;
    top: 3px;
    right: 3px;
    background: rgba(0,0,0,0.30);
    color: white;
    font-size: 8px;
    padding: 1px 4px;
    border-radius: 3px;
    line-height: 1.4;
    pointer-events: none;
    z-index: 2;
    white-space: nowrap;
}

/* Large preview tooltip — desktop hover */
.wt-cms-pmv2-thumb-preview {
    position: fixed;
    z-index: 20000;
    pointer-events: none;
    display: none;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    border: 2px solid white;
    max-height: 90vh;
    width: auto;
    overflow: hidden;
    background: #000;
}
.wt-cms-pmv2-thumb-preview img {
    display: block;
    height: 90vh;
    width: auto;
    max-width: 80vw;
    object-fit: contain;
}
.wt-cms-pmv2-thumb-preview.active {
    display: block;
}

/* Mobile touch large preview overlay */
.wt-cms-pmv2-large-preview-overlay {
    display: none;
    position: fixed;
    z-index: 19999;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.9);
    align-items: center;
    justify-content: center;
}
.wt-cms-pmv2-large-preview-overlay.active {
    display: flex;
}
.wt-cms-pmv2-large-preview-overlay img {
    height: 100vh;
    width: auto;
    max-width: 100vw;
    object-fit: contain;
}

/* ── Payment Modal V2 — Two-Panel Photo Picker (Redesign) ── */

/* ── Enlarge Overlay — full-screen fade-in photo preview ── */
/* Triggered by pmv2PickerEnlarge(); dismissed by clicking anywhere */
.wt-cms-pmv2-enlarge-overlay {
    display: flex;
    position: fixed;
    z-index: 25000;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.88);
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    /* fade-in animation */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}
.wt-cms-pmv2-enlarge-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.wt-cms-pmv2-enlarge-overlay img {
    height: 100vh;
    width: auto;
    max-width: 100vw;
    object-fit: contain;
    border-radius: 2px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.6);
    /* scale-up animation matching fade */
    transform: scale(0.92);
    transition: transform 0.22s ease;
}
.wt-cms-pmv2-enlarge-overlay.active img {
    transform: scale(1);
}

/* Body of photo picker: two panels side by side */
.wt-cms-pmv2-photo-picker-body {
    display: flex;
    flex-direction: row;
    flex: 1;
    min-height: 0;
    height: 100%;
    overflow: hidden;
}

/* Left panel: photo grid (scrollable) */
.wt-cms-pmv2-picker-left {
    width: 70%;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    padding: 8px;
    align-content: start;
    flex-shrink: 0;
}

/* Right panel: OCR result */
.wt-cms-pmv2-picker-right {
    flex: 1;
    border-left: 1px solid #e0e0e0;
    overflow-y: auto;
    min-width: 0;
}

/* Individual picker item */
.wt-cms-pmv2-picker-item {
    position: relative;
    cursor: pointer;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    /* overflow: hidden; */
    display: flex;
    flex-direction: column;
    background: #fafafa;
    transition: border-color 0.15s;
}
.wt-cms-pmv2-picker-item:hover {
    border-color: #aaa;
}
.wt-cms-pmv2-picker-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}

/* Selected state — green border */
.wt-cms-pmv2-picker-selected {
    border-color: #00a884 !important;
    background: #f0fbf8;
}

/* Focused state — blue border */
.wt-cms-pmv2-picker-focused {
    border-color: #1565c0 !important;
    background: #f0f5ff;
}

/* Per-item toolbar row: buttons below the image */
.wt-cms-pmv2-picker-toolbar {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    padding: 3px 2px;
    background: #f5f5f5;
    border-top: 1px solid #e8e8e8;
    flex-shrink: 0;
    gap: 2px;
}
.wt-cms-pmv2-picker-toolbar button {
    flex: 1;
    background: none;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 10px;
    padding: 2px 3px;
    cursor: pointer;
    color: #555;
    line-height: 1.3;
    transition: background 0.12s, color 0.12s;
    white-space: nowrap;
}
.wt-cms-pmv2-picker-toolbar button:hover {
    background: #e0e0e0;
    color: #222;
}

/* OCR result panel */
.wt-cms-pmv2-ocr-panel {
    padding: 0;
    font-size: 12px;
    color: #333;
    height: 100%;
}

/* Thumbnail toolbar (shown below each thumb in entry card) */
.wt-cms-pmv2-thumb-toolbar {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    gap: 2px;
    margin-top: 2px;
}
.wt-cms-pmv2-thumb-toolbar button {
    flex: 1;
    background: none;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 10px;
    padding: 1px 2px;
    cursor: pointer;
    color: #555;
    line-height: 1.3;
    transition: background 0.12s;
}
.wt-cms-pmv2-thumb-toolbar button:hover {
    background: #f0f0f0;
    border-color: #999;
}


@media (max-width: 767px) {
    .wt-cms-pmv2-dialog {
        max-width: 90%;
    }
    .wt-cms-pmv2-body {
        flex-direction: column;
    }
    .wt-cms-pmv2-left{
    flex-direction: row;

    }
    .wt-cms-pmv2-date-shortcuts{
        display: block;
    }
    .wt-cms-pmv2-entry-form{
            flex: 1 1 auto;
    }
    .wt-cms-pmv2-left{
        width: 100%;
    }
    .wt-cms-pmv2-entry-card {
        flex-direction: row;
            gap: 10px;
    }
    .wt-cms-pmv2-entry-card-right{
        overflow: hidden;
        overflow-y: scroll;
        width: 25%;
        
    }
    .wt-cms-pmv2-entry-card-left{
        flex: 1 1 auto
    }
    .hidden-xs{
        display: none;
    }



}
/* Dialog — centered two-panel modal */

/* Adjust thumb-wrap to stack image + toolbar vertically — see primary rule above */



/* Spec: room-billing-exclusion — non-billable rooms (storage, self-use, public) */
.prb-room-row--excluded { opacity: 0.55; background: #f0f0f0; }
.prb-badge.prb-badge--excluded { background: #888; color: #fff; }
