:root {
    --bg: #f4f7fb;
    --surface: #ffffff;
    --surface-strong: #f7f9fc;
    --text: #232a36;
    --muted: #6e7a8a;
    --primary: #4f46e5;
    --primary-soft: #eef2ff;
    --success: #16a34a;
    --danger: #dc2626;
    --border: #e5e7eb;
    --shadow: 0 15px 45px rgba(15, 23, 42, 0.08);
    --pos-cart-width: 520px;
}

* {
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    min-height: 100%;
}

/* Standalone POS header and shell */
.standalone-pos {
    background-image: url('../img/pos-bg-pattern.png');
    background-size: 400px 400px;
    background-position: 0 0;
    background-attachment: fixed;
    background-repeat: repeat;
    background-color: #f5f7fb;
    min-height: 100vh;
    position: relative;
}

.standalone-pos::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(245, 247, 251, 0.1) 0%, rgba(240, 244, 248, 0.12) 100%);
    pointer-events: none;
    z-index: 0;
}

.inventory-page {
    position: relative;
    z-index: 1;
}

.pos-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: transparent;
}

.pos-header {
    display: none;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 12px 20px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
    min-height: 56px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    margin-bottom: 16px;
}

.pos-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pos-header-left h1 {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.2;
    font-weight: 600;
}

.pos-header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Hamburger menu button to toggle page header */
.pos-header-toggle {
    position: fixed;
    top: 10px;
    right: 12px;
    z-index: 11;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 6px 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #333;
    transition: all 200ms ease;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pos-header-toggle i {
    transition: transform 300ms ease;
}

.pos-header-toggle.header-open i {
    color: #ef4444;
}

.pos-header-toggle:hover {
    background: #f5f7fb;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

.pos-header-toggle:active {
    transform: scale(0.95);
}

/* Close button in page header */
.pos-header-close-btn {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px;
    transition: all 200ms ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pos-header-close-btn:hover {
    color: #dc2626;
    transform: scale(1.1);
}

.pos-header-close-btn:active {
    transform: scale(0.95);
}

.pos-main {
    flex: 1;
    padding: 24px;
}

.standalone-pos .pos-main {
    padding: 0;
}

@media (max-width: 900px) {
    .pos-header {
        flex-direction: column;
        align-items: stretch;
    }
    .pos-header-left {
        flex-wrap: wrap;
    }
    .pos-main {
        padding: 16px;
    }
}

button,
input,
select,
textarea {
    font: inherit;
}

input,
select,
textarea {
    border-radius: 14px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
    padding: 14px 16px;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease, background 180ms ease;
    font-size: 1rem;
    color: var(--text);
}

.fnb-pos {
    position: relative;
    display: block;
}

/* On non-standalone pages use a normal two-column grid to avoid fixed-panel overlap */
body:not(.standalone-pos) .fnb-pos {
    display: grid;
    grid-template-columns: 1fr var(--pos-cart-width);
    gap: 22px;
}

input::placeholder,
textarea::placeholder {
    color: #94a3b8;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(79,70,229,0.9);
    box-shadow: 0 0 0 4px rgba(79,70,229,0.08);
    transform: translateY(-1px);
    background: #ffffff;
}

select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #94a3b8 50%), linear-gradient(135deg, #94a3b8 50%, transparent 50%);
    background-position: calc(100% - 18px) calc(1em + 2px), calc(100% - 14px) calc(1em + 2px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 42px;
}

a {
    text-decoration: none;
    color: inherit;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: 280px;
    background: #0f172a;
    color: #e2e8f0;
    padding: 30px 24px;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 20;
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
    transition: transform 280ms cubic-bezier(0.2, 0.65, 0.3, 1), opacity 220ms ease, visibility 280ms ease;
    will-change: transform, opacity;
}

.app-sidebar::-webkit-scrollbar {
    width: 3px;
}

.app-sidebar::-webkit-scrollbar-track {
    background: rgba(226, 232, 240, 0.06);
}

.app-sidebar::-webkit-scrollbar-thumb {
    background: rgba(226, 232, 240, 0.32);
    border-radius: 999px;
}

.app-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(226, 232, 240, 0.48);
}

.app-sidebar {
    scrollbar-width: thin;
    scrollbar-color: rgba(226, 232, 240, 0.32) rgba(226, 232, 240, 0.06);
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 32px;
}

.brand-logo {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #eef2ff;
    padding: 10px;
}

.brand h1 {
    margin: 0;
    font-size: 1.3rem;
}

.brand p {
    margin: 0;
    color: #94a3b8;
    font-size: 0.95rem;
}

.sidebar-nav {
    display: grid;
    gap: 10px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 14px;
    color: #cbd5e1;
    background: transparent;
    transition: background 0.2s ease;
    border: 0;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font: inherit;
}

.nav-group {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-left: auto;
    font-size: 0.8rem;
    color: #94a3b8;
    transition: transform 0.2s ease;
}

.nav-group.open .nav-caret {
    transform: rotate(180deg);
}

.nav-dropdown-toggle {
    justify-content: space-between;
    padding: 12px 14px 12px 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.7));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.nav-dropdown-toggle .nav-label {
    flex: 1;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.nav-caret {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.12);
    color: #cbd5e1;
    transition: transform 0.2s ease;
}

.nav-submenu {
    display: none;
    gap: 6px;
    padding: 10px 10px 12px 12px;
    margin-left: 14px;
    margin-top: -4px;
    border-left: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.45);
    border-radius: 0 12px 12px 0;
}

.nav-group.open .nav-submenu {
    display: grid;
}

.nav-submenu-section-title {
    padding: 8px 10px 4px;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
    font-weight: 700;
}

.nav-sub-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 10px;
    color: #dfe7f3;
    font-size: 0.9rem;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
    text-decoration: none;
}

.nav-sub-link:hover,
.nav-sub-link.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(59, 130, 246, 0.12));
    color: #ffffff;
    transform: translateX(2px);
}

.nav-sub-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 8px;
    background: rgba(148, 163, 184, 0.12);
    font-size: 0.78rem;
    color: #cbd5e1;
}

.nav-link:hover,
.nav-link.active,
.nav-sub-link:hover,
.nav-sub-link.active {
    background: rgba(99, 102, 241, 0.18);
    color: #ffffff;
}

.nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.12);
    font-size: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.nav-link i {
    width: 20px;
    text-align: center;
}

.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: width 280ms cubic-bezier(0.2, 0.65, 0.3, 1), margin-left 280ms cubic-bezier(0.2, 0.65, 0.3, 1);
    will-change: width, margin-left;
}

/* account for fixed sidebar */
@media (min-width: 769px) {
    .app-main {
        margin-left: 280px;
    }
}

.housekeeping-board-wrap {
    overflow-x: auto;
}

.housekeeping-board {
    display: grid;
    grid-template-columns: repeat(4, minmax(200px, 1fr));
    gap: 12px;
    min-width: 860px;
}

.housekeeping-column {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    min-height: 260px;
}

.housekeeping-column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.housekeeping-column-header h3 {
    margin: 0;
    font-size: 0.92rem;
}

.housekeeping-column-header span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #0f172a;
    font-size: 0.78rem;
    font-weight: 700;
}

.housekeeping-column-body {
    display: grid;
    gap: 10px;
    flex: 1 1 auto;
    overflow-y: auto;
    max-height: 52vh;
    padding-right: 6px;
}

/* Slim scrollbar for housekeeping kanban column bodies */
.housekeeping-column-body::-webkit-scrollbar {
    width: 3px;
}
.housekeeping-column-body::-webkit-scrollbar-track {
    background: transparent;
}
.housekeeping-column-body::-webkit-scrollbar-thumb {
    background: rgba(15,23,42,0.12);
    border-radius: 8px;
}
.housekeeping-column-body::-webkit-scrollbar-thumb:hover {
    background: rgba(15,23,42,0.18);
}

/* Firefox */
.housekeeping-column-body {
    scrollbar-width: thin;
    scrollbar-color: rgba(15,23,42,0.12) transparent;
}

.housekeeping-card {
    background: #ffffff;
    border: 1px solid #e8eef8;
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.035);
    font-size: 0.92rem;
}

.housekeeping-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.housekeeping-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eef2ff;
    color: var(--primary);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.housekeeping-card p {
    margin: 0 0 8px;
    color: #475569;
    font-size: 0.86rem;
}

.housekeeping-meta {
    display: grid;
    gap: 6px;
    font-size: 0.82rem;
    color: #64748b;
    margin-bottom: 8px;
}

.housekeeping-notes {
    font-size: 0.78rem;
    color: #334155;
    padding: 8px;
    border-radius: 10px;
    background: #f8fafc;
    margin-bottom: 8px;
}

.housekeeping-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.housekeeping-card .button-small {
    padding: 6px 8px;
    font-size: 0.72rem;
    border-radius: 10px;
}

.housekeeping-empty {
    padding: 14px 8px;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    text-align: center;
    color: #64748b;
    font-size: 0.86rem;
}

.housekeeping-board-wrap .table,
.housekeeping-board-wrap .table th,
.housekeeping-board-wrap .table td {
    font-size: 0.86rem;
}

.housekeeping-board-wrap .table th,
.housekeeping-board-wrap .table td {
    padding: 8px 10px;
}

.housekeeping-slide-panel {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    justify-content: flex-end;
    pointer-events: none;
}

.housekeeping-panel-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.housekeeping-panel-content {
    position: relative;
    z-index: 1;
    width: min(460px, 100%);
    height: 100%;
    background: #ffffff;
    padding: 22px 24px 24px;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
    margin-left: auto;
}

.housekeeping-slide-panel.open {
    pointer-events: auto;
}

.housekeeping-slide-panel.open .housekeeping-panel-backdrop {
    opacity: 1;
}

.housekeeping-slide-panel.open .housekeeping-panel-content {
    transform: translateX(0);
}

body.housekeeping-panel-open {
    overflow: hidden;
}

.housekeeping-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}

.housekeeping-panel-help {
    margin: 6px 0 10px;
    color: var(--muted);
    font-size: 0.9rem;
}

.housekeeping-room-picker {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.housekeeping-room-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    background: #f8fbff;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.housekeeping-room-card:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
}

