﻿.nightAudit-general {
    flex: 1;
    height: 100vh;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.night-header-page {
    flex: 1;
    max-height: 60px;
}

    .night-header-page .title {
        font: normal normal 600 var(--s-28);
        color: black;
    }

    .night-header-page .sub-title {
        font: normal normal 500 var(--s-16);
        color: var(--bs-gray-700);
    }

.night_content {
    flex: 1 1 0;
    margin-top: var(--px-16);
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

    .night_content::-webkit-scrollbar {
        width: 8px;
    }

    .night_content::-webkit-scrollbar-track {
        background: #f3f4f6;
        border-radius: 4px;
    }

    .night_content::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 4px;
    }

        .night_content::-webkit-scrollbar-thumb:hover {
            background: #94a3b8;
        }

#selectAllWrapper.hidden {
    display: none !important;
}

/* processbar */
.stepper-container {
    max-width: 1000px;
    min-width: 1000px;
    margin: 0 auto;
    background: white;
    padding: var(--px-20);
    border-radius: var(--px-12);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    /*height: 124px;*/
    gap: 12px;
    display: flex;
    flex-direction: column;
}

/* Desktop labels */
.step-labels {
    display: none;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--px-16);
}

.step-label {
    position: relative;
    z-index: 10;
    font: normal normal 500 var(--s-14);
    color: #9ca3af;
}

    .step-label.active {
        color: #7fad49;
    }

/* Progress bar container */
.progress-container {
    display: flex;
    align-items: center;
    position: relative;
}

/* Background track */
.progress-track {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 4px;
    background-color: #e5e7eb;
    width: 100%;
    border-radius: 2px;
}

/* Active progress */
.progress-bar {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 4px;
    background-color: #7fad49;
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease;
}

/* Step circles */
.steps {
    display: flex;
    width: 100%;
    justify-content: space-between;
}

.step {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    background-color: white;
    border: 2px solid #d1d5db;
    color: #9ca3af;
    font-size: 12px;
    transition: all 0.3s ease;
}

    .step-circle.active {
        background-color: #7fad49;
        border-color: #7fad49;
        color: white;
    }

    .step-circle.completed {
        background-color: #7fad49;
        border-color: #7fad49;
        color: white;
    }

    .step-circle svg {
        width: 16px;
        height: 16px;
    }

/* Mobile labels */
.mobile-label {
    display: none;
    position: absolute;
    top: 48px;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 500;
    color: #374151;
}

.mobile-info {
    display: block;
    text-align: center;
}

.mobile-step-count {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.mobile-step-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin-top: 4px;
}

/* layout content */
.stage-content {
    max-width: 1000px;
    min-width: 1000px;
    margin: 0 auto;
    background: white;
    padding: var(--px-20);
    border-radius: var(--px-12);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--bs-gray-200);
    flex: 1 1 0;
    margin-top: var(--px-12);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: var(--px-20);
    overflow: hidden;
}

    .step-item[data-step-item="4"] {
        display: flex;
        flex-direction: column;
        min-height: 0;
        flex: 1;
    }

.as-logs-section {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
}

.step-item {
    opacity: 0;
    transform: translateY(12px);
    display: flex;
    flex-direction: column;
    transition: opacity .35s ease, transform .35s ease;
}

    .step-item.active {
        opacity: 1;
        transform: translateY(0);
        display: flex;
        overflow: hidden;
    }

    .step-item:not(.active) {
        display: none;
    }

.night_content,
.stage-content,
.step-item {
    min-height: 0;
}

/* Ticket list + transitions (converted from React component) */
.step-block-header {
    flex: 0 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--px-16);
}

.block-title {
    font: normal normal 600 var(--s-20);
    margin: 0;
    color: #111827;
}

.select-all-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
}

.select-all-label {
    font-size: 13px;
    color: #4b5563;
}

