/* Karaoke POS - Modern UI */
:root {
    --primary: #6c3ce0;
    --primary-dark: #5528c8;
    --primary-light: #8b5cf6;
    --secondary: #0ea5e9;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1e1b2e;
    --dark-light: #2d2a3e;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 76px;
    --topbar-height: 0px;
    --tabbar-height: 42px;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 1px 3px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
    --shadow-md: 0 4px 16px rgba(15,23,42,.08);
    --shadow-lg: 0 12px 32px rgba(15,23,42,.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--gray-100);
    color: var(--gray-800);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Login */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--dark) 0%, #3b2d6e 50%, var(--primary) 100%);
}

.login-container { width: 100%; max-width: 420px; padding: 20px; }

.login-card {
    background: #fff;
    border-radius: 20px;
    padding: 40px 32px;
    box-shadow: var(--shadow-lg);
}

.login-header { text-align: center; margin-bottom: 32px; }
.login-icon { font-size: 48px; display: block; margin-bottom: 12px; }
.login-header h1 { font-size: 24px; font-weight: 700; color: var(--dark); }
.login-header p { color: var(--gray-500); font-size: 14px; margin-top: 4px; }
.login-footer { text-align: center; margin-top: 24px; color: var(--gray-400); font-size: 13px; }

/* Layout */
.app-wrapper { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #1a1628 0%, #12101c 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    transition: width .25s ease, transform .3s ease;
    border-right: 1px solid rgba(255,255,255,.06);
}

.sidebar-header {
    padding: 22px 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.logo { display: flex; align-items: center; gap: 12px; min-width: 0; }
.logo-icon {
    font-size: 26px;
    width: 42px; height: 42px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(108,60,224,.4);
    flex-shrink: 0;
}
.logo-text {
    font-size: 17px; font-weight: 700; letter-spacing: -.3px;
    white-space: nowrap;
    overflow: hidden;
}
.btn-sidebar-collapse {
    width: 30px;
    height: 30px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.06);
    color: rgba(255,255,255,.75);
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .2s, color .2s, transform .2s;
    font-size: 16px;
    line-height: 1;
    padding: 0;
}
.btn-sidebar-collapse:hover {
    background: rgba(255,255,255,.12);
    color: #fff;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 10px 16px;
    overflow-y: auto;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 99px; }

.nav-group { margin-bottom: 20px; }
.nav-group:last-child { margin-bottom: 8px; }
.nav-group-title {
    font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1.2px;
    color: rgba(255,255,255,.35);
    padding: 0 12px 8px;
    margin-bottom: 4px;
}

.nav-item {
    display: flex; align-items: center; gap: 11px;
    padding: 9px 12px; border-radius: 10px;
    color: rgba(255,255,255,.6); text-decoration: none;
    font-size: 13px; font-weight: 500;
    margin-bottom: 2px;
    transition: all .2s ease;
    position: relative;
}
.nav-item:hover {
    background: rgba(255,255,255,.07);
    color: rgba(255,255,255,.9);
    transform: translateX(2px);
}
.nav-item.active {
    background: linear-gradient(135deg, rgba(108,60,224,.9), rgba(139,92,246,.8));
    color: #fff;
    box-shadow: 0 4px 14px rgba(108,60,224,.35);
}
.nav-item.active::before {
    content: '';
    position: absolute; left: 0; top: 50%;
    transform: translateY(-50%);
    width: 3px; height: 60%;
    background: #fff;
    border-radius: 0 3px 3px 0;
    opacity: .6;
}
.nav-icon {
    font-size: 16px;
    width: 22px; text-align: center;
    flex-shrink: 0;
    opacity: .85;
}
.nav-item.active .nav-icon { opacity: 1; }
.nav-label { line-height: 1.3; }

.sidebar-footer {
    padding: 14px 12px 16px;
    border-top: 1px solid rgba(255,255,255,.06);
    background: rgba(0,0,0,.15);
}
.user-info {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 10px;
    padding: 8px 10px;
    background: rgba(255,255,255,.05);
    border-radius: 10px;
}
.user-info-btn {
    width: 100%;
    border: 1px solid transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background .2s, border-color .2s;
}
.user-info-btn:hover {
    background: rgba(255,255,255,.1);
    border-color: rgba(255,255,255,.12);
}
.user-edit-hint {
    margin-left: auto;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
    color: rgba(255,255,255,.4);
    flex-shrink: 0;
}
.user-info-btn:hover .user-edit-hint {
    color: rgba(255,255,255,.8);
}
.user-avatar {
    width: 36px; height: 36px; border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), #a78bfa);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px;
    flex-shrink: 0;
}
.user-details { min-width: 0; flex: 1; }
.user-name { display: block; font-size: 13px; font-weight: 600; color: #fff; }
.user-role { display: block; font-size: 11px; color: rgba(255,255,255,.45); margin-top: 1px; }
.btn-logout {
    display: block; text-align: center; padding: 9px;
    background: rgba(255,255,255,.06); border-radius: 8px;
    color: rgba(255,255,255,.6); text-decoration: none; font-size: 13px;
    font-weight: 500; transition: all .2s;
    border: 1px solid rgba(255,255,255,.08);
}
.btn-logout:hover { background: rgba(239,68,68,.2); color: #fca5a5; border-color: rgba(239,68,68,.3); }

.sidebar-backdrop { display: none; }

.main-content {
    flex: 1; margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow-x: hidden;
    transition: margin-left .25s ease;
}

/* Sidebar minimized (desktop) */
body.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed-width);
}
body.sidebar-collapsed .main-content {
    margin-left: var(--sidebar-collapsed-width);
}
body.sidebar-collapsed .sidebar-header {
    padding: 16px 10px;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
}
body.sidebar-collapsed .logo-text,
body.sidebar-collapsed .nav-label,
body.sidebar-collapsed .nav-group-title,
body.sidebar-collapsed .user-details {
    display: none;
}
body.sidebar-collapsed .sidebar-nav {
    padding: 10px 8px;
    overflow: visible;
}
body.sidebar-collapsed .sidebar {
    overflow: visible;
}
body.sidebar-collapsed .nav-group {
    margin-bottom: 12px;
    overflow: visible;
}
body.sidebar-collapsed .nav-item {
    justify-content: center;
    padding: 10px 0;
    gap: 0;
    overflow: visible;
}
body.sidebar-collapsed .nav-item:hover {
    transform: none;
}
body.sidebar-collapsed .nav-item.active::before {
    display: none;
}
body.sidebar-collapsed .nav-icon {
    width: auto;
    font-size: 18px;
}
body.sidebar-collapsed .sidebar-footer {
    padding: 10px 8px 12px;
    overflow: visible;
}
body.sidebar-collapsed .user-info {
    justify-content: center;
    padding: 8px;
    margin-bottom: 8px;
}
body.sidebar-collapsed .user-edit-hint {
    display: none;
}
body.sidebar-collapsed .user-info-btn {
    position: relative;
}
body.sidebar-collapsed .btn-logout {
    font-size: 0;
    padding: 10px 0;
    position: relative;
    overflow: visible;
}
body.sidebar-collapsed .btn-logout::before {
    content: '⏻';
    font-size: 16px;
    color: rgba(255,255,255,.7);
}
body.sidebar-collapsed .btn-logout:hover::before {
    color: #fca5a5;
}
body.sidebar-collapsed .btn-sidebar-collapse {
    transform: rotate(180deg);
}