.housekeeping-room-card input {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

.housekeeping-room-card-number {
    font-weight: 700;
    color: var(--text);
    font-size: 0.92rem;
}

.housekeeping-room-card-type {
    color: var(--muted);
    font-size: 0.8rem;
}

.housekeeping-room-card:has(input:checked) {
    border-color: var(--primary);
    background: #eef2ff;
}

.button-small {
    padding: 6px 8px;
    font-size: 0.75rem;
}

.room-status-dirty { background: #f59e0b; }
.room-status-cleaning { background: #0f766e; }
    .room-status-inspection { background: #7c3aed; }
    .room-status-reserved { background: #fcce00; }
.room-status-available { background: #22c55e; }

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.4rem;
}

.header-title h2 {
    margin: 0;
    font-size: 1.2rem;
}

.profile-menu {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #475569;
}

.button-primary,
.button-outline,
.action-button {
    border: none;
    border-radius: 12px;
    padding: 12px 18px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.button-primary {
    background: var(--primary);
    color: #ffffff;
    border-color: transparent;
}

.button-small {
    padding: 8px 12px;
    font-size: 0.78rem;
}

.button-sm {
    padding: 8px 12px;
    font-size: 0.8rem;
}

.button-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid #d1d5db;
}

.fnb-pos {
    /* switched to fixed panels: menu (left) and cart (right) */
    position: relative;
    display: block;
}

/* left menu panel wrapper */
.standalone-pos .fnb-pos-left {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    right: var(--pos-cart-width);
    max-width: calc(100% - var(--pos-cart-width));
    overflow: hidden;
    padding-right: 10px;
}

/* right cart panel fixed */
.standalone-pos .fnb-pos-right {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: var(--pos-cart-width);
    max-width: 34%;
    min-width: 240px;
    overflow: hidden;
    background: #fff;
    border-radius: 12px 0 0 12px;
    box-shadow: 0 12px 30px rgba(2,6,23,0.06);
    padding: 12px;
}

/* Card-specific panel styles for standalone POS */
.fnb-menu-panel {
    padding: 12px;
    padding-top: 12px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}
.fnb-cart-panel {
    padding: 12px;
    border-radius: 12px;
}

/* Compact cart card layout: header, flexible items area, and sticky summary */
.fnb-cart-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 8px;
}

#fnbOrderForm {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.fnb-cart-card-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #ffffff;
}

.fnb-cart-header-compact .fnb-cart-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.fnb-select-small {
    font-size: 0.85rem;
    padding: 6px 8px;
    border-radius: 8px;
    min-width: 110px;
}

.guest-toggle-compact .guest-type-button {
    font-size: 0.78rem;
    padding: 6px 8px;
    border-radius: 8px;
}

.fnb-cart-items-header {
    font-size: 0.9rem;
    color: var(--muted, #6b7280);
    padding: 6px 4px;
    border-bottom: 1px solid rgba(15,23,42,0.04);
}

.fnb-cart-items {
    flex: 0 0 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 4px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Custom slim scrollbar for cart items */
.fnb-cart-items::-webkit-scrollbar {
    width: 2px;
}

.fnb-cart-items::-webkit-scrollbar-track {
    background: transparent;
}

.fnb-cart-items::-webkit-scrollbar-thumb {
    background: rgba(15,23,42,0.15);
    border-radius: 999px;
}

.fnb-cart-items::-webkit-scrollbar-thumb:hover {
    background: rgba(15,23,42,0.25);
}

.fnb-cart-items {
    scrollbar-width: thin;
    scrollbar-color: rgba(15,23,42,0.15) transparent;
}

.fnb-cart-empty {
    color: #5a7a9a;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
    border: 1px solid #bae6fd;
    border-radius: 12px;
    padding: 14px 12px;
    margin: auto;
    text-align: center;
    width: fit-content;
    max-width: 220px;
    box-shadow: 0 2px 8px rgba(7, 89, 133, 0.08);
}

/* Standalone POS reference layout */
.standalone-pos {
    --pos-ink: #17233c;
    --pos-muted: #738096;
    --pos-line: #dce3ed;
    --pos-panel: #ffffff;
    --pos-workspace: #f5f7fb;
    background: var(--pos-workspace);
    color: var(--pos-ink);
}

.standalone-pos::before,
.standalone-pos::after {
    display: none;
}

.standalone-pos .pos-shell {
    min-height: 100vh;
    background: var(--pos-workspace);
}

.standalone-pos .pos-header {
    display: flex;
    min-height: 60px;
    height: 60px;
    padding: 8px 16px;
    border-bottom: 1px solid var(--pos-line);
    background: var(--pos-panel);
    box-shadow: 0 2px 12px rgba(25, 43, 72, .05);
}

.standalone-pos .pos-header-left {
    gap: 10px;
    min-width: 190px;
}

.standalone-pos .pos-brand-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #f0edff;
    color: #7656f6;
    font-size: .9rem;
}

.standalone-pos .pos-brand-copy {
    display: grid;
    gap: 2px;
}

.standalone-pos .pos-brand-copy strong {
    color: var(--pos-ink);
    font-size: .88rem;
    line-height: 1;
}

.standalone-pos .pos-brand-copy span {
    color: var(--pos-muted);
    font-size: .5rem;
    letter-spacing: .09em;
    line-height: 1;
}

.standalone-pos .pos-header-actions {
    gap: 7px;
}

.standalone-pos .pos-live-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-right: 2px;
    color: #087f4e;
    font-size: .65rem;
    font-weight: 700;
    white-space: nowrap;
}

.standalone-pos .pos-live-status i {
    font-size: .45rem;
}

.standalone-pos .pos-header-total {
    margin-right: 3px;
    color: var(--pos-ink);
    font-size: .72rem;
}

.standalone-pos .pos-header-tool {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 34px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid #a8dbe5;
    border-radius: 6px;
    background: #f8fcff;
    color: #176b82;
    cursor: pointer;
    font: inherit;
    font-size: .62rem;
    font-weight: 700;
}

.standalone-pos .pos-header-tool:hover {
    background: #edfaff;
    border-color: #20a8ba;
}

.standalone-pos .pos-header-close-btn {
    width: 34px;
    height: 32px;
    padding: 0;
    border-radius: 6px;
    background: #f7f8fb;
    color: var(--pos-muted);
    font-size: .7rem;
}

.standalone-pos .pos-header-toggle {
    top: 74px;
    right: 12px;
    display: none;
}

.standalone-pos .pos-main {
    min-height: calc(100vh - 60px);
}

.standalone-pos .fnb-pos {
    min-height: calc(100vh - 60px);
    margin: 0 !important;
}

.standalone-pos .fnb-pos-left {
    top: 60px;
    right: min(32%, 440px);
    max-width: none;
    padding: 0;
    border-right: 1px solid var(--pos-line);
    border-radius: 0;
    background: var(--pos-workspace);
    box-shadow: none;
}

.standalone-pos .fnb-pos-right {
    top: 60px;
    width: min(32%, 440px);
    max-width: none;
    min-width: 360px;
    padding: 0;
    border-left: 0;
    border-radius: 0;
    background: var(--pos-panel);
    box-shadow: -4px 0 14px rgba(25, 43, 72, .04);
}

.standalone-pos .fnb-menu-panel,
.standalone-pos .fnb-cart-panel,
.standalone-pos .fnb-cart-card {
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.standalone-pos .fnb-menu-panel {
    padding: 0;
}

.standalone-pos .fnb-pos-menu-header {
    height: 48px;
    padding: 8px 14px;
    border-bottom: 1px solid var(--pos-line);
    background: var(--pos-panel);
    box-shadow: none;
}

.standalone-pos .fnb-pos-menu-toolbar {
    gap: 8px;
}

.standalone-pos .fnb-pos-menu-search input,
.standalone-pos .fnb-pos-menu-filters select {
    height: 34px;
    min-height: 34px;
    border: 1px solid #d4ddea;
    border-radius: 6px;
    background: #fff;
    color: var(--pos-ink);
    font-size: .65rem;
}

.standalone-pos .fnb-pos-menu-search .fnb-search-icon {
    color: #8090a7;
    font-size: .7rem;
}

.standalone-pos .fnb-pos-menu-filters select {
    min-width: 150px;
    padding: 6px 30px 6px 10px;
}

.standalone-pos .fnb-menu-panel .fnb-menu-grid {
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 12px;
    padding: 14px;
    background: var(--pos-workspace);
    background-image: none;
}

.standalone-pos .fnb-menu-card {
    min-width: 0;
    border: 1px solid #e0e5ed;
    border-radius: 7px;
    background: var(--pos-panel);
    box-shadow: 0 3px 10px rgba(25, 43, 72, .06);
}

.standalone-pos .fnb-menu-card:hover {
    transform: translateY(-2px);
    border-color: #b9c5d8;
    box-shadow: 0 9px 18px rgba(25, 43, 72, .1);
}

.standalone-pos .fnb-menu-card img,
.standalone-pos .fnb-menu-card-image-placeholder {
    height: 110px;
    border-radius: 0;
}

.standalone-pos .fnb-menu-card-body {
    gap: 8px;
    padding: 9px;
}

.standalone-pos .fnb-menu-card-title {
    color: var(--pos-ink);
    font-size: .68rem;
    line-height: 1.25;
}

.standalone-pos .fnb-menu-card-description {
    display: none;
}

.standalone-pos .fnb-menu-card-footer {
    padding: 4px 9px 9px;
}

.standalone-pos .fnb-menu-card-price {
    color: #087f78;
    font-size: .66rem;
}

.standalone-pos .fnb-menu-card .button-small {
    display: none;
}

.standalone-pos .fnb-menu-footer {
    display: none;
}

.standalone-pos .fnb-cart-panel {
    border-left: 1px solid var(--pos-line);
}

.standalone-pos .fnb-cart-card {
    gap: 0;
    padding: 0;
}

.standalone-pos .fnb-cart-card > .fnb-section-header {
    min-height: 48px;
    padding: 8px 14px;
    border-bottom: 1px solid var(--pos-line);
    background: var(--pos-panel);
}

.standalone-pos .fnb-cart-controls {
    width: 100%;
    justify-content: flex-end;
}

.standalone-pos .fnb-cart-items-section {
    flex: 1 1 auto;
    padding: 14px;
    margin: 0;
    overflow: auto;
}

.standalone-pos .fnb-cart-card-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #b8c4d3 transparent;
}

.standalone-pos .fnb-cart-card-body::-webkit-scrollbar {
    width: 6px;
}

.standalone-pos .fnb-cart-card-body::-webkit-scrollbar-track {
    background: transparent;
}

.standalone-pos .fnb-cart-card-body::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: #b8c4d3;
}

.standalone-pos .fnb-cart-card-body::-webkit-scrollbar-thumb:hover {
    background: #91a1b6;
}

/* Keep long menu lists inside the left pane without moving the search bar. */
.standalone-pos .fnb-pos-left {
    height: auto !important;
    min-height: 0 !important;
}

.standalone-pos .fnb-menu-panel {
    height: 100% !important;
    min-height: 0 !important;
}

.standalone-pos .fnb-menu-panel .fnb-menu-grid {
    flex: 1 1 0 !important;
    height: calc(100vh - 108px) !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: scroll !important;
    scrollbar-width: thin;
    scrollbar-color: #b8c4d3 transparent;
}

.standalone-pos .fnb-menu-panel .fnb-menu-grid::-webkit-scrollbar {
    width: 6px;
}

.standalone-pos .fnb-menu-panel .fnb-menu-grid::-webkit-scrollbar-track {
    background: transparent;
}

.standalone-pos .fnb-menu-panel .fnb-menu-grid::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: #b8c4d3;
}

.standalone-pos .fnb-menu-panel .fnb-menu-grid::-webkit-scrollbar-thumb:hover {
    background: #91a1b6;
}

@media (max-width: 1000px) {
    .standalone-pos .fnb-pos-left {
        height: auto !important;
        min-height: 60vh !important;
    }

    .standalone-pos .fnb-menu-panel .fnb-menu-grid {
        height: auto !important;
        max-height: 60vh !important;
    }
}

.standalone-pos .fnb-cart-items-header {
    display: none;
}

.standalone-pos .fnb-cart-empty {
    width: 100%;
    max-width: none;
    min-height: 355px;
    margin: 0;
    border: 1px dashed #dce3ed;
    border-radius: 14px;
    background: transparent;
    color: #6d7f98;
    font-size: .92rem;
    font-weight: 500;
    line-height: 1.55;
    box-shadow: none;
}

.standalone-pos .fnb-cart-footer {
    margin: 0;
    padding: 12px 14px;
    border-top: 1px solid var(--pos-line);
    border-radius: 0;
    background: var(--pos-panel);
    box-shadow: none;
}

.standalone-pos .fnb-cart-footer .fnb-cart-subtotal {
    margin-bottom: 12px;
    padding: 0 0 10px;
    border-bottom: 1px solid var(--pos-line);
}

.standalone-pos .fnb-cart-footer .fnb-action-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
}

.standalone-pos .fnb-cart-footer .button-outline,
.standalone-pos .fnb-cart-footer .button-primary {
    min-width: 0;
    min-height: 38px;
    padding: 8px 10px;
    border-radius: 5px;
    font-size: .64rem;
}

.standalone-pos .fnb-cart-footer .button-primary {
    background: linear-gradient(90deg, #12b8ad, #10a6d7);
    box-shadow: none;
}

.standalone-pos .fnb-cart-footer .button-outline:first-child {
    grid-column: 1 / -1;
    order: 3;
    border-color: #f0a000;
    background: #f6a009;
    color: #fff;
}

html[data-theme="dark"] .standalone-pos {
    --pos-ink: var(--theme-text);
    --pos-muted: var(--theme-muted);
    --pos-line: var(--theme-border);
    --pos-panel: var(--theme-surface);
    --pos-workspace: var(--theme-bg);
}

@media (max-width: 1000px) {
    .standalone-pos .pos-header {
        position: sticky;
        top: 0;
    }

    .standalone-pos .pos-header-tool span,
    .standalone-pos .pos-live-status,
    .standalone-pos .pos-header-total {
        display: none;
    }

    .standalone-pos .fnb-pos-left,
    .standalone-pos .fnb-pos-right {
        position: static !important;
        width: 100% !important;
        min-width: 0;
        max-width: none;
        border: 0;
    }

    .standalone-pos .fnb-pos-left {
        min-height: 60vh;
    }

    .standalone-pos .fnb-pos-right {
        min-height: 430px;
        border-top: 1px solid var(--pos-line);
    }

    .standalone-pos .fnb-pos {
        min-height: 0;
    }
}

@media (max-width: 560px) {
    .standalone-pos .pos-header {
        padding: 8px 10px;
    }

    .standalone-pos .pos-header-left {
        min-width: 0;
    }

    .standalone-pos .fnb-pos-menu-toolbar {
        flex-wrap: wrap;
        height: auto;
    }

    .standalone-pos .fnb-pos-menu-header {
        height: auto;
        min-height: 48px;
    }

    .standalone-pos .fnb-pos-menu-filters {
        flex: 0 0 120px;
    }

    .standalone-pos .fnb-pos-menu-filters select {
        min-width: 0;
        width: 100%;
    }

    .standalone-pos .fnb-menu-panel .fnb-menu-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
        padding: 10px;
    }
}

.fnb-cart-summary {
    border-top: 1px solid rgba(15,23,42,0.04);
    padding-top: 8px;
    flex: 0 0 auto;
}

.standalone-pos .fnb-menu-panel {
    background: var(--surface);
}
.standalone-pos .fnb-cart-panel {
    background: var(--surface);
}

/* Ensure the menu grid sits nicely inside the card */
.fnb-menu-panel .fnb-menu-grid {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    margin-top: 8px;
    padding-top: 8px;
}

/* Background image for standalone POS menu grid */
.standalone-pos .fnb-menu-grid {
    background-image: 
        linear-gradient(rgba(255, 230, 213, 0.85), rgba(255, 233, 218, 0.85)),
        url('../img/pos-bg-pattern.png');
    background-size: auto, 400px 400px;
    background-position: 0 0, 0 0;
    background-attachment: fixed, fixed;
    background-repeat: repeat, repeat;
}

/* Custom slim scrollbar for menu grid */
.fnb-menu-panel .fnb-menu-grid::-webkit-scrollbar {
    width: 2px;
}

.fnb-menu-panel .fnb-menu-grid::-webkit-scrollbar-track {
    background: transparent;
}

.fnb-menu-panel .fnb-menu-grid::-webkit-scrollbar-thumb {
    background: rgba(15,23,42,0.15);
    border-radius: 999px;
}

.fnb-menu-panel .fnb-menu-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(15,23,42,0.25);
}

.fnb-menu-panel .fnb-menu-grid {
    scrollbar-width: thin;
    scrollbar-color: rgba(15,23,42,0.15) transparent;
}

.fnb-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
}

.fnb-section-header h3 {
    margin: 0;
}

.fnb-pos-menu-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 10px;
    border-radius: 0;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
    border: none;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 6;
    width: 100%;
}

/* Make the menu grid scrollable within the panel so header can stick */
.fnb-menu-panel .fnb-menu-grid {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 10px;
    margin-top: 0;
}

.fnb-pos-menu-title h3 {
    margin: 0 0 6px;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
}

.fnb-pos-menu-title .muted-text {
    margin: 0;
    color: #475569;
    font-size: 0.92rem;
}

.fnb-pos-menu-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    flex-wrap: nowrap;
}