/* Tickets list */
/*.tickets-list {
    position: relative;
    max-height: 400px;
    height: auto;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow: auto;
    overscroll-behavior: contain;
    padding-right: 4px;
    scrollbar-width: thin;
}*/
.tickets-list {
    position: relative;
    height: auto;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow: auto;
    overscroll-behavior: contain;
    padding-right: 4px;
    scrollbar-width: thin;
}

    .tickets-list::-webkit-scrollbar {
        width: 8px;
    }

    .tickets-list::-webkit-scrollbar-track {
        background: #f3f4f6;
        border-radius: 4px;
    }

    .tickets-list::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 4px;
    }

        .tickets-list::-webkit-scrollbar-thumb:hover {
            background: #94a3b8;
        }

    .tickets-list.scrolling::before {
        content: '';
        position: sticky;
        top: 0;
        height: 0;
        display: block;
        box-shadow: 0 4px 10px -6px rgba(0,0,0,0.2);
    }

.ticket-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
    display: flex;
    gap: 12px;
    position: relative;
    overflow: hidden;
    opacity: 1;
    transform: translateY(0);
    transition: opacity .3s ease, transform .3s ease, background .3s;
    cursor: pointer;
    margin: 12px 0;
}

    .ticket-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
        border-color: var(--bs-gray-200);
        background-color: #fff;
    }

    .ticket-card.enter {
        opacity: 0;
        transform: translateY(18px);
    }

    .ticket-card.removing {
        opacity: 0;
        transform: translateX(-40px);
    }

    .ticket-card.selected {
        background: #ecfdf5;
        border-color: var(--bs-main-400);
        box-shadow: 0 0 0 2px rgba(16,185,129,0.35);
    }

        .ticket-card.selected .ticket-field-label {
            color: #065f46;
        }

        .ticket-card.selected .ticket-field-value {
            color: #065f46;
        }

.ticket-card {
    cursor: pointer;
}

    /* Remove any layout gap assuming checkbox was first child */
    .ticket-card .ticket-grid {
        width: 100%;
    }

.ticket-check {
    width: 20px;
    height: 20px;
    border: 1.5px solid #d1d5db;
    border-radius: 4px;
    margin-top: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    background: #fff;
    transition: background .25s, border-color .25s;
}

    .ticket-check.active {
        background: #7fad49;
        border-color: #7fad49;
    }

.ticket-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(140px,1fr));
    gap: 12px;
}

.ticket-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ticket-field-label {
    font-size: 12px;
    color: #6b7280;
}

.ticket-field-value {
    font-size: 13px;
    font-weight: 500;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 4px;
}

    .ticket-field-value.balance {
        color: var(--bs-main);
    }

.tickets-empty {
    text-align: center;
    padding: 48px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    animation: fadeIn .4s ease;
}

    .tickets-empty.hidden {
        display: none;
    }

.empty-icon {
    width: 64px;
    height: 64px;
    background: #f0fdf4;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.empty-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.empty-text {
    font-size: 14px;
    color: #4b5563;
    margin: 0;
}

/* Action bar */
.action-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -2px 8px rgba(0,0,0,.08);
    padding: var(--px-24) var(--px-20);
    transform: translateY(110%);
    opacity: 0;
    transition: transform .35s ease, opacity .35s ease;
    z-index: 30;
}

    .action-bar.visible {
        transform: translateY(0);
        opacity: 1;
    }

.action-bar-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.selected-count {
    font-size: 13px;
    color: #374151;
}

.action-bar .actions {
    display: flex;
    gap: var(--px-8);
    width: 100%;
    flex-wrap: wrap;
    padding: var(--px-24);
    /*    justify-content: space-between;*/
    border-bottom-left-radius: var(--px-8);
    border-bottom-right-radius: var(--px-8);
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    position: sticky;
    bottom: 0;
    z-index: 10;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}

.nightAudit-detail-panel .popup-content .actions button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font: normal normal 500 var(--s-14);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    background: #f3f4f6;
    color: #374151;
}

.actions .btn_changeFolio, .actions .btn_Add {
    color: rgb(55 65 81 / 1);
}

.actions button {
    background: white;
    border: 1px solid rgba(243, 244, 246, 1);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background .25s, color .25s;
    padding: var(--px-20) var(--px-12);
    font: normal normal 500 var(--s-14);
    flex: 1;
}

    .actions button:hover {
        background: rgba(243, 244, 246, 1);
    }