/* Tooltip nama menu saat sidebar minimize */
.sidebar-tooltip {
    position: fixed;
    z-index: 9999;
    background: #1e1b2e;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 7px 12px;
    border-radius: 8px;
    white-space: nowrap;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .28);
    pointer-events: none;
    opacity: 0;
    transform: translateY(-50%) translateX(-4px);
    transition: opacity .12s ease, transform .12s ease;
}
.sidebar-tooltip.visible {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}
.sidebar-tooltip::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-right-color: #1e1b2e;
}

.topbar {
    height: var(--topbar-height);
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
    display: flex; align-items: center;
    padding: 0 24px; gap: 16px;
    position: sticky; top: 0; z-index: 50;
}

.btn-menu-toggle {
    display: none; background: none; border: none; cursor: pointer;
    width: 32px; height: 32px; flex-direction: column;
    justify-content: center; gap: 5px; padding: 4px;
}
.btn-menu-toggle span {
    display: block; height: 2px; background: var(--gray-700);
    border-radius: 2px; transition: .3s;
}

.page-title { font-size: 20px; font-weight: 700; flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }

.content-area { padding: 24px; }

/* Workspace Tabs */

.tab-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
    padding: 0 12px 0 16px;
    min-height: var(--tabbar-height);
    overflow: hidden;
    position: sticky;
    top: 0;
    z-index: 45;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.tab-bar .btn-menu-toggle { display: none; flex-shrink: 0; }

.tab-bar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
    padding-left: 8px;
}

.tab-list {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    min-width: 0;
    width: 0;
    flex: 1 1 0;
    padding-top: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
}
.tab-list::-webkit-scrollbar { display: none; }

.tab-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px 8px 12px;
    border: 1px solid var(--gray-200);
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    background: var(--gray-50);
    color: var(--gray-600);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all .2s;
    font-family: inherit;
    max-width: 220px;
    flex-shrink: 0;
}

.tab-item:hover { background: #fff; color: var(--gray-800); }

.tab-item.active {
    background: var(--gray-100);
    border-color: var(--gray-200);
    color: var(--primary);
    padding-bottom: 9px;
    margin-bottom: -1px;
    box-shadow: inset 0 2px 0 var(--primary);
}

.tab-item-icon { font-size: 13px; line-height: 1; }

.tab-item-title {
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.tab-item-close {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 15px;
    line-height: 1;
    color: var(--gray-400);
    flex-shrink: 0;
}

.tab-item-close:hover {
    background: #fee2e2;
    color: var(--danger);
}

.tab-content-area {
    padding: 0 !important;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: var(--gray-100);
}

.tab-panels {
    flex: 1;
    position: relative;
    min-height: calc(100vh - var(--tabbar-height));
}

.tab-panel {
    display: none;
    position: absolute;
    inset: 0;
}

.tab-panel.active { display: block; }

.tab-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: var(--gray-100);
    display: block;
}

.legacy-page-content { display: none !important; }

/* Embed mode (tab iframe content) */
body.embed-mode {
    background: var(--gray-100);
    min-height: 100vh;
}

.embed-content {
    padding: 16px 20px 20px;
    min-height: 100vh;
}

body.embed-mode .pos-main-card,
body.embed-mode .pos-panel {
    top: 16px;
    height: calc(100vh - 32px);
    max-height: calc(100vh - 32px);
}

body.embed-mode .pos-page { margin: 0; }


/* Cards */
.card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(226,232,240,.8);
    overflow: hidden;
}
.card:has(.data-table-shell) {
    border-color: rgba(226,232,240,.65);
    box-shadow: 0 1px 2px rgba(15,23,42,.03), 0 10px 28px rgba(15,23,42,.05);
}
.card-header {
    padding: 16px 20px; border-bottom: 1px solid var(--gray-100);
    display: flex; align-items: center; justify-content: space-between;
}
.card-header h3 { font-size: 16px; font-weight: 600; }
.card-body { padding: 20px; }
.card:has(.data-table-shell) .card-body { padding: 22px 24px; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
    background: #fff; border-radius: var(--radius); padding: 20px;
    box-shadow: var(--shadow); display: flex; align-items: center; gap: 16px;
}
.stat-icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
}
.stat-icon.purple { background: #ede9fe; }
.stat-icon.blue { background: #dbeafe; }
.stat-icon.green { background: #d1fae5; }
.stat-icon.orange { background: #fef3c7; }
.stat-value { font-size: 24px; font-weight: 700; color: var(--dark); }
.stat-label { font-size: 13px; color: var(--gray-500); }

/* Ringkasan laporan: font lebih kecil agar 1 baris */
#laporan-summary {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}
#laporan-summary .stat-card {
    padding: 14px 12px;
    gap: 10px;
    min-width: 0;
}
#laporan-summary .stat-icon {
    width: 40px;
    height: 40px;
    font-size: 18px;
    flex-shrink: 0;
}
#laporan-summary .stat-value {
    font-size: 15px;
    line-height: 1.2;
    white-space: nowrap;
}
#laporan-summary .stat-label {
    font-size: 11px;
    line-height: 1.2;
    white-space: nowrap;
}

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--gray-600); margin-bottom: 6px; }
.form-input, .form-select, .form-textarea {
    width: 100%; padding: 10px 14px;
    border: 1px solid var(--gray-200); border-radius: 10px;
    font-size: 14px; font-family: inherit;
    transition: border-color .2s, box-shadow .2s;
    background: #fff;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108,60,224,.15);
}
.form-select-sm { padding: 6px 10px; font-size: 13px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-hint { font-size: 12px; color: var(--gray-400); margin-top: 4px; }
.input-disabled,
.form-input:disabled {
    background: var(--gray-100);
    color: var(--gray-500);
    cursor: not-allowed;
    opacity: 1;
}

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 18px; border: none; border-radius: 10px;
    font-size: 14px; font-weight: 600; font-family: inherit;
    cursor: pointer; transition: all .2s; text-decoration: none;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--gray-100); color: var(--gray-700); }
