/* ======================================================
   LOCK PAGE SCROLL — only .table-scroll scrolls
   ====================================================== */

html,
body {
    height: 100vh;
    height: 100dvh;
    margin: 0;
    overflow: hidden;
}

body {
    display: flex;
    flex-direction: column;
}

h1 {
    flex: none;
    margin: 12px 16px 8px;
}

#addReservationPanel {
    flex: none;
    margin: 0 16px;
}

/* ======================================================
   SHARED PAGE TABS (dipakai di semua list page)
   ====================================================== */

.rack-tabs {
    display: flex;
    gap: 3px;
    padding: 0 4px;
    margin: 0 24px;
    flex: none;
}

.rack-tab {
    padding: 6px 14px;
    font-size: 12px;
    border-radius: 8px 8px 0 0;
    background: #eceff1;
    color: #78848c;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid #dde2e5;
    border-bottom: none;
}

.rack-tab:hover {
    background: #e2e7ea;
    color: #444;
}

.rack-tab.active {
    background: #fff;
    color: #222;
    font-weight: 600;
    border-color: #ccc;
    position: relative;
    top: 1px;
    z-index: 2;
    padding-bottom: 7px;
}

@media (max-width: 700px) {
    .rack-tabs { margin: 0 8px; }
}
@media (max-width: 420px) {
    .rack-tabs { margin: 0 4px; }
}

/* ======================================================
   GLOBAL & CONTAINER STYLES
   ====================================================== */

.table-container {
    flex: 1 1 auto;
    min-height: 0;
    width: auto;
    box-sizing: border-box;

    display: flex;
    flex-direction: column;

    margin: 0 24px 8px;
    position: relative;
    z-index: 1;
}

#toolbar {
    flex: none;
    margin-bottom: 12px;
}

.table-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}


/* ======================================================
   CARD STYLE
   ====================================================== */

.detail-card {
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 12px 16px;
    background-color: #fff;
    box-sizing: border-box;
}


/* ======================================================
   RESERVATION HEADER (Kiri - Tengah - Kanan)
   ====================================================== */

.reservation-header {
    display: grid;
    /* Ubah grid-template-columns agar bagian kiri dan kanan seimbang (1fr), 
       sehingga bagian tengah (auto) berada pas di tengah-tengah */
    grid-template-columns: 1fr auto 1fr; 
    align-items: center;

    border-bottom: 1px solid #ddd;
    margin-bottom: 12px;
    padding-bottom: 6px;
}

/* Kiri: rata kiri */
.header-title {
    min-width: 0;
    text-align: left;
}

.header-title h3 {
    margin: 0;
    border: none;
    padding: 0;
}

/* Tengah: pas di tengah */
.header-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}

/* Kanan: rata kanan */
.header-clock {
    display: flex;
    align-items: center;
    justify-content: flex-end; /* Memastikan posisi rapat ke pojok kanan */
    margin-left: 0;           /* Hapus margin-left sebelumnya */
}


/* ======================================================
   STYLING TABEL APLIKASI
   ====================================================== */

.table-container table {
    width: 100%;
    border-collapse: collapse;
    border: none;
    margin-top: 8px;
}


/* ======================================================
   STICKY TABLE HEADER
   ====================================================== */

.table-container thead th {
    position: sticky;
    top: 0;
    z-index: 1;
}


/* ======================================================
   HEADER KOLOM TABEL
   ====================================================== */

.table-container th {
    text-align: left;
    padding: 10px 8px;

    background-color: #fafafa;

    border-bottom: 1px solid #ddd;

    color: #444;

    font-size: 13px;
    font-weight: 600;
}


/* ======================================================
   CELL / ISI DATA TABEL
   ====================================================== */

.table-container td {
    padding: 10px 8px;

    border-bottom: 1px solid #eee;

    font-size: 14px;
}

.table-container tr:last-child td {
    border-bottom: none;
}