.actions .btn_checkIn {
    background-color: var(--bs-main) !important;
    color: white !important;
}

    .actions .btn_checkIn:hover {
        background-color: var(--bs-main-600) !important;
    }

.actions .txt_change {
    color: rgb(55 65 81 / 1);
}

.actions .txt_noShow {
    color: rgb(202 138 4 / 1);
}

.actions .txt_cancel {
    color: rgb(220 38 38 / 1);
}

/* --- Navigation buttons --- */
.step-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px 24px;
    margin-top: 4px;
}

    .step-nav .page-back {
        background-color: rgb(229 231 235 / 1);
        color: rgb(107 114 128 / 1)
    }

        .step-nav .page-back.disabled {
            cursor: not-allowed;
        }

    .step-nav .total-item {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 16px;
        background: #f3f4f6;
        border-radius: 8px;
        font-size: 14px;
    }

    .step-nav .total-label {
        font-weight: 500;
        color: #6b7280;
    }

    .step-nav .total-value {
        font-weight: 700;
        color: #111827;
        min-width: 30px;
        text-align: center;
    }

.bav-btn {
    min-width: 96px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 500;
    background: #e5e7eb;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    transition: background .25s, color .25s;
}

    .bav-btn.active {
        background: var(--bs-main);
        color: #fff;
        border-color: var(--bs-main);
    }

    .bav-btn:hover {
    }

    .bav-btn:disabled,
    .bav-btn.disabled {
        opacity: .55;
        cursor: not-allowed;
    }

/* Checkbox unified styling */
.select-all-checkbox,
.ticket-check {
    appearance: none;
    width: 18px !important;
    height: 18px !important;
    border: 1.5px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: background .25s, border-color .25s;
    visibility: visible !important;
}

    .select-all-checkbox:checked,
    .ticket-check:checked {
        background: #7fad49;
        border-color: #7fad49;
    }

        .select-all-checkbox:checked::after,
        .ticket-check:checked::after {
            content: '';
            width: 10px;
            height: 6px;
            border-left: 2px solid #fff;
            border-bottom: 2px solid #fff;
            transform: rotate(-45deg);
            position: absolute;
            top: 4px;
            left: 4px;
        }

/* Generic animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 640px) {
    .action-bar-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .actions {
        width: 100%;
    }
}

/* Responsive styles */
@media (min-width: 640px) {
    .step-labels {
        display: flex;
    }

    .mobile-label {
        display: none;
    }

    .mobile-info {
        display: none;
    }
}

/* =========================================================
   STEP 3: Room Charges – Redesigned to match sample layout
   ========================================================= */

/* Root container for step 3 content */
.room-charges-step {
    width: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: visible;
}

    /* Outer grey summary card (header + dynamic controls + table) */
    .room-charges-step .rc-wrapper {
        background: #f9fafb;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        /* padding: 24px 24px 28px; */
        /* margin-bottom: 32px; */
        display: flex;
        flex-direction: column;
        min-height: 0;
        overflow: hidden;
    }

    /* Top header (title + auto post toggle) */
    .room-charges-step .rc-page-title {
        font-size: 22px;
        font-weight: 600;
        margin: 0 0 28px;
        color: #111827;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-shrink: 0;
    }

    .room-charges-step .rc-auto-toggle {
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 13px;
        color: #4b5563;
    }

    /* Toggle switch */
    .room-charges-step .toggle-switch {
        position: relative;
        width: 46px;
        height: 24px;
        display: inline-block;
    }

        .room-charges-step .toggle-switch input {
            display: none;
        }

    .room-charges-step .toggle-slider {
        position: absolute;
        inset: 0;
        background: #d1d5db;
        border-radius: 24px;
        cursor: pointer;
        transition: background .3s;
    }

        .room-charges-step .toggle-slider:before {
            content: "";
            position: absolute;
            top: 2px;
            left: 2px;
            width: 20px;
            height: 20px;
            background: #ffffff;
            border-radius: 50%;
            box-shadow: 0 1px 3px rgba(0,0,0,.25);
            transition: transform .3s;
        }

    .room-charges-step .toggle-switch input:checked + .toggle-slider {
        background: #7fad49;
    }

        .room-charges-step .toggle-switch input:checked + .toggle-slider:before {
            transform: translateX(22px);
        }

    .room-charges-step .toggle-switch input:disabled + .toggle-slider {
        opacity: .45;
        cursor: not-allowed;
    }

        .room-charges-step .toggle-switch input:disabled + .toggle-slider:before {
            box-shadow: none;
        }

    /* Summary header inside card (left: counts, right: actions) */
    .room-charges-step .rc-summary-bar {
        display: flex;
        flex-direction: column;
        gap: 14px;
        /* margin-bottom: 20px; */
        flex-shrink: 0;
        padding: 14px 16px;
    }