.btn-secondary:hover { background: var(--gray-200); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #059669; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-warning { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; box-shadow: 0 2px 8px rgba(245,158,11,.3); }
.btn-warning:hover { filter: brightness(1.05); }
.btn-ghost {
    background: transparent; color: var(--gray-600);
    border: 1px solid var(--gray-200);
}
.btn-ghost:hover { background: var(--gray-50); color: var(--gray-800); }
.btn-outline-danger {
    background: #fff; color: var(--danger);
    border: 1.5px solid #fecaca;
    box-shadow: none;
}
.btn-outline-danger:hover { background: #fef2f2; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-icon { padding: 8px; min-width: 36px; }

/* Table */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: left; font-size: 14px; }
th { background: var(--gray-50); font-weight: 600; color: var(--gray-600); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
td { border-top: 1px solid var(--gray-100); }
tr:hover td { background: var(--gray-50); }

.data-table-shell {
    overflow: hidden;
}
.data-table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}
.data-table-search-wrap {
    width: min(320px, 100%);
    position: relative;
}
.data-table-search {
    padding-left: 40px;
    padding-right: 38px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2394a3b8' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") no-repeat 14px center,
        #f8fafc;
    transition: border-color .2s, box-shadow .2s, background-color .2s;
}

/* Clear (x) button for search inputs */
.search-clearable {
    position: relative;
    display: block;
    max-width: 100%;
}
.toolbar-left > .search-clearable,
.toolbar-right > .search-clearable {
    display: inline-block;
    vertical-align: middle;
    min-width: 220px;
}
.search-clear-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 50%;
    background: var(--gray-200);
    color: var(--gray-600);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 2;
    transition: background .15s, color .15s;
}
.search-clearable.has-value .search-clear-btn {
    display: inline-flex;
}
.search-clear-btn:hover {
    background: var(--gray-300);
    color: var(--gray-800);
}
.search-clearable > .form-input,
.search-clearable > input {
    padding-right: 38px;
    width: 100%;
    box-sizing: border-box;
}
input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}
.data-table-search:hover {
    background-color: #fff;
    border-color: var(--gray-300);
}
.data-table-search:focus {
    background-color: #fff;
    border-color: rgba(108,60,224,.45);
    box-shadow: 0 0 0 3px rgba(108,60,224,.1);
}
.data-table-meta {
    font-size: 12px;
    color: var(--gray-500);
    background: #f8fafc;
    border: 1px solid var(--gray-100);
    border-radius: 99px;
    padding: 8px 14px;
    white-space: nowrap;
    letter-spacing: .01em;
}
.data-table-meta strong {
    color: var(--gray-700);
    font-weight: 600;
}
.data-table-wrapper {
    border: 1px solid var(--gray-100);
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
}
.data-table {
    border-collapse: separate;
    border-spacing: 0;
}
.data-table th {
    background: linear-gradient(180deg, #2d2640 0%, #1e1b2e 100%);
    color: rgba(255,255,255,.92);
    border-top: none;
    border-bottom: 1px solid rgba(255,255,255,.06);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    padding: 14px 18px;
    text-shadow: 0 1px 0 rgba(0,0,0,.2);
}
.data-table th:first-child { border-top-left-radius: 14px; }
.data-table th:last-child { border-top-right-radius: 14px; }
.data-table-th-actions {
    text-align: right;
    width: 1%;
    color: rgba(255,255,255,.75);
}
.data-table td {
    vertical-align: middle;
    border-top: none;
    border-bottom: 1px solid #f1f5f9;
    padding: 14px 18px;
    color: var(--gray-600);
    font-size: 14px;
}
.data-table tbody tr:last-child td {
    border-bottom: none;
}
.data-table tbody tr {
    transition: background .18s ease;
}
.data-table tbody tr:hover td {
    background: #fbfaff;
}
.data-table-cell-primary {
    color: var(--gray-800) !important;
    font-weight: 600;
    letter-spacing: -.01em;
}
.data-table-actions {
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}
.data-table-group-row td {
    background: linear-gradient(90deg, rgba(108,60,224,.14) 0%, rgba(108,60,224,.06) 55%, rgba(248,247,252,.9) 100%) !important;
    padding: 12px 18px !important;
    border-bottom: 1px solid rgba(108,60,224,.16) !important;
    border-top: 1px solid rgba(108,60,224,.1) !important;
    box-shadow: inset 4px 0 0 var(--primary);
}
.data-table-group-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.data-table-group-name {
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
}
.data-table tbody tr.data-table-group-row + tr td {
    border-top: none;
}
.data-table tbody tr.data-table-group-row:hover td {
    background: linear-gradient(90deg, rgba(108,60,224,.14) 0%, rgba(108,60,224,.06) 55%, rgba(248,247,252,.9) 100%) !important;
}
.btn-table-action {
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .18s, border-color .18s, color .18s, transform .18s;
    background: transparent;
    font: inherit;
}
.btn-table-action:hover {
    transform: translateY(-1px);
}
.btn-table-edit {
    background: #f4f2ff;
    color: var(--primary);
    border-color: #e9e4ff;
}
.btn-table-edit:hover {
    background: #ebe6ff;
    border-color: #d9d0ff;
}
.btn-table-delete {
    background: #fff5f5;
    color: #dc2626;
    border-color: #fecaca;
}
.btn-table-delete:hover {
    background: #fee2e2;
    border-color: #fca5a5;
}
.data-table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
}
.data-table-page-info {
    font-size: 12px;
    color: var(--gray-500);
}
.pagination {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.page-btn,
.page-ellipsis {
    min-width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
}
.page-btn {
    border: 1px solid var(--gray-200);
    background: #fff;
    color: var(--gray-600);
    cursor: pointer;
    transition: all .2s;
}
.page-btn:hover:not(:disabled) {
    border-color: var(--primary-light);
    color: var(--primary);
    background: #faf8ff;
}
.page-btn.active {
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    box-shadow: 0 8px 18px rgba(108,60,224,.25);
}
.page-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}
.page-ellipsis {
    color: var(--gray-400);
    user-select: none;
}
.toolbar-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-600);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .02em;
    line-height: 1.2;
}
.badge-success { background: rgba(16,185,129,.12); color: #047857; }
.badge-warning { background: rgba(245,158,11,.14); color: #b45309; }
.badge-danger { background: rgba(239,68,68,.12); color: #b91c1c; }
.badge-info { background: rgba(14,165,233,.12); color: #0369a1; }
.badge-cabang { background: var(--primary); color: #fff; }
.badge-category {
    background: var(--primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(108,60,224,.25);
}
.badge-count {
    margin-left: auto;
    background: rgba(108,60,224,.12);
    color: var(--primary-dark);
    font-weight: 600;
}
.badge-price {
    background: #f1f5f9;
    color: var(--gray-800);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    border: 1px solid #e2e8f0;
}
.badge-soft {
    background: #eef2ff;
    color: #4338ca;
    font-weight: 600;
    text-transform: capitalize;
}
.badge-name {
    background: #eef2ff;
    color: #3730a3;
    font-weight: 600;
    border: 1px solid #e0e7ff;
    font-size: 12px;
}
.badge-muted {
    background: #f8fafc;
    color: var(--gray-700);
    font-weight: 500;
    border: 1px solid #eef2f7;
    white-space: normal;
    text-align: left;
    max-width: 320px;
}
.data-table td .badge {
    vertical-align: middle;
}

/* Modal */
.modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.5); z-index: 200;
    align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
}
.modal.modal-lg { max-width: 720px; }

.nota-detail { display: flex; flex-direction: column; gap: 16px; }
.nota-detail-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 4px;
}
.nota-detail-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 16px;
    font-size: 13px;
    color: var(--gray-600);
}
.nota-detail-meta strong {
    color: var(--gray-800);
    margin-right: 6px;
}
.nota-detail-section h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--gray-700);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.nota-detail-table th,
.nota-detail-table td {
    padding: 10px 12px;
    font-size: 13px;
}
.nota-detail-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    font-size: 13px;
    color: var(--gray-600);
}
.nota-detail-summary { margin-top: 0; }
.nota-detail-logs {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 12px;
    color: var(--gray-600);
}
.nota-detail-logs li {
    padding: 8px 10px;
    background: var(--gray-50);
    border-radius: 8px;
    border: 1px solid var(--gray-100);
}
.nota-detail-logs span {
    display: block;
    color: var(--gray-400);
    margin-bottom: 2px;
}
.nota-detail-logs em {
    color: var(--gray-400);
    font-style: normal;
}
.data-table-actions .btn {
    margin-left: 0;
}
.data-table-actions .btn + .btn,
.data-table-actions .btn + a {
    margin-left: 6px;
}
.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fff;
}
.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    min-width: 0;
}
.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--gray-400);
    flex-shrink: 0;
    line-height: 1;
}
.modal-body {
    padding: 24px;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1 1 auto;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}