/* ======================================================
   TABLE HOVER
   ====================================================== */

#reservationTable tr {
    cursor: pointer;
}

#reservationTable tr:hover {
    background-color: #f5f5f5;
}


/* ======================================================
   DETAIL GRID — base layout (layar normal, ~701–1399px)

   Folio card (billing1) SEKARANG cuma menempati 1 baris grid
   (sama seperti card lain), bukan span 3 baris lagi -> tinggi
   defaultnya otomatis mengikuti tinggi baris pertama (guest/
   stay), konsisten dengan card lain. Baru saat folio-mode
   di-toggle (tombol ←/→) card billing melebar jadi tinggi
   penuh (lihat blok .folio-mode di bawah).
   ====================================================== */

.detail-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: 0.9fr 0.9fr 1.25fr;
    grid-template-areas:
        "guest      stay       billing1"
        "secondary  amenities  billing1"
        "remarks    rate       billing1";
}

.card-guest      { grid-area: guest; }
.card-stay       { grid-area: stay; }
.card-secondary  { grid-area: secondary; }
.card-amenities  { grid-area: amenities; }
.card-remarks    { grid-area: remarks; }
.card-rate       { grid-area: rate; }

.card-billing1   { grid-area: billing1; }
.card-billing2   { grid-area: billing2; }
.card-billing3   { grid-area: billing3; }

/* Fix grid item overflow: tanpa min-width:0, grid item defaultnya
   min-width:auto -> kalau isinya lebar (mis. .folio-table yang
   width:max-content), track kolomnya ikut melar dan bikin lebar
   card billing1/2/3 beda-beda / gak konsisten dgn card lain saat
   resize. Dengan min-width:0, card dipaksa ikut lebar kolom grid
   (1fr) dan kelebihan konten discroll sendiri oleh .folio-table-scroll. */
.card-billing1,
.card-billing2,
.card-billing3 {
    min-width: 0;
}

.detail-grid .card-billing2,
.detail-grid .card-billing3 {
    display: none;
}