@media (min-width: 640px) {
    .room-charges-step .rc-summary-bar {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.room-charges-step .rc-summary-left h3 {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.room-charges-step .rc-summary-left p {
    margin: 0;
    font-size: 13px;
    color: #4b5563;
}

.room-charges-step .rc-summary-actions {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
}

/* Select All checkbox (custom) */
.room-charges-step .rc-select-all {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #4b5563;
    user-select: none;
}

.room-charges-step .rc-select-all-box {
    width: 20px;
    height: 20px;
    border: 1.5px solid #d1d5db;
    border-radius: 6px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .25s, border-color .25s;
    cursor: pointer;
    position: relative;
}

    .room-charges-step .rc-select-all-box.rc-checked,
    .room-charges-step .rc-select-all-box.rc-indeterminate {
        background: #7fad49;
        border-color: #7fad49;
    }

        .room-charges-step .rc-select-all-box.rc-checked::after {
            content: '';
            width: 10px;
            height: 6px;
            border-left: 2px solid #fff;
            border-bottom: 2px solid #fff;
            transform: rotate(-45deg);
            position: absolute;
            top: 5px;
            left: 4px;
            display: block;
        }

        .room-charges-step .rc-select-all-box.rc-indeterminate::after {
            content: '';
            width: 10px;
            height: 2px;
            background: #fff;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            display: block;
        }

    .room-charges-step .rc-select-all-box.checked svg {
            /*stroke: #ffffff;*/
    }

    .room-charges-step .rc-select-all-box::after {
        display: none;
    }

#rcPostSelectedBtn {
    background: #7fad49;
    color: #ffffff;
    border: 1px solid #7fad49;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background .25s, border-color .25s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

    #rcPostSelectedBtn:hover:not(:disabled) {
        background: #6a943f;
        border-color: #6a943f;
    }

    #rcPostSelectedBtn:disabled {
        opacity: .45;
        cursor: not-allowed;
        background: #d1d5db;
        border-color: #d1d5db;
    }

/* Primary button (aligns with sample) */
.btn-primary {
    background: #7fad49;
    color: #ffffff;
    border: 1px solid #7fad49;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background .25s, border-color .25s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

    .btn-primary:hover:not(:disabled) {
        background: #6a943f;
        border-color: #6a943f;
    }

    .btn-primary:disabled {
        opacity: .45;
        cursor: not-allowed;
    }

/* Processing inline indicator */
.room-charges-step .rc-processing {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #374151;
}

/* Table wrapper inside summary card (white box) */
.room-charges-step .rc-table-shell {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden auto;
    max-height: 400px;
    flex: 1;
    min-height: 0;
    position: relative;
}

    .room-charges-step .rc-table-shell::-webkit-scrollbar {
        width: 8px;
        height: 8px;
    }

    .room-charges-step .rc-table-shell::-webkit-scrollbar-track {
        background: #f3f4f6;
        border-radius: 4px;
    }

    .room-charges-step .rc-table-shell::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 4px;
    }

        .room-charges-step .rc-table-shell::-webkit-scrollbar-thumb:hover {
            background: #94a3b8;
        }

.room-charges-step table.rc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    table-layout: auto;
    min-width: 800px;
}

