/**
 * CBT PWA Scanner — Styles
 * 5-tab on-site operations app
 * @since 5.40.00
 */

/* ── Reset & Shell ────────────────────────────────── */
.cbt-pwa-body {
    margin: 0; padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8fafc;
    -webkit-font-smoothing: antialiased;
    overscroll-behavior: none;
    position: fixed;
    width: 100%; height: 100%;
    overflow: hidden;
}
.cbt-pwa-body * { box-sizing: border-box; }
html.cbt-pwa-html,
html.cbt-pwa-html body { position: fixed; width: 100%; height: 100%; overflow: hidden; }
.cbt-pwa-body #wpadminbar,
.cbt-pwa-body .admin-bar { display: none !important; }
html.admin-bar { margin-top: 0 !important; }

/* ── Fullscreen Messages (login, error, name entry) ── */
.cbt-pwa-fullscreen-msg {
    display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
    min-height: 100vh; padding: 8vh 24px 24px;
    background: linear-gradient(135deg, #111111 0%, #222222 100%);
}
.cbt-pwa-msg-card {
    background: #fff; border-radius: 16px; padding: 40px 32px;
    max-width: 380px; width: 100%; text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.cbt-pwa-msg-card h2 { font-size: 20px; color: #1e293b; margin: 0 0 8px; }
.cbt-pwa-msg-card p { font-size: 14px; color: #64748b; margin: 0; line-height: 1.5; }
.cbt-pwa-msg-icon { font-size: 48px; margin-bottom: 16px; }
.cbt-pwa-msg-icon.error { color: #dc2626; }
.cbt-pwa-btn-primary {
    display: block; width: 100%; padding: 14px; border: 2px solid #000000; border-radius: 10px;
    background: #ffffff; color: #000000; font-size: 16px; font-weight: 600;
    cursor: pointer; transition: all 0.2s; text-decoration: none; box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}
.cbt-pwa-btn-primary:hover { background: #f8f8f8; }
.cbt-pwa-btn-primary:active { border-color: #dc2626; color: #dc2626; background: #fff; transform: scale(0.98); }
.cbt-pwa-btn-secondary {
    display: block; width: 100%; padding: 14px; border: 2px solid #e2e8f0; border-radius: 10px;
    background: #fff; color: #1e293b; font-size: 16px; font-weight: 600;
    cursor: pointer; transition: all 0.2s;
}

/* ── Header ───────────────────────────────────────── */
.cbt-pwa-header {
    background: #000000;
    padding: 12px 16px;
    padding-top: max(12px, env(safe-area-inset-top));
    display: flex; align-items: center; justify-content: space-between;
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    min-height: 56px;
}
.cbt-pwa-header-left { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.cbt-pwa-header-right { flex: 0 0 44px; }
.cbt-pwa-header-center { flex: 1; text-align: center; min-width: 0; }
.cbt-pwa-icon-btn {
    width: 36px; height: 36px; border: none; border-radius: 8px;
    background: rgba(255,255,255,0.1); color: #fff;
    font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.cbt-pwa-icon-btn:hover { background: rgba(255,255,255,0.2); }
.cbt-pwa-icon-btn:active { transform: scale(0.95); }
.cbt-pwa-icon-btn.light { background: rgba(255,255,255,0.15); color: #fff; }

.cbt-pwa-event-title {
    background: rgba(255,255,255,0.1); border: none; border-radius: 8px;
    padding: 6px 14px; color: #fff; font-size: 14px; font-weight: 600;
    cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    display: inline-flex; align-items: center; gap: 4px;
    transition: background 0.2s;
}
.cbt-pwa-event-title:hover { background: rgba(255,255,255,0.2); }
.cbt-pwa-event-title-static {
    color: #fff; font-size: 14px; font-weight: 600;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    display: block;
}

/* Pull-to-refresh indicator */
.cbt-pwa-pull-indicator {
    height: 0; overflow: hidden; display: flex; align-items: center; justify-content: center;
    opacity: 0; flex-shrink: 0;
}
.cbt-pwa-pull-indicator i {
    font-size: 18px; color: #94a3b8; transition: transform 0.1s;
}
.cbt-pwa-pull-indicator.refreshing i {
    animation: cbt-spin 0.8s linear infinite; color: #cfaf86;
}
@keyframes cbt-spin { to { transform: rotate(360deg); } }

/* ── Event Switcher Dropdown ──────────────────────── */
.cbt-pwa-dropdown { position: fixed; inset: 0; z-index: 200; }
.cbt-pwa-dropdown-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.5); }
.cbt-pwa-dropdown-panel {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: #fff; border-radius: 16px 16px 0 0;
    max-height: 75vh; overflow-y: auto;
    animation: cbt-slide-up 0.25s ease-out;
    /* v5.44.114: Safe-area bottom padding prevents Past Events toggle from
       being clipped by the iOS home indicator / Safari chrome bar. */
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 24px);
}
@keyframes cbt-slide-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
.cbt-pwa-dropdown-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 20px; border-bottom: 1px solid #e2e8f0;
}
.cbt-pwa-dropdown-header h3 { font-size: 16px; color: #1e293b; margin: 0; }
.cbt-pwa-dropdown-close { background: none; border: none; font-size: 18px; color: #94a3b8; cursor: pointer; padding: 4px; }
.cbt-pwa-dropdown-list { padding: 8px; }
.cbt-pwa-event-option {
    display: block; width: 100%; text-align: left; padding: 14px 16px;
    border: none; background: none; border-radius: 10px; cursor: pointer;
    transition: background 0.15s;
}
.cbt-pwa-event-option:hover { background: #f1f5f9; }
.cbt-pwa-event-option.active { background: #eff6ff; }
.cbt-pwa-event-option-name { font-size: 15px; font-weight: 600; color: #1e293b; margin-bottom: 2px; }
.cbt-pwa-event-option-date { font-size: 13px; color: #64748b; }
.cbt-pwa-event-option.active .cbt-pwa-event-option-name { color: #111111; }

/* ── Slide-Out Menu ───────────────────────────────── */
.cbt-pwa-menu { position: fixed; inset: 0; z-index: 300; }
.cbt-pwa-menu-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.5); }
.cbt-pwa-menu-panel {
    position: absolute; top: 0; left: 0; bottom: 0; width: 280px;
    background: #fff; display: flex; flex-direction: column;
    animation: cbt-slide-right 0.25s ease-out;
}
@keyframes cbt-slide-right { from { transform: translateX(-100%); } to { transform: translateX(0); } }
.cbt-pwa-menu-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px; padding-top: max(20px, env(safe-area-inset-top));
    border-bottom: 1px solid #e2e8f0;
}
.cbt-pwa-menu-close { background: none; border: none; font-size: 18px; color: #94a3b8; cursor: pointer; }
.cbt-pwa-menu-user { padding: 16px 20px; background: #f8fafc; }
.cbt-pwa-menu-name { font-size: 16px; font-weight: 700; color: #1e293b; }
.cbt-pwa-menu-role { font-size: 13px; color: #64748b; margin-top: 2px; }
.cbt-pwa-menu-nav { flex: 1; padding: 8px 12px; }
.cbt-pwa-menu-section { font-size: 11px; font-weight: 700; color: #94a3b8; letter-spacing: 0.06em; padding: 16px 20px 6px; }
.cbt-pwa-menu-section:first-child { padding-top: 8px; }
.cbt-pwa-menu-nav a {
    display: flex; align-items: center; gap: 12px; padding: 12px 12px;
    color: #1e293b; text-decoration: none; font-size: 15px; font-weight: 500;
    border-radius: 8px; transition: background 0.15s;
}
.cbt-pwa-menu-nav a:hover { background: #f1f5f9; }
.cbt-pwa-menu-nav a i { width: 20px; text-align: center; color: #64748b; }
.cbt-pwa-menu-logout { margin-top: 8px; border-top: 1px solid #e2e8f0; padding-top: 8px !important; }
.cbt-pwa-menu-footer { padding: 16px 20px; border-top: 1px solid #e2e8f0; }
.cbt-pwa-menu-footer small { color: #94a3b8; font-size: 12px; }

/* ── Main Content ─────────────────────────────────── */
.cbt-pwa-main {
    position: fixed;
    top: 56px; /* header height */
    bottom: 60px; /* tabbar height */
    left: 0; right: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
/* Adjust for safe areas */
@supports(padding: max(0px)) {
    .cbt-pwa-main { top: calc(56px + max(0px, env(safe-area-inset-top))); }
}

.cbt-pwa-panel { display: none; min-height: 100%; }
.cbt-pwa-panel.active { display: block; }

/* ── Manage Sub-Tab Bar ────────────────────────────── */
.cbt-pwa-subtab-bar {
    display: flex; gap: 0; background: #fff; border-bottom: 1px solid #e2e8f0;
    padding: 8px 16px;
}
.cbt-pwa-subtab-bar button {
    flex: 1; padding: 8px; border: 1.5px solid #e2e8f0; background: #f8fafc;
    color: #64748b; font-size: 13px; font-weight: 600; cursor: pointer;
    transition: all 0.15s;
}
.cbt-pwa-subtab-bar button:first-child { border-radius: 8px 0 0 8px; border-right: none; }
.cbt-pwa-subtab-bar button:last-child { border-radius: 0 8px 8px 0; }
.cbt-pwa-subtab-bar button.active {
    background: #000000; color: #fff; border-color: #111111;
}
.cbt-pwa-manage-section { display: none; }
.cbt-pwa-manage-section.active { display: block; }

/* ── Coming Soon State ────────────────────────────── */
.cbt-pwa-coming-soon {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 60px 24px; text-align: center; color: #94a3b8;
}
.cbt-pwa-coming-soon i { font-size: 48px; margin-bottom: 16px; opacity: 0.5; }
.cbt-pwa-coming-soon h3 { font-size: 18px; color: #64748b; margin: 0 0 8px; }
.cbt-pwa-coming-soon p { font-size: 14px; margin: 0; }

/* ── Empty State ──────────────────────────────────── */
.cbt-pwa-empty-state {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 48px 24px; text-align: center; color: #94a3b8;
}
.cbt-pwa-empty-state i { font-size: 40px; margin-bottom: 12px; opacity: 0.5; }
.cbt-pwa-empty-state p { font-size: 14px; margin: 0; }

/* ── Device Counter ───────────────────────────────── */
.cbt-pwa-device-counter {
    padding: 8px 16px; background: #eff6ff; color: #3b82f6;
    font-size: 13px; font-weight: 500; text-align: center;
    border: 1px solid #dbeafe; border-radius: 10px; margin-bottom: 12px;
}
.cbt-pwa-device-counter i { margin-right: 4px; }

/* ── Stats Bar ────────────────────────────────────── */
.cbt-pwa-stats-bar {
    display: flex; gap: 8px; margin-bottom: 16px;
}
.cbt-pwa-stat {
    flex: 1; text-align: center; padding: 12px 8px;
    background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 10px;
}
.cbt-pwa-stat-num { font-size: 22px; font-weight: 700; color: #1e293b; }
.cbt-pwa-stat-label { font-size: 10px; font-weight: 600; color: #94a3b8; margin-top: 2px; text-transform: uppercase; letter-spacing: 0.5px; }
.cbt-pwa-stat-icon { font-size: 13px; color: #94a3b8; margin-bottom: 4px; }
.cbt-pwa-stat.green .cbt-pwa-stat-icon { color: #16a34a; }
.cbt-pwa-stat.amber .cbt-pwa-stat-icon { color: #d97706; }
.cbt-pwa-stat.green .cbt-pwa-stat-num { color: #16a34a; }
.cbt-pwa-stat.amber .cbt-pwa-stat-num { color: #d97706; }

/* ── Filter Tabs ──────────────────────────────────── */
.cbt-pwa-filter-tabs {
    display: flex; gap: 6px; margin-bottom: 12px;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.cbt-pwa-filter-tabs button {
    flex: 0 0 auto; padding: 6px 14px; border: 1px solid #e2e8f0;
    border-radius: 20px; background: #fff; color: #64748b;
    font-size: 13px; font-weight: 500; cursor: pointer;
    white-space: nowrap; transition: all 0.15s;
}
.cbt-pwa-filter-tabs button.active {
    background: #000000; color: #fff; border-color: #111111;
}

/* ── Search Bar ───────────────────────────────────── */
.cbt-pwa-search {
    position: relative; margin-bottom: 12px;
}
.cbt-pwa-search input {
    width: 100%; padding: 12px 40px 12px 14px;
    border: 1px solid #e5e7eb; border-radius: 10px;
    font-size: 16px; color: #1e293b; background: #fff;
    outline: none; transition: border-color 0.2s;
    min-height: 48px; box-sizing: border-box;
}
.cbt-pwa-search input:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.12); }
.cbt-pwa-search input::placeholder { color: #6b7280; }
.cbt-pwa-search-clear {
    position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: #94a3b8; font-size: 14px;
    cursor: pointer; padding: 4px;
}

/* ── Attendee List ────────────────────────────────── */
.cbt-pwa-attendee-list { padding-bottom: 80px; /* space for FAB */ }

/* ── Panel Padding — all panels match bookings ────── */
#cbt-pwa-panel-checkin { padding: 16px; }

.cbt-pwa-attendee-row {
    display: flex; align-items: center; gap: 12px;
    padding: 12px; margin-bottom: 6px;
    background: #fff; border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.15s;
}
.cbt-pwa-attendee-row.checked-in { border-color: #bbf7d0; background: #f0fdf4; }

.cbt-pwa-attendee-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: #e2e8f0; color: #64748b;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700; flex-shrink: 0;
}
.cbt-pwa-attendee-row.checked-in .cbt-pwa-attendee-avatar {
    background: #dcfce7; color: #16a34a;
}

.cbt-pwa-attendee-info { flex: 1; min-width: 0; }
.cbt-pwa-attendee-name {
    font-size: 15px; font-weight: 600; color: #1e293b;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cbt-pwa-attendee-meta {
    font-size: 12px; color: #64748b; margin-top: 2px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cbt-pwa-attendee-seat {
    font-size: 11px; color: #7c3aed; margin-top: 2px; font-weight: 500;
}
.cbt-pwa-attendee-seat i { margin-right: 3px; font-size: 10px; }

/* Check-in button — circle icon style matching the app */
.cbt-pwa-checkin-btn {
    flex-shrink: 0;
    width: 32px; height: 32px; border-radius: 50%;
    border: 2px solid #d1d5db; background: #fff;
    cursor: pointer; transition: all 0.2s;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; color: #d1d5db; padding: 0;
}
.cbt-pwa-checkin-btn:active { transform: scale(0.90); }
.cbt-pwa-checkin-btn.checked {
    background: #16a34a; border-color: #16a34a; color: #fff;
    font-size: 16px;
}
.cbt-pwa-checkin-btn.loading {
    opacity: 0.6; pointer-events: none;
}

/* Member log visit button — smaller circle matching app */
.cbt-pwa-member-log-btn {
    flex-shrink: 0;
    width: 32px; height: 32px; border-radius: 50%;
    border: 2px solid #d1d5db; background: #fff;
    cursor: pointer; transition: all 0.2s;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; color: #d1d5db; padding: 0;
}
.cbt-pwa-member-log-btn:active { transform: scale(0.90); }
.cbt-pwa-member-log-btn.visited {
    background: #16a34a; border-color: #16a34a; color: #fff;
    font-size: 16px;
}
.cbt-pwa-member-log-btn:disabled { opacity: 0.5; pointer-events: none; }

/* Seat assignment button in check-in row — same size as check-in circle */
.cbt-pwa-seat-btn {
    flex-shrink: 0;
    width: 32px; height: 32px; border-radius: 50%;
    border: 1.5px solid #cbd5e1; background: #fff; color: #94a3b8;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 14px; transition: all 0.15s;
    margin-right: 6px; padding: 0;
}
.cbt-pwa-seat-btn:active { transform: scale(0.90); }
.cbt-pwa-seat-btn.has-seat { border-color: #22c55e; color: #22c55e; background: #f0fdf4; }

/* ── Floating Action Button (Scan QR) ─────────────── */
.cbt-pwa-fab {
    position: fixed;
    bottom: calc(60px + 16px + env(safe-area-inset-bottom, 0px));
    left: 50%; transform: translateX(-50%);
    z-index: 50;
    display: flex; align-items: center; gap: 8px;
    padding: 14px 24px; border: none; border-radius: 28px;
    background: #000000; color: #fff;
    font-size: 15px; font-weight: 600;
    cursor: pointer; box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    transition: all 0.2s;
}
.cbt-pwa-fab:hover { box-shadow: 0 6px 28px rgba(10,31,68,0.5); }
.cbt-pwa-fab:active { transform: translateX(-50%) scale(0.95); }
.cbt-pwa-fab i { font-size: 18px; }

/* ── Tab Bar ──────────────────────────────────────── */
.cbt-pwa-tabbar {
    position: fixed; bottom: 0; left: 0; right: 0;
    height: 60px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: #fff; border-top: 1px solid #e2e8f0;
    display: flex; align-items: stretch; z-index: 100;
}
.cbt-pwa-tabbar button {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; border: none; background: none; color: #94a3b8;
    font-size: 10px; font-weight: 500; cursor: pointer;
    transition: color 0.15s; position: relative; padding: 4px 0;
}
.cbt-pwa-tabbar button i { font-size: 18px; }
.cbt-tab-flip { transform: scaleX(-1); display: inline-block; }
.cbt-tab-svg-icon { width: 18px; height: 18px; display: block; margin: 0 auto; }
.cbt-pwa-tabbar button.active { color: #000000; }
.cbt-pwa-tabbar button.active::after {
    content: ''; position: absolute; top: 0; left: 20%; right: 20%;
    height: 3px; background: #000000; border-radius: 0 0 3px 3px;
}

/* ── QR Scanner Overlay ───────────────────────────── */
.cbt-pwa-scanner-overlay {
    position: fixed; inset: 0; z-index: 500;
    background: #000; display: flex; flex-direction: column;
}
.cbt-pwa-scanner-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px;
    padding-top: max(12px, env(safe-area-inset-top));
    background: rgba(0,0,0,0.8); color: #fff;
    font-size: 16px; font-weight: 600;
}
.cbt-pwa-qr-reader {
    flex: 1; position: relative; overflow: hidden;
}
.cbt-pwa-qr-reader video { width: 100%; height: 100%; object-fit: cover; }
.cbt-pwa-scan-result {
    position: absolute; bottom: 60px; left: 16px; right: 16px;
    z-index: 10;
}
.cbt-pwa-scanner-hint {
    padding: 16px; text-align: center; color: rgba(255,255,255,0.6);
    font-size: 13px; background: rgba(0,0,0,0.8);
    padding-bottom: max(16px, env(safe-area-inset-bottom));
}

/* Scan result cards */
.cbt-pwa-scan-card {
    background: #fff; border-radius: 12px; padding: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    animation: cbt-pop-in 0.2s ease-out;
}
@keyframes cbt-pop-in { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.cbt-pwa-scan-card.success { border-left: 4px solid #16a34a; }
.cbt-pwa-scan-card.error { border-left: 4px solid #dc2626; }
.cbt-pwa-scan-card.warning { border-left: 4px solid #f59e0b; }
.cbt-pwa-scan-card h3 { font-size: 16px; margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.cbt-pwa-scan-card h3 i.fa-check-circle { color: #16a34a; }
.cbt-pwa-scan-card h3 i.fa-exclamation-triangle { color: #f59e0b; }
.cbt-pwa-scan-card h3 i.fa-times-circle { color: #dc2626; }
.cbt-pwa-scan-card p { font-size: 14px; color: #64748b; margin: 4px 0; }
.cbt-pwa-scan-card .cbt-pwa-scan-actions { margin-top: 12px; display: flex; gap: 8px; }
.cbt-pwa-scan-card .cbt-pwa-scan-actions button {
    flex: 1; padding: 10px; border: none; border-radius: 8px;
    font-size: 14px; font-weight: 600; cursor: pointer;
}
.cbt-pwa-scan-btn-primary { background: #000000; color: #fff; }
.cbt-pwa-scan-btn-secondary { background: #f1f5f9; color: #1e293b; }
.cbt-pwa-scan-btn-undo { background: #fef3c7; color: #92400e; }

/* Sound toggle */
#cbt-pwa-sound-toggle.muted i::after {
    content: ''; position: absolute;
    width: 2px; height: 20px;
    background: #fff; transform: rotate(45deg);
    top: 50%; left: 50%; margin-top: -10px; margin-left: -1px;
}

/* ── Toast Notification ───────────────────────────── */
.cbt-pwa-toast {
    position: fixed; top: 80px; left: 50%; transform: translateX(-50%);
    padding: 10px 20px; border-radius: 10px;
    font-size: 14px; font-weight: 600; color: #fff; z-index: 600;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    animation: cbt-toast-in 0.3s ease-out;
    pointer-events: none;
}
.cbt-pwa-toast.success { background: #16a34a; }
.cbt-pwa-toast.error { background: #dc2626; }
.cbt-pwa-toast.undo { background: #f59e0b; color: #1e293b; }
@keyframes cbt-toast-in { from { transform: translateX(-50%) translateY(-20px); opacity: 0; } to { transform: translateX(-50%) translateY(0); opacity: 1; } }

/* ── Loading Spinner ──────────────────────────────── */
.cbt-pwa-loading {
    display: flex; align-items: center; justify-content: center;
    padding: 40px; color: #94a3b8; font-size: 14px; gap: 8px;
}

/* ── Responsive ───────────────────────────────────── */
@media (min-width: 769px) {
    .cbt-pwa-main { max-width: 540px; margin: 0 auto; left: 50%; transform: translateX(-50%); }
    .cbt-pwa-tabbar { max-width: 540px; left: 50%; transform: translateX(-50%); }
    .cbt-pwa-header { max-width: 540px; left: 50%; transform: translateX(-50%); }
    .cbt-pwa-fab { max-width: 540px; }
}

@media (max-width: 380px) {
    .cbt-pwa-tabbar button span { font-size: 9px; }
    .cbt-pwa-checkin-btn { width: 32px; height: 32px; font-size: 16px; }
    .cbt-pwa-attendee-name { font-size: 14px; }
}

/* ── Bookings Tab ─────────────────────────────── */
#cbt-pwa-panel-bookings { padding:16px; }
/* New: bookings/members are now sub-panels inside Manage */
#cbt-pwa-manage-bookings { padding:0; } /* inherits from panel-manage */
#cbt-pwa-booking-stats { display:flex; gap:8px; margin-bottom:16px; }
#cbt-pwa-booking-stats .cbt-pwa-stat { flex:1; background:#f8fafc; border:1px solid #e5e7eb; border-radius:10px; padding:12px 8px; text-align:center; }
#cbt-pwa-booking-stats .cbt-pwa-stat span { display:block; font-size:22px; font-weight:700; color:#1e293b; }
#cbt-pwa-booking-stats .cbt-pwa-stat label { display:block; font-size:10px; font-weight:600; color:#94a3b8; text-transform:uppercase; letter-spacing:0.5px; margin-top:2px; }

.cbt-pwa-booking-card { background:#fff; border:1px solid #e5e7eb; border-radius:12px; padding:14px 16px; margin-bottom:10px; box-shadow:0 1px 3px rgba(0,0,0,0.04); display:flex; align-items:center; gap:12px; cursor:pointer; -webkit-tap-highlight-color:transparent; }
.cbt-pwa-booking-card:active { background:#f9fafb; }
.cbt-bk-card-time { background:#1e293b; color:#fff; font-size:12px; font-weight:700; padding:8px 10px; border-radius:8px; white-space:nowrap; min-width:60px; text-align:center; flex-shrink:0; }
.cbt-bk-card-center { flex:1; min-width:0; }
.cbt-bk-card-name { font-weight:700; color:#1e293b; font-size:15px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cbt-bk-card-space { font-size:13px; color:#64748b; margin-top:2px; }
.cbt-bk-card-meta { display:flex; align-items:center; gap:8px; margin-top:4px; flex-wrap:wrap; }
.cbt-bk-card-badge { font-size:11px; font-weight:600; padding:2px 8px; border-radius:4px; }
.cbt-bk-badge-green { background:#dcfce7; color:#16a34a; }
.cbt-bk-badge-amber { background:#fef3c7; color:#d97706; }
.cbt-bk-badge-gray  { background:#f1f5f9; color:#64748b; }
.cbt-bk-card-guests { font-size:12px; color:#6b7280; }
.cbt-bk-card-circle { width:36px; height:36px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:14px; font-weight:700; flex-shrink:0; }
.cbt-bk-circle-muted { background:#e5e7eb; color:#6b7280; }
.cbt-bk-circle-amber { background:#fef3c7; color:#d97706; }
.cbt-bk-circle-green { background:#dcfce7; color:#16a34a; }

/* Walk-In Button — large, prominent, accessible */
.cbt-pwa-action-btn { width:100%; padding:16px; background:#000000; color:#fff; border:none; border-radius:12px; font-size:16px; font-weight:600; cursor:pointer; display:flex; align-items:center; justify-content:center; gap:8px; min-height:52px; -webkit-tap-highlight-color:transparent; }
.cbt-pwa-action-btn:active { background:#222222; transform:scale(0.98); }
.cbt-pwa-action-btn i { font-size:18px; }

/* Walk-In Form */
.cbt-pwa-form-header { display:flex; align-items:center; gap:12px; padding:14px 0; border-bottom:1px solid #e5e7eb; margin-bottom:20px; font-weight:700; font-size:18px; color:#1e293b; }
.cbt-pwa-back-btn { background:none; border:none; font-size:20px; color:#64748b; cursor:pointer; padding:6px; min-width:44px; min-height:44px; display:flex; align-items:center; justify-content:center; }
.cbt-pwa-form-body { display:flex; flex-direction:column; gap:16px; }
.cbt-pwa-field { display:flex; flex-direction:column; gap:6px; position:relative; }
.cbt-pwa-field label { font-size:13px; font-weight:600; color:#475569; letter-spacing:0.2px; }
.cbt-pwa-field input, .cbt-pwa-field select { padding:12px 14px; border:1px solid #d1d5db; border-radius:10px; font-size:16px; color:#1e293b; background:#fff; -webkit-appearance:none; min-height:48px; box-sizing:border-box; }
.cbt-pwa-field input:focus, .cbt-pwa-field select:focus { outline:none; border-color:#3b82f6; box-shadow:0 0 0 3px rgba(59,130,246,0.12); }
.cbt-pwa-field input::placeholder { color:#6b7280; }
.cbt-pwa-field-row { display:flex; gap:10px; }
.cbt-pwa-lookup-dropdown {
    position:absolute; top:100%; left:0; right:0; z-index:100;
    background:#fff; border:1px solid #d1d5db; border-radius:10px;
    box-shadow:0 8px 24px rgba(0,0,0,0.12); max-height:200px; overflow-y:auto;
}
.cbt-pwa-lookup-item { padding:12px 14px; cursor:pointer; border-bottom:1px solid #f1f5f9; }
.cbt-pwa-lookup-item:last-child { border-bottom:none; }
.cbt-pwa-lookup-item:hover, .cbt-pwa-lookup-item:active { background:#f0f9ff; }
.cbt-pwa-lookup-name { font-size:14px; font-weight:600; color:#1e293b; }
.cbt-pwa-lookup-email { font-size:12px; color:#64748b; }
.cbt-pwa-field textarea { padding:12px 14px; border:1px solid #d1d5db; border-radius:10px; font-size:16px; color:#1e293b; background:#fff; width:100%; box-sizing:border-box; font-family:inherit; }

.cbt-pwa-stepper { display:flex; align-items:center; gap:16px; }
.cbt-pwa-step-btn { width:44px; height:44px; border:1px solid #d1d5db; border-radius:10px; background:#fff; font-size:20px; font-weight:700; color:#374151; cursor:pointer; display:flex; align-items:center; justify-content:center; -webkit-tap-highlight-color:transparent; }
.cbt-pwa-step-btn:active { background:#f1f5f9; transform:scale(0.95); }
.cbt-pwa-stepper span { font-size:22px; font-weight:700; min-width:32px; text-align:center; }

.cbt-pwa-submit-btn { width:100%; padding:16px; background:#000000; color:#fff; border:none; border-radius:12px; font-size:16px; font-weight:600; cursor:pointer; display:flex; align-items:center; justify-content:center; gap:8px; min-height:52px; margin-top:4px; -webkit-tap-highlight-color:transparent; }
.cbt-pwa-submit-btn:active { background:#222222; transform:scale(0.98); }
.cbt-pwa-submit-btn:disabled { opacity:0.6; cursor:default; }
.cbt-pwa-submit-btn:disabled:active { transform:none; }

.cbt-pwa-form-error { background:#fef2f2; border:1px solid #fca5a5; color:#991b1b; padding:10px 14px; border-radius:10px; font-size:14px; font-weight:500; display:flex; align-items:center; gap:8px; }

/* Search */
.cbt-pwa-search { padding:0 0 12px; }
.cbt-pwa-search input { width:100%; padding:12px 40px 12px 14px; border:1px solid #e5e7eb; border-radius:10px; font-size:16px; color:#1e293b; background:#f8fafc; box-sizing:border-box; min-height:48px; }
.cbt-pwa-search input:focus { outline:none; border-color:#3b82f6; background:#fff; box-shadow:0 0 0 3px rgba(59,130,246,0.12); }
.cbt-pwa-search input::placeholder { color:#6b7280; }

/* ═══════════════════════════════════════════════════════
   SELL TAB (v5.40.18)
   ═══════════════════════════════════════════════════════ */

/* Panel padding to match bookings */
#cbt-pwa-panel-sell { padding:16px; position:relative; }

/* Section label */
.cbt-sell-section-label { font-size:14px; font-weight:600; color:#64748b; margin-bottom:10px; letter-spacing:0.2px; }

/* Ticket type cards */
.cbt-sell-type-card { width:100%; display:flex; align-items:center; justify-content:space-between; padding:16px; margin-bottom:8px; background:#fff; border:1px solid #e5e7eb; border-radius:12px; cursor:pointer; -webkit-tap-highlight-color:transparent; text-align:left; font-family:inherit; transition:border-color 0.15s; }
.cbt-sell-type-card:active { border-color:#3b82f6; background:#f8fafc; transform:scale(0.99); }
.cbt-sell-type-card.sold-out { opacity:0.5; cursor:default; }
.cbt-sell-type-card.sold-out:active { transform:none; border-color:#e5e7eb; background:#fff; }

.cbt-sell-type-left { display:flex; align-items:center; gap:12px; flex:1; min-width:0; }
.cbt-sell-type-icon { font-size:18px; flex-shrink:0; color:#d97706; width:32px; height:32px; display:flex; align-items:center; justify-content:center; background:#fef3c7; border-radius:8px; }
.cbt-sell-type-info { min-width:0; }
.cbt-sell-type-name { font-size:15px; font-weight:600; color:#1e293b; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cbt-sell-type-remain { font-size:12px; color:#059669; margin-top:2px; }
.cbt-sell-type-remain.sold-out-text { color:#dc2626; font-weight:600; }
.cbt-sell-type-price { font-size:15px; font-weight:700; color:#111111; white-space:nowrap; margin-left:12px; }

/* Comp button — matches Walk-In Booking style */
.cbt-sell-comp-btn { background:#000000 !important; }
.cbt-sell-comp-btn:active { background:#222222 !important; }
.cbt-sell-comp-btn.cbt-sell-comp-active { background:#dc2626 !important; }
.cbt-sell-comp-btn.cbt-sell-comp-active:active { background:#b91c1c !important; }
.cbt-sell-comp-label { color:#6366f1; font-weight:600; }

/* Sell ticket info line */
.cbt-sell-ticket-info { font-size:16px; color:#1e293b; padding:12px 16px; background:#f1f5f9; border-radius:10px; margin-bottom:4px; }

/* Auto-capitalize name input */
.cbt-sell-name-input { text-transform:capitalize; }

/* Success toast (top of ticket list) */
.cbt-sell-success-toast { background:#f0fdf4; border:1px solid #86efac; color:#166534; padding:12px 16px; border-radius:10px; font-size:14px; font-weight:500; display:flex; align-items:center; gap:8px; margin-bottom:12px; animation:cbtFadeIn 0.2s ease; }
.cbt-sell-success-toast i { color:#16a34a; }

/* Total line */
.cbt-sell-total { font-size:18px; color:#1e293b; padding:12px 0; border-top:1px solid #e5e7eb; }
.cbt-sell-total strong { color:#059669; }

/* Payment buttons */
.cbt-sell-payment-btns { display:flex; gap:10px; }
.cbt-sell-btn { flex:1; padding:16px 12px; border:none; border-radius:12px; font-size:15px; font-weight:600; cursor:pointer; display:flex; align-items:center; justify-content:center; gap:8px; min-height:52px; -webkit-tap-highlight-color:transparent; }
.cbt-sell-btn:active { transform:scale(0.97); }
.cbt-sell-btn:disabled { opacity:0.6; cursor:default; }
.cbt-sell-btn:disabled:active { transform:none; }

.cbt-sell-btn-card { background:#3b82f6; color:#fff; }
.cbt-sell-btn-card:active { background:#2563eb; }
.cbt-sell-btn-card:disabled { background:#cbd5e1; color:#94a3b8; cursor:not-allowed; }
.cbt-sell-btn-card:disabled:active { background:#cbd5e1; transform:none; }
.cbt-sell-btn-cash { background:#059669; color:#fff; }
.cbt-sell-btn-cash:active { background:#047857; }

/* QR button */
.cbt-sell-btn-qr { background:#7c3aed; color:#fff; }
.cbt-sell-btn-qr:active { background:#6d28d9; }
.cbt-sell-btn-qr:disabled { background:#cbd5e1; color:#94a3b8; cursor:not-allowed; }

/* QR Payment Overlay */
.cbt-sell-qr-overlay { position:absolute; top:0; left:0; right:0; bottom:0; background:#fff; z-index:100; display:flex; flex-direction:column; border-radius:16px; }
.cbt-sell-qr-header { display:flex; justify-content:space-between; align-items:center; padding:16px 20px; border-bottom:1px solid #e5e7eb; }
.cbt-sell-qr-header h3 { margin:0; font-size:18px; color:#111111; }
.cbt-sell-qr-close { background:none; border:none; font-size:20px; color:#6b7280; cursor:pointer; padding:4px 8px; }
.cbt-sell-qr-body { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:24px 20px; gap:16px; }
.cbt-sell-qr-code { padding:16px; background:#fff; border:3px solid #111111; border-radius:12px; }
.cbt-sell-qr-amount { font-size:28px; font-weight:700; color:#111111; margin:0; }
.cbt-sell-qr-hint { font-size:14px; color:#6b7280; margin:0; text-align:center; }
.cbt-sell-qr-status { font-size:15px; color:#3b82f6; font-weight:600; }
.cbt-sell-qr-timer { font-size:13px; color:#6b7280; margin:0; }

/* Stripe card element */
.cbt-sell-card-element { padding:14px; border:1px solid #d1d5db; border-radius:10px; background:#fff; margin-bottom:10px; min-height:48px; }
.cbt-sell-card-errors { color:#dc2626; font-size:13px; min-height:18px; margin-bottom:8px; }

/* Auto check-in toggle */
.cbt-sell-auto-checkin { padding-top:4px; }
.cbt-sell-toggle { display:flex; align-items:center; gap:10px; cursor:pointer; font-size:14px; color:#475569; }
.cbt-sell-toggle input[type="checkbox"] { width:20px; height:20px; accent-color:#059669; cursor:pointer; }

/* No Stripe info bar */
.cbt-sell-no-stripe { display:flex; align-items:center; gap:8px; padding:10px 14px; background:#fefce8; border:1px solid #fde68a; border-radius:10px; font-size:13px; color:#92400e; margin-top:8px; }

/* Success card */
.cbt-sell-success-card { text-align:center; padding:40px 20px; }
.cbt-sell-success-icon { font-size:48px; margin-bottom:12px; color:#059669; }
.cbt-sell-success-title { font-size:24px; font-weight:700; color:#059669; margin-bottom:8px; }
.cbt-sell-success-detail { font-size:16px; color:#1e293b; margin-bottom:6px; }
.cbt-sell-success-method { font-size:14px; color:#64748b; margin-bottom:24px; }

/* Error toast */
.cbt-sell-error-toast { background:#fef2f2; border:1px solid #fca5a5; color:#991b1b; padding:12px 16px; border-radius:10px; font-size:14px; font-weight:500; display:flex; align-items:center; gap:8px; margin-bottom:12px; animation:cbtFadeIn 0.2s ease; }
@keyframes cbtFadeIn { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:translateY(0); } }

/* Shake animation for validation */
.cbt-pwa-shake { animation:cbtShake 0.4s ease; }
@keyframes cbtShake { 0%,100% { transform:translateX(0); } 20%,60% { transform:translateX(-6px); } 40%,80% { transform:translateX(6px); } }

/* ── Members Tab (Phase 3) ─────────────────── */
#cbt-pwa-panel-members { padding:16px; }
#cbt-pwa-manage-members { padding:0; } /* sub-panel inherits from #cbt-pwa-panel-manage */

/* ── Manage Tab (Phase 4) ─────────────────── */
#cbt-pwa-panel-manage { padding:16px; }

/* ── Dashboard Tab (was Manage→Stats) ──────── */
#cbt-pwa-panel-dashboard { padding:16px; }

/* ── Orders Tab (was Manage→Orders) ────────── */
#cbt-pwa-panel-orders { padding:16px; }

/* Metrics row (check-in rate + door sales) */
/* Dashboard top 2 stat cards */
.cbt-dash-top-row { display:flex; gap:10px; margin-bottom:12px; }
.cbt-dash-card { flex:1; background:#fff; border:1px solid #e5e7eb; border-radius:12px; padding:14px 12px; display:flex; flex-direction:column; align-items:center; }
.cbt-dash-card-icon { font-size:14px; color:#94a3b8; margin-bottom:6px; }
.cbt-dash-card-num { font-size:22px; font-weight:700; color:#1e293b; line-height:1; }
.cbt-dash-card-label { font-size:10px; font-weight:600; color:#94a3b8; text-transform:uppercase; letter-spacing:0.5px; margin-top:4px; }

/* Dashboard full-width wide cards */
.cbt-dash-wide-card { background:#fff; border:1px solid #e5e7eb; border-radius:12px; padding:14px 16px; margin-bottom:12px; display:flex; align-items:center; gap:12px; }
.cbt-dash-door-icon { font-size:18px; color:#94a3b8; flex-shrink:0; }
.cbt-dash-wide-body { flex:1; min-width:0; }
.cbt-dash-wide-title { font-size:14px; font-weight:600; color:#1e293b; }
.cbt-dash-wide-sub { font-size:12px; color:#94a3b8; margin-top:1px; }
.cbt-dash-wide-value { font-size:22px; font-weight:700; color:#1e293b; flex-shrink:0; }
.cbt-dash-wide-value.green { color:#16a34a; }
.cbt-dash-bar-wrap { height:5px; background:#e5e7eb; border-radius:3px; overflow:hidden; margin-top:8px; }
.cbt-dash-bar-fill { height:100%; background:#16a34a; border-radius:3px; transition:width 0.5s ease; }

/* Promo code row */
.cbt-pwa-promo-row { display:flex; gap:8px; align-items:stretch; }
.cbt-pwa-promo-row input { flex:1; padding:12px 14px; border:1px solid #d1d5db; border-radius:10px; font-size:16px; color:#1e293b; background:#fff; min-height:48px; box-sizing:border-box; }
.cbt-pwa-promo-row input:focus { outline:none; border-color:#3b82f6; box-shadow:0 0 0 3px rgba(59,130,246,0.12); }
.cbt-pwa-promo-row input::placeholder { color:#6b7280; }
.cbt-pwa-promo-row button { padding:12px 18px; background:#64748b; color:#fff; border:none; border-radius:10px; font-size:15px; font-weight:600; cursor:pointer; white-space:nowrap; min-height:48px; }
.cbt-pwa-promo-row button:active { background:#475569; }
.cbt-pwa-promo-row button.applied { background:#059669; }
.cbt-sell-promo-msg { font-size:13px; padding:4px 2px; }
.cbt-sell-promo-msg.success { color:#059669; }
.cbt-sell-promo-msg.error { color:#dc2626; }

/* Email domain suggestion dropdown */
#cbt-email-suggestions { display:none; position:absolute; z-index:200; left:0; right:0; background:#fff; border:1px solid #e5e7eb; border-top:none; border-radius:0 0 10px 10px; box-shadow:0 4px 12px rgba(0,0,0,0.08); overflow:hidden; }
.cbt-email-suggestion { padding:11px 14px; font-size:15px; color:#1e293b; cursor:pointer; border-bottom:1px solid #f1f5f9; }
.cbt-email-suggestion:last-child { border-bottom:none; }
.cbt-email-suggestion:active { background:#f8fafc; }
.cbt-email-suggestion strong { color:#3b82f6; }

/* Section titles */
.cbt-pwa-manage-section-title {
    font-size:13px; font-weight:700; color:#64748b; text-transform:uppercase;
    letter-spacing:0.5px; margin:20px 0 10px; display:flex; align-items:center; gap:6px;
}
.cbt-pwa-manage-section-title i { font-size:12px; }

/* Ticket type breakdown rows */
.cbt-pwa-manage-type-list { display:flex; flex-direction:column; gap:6px; margin-bottom:16px; }
.cbt-pwa-manage-type-row {
    display:flex; justify-content:space-between; align-items:center;
    background:#fff; border:1px solid #e5e7eb; border-radius:10px; padding:12px 14px;
}
.cbt-pwa-manage-type-name { font-size:14px; font-weight:600; color:#1e293b; }
.cbt-pwa-manage-type-detail { font-size:12px; color:#64748b; margin-top:2px; }
.cbt-pwa-manage-type-checkin { text-align:right; }
.cbt-pwa-manage-type-ci-num { display:block; font-size:14px; font-weight:700; color:#16a34a; }
.cbt-pwa-manage-type-ci-label { display:block; font-size:10px; color:#94a3b8; text-transform:uppercase; }

/* Bar chart */
.cbt-pwa-manage-chart { margin-bottom:16px; }
.cbt-pwa-manage-bar-chart {
    display:flex; align-items:flex-end; gap:4px; height:120px;
    background:#f8fafc; border:1px solid #e5e7eb; border-radius:10px; padding:12px 8px 4px;
}
.cbt-pwa-manage-bar-col { flex:1; display:flex; flex-direction:column; align-items:center; min-width:0; }
.cbt-pwa-manage-bar-count { font-size:10px; font-weight:600; color:#64748b; margin-bottom:2px; }
.cbt-pwa-manage-bar { width:100%; max-width:28px; background:#111111; border-radius:4px 4px 0 0; min-height:2px; transition:height 0.3s ease; }
.cbt-pwa-manage-bar-label { font-size:9px; color:#94a3b8; margin-top:4px; }

/* Order cards */
.cbt-pwa-manage-order-card {
    background:#fff; border:1px solid #e5e7eb; border-radius:10px;
    margin-bottom:8px; overflow:hidden; transition:border-color 0.2s;
}
.cbt-pwa-manage-order-card.expanded { border-color:#3b82f6; }
.cbt-pwa-manage-order-header {
    display:flex; justify-content:space-between; align-items:center;
    padding:14px 16px; cursor:pointer;
}
.cbt-pwa-manage-order-name { font-size:15px; font-weight:600; color:#1e293b; }
.cbt-pwa-manage-order-meta { font-size:12px; color:#94a3b8; margin-top:2px; }
.cbt-pwa-manage-order-right { text-align:right; }
.cbt-pwa-manage-order-total { font-size:15px; font-weight:700; color:#1e293b; }
.cbt-pwa-manage-order-badge {
    display:inline-block; font-size:10px; font-weight:600; padding:2px 8px;
    border-radius:10px; text-transform:uppercase; letter-spacing:0.3px; margin-top:4px;
}
.cbt-pwa-manage-order-badge.green { background:#dcfce7; color:#16a34a; }
.cbt-pwa-manage-order-badge.red { background:#fee2e2; color:#dc2626; }
.cbt-pwa-manage-order-badge.gray { background:#f1f5f9; color:#64748b; }

/* Order detail expansion */
.cbt-pwa-manage-order-details {
    border-top:1px solid #e5e7eb; padding:14px 16px; background:#f8fafc;
}
.cbt-pwa-manage-order-detail-row {
    display:flex; justify-content:space-between; font-size:13px; color:#374151;
    padding:4px 0; border-bottom:1px solid #f1f5f9;
}
.cbt-pwa-manage-order-detail-label { font-weight:600; color:#64748b; }
.cbt-pwa-manage-order-attendees { margin-top:10px; }
.cbt-pwa-manage-order-att {
    font-size:13px; color:#374151; padding:4px 0; display:flex; align-items:center; gap:6px;
}
.cbt-pwa-manage-order-att-type { font-size:11px; color:#94a3b8; margin-left:auto; }
.cbt-pwa-manage-order-actions { margin-top:12px; display:flex; gap:8px; flex-wrap:wrap; }
.cbt-pwa-manage-resend-btn {
    display:inline-flex; align-items:center; gap:6px;
    padding:8px 16px; background:#f1f5f9; border:1px solid #e2e8f0;
    border-radius:8px; font-size:13px; font-weight:500; color:#374151;
    cursor:pointer; transition:all 0.15s;
}
.cbt-pwa-manage-resend-btn:hover { background:#e2e8f0; }

/* Refund button */
.cbt-pwa-manage-refund-btn {
    display:inline-flex; align-items:center; gap:6px;
    padding:8px 16px; background:#fff; border:1px solid #fca5a5;
    border-radius:8px; font-size:13px; font-weight:500; color:#dc2626;
    cursor:pointer; transition:all 0.15s;
}
.cbt-pwa-manage-refund-btn:hover { background:#fee2e2; }
.cbt-pwa-manage-refund-btn:disabled { opacity:0.6; pointer-events:none; }

/* Seat label in attendee list */
.cbt-pwa-manage-order-att-seat {
    display:block; font-size:11px; color:#7c3aed; margin-top:2px; font-weight:500;
}

/* Refund confirmation modal */
.cbt-pwa-refund-modal {
    position:fixed; inset:0; z-index:9999;
    background:rgba(0,0,0,0.5); display:flex;
    align-items:center; justify-content:center; padding:24px;
}
.cbt-pwa-refund-modal-box {
    background:#fff; border-radius:16px; padding:24px; width:100%; max-width:340px;
    box-shadow:0 20px 60px rgba(0,0,0,0.3);
}
.cbt-pwa-refund-modal-title {
    font-size:17px; font-weight:700; color:#1e293b; margin-bottom:10px;
}
.cbt-pwa-refund-modal-title i { color:#dc2626; margin-right:6px; }
.cbt-pwa-refund-modal-body {
    font-size:14px; color:#64748b; margin-bottom:20px; line-height:1.5;
}
.cbt-pwa-refund-modal-actions { display:flex; gap:10px; }
.cbt-pwa-refund-cancel {
    flex:1; padding:11px; background:#f1f5f9; border:1px solid #e2e8f0;
    border-radius:10px; font-size:14px; font-weight:600; color:#374151; cursor:pointer;
}
.cbt-pwa-refund-confirm {
    flex:1; padding:11px; background:#dc2626; border:none;
    border-radius:10px; font-size:14px; font-weight:600; color:#fff; cursor:pointer;
}

/* ══════════════════════════════════════════
   Booking Detail Modal (matches native app)
   ══════════════════════════════════════════ */
.cbt-bk-detail-modal {
    position:fixed; inset:0; z-index:9999;
    background:rgba(0,0,0,0.5); display:flex;
    align-items:flex-end; justify-content:center;
    padding:0;
    -webkit-animation: cbt-bk-fade-in 0.2s ease;
    animation: cbt-bk-fade-in 0.2s ease;
}
@keyframes cbt-bk-fade-in { from{opacity:0} to{opacity:1} }
@keyframes cbt-bk-slide-up { from{transform:translateY(40px);opacity:0} to{transform:translateY(0);opacity:1} }

.cbt-bk-detail-box {
    background:#fff; border-radius:20px 20px 0 0; padding:0 0 24px;
    width:100%; max-width:480px;
    max-height:90vh; overflow-y:auto;
    -webkit-overflow-scrolling:touch;
    box-shadow:0 -10px 40px rgba(0,0,0,0.2);
    -webkit-animation: cbt-bk-slide-up 0.25s ease;
    animation: cbt-bk-slide-up 0.25s ease;
}

/* Header */
.cbt-bk-detail-header {
    display:flex; align-items:center; justify-content:space-between;
    padding:16px 20px; border-bottom:1px solid #f1f5f9;
    position:sticky; top:0; background:#fff; z-index:1;
    border-radius:20px 20px 0 0;
}
.cbt-bk-detail-close {
    background:none; border:none; color:#dc2626;
    font-size:15px; font-weight:600; cursor:pointer; padding:4px 0;
}
.cbt-bk-detail-title {
    font-size:16px; font-weight:700; color:#1e293b;
}

/* Info Card */
.cbt-bk-detail-info {
    background:#f8fafc; border:1px solid #e2e8f0;
    border-radius:14px; margin:16px 20px; padding:18px 20px;
    text-align:center;
}
.cbt-bk-detail-name {
    font-size:20px; font-weight:700; color:#1e293b; margin-bottom:4px;
}
.cbt-bk-detail-space {
    font-size:14px; color:#64748b; margin-bottom:2px;
}
.cbt-bk-detail-time {
    font-size:14px; color:#374151; margin-bottom:10px;
}
.cbt-bk-detail-badges {
    display:flex; align-items:center; justify-content:center; gap:10px; flex-wrap:wrap;
}
.cbt-bk-detail-status {
    display:inline-flex; align-items:center; gap:4px;
    font-size:12px; font-weight:600; padding:4px 10px;
    border-radius:20px;
}
.cbt-bk-detail-status.green { background:#dcfce7; color:#16a34a; }
.cbt-bk-detail-status.amber { background:#fef3c7; color:#d97706; }
.cbt-bk-detail-status.gray  { background:#f1f5f9; color:#64748b; }
.cbt-bk-detail-status i { font-size:10px; }
.cbt-bk-detail-ref {
    font-size:12px; color:#6b7280; font-family:monospace;
}

/* Guest Check-in Section */
.cbt-bk-detail-checkin {
    margin:20px 20px 0; padding:0;
}
.cbt-bk-detail-checkin-label {
    font-size:14px; font-weight:600; color:#374151; margin-bottom:14px;
}
.cbt-bk-detail-counter {
    display:flex; align-items:center; justify-content:center;
    gap:0; background:#f8fafc; border:1px solid #e2e8f0;
    border-radius:14px; padding:12px 16px;
}
.cbt-bk-detail-adj {
    width:48px; height:48px; border-radius:50%;
    border:1px solid #d1d5db; background:#fff;
    font-size:22px; font-weight:700; color:#374151;
    cursor:pointer; display:flex; align-items:center; justify-content:center;
    -webkit-tap-highlight-color:transparent;
    transition:background 0.15s, border-color 0.15s;
    flex-shrink:0;
}
.cbt-bk-detail-adj:active:not(:disabled) { background:#f1f5f9; border-color:#94a3b8; }
.cbt-bk-detail-adj:disabled { opacity:0.3; cursor:default; }

.cbt-bk-detail-count {
    display:flex; flex-direction:column; align-items:center;
    min-width:80px;
}
.cbt-bk-detail-count-num {
    font-size:36px; font-weight:800; color:#1e293b; line-height:1;
}
.cbt-bk-detail-count-of {
    font-size:13px; color:#6b7280; margin-top:2px;
}

/* Check In All button */
.cbt-bk-detail-checkin-all {
    display:flex; align-items:center; justify-content:center; gap:8px;
    width:calc(100% - 40px); margin:16px 20px 0;
    padding:14px; background:#16a34a; color:#fff;
    border:none; border-radius:12px;
    font-size:15px; font-weight:700; cursor:pointer;
    -webkit-tap-highlight-color:transparent;
    transition:background 0.15s;
}
.cbt-bk-detail-checkin-all:active { background:#15803d; }
.cbt-bk-detail-checkin-all:disabled { opacity:0.5; cursor:default; }
.cbt-bk-detail-checkin-all i { font-size:14px; }

/* All done state */
.cbt-bk-detail-all-done {
    display:flex; align-items:center; justify-content:center; gap:8px;
    margin:16px 20px 0; padding:14px;
    background:#dcfce7; color:#16a34a;
    border-radius:12px; font-size:14px; font-weight:600;
}
.cbt-bk-detail-all-done i { font-size:16px; }

/* Edit Booking button */
.cbt-bk-detail-edit {
    display:flex; align-items:center; justify-content:center; gap:8px;
    width:calc(100% - 40px); margin:12px 20px 0;
    padding:13px; background:#fff; color:#374151;
    border:1px solid #d1d5db; border-radius:12px;
    font-size:14px; font-weight:600; cursor:pointer;
    -webkit-tap-highlight-color:transparent;
    transition:background 0.15s;
}
.cbt-bk-detail-edit:active { background:#f1f5f9; }
.cbt-bk-detail-edit i { font-size:13px; color:#64748b; }

/* Cancel This Booking button */
.cbt-bk-detail-cancel {
    display:flex; align-items:center; justify-content:center; gap:6px;
    width:calc(100% - 40px); margin:12px 20px 0;
    padding:12px; background:transparent; color:#dc2626;
    border:none; border-radius:12px;
    font-size:14px; font-weight:600; cursor:pointer;
    -webkit-tap-highlight-color:transparent;
}
.cbt-bk-detail-cancel:active { background:#fef2f2; }
.cbt-bk-detail-cancel i { font-size:13px; }

/* ── Cancel Confirmation Modal ─────────── */
.cbt-bk-cancel-modal {
    position:fixed; inset:0; z-index:10001;
    background:rgba(0,0,0,0.6); display:flex;
    align-items:center; justify-content:center; padding:24px;
    -webkit-animation: cbt-bk-fade-in 0.15s ease;
    animation: cbt-bk-fade-in 0.15s ease;
}
.cbt-bk-cancel-box {
    background:#fff; border-radius:16px; padding:28px 24px;
    width:100%; max-width:340px; text-align:center;
    box-shadow:0 20px 60px rgba(0,0,0,0.3);
}
.cbt-bk-cancel-icon {
    width:48px; height:48px; background:#fef3c7; border-radius:50%;
    display:flex; align-items:center; justify-content:center;
    margin:0 auto 14px;
}
.cbt-bk-cancel-icon i { font-size:22px; color:#d97706; }
.cbt-bk-cancel-title {
    font-size:17px; font-weight:700; color:#1e293b; margin-bottom:8px;
}
.cbt-bk-cancel-body {
    font-size:14px; color:#64748b; margin-bottom:20px; line-height:1.5;
}
.cbt-bk-cancel-actions { display:flex; gap:10px; }
.cbt-bk-cancel-no {
    flex:1; padding:12px; background:#f1f5f9; border:1px solid #e2e8f0;
    border-radius:10px; font-size:14px; font-weight:600; color:#374151; cursor:pointer;
}
.cbt-bk-cancel-yes {
    flex:1; padding:12px; background:#dc2626; border:none;
    border-radius:10px; font-size:14px; font-weight:600; color:#fff; cursor:pointer;
}
.cbt-bk-cancel-yes:disabled { opacity:0.6; }

/* ── Edit Booking Modal Body ─────────── */
.cbt-bk-edit-body {
    padding:20px;
}
.cbt-bk-edit-field {
    margin-bottom:16px;
}
.cbt-bk-edit-field label {
    display:block; font-size:13px; font-weight:600; color:#374151; margin-bottom:5px;
}
.cbt-bk-edit-field input,
.cbt-bk-edit-field textarea {
    width:100%; padding:10px 12px; border:1px solid #d1d5db;
    border-radius:10px; font-size:14px; color:#1e293b;
    background:#fff; box-sizing:border-box;
    -webkit-appearance:none;
}
.cbt-bk-edit-field input:focus,
.cbt-bk-edit-field textarea:focus {
    outline:none; border-color:#3b82f6; box-shadow:0 0 0 3px rgba(59,130,246,0.1);
}
.cbt-bk-edit-field textarea { resize:vertical; font-family:inherit; }
.cbt-bk-edit-save {
    display:flex; align-items:center; justify-content:center; gap:8px;
    width:100%; padding:14px; background:#1e293b; color:#fff;
    border:none; border-radius:12px;
    font-size:15px; font-weight:700; cursor:pointer;
    margin-top:4px;
    -webkit-tap-highlight-color:transparent;
}
.cbt-bk-edit-save:active { background:#0f172a; }
.cbt-bk-edit-save:disabled { opacity:0.5; }
.cbt-bk-edit-save i { font-size:14px; }
.cbt-bk-edit-back {
    background:none; border:none; color:#374151;
    font-size:16px; cursor:pointer; padding:4px 8px;
}

/* ── Walk-In Price Summary Card ───────────────────── */
.cbt-bk-price-card {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    margin: 12px 0 4px;
    overflow: hidden;
}
.cbt-bk-price-header {
    background: #dcfce7;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #166534;
    display: flex;
    align-items: center;
    gap: 6px;
}
.cbt-bk-price-header i { font-size: 12px; }
.cbt-bk-price-body { padding: 12px 14px; }
.cbt-bk-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 0;
}
.cbt-bk-price-label {
    font-size: 13px;
    color: #374151;
}
.cbt-bk-price-value {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
}
.cbt-bk-price-divider {
    height: 1px;
    background: #bbf7d0;
    margin: 8px 0;
}
.cbt-bk-price-label-sm {
    font-size: 12px;
    color: #6b7280;
}
.cbt-bk-price-value-sm {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}
.cbt-bk-price-deposit { color: #d97706; }
.cbt-bk-price-balance { color: #6b7280; }
.cbt-bk-collect-toggle {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #bbf7d0;
}
.cbt-bk-toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
}
.cbt-bk-toggle-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #166534;
    cursor: pointer;
    flex-shrink: 0;
}

/* ══════════════════════════════════════════════════
   Manual Attendee Lookup Modal (v5.44.119)
   Eventbrite-style fallback when QR won't scan
   ══════════════════════════════════════════════════ */
.cbt-pwa-lookup-modal {
    position: fixed; inset: 0; z-index: 10050;
    background: rgba(17, 17, 17, 0.75);
    display: flex; align-items: flex-end; justify-content: center;
    animation: cbt-pwa-lookup-fade 0.18s ease-out;
}
@keyframes cbt-pwa-lookup-fade { from { opacity: 0; } to { opacity: 1; } }

.cbt-pwa-lookup-box {
    background: #fff;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    border-radius: 16px 16px 0 0;
    display: flex; flex-direction: column;
    animation: cbt-pwa-lookup-slide 0.22s ease-out;
    overflow: hidden;
}
@keyframes cbt-pwa-lookup-slide { from { transform: translateY(100%); } to { transform: translateY(0); } }

@media (min-width: 640px) {
    .cbt-pwa-lookup-modal { align-items: center; padding: 20px; }
    .cbt-pwa-lookup-box { border-radius: 16px; max-height: 80vh; }
}

/* Header */
.cbt-pwa-lookup-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}
.cbt-pwa-lookup-title {
    font-size: 17px; font-weight: 700; color: #111111;
}
.cbt-pwa-lookup-close {
    background: transparent; border: none;
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: #64748b; font-size: 18px;
    -webkit-tap-highlight-color: transparent;
}
.cbt-pwa-lookup-close:hover, .cbt-pwa-lookup-close:active { background: #f1f5f9; color: #111111; }

/* Body */
.cbt-pwa-lookup-body {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}

/* Search input */
.cbt-pwa-lookup-search-row {
    position: relative;
    display: flex; align-items: center;
    background: #f1f5f9;
    border-radius: 10px;
    padding: 0 12px;
}
.cbt-pwa-lookup-search-icon {
    color: #64748b; font-size: 14px; margin-right: 10px;
}
.cbt-pwa-lookup-input {
    flex: 1;
    border: none; background: transparent;
    padding: 14px 0;
    font-size: 16px;
    color: #111111;
    outline: none;
    width: 100%;
}
.cbt-pwa-lookup-input::placeholder { color: #94a3b8; }
.cbt-pwa-lookup-clear {
    background: transparent; border: none;
    color: #94a3b8; font-size: 16px;
    padding: 4px 8px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.cbt-pwa-lookup-clear:hover { color: #64748b; }

/* Scope toggle */
.cbt-pwa-lookup-scope {
    display: flex; align-items: center; gap: 8px;
    margin: 12px 0 4px;
    padding: 10px 12px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    font-size: 13px; color: #92400e;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.cbt-pwa-lookup-scope input[type="checkbox"] {
    width: 16px; height: 16px; margin: 0; cursor: pointer;
    accent-color: #cfaf86;
}

/* Results area */
.cbt-pwa-lookup-results {
    margin-top: 12px;
    min-height: 200px;
}

.cbt-pwa-lookup-count {
    font-size: 12px; color: #64748b;
    margin-bottom: 8px; padding: 0 4px;
    text-transform: uppercase; letter-spacing: 0.04em;
    font-weight: 600;
}

.cbt-pwa-lookup-list {
    display: flex; flex-direction: column; gap: 8px;
}

/* Result row */
.cbt-pwa-lookup-row {
    display: flex; align-items: stretch; justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
    -webkit-tap-highlight-color: transparent;
}
.cbt-pwa-lookup-row:hover, .cbt-pwa-lookup-row:active {
    background: #f8fafc; border-color: #cbd5e1;
}
.cbt-pwa-lookup-row.is-inactive {
    background: #fafafa; opacity: 0.85; cursor: pointer;
}
.cbt-pwa-lookup-row.is-inactive:hover { background: #f5f5f5; }

.cbt-pwa-lookup-row-main {
    flex: 1; min-width: 0;
    display: flex; flex-direction: column; gap: 2px;
}
.cbt-pwa-lookup-row-name {
    font-size: 15px; font-weight: 600; color: #111111;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cbt-pwa-lookup-row-email {
    font-size: 13px; color: #64748b;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cbt-pwa-lookup-row-event {
    font-size: 12px; color: #64748b;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    margin-top: 2px;
}
.cbt-pwa-lookup-row-type {
    font-size: 11px; color: #94a3b8;
    font-weight: 500;
    text-transform: uppercase; letter-spacing: 0.03em;
}

.cbt-pwa-lookup-row-right {
    display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between;
    gap: 6px;
    flex-shrink: 0;
}
.cbt-pwa-lookup-row-arrow {
    color: #cbd5e1; font-size: 12px;
    align-self: center;
}

/* Status pills */
.cbt-pwa-lookup-pill {
    font-size: 11px; font-weight: 700;
    padding: 3px 8px;
    border-radius: 10px;
    text-transform: uppercase; letter-spacing: 0.04em;
    white-space: nowrap;
}
.cbt-pwa-pill-confirmed { background: #dcfce7; color: #166534; }
.cbt-pwa-pill-checkedin { background: #dbeafe; color: #1e40af; }
.cbt-pwa-pill-cancelled { background: #fee2e2; color: #991b1b; }
.cbt-pwa-pill-refunded  { background: #fef3c7; color: #92400e; }
.cbt-pwa-pill-other     { background: #f1f5f9; color: #475569; }

/* Empty / loading states */
.cbt-pwa-lookup-empty,
.cbt-pwa-lookup-empty-initial,
.cbt-pwa-lookup-loading {
    text-align: center;
    padding: 32px 16px;
    display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.cbt-pwa-lookup-empty p,
.cbt-pwa-lookup-empty-initial p,
.cbt-pwa-lookup-loading p {
    font-size: 14px; color: #64748b; margin: 4px 0 0;
    max-width: 320px; line-height: 1.5;
}
.cbt-pwa-lookup-broaden {
    margin-top: 16px;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px; font-weight: 600;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