.detail-card-tall {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.billing-placeholder {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 13px;
}


/* ======================================================
   FOLIO MODE — toggle di layar normal (tombol ←/→)
   billing1 pindah ke kolom 1, billing2 & billing3 muncul,
   dan ketiganya sengaja dibuat TINGGI (span 3 baris) karena
   ini mode "fokus billing" yang memang diminta user secara
   eksplisit lewat toggle.
   ====================================================== */

.detail-grid.folio-mode {
    grid-template-columns: repeat(3, 1fr);
    grid-template-areas:
        "billing1 billing2 billing3"
        "billing1 billing2 billing3"
        "billing1 billing2 billing3";
}

.folio-mode .card-guest,
.folio-mode .card-stay,
.folio-mode .card-secondary,
.folio-mode .card-amenities,
.folio-mode .card-remarks,
.folio-mode .card-rate {
    display: none;
}

.folio-mode .card-billing2,
.folio-mode .card-billing3 {
    display: flex;
}

.detail-card h3 {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.folio-toggle-btn {
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    padding: 2px 8px;
    line-height: 1;
}

.folio-toggle-btn:hover { background: #f0f0f0; }

/* default: hanya tombol buka (←) di billing1 yang tampak */
.folio-toggle-btn { display: none; }
.card-billing1 .folio-toggle-btn { display: inline-block; }

/* saat folio-mode aktif: tombol tutup (→) di billing3 muncul,
   tombol buka di billing1 disembunyikan */
.folio-mode .card-billing3 .folio-toggle-btn { display: inline-block; }
.folio-mode .card-billing1 .folio-toggle-btn { display: none; }


/* ======================================================
   LAYAR BESAR (≥1400px) — billing2 otomatis tampil
   di baris pertama juga (tinggi tetap konsisten dgn card lain,
   TIDAK auto-tall lagi; kalau mau tampilan tinggi penuh tetap
   pakai toggle folio-mode).
   ====================================================== */

@media (min-width: 1400px) {

    .detail-grid {
        grid-template-columns: repeat(4, 1fr);
        grid-template-areas:
            "guest      stay       billing1  billing2"
            "secondary  amenities  .         ."
            "remarks    rate       .         .";
    }

    .detail-grid .card-billing2 { display: flex; }

    /* di sini sudah otomatis, toggle nggak diperlukan */
    .folio-toggle-btn { display: none !important; }

}


/* ======================================================
   LAYAR EXTRA BESAR (≥1700px) — billing3 ikut tampil
   ====================================================== */

@media (min-width: 1700px) {

    .detail-grid {
        grid-template-columns: repeat(5, 1fr);
        grid-template-areas:
            "guest      stay       billing1  billing2  billing3"
            "secondary  amenities  .         .         ."
            "remarks    rate       .         .         .";
    }

    .detail-grid .card-billing3 { display: flex; }

}

/* ======================================================
   LAYAR KECIL (≤700px) — 1 kolom, billing paling bawah
   ====================================================== */

@media (max-width: 700px) {

    .detail-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "guest"
            "stay"
            "secondary"
            "amenities"
            "remarks"
            "rate"
            "billing1";
    }

    .card-billing2,
    .card-billing3 {
        display: none;
    }

    .folio-toggle-btn { display: none !important; }

    #folioBtn { display: inline-block; }

}

/* tombol Folio di toolbar bawah: default disembunyikan,
   hanya tampak di layar kecil (lihat media query di atas) */
#folioBtn { display: none; }

/* ======================================================
   DETAIL TOPBAR ACTIONS
   ====================================================== */

.topbar-actions {
    margin-left: auto;

    display: flex;
    gap: 6px;
}


.icon-btn {
    background: #fff;

    border: 1px solid #ccc;
    border-radius: 4px;

    cursor: pointer;

    padding: 4px 10px;

    font-size: 14px;
}


.icon-btn:hover {
    background: #f0f0f0;
}


.icon-btn-confirm {
    border-color: #2e7d32;
    color: #2e7d32;
}


/* ======================================================
   DETAIL EDIT INPUT
   ====================================================== */

.detail-card .value input,
.detail-card .value textarea {

    width: 100%;

    font: inherit;
    font-weight: 600;

    border: 1px solid #999;
    border-radius: 4px;

    padding: 4px 6px;

    box-sizing: border-box;

    background: #fffef2;
}


.detail-card .value textarea {

    min-height: 80px;

    resize: vertical;

}


.field-locked {
    opacity: 0.6;
}


/* ======================================================
   BOTTOM STATUS BAR
   ====================================================== */

#statusBar {

    flex: none;

    display: flex;
    align-items: center;

    height: 40px;

    border-top: 1px solid #ccc;

    background: #f5f5f5;

    font-size: 13px;
    color: #333;

}


#statusBar > div {

    padding: 0 12px;

    white-space: nowrap;

}


#statusBar > div + div {

    border-left: 1px solid #ddd;

}

#paginationInfo + #paginationNav {
    border-left: none;
    padding-left: 4px;
}


/* ======================================================
   USER AREA
   ====================================================== */

#userArea {

    cursor: pointer;

    flex: none;

}


#userArea:hover {
    background: #eaeaea;
}


/* ======================================================
   CONTEXT AREA
   ====================================================== */

#contextArea {

    flex: 1 1 auto;

    overflow: hidden;

    text-overflow: ellipsis;

    display: flex;
    align-items: center;

    gap: 8px;

}


/* ======================================================
   PAGINATION INFO
   ====================================================== */

#paginationInfo {
    flex: none;
    cursor: pointer;
    position: relative;
    margin-left: auto;
    padding-right: 4px;
}


/* ======================================================
   PAGINATION NAV
   ====================================================== */