.room-charges-step .rc-table thead {
    background: #f3f4f6;
    position: sticky;
    top: 0;
    z-index: 10;
}

.room-charges-step .rc-table th {
    text-align: left;
    font-weight: 600;
    padding: 12px 16px;
    font-size: 11px;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: #6b7280;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
    background: #f3f4f6;
}

    .room-charges-step .rc-table th.sel-th {
        width: 42px;
        padding: 12px 8px;
    }

.room-charges-step .rc-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    color: #111827;
    background: #ffffff;
}

    .room-charges-step .rc-table td.sel-td {
        width: 42px;
        padding: 12px 8px;
    }

.room-charges-step .rc-table tr.charge-row.posted td {
    background: #f3fbf3;
}

.room-charges-step .rc-checkbox-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

    .room-charges-step .rc-checkbox-wrap input[type="checkbox"] {
        width: 18px !important;
        height: 18px !important;
        margin: 0;
        cursor: pointer;
        appearance: none;
        border: 1.5px solid #d1d5db;
        border-radius: 4px;
        background: #ffffff;
        position: relative;
        transition: background .25s, border-color .25s;
    }

        .room-charges-step .rc-checkbox-wrap input[type="checkbox"]:checked {
            background: #7fad49;
            border-color: #7fad49;
        }

            .room-charges-step .rc-checkbox-wrap input[type="checkbox"]:checked::after {
                content: '';
                width: 10px;
                height: 6px;
                border-left: 2px solid #fff;
                border-bottom: 2px solid #fff;
                transform: rotate(-45deg);
                position: absolute;
                top: 4px;
                left: 3px;
            }

        .room-charges-step .rc-checkbox-wrap input[type="checkbox"]:disabled {
            opacity: .5;
            cursor: not-allowed;
        }

    .room-charges-step .rc-checkbox-wrap .rc-checkbox-custom {
        display: none;
    }

/* Status badges */
.room-charges-step .rc-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: .3px;
}

.room-charges-step .rc-status-pending {
    background: #fef3c7;
    color: #92400e;
}

.room-charges-step .rc-status-posted {
    background: #dcfce7;
    color: #166534;
}

.room-charges-step .rc-table th:nth-child(5),
.room-charges-step .rc-table td:nth-child(5) {
    max-width: 120px;
    min-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Row checkbox */
.room-charges-step .rc-row-select {
    width: 20px;
    height: 20px;
    border: 1.5px solid #d1d5db;
    background: #ffffff;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .25s, border-color .25s;
}

    .room-charges-step .rc-row-select.checked {
        background: #7fad49;
        border-color: #7fad49;
    }

        .room-charges-step .rc-row-select.checked svg {
            stroke: #ffffff;
        }

/* Status pills */
.room-charges-step .status-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: .3px;
}

.room-charges-step .status-pending {
    background: #fef3c7;
    color: #92400e;
}

.room-charges-step .status-posted {
    background: #dcfce7;
    color: #166534;
}