.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--gray-100);
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    z-index: 2;
    background: #fff;
}

.timer-alert-modal {
    text-align: center;
    padding: 8px 4px 4px;
}
.timer-alert-icon {
    font-size: 48px;
    line-height: 1;
    margin-bottom: 16px;
}
.timer-alert-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 8px;
}
.timer-alert-desc {
    font-size: 14px;
    color: var(--gray-500);
    line-height: 1.5;
}

.checkout-confirm-modal {
    text-align: center;
    padding: 4px 4px 0;
}
.checkout-confirm-icon {
    font-size: 44px;
    line-height: 1;
    margin-bottom: 14px;
}
.checkout-confirm-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 8px;
    line-height: 1.4;
}
.checkout-confirm-desc {
    font-size: 14px;
    color: var(--gray-500);
    line-height: 1.5;
    margin-bottom: 16px;
}
.checkout-confirm-summary {
    text-align: left;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 12px 16px;
}
.checkout-confirm-summary .summary-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
}
.checkout-confirm-summary .summary-row.total {
    border-top: 1px solid var(--gray-200);
    margin-top: 4px;
    padding-top: 10px;
    font-weight: 700;
    color: var(--primary);
}

/* Toast */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 300; display: flex; flex-direction: column; gap: 8px; }
.toast {
    padding: 12px 20px; border-radius: 10px; color: #fff;
    font-size: 14px; font-weight: 500; box-shadow: var(--shadow-lg);
    animation: slideIn .3s ease;
}
.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-warning { background: var(--warning); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Alert */
.alert { padding: 12px 16px; border-radius: 10px; font-size: 14px; margin-bottom: 16px; }
.alert-error { background: #fee2e2; color: #991b1b; }

/* POS Specific */
.pos-page { margin: -8px -4px 0; }
.pos-page .card { box-shadow: var(--shadow-md); }

.pos-grid {
    display: grid;
    grid-template-columns: 1fr 500px;
    gap: 24px;
    align-items: stretch;
}
.pos-grid.room-selection-mode {
    grid-template-columns: 1fr;
}
.pos-grid.checkin-mode {
    grid-template-columns: 1fr;
}
.pos-grid.room-selection-mode #side-panel,
.pos-grid.checkin-mode #side-panel {
    display: none;
}
#main-panel, #side-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.pos-main-card,
.pos-panel {
    position: sticky;
    top: calc(var(--topbar-height) + 24px);
    height: calc(100vh - var(--topbar-height) - 48px);
    max-height: calc(100vh - var(--topbar-height) - 48px);
    display: flex;
    flex-direction: column;
    flex: 1;
}
.pos-main-card .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
    padding: 20px 24px !important;
}

/* Session header */
.pos-session-header { padding: 18px 24px !important; background: linear-gradient(135deg, #faf8ff 0%, #fff 100%); flex-shrink: 0; }
.pos-session-info { display: flex; align-items: center; gap: 14px; }
.pos-session-info h3 { font-size: 17px; font-weight: 700; color: var(--dark); margin: 0; line-height: 1.3; }
.pos-session-meta { font-size: 12px; color: var(--gray-400); font-weight: 500; }
.pos-room-badge {
    display: flex; align-items: center; justify-content: center;
    min-width: 52px; height: 52px; border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff; font-size: 16px; font-weight: 800;
    box-shadow: 0 4px 12px rgba(108,60,224,.35);
}

/* Timer - compact */
.pos-timer-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: linear-gradient(135deg, #f8f6ff, #f3f0ff);
    border-radius: 12px;
    padding: 10px 16px;
    border: 1px solid rgba(139,92,246,.12);
    margin-bottom: 16px;
    flex-shrink: 0;
    transition: border-color .3s, background .3s;
}
.pos-timer-box.timer-warning-active {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border-color: #f59e0b;
    animation: timerWarnPulse 2s ease-in-out infinite;
}
.pos-timer-box.timer-expired-active {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border-color: #ef4444;
    animation: timerWarnPulse 1.2s ease-in-out infinite;
}
@keyframes timerWarnPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245,158,11,0); }
    50% { box-shadow: 0 0 0 4px rgba(245,158,11,.2); }
}
.pos-timer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.pos-timer-warning {
    font-size: 12px; font-weight: 600;
    padding: 8px 12px; border-radius: 8px;
    background: #fef3c7; color: #92400e;
    border: 1px solid #fde68a;
    text-align: center;
}
.pos-timer-warning.timer-expired-banner {
    background: #fee2e2; color: #991b1b;
    border-color: #fecaca;
}
.pos-timer-main { flex-shrink: 0; }
.pos-timer-side { flex: 1; min-width: 0; }
.pos-timer-label {
    font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .8px;
    color: var(--primary); opacity: .75; margin-bottom: 2px;
}
.timer-display {
    font-size: 26px; font-weight: 800; line-height: 1;
    font-variant-numeric: tabular-nums;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-light));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
}
.timer-display.warning {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    -webkit-background-clip: text; background-clip: text;
    animation: pulse 1s infinite;
}
.pos-checkin {
    font-size: 11px; color: var(--gray-400);
    margin-top: 4px; font-weight: 500;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pos-checkin + .pos-checkin {
    margin-top: 2px;
}
.pos-time-in {
    color: #047857;
    font-weight: 700;
}
.pos-checkout .pos-time-out {
    color: #dc2626;
    font-weight: 800;
}
.timer-bar {
    height: 5px; background: rgba(108,60,224,.12);
    border-radius: 99px; overflow: hidden;
}
.timer-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 99px; transition: width 1s linear;
}
.timer-bar-fill.warning { background: linear-gradient(90deg, #dc2626, #f87171); }

/* FnB section */
.pos-fnb-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    margin-top: 0;
}
.fnb-toolbar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; margin-bottom: 12px; flex-wrap: wrap;
    flex-shrink: 0;
}
.fnb-toolbar h4 { margin: 0; font-size: 16px; font-weight: 700; color: var(--dark); }
.fnb-search-wrap { position: relative; flex: 1; max-width: 280px; }
.fnb-search {
    width: 100%; padding: 10px 36px 10px 36px !important;
    font-size: 13px !important; border-radius: 99px !important;
    background: var(--gray-50); border-color: transparent !important;
}
.fnb-search-wrap::before {
    content: '🔍'; position: absolute; left: 12px; top: 50%;
    transform: translateY(-50%); font-size: 13px; opacity: .5; pointer-events: none;
}
.fnb-search:focus { background: #fff; border-color: var(--primary) !important; }

.fnb-products-scroll {
    flex: 1;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    border-radius: 16px;
    padding: 14px;
    background: linear-gradient(180deg, var(--gray-50) 0%, #fff 100%);
    border: 1px solid var(--gray-100);
}
.fnb-products-scroll::-webkit-scrollbar { width: 6px; }
.fnb-products-scroll::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 99px; }

.fnb-groups {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.fnb-category-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.fnb-category-title {
    font-size: 11px;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: .7px;
    padding: 0 4px;
}
.fnb-empty {
    text-align: center;
    padding: 24px;
    color: var(--gray-400);
    background: #fff;
    border: 1px dashed var(--gray-200);
    border-radius: 12px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 12px;
}
.product-card {
    background: #fff;
    border: 1.5px solid transparent;
    border-radius: 14px;
    padding: 14px 10px;
    text-align: center;
    cursor: pointer;
    transition: all .25s cubic-bezier(.4,0,.2,1);
    box-shadow: 0 2px 8px rgba(15,23,42,.04);
}
.product-card:hover {
    border-color: var(--primary-light);
    background: #faf8ff;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(108,60,224,.15);
}
.product-card:active { transform: translateY(-1px); }
.product-icon { font-size: 22px; margin-bottom: 6px; opacity: .7; }
.product-name {
    font-size: 12px; font-weight: 600; color: var(--gray-700);
    line-height: 1.3; word-break: break-word;
}
.product-price {
    margin-top: 8px;
    display: flex;
    justify-content: center;
}
.product-price-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    padding: 4px 10px;
    border-radius: 99px;
    box-shadow: 0 2px 6px rgba(108, 60, 224, .25);
    letter-spacing: .02em;
    white-space: nowrap;
}

/* Side panel */
.pos-side-card { border: 1px solid var(--gray-100); }
.pos-side-header {
    padding: 18px 22px !important;
    background: linear-gradient(135deg, var(--dark) 0%, #2d2650 100%);
    border-bottom: none !important;
}
.pos-side-header h3 { color: #fff; font-size: 15px; }
.pos-grand-preview {
    font-size: 14px; font-weight: 700; color: #c4b5fd;
    background: rgba(255,255,255,.1); padding: 4px 12px; border-radius: 99px;
}
.pos-panel {
    display: flex;
    flex-direction: column;
}
.pos-panel .card-body { overflow-y: auto; display: flex; flex-direction: column; flex: 1; min-height: 0; padding: 20px 22px !important; }
.pos-side-body { gap: 0; }

.pos-side-section { margin-bottom: 18px; }
.pos-side-section-title {
    font-size: 12px; font-weight: 700; color: var(--gray-500);
    margin-bottom: 10px; display: flex; align-items: center; gap: 8px;
    text-transform: uppercase; letter-spacing: .6px;
}
.btn-room-discount {
    margin-left: auto;
    padding: 7px 14px;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: none;
    letter-spacing: normal;
    color: #fff !important;
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    box-shadow: 0 2px 8px rgba(239, 68, 68, .35);
}
.btn-room-discount:hover {
    filter: brightness(1.06);
}
.section-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--primary); flex-shrink: 0;
}
.section-dot-blue { background: var(--secondary); }

.fnb-cart-scroll, .pos-cart-scroll {
    max-height: 160px; overflow-y: auto; flex-shrink: 0;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-100);
}
.fnb-cart-empty {
    text-align: center; padding: 20px 12px;
    color: var(--gray-400); font-size: 12px;
    background: var(--gray-50); border-radius: var(--radius-sm);
    border: 1px dashed var(--gray-200);
}
.fnb-cart-table { font-size: 12px; width: 100%; }
.fnb-cart-table th {
    background: var(--gray-50); font-size: 10px;
    padding: 8px 8px; position: sticky; top: 0; z-index: 1;
}
.fnb-cart-table td { padding: 9px 8px; border-top: 1px solid var(--gray-50); }
.fnb-cart-table tr:hover td { background: #faf8ff; }
.fnb-actions { white-space: nowrap; }
.fnb-actions .btn-sm { padding: 3px 8px; font-size: 10px; border-radius: 6px; }

.pos-summary {
    background: linear-gradient(145deg, var(--gray-50), #fff);
    border-radius: 14px; padding: 16px 18px;
    margin-top: 4px; flex-shrink: 0;
    border: 1px solid var(--gray-100);
}
.summary-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 5px 0; font-size: 13px; color: var(--gray-600);
}
.summary-row span:last-child { font-weight: 600; color: var(--gray-800); }
.summary-disc span:last-child { color: var(--danger); }
.summary-row.total {
    font-weight: 700; font-size: 16px;
    border-top: 2px solid var(--gray-200);
    padding-top: 14px; margin-top: 10px;
    color: var(--dark);
}
.grand-total-value {
    font-size: 18px !important;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pos-actions {
    margin-top: 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    flex-shrink: 0;
}
.btn-pos-action { padding: 10px 12px; border-radius: 10px; font-size: 12px; letter-spacing: .2px; transition: all .2s; border: none; color: #fff; }
.pos-actions .btn-cetak-bills {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #0f766e, #0d9488) !important;
    box-shadow: 0 2px 8px rgba(13,148,136,.35);
}
.pos-actions .btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    box-shadow: 0 2px 8px rgba(245,158,11,.35);
}
.pos-actions .btn-secondary {
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(37,99,235,.35);
}
.pos-actions .btn-outline-danger,
.pos-actions .btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(239,68,68,.35);
}
.pos-actions .btn-pos-action:hover { filter: brightness(1.07); transform: translateY(-1px); }
.btn-checkout {
    background: linear-gradient(135deg, #059669, #10b981) !important;
    box-shadow: 0 4px 14px rgba(16,185,129,.35) !important;
    font-size: 13px !important;
    padding: 11px 12px !important;
}
.btn-checkout:hover { filter: brightness(1.06); transform: translateY(-1px); }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

.room-selection-card {
    overflow: hidden;
    border: 1px solid rgba(226,232,240,.85);
    background:
        radial-gradient(circle at 100% 0%, rgba(108,60,224,.07), transparent 28%),
        linear-gradient(180deg, #fff 0%, #f8fafc 100%);
    box-shadow: 0 10px 30px rgba(15,23,42,.05);
}
.room-selection-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    padding: 24px 28px;
    border-bottom: 1px solid rgba(226,232,240,.8);
    background:
        radial-gradient(circle at top right, rgba(108,60,224,.14), transparent 40%),
        linear-gradient(135deg, rgba(255,255,255,.96) 0%, #f7f5ff 100%);
}
.room-selection-title {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.room-selection-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: linear-gradient(145deg, var(--primary), var(--primary-light));
    box-shadow: 0 12px 24px rgba(108,60,224,.28);
    color: #fff;
    flex-shrink: 0;
}
.room-selection-header h3 {
    font-size: 22px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 4px;
    letter-spacing: -.02em;
}
.room-selection-header p {
    font-size: 13px;
    color: var(--gray-500);
    line-height: 1.45;
    max-width: 420px;
}
.room-selection-stats {
    display: flex;
    align-items: stretch;
    gap: 10px;
    flex-wrap: wrap;
}
.room-stat {
    min-width: 78px;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(255,255,255,.85);
    border: 1px solid rgba(226,232,240,.9);
    box-shadow: 0 4px 12px rgba(15,23,42,.04);
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.room-stat-value {
    font-size: 18px;
    font-weight: 800;
    color: var(--dark);
    line-height: 1.1;
    letter-spacing: -.02em;
}
.room-stat-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-500);
}
.room-stat-ok .room-stat-value { color: #047857; }
.room-stat-busy .room-stat-value { color: #c2410c; }
.room-stat-off .room-stat-value { color: #b91c1c; }
.room-selection-body {
    padding: 22px 24px 26px !important;
}
.room-selection-groups {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.room-category-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255,255,255,.72);
    border: 1px solid rgba(226,232,240,.75);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}
.room-category-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.room-category-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 800;
    color: var(--primary-dark);
    text-transform: uppercase;
    letter-spacing: .08em;
}
.room-category-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 4px rgba(108,60,224,.14);
}
.room-category-count {
    font-size: 11px;
    font-weight: 700;
    color: var(--gray-500);
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 4px 10px;
}
.room-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 12px; }
.room-selection-grid {
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 12px;
}
.room-card {
    background: linear-gradient(180deg, #fff 0%, #fbfaff 100%);
    border: 1.5px solid #e8eef7;
    border-radius: 16px;
    padding: 16px 12px 14px;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s, background .2s;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(15,23,42,.05);
    min-height: 128px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.room-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(108,60,224,.1), transparent 48%);
    opacity: 0;
    transition: opacity .2s;
    pointer-events: none;
}
.room-card:hover {
    border-color: rgba(108,60,224,.45);
    box-shadow: 0 12px 28px rgba(108,60,224,.14);
}
.room-card:hover::before { opacity: 1; }
.room-card.selected { border-color: var(--primary); background: linear-gradient(145deg, #faf8ff, #f5f3ff); }
.room-card.occupied {
    border-color: rgba(251,146,60,.55);
    background: linear-gradient(160deg, #fffaf5 0%, #fff1e4 100%);
    cursor: pointer;
    opacity: 1;
    box-shadow: 0 10px 22px rgba(251,146,60,.14);
    min-height: 138px;
}
.room-card.maintenance {
    border-color: #fecaca;
    background: linear-gradient(160deg, #fff 0%, #fef2f2 100%);
    cursor: not-allowed;
    opacity: .72;
}
.room-card-top {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}
.room-card-pulse {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 4px rgba(16,185,129,.16);
}
.room-card.occupied .room-card-pulse {
    background: #f97316;
    box-shadow: 0 0 0 4px rgba(249,115,22,.18);
    animation: pulse 1.6s ease-in-out infinite;
}
.room-card.maintenance .room-card-pulse {
    background: #ef4444;
    box-shadow: 0 0 0 4px rgba(239,68,68,.14);
}
.room-card-icon {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #ede9fe;
    color: var(--primary);
    box-shadow: inset 0 0 0 1px rgba(108,60,224,.14);
    position: relative;
}
.room-card-icon::before {
    content: "";
    width: 14px;
    height: 14px;
    border: 1.7px solid currentColor;
    border-radius: 3px;
    box-shadow: inset 4px 0 0 currentColor;
    opacity: .9;
}
.room-card.occupied .room-card-icon {
    background: linear-gradient(135deg, #ffedd5, #fdba74);
    color: #9a3412;
    box-shadow: inset 0 0 0 1px rgba(234,88,12,.2);
}
.room-card.maintenance .room-card-icon {
    background: #fef2f2;
    color: #991b1b;
    box-shadow: inset 0 0 0 1px rgba(239,68,68,.18);
}
.room-code {
    font-size: 18px;
    font-weight: 800;
    color: var(--dark);
    position: relative;
    z-index: 1;
    line-height: 1.15;
    letter-spacing: -.02em;
}
.room-guest {
    margin-top: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #9a3412;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    z-index: 1;
}
.room-times {
    margin-top: 4px;
    margin-bottom: 6px;
    width: 100%;
    position: relative;
    z-index: 1;
}
.room-checkin {
    margin: 0;
    font-size: 10px;
    font-weight: 600;
    color: #9a3412;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.room-checkout,
.room-checkout strong {
    color: #dc2626;
    font-weight: 800;
}
.room-name { font-size: 11px; color: var(--gray-500); margin-top: 2px; }
.room-kategori {
    display: inline-block;
    margin-top: 4px;
    padding: 1px 6px;
    border-radius: 99px;
    font-size: 9px;
    font-weight: 700;
    color: var(--primary);
    background: rgba(108, 60, 224, .1);
}
.room-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    margin-top: auto;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(16,185,129,.12);
    color: #047857;
    position: relative;
    z-index: 1;
    letter-spacing: .01em;
}
.room-card.occupied .room-status {
    background: #ea580c;
    color: #fff;
    box-shadow: 0 4px 10px rgba(234,88,12,.22);
}
.room-card.maintenance .room-status {
    background: #fee2e2;
    color: #991b1b;
}

/* Check-in form */
.checkin-card {
    overflow: hidden;
    border: 1px solid rgba(226,232,240,.9);
    background: linear-gradient(180deg, #fff 0%, #fbfdff 100%);
    height: calc(100vh - 32px);
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.checkin-header {
    padding: 22px 24px;
    background:
        radial-gradient(circle at top right, rgba(14,165,233,.12), transparent 32%),
        linear-gradient(135deg, #fff 0%, #f8fafc 100%);
    flex-shrink: 0;
}
.checkin-title {
    display: flex;
    align-items: center;
    gap: 14px;
}
.checkin-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    box-shadow: 0 10px 22px rgba(108,60,224,.25);
    font-size: 20px;
    flex-shrink: 0;
}
.checkin-title h3 {
    font-size: 20px;
    font-weight: 800;
    color: var(--dark);
}
.checkin-title p {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 2px;
}
.checkin-body {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
.checkin-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
    gap: 20px;
    align-items: stretch;
    flex: 1;
    min-height: 0;
}
.checkin-section {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(15,23,42,.05);
    min-height: 0;
}
.package-section {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.checkin-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}
.checkin-section-title > span {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--gray-100);
    font-size: 17px;
    flex-shrink: 0;
}
.checkin-section-title h4 {
    font-size: 15px;
    font-weight: 800;
    color: var(--gray-800);
}
.checkin-section-title p {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 1px;
}
.form-input-lg {
    padding: 13px 15px;
    font-size: 15px;
}
.package-search-wrap {
    margin-bottom: 14px;
    flex-shrink: 0;
}
.package-search {
    padding-left: 38px;
    padding-right: 38px;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2394a3b8' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") no-repeat 14px center,
        #fff;
}
.package-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px 6px 4px 2px;
    min-height: 0;
}
.package-scroll::-webkit-scrollbar { width: 6px; }
.package-scroll::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 99px; }
.package-scroll::-webkit-scrollbar-track { background: transparent; }
.package-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
}
.package-option {
    border-color: var(--gray-200);
    border-radius: 18px;
    padding: 18px 14px;
    min-height: 164px;
}
/* Jangan naikkan kartu saat hover — parent overflow memotong border atas */
.package-option:hover,
.package-option:active,
.package-option.selected {
    transform: none;
}
.package-option:hover {
    border-color: var(--primary-light);
    background: #faf8ff;
    box-shadow: 0 8px 20px rgba(108,60,224,.15);
}
.package-option.selected {
    border-color: var(--primary);
    background: linear-gradient(145deg, #faf8ff, #f5f3ff);
    box-shadow: 0 14px 28px rgba(108,60,224,.16);
}
.package-icon {
    width: 38px;
    height: 38px;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: #ede9fe;
    font-size: 18px;
}
.package-option small {
    display: inline-flex;
    margin-top: 10px;
    padding: 4px 10px;
    border-radius: 99px;
    background: var(--gray-100);
    color: var(--gray-600);
    font-weight: 700;
}
.package-empty {
    grid-column: 1 / -1;
    padding: 28px 12px;
    text-align: center;
    color: var(--gray-400);
    font-size: 14px;
    font-weight: 600;
}
.checkin-footer {
    margin-top: 16px;
    flex-shrink: 0;
    padding-top: 14px;
    background: linear-gradient(180deg, rgba(255,255,255,.7), #fff 45%);
    position: sticky;
    bottom: 0;
    z-index: 2;
}
.btn-checkin-submit {
    min-height: 48px;
    border-radius: 14px;
    font-size: 15px;
    box-shadow: 0 12px 24px rgba(16,185,129,.22);
}

.customer-search { position: relative; }
.customer-results {
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border: 1px solid var(--gray-200); border-radius: 10px;
    box-shadow: var(--shadow-lg); z-index: 10; max-height: 200px; overflow-y: auto;
    display: none;
}
.customer-results.active { display: block; }
.customer-result-item {
    padding: 10px 14px; cursor: pointer; font-size: 14px;
    border-bottom: 1px solid var(--gray-50);
}
.customer-result-item:hover { background: var(--gray-50); }

/* Permission matrix */
.perm-table th, .perm-table td { text-align: center; padding: 8px; }
.perm-table td:first-child { text-align: left; font-weight: 500; }
.perm-check { width: 18px; height: 18px; accent-color: var(--primary); }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--gray-100); margin-bottom: 20px; }
.tab {
    padding: 10px 20px; font-size: 14px; font-weight: 600;
    color: var(--gray-500); cursor: pointer; border-bottom: 2px solid transparent;
    margin-bottom: -2px; transition: all .2s; background: none; border-top: none; border-left: none; border-right: none;
}
.tab:hover { color: var(--primary); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* Empty state */
.empty-state { text-align: center; padding: 48px 20px; color: var(--gray-400); }
.empty-state-icon { font-size: 48px; margin-bottom: 12px; }

/* Page toolbar */
.page-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 12px;
}
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 10px; }
.page-toolbar .btn-primary {
    padding: 11px 18px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(108,60,224,.22);
    letter-spacing: -.01em;
}
.page-toolbar .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(108,60,224,.28);
}
.page-toolbar .form-input {
    height: 42px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--gray-200);
}

/* Responsive */
@media (max-width: 1024px) {
    .pos-grid,
    .pos-grid.checkin-mode,
    .pos-grid.room-selection-mode { grid-template-columns: 1fr; }

    .checkin-layout {
        grid-template-columns: 1fr;
        flex: none;
    }
    .checkin-card {
        height: auto;
        min-height: calc(100vh - 32px);
    }
    .checkin-body {
        overflow-y: visible;
    }
    .package-section {
        max-height: 430px;
    }
    .pos-main-card,
    .pos-panel { position: static; height: auto; max-height: none; }
    .fnb-products-scroll { max-height: 380px; flex: none; }
}

@media (max-width: 768px) {
    body { font-size: 14px; }
    body.sidebar-open {
        overflow: hidden;
    }

    .sidebar-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, .48);
        z-index: 99;
        -webkit-tap-highlight-color: transparent;
    }
    body.sidebar-open .sidebar-backdrop {
        display: block;
    }

    .sidebar { transform: translateX(-100%); }
    .sidebar.open {
        transform: translateX(0);
        width: min(var(--sidebar-width), 86vw);
        box-shadow: 24px 0 60px rgba(15,23,42,.35);
    }
    .main-content { margin-left: 0; }

    /* Minimize tidak dipakai di mobile (drawer penuh) */
    body.sidebar-collapsed .sidebar {
        width: min(var(--sidebar-width), 86vw);
    }
    body.sidebar-collapsed .main-content {
        margin-left: 0;
    }
    body.sidebar-collapsed .sidebar-header {
        padding: 22px 20px 20px;
        justify-content: space-between;
        flex-direction: row;
    }
    body.sidebar-collapsed .logo-text,
    body.sidebar-collapsed .nav-label,
    body.sidebar-collapsed .nav-group-title,
    body.sidebar-collapsed .user-details {
        display: initial;
    }
    body.sidebar-collapsed .nav-label,
    body.sidebar-collapsed .user-details {
        display: block;
    }
    body.sidebar-collapsed .nav-group-title {
        display: block;
    }
    body.sidebar-collapsed .logo-text {
        display: inline;
    }
    body.sidebar-collapsed .sidebar-nav { padding: 12px 10px 16px; }
    body.sidebar-collapsed .nav-item {
        justify-content: flex-start;
        padding: 9px 12px;
        gap: 11px;
    }
    body.sidebar-collapsed .btn-logout {
        font-size: 13px;
        padding: 9px;
    }
    body.sidebar-collapsed .btn-logout::before { content: none; }
    body.sidebar-collapsed .nav-item[data-title]:hover::after,
    body.sidebar-collapsed .btn-logout:hover::after { display: none; }
    .btn-sidebar-collapse { display: none; }
    .sidebar-tooltip { display: none !important; }

    .tab-bar {
        min-height: 48px;
        padding: 0 10px;
        gap: 8px;
    }
    .tab-bar .btn-menu-toggle {
        display: flex;
        width: 36px;
        height: 36px;
        border-radius: 10px;
        background: var(--gray-100);
    }
    .tab-list {
        gap: 3px;
        padding-top: 8px;
        width: 0;
        flex: 1 1 0;
        min-width: 0;
    }
    .tab-item {
        max-width: 180px;
        min-width: 118px;
        padding: 8px 8px;
        font-size: 11px;
        gap: 5px;
        flex: 0 0 auto;
    }
    .tab-item-title { max-width: 98px; }
    .tab-item.active .tab-item-title { max-width: 98px; }
    .tab-item-icon {
        font-size: 12px;
    }
    .tab-item-close {
        width: 16px;
        height: 16px;
        font-size: 14px;
    }
    .tab-bar-actions { display: none; }
    .tab-panels { min-height: calc(100dvh - var(--tabbar-height)); }

    .embed-content {
        padding: 12px;
    }
    body.embed-mode .pos-page {
        margin: 0;
    }

    .content-area {
        padding: 14px;
    }

    .card {
        border-radius: 16px;
    }
    .card-header {
        padding: 14px 16px;
        gap: 10px;
        flex-wrap: wrap;
    }
    .card-header h3 {
        font-size: 15px;
    }
    .card-body {
        padding: 16px;
    }

    .page-toolbar,
    .toolbar-left,
    .toolbar-right {
        width: 100%;
        align-items: stretch;
    }
    .page-toolbar {
        flex-direction: column;
    }
    .toolbar-left,
    .toolbar-right {
        flex-wrap: wrap;
    }
    .toolbar-left > *,
    .toolbar-right > *,
    .page-toolbar .form-input,
    .page-toolbar .form-select,
    .page-toolbar .btn {
        width: 100% !important;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .form-input,
    .form-select,
    .form-textarea {
        min-height: 42px;
        font-size: 16px;
    }
    .btn {
        min-height: 42px;
        padding: 10px 14px;
    }
    .btn-sm {
        min-height: 34px;
        padding: 7px 10px;
        font-size: 12px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .stat-card {
        padding: 14px;
        gap: 12px;
    }
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 19px;
    }
    .stat-value {
        font-size: 20px;
    }

    .table-wrapper {
        margin: 0 -4px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .data-table-toolbar,
    .data-table-footer {
        align-items: stretch;
        flex-direction: column;
    }
    .data-table-search-wrap {
        width: 100%;
    }
    .data-table-meta,
    .data-table-page-info {
        width: 100%;
        text-align: center;
    }
    .pagination {
        justify-content: center;
    }
    table {
        min-width: 680px;
    }
    th,
    td {
        padding: 10px 12px;
        font-size: 13px;
    }
    td .btn,
    td .btn-sm {
        margin-bottom: 4px;
    }
    .data-table-actions {
        justify-content: flex-start;
    }
    .btn-table-action {
        width: 36px;
        height: 36px;
    }
    .perm-table {
        min-width: 520px;
    }

    .tabs {
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    .tab {
        flex: 0 0 auto;
        padding: 10px 14px;
    }

    .modal-overlay {
        padding: 12px;
        align-items: flex-end;
    }
    .modal {
        max-height: 92dvh;
        border-radius: 18px 18px 0 0;
    }
    .modal.modal-lg {
        max-width: 100%;
    }
    .nota-detail-meta {
        grid-template-columns: 1fr;
    }
    .modal-header,
    .modal-body,
    .modal-footer {
        padding-left: 16px;
        padding-right: 16px;
    }
    .modal-footer {
        flex-wrap: wrap;
    }
    .modal-footer .btn {
        flex: 1 1 140px;
    }

    .toast-container {
        left: 12px;
        right: 12px;
        top: 12px;
    }

    .pos-page {
        margin: 0;
    }
    .pos-grid {
        gap: 14px;
    }
    .room-selection-header,
    .checkin-header {
        padding: 16px;
        align-items: flex-start;
    }
    .room-selection-title,
    .checkin-title {
        align-items: flex-start;
    }
    .room-selection-icon,
    .checkin-icon {
        width: 40px;
        height: 40px;
        border-radius: 13px;
    }
    .room-selection-header h3,
    .checkin-title h3 {
        font-size: 18px;
    }
    .room-selection-header p,
    .checkin-title p {
        font-size: 12px;
    }
    .room-selection-body {
        padding: 16px !important;
    }
    .room-category-section {
        padding: 12px;
        border-radius: 14px;
    }
    .room-selection-grid {
        grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
        gap: 10px;
    }
    .room-card {
        padding: 12px 8px;
        border-radius: 14px;
        min-height: 112px;
    }
    .room-card-icon {
        width: 26px;
        height: 26px;
        border-radius: 8px;
    }
    .room-code {
        font-size: 15px;
    }

    .checkin-card {
        height: auto;
        min-height: 0;
    }
    .checkin-body {
        padding: 14px;
        overflow: visible;
    }
    .checkin-layout {
        gap: 14px;
    }
    .checkin-section {
        padding: 14px;
        border-radius: 16px;
    }
    .checkin-section-title {
        margin-bottom: 14px;
    }
    .package-section {
        max-height: 54dvh;
    }
    .package-grid {
        grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
        gap: 10px;
    }
    .package-option {
        min-height: 145px;
        padding: 14px 10px;
    }
    .package-icon {
        width: 34px;
        height: 34px;
        margin-bottom: 8px;
    }
    .checkin-footer {
        position: sticky;
        bottom: 0;
        margin-left: -14px;
        margin-right: -14px;
        padding: 12px 14px 0;
    }

    .pos-session-header {
        align-items: flex-start;
        gap: 10px;
        flex-wrap: wrap;
    }
    .pos-session-info {
        min-width: 0;
        flex: 1 1 100%;
    }
    .pos-timer-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .pos-timer-main {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
    }
    .timer-display {
        font-size: 24px;
    }
    .fnb-toolbar {
        align-items: stretch;
    }
    .fnb-search-wrap {
        width: 100%;
        max-width: none;
    }
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
        gap: 10px;
    }
    .product-card {
        padding: 12px 8px;
    }
    .pos-side-body {
        padding: 14px;
    }
    .pos-actions {
        grid-template-columns: 1fr;
    }
    .fnb-cart-table {
        min-width: 520px;
    }
}

@media (max-width: 480px) {
    .tab-bar {
        padding: 0 6px;
        gap: 6px;
    }
    .tab-bar .btn-menu-toggle {
        width: 34px;
        height: 34px;
    }
    .tab-item {
        max-width: 150px;
        min-width: 108px;
        padding: 7px 7px;
    }
    .tab-item-title {
        max-width: 78px;
    }
    .tab-item.active .tab-item-title {
        max-width: 78px;
    }

    .stats-grid { grid-template-columns: 1fr; }
    .room-grid,
    .room-selection-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .room-selection-stats {
        width: 100%;
    }
    .room-stat {
        flex: 1;
        min-width: 0;
    }
    .room-card {
        padding: 12px 8px;
        min-height: 108px;
    }
    .room-code {
        font-size: 14px;
    }
    .room-name {
        font-size: 10px;
    }
    .room-status {
        font-size: 9px;
        padding: 2px 6px;
        margin-top: 4px;
    }
    .checkin-header {
        flex-direction: column;
    }
    .checkin-header .btn {
        width: 100%;
    }
    .package-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .package-option {
        min-height: 138px;
    }
    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .modal-footer .btn {
        flex-basis: 100%;
    }
    table {
        min-width: 620px;
    }
}