#paginationNav {

    flex: none;

    display: flex;

    align-items: center;

    gap: 4px;

}


#paginationNav button {

    border: 1px solid #ccc;

    background: #fff;

    border-radius: 3px;

    padding: 2px 8px;

    cursor: pointer;

    font-size: 12px;

}


#paginationNav button:disabled {

    opacity: 0.4;

    cursor: default;

}


#paginationNav button.active-page {

    background: #333;

    color: #fff;

    border-color: #333;

}


/* ======================================================
   ROWS PER PAGE
   ====================================================== */

.rows-per-page-popover {

    display: flex;

    align-items: center;

    gap: 6px;

}


.rows-per-page-popover button,
.rows-per-page-popover input {

    border: 1px solid #ccc;

    border-radius: 3px;

    padding: 2px 6px;

    font-size: 12px;

    cursor: pointer;

}


.rows-per-page-popover input {

    width: 50px;

    cursor: text;

}


/* ======================================================
   STATUS MESSAGE
   ====================================================== */

.status-msg-success {
    color: #2e7d32;
}

.status-msg-error {
    color: #c62828;
}

.status-msg-info {
    color: #555;
}


/* ======================================================
   CONFIRM MESSAGE
   ====================================================== */

.status-confirm {

    color: #e65100;

    display: flex;

    align-items: center;

    gap: 8px;

}


.status-confirm button,
.logout-confirm button,
.login-form button {

    border: 1px solid #ccc;

    border-radius: 3px;

    padding: 2px 10px;

    cursor: pointer;

    background: #fff;

    font-size: 12px;

}


/* ======================================================
   LOGOUT
   ====================================================== */

.logout-confirm {

    display: flex;

    align-items: center;

    gap: 8px;

}


/* ======================================================
   LOGIN
   ====================================================== */

.login-form {

    display: flex;

    align-items: center;

    gap: 6px;

}


.login-form input {

    border: 1px solid #ccc;

    border-radius: 3px;

    padding: 2px 6px;

    font-size: 12px;

    width: 110px;

}


/* ======================================================
   MOBILE / SMALL SCREEN
   ====================================================== */

@media (max-width: 700px) {

    /*
       Desktop:
       
       Reservation List | Menu | Date


       Mobile:

       Reservation List
       Menu
       Date
    */

    .reservation-header {

        display: flex;

        flex-direction: column;

        align-items: stretch;

        gap: 10px;

    }


    /* --------------------------------------------------
       Reservation List
       -------------------------------------------------- */

    .header-title {

        width: 100%;

        text-align: left;

    }


    /* --------------------------------------------------
       Menu
       -------------------------------------------------- */

    .header-menu {

        width: 100%;

        justify-content: flex-start;

        flex-wrap: wrap;

    }


    /* --------------------------------------------------
       Date
       -------------------------------------------------- */

    .header-date {

        width: 100%;

        justify-content: flex-start;

    }


    #currentDate {

        width: 100%;

        box-sizing: border-box;

    }


    #clock {

        display: none;

    }


    /* --------------------------------------------------
       Table container
       -------------------------------------------------- */

    .table-container {

        margin-left: 8px;
        margin-right: 8px;

        padding-left: 10px;
        padding-right: 10px;

    }


    /* --------------------------------------------------
       Bottom status bar
       -------------------------------------------------- */

    #statusBar {

        overflow-x: auto;

    }

}


/* ======================================================
   VERY SMALL SCREEN
   ====================================================== */

@media (max-width: 420px) {

    .header-menu {

        display: grid;

        grid-template-columns: auto 1fr;

        gap: 6px;

    }


    .header-menu select {

        min-width: 0;

        width: 100%;

    }


    .header-menu button {

        min-width: 32px;

    }


    .table-container {

        margin-left: 4px;
        margin-right: 4px;

        padding-left: 8px;
        padding-right: 8px;

    }

}