/* Completion block (appears below summary card) */
.room-charges-step .rc-success-block {
    text-align: center;
    animation: fadeIn .35s ease;
    padding: 48px 24px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.room-charges-step .rc-success-icon {
    width: 64px;
    height: 64px;
    background: #f0fdf4;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.room-charges-step .rc-success-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 4px;
    color: #111827;
}

.room-charges-step .rc-success-sub {
    font-size: 14px;
    color: #4b5563;
    margin: 0;
}

/* Utility hidden class */
.room-charges-step .hidden {
    display: none !important;
}

/* Prevent Step 3 styles from leaking outward */
table:not(.rc-table) .status-pill,
table:not(.rc-table) .status-pending,
table:not(.rc-table) .status-posted {
    all: unset;
}

/* Keep existing global fadeIn keyframes (already defined above) */
/* Add at end (small additions for spinner + hidden utility if missing) */
.spin {
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.room-charges-step .hidden {
    display: none !important;
}

/* SUCCESS SCREEN (added) */
.success-screen {
    max-width: 1000px;
    min-width: 1000px;
    margin: 12px auto 0;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 48px 40px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
    animation: successFade .5s ease;
}

    .success-screen.hidden {
        display: none !important;
    }

    .success-screen.active {
        display: block;
    }

.success-icon {
    width: 96px;
    height: 96px;
    background: #f0fdf4;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    animation: popIn .5s cubic-bezier(.25,.8,.25,1);
}

.success-title {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 12px;
    animation: slideUp .45s ease .15s both;
}

.success-text {
    font-size: 16px;
    color: #4b5563;
    max-width: 560px;
    margin: 0 auto 32px;
    line-height: 1.5;
    animation: slideUp .45s ease .25s both;
}

.success-back-btn {
    animation: slideUp .45s ease .35s both;
}

@keyframes successFade {
    from {
        opacity: 0;
        transform: scale(.96);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes popIn {
    from {
        transform: scale(0);
    }

    to {
        transform: scale(1);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Allow hiding whole stage when success */
#stageContent.hidden {
    display: none !important;
}

.checkout-success {
    outline: 2px solid #10b981;
    background: #ecfdf5;
}

.checkout-error {
    outline: 2px solid #dc2626;
    background: #fef2f2;
}

/* detail popup */
.nightAudit-detail-panel {
    max-width: 700px;
    min-width: 700px;
}

    .nightAudit-detail-panel .popup-content {
        width: 100%;
        border-radius: var(--px-12);
        height: 100%;
    }

        .nightAudit-detail-panel .popup-content .ba-detail-panel {
            font: normal normal 400 var(--s-14);
            max-height: 90vh;
            height: 90vh;
            background: #fff;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        /* Header */
        .nightAudit-detail-panel .popup-content .ba-detail-header {
            padding: var(--px-20) var(--px-24) var(--px-16);
            border-bottom: 1px solid #e5e7eb;
            background: #fff;
            position: sticky;
            top: 0;
            z-index: 10;
        }

        .nightAudit-detail-panel .popup-content .ba-detail-title {
            font: normal normal 600 var(--s-16);
            color: var(--black);
            margin: 0 0 4px 0;
        }

        .nightAudit-detail-panel .popup-content .ba-detail-subtitle {
            font: normal normal 400 var(--s-13);
            color: #6b7280;
            margin: 0;
        }

        /* Content */
        .nightAudit-detail-panel .popup-content .ba-detail-content {
            padding: var(--px-20);
            background: #f9fafb;
            overflow-y: auto;
            overflow-x: hidden;
            min-height: 0;
        }

        /* Collapsible Sections */
        .nightAudit-detail-panel .popup-content .ba-collapsible-section {
            background: #fff;
            border: 1px solid #e5e7eb;
            border-radius: 8px;
            margin-bottom: 16px;
            overflow: hidden;
            border: 1px solid var(--bs-gray-300);
            border-bottom: 2px solid var(--bs-gray-300);
            border-radius: 0;
            background: white;
            padding: var(--px-20);
            grid-gap: var(--px-20) var(--px-16);
            border-radius: 6px;
            min-width: 100%;
            position: relative;
        }

        .nightAudit-detail-panel .popup-content .btn-toggle-booking {
            border-radius: 0;
            background: white;
            padding: 0;
            grid-gap: var(--px-20) var(--px-16);
            border-radius: 6px;
            min-width: 100%;
            position: relative;
        }

        .nightAudit-detail-panel .popup-content .ba-section-toggle,
        .nightAudit-detail-panel .popup-content .ba-section-toggle:active,
        .nightAudit-detail-panel .popup-content .ba-section-toggle:focus,
        .nightAudit-detail-panel .popup-content .ba-section-toggle:focus-visible {
            transform: none !important;
            transition: none !important;
            box-shadow: none !important;
            background: none !important;
            outline: none !important;
        }

        .nightAudit-detail-panel .popup-content .ba-section-toggle-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            width: 100%;
        }

        .nightAudit-detail-panel .popup-content .ba-section-toggle-title {
            font: normal normal 500 var(--s-16);
            color: var(--black);
            margin: 0;
            text-align: left;
        }

        .nightAudit-detail-panel .popup-content .ba-chevron {
            width: 20px;
            height: 20px;
            color: #6b7280;
            display: inline-block;
            transition: transform 0.3s;
        }

        .nightAudit-detail-panel .popup-content .ba-collapsible-section.expanded .ba-chevron {
            transform: rotate(180deg);
        }

        .nightAudit-detail-panel .popup-content .ba-section-toggle-content {
            max-height: 0;
            overflow: hidden;
            padding: 0 20px;
            transition: none;
        }

        .nightAudit-detail-panel .popup-content .ba-collapsible-section.expanded .ba-section-toggle-content {
            max-height: 2000px;
            padding: var(--px-12) 0;
            gap: var(--px-16);
            display: flex;
            flex-direction: column;
            transition: none;
        }

        /* Input Groups */
        .nightAudit-detail-panel .popup-content .ba-input-group {
            display: flex;
            flex-direction: column;
            gap: var(--px-12);
        }

            .nightAudit-detail-panel .popup-content .ba-input-group:last-child {
                margin-bottom: 0;
            }

        .nightAudit-detail-panel .popup-content .ba-input-label {
            display: block;
            font: normal normal 500 var(--s-14);
            color: #374151;
        }

            .nightAudit-detail-panel .popup-content .ba-input-label .required {
                color: #dc2626;
                margin-left: 2px;
            }

        .nightAudit-detail-panel .popup-content .ba-input-field {
            width: 100%;
            padding: var(--px-12) var(--px-16);
            border: 1px solid #d1d5db;
            border-radius: 6px;
            font: normal normal 400 var(--s-14);
            color: #111827;
            background: #fff;
            transition: border-color 0.2s, box-shadow 0.2s;
        }

            .nightAudit-detail-panel .popup-content .ba-input-field:focus {
                outline: none;
                border-color: #60a5fa;
                box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
            }

            .nightAudit-detail-panel .popup-content .ba-input-field:disabled,
            .nightAudit-detail-panel .popup-content .ba-input-field[readonly] {
                background: #f9fafb;
                color: #6b7280;
                cursor: not-allowed;
            }

            .nightAudit-detail-panel .popup-content .ba-input-field::placeholder {
                color: #9ca3af;
            }

        .nightAudit-detail-panel .popup-content .ba-textarea {
            min-height: 80px;
            resize: vertical;
        }

        /* Input Rows */
        .nightAudit-detail-panel .popup-content .ba-input-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: var(--px-16);
        }

        /* Select Wrapper */
        .nightAudit-detail-panel .popup-content .ba-select-wrapper {
            position: relative;
        }

            .nightAudit-detail-panel .popup-content .ba-select-wrapper::after {
                content: '';
                position: absolute;
                right: 14px;
                top: 50%;
                transform: translateY(-50%);
                width: 0;
                height: 0;
                border-left: 5px solid transparent;
                border-right: 5px solid transparent;
                border-top: 5px solid #6b7280;
                pointer-events: none;
            }

            .nightAudit-detail-panel .popup-content .ba-select-wrapper select {
                appearance: none;
                padding-right: 40px;
            }

        /* Badges */
        .nightAudit-detail-panel .popup-content .ba-badge-group {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }

        .nightAudit-detail-panel .popup-content .ba-badge {
            display: inline-flex;
            align-items: center;
            padding: 4px var(--px-12);
            border-radius: var(--px-12);
            font: normal normal 500 var(--s-14);
            text-transform: uppercase;
            letter-spacing: 0.3px;
        }

        .nightAudit-detail-panel .popup-content .ba-badge-warning {
            background: #fef3c7;
            color: #92400e;
        }

        .nightAudit-detail-panel .popup-content .ba-badge-info {
            background: #dbeafe;
            color: #1e40af;
        }

        /* Guest Card for Linked Guests */
        .nightAudit-detail-panel .popup-content .ba-guest-card {
            background: #f9fafb;
            border: 1px solid #e5e7eb;
            border-radius: 6px;
            padding: var(--px-12);
            margin-bottom: var(--px-12);
            gap: var(--px-12);
            display: flex;
            flex-direction: column;
        }

            .nightAudit-detail-panel .popup-content .ba-guest-card:last-child {
                margin-bottom: 0;
            }

        /* Scrollbar */
        .nightAudit-detail-panel .popup-content .ba-detail-panel::-webkit-scrollbar {
            width: 6px;
        }

        .nightAudit-detail-panel .popup-content .ba-detail-panel::-webkit-scrollbar-track {
            background: #f1f1f1;
        }

        .nightAudit-detail-panel .popup-content .ba-detail-panel::-webkit-scrollbar-thumb {
            background: #c1c1c1;
            border-radius: 3px;
        }

            .nightAudit-detail-panel .popup-content .ba-detail-panel::-webkit-scrollbar-thumb:hover {
                background: #a8a8a8;
            }

.rc-row-checkbox {
    width: 16px !important;
    height: 16px !important;
    visibility: visible !important;
}

.hidden {
    display: none !important;
}

/* Add processing state for auto post */
.room-charges-step .rc-table tr.rc-row-processing td {
    background: #fef3c7;
    animation: pulseProcessing 1s ease-in-out infinite;
}

@keyframes pulseProcessing {
    0%, 100% {
        background: #fef3c7;
    }

    50% {
        background: #fde68a;
    }
}

/* Smooth transition for row state changes */
.room-charges-step .rc-table tbody tr {
    transition: background-color 0.3s ease;
}

.room-charges-step .rc-table tr.rc-row-error td {
    background: #fee2e2;
    border-left: 3px solid #dc2626;
}

.room-charges-step .rc-table tr.rc-row-processing td {
    background: #fef3c7;
    animation: pulseProcessing 1s ease-in-out infinite;
}

@keyframes pulseProcessing {
    0%, 100% {
        background: #fef3c7;
    }

    50% {
        background: #fde68a;
    }
}

.as-log {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.as-log-icon {
    flex-shrink: 0;
}

.as-log-meta {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}

.as-logs-list {
    /*    max-height: 400px;
    overflow-y: auto;*/
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f3f4f6;
}

    .as-logs-list::-webkit-scrollbar {
        width: 8px;
    }

    .as-logs-list::-webkit-scrollbar-track {
        background: #f3f4f6;
        border-radius: 4px;
    }

    .as-logs-list::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 4px;
    }

        .as-logs-list::-webkit-scrollbar-thumb:hover {
            background: #94a3b8;
        }

.as-logs-empty {
    text-align: center;
    padding: 40px;
    color: #9ca3af;
}

#asRunBtn.completed {
    background-color: #10b981; /* Green */
    border-color: #10b981;
}

    #asRunBtn.completed:hover {
        background-color: #059669;
        border-color: #059669;
    }

#asRunBtn.has-errors {
    background-color: #f59e0b; /* Orange/Warning */
    border-color: #f59e0b;
}

    #asRunBtn.has-errors:hover {
        background-color: #d97706;
        border-color: #d97706;
    }

/* Error Grid Styles */
.as-error-grid {
    margin-top: 8px;
    overflow-x: auto;
    border-radius: 6px;
    border: 1px solid #fee;
    background: #fff5f5;
}

.as-error-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

    .as-error-table thead {
        background: #fecaca;
    }

    .as-error-table th {
        padding: 8px 12px;
        text-align: left;
        font-weight: 600;
        color: #991b1b;
        border-bottom: 2px solid #fca5a5;
        white-space: nowrap;
    }

    .as-error-table td {
        padding: 8px 12px;
        border-bottom: 1px solid #fee2e2;
        color: #7f1d1d;
    }

        .as-error-table td:nth-child(4), .as-error-table td:nth-child(5) {
            font: normal normal 500 var(--s-11);
        }

    .as-error-table tbody tr:last-child td {
        border-bottom: none;
    }

    .as-error-table tbody tr:hover {
        background: #fef2f2;
    }

.as-error-data {
    margin-top: 8px;
    padding: 8px 12px;
    background: #fff5f5;
    border: 1px solid #fee;
    border-radius: 4px;
    font-size: 12px;
    color: #991b1b;
}

.as-log-content {
    flex: 1;
    overflow: hidden;
}