.fnb-pos-menu-toolbar .fnb-pos-menu-search {
    flex: 1 1 auto;
    min-width: 0;
}

.fnb-pos-menu-search {
    position: relative;
}

.fnb-pos-menu-search input {
    width: 100%;
    min-height: 32px;
    padding: 6px 32px 6px 10px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    background: #f8fafc;
    font-size: 0.85rem;
    color: #0f172a;
    transition: border-color 140ms ease, box-shadow 140ms ease;
}

.fnb-pos-menu-search input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.fnb-pos-menu-search .fnb-search-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #475569;
    font-size: 0.95rem;
}

.fnb-pos-menu-filters {
    display: flex;
    gap: 6px;
    align-items: center;
    width: auto;
    flex-shrink: 0;
    min-width: 0;
}

.fnb-pos-menu-filters label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155;
}

.fnb-pos-menu-filters select {
    min-width: 140px;
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    background: #f8fafc;
    color: #0f172a;
    font-size: 0.85rem;
}

.fnb-menu-footer {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex: 0 0 auto;
    padding: 16px 16px 14px;
    border-top: none;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border-radius: 0 0 12px 12px;
    position: relative;
    z-index: 2;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.fnb-menu-footer-summary {
    font-size: 0.95rem;
    color: #e0e7ff;
    font-weight: 500;
}

.fnb-menu-footer-summary strong {
    color: #ffffff;
    margin-left: 6px;
    font-weight: 700;
}

.fnb-menu-empty {
    color: #dc2626;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    background: linear-gradient(135deg, #fee2e2 0%, #fef2f2 100%);
    border: 1px solid #fca5a5;
    border-radius: 12px;
    margin: 11px auto;
    padding: 14px 12px;
    text-align: center;
    width: fit-content;
    max-width: 220px;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.12);
}

.standalone-pos .fnb-menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
    gap: 16px;
    align-items: start;
    padding: 16px;
    margin-top: 0;
    margin-bottom: 0;
}

.fnb-menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
    align-items: start;
    padding: 16px;
    margin-top: 12px;
    margin-bottom: 12px;
}

.standalone-pos .fnb-menu-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #e0e7f1;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    cursor: pointer;
    transition: transform 180ms cubic-bezier(0.2, 0.6, 0.3, 1), box-shadow 180ms cubic-bezier(0.2, 0.6, 0.3, 1), border-color 180ms ease;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.fnb-menu-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #e0e7f1;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    cursor: pointer;
    transition: transform 180ms cubic-bezier(0.2, 0.6, 0.3, 1), box-shadow 180ms cubic-bezier(0.2, 0.6, 0.3, 1), border-color 180ms ease;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.fnb-menu-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(79, 70, 229, 0.15);
    border-color: #d4d8e8;
}

.fnb-menu-card img,
.fnb-menu-card-image-placeholder {
    width: 100%;
    height: 100px;
    object-fit: cover;
    flex-shrink: 0;
}

.fnb-menu-card-image-placeholder {
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #f0f4f8 0%, #e8ecf1 100%);
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 500;
}

.fnb-menu-card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    flex: 1 1 auto;
}

.fnb-menu-card-body > div:first-child {
    flex: 1;
}

.fnb-menu-card-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    letter-spacing: -0.01em;
}

.fnb-menu-card-description {
    font-size: 0.82rem;
    color: #78829d;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 400;
}

.fnb-menu-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px 14px 14px;
    flex-wrap: nowrap;
    flex-shrink: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(79, 70, 229, 0.02) 100%);
}

.fnb-menu-card-price {
    font-weight: 700;
    color: #4f46e5;
    font-size: 0.95rem;
    white-space: nowrap;
}

.fnb-menu-card .button-small {
    flex-shrink: 0;
    padding: 8px 12px;
    font-size: 0.8rem;
    min-width: fit-content;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    border: none;
    color: #ffffff;
    font-weight: 600;
    border-radius: 8px;
    transition: all 180ms ease;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.2);
}

.fnb-menu-card .button-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}


.standalone-pos .fnb-menu-panel {
    background: linear-gradient(135deg, #f8fafc 0%, #f0f4f8 100%);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.06);
    border-radius: 12px;
}

.standalone-pos .fnb-cart-panel {
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
}

.standalone-pos .fnb-menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
    gap: 16px;
    align-items: start;
    padding: 16px;
    margin-top: 0;
    margin-bottom: 0;
}

.menu-item-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.menu-item-thumb.placeholder {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    font-size: 0.7rem;
    color: var(--muted);
    background: #f8fafc;
    border-radius: 8px;
    border: 1px dashed #d1d5db;
}

/* Media: desktop and tablet optimization */
@media (min-width: 1024px) {
    .standalone-pos .fnb-menu-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 18px;
    }
}

.table th:first-child,
.table td:first-child {
    width: 56px;
    padding: 8px 6px;
}

.table td {
    vertical-align: middle;
}

.fnb-cart-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #ffffff;
    border-radius: 14px;
    padding: 12px;
    font-size: 0.92rem;
    height: 100%;
}

.standalone-pos .fnb-cart-card {
    border: none;
    box-shadow: none;
}

.standalone-pos .fnb-cart-items-section {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    min-height: 0;
    height: auto;
    max-height: none;
    overflow: visible;
    border: none;
    border-radius: 0;
    padding: 0;
    margin-bottom: 12px;
    background: transparent;
}

.standalone-pos .fnb-cart-items-header {
    margin-bottom: 12px;
}

/* Footer behavior for standalone POS cart */
.fnb-cart-panel .fnb-cart-card {
    /* restore normal bottom padding */
    padding-bottom: 12px;
}
.fnb-cart-footer {
    display: block;
    margin-top: 12px;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4f8 100%);
    padding: 18px 16px 18px;
    border-top: 1px solid rgba(79, 70, 229, 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
    z-index: 5;
    border-radius: 8px;
}
.fnb-cart-footer .fnb-cart-subtotal {
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(15,23,42,0.08);
}
.fnb-cart-footer .fnb-action-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}
.fnb-cart-footer .button-outline,
.fnb-cart-footer .button-primary {
    min-width: 140px;
    flex: 1 1 140px;
}

@media (max-width: 1000px) {
    .fnb-cart-footer {
        margin-top: 8px;
    }
}

@media (max-width: 760px) {
    .fnb-cart-footer .fnb-action-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .fnb-cart-footer .button-outline,
    .fnb-cart-footer .button-primary {
        width: 100%;
        min-width: auto;
    }
}

.fnb-cart-card .fnb-section-header h3 {
    font-size: 1.02rem;
}

.fnb-cart-card .muted-text {
    font-size: 0.85rem;
}

.fnb-cart-items {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    min-height: 0;
    overflow: visible;
}

.fnb-cart-empty {
    color: #5a7a9a;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
    border: 1px solid #bae6fd;
    border-radius: 12px;
    padding: 16px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 90px;
    text-align: center;
    width: fit-content;
    max-width: 220px;
    margin: 0 auto;
    box-shadow: 0 2px 8px rgba(7, 89, 133, 0.08);
}

.fnb-cart-summary {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid rgba(15,23,42,0.08);
    box-shadow: 0 1px 3px rgba(15,23,42,0.06);
    margin-bottom: 12px;
}

.fnb-cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.fnb-cart-summary-row span {
    color: rgba(15,23,42,0.72);
    font-weight: 500;
}

.fnb-cart-summary-row strong {
    font-size: 1.2rem;
    color: var(--text);
}

.fnb-action-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.fnb-guest-selection {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.guest-type-toggle {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.guest-type-button {
    flex: 1;
    min-width: 120px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: var(--text);
    font-weight: 600;
    cursor: pointer;
    transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.guest-type-button.active,
.guest-type-button:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.guest-panel {
    display: grid;
    gap: 10px;
}

.guest-card-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
}

.guest-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #0f172a;
    text-align: center;
    cursor: pointer;
    transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
    font-size: 0.88rem;
}

.guest-card:hover {
    transform: translateY(-2px);
    border-color: #c7d2fe;
}

.guest-card.selected {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.12);
}

.guest-card.empty {
    grid-column: 1 / -1;
    background: #f8fafc;
    justify-content: center;
}

.guest-card-selected {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #ffffff;
}

.fnb-hidden {
    display: none !important;
}

.fnb-cart-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px;
    align-items: center;
    padding: 6px 8px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f8fafc;
    font-size: 0.82rem;
    min-height: 38px;
    width: 100%;
}

@media (max-width: 1000px) {
    .fnb-pos-left, .fnb-pos-right {
        position: static !important;
        width: auto !important;
        max-width: none !important;
        box-shadow: none !important;
        padding: 0 !important;
    }
    .fnb-menu-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 8px;
    }
    .fnb-pos-right {
        margin-top: 12px;
        background: transparent;
        padding: 0;
    }
}

.fnb-cart-item strong {
    display: block;
    margin-bottom: 1px;
    font-size: 0.88rem;
    line-height: 1;
}

.fnb-cart-item-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    color: var(--muted);
}

.fnb-cart-item-actions {
    display: flex;
    flex-direction: row;
    gap: 6px;
    align-items: center;
}

.fnb-cart-item-actions button {
    min-width: 26px;
    width: 26px;
    height: 26px;
    font-size: 0.74rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

/* make cart items align left so narrower cards look compact */
.fnb-cart-items { justify-items: start; }

.cart-remove-btn {
    color: #dc2626;
    border-color: rgba(220, 38, 38, 0.2);
}

.cart-remove-btn:hover {
    background: rgba(220, 38, 38, 0.08);
}

.button-small {
    padding: 8px 12px;
    font-size: 0.78rem;
}

/* Payment modal styles */
.modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(2,6,23,0.4);
    z-index: 1200;
}
.modal .modal-content {
    width: 100%;
    max-width: 480px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 18px 40px rgba(2,6,23,0.18);
    overflow: hidden;
}
.modal .modal-header,
.modal .modal-footer {
    padding: 12px 16px;
    border-bottom: 1px solid #eef2f7;
    display:flex;
    align-items:center;
    justify-content:space-between;
}
.modal .modal-body { padding: 12px 16px; }
.payment-summary { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:10px; }
.payment-summary .due { font-weight:700; font-size:1.12rem; color:#0f172a; }
.payment-summary input { width: 140px; text-align:right; padding:8px 10px; border-radius:8px; border:1px solid #e6eef8; font-size:1rem; }
.number-pad { display:grid; grid-template-columns: repeat(3, 1fr); gap:8px; margin:10px 0 14px; }
.number-pad button { padding:12px 0; border-radius:8px; background:#f1f5f9; border:1px solid #e2e8f0; font-size:1.02rem; cursor:pointer; }
.number-pad .wide { grid-column: 1 / -1; display:flex; gap:8px; }

/* Toast notification */
.fnb-toast { position: fixed; right: 18px; bottom: 18px; min-width: 220px; max-width: 360px; padding: 12px 14px; border-radius: 10px; box-shadow: 0 12px 30px rgba(2,6,23,0.12); color:#fff; z-index:1300; font-weight:600; }
.fnb-toast.info { background: linear-gradient(90deg,#475569,#64748b); }
.fnb-toast.success { background: linear-gradient(90deg,#16a34a,#059669); }
.fnb-toast.error { background: linear-gradient(90deg,#dc2626,#b91c1c); }
.fnb-toast.hidden { display:none; }

.action-button {
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 14px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: var(--muted);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.action-button.danger {
    color: var(--danger);
    border-color: rgba(220, 38, 38, 0.2);
}

.payment-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
}

.payment-status-pill.status-paid {
    background: rgba(22, 163, 74, 0.12);
    color: var(--success);
}

.payment-status-pill.status-partial {
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
}

.payment-status-pill.status-pending {
    background: rgba(79, 70, 229, 0.12);
    color: var(--primary);
}

.invoice-card {
    display: grid;
    gap: 16px;
}

.invoice-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    padding: 18px;
    border-radius: 16px;
    background: var(--surface-strong);
    border: 1px solid var(--border);
}

.invoice-summary span {
    display: block;
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 6px;
}

.action-button:hover {
    background: var(--surface-strong);
    color: var(--text);
    border-color: #cbd5e1;
}

.action-button.edit {
    color: #2563eb;
}

.action-button.danger {
    color: #dc2626;
}

.page-header .button-primary {
    padding: 12px 20px;
}

.app-content {
    padding: 24px 24px 32px;
}

/* Compact business header shared by hotel and supermarket-style pages. */
.business-topbar {
    position: sticky;
    top: 0;
    z-index: 25;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 8px 18px;
    border-bottom: 1px solid var(--theme-border);
    background: var(--theme-surface);
    color: var(--theme-text);
    box-shadow: 0 4px 16px rgba(35, 45, 75, .06);
}

.business-topbar-brand,
.business-topbar-links,
.business-topbar-profile-wrap {
    display: flex;
    align-items: center;
}

.business-topbar-collapse {
    display: grid;
    place-items: center;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--theme-muted);
    cursor: pointer;
}

.topbar-collapsed .app-sidebar {
    transform: translateX(-100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.topbar-collapsed .app-main {
    width: 100% !important;
    margin-left: 0 !important;
}

.business-topbar-collapse:hover {
    background: var(--theme-surface-soft);
    color: #7656f6;
}

.business-topbar-brand {
    flex: 0 0 auto;
    gap: 9px;
    min-width: 150px;
}

.business-topbar-mark {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 7px;
    background: #a28af8;
    color: #fff;
}

.business-topbar-name {
    font-size: .82rem;
    font-weight: 700;
    white-space: nowrap;
}

.business-topbar-links {
    gap: 7px;
    min-width: 0;
}

.business-topbar-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 32px;
    padding: 0 10px;
    border-radius: 7px;
    background: #a28af8;
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    white-space: nowrap;
}

.business-topbar-link:hover,
.business-topbar-link.active {
    background: #7656f6;
}

.business-topbar-spacer {
    flex: 1;
}

.business-topbar-status {
    padding: 7px 12px;
    border: 1px solid #f4d27b;
    border-radius: 999px;
    background: #fffaf0;
    color: #a66a00;
    font-size: .64rem;
    white-space: nowrap;
}

.business-topbar-action,
.business-topbar-profile {
    display: grid;
    place-items: center;
    cursor: pointer;
}

.business-topbar-action {
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--theme-muted);
}

.business-topbar-action:hover {
    background: var(--theme-surface-soft);
    color: #7656f6;
}

.business-topbar-profile-wrap {
    position: relative;
    flex: 0 0 32px;
}

.business-topbar-profile {
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--theme-border);
    border-radius: 50%;
    background: var(--theme-surface-soft);
    color: var(--theme-text);
    font-size: .62rem;
    font-weight: 700;
}

.business-topbar-profile-menu {
    position: absolute;
    top: 40px;
    right: 0;
    display: none;
    min-width: 150px;
    padding: 7px;
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    background: var(--theme-surface);
    box-shadow: 0 14px 32px rgba(35, 45, 75, .16);
}

.business-topbar-profile-menu.is-open {
    display: grid;
    gap: 3px;
}

.business-topbar-profile-menu span,
.business-topbar-profile-menu a {
    padding: 7px 9px;
    color: var(--theme-text);
    font-size: .68rem;
}

.business-topbar-profile-menu span {
    color: var(--theme-muted);
    font-weight: 700;
}

.business-topbar-profile-menu a:hover {
    border-radius: 5px;
    background: var(--theme-surface-soft);
    color: #7656f6;
}

@media (max-width: 900px) {
    .business-topbar {
        overflow-x: auto;
    }

    .business-topbar-spacer {
        display: none;
    }

    .business-topbar-status {
        margin-left: auto;
    }
}

@media (max-width: 560px) {
    .business-topbar {
        padding: 8px 12px;
    }

    .business-topbar-name,
    .business-topbar-link span,
    .business-topbar-status {
        display: none;
    }

    .business-topbar-brand {
        min-width: 32px;
    }

    .business-topbar-link {
        width: 32px;
        padding: 0;
    }
}

.reservations-page {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.page-header {
    width: 100%;
    gap: 16px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 14px;
        margin-bottom: 18px;
}

.branch-overview {
    position: relative;
    margin-bottom: 22px;
    padding: 24px 26px;
    overflow: hidden;
    border: 1px solid #263244;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.14);
}

.branch-overview::after {
    content: '';
    position: absolute;
    top: -70px;
    right: 12%;
    width: 220px;
    height: 220px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    pointer-events: none;
}

.branch-overview-heading {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.branch-overview-eyebrow,
.branch-overview-stat span {
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.branch-overview h2 {
    margin: 6px 0 0;
    color: #fff;
    font-size: 1.55rem;
}

.branch-overview-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(120px, 1fr));
    gap: 12px;
    min-width: min(100%, 480px);
}

.branch-overview-stat {
    position: relative;
    z-index: 1;
    min-width: 0;
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
}

.branch-overview-stat strong {
    display: block;
    margin-top: 7px;
    color: #fff;
    font-size: 1.12rem;
    line-height: 1.2;
}

.branch-overview-note {
    position: relative;
    z-index: 1;
    margin-top: 18px;
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.78rem;
}

@media (max-width: 768px) {
    .branch-overview {
        padding: 20px;
    }

    .branch-overview-heading {
        align-items: stretch;
        flex-direction: column;
        gap: 18px;
    }

    .branch-overview-stats {
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .branch-overview-stats {
        grid-template-columns: 1fr;
    }
}

.rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 320px));
    gap: 12px;
    margin-top: 6px;
    align-items: start;
    justify-content: center;
}

.room-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.04);
    transition: opacity 0.24s ease, transform 0.24s ease, max-height 0.24s ease, margin 0.24s ease, padding 0.24s ease, box-shadow 0.16s ease, border-color 0.24s ease;
    cursor: pointer;
    min-height: 140px;
    width: 100%;
    min-width: 0;
    max-width: 320px;
}

@media (max-width: 640px) {
    .rooms-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

.room-card:hover {
    /* stack panels on small screens */
    .fnb-menu-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 8px;
    }
    .fnb-pos-right {
        margin-top: 12px;
        background: transparent;
        padding: 0;
    }
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

/* Prevent horizontal overflow when using fixed panels on narrow viewports */
.standalone-pos {
    overflow-x: hidden;
}

.room-card.room-card-hidden {
    display: none !important;
}

.room-card.room-unavailable {
    cursor: not-allowed;
    opacity: 0.9;
}

.room-selected {
    border: 1px solid var(--primary);
}

@keyframes pulse-card {
    0%, 100% {
        box-shadow: 0 6px 14px rgba(59, 130, 246, 0.08);
        transform: translateY(0) scale(1);
    }
    50% {
        box-shadow: 0 12px 20px rgba(59, 130, 246, 0.12);
        transform: translateY(-1px) scale(1.001);
    }
}

.room-card-status-bar {
    width: 100%;
    padding: 5px 8px;
    font-size: 0.64rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #ffffff;
    letter-spacing: 0.05em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.room-card-number {
    font-size: 0.68rem;
    opacity: 0.95;
}

.room-status-available { background: #22c55e; }
.room-status-occupied { background: #f97316; }
.room-status-maintenance { background: #ef4444; }

.room-card-header {
    position: relative;
    min-height: 68px;
    overflow: hidden;
}

.room-card-header img,
.room-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.room-card-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.75rem;
}

.room-card-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 10px 10px;
}

.room-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.room-card-meta-item {
    font-size: 0.82rem;
    color: #475569;
}

.room-card-actions-bottom {
    margin-top: auto;
}

.room-title {
    margin: 0 0 4px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text);
}

.room-rate {
    font-size: 0.75rem;
    color: #334155;
    font-weight: 700;
}

.room-number {
    margin-top: 2px;
    font-size: 0.72rem;
    color: var(--muted);
    font-weight: 600;
}

.room-card-actions {
    display: flex;
    gap: 6px;
    padding: 0;
    justify-content: flex-end;
}

.select-room-button {
    width: auto;
    padding: 5px 7px;
    font-size: 0.72rem;
}

.room-card.room-selected {
    border-color: var(--primary);
    box-shadow: 0 18px 40px rgba(79, 70, 229, 0.12);
}

.room-card.room-selected .room-card-header {
    opacity: 0.98;
}

.room-card.room-selected .room-card-badge {
    background: #4f46e5;
}

.room-card.room-selected .select-room-button {
    background: var(--primary);
    color: #ffffff;
    border-color: transparent;
}

.room-card.room-selected .select-room-button:hover {
    background: #4338ca;
}

.room-card.room-unavailable {
    opacity: 0.7;
}

.room-card.room-unavailable .select-room-button {
    cursor: not-allowed;
}

.button-secondary {
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #111827;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.button-secondary:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.room-card-banner {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.9);
    color: #111827;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.room-card-banner-selected {
    background: rgba(56, 189, 248, 0.95);
    color: #ffffff;
}

.room-selected {
    border: 2px solid var(--primary);
}

.reservation-room-section {
    margin-bottom: 22px;
}

.reservation-room-section > label {
    display: block;
    margin-bottom: 12px;
    font-weight: 700;
    color: var(--text);
}

.reservation-type-options {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 18px 0 26px;
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #ffffff;
}

.reservation-type-options label {
    flex: 1;
    min-width: 160px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    background: #f8fafc;
}

.reservation-type-options label input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.reservation-type-options label:hover {
    transform: translateY(-1px);
    border-color: rgba(79, 70, 229, 0.35);
    background: #eef2ff;
}

.reservation-type-options label:has(input:checked),
.reservation-type-options label.checked {
    border-color: rgba(79, 70, 229, 0.9);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.16);
    background: #eef2ff;
}

.reservation-type-options label:has(input:checked) span,
.reservation-type-options label.checked span {
    color: var(--text);
}

.reservation-filters {
    margin-bottom: 20px;
}

.reservation-filters .filter-card {
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.reservation-filters-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(180px, 0.7fr) minmax(140px, 0.5fr);
    gap: 12px;
    align-items: end;
}

.reservation-filters-grid > div {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-width: 0;
}

.reservation-filters-grid-three {
    grid-template-columns: minmax(0, 1.2fr) minmax(180px, 0.8fr) minmax(160px, 0.7fr);
}

.filter-group {
    gap: 8px;
}

.filter-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.reservation-search-wrap {
    grid-column: span 1;
    max-width: 100%;
}

.filter-action-group {
    justify-content: flex-end;
}

.reservation-count {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 0.92rem;
}

.search-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.search-input-group:focus-within {
    outline: none;
    border-color: rgba(79,70,229,0.9);
    box-shadow: 0 0 0 4px rgba(79,70,229,0.08), 0 12px 28px rgba(79, 70, 229, 0.08);
    transform: translateY(-1px);
}

.search-input-group .search-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, #eef2ff 0%, #dbeafe 100%);
    color: var(--primary);
    flex-shrink: 0;
    font-size: 0.9rem;
}

.search-input-group input {
    border: none;
    background: transparent;
    box-shadow: none;
    padding: 0;
    width: 100%;
    min-width: 0;
    font-size: 0.9rem;
}

.search-input-group input::placeholder {
    color: #94a3b8;
}

.search-input-group input:focus {
    border: none;
    box-shadow: none;
    transform: none;
    background: transparent;
}

.filter-submit-button,
.filter-clear-button {
    min-height: 38px;
    border-radius: 10px;
    padding: 8px 12px;
    font-weight: 600;
    font-size: 0.85rem;
}

.filter-submit-button {
    gap: 6px;
    box-shadow: 0 8px 16px rgba(79, 70, 229, 0.14);
}

.filter-clear-button {
    justify-content: center;
    gap: 8px;
}

.reservation-filters input,
.reservation-filters select {
    border-radius: 10px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
    font-size: 0.9rem;
    padding: 10px 12px;
}

.reservation-filters input:focus,
.reservation-filters select:focus {
    outline: none;
    border-color: rgba(79,70,229,0.9);
    box-shadow: 0 0 0 4px rgba(79,70,229,0.08);
    transform: translateY(-1px);
}

@media (max-width: 900px) {
    .reservation-filters-grid,
    .reservation-filters-grid-three {
        grid-template-columns: 1fr;
    }

    .reservation-search-wrap {
        grid-column: span 1;
    }

    .filter-submit-button,
    .filter-clear-button,
    .reservation-filters select {
        width: 100%;
    }
}


.reservation-filters > .reservation-filters-grid {
    display: grid;
    gap: 12px;
}

.reservation-filters > .reservation-count {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.reservation-count {
    padding: 12px 14px;
    background: #eef2ff;
    border-radius: 14px;
    border: 1px solid #dbeafe;
    color: #1d4ed8;
    font-weight: 700;
}

.selected-room-label-header {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
}

.selected-room-label-title {
    font-size: 0.94rem;
    font-weight: 700;
    color: #334155;
}

.selected-room-label {
    display: inline-block;
    margin-bottom: 16px;
    padding: 12px 14px;
    background: #f8fafc;
    border-radius: 12px;
    color: var(--text);
    border: 1px solid #e2e8f0;
}

.role-card,
.staff-profile-card,
.staff-roster-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.role-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.role-card-eyebrow {
    display: inline-flex;
    align-items: center;
    margin-bottom: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.permission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.permission-card {
    padding: 18px;
    border-radius: 22px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.06);
}

.permission-card-title {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.permission-card-title strong {
    font-size: 0.95rem;
    line-height: 1.3;
}

.permission-card-title span {
    color: var(--muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.dashboard-widget-group {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
}

.dashboard-widget-header strong {
    display: block;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #334155;
    margin-bottom: 8px;
}

.dashboard-widget-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 8px;
}

.dashboard-widget-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    font-size: 0.78rem;
    color: #334155;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dashboard-widget-pill:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.08);
}

.dashboard-widget-pill input {
    margin: 0;
    accent-color: var(--primary);
}

.permission-summary-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.permission-summary-header span {
    color: var(--muted);
    font-size: 0.82rem;
}

.role-library-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.role-library-card {
    padding: 14px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.role-library-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.role-library-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    width: 100%;
}

.role-library-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.role-library-panel-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.role-library-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
}

.role-library-stats .permission-toggle {
    margin-left: auto;
}

.role-library-card.collapsed .permission-detail-list {
    display: none;
}

.permission-toggle {
    width: 40px;
    min-width: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
}

.permission-toggle i {
    transition: transform 0.2s ease;
}

.role-library-card.collapsed .permission-toggle i {
    transform: rotate(180deg);
}

.role-library-actions {
    display: none;
}

.icon-button {
    width: 40px;
    min-width: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.icon-button .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.role-assigned-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
    font-size: 0.8rem;
    font-weight: 700;
}

.role-delete-note {
    margin-top: 10px;
    color: #475569;
    font-size: 0.85rem;
    line-height: 1.5;
}

.role-edit-input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: var(--text);
}

.role-edit-input-sm {
    font-size: 0.92rem;
}

.role-library-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}

.permission-detail-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.permission-detail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
}

.permission-detail-module {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 120px;
}

.permission-detail-module span {
    color: var(--muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.permission-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.permission-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.permission-pill,
.dashboard-widget-pill {
    position: relative;
    cursor: pointer;
}

.permission-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 0.78rem;
    color: var(--text);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.permission-pill:hover,
.dashboard-widget-pill:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.08);
    border-color: rgba(79, 70, 229, 0.18);
    background: #eff4ff;
}

.permission-pill:has(input:checked),
.permission-pill.checked,
.dashboard-widget-pill:has(input:checked),
.dashboard-widget-pill.checked {
    border-color: rgba(79, 70, 229, 0.85);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.18);
    background: #eef2ff;
}

.permission-pill:has(input:checked) span,
.permission-pill.checked span,
.dashboard-widget-pill:has(input:checked) span,
.dashboard-widget-pill.checked span {
    color: var(--text);
}

.permission-pill.granted {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.25);
    color: #047857;
}

.permission-pill.denied {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #475569;
}

.permission-pill input,
.dashboard-widget-pill input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

.staff-filter-panel {
    margin-top: 18px;
    padding: 16px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.staff-filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.staff-filter-controls input,
.staff-filter-controls select {
    min-width: 180px;
}

.roster-table-wrapper {
    margin-top: 16px;
    overflow-x: auto;
}

.row-action-group {
    display: inline-flex;
    gap: 8px;
}

.permission-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.permission-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 700;
}

.pagination-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    margin-top: 16px;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: var(--text);
    font-weight: 600;
}

.pagination-link.active,
.pagination-link:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.sort-link {
    color: inherit;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.sort-link:hover {
    color: var(--primary);
}

.staff-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.staff-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.staff-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: var(--text);
    font-weight: 600;
    transition: all 0.2s ease;
}

.staff-action-btn.active,
.staff-action-btn:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.slide-panel-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.38);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 40;
}

.slide-panel-backdrop.visible {
    opacity: 1;
    visibility: visible;
}

.slide-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: min(520px, 100%);
    height: 100vh;
    background: var(--surface);
    box-shadow: -16px 0 40px rgba(15, 23, 42, 0.16);
    z-index: 50;
    transform: translateX(100%);
    opacity: 0;
    transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), opacity 220ms ease;
    display: flex;
    flex-direction: column;
    will-change: transform, opacity;
}

.slide-panel.wide {
    width: min(680px, 100%);
}

.slide-panel.open {
    transform: translateX(0);
    opacity: 1;
}

.slide-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 24px 24px 16px;
    border-bottom: 1px solid #e2e8f0;
}

.slide-panel-body {
    padding: 20px 24px 24px;
    overflow-y: auto;
}

/* Custom slim scrollbar for order cart panel body */
.slide-panel-body::-webkit-scrollbar {
    width: 2px;
}

.slide-panel-body::-webkit-scrollbar-track {
    background: transparent;
}

.slide-panel-body::-webkit-scrollbar-thumb {
    background: rgba(15,23,42,0.15);
    border-radius: 999px;
}

.slide-panel-body::-webkit-scrollbar-thumb:hover {
    background: rgba(15,23,42,0.25);
}

.slide-panel-body {
    scrollbar-width: thin;
    scrollbar-color: rgba(15,23,42,0.15) transparent;
}

/* Order details panel specific styling */
.fnb-order-details-panel {
    width: min(500px, 100%);
}

.fnb-order-details-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.fnb-order-detail-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.fnb-order-detail-section:last-child {
    border-bottom: none;
}

.fnb-order-detail-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.fnb-order-detail-value {
    font-size: 1rem;
    color: #0f172a;
}

.fnb-order-items-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fnb-order-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #f8fafc;
    border-radius: 6px;
    font-size: 0.9rem;
}

.fnb-order-item-name {
    font-weight: 500;
    flex: 1;
    color: #0f172a;
}

.fnb-order-item-qty {
    color: #64748b;
    margin: 0 8px;
}

.fnb-order-item-total {
    font-weight: 600;
    color: #0f172a;
    min-width: 70px;
    text-align: right;
}

.fnb-order-summary {
    background: #f0f9ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fnb-order-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
}

.fnb-order-summary-row.total {
    font-weight: 700;
    font-size: 1.1rem;
    color: #0f172a;
    border-top: 1px solid #bfdbfe;
    padding-top: 8px;
    margin-top: 4px;
}

.fnb-order-guest-info {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #78350f;
}

.fnb-order-detail-section h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
}

.fnb-location-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    background: rgba(15, 23, 42, 0.45);
}

.fnb-location-modal.fnb-hidden {
    display: none;
}

/* Hide header toggle when location modal is open */
.standalone-pos:has(.fnb-location-modal:not(.fnb-hidden)) .pos-header-toggle {
    display: none !important;
}

.fnb-location-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
}

.fnb-location-modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 22px;
    max-width: 720px;
    width: min(100%, 720px);
    padding: 30px;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.18);
    z-index: 1;
}

.fnb-location-modal-header h2 {
    margin: 0 0 8px;
    font-size: 1.55rem;
}

.fnb-location-modal-header p {
    margin: 0;
    color: #64748b;
}

.fnb-location-card-grid {
    margin-top: 20px;
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.fnb-location-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    padding: 24px;
    border-radius: 20px;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    color: #0f172a;
    font: inherit;
    cursor: pointer;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.fnb-location-card:hover {
    transform: translateY(-2px);
    border-color: #c7d2fe;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
}

.fnb-location-card strong {
    font-size: 1rem;
    margin-bottom: 8px;
}

.fnb-location-card span {
    color: #475569;
    font-size: 0.88rem;
}

.fnb-draft-modal {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    place-items: center;
    background: rgba(15, 23, 42, 0.45);
}

.fnb-draft-modal.fnb-hidden {
    display: none;
}

.fnb-draft-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.fnb-draft-modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 24px;
    width: min(100%, 680px);
    max-height: min(90vh, 720px);
    padding: 24px;
    overflow-y: auto;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.16);
    z-index: 1;
}

.fnb-draft-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.fnb-draft-card-grid {
    display: grid;
    gap: 16px;
}

.fnb-draft-card {
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 18px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    background: #f8fafc;
}

.fnb-draft-card strong {
    display: block;
    margin-bottom: 8px;
}

.fnb-draft-card .button-small {
    padding: 8px 12px;
    font-size: 0.82rem;
}

.inventory-panel-form {
    display: none;
}

.inventory-panel-form.active {
    display: block;
}

.panel-close-btn {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    color: var(--text);
    font-size: 1.4rem;
}

.profile-card {
    display: grid;
    gap: 10px;
}

.profile-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
}

.profile-row:last-child {
    border-bottom: none;
}

.profile-row span {
    color: var(--muted);
    text-align: right;
}

.button-danger {
    background: var(--danger);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 12px 18px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.muted-text {
    color: var(--muted);
}

.card {
    background: var(--surface);
    border: 1px solid #edf2f7;
    border-radius: 10px;
    padding: 14px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 45px rgba(15, 23, 42, 0.09);
}

.metric-card,
.report-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 150px;
    border-radius: 10px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    position: relative;
    overflow: hidden;
}

.metric-card::before,
.report-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(79, 70, 229, 0.035), transparent 55%);
    pointer-events: none;
}

.metric-card h3,
.report-card h3 {
    margin: 0;
    color: #64748b;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.72rem;
    font-weight: 700;
}

.metric-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.metric-top-copy {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.metric-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(79, 70, 229, 0.08);
    color: #4f46e5;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.metric-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: inline-grid;
    place-items: center;
    color: #fff;
    font-size: 1rem;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
    flex-shrink: 0;
}

.metric-icon i {
    display: inline-block;
    color: #fff;
    font-size: 1.05rem;
    line-height: 1;
}

.metric-guest .metric-icon { background: linear-gradient(135deg,#06b6d4,#0ea5e9); }
.metric-available .metric-icon { background: linear-gradient(135deg,#34d399,#10b981); }
.metric-occupancy .metric-icon { background: linear-gradient(135deg,#7c3aed,#5b21b6); }
.metric-occupied .metric-icon { background: linear-gradient(135deg,#fb923c,#f97316); }
.metric-outstanding .metric-icon { background: linear-gradient(135deg,#f97316,#dc2626); }
.metric-checkin .metric-icon { background: linear-gradient(135deg,#34d399,#059669); }
.metric-checkout .metric-icon { background: linear-gradient(135deg,#60a5fa,#2563eb); }
.metric-advance .metric-icon { background: linear-gradient(135deg,#facc15,#f59e0b); }
.metric-info .metric-icon { background: linear-gradient(135deg,#3b82f6,#2563eb); }
.metric-success .metric-icon { background: linear-gradient(135deg,#34d399,#10b981); }
.metric-warning .metric-icon { background: linear-gradient(135deg,#fbbf24,#f59e0b); }
.metric-danger .metric-icon { background: linear-gradient(135deg,#f87171,#dc2626); }

.occupancy-bar {
    height: 8px;
    background: #eef2ff;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 10px;
}
.occupancy-fill {
    height: 100%;
    background: linear-gradient(90deg,#7c3aed,#4f46e5);
    width: 0%;
    transition: width 600ms cubic-bezier(.2,.9,.2,1);
}

.metric-card p,
.report-card p {
    font-size: 1.8rem;
    margin: 10px 0 0;
    color: #0f172a;
    line-height: 1.02;
    font-weight: 700;
}

.metric-caption {
    margin-top: 8px;
    color: #64748b;
    font-size: 0.8rem;
}

.full-card {
    width: 100%;
}

.customers-card {
    padding: 10px;
}

.customers-table-wrap {
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
}

.customers-table {
    font-size: 0.86rem;
    table-layout: fixed;
    min-width: 680px;
}

.customers-table th:nth-child(1),
.customers-table td:nth-child(1) { width: 34%; }

.customers-table th:nth-child(2),
.customers-table td:nth-child(2) { width: 30%; }

.customers-table th:nth-child(3),
.customers-table td:nth-child(3) { width: 18%; }

.customers-table th:nth-child(4),
.customers-table td:nth-child(4) { width: 18%; }

.customers-table th,
.customers-table td {
    padding: 12px 14px;
}

.customers-table th {
    font-size: 0.74rem;
    letter-spacing: 0.06em;
}

.customers-table td {
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.customers-table .customer-name-cell {
    min-width: 0;
}

.customers-table .customer-name-cell > div {
    min-width: 0;
    overflow: hidden;
}

.customers-table .customer-name,
.customers-table .customer-subtext {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: transparent;
}

.table th,
.table td {
    text-align: left;
    padding: 14px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.table th {
    color: #334155;
    font-weight: 700;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: #f8fafc;
}

.table tbody tr:hover {
    background: #f8fafc;
}

.table td {
    color: #475569;
    font-size: 0.9rem;
}

.reservations-page .table th,
.reservations-page .table td {
    font-size: 0.8rem;
    padding: 14px 16px;
}

.reservations-page .table th {
    letter-spacing: 0.06em;
}

.reservations-page .button-primary {
    padding: 10px 14px;
    font-size: 0.85rem;
}

.reservations-page .action-button {
    width: 32px;
    height: 32px;
    border-radius: 12px;
}

.reservations-page .action-button i,
.reservations-page .button-primary i {
    font-size: 0.75rem;
}

.table td .status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: capitalize;
    min-width: 98px;
    white-space: nowrap;
    border: 1px solid transparent;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.table td .status:hover {
    transform: translateY(-1px);
}

.dashboard-recent-card .table {
    table-layout: fixed;
    font-size: 0.82rem;
}

.dashboard-recent-card .table th,
.dashboard-recent-card .table td {
    padding: 10px 12px;
}

.dashboard-recent-card .table th {
    font-size: 0.72rem;
}

.dashboard-recent-card .table td {
    font-size: 0.78rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dashboard-recent-card .table td .status {
    padding: 4px 8px;
    font-size: 0.72rem;
}

.dashboard-quick-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 14px;
}

/* Ensure each quick-action card fills its grid cell equally */
.dashboard-quick-actions .quick-action-card {
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

.quick-action-card {
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.quick-action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 26px 54px rgba(15, 23, 42, 0.12);
}

.quick-action-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    color: #0f172a;
    background: transparent;
    width: 100%;
    box-sizing: border-box;
    border-top-left-radius: 22px;
    border-top-right-radius: 22px;
    position: relative;
    z-index: 1;
}

.quick-action-header.quick-arrival {
    /* Arrival strip: blue tones */
    background: linear-gradient(135deg, rgba(37,99,235,0.16) 0%, rgba(59,130,246,0.08) 100%);
}

.quick-action-header.quick-departure {
    /* Departure strip: red tones */
    background: linear-gradient(135deg, rgba(220,38,38,0.16) 0%, rgba(239,68,68,0.08) 100%);
}

.quick-action-header h3 {
    margin: 0 0 4px;
    font-size: 0.86rem;
    line-height: 1.1;
}

.quick-action-header p {
    margin: 0;
    font-size: 0.72rem;
    color: #475569;
    max-width: 200px;
}

.quick-action-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    border-radius: 999px;
    background: rgba(255,255,255,0.9);
    color: #111827;
    font-size: 0.72rem;
    font-weight: 700;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.04);
}

.quick-action-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px 12px;
}

/* Make each room/entry occupy full width inside the card */
.quick-action-list .quick-action-item {
    width: 100%;
    box-sizing: border-box;
}

/* Style the empty state to use the same header gradient so it visually matches the card top */
.quick-action-card.quick-arrival .quick-action-empty {
    background: linear-gradient(135deg, rgba(37,99,235,0.16) 0%, rgba(59,130,246,0.08) 100%);
    padding: 12px;
    border-radius: 10px;
    color: #0f172a;
    text-align: center;
}
.quick-action-card.quick-departure .quick-action-empty {
    background: linear-gradient(135deg, rgba(220,38,38,0.16) 0%, rgba(239,68,68,0.08) 100%);
    padding: 12px;
    border-radius: 10px;
    color: #0f172a;
    text-align: center;
}

.quick-action-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.12);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
    transition: transform 0.12s ease, border-color 0.12s ease;
}

.quick-action-item:hover {
    transform: translateY(-1px);
    border-color: rgba(79, 70, 229, 0.18);
}

.quick-action-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.quick-action-meta strong {
    font-size: 0.86rem;
    color: #0f172a;
    line-height: 1.1;
}

.quick-action-room {
    font-size: 0.66rem;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.quick-action-time {
    font-size: 0.66rem;
    color: #64748b;
}

.quick-action-meta span {
    font-size: 0.66rem;
    color: #64748b;
}

.quick-action-meta .quick-action-status,
.quick-action-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #ffffff;
    background: #dc2626;
    margin-top: 2px;
    box-shadow: 0 6px 18px rgba(220, 38, 38, 0.16);
}

.quick-action-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    font-size: 0.72rem;
    color: #ffffff;
    background: #4338ca;
    border-radius: 999px;
    text-decoration: none;
    transition: background 0.12s ease, transform 0.12s ease;
}

.quick-action-button:hover {
    background: #3730a3;
    transform: translateY(-1px);
}

.quick-action-button .fa-arrow-right {
    font-size: 0.85rem;
}

.button-danger {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    color: #ffffff;
    border: 1px solid transparent;
    border-radius: 10px;
    text-decoration: none;
}

.button-danger:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
    color: #ffffff;
}

.quick-action-empty {
    padding: 10px;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    color: #64748b;
    text-align: center;
    font-size: 0.82rem;
}

.dashboard-chart-card {
        display: flex;
        flex-direction: column;
        gap: 18px;
        padding: 20px;
    }

    .dashboard-chart-top {
        display: flex;
        justify-content: space-between;
        gap: 20px;
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .dashboard-chart-top > div:first-child {
        flex: 1 1 320px;
        min-width: 0;
    }

    .dashboard-chart-top-controls {
        display: flex;
        gap: 16px;
        flex-wrap: nowrap;
        align-items: flex-start;
        justify-content: flex-end;
    }

    .dashboard-chart-label {
        display: inline-block;
        text-transform: uppercase;
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.14em;
        color: #6b7280;
        margin-bottom: 8px;
    }

    .dashboard-chart-title {
        margin: 0;
        font-size: 1.1rem;
        color: #111827;
    }

    .dashboard-chart-copy {
        margin: 6px 0 0;
        color: #475569;
        font-size: 0.92rem;
        max-width: 520px;
    }

    .dashboard-chart-top-controls {
        display: flex;
        flex-direction: column;
        gap: 24px;
        align-items: flex-end;
        justify-content: flex-end;
    }

    .dashboard-chart-date-range {
        margin-bottom: 8px;
    }

    .dashboard-chart-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        align-items: center;
    }

    .dashboard-chart-current-period {
        font-size: 0.82rem;
        color: #475569;
        text-align: center;
        min-width: 112px;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        bottom: -20px;
        z-index: 2;
    }

    .dashboard-period-badge {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 6px 10px;
        border-radius: 999px;
        background: var(--primary);
        color: #ffffff;
        font-weight: 700;
        box-shadow: 0 6px 18px rgba(79,70,229,0.12);
        font-size: 0.85rem;
        position: relative;
    }

    .dashboard-period-badge::after {
        content: "";
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        bottom: -14px;
        width: 600px;
        max-width: calc(100% - 160px);
        height: 1px;
        background: rgba(15,23,42,0.06);
        border-radius: 1px;
        pointer-events: none;
    }

    .dashboard-chart-top { position: relative; padding-bottom: 28px; }

    .chart-range-button {
        padding: 8px 10px;
        border-radius: 999px;
        font-size: 0.76rem;
        min-width: 80px;
        text-align: center;
        transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    }

    .chart-range-button.is-active,
    .chart-range-button:hover {
        background: #4338ca;
        color: #ffffff;
        border-color: transparent;
    }

    .dashboard-chart-date-range {
        display: flex;
        gap: 12px;
        align-items: flex-end;
        flex-wrap: nowrap;
        min-width: 300px;
    }

    .dashboard-chart-date-range label {
        display: grid;
        gap: 2px;
        font-size: 0.68rem;
        color: #475569;
    }

    .dashboard-chart-date-range input {
        width: 100%;
        padding: 6px 8px;
        border-radius: 10px;
        border: 1px solid #d1d5db;
        background: #ffffff;
        font-size: 0.76rem;
        line-height: 1.2;
    }

    .dashboard-chart-date-range .button-primary {
        width: auto;
        padding: 8px 12px;
        font-size: 0.82rem;
    }

    .dashboard-chart-settings {
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
        gap: 18px;
        flex-wrap: wrap;
    }

    .dashboard-chart-meta {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px;
        flex: 1 1 600px;
        min-width: 0;
    }

    .dashboard-chart-meta div {
        background: #f8fafc;
        border-radius: 14px;
        padding: 12px 14px;
        display: flex;
        flex-direction: column;
        gap: 6px;
        position: relative;
        overflow: visible;
    }

    .dashboard-chart-meta span {
        font-size: 0.72rem;
        color: #64748b;
        text-transform: uppercase;
        letter-spacing: 0.08em;
    }

    .dashboard-chart-meta strong {
        font-size: 1rem;
        color: #0f172a;
    }

    .dashboard-chart-meta .meta-item {
        position: relative;
        padding-left: 14px;
        margin-top: 12px;
    }

    .dashboard-chart-meta .meta-item.meta-revenue { border-left: 4px solid var(--primary); }
    .dashboard-chart-meta .meta-item.meta-income { border-left: 4px solid #16a34a; }
    .dashboard-chart-meta .meta-item.meta-expense { border-left: 4px solid #dc2626; }

    .dashboard-chart-meta .meta-item .meta-dot {
        position: absolute;
        top: 10px;
        right: 10px;
        width: 10px;
        height: 10px;
        border-radius: 999px;
        box-shadow: 0 6px 14px rgba(2,6,23,0.06);
    }

    .dashboard-chart-meta .meta-item.meta-revenue .meta-dot { background: var(--primary); }
    .dashboard-chart-meta .meta-item.meta-income .meta-dot { background: #16a34a; }
    .dashboard-chart-meta .meta-item.meta-expense .meta-dot { background: #dc2626; }

    .dashboard-chart-wrap {
        min-height: 320px;
    }

.customer-name-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.customer-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: linear-gradient(135deg, #4f46e5, #2563eb);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.customer-name {
    font-weight: 700;
    color: #0f172a;
}

.customer-subtext {
    font-size: 0.72rem;
    color: #64748b;
    margin-top: 2px;
}

.customer-actions {
    display: flex;
    gap: 6px;
}

.customer-row {
    cursor: pointer;
}

.customer-row:hover {
    background: #f8fafc;
}

.customer-details-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.28);
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
    z-index: 40;
}

.customer-details-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.customer-details-panel {
    position: fixed;
    top: 0;
    right: -620px;
    width: min(560px, 100%);
    height: 100vh;
    background: #ffffff;
    box-shadow: -20px 0 45px rgba(15, 23, 42, 0.16);
    z-index: 50;
    transition: right 220ms ease;
    display: flex;
    flex-direction: column;
}

.customer-details-panel.open {
    right: 0;
}

.customer-details-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.customer-details-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.customer-details-label {
    margin: 0 0 4px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.68rem;
    color: #64748b;
}

.customer-details-header h3 {
    margin: 0;
    font-size: 1rem;
    color: #0f172a;
}

.customer-details-close {
    border: none;
    background: #f8fafc;
    color: #334155;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    cursor: pointer;
}

.customer-details-body {
    padding: 18px 20px 24px;
    overflow-y: auto;
}

.customer-details-loading {
    color: #64748b;
    font-size: 0.9rem;
}

.customer-details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.customer-detail-block {
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.customer-detail-label {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    margin-bottom: 6px;
}

.customer-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: capitalize;
}

.customer-status-pill.checked-in {
    background: rgba(16, 185, 129, 0.12);
    color: #065f46;
}

.customer-status-pill.checked-out {
    background: rgba(239, 68, 68, 0.12);
    color: #991b1b;
}

.customer-contact-list {
    display: grid;
    gap: 6px;
    font-size: 0.9rem;
    color: #334155;
}

.customer-balance-due {
    color: var(--danger);
}

.customer-id-preview {
    margin-top: 10px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
}

.customer-id-preview img {
    display: block;
    width: 100%;
    max-height: 260px;
    object-fit: cover;
}

.customer-id-preview-file,
.customer-id-preview-empty {
    margin-top: 10px;
    padding: 12px;
    border-radius: 12px;
    border: 1px dashed #cbd5e1;
    background: #f8fafc;
    color: #334155;
}

.customer-id-preview-file a {
    display: inline-flex;
    margin-top: 8px;
    color: var(--primary);
    font-weight: 600;
}

.customer-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    margin-top: 6px;
}

.customer-history-table-wrap {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
}

.customer-orders-table,
.customer-payments-table {
    min-width: 560px;
    border-collapse: separate;
    border-spacing: 7px 0;
    margin-left: -7px;
    width: calc(100% + 14px);
}

.customer-orders-table th,
.customer-orders-table td,
.customer-payments-table th,
.customer-payments-table td {
    white-space: nowrap;
}

.customer-history-date,
.customer-history-time {
    display: block;
}

.customer-history-time {
    margin-top: 3px;
    color: #64748b;
    font-size: 0.72rem;
}

.customer-order-status {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
}

.customer-order-status-settled {
    background: rgba(16, 185, 129, 0.14);
    color: #047857;
}

.customer-order-status-not-cleared {
    background: rgba(239, 68, 68, 0.14);
    color: #b91c1c;
}

.customer-order-status-partial {
    background: rgba(234, 179, 8, 0.16);
    color: #a16207;
}

.customer-history-table th,
.customer-history-table td {
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

.customer-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: capitalize;
}

.customer-status-badge-checked-in {
    background: rgba(16, 185, 129, 0.12);
    color: #065f46;
}

.customer-status-badge-checked-out {
    background: rgba(239, 68, 68, 0.12);
    color: #991b1b;
}

.customer-history-empty {
    color: #64748b;
    padding: 10px 0 0;
}

body.customer-panel-open {
    overflow: hidden;
}

.status-active {
    background: rgba(16, 185, 129, 0.12);
    color: #065f46;
    border-color: rgba(16, 185, 129, 0.24);
}

.status-pending {
    background: rgba(234, 179, 8, 0.12);
    color: #92400e;
    border-color: rgba(234, 179, 8, 0.24);
}

.status-checked-out {
    background: rgba(239, 68, 68, 0.12);
    color: #991b1b;
    border-color: rgba(239, 68, 68, 0.24);
}

.status-cancelled {
    background: rgba(148, 163, 184, 0.12);
    color: #334155;
    border-color: rgba(148, 163, 184, 0.24);
}


.page-header h2 {
    margin: 0;
}

.settings-card {
    max-width: none;
    width: 100%;
}

.compact-form-card {
    padding: 22px;
    width: 100%;
    max-width: none;
    margin: 0;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 24px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.06);
}

.form-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 8px 4px 16px;
    margin-bottom: 6px;
}

.form-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    color: #4f46e5;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.form-hero h3 {
    margin: 0 0 4px;
    font-size: 1.22rem;
}

.form-hero p {
    margin: 0;
    color: #64748b;
    font-size: 0.92rem;
}

.form-hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 0.74rem;
    font-weight: 600;
}

.compact-settings-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.compact-grid {
    display: grid;
    gap: 14px;
}

.compact-grid + .compact-grid {
    margin-top: 2px;
}

.compact-grid.two-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-grid.three-cols {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.compact-settings-form label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 5px;
}

.compact-settings-form input,
.compact-settings-form select,
.compact-settings-form textarea {
    width: 100%;
    padding: 10px 12px;
    font-size: 0.86rem;
    border-radius: 12px;
}

.field-group {
    display: flex;
    flex-direction: column;
}

.field-group input.is-invalid,
.field-group select.is-invalid,
.field-group textarea.is-invalid {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.field-error {
    min-height: 14px;
    margin-top: 4px;
    color: #dc2626;
    font-size: 0.72rem;
}

.compact-settings-form .form-step {
    display: none;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: linear-gradient(135deg, #fbfdff 0%, #f7faff 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.85);
    transition: transform 220ms ease, box-shadow 220ms ease;
}

.compact-settings-form .form-step.active {
    display: block;
    animation: formStepFade 220ms ease;
}

.form-step-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.form-step-header h4 {
    margin: 0 0 2px;
    font-size: 0.98rem;
}

.form-step-header p {
    margin: 0;
    color: #64748b;
    font-size: 0.8rem;
}

.step-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 0.72rem;
    font-weight: 700;
}

.step-pill.muted {
    background: #f1f5f9;
    color: #475569;
}

.form-progress-shell {
    margin-bottom: 10px;
}

.compact-timeline {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.compact-timeline .timeline-step {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 8px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 600;
}

.compact-timeline .timeline-step.active {
    background: linear-gradient(135deg, #4f46e5 0%, #2563eb 100%);
    color: #ffffff;
}

.compact-timeline .step-number {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255,255,255,0.25);
    font-size: 0.68rem;
}

.timeline-progress {
    height: 6px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.timeline-fill {
    height: 100%;
    background: linear-gradient(90deg, #4f46e5, #2563eb);
    transition: width 220ms ease;
}

.compact-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}

.compact-actions .button-primary,
.compact-actions .button-outline {
    padding: 8px 12px;
    font-size: 0.78rem;
    border-radius: 10px;
}

.form-help {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 0.76rem;
}

.form-validation-hint {
    margin: 4px 0 8px;
    color: #64748b;
    font-size: 0.78rem;
}

.form-validation-message {
    margin-bottom: 8px;
}

.upload-field input[type="file"] {
    display: none;
}

.upload-zone {
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    padding: 14px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.upload-zone-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.upload-zone-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 1.1rem;
}

.upload-zone-copy {
    flex: 1;
}

.upload-zone-copy strong {
    display: block;
    font-size: 0.9rem;
    color: #0f172a;
}

.upload-zone-copy p {
    margin: 2px 0 0;
    font-size: 0.78rem;
    color: #64748b;
}

.upload-zone-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: #4f46e5;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
}

.upload-preview-shell {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.upload-preview-media {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    overflow: hidden;
    background: #eef2ff;
}

.upload-preview-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-preview-placeholder {
    color: #64748b;
    font-size: 0.74rem;
    text-align: center;
}

.upload-preview-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.upload-preview-meta strong {
    font-size: 0.82rem;
    color: #0f172a;
}

.upload-preview-meta span {
    font-size: 0.74rem;
    color: #64748b;
}

.upload-progress-shell {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.upload-progress-timeline {
    display: flex;
    gap: 8px;
}

.upload-step {
    flex: 1;
    text-align: center;
    padding: 5px 6px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 600;
    transition: all 220ms ease;
}

.upload-step.active {
    background: #eef2ff;
    color: #4338ca;
}

.upload-step.done {
    background: #dcfce7;
    color: #166534;
}

.upload-progress-bar {
    width: 100%;
    height: 7px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.upload-progress-fill {
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #4f46e5, #2563eb);
    transition: width 220ms ease;
}

.upload-progress-status {
    font-size: 0.74rem;
    color: #475569;
}

@keyframes formStepFade {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 900px) {
    .compact-grid.three-cols {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .compact-form-card {
        padding: 16px;
    }

    .form-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .compact-grid.two-cols,
    .compact-grid.three-cols {
        grid-template-columns: 1fr;
    }

    .form-step-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .compact-actions {
        flex-wrap: wrap;
    }

    .compact-actions .button-primary,
    .compact-actions .button-outline {
        flex: 1 1 100%;
    }
}

.room-form-card {
    max-width: none;
    width: 100%;
    padding: 0;
    border: none;
    box-shadow: none;
    background: transparent;
}

.form-step-inner {
    background: var(--surface);
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
    border-radius: 26px;
    padding: 28px 30px;
}

.field-card-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.field-card {
    background: var(--surface-strong);
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    padding: 20px 22px;
}

.field-card-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.field-card-header h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--text);
}

.field-card-header p {
    margin: 0;
    color: var(--muted);
    font-size: 0.94rem;
    line-height: 1.5;
}

.reservation-type-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 8px;
}

.reservation-type-options label {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    border: 1px solid #d1d5db;
    border-radius: 18px;
    background: #ffffff;
    cursor: pointer;
    transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.reservation-type-options label:hover {
    background: #f8fafc;
    border-color: rgba(79, 70, 229, 0.35);
}

.reservation-type-options label input {
    accent-color: var(--primary);
    margin-top: 4px;
}

.reservation-type-options label div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.reservation-type-options label span {
    font-size: 0.98rem;
    font-weight: 700;
}

.reservation-type-options label small {
    color: var(--muted);
    font-size: 0.87rem;
    line-height: 1.4;
}

.reservation-type-options label input:checked ~ div {
    color: var(--text);
}

.reservation-type-options label input:checked {
    border-color: transparent;
}

.reservation-type-options label input:checked + div,
.reservation-type-options label input:checked ~ div {
    color: var(--primary);
}

.rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    justify-content: start;
    gap: 12px;
    margin-top: 12px;
}

.room-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.06);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.room-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 42px rgba(15, 23, 42, 0.12);
}

.room-card.room-unavailable {
    cursor: not-allowed;
    opacity: 0.82;
}

.room-card-header {
    position: relative;
    min-height: 90px;
    height: 90px;
    overflow: hidden;
}

.room-card-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #ffffff;
    font-weight: 700;
    font-size: 1.25rem;
}

.room-card-badge {
    position: absolute;
    left: 14px;
    bottom: 14px;
    background: rgba(15, 23, 42, 0.8);
    color: #fff;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
}

.room-card-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px 18px 16px;
}

.room-card-body h3 {
    margin: 0;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
}

.room-card-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #ffffff;
    background: #dc2626;
    margin-top: 10px;
}

.room-card-body p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
    font-size: 0.93rem;
}

.room-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: auto;
}

.room-card-actions {
    display: flex;
    padding: 0 18px 18px;
}

.room-card-actions button {
    width: 100%;
    border-radius: 14px;
}

.room-card.room-selected {
    border-color: var(--primary);
    box-shadow: 0 18px 42px rgba(79, 70, 229, 0.12);
}

.room-card.room-selected .room-card-badge {
    background: var(--primary);
}

.room-card.room-selected .select-room-button {
    background: var(--primary);
    color: #ffffff;
    border-color: transparent;
}

.room-card.room-selected .select-room-button:hover {
    background: #4338ca;
}

.selected-room-label-header {
    background: #f8fafc;
    border-radius: 18px;
    padding: 16px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-top: 18px;
    border: 1px solid #e2e8f0;
}

.selected-room-label-title {
    font-weight: 700;
}

.selected-room-label {
    color: var(--muted);
}

.form-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 0 24px 24px;
}

@media (max-width: 900px) {
    .form-actions { flex-direction: column; }
    .form-step-inner { padding: 22px; }
    .reservation-type-options { flex-direction: column; }
    .section-heading { flex-direction: column; align-items: stretch; }
    .rooms-grid {
        grid-template-columns: repeat(2, minmax(200px, 1fr));
        justify-content: start;
    }
}

.form-timeline {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 12px;
    align-items: center;
    margin-bottom: 24px;
    padding: 22px 24px 0;
}

.timeline-step {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: var(--muted);
    min-width: 100px;
}

.timeline-step.active {
    color: var(--text);
}

.timeline-step .step-number {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: #f1f5f9;
    font-weight: 700;
    color: var(--muted);
}

.timeline-step.active .step-number {
    background: var(--primary);
    color: #ffffff;
}

.timeline-step .step-label {
    font-size: 0.85rem;
    font-weight: 600;
}

.timeline-progress {
    height: 8px;
    border-radius: 999px;
    background: #eef2ff;
    overflow: hidden;
}

.timeline-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg,#7c3aed,#4f46e5);
    transition: width 300ms ease;
}

.form-steps {
    width: 100%;
}

.form-step {
    display: none;
    padding: 0 24px 24px;
}

.form-step.active {
    display: block;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 0 24px 24px;
}

.form-action-group {
    display: flex;
    gap: 12px;
}

.step-summary {
    margin-bottom: 20px;
}

.review-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    padding: 0;
}

.review-summary-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.98), #f8fbff);
    border: 1px solid rgba(148,163,184,0.18);
    border-radius: 18px;
    padding: 16px 18px;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.06);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.review-summary-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.review-summary-label {
    display: block;
    margin-bottom: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #64748b;
}

.review-summary-value {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.4;
    white-space: pre-wrap;
}

.review-summary-room .review-summary-value {
    color: #334155;
    font-weight: 600;
}

@media (max-width: 900px) {
    .review-summary-grid {
        grid-template-columns: 1fr;
    }
}

.form-step label {
    font-weight: 600;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 8px;
}

.form-step input,
.form-step select,
.form-step textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.form-step textarea {
    min-height: 120px;
    resize: vertical;
}

@media (max-width: 900px) {
    .reservation-filters {
        grid-template-columns: 1fr;
    }
    .date-picker-grid {
        grid-template-columns: 1fr;
    }
    .field-card-row {
        grid-template-columns: 1fr;
    }
    .reservation-type-options {
        grid-template-columns: 1fr;
    }
    .form-actions { flex-direction: column; }
    .form-timeline { grid-template-columns: 1fr; gap: 10px; padding: 18px 18px 0; }
    .timeline-step { min-width: auto; }
}

.settings-form {
    display: grid;
    gap: 16px;
}

.settings-form label {
    font-weight: 600;
    color: #334155;
}

.settings-form input,
.settings-form select,
.settings-form textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease, background 180ms ease;
    font-size: 1rem;
    color: var(--text);
}

.settings-form input::placeholder,
.settings-form textarea::placeholder {
    color: #94a3b8;
}

.settings-form input:focus,
.settings-form select:focus,
.settings-form textarea:focus {
    outline: none;
    border-color: rgba(79,70,229,0.9);
    box-shadow: 0 0 0 4px rgba(79,70,229,0.08);
    transform: translateY(-1px);
    background: #ffffff;
}

.settings-form select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #94a3b8 50%), linear-gradient(135deg, #94a3b8 50%, transparent 50%);
    background-position: calc(100% - 18px) calc(1em + 2px), calc(100% - 14px) calc(1em + 2px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 42px;
}

.customer-dropdown {
    position: relative;
}

.customer-dropdown-control {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
    cursor: pointer;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease, background 180ms ease;
}

.customer-dropdown-control:focus {
    outline: none;
    border-color: rgba(79,70,229,0.9);
    box-shadow: 0 0 0 4px rgba(79,70,229,0.08);
    transform: translateY(-1px);
}

.customer-dropdown-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.25);
    background: #f8fafc;
    color: #334155;
    font-size: 1rem;
    cursor: pointer;
    transition: background 180ms ease, transform 180ms ease, border-color 180ms ease;
    order: 2;
}

.customer-dropdown-clear:hover {
    background: #eef2ff;
}

.customer-dropdown-clear.hidden {
    display: none;
}

.customer-dropdown-control span {
    color: var(--text);
    font-size: 1rem;
    min-width: 0;
}

.customer-dropdown-control i {
    color: #64748b;
    font-size: 0.95rem;
    order: 3;
}

.customer-dropdown-control i {
    color: #64748b;
    font-size: 0.95rem;
}

.customer-dropdown-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    z-index: 20;
    overflow: hidden;
}

.customer-dropdown-panel.hidden {
    display: none;
}

.customer-dropdown-panel input {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-bottom: 1px solid #e5e7eb;
    border-radius: 0;
    box-shadow: none;
}

.customer-dropdown-panel input:focus {
    outline: none;
    border-color: rgba(79,70,229,0.9);
}

.customer-dropdown-list {
    max-height: 260px;
    overflow-y: auto;
}

.customer-dropdown-item,
.customer-dropdown-empty {
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    color: #0f172a;
    font-size: 0.95rem;
}

.customer-dropdown-item:hover,
.customer-dropdown-item.selected {
    background: #eef2ff;
}

.customer-dropdown-empty {
    color: #64748b;
    cursor: default;
}

.customer-dropdown-note {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #64748b;
}

.customer-dropdown [hidden] {
    display: none !important;
}

.customer-search-group {
    margin-bottom: 12px;
}

.customer-search-group input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease, background 180ms ease;
    font-size: 1rem;
    color: var(--text);
}

.customer-search-group input:focus {
    outline: none;
    border-color: rgba(79,70,229,0.9);
    box-shadow: 0 0 0 4px rgba(79,70,229,0.08);
    transform: translateY(-1px);
    background: #ffffff;
}

/* Room form redesign */
.room-form-card {
    width: 100%;
}
.room-form-card form {
    display: block;
}
.form-timeline {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.timeline-step {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: default;
    color: var(--muted);
}
.timeline-step .step-number {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: #f1f5f9;
    display: grid;
    place-items: center;
    font-weight: 700;
}
.timeline-step.active .step-number {
    background: var(--primary);
    color: #fff;
}
.timeline-step .step-label { font-size: 0.8rem; }
.timeline-progress { flex: 1; height: 6px; background: #eef2ff; border-radius: 6px; overflow: hidden; }
.timeline-fill { height: 100%; background: linear-gradient(90deg,#7c3aed,#4f46e5); width: 0%; transition: width 360ms ease; }

.form-steps { background: transparent; }
.form-step { padding: 8px 0 0 0; }
.grid.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-step label { font-weight: 600; font-size: 0.85rem; display:block; margin-bottom:6px; }
.form-step input[type="text"], .form-step input[type="number"], .form-step input[type="date"], .form-step select, .form-step textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: linear-gradient(180deg,#ffffff,#f7f9ff);
    box-shadow: inset 0 2px 8px rgba(15,23,42,0.04);
    transition: border-color 180ms ease, box-shadow 200ms ease, transform 180ms ease, background 180ms ease;
    font-size: 0.98rem;
    color: var(--text);
}
.form-step input::placeholder,
.form-step textarea::placeholder {
    color: #94a3b8;
}
.form-step input:focus,
.form-step select:focus,
.form-step textarea:focus {
    outline: none;
    border-color: rgba(79,70,229,0.9);
    box-shadow: 0 10px 30px rgba(79,70,229,0.08), 0 0 0 4px rgba(79,70,229,0.08);
    transform: translateY(-1px);
    background: #ffffff;
}

/* Specific polish for primary fields */
#room_number, #room_type {
    font-weight: 600;
    font-size: 1.02rem;
    letter-spacing: 0.02em;
}

/* Primary emphasized input used by price, room number and room type */
.primary-input {
    font-size: 1.08rem;
    font-weight: 700;
    padding: 14px 16px;
    border-radius: 16px;
    background: linear-gradient(180deg,#ffffff,#eef2ff);
    border: 1px solid rgba(79,70,229,0.17);
    box-shadow: 0 10px 28px rgba(79,70,229,0.08);
    transition: box-shadow 180ms ease, transform 150ms ease, border-color 150ms ease;
}
.primary-input:focus { box-shadow: 0 16px 44px rgba(79,70,229,0.14); border-color: rgba(79,70,229,0.9); transform: translateY(-1px); }
.input-with-icon .primary-input { padding-left: 46px; }

/* Date picker redesign */
.date-picker-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 8px;
}

.date-field {
    position: relative;
    background: linear-gradient(180deg, #ffffff, #f3f6ff);
    border: 1px solid rgba(79,70,229,0.12);
    border-radius: 24px;
    padding: 16px 18px 16px 20px;
    box-shadow: 0 18px 32px rgba(79,70,229,0.05);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.date-field:hover {
    transform: translateY(-1px);
    border-color: rgba(79,70,229,0.24);
    background: linear-gradient(180deg, #ffffff, #eef3ff);
}

.date-field label {
    display: block;
    margin-bottom: 10px;
    font-size: 0.88rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #475569;
}

.calendar-display {
    width: 100%;
    padding: 14px 16px 14px 46px;
    border-radius: 16px;
    border: 1px solid rgba(148,163,184,0.22);
    background: transparent;
    box-shadow: inset 0 1px 2px rgba(15,23,42,0.03);
    font-size: 0.98rem;
    color: var(--text);
    cursor: pointer;
}

.calendar-display:focus {
    outline: none;
    border-color: rgba(79,70,229,0.95);
    box-shadow: 0 10px 26px rgba(79,70,229,0.08);
}

.date-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 999px;
    background: #eef2ff;
    border: 1px solid #dbeafe;
    color: #1e293b;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 18px;
}

.calendar-popup {
    position: absolute;
    z-index: 50;
    width: 100%;
    max-width: 220px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 18px 42px rgba(15,23,42,0.12);
    padding: 10px;
    border: 1px solid rgba(226,232,240,0.95);
    transition: opacity 180ms ease, transform 180ms ease;
    overflow: hidden;
}

.calendar-popup::before {
    content: '';
    position: absolute;
    top: -6px;
    left: var(--calendar-arrow-left, 36px);
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #ffffff;
    filter: drop-shadow(0 -2px 4px rgba(15,23,42,0.08));
}

.calendar-popup-up::before {
    top: auto;
    bottom: -6px;
    left: var(--calendar-arrow-left, 36px);
    transform: translateX(-50%);
    border-bottom: none;
    border-top: 6px solid #ffffff;
    filter: drop-shadow(0 2px 4px rgba(15,23,42,0.08));
}

.calendar-popup.hidden {
    display: none;
}

.calendar-date.empty {
    background: transparent;
    cursor: default;
    pointer-events: none;
}

.calendar-date.disabled {
    opacity: 0.45;
    cursor: not-allowed;
    color: #94a3b8;
    background: transparent;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    padding-bottom: 4px;
    border-bottom: 1px solid #e2e8f0;
}

.calendar-month {
    font-size: 0.96rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #0f172a;
}

.calendar-nav {
    width: 32px;
    height: 32px;
    border-radius: 12px;
    border: 1px solid rgba(148,163,184,0.18);
    background: #f8fafc;
    color: #475569;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background 180ms ease, transform 180ms ease;
}

.calendar-nav:hover {
    background: #eef2ff;
    transform: translateY(-1px);
}

.calendar-weekdays,
.calendar-body {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 3px;
}

.calendar-weekdays {
    background: #f8fafc;
    border-radius: 12px;
    padding: 6px 6px 4px;
}

.calendar-weekdays span {
    font-size: 0.66rem;
    font-weight: 700;
    color: #64748b;
    text-align: center;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.calendar-date {
    border: 1px solid transparent;
    border-radius: 10px;
    min-height: 30px;
    padding: 6px 0;
    background: #ffffff;
    color: #0f172a;
    font-weight: 600;
    cursor: pointer;
    transition: background 180ms ease, color 180ms ease, transform 180ms ease, border-color 180ms ease;
}

.calendar-date:hover {
    background: #eef2ff;
    color: #3730a3;
    transform: translateY(-1px);
}

.calendar-date.today {
    border-color: #c7d2fe;
    color: #1e293b;
}

.calendar-date.selected {
    background: #4338ca;
    color: #ffffff;
    border-color: #4338ca;
}

/* Input-with-icon styles */
.input-group { margin-bottom: 6px; }
.date-field-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #475569;
}

.date-field-label .date-field-icon {
    font-size: 0.95rem;
    color: #4f46e5;
}

.calendar-display {
    width: 100%;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(148,163,184,0.22);
    background: transparent;
    box-shadow: inset 0 1px 2px rgba(15,23,42,0.03);
    font-size: 0.98rem;
    color: var(--text);
    cursor: pointer;
}

.calendar-display::placeholder {
    color: #c7d2fe;
}

/* Make room number visually distinct */
#room_number { text-transform: uppercase; letter-spacing: 0.04em; }

/* Slightly smaller label to keep compact */
.input-group > label { font-size: 0.85rem; font-weight: 600; color: var(--text); margin-bottom:6px; display:block; }

/* compact labels and spacing inside grid columns */
.grid.cols-2 > div { display: flex; flex-direction: column; gap: 10px; }
.form-step textarea { min-height: 90px; resize:vertical; }

.file-drop { border: 1px dashed #dbeafe; border-radius: 12px; padding: 22px; display:flex; align-items:center; justify-content:center; cursor: pointer; background: linear-gradient(180deg, #ffffff, #fbfdff); position:relative; }
.file-drop input[type=file] { position:absolute; opacity:0; width:100%; height:100%; left:0; top:0; cursor:pointer; }
.file-drop-inner { text-align:center; pointer-events:none; }
.file-icon { font-size: 28px; color: #6366f1; margin-bottom:8px; }
.file-text { color: var(--muted); font-weight:600; }
.file-browse { color: var(--primary); text-decoration: underline; cursor: pointer; }
.file-hint { font-size: 0.8rem; color: #94a3b8; margin-top:6px; }

.image-preview { margin-top:12px; display:flex; gap:12px; flex-wrap:wrap; }
.preview-item { position:relative; width:160px; height:110px; border-radius:12px; overflow:hidden; box-shadow: 0 6px 18px rgba(2,6,23,0.06); }
.preview-item img { display:block; width:100%; height:100%; object-fit:cover; }
.preview-item .remove-image { position:absolute; top:8px; right:8px; background: rgba(0,0,0,0.5); border:none; color:#fff; padding:6px 8px; border-radius:8px; cursor:pointer; }
.upload-progress { position:absolute; left:0; right:0; bottom:0; height:6px; background: rgba(255,255,255,0.4); }
.upload-fill { height:100%; width:0%; background: linear-gradient(90deg,#16a34a,#059669); transition:width 420ms ease; }

.form-actions { display:flex; justify-content: flex-end; gap:10px; margin-top:14px; }
.review-grid { display:grid; grid-template-columns: 1fr 1fr 1fr; gap:12px; }
.review-image img { max-width:260px; border-radius:10px; box-shadow:0 8px 20px rgba(2,6,23,0.06); margin-right:8px; }
.review-image { display:flex; align-items:center; gap:8px; }

.field-error { color: #b91c1c; font-size: 0.82rem; margin-top:6px; }
.step-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 18px;
    font-size: 0.96rem;
}
.invalid { box-shadow: 0 0 0 3px rgba(220,38,38,0.06) inset; border-color: #dc2626; }

/* timeline pulse for active step */
.timeline-step.active .step-number { animation: pulse 900ms ease infinite; }
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.06); } 100% { transform: scale(1); } }

@media (max-width: 900px) {
    .grid.cols-2 { grid-template-columns: 1fr; }
    .review-grid { grid-template-columns: 1fr; }
}

/* Review card styles */
.review-card {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 18px;
    align-items: start;
    padding: 14px;
    border-radius: 12px;
    background: linear-gradient(180deg,#ffffff,#fbfdff);
    box-shadow: 0 10px 30px rgba(2,6,23,0.06);
}
.review-gallery { display:flex; flex-direction:column; gap:12px; }
.review-main-wrap { width:100%; border-radius:10px; overflow:hidden; background:#f3f7ff; position:relative; display:grid; place-items:center; min-height:220px; }
.review-main-wrap img { width:100%; height:100%; object-fit:cover; display:block; }
.review-placeholder {
    width:100%;
    height:100%;
    display:grid;
    place-items:center;
    background: linear-gradient(135deg,#4f46e5,#6366f1);
    color: #ffffff;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.review-thumbs { display:flex; gap:8px; overflow-x:auto; padding-bottom:4px; }
.review-thumbs img { width:72px; height:56px; object-fit:cover; border-radius:8px; cursor:pointer; border:2px solid transparent; }
.review-thumbs img.active { border-color: rgba(79,70,229,0.9); transform: translateY(-2px); }
.review-details { padding: 6px 10px; display:flex; flex-direction:column; gap:10px; }
.review-row { display:flex; flex-direction:column; gap:6px; }
.review-row .label { color: #64748b; font-size:0.8rem; }
.review-row .value { font-weight:700; font-size:1rem; color:var(--text); }

@media (max-width: 920px) {
    .review-card { grid-template-columns: 1fr; }
    .review-main-wrap { min-height: 180px; }
}

.alert {
    padding: 16px 20px;
    border-radius: 18px;
    margin-bottom: 24px;
}

.alert.success {
    background: #e6fffa;
    color: #065f46;
}

.alert.danger {
    background: #fee2e2;
    color: #991b1b;
}

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, #eef2ff 0%, #ffffff 100%);
}

.auth-card {
    width: min(420px, calc(100vw - 32px));
    background: #ffffff;
    padding: 36px;
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
}

.auth-logo {
    width: 56px;
    border-radius: 18px;
    background: #eef2ff;
    padding: 12px;
}

.auth-card h1 {
    margin: 0;
    font-size: 1.7rem;
}

.auth-card p {
    margin: 4px 0 0;
    color: var(--muted);
}

.auth-form {
    display: grid;
    gap: 18px;
}

.auth-form label {
    font-weight: 600;
}

.auth-form input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid #d1d5db;
    background: #f8fafc;
}

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .app-sidebar {
        width: 260px;
    }
}

@media (max-width: 768px) {
    .app-shell {
        flex-direction: column;
    }
    .app-sidebar {
        position: static;
        width: 100%;
        padding: 18px;
        height: auto;
        max-height: 100vh;
        overflow: hidden;
        transform: translateX(0);
        transition: max-height 280ms cubic-bezier(0.2, 0.65, 0.3, 1), opacity 220ms ease, visibility 280ms ease, padding 280ms cubic-bezier(0.2, 0.65, 0.3, 1);
    }
    .topbar-collapsed .app-sidebar {
        display: flex !important;
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
    }
    .app-header {
        padding: 18px;
    }
    .app-content {
        padding: 20px;
    }
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .menu-toggle {
        display: inline-flex;
    }
}

/* Confirmation modal styles */
.confirm-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2400;
}
.confirm-modal.open {
    display: flex;
}
.confirm-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(2,6,23,0.6);
}
.confirm-modal-panel {
    position: relative;
    background: var(--surface);
    border-radius: 14px;
    padding: 20px 22px;
    width: 420px;
    max-width: calc(100% - 40px);
    box-shadow: 0 30px 60px rgba(2,6,23,0.4);
    z-index: 2402;
}
.confirm-modal-panel h3 {
    margin: 0 0 8px 0;
}
.confirm-modal-panel p {
    margin: 0 0 18px 0;
    color: var(--muted);
}
.confirm-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Room details slide-in panel */
.room-details-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.26s ease, visibility 0.26s ease;
    z-index: 2100;
}
.room-details-modal.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.room-details-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(2,6,23,0.55);
}
.room-details-panel {
    position: relative;
    width: min(420px, 100%);
    max-width: 420px;
    background: var(--surface);
    box-shadow: -24px 0 60px rgba(10, 25, 47, 0.18);
    transform: translateX(100%);
    transition: transform 0.28s ease;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 24px;
    z-index: 2;
    overflow-y: auto;
}
.room-details-modal.open .room-details-panel {
    transform: translateX(0);
}
.room-details-close {
    position: absolute;
    top: 18px;
    right: auto;
    left: 18px;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 12px;
    background: var(--surface-strong);
    color: var(--text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}
.room-details-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-left: 48px;
}
.room-details-room-number {
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.72rem;
    color: var(--muted);
    margin-bottom: 6px;
}
.room-details-title {
    margin: 0;
    font-size: 1.2rem;
}
.room-details-status {
    align-self: flex-start;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
}
.room-details-status.available { background: #22c55e; }
.room-details-status.occupied { background: #f97316; }
.room-details-status.maintenance { background: #ef4444; }
.room-details-status.reserved { background: #fcce00; }
.room-details-image-wrap {
    position: relative;
    min-height: 190px;
    background: #f8fafc;
    border-radius: 18px;
    overflow: hidden;
    display: grid;
    place-items: center;
}
.room-details-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.room-details-image-placeholder {
    color: var(--muted);
    font-size: 0.95rem;
}
.room-details-info {
    display: grid;
    gap: 16px;
}
.room-details-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}
.room-details-row span {
    color: var(--muted);
    font-size: 0.88rem;
}
.room-details-row strong {
    font-size: 0.95rem;
}
.room-details-description-row {
    align-items: flex-start;
}
.room-details-description {
    margin: 0;
    color: var(--text);
    line-height: 1.5;
    max-height: 128px;
    overflow: auto;
}
.room-details-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}
.room-details-actions .button-outline,
.room-details-actions .button-primary {
    width: 50%;
}
@media (max-width: 640px) {
    .room-details-panel {
        width: 100%;
        max-width: 100%;
        border-radius: 0;
        padding: 20px;
    }
    .room-details-header {
        margin-left: 0;
    }
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(100%, 560px);
    max-width: 560px;
    pointer-events: none;
    z-index: 9999;
}
.toast {
    pointer-events: auto;
    width: 100%;
    min-width: 320px;
    max-width: 560px;
    transition: width 520ms cubic-bezier(.2,.9,.2,1);
    background: #fee2e2;
    color: #7f1d1d;
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
    display: flex;
    align-items: center;
    gap: 12px;
    transform-origin: center top;
    animation: toast-in 260ms cubic-bezier(.2,.9,.2,1);
}
.toast .toast-icon {
    font-size: 18px;
    color: #dc2626;
}
.toast .toast-body {
    flex: 1 1 auto;
}
.toast .toast-close {
    background: transparent;
    border: none;
    color: inherit;
    font-size: 14px;
    cursor: pointer;
}
.toast.success { border-left: 4px solid #28a745; background: #d1fae5; color: #166534; }
.toast.error { border-left: 4px solid #dc2626; }

@keyframes toast-in {
    from { opacity: 0; transform: translateY(-20px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