.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    background: #eee;
    color: #555;
}

.status-available    { background: #e8f5e9; color: #2e7d32; }
.status-clean         { background: #e8f5e9; color: #2e7d32; }
.status-dirty          { background: #fff3e0; color: #e65100; }
.status-inspected     { background: #e3f2fd; color: #1565c0; }
.status-out_of_service{ background: #fce4ec; color: #ad1457; }
.status-blocked        { background: #eeeeee; color: #424242; }

/* ======================================================
   DETAIL PAGE — SCROLLABLE GRID (only this scrolls)
   ====================================================== */

/* ======================================================
   DETAIL PAGE — SCROLLABLE GRID
   ====================================================== */

.detail-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

.detail-grid {
    height: auto;
    grid-auto-rows: auto;
}


/* ======================================================
   DETAIL CARD CONTENT SPACING
   ====================================================== */

.detail-card {
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 10px 14px;
    background-color: #fff;
    box-sizing: border-box;
}

.detail-card h3 {
    margin: 0 0 10px 0;
}

.detail-card label {
    display: block;

    font-size: 12px;
    color: #777;

    margin-top: 5px;
    margin-bottom: 1px;
}

.detail-card .value {
    font-weight: 600;
    margin-bottom: 2px;
    line-height: 1.15;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 2px;
}


/* ======================================================
   TOOLBAR SPACING (applies to all pages using #toolbar)
   ====================================================== */

#normalToolbar,
#selectionToolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.toolbar-divider {
    width: 1px;
    height: 20px;
    background: #ddd;
}


/* ======================================================
   RESERVATION STATUS BADGE (header, replaces old edit btn)
   ====================================================== */
.status-pending {
    background: #fff8e1;
    color: #f57f17;
}

.status-confirmed {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-checked_in {
    background: #e3f2fd;
    color: #1565c0;
}

.status-checked_out {
    background: #eeeeee;
    color: #616161;
}

.status-cancelled {
    background: #ffebee;
    color: #c62828;
}

.status-no_show {
    background: #f3e5f5;
    color: #6a1b9a;
}

/* ======================================================
   DYNAMIC TABLE — horizontal scroll + resizable columns
   ====================================================== */

.table-scroll {
    overflow-x: auto;
}

.table-container table {
    table-layout: fixed;
    width: max-content;
    min-width: 100%;
}

.table-container th,
.table-container td {
    white-space: nowrap;
}

.resizable-th {
    position: relative;
    padding-right: 14px;
}

.cell-text-wrap {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    vertical-align: bottom;
    white-space: nowrap;
}
.cell-text-wrap.cell-fade {
    -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
    mask-image: linear-gradient(to right, black 85%, transparent 100%);
}
.cell-text-wrap.cell-fade-both {
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}
.cell-text-inner {
    display: inline-block;
    white-space: nowrap;
    transition-property: transform;
}

.col-header-label-wrap {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    vertical-align: bottom;
    white-space: nowrap;
}
.col-header-label-wrap.col-label-fade {
    -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
    mask-image: linear-gradient(to right, black 85%, transparent 100%);
}
.col-header-label-wrap.col-label-fade-both {
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}
.col-header-label {
    display: inline-block;
    white-space: nowrap;
    transition-property: transform;
}

.col-resize-handle {
    position: absolute;
    top: 0;
    right: 0;
    width: 6px;
    height: 100%;
    cursor: col-resize;
    user-select: none;
    touch-action: none;
}

.col-resizing,
.col-resizing * {
    user-select: none !important;
    cursor: col-resize !important;
}

.col-resize-handle:hover {
    background: rgba(0, 0, 0, 0.15);
}


/* ======================================================
   MODIFY TABLE POPUP
   ====================================================== */

.table-container {
    position: relative;
}

.modify-table-popup {
    position: absolute;
    top: 54px;
    left: 24px;
    z-index: 50;
    width: 420px;
    max-width: 90vw;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
    padding: 14px 16px;
}

.modify-popup-section {
    margin-bottom: 12px;
}

.modify-popup-section label {
    display: block;
    font-size: 12px;
    color: #777;
    margin-bottom: 4px;
}

.modify-preset-row {
    display: flex;
    gap: 6px;
}

.modify-preset-row input {
    flex: 1;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 13px;
}

.modify-preset-row button {
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
}

.modify-preset-row button:hover {
    background: #f0f0f0;
}

.modify-preset-existing {
    margin-top: 8px;
}

.modify-preset-existing select {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 4px 6px;
    font-size: 13px;
}

.modify-popup-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.modify-popup-list-col label {
    display: block;
    font-size: 12px;
    color: #777;
    margin-bottom: 4px;
}

.column-list {
    list-style: none;
    margin: 0;
    padding: 4px;
    border: 1px solid #ddd;
    border-radius: 6px;
    min-height: 180px;
    max-height: 260px;
    overflow-y: auto;
    background: #fafafa;
}

.column-list-item {
    padding: 6px 8px;
    margin-bottom: 4px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    cursor: grab;
    user-select: none;
}

.column-list-item:hover {
    background: #f0f7ff;
    border-color: #90caf9;
}

.column-list-item.dragging {
    opacity: 0.4;
}

.column-list-item.drop-before {
    border-top: 2px solid #1565c0;
}

.column-list-item.drop-after {
    border-bottom: 2px solid #1565c0;
}

.modify-popup-footer {
    margin-top: 12px;
    text-align: right;
}

.modify-popup-footer button {
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 4px;
    padding: 4px 12px;
    font-size: 12px;
    cursor: pointer;
}

.modify-popup-footer button:hover {
    background: #f0f0f0;
}


/* ======================================================
   BULK EDIT POPOVER (dari tombol "Edit Field" di
   #selectionToolbar)
   ====================================================== */

.bulk-edit-popover {
    position: absolute;
    top: 90px;
    left: 24px;
    z-index: 50;
    width: 280px;
    max-width: 90vw;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
    padding: 14px 16px;
}

.bulk-edit-popover label {
    display: block;
    font-size: 12px;
    color: #777;
    margin-bottom: 4px;
    margin-top: 10px;
}

.bulk-edit-popover label:first-child {
    margin-top: 0;
}

.bulk-edit-popover select,
.bulk-edit-popover input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 5px 8px;
    font-size: 13px;
}

.bulk-edit-popover-footer {
    margin-top: 14px;
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

.bulk-edit-popover-footer button {
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 4px;
    padding: 4px 12px;
    font-size: 12px;
    cursor: pointer;
}

.bulk-edit-popover-footer button:hover {
    background: #f0f0f0;
}

.bulk-edit-popover-footer button:last-child {
    border-color: #1565c0;
    color: #1565c0;
}

/* ======================================================
   AUTH LOCKED STATE (tombol perlu login / role tertentu)
   ====================================================== */

.auth-locked {
    opacity: 0.45;
    cursor: not-allowed;
    position: relative;
}

.auth-locked::after {
    content: "🔒";
    position: absolute;
    top: -6px;
    right: -6px;
    font-size: 10px;
    line-height: 1;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 50%;
    padding: 1px 2px;
}

.page-header-bar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.page-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 16px;
}

.page-header-right {
    flex: none;
    display: flex;
    align-items: center;
    gap: 10px;
}
.page-gear-btn {
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; font-size: 15px; color: #666;
    text-decoration: none; cursor: pointer;
}
.page-gear-btn:hover { background: #eee; color: #222; }
.page-header-clock {
    font-size: 13px; color: #444; font-variant-numeric: tabular-nums;
    white-space: nowrap; display: flex; gap: 6px;
}
.page-greeting { font-size: 18px; font-weight: 600; color: #222; }

/* ======================================================
   CSS untuk table header features (resize, drag, sort, label fade)
   Tambahkan ke reservationPage.css atau style.css
   ====================================================== */

/* ---- Header cell ---- */
.resizable-th {
    position: relative;
    user-select: none;
    white-space: nowrap;
    overflow: hidden;
    padding: 8px 10px;
    font-weight: 600;
    font-size: 12.5px;
    color: #444;
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
    cursor: default;
}

/* ---- Label wrap (viewport untuk marquee) ---- */
.col-header-label-wrap {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    vertical-align: bottom;
    cursor: grab;
}

.col-header-label {
    display: inline-block;
    white-space: nowrap;
    transition: transform 0.3s ease;
}

/* Sortable indicator */
.col-header-sortable {
    cursor: pointer;
}
.col-header-sortable:hover {
    color: #1565c0;
}

.col-sort-indicator {
    font-size: 10px;
    color: #1565c0;
    margin-left: 4px;
}

/* ---- Fade effect untuk label panjang ---- */
.col-label-fade {
    -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
    mask-image: linear-gradient(to right, black 85%, transparent 100%);
}

.col-label-fade-both {
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

/* ---- Resize handle ---- */
.col-resize-handle {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    cursor: col-resize;
    z-index: 2;
    background: transparent;
}

.col-resize-handle:hover,
.col-resizing .col-resize-handle {
    background: rgba(21, 101, 192, 0.25);
}

body.col-resizing {
    cursor: col-resize;
    user-select: none;
}

body.col-resizing * {
    user-select: none;
}

/* ---- Drag & drop indicator ---- */
.col-dragging {
    opacity: 0.4;
}

.col-drop-before {
    border-left: 2px solid #1565c0;
}

.col-drop-after {
    border-right: 2px solid #1565c0;
}

/* ---- Cell text wrap (running text) ---- */
.cell-text-wrap {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    vertical-align: bottom;
}

.cell-text-inner {
    display: inline-block;
    white-space: nowrap;
    transition: transform 0.3s ease;
}

.cell-fade {
    -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
    mask-image: linear-gradient(to right, black 85%, transparent 100%);
}

.cell-fade-both {
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

/* ---- Status badge ---- */
.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.status-confirmed { background: #e3f2fd; color: #1565c0; }
.status-checked_in { background: #e8f5e9; color: #2e7d32; }
.status-checked_out { background: #f3e5f5; color: #7b1fa2; }
.status-cancelled { background: #ffebee; color: #c62828; }
.status-tentative { background: #fff3e0; color: #ef6c00; }
.status-no_show { background: #eceff1; color: #546e7a; }
.status-pending { background: #fff8e1; color: #f9a825; }

/* ---- Modify Table Popup ---- */
#modifyTablePopup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    padding: 20px;
    z-index: 100;
    min-width: 400px;
    max-width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    display: none;
}

.column-list-item {
    padding: 8px 12px;
    margin: 2px 0;
    background: #f5f5f5;
    border-radius: 6px;
    cursor: pointer;
    list-style: none;
    font-size: 13px;
    transition: background 0.15s;
}

.column-list-item:hover {
    background: #e3f2fd;
}

.column-list-item.dragging {
    opacity: 0.5;
}

.column-list-item.drop-before {
    border-top: 2px solid #1565c0;
}

.column-list-item.drop-after {
    border-bottom: 2px solid #1565c0;
}

#columnShowingList,
#columnHidingList {
    min-height: 120px;
    padding: 8px;
    border: 1px dashed #ccc;
    border-radius: 8px;
    margin: 8px 0;
}

/* ---- avatar login bubble (popup, klik avatar di PageHeader) ---- */

.auth-bubble {
    position: fixed;
    z-index: 150;
    width: 280px;
    max-width: 92vw;
}

.auth-bubble-card {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 10px;
    box-shadow: 0 8px 28px rgba(0,0,0,.18);
    padding: 14px 16px;
    box-sizing: border-box;
    animation: authBubbleIn .15s ease-out;
}

.auth-bubble-card h3 { margin: 0 0 8px; font-size: 14px; text-align: center; }
.auth-bubble-role { text-align: center; font-size: 11px; color: #888; margin: -4px 0 10px; }

.auth-bubble-card label {
    display: block;
    font-size: 12px;
    color: #777;
    margin-top: 10px;
    margin-bottom: 4px;
}

.auth-bubble-card input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 6px 8px;
    font-size: 13px;
}

.auth-pass-row { display: flex; gap: 6px; }
.auth-pass-row input { flex: 1 1 auto; }

.auth-eye {
    flex: none;
    width: 34px;
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
}
.auth-eye:hover { background: #f0f0f0; }

.auth-check { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #444; }
.auth-check input { width: auto !important; }

.auth-actions-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
}

.auth-actions-row button.primary {
    border: 1px solid #1565c0;
    background: #1565c0;
    color: #fff;
    border-radius: 4px;
    padding: 6px 16px;
    cursor: pointer;
    font-size: 13px;
}
.auth-actions-row button.primary:hover { background: #0d47a1; }

.auth-error {
    margin-top: 10px;
    padding: 6px 10px;
    border-radius: 4px;
    background: #ffebee;
    color: #c62828;
    font-size: 12.5px;
}

.auth-hint { margin: 10px 0 0; font-size: 11.5px; color: #888; text-align: center; }
.auth-hint a { color: #1565c0; }

.auth-forgot-row { display: flex; gap: 6px; margin-top: 4px; }
.auth-forgot-row input { flex: 1 1 auto; }
.auth-forgot-row button {
    border: 1px solid #1565c0;
    background: #1565c0;
    color: #fff;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 12.5px;
}

@keyframes authBubbleIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: none; }
}

.phadd-bubble {
    position: fixed;
    z-index: 150;
    width: 240px;
}

.phadd-bubble-card {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 10px;
    box-shadow: 0 8px 28px rgba(0,0,0,.18);
    padding: 6px;
    box-sizing: border-box;
    animation: authBubbleIn .15s ease-out;
}

.phadd-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
}
.phadd-item:hover { background: #f2f3f5; }
.phadd-item svg { width: 15px; height: 15px; flex: none; color: #666; }

/* ======================================================
   statusBar v2 — login dicabut, context kiri, jam+logo kanan.
   Trik: #paginationInfo udah margin-left:auto dari dulu, jadi
   spacer flexible-nya GRATIS begitu #contextArea berhenti
   nge-stretch (flex:0 1 auto).
   ====================================================== */

#userArea {
    display: none !important;
}

#contextArea {
    flex: 0 1 auto;
    border-left: none !important;
}

#paginationInfo {
    margin-left: auto;
    cursor: default;
}

#paginationNav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sb-clock {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    color: #444;
}

.sb-logo {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    color: #1565c0;
    white-space: nowrap;
}

.sb-logo img {
    height: 20px;
    width: auto;
    display: block;
}

/* ======================================================
   statusBar v2 — sembunyiin login, geser context ke kiri,
   sisanya kepake buat jam + logo (lihat js masing-masing
   halaman: reservationUI.js/logsUI.js/roomManagementUI.js/
   reservationDetail.js — masing-masing punya renderPaginationBar
   atau setara yang di-patch buat ngisi ini).
   ====================================================== */

#userArea {
    display: none !important;
}

#contextArea {
    flex: 0 1 auto;
    border-left: none !important;
}

#paginationInfo {
    margin-left: auto;
    cursor: default;
}

#paginationNav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sb-clock {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    color: #444;
}

.sb-logo {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    color: #1565c0;
    white-space: nowrap;
}

.sb-logo img {
    height: 20px;
    width: auto;
    display: block;
}