/**
 * CBT Events Marketplace - Vendor Dashboard Styles
 * Version: 4.0.0
 */

/* ==================== CSS Variables ==================== */
:root {
    --cbt-primary: #111111;
    --cbt-primary-dark: #6d2424;
    --cbt-primary-light: #a83939;
    --cbt-secondary: #cfaf86;
    --cbt-dark: #111111;
    --cbt-success: #10b981;
    --cbt-warning: #f59e0b;
    --cbt-danger: #ef4444;
    --cbt-info: #3b82f6;
    --cbt-gray-50: #f9fafb;
    --cbt-gray-100: #f3f4f6;
    --cbt-gray-200: #e5e7eb;
    --cbt-gray-300: #d1d5db;
    --cbt-gray-400: #9ca3af;
    --cbt-gray-500: #6b7280;
    --cbt-gray-600: #4b5563;
    --cbt-gray-700: #374151;
    --cbt-gray-800: #1f2937;
    --cbt-gray-900: #111827;
    --cbt-sidebar-width: 260px;
    --cbt-header-height: 64px;
    --cbt-border-radius: 8px;
    --cbt-shadow: 0 1px 3px rgba(0,0,0,0.1);
    --cbt-shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --cbt-shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    --cbt-transition: all 0.2s ease;
}

/* ==================== Theme Container Overrides ==================== */

/* Force overflow visible on all ancestors so position:sticky works in dashboard */
body.cbt-vendor-dashboard-page #cbt-site,
body.cbt-vendor-dashboard-page #cbt-main,
body.cbt-vendor-dashboard-page .cbt-site-content,
body.cbt-vendor-dashboard-page main.cbt-site-content,
.cbt-dashboard-main {
    overflow: visible !important;
}
/* dashboard-content clips horizontal overflow without breaking sticky or child scroll containers */
.cbt-dashboard-content {
    overflow-x: clip !important;
    overflow-y: visible !important;
    animation: cbt-fade-in 0.25s ease-out;
}
@keyframes cbt-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
/* Body overflow-x:hidden breaks sticky — use clip instead */
body.cbt-vendor-dashboard-page {
    overflow-x: clip !important;
    overflow-y: visible !important;
}

/* Force full-width on ALL theme wrappers when inside vendor dashboard page.
   Liquid Theme (and WPBakery) wrap page content in containers with max-width 
   and padding that constrain the dashboard layout. These MUST be overridden. */

/* === BODY CLASS APPROACH (most reliable, no :has() needed) === */
body.cbt-vendor-dashboard-page .container,
body.cbt-vendor-dashboard-page .lqd-container,
body.cbt-vendor-dashboard-page .content-area,
body.cbt-vendor-dashboard-page .site-content,
body.cbt-vendor-dashboard-page .entry-content,
body.cbt-vendor-dashboard-page .post-content,
body.cbt-vendor-dashboard-page .page-content,
body.cbt-vendor-dashboard-page #content,
body.cbt-vendor-dashboard-page #primary,
body.cbt-vendor-dashboard-page .lqd-page-wrapper,
body.cbt-vendor-dashboard-page .lqd-contents-wrap,
body.cbt-vendor-dashboard-page .lqd-main-row,
body.cbt-vendor-dashboard-page article,
body.cbt-vendor-dashboard-page main:not(.cbt-dashboard-main),
body.cbt-vendor-dashboard-page section:not(.cbt-dashboard-sidebar),
body.cbt-vendor-dashboard-page .vc_row,
body.cbt-vendor-dashboard-page .vc_row-fluid,
body.cbt-vendor-dashboard-page .wpb_wrapper,
body.cbt-vendor-dashboard-page .vc_column_container,
body.cbt-vendor-dashboard-page .vc_column-inner,
body.cbt-vendor-dashboard-page [class*="col-md-"],
body.cbt-vendor-dashboard-page [class*="col-lg-"],
body.cbt-vendor-dashboard-page [class*="col-sm-"] {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    flex: 0 0 100% !important;
}

/* Hide site header on dashboard pages */
body.cbt-vendor-dashboard-page #cbt-site-header,
body.cbt-vendor-dashboard-page .cbt-site-header,
body.cbt-vendor-dashboard-page header#site-header,
body.cbt-vendor-dashboard-page .site-header,
body.cbt-vendor-dashboard-page .lqd-site-header,
body.cbt-vendor-dashboard-page #lqd-site-header {
    display: none !important;
}

/* Hide theme sidebar, page title bar, breadcrumbs on dashboard */
body.cbt-vendor-dashboard-page .titlebar,
body.cbt-vendor-dashboard-page .lqd-page-header,
body.cbt-vendor-dashboard-page aside:not(.cbt-dashboard-sidebar),
body.cbt-vendor-dashboard-page .sidebar:not(.cbt-dashboard-sidebar),
body.cbt-vendor-dashboard-page .widget-area {
    display: none !important;
}

/* Zero vertical spacing on Liquid Theme containers (by ID from inspector) */
body.cbt-vendor-dashboard-page #lqd-site-content,
body.cbt-vendor-dashboard-page #lqd-contents-wrap {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Kill ::before and ::after pseudo-elements on Liquid Theme containers */
body.cbt-vendor-dashboard-page #lqd-contents-wrap::before,
body.cbt-vendor-dashboard-page #lqd-contents-wrap::after,
body.cbt-vendor-dashboard-page #lqd-site-content::before,
body.cbt-vendor-dashboard-page #lqd-site-content::after {
    display: none !important;
    content: none !important;
    height: 0 !important;
}

/* === ID-based approach (fallback) === */
#cbt-vendor-dashboard-page,
.cbt-dashboard-page {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Target all possible theme ancestor containers */
body.page-template-default #cbt-vendor-dashboard-page,
body #cbt-vendor-dashboard-page {
    width: 100% !important;
    max-width: 100% !important;
}

/* Liquid Theme specific containers */
#cbt-vendor-dashboard-page .container,
#cbt-vendor-dashboard-page .lqd-container,
#cbt-vendor-dashboard-page .vc_row,
#cbt-vendor-dashboard-page .vc_row-fluid,
#cbt-vendor-dashboard-page .wpb_wrapper,
#cbt-vendor-dashboard-page .vc_column_container,
#cbt-vendor-dashboard-page .vc_column-inner,
#cbt-vendor-dashboard-page .wpb_content_element {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Hide theme sidebar if it shows up on dashboard page */
#cbt-vendor-dashboard-page ~ aside,
#cbt-vendor-dashboard-page ~ .sidebar {
    display: none !important;
}

/* ==================== Reset & Base ==================== */
/* Support both wrapper class names */
.cbt-vendor-dashboard *,
.cbt-dashboard-wrapper * {
    box-sizing: border-box;
}

.cbt-vendor-dashboard,
.cbt-dashboard-wrapper {
    display: flex;
    min-height: 100vh;
    background: #f5f6f8;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    margin: 0;
    padding: 0;
    width: 100% !important;
    max-width: 100% !important;
}

/* Header hidden on dashboard — sidebar full height from top */
:root {
    --cbt-theme-header-height: 0px;
}

/* ==================== Sidebar Logomark ==================== */
.cbt-sidebar-logomark {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 14px 16px !important;
    border-bottom: 1px solid rgba(255,255,255,0.08) !important;
    flex-shrink: 0 !important;
    position: sticky !important;
    top: 0 !important;
    background: #000000 !important;
    z-index: 2 !important;
}
.cbt-sidebar-logomark a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
}
.cbt-sidebar-logomark-img {
    max-width: 122px !important;
    height: auto !important;
    max-height: 60px !important;
    object-fit: contain !important;
}

/* ==================== Sidebar ==================== */
.cbt-vendor-dashboard .cbt-dashboard-sidebar,
.cbt-dashboard-wrapper .cbt-dashboard-sidebar {
    width: 220px !important;
    background: #000000 !important;
    color: #fff !important;
    display: flex !important;
    flex-direction: column !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    height: 100vh !important;
    overflow-y: auto !important;
    z-index: 1000 !important;
    transition: transform 0.3s ease !important;
    padding: 0 !important;
    margin: 0 !important;
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE/Edge */
}
.cbt-vendor-dashboard .cbt-dashboard-sidebar::-webkit-scrollbar,
.cbt-dashboard-wrapper .cbt-dashboard-sidebar::-webkit-scrollbar {
    display: none !important; /* Chrome/Safari/Opera */
}

/* Sidebar nav */
.cbt-vendor-dashboard .cbt-sidebar-nav,
.cbt-dashboard-wrapper .cbt-sidebar-nav {
    flex: 1 !important;
    overflow-y: auto !important;
    padding: 15px 10px 10px !important;
    background: transparent !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}
.cbt-vendor-dashboard .cbt-sidebar-nav::-webkit-scrollbar,
.cbt-dashboard-wrapper .cbt-sidebar-nav::-webkit-scrollbar {
    display: none !important;
}

.cbt-vendor-dashboard .cbt-sidebar-header,
.cbt-dashboard-wrapper .cbt-sidebar-header {
    padding: 20px !important;
    border-bottom: 1px solid rgba(255,255,255,0.1) !important;
    background: transparent !important;
}

.cbt-vendor-dashboard .cbt-logo,
.cbt-dashboard-wrapper .cbt-logo {
    display: block !important;
    text-decoration: none !important;
}

.cbt-vendor-dashboard .cbt-logo-img,
.cbt-dashboard-wrapper .cbt-logo-img {
    max-width: 150px !important;
    height: auto !important;
}

.cbt-vendor-dashboard .cbt-logo-text,
.cbt-dashboard-wrapper .cbt-logo-text {
    color: #cfaf86 !important;
    font-size: 18px !important;
    font-weight: 700 !important;
}

.cbt-vendor-dashboard .cbt-logo img,
.cbt-dashboard-wrapper .cbt-logo img {
    height: 32px !important;
    width: auto !important;
}

/* ==================== Navigation - Button-like styling ==================== */
.cbt-vendor-dashboard .cbt-nav-item,
.cbt-dashboard-wrapper .cbt-nav-item {
    position: relative !important;
    margin-bottom: 4px !important;
}

.cbt-vendor-dashboard .cbt-nav-link,
.cbt-dashboard-wrapper .cbt-nav-link {
    display: flex !important;
    align-items: center !important;
    padding: 14px 16px !important;
    color: rgba(255,255,255,0.85) !important;
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    gap: 12px !important;
    border-radius: 8px !important;
    background: transparent !important;
    border: none !important;
    margin: 0 !important;
}

.cbt-vendor-dashboard .cbt-nav-link:hover,
.cbt-dashboard-wrapper .cbt-nav-link:hover {
    background: rgba(255,255,255,0.1) !important;
    color: #fff !important;
}

.cbt-vendor-dashboard .cbt-nav-item.active > .cbt-nav-link,
.cbt-dashboard-wrapper .cbt-nav-item.active > .cbt-nav-link {
    background: #3a3a3a !important;
    color: #fff !important;
}

.cbt-vendor-dashboard .cbt-nav-link i,
.cbt-dashboard-wrapper .cbt-nav-link i {
    width: 22px !important;
    text-align: center !important;
    font-size: 16px !important;
    flex-shrink: 0 !important;
}

.cbt-vendor-dashboard .cbt-nav-link span,
.cbt-dashboard-wrapper .cbt-nav-link span {
    flex: 1 !important;
}

.cbt-vendor-dashboard .cbt-nav-arrow,
.cbt-dashboard-wrapper .cbt-nav-arrow {
    margin-left: auto !important;
    font-size: 10px !important;
    transition: transform 0.2s !important;
}

.cbt-vendor-dashboard .cbt-nav-item.has-children.active .cbt-nav-arrow,
.cbt-vendor-dashboard .cbt-nav-item.has-children.expanded .cbt-nav-arrow,
.cbt-dashboard-wrapper .cbt-nav-item.has-children.active .cbt-nav-arrow,
.cbt-dashboard-wrapper .cbt-nav-item.has-children.expanded .cbt-nav-arrow {
    transform: rotate(90deg) !important;
}

/* Accordion Submenu - expands below parent item */
.cbt-vendor-dashboard .cbt-nav-submenu,
.cbt-dashboard-wrapper .cbt-nav-submenu {
    display: none !important;
    background: rgba(0,0,0,0.15) !important;
    border-radius: 6px !important;
    padding: 6px 0 !important;
    margin-top: 4px !important;
}

/* Show submenu when parent is active OR expanded (accordion) */
.cbt-vendor-dashboard .cbt-nav-item.has-children.active .cbt-nav-submenu,
.cbt-vendor-dashboard .cbt-nav-item.has-children.expanded .cbt-nav-submenu,
.cbt-dashboard-wrapper .cbt-nav-item.has-children.active .cbt-nav-submenu,
.cbt-dashboard-wrapper .cbt-nav-item.has-children.expanded .cbt-nav-submenu {
    display: block !important;
}

/* Submenu links */
.cbt-vendor-dashboard .cbt-nav-sublink,
.cbt-dashboard-wrapper .cbt-nav-sublink {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 10px 16px 10px 46px !important; /* Indented for accordion style */
    color: rgba(255,255,255,0.8) !important;
    text-decoration: none !important;
    font-size: 13px !important;
    transition: all 0.2s !important;
    border-radius: 4px !important;
    margin: 2px 6px !important;
}

.cbt-vendor-dashboard .cbt-nav-sublink i,
.cbt-dashboard-wrapper .cbt-nav-sublink i {
    width: 18px !important;
    text-align: center !important;
    font-size: 14px !important;
    opacity: 0.8 !important;
}

.cbt-vendor-dashboard .cbt-nav-sublink:hover,
.cbt-vendor-dashboard .cbt-nav-sublink.active,
.cbt-dashboard-wrapper .cbt-nav-sublink:hover,
.cbt-dashboard-wrapper .cbt-nav-sublink.active {
    color: #fff !important;
    background: rgba(255,255,255,0.1) !important;
}

.cbt-vendor-dashboard .cbt-nav-sublink:hover i,
.cbt-vendor-dashboard .cbt-nav-sublink.active i,
.cbt-dashboard-wrapper .cbt-nav-sublink:hover i,
.cbt-dashboard-wrapper .cbt-nav-sublink.active i {
    opacity: 1 !important;
}

/* Sidebar Footer */
.cbt-vendor-dashboard .cbt-sidebar-footer,
.cbt-dashboard-wrapper .cbt-sidebar-footer {
    padding: 15px 10px !important;
    border-top: 1px solid rgba(255,255,255,0.1) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    background: transparent !important;
}

.cbt-vendor-dashboard .cbt-sidebar-link,
.cbt-dashboard-wrapper .cbt-sidebar-link {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 12px 16px !important;
    color: rgba(255,255,255,0.8) !important;
    text-decoration: none !important;
    font-size: 13px !important;
    border-radius: 8px !important;
    transition: all 0.2s !important;
    background: transparent !important;
}

.cbt-vendor-dashboard .cbt-sidebar-link:hover,
.cbt-dashboard-wrapper .cbt-sidebar-link:hover {
    background: rgba(255,255,255,0.1) !important;
    color: #fff !important;
}

.cbt-vendor-dashboard .cbt-logout,
.cbt-dashboard-wrapper .cbt-logout {
    color: rgba(255,150,150,0.9) !important;
}

.cbt-vendor-dashboard .cbt-logout:hover,
.cbt-dashboard-wrapper .cbt-logout:hover {
    background: rgba(255,100,100,0.2) !important;
    color: #ff9999 !important;
}

.cbt-vendor-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.cbt-vendor-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--cbt-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.cbt-vendor-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cbt-avatar-initials {
    font-weight: 600;
    font-size: 16px;
}

.cbt-vendor-details h4 {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 600;
}

.cbt-vendor-status {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--cbt-success);
}

.cbt-vendor-status.cbt-status-pending {
    background: var(--cbt-warning);
}

.cbt-vendor-status.cbt-status-suspended {
    background: var(--cbt-danger);
}

/* Navigation */
.cbt-dashboard-nav {
    padding: 15px 0;
}

.cbt-dashboard-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cbt-dashboard-nav li {
    margin: 2px 0;
}

.cbt-dashboard-nav li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 14px;
    transition: var(--cbt-transition);
    border-left: 3px solid transparent;
}

.cbt-dashboard-nav li a:hover,
.cbt-dashboard-nav li.active a {
    color: #fff;
    background: rgba(255,255,255,0.1);
    border-left-color: var(--cbt-primary);
}

.cbt-dashboard-nav li a i {
    width: 20px;
    text-align: center;
}

.cbt-nav-external {
    margin-left: auto;
    font-size: 11px;
    opacity: 0.5;
}

.cbt-nav-divider {
    padding: 14px 18px 4px !important;
    margin-top: 4px !important;
    background: none !important;
    border: none !important;
    height: auto !important;
    min-height: 0 !important;
}
.cbt-nav-divider span {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.3);
    background: none !important;
}

/* ==================== Main Content ==================== */
.cbt-vendor-dashboard .cbt-dashboard-main,
.cbt-dashboard-wrapper .cbt-dashboard-main {
    flex: 1 !important;
    margin-left: 220px !important;
    margin-top: 0 !important;
    min-height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
    background: #f5f6f8 !important;
    width: calc(100vw - 220px) !important;
    max-width: calc(100vw - 220px) !important;
    min-width: 0 !important;
}

/* Dashboard Content Area */
.cbt-vendor-dashboard .cbt-dashboard-content,
.cbt-dashboard-wrapper .cbt-dashboard-content {
    flex: 1 !important;
    padding: 24px !important;
    max-width: 100% !important;
    min-width: 0 !important;
}

/* Profile Progress Bar */
.cbt-vendor-dashboard .cbt-profile-progress,
.cbt-dashboard-wrapper .cbt-profile-progress {
    background: linear-gradient(135deg, #17a2b8 0%, #0dcaf0 100%) !important;
    padding: 12px 20px !important;
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
}

.cbt-vendor-dashboard .cbt-progress-bar,
.cbt-dashboard-wrapper .cbt-progress-bar {
    flex: 1 !important;
    height: 8px !important;
    background: rgba(255,255,255,0.3) !important;
    border-radius: 4px !important;
    overflow: hidden !important;
}

.cbt-vendor-dashboard .cbt-progress-fill,
.cbt-dashboard-wrapper .cbt-progress-fill {
    height: 100% !important;
    background: #fff !important;
    border-radius: 4px !important;
    transition: width 0.3s !important;
}

.cbt-vendor-dashboard .cbt-progress-text,
.cbt-dashboard-wrapper .cbt-progress-text {
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
}

.cbt-vendor-dashboard .cbt-progress-dismiss,
.cbt-dashboard-wrapper .cbt-progress-dismiss {
    background: none !important;
    border: none !important;
    color: #fff !important;
    font-size: 18px !important;
    cursor: pointer !important;
    padding: 0 5px !important;
    opacity: 0.7 !important;
}

.cbt-vendor-dashboard .cbt-progress-dismiss:hover,
.cbt-dashboard-wrapper .cbt-progress-dismiss:hover {
    opacity: 1 !important;
}

.cbt-vendor-dashboard .cbt-profile-tip,
.cbt-dashboard-wrapper .cbt-profile-tip {
    background: #fff3cd !important;
    padding: 10px 20px !important;
}

.cbt-vendor-dashboard .cbt-profile-tip a,
.cbt-dashboard-wrapper .cbt-profile-tip a {
    color: #856404 !important;
    text-decoration: none !important;
    font-size: 13px !important;
}

.cbt-vendor-dashboard .cbt-profile-tip a:hover,
.cbt-dashboard-wrapper .cbt-profile-tip a:hover {
    text-decoration: underline !important;
}

/* Dashboard Footer */
.cbt-vendor-dashboard .cbt-dashboard-footer,
.cbt-dashboard-wrapper .cbt-dashboard-footer {
    padding: 20px 30px !important;
    background: #fff !important;
    border-top: 1px solid #e0e0e0 !important;
    text-align: center !important;
}

.cbt-vendor-dashboard .cbt-dashboard-footer p,
.cbt-dashboard-wrapper .cbt-dashboard-footer p {
    margin: 0 !important;
    color: #666 !important;
    font-size: 13px !important;
}

.cbt-vendor-dashboard .cbt-dashboard-footer a,
.cbt-dashboard-wrapper .cbt-dashboard-footer a {
    color: #111111 !important;
    text-decoration: none !important;
}

/* ==================== Desktop Top Bar ==================== */
.cbt-dash-topbar {
    background: #000000;
    height: 73px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px 0 20px;
    position: sticky;
    top: 0;
    z-index: 200;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
@media (max-width: 768px) {
    .cbt-dash-topbar { display: none !important; }
}
.cbt-dash-topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.cbt-dash-ai-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(207,175,134,0.12);
    border: 1px solid rgba(207,175,134,0.35);
    color: #cfaf86;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s;
}
.cbt-dash-ai-btn:hover { background: rgba(207,175,134,0.22); color: #cfaf86; text-decoration: none; }
/* Header */
.cbt-dashboard-header {
    height: var(--cbt-header-height);
    background: #fff;
    border-bottom: 1px solid var(--cbt-gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.cbt-sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--cbt-gray-600);
}

.cbt-vendor-dashboard .cbt-header-search {
    display: flex;
    align-items: center;
    background: var(--cbt-gray-100);
    border-radius: var(--cbt-border-radius);
    padding: 8px 16px;
    width: 300px;
}

.cbt-vendor-dashboard .cbt-header-search i {
    color: var(--cbt-gray-400);
    margin-right: 10px;
}

.cbt-vendor-dashboard .cbt-header-search input {
    border: none;
    background: none;
    outline: none;
    width: 100%;
    font-size: 14px;
}

.cbt-header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cbt-notification-btn,
.cbt-user-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: var(--cbt-border-radius);
    transition: var(--cbt-transition);
}

.cbt-notification-btn:hover,
.cbt-user-btn:hover {
    background: var(--cbt-gray-100);
}

.cbt-notification-btn {
    position: relative;
}

.cbt-notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--cbt-danger);
    color: #fff;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}

.cbt-user-btn img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.cbt-header-user {
    position: relative;
}

.cbt-user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border-radius: var(--cbt-border-radius);
    box-shadow: var(--cbt-shadow-lg);
    min-width: 180px;
    padding: 8px 0;
    display: none;
    z-index: 1000;
}

.cbt-user-dropdown.show {
    display: block;
}

.cbt-user-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--cbt-gray-700);
    text-decoration: none;
    font-size: 14px;
    transition: var(--cbt-transition);
}

.cbt-user-dropdown a:hover {
    background: var(--cbt-gray-100);
}

/* Content Area */
.cbt-dashboard-content {
    flex: 1;
    padding: 24px;
    min-width: 0;
}

/* Footer */
.cbt-dashboard-footer {
    padding: 20px 24px;
    text-align: center;
    color: var(--cbt-gray-500);
    font-size: 13px;
    border-top: 1px solid var(--cbt-gray-200);
    background: #fff;
}

/* ==================== Page Header ==================== */
.cbt-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.cbt-page-header h1 {
    margin: 0 0 4px;
    font-size: 24px;
    color: var(--cbt-gray-900);
}

.cbt-page-header p {
    margin: 0;
    color: var(--cbt-gray-500);
    font-size: 14px;
}

.cbt-page-header-actions {
    display: flex;
    gap: 12px;
}
.cbt-btn-back {
    background: #111111;
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}
.cbt-btn-back:hover {
    background: #333333;
    color: #fff;
}

/* ==================== Stats Grid ==================== */
.cbt-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.cbt-stat-card {
    background: #fff;
    border-radius: var(--cbt-border-radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--cbt-shadow);
}

.cbt-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
}

.cbt-stat-content h3 {
    margin: 0;
    font-size: 24px;
    color: var(--cbt-gray-900);
}

.cbt-stat-content p {
    margin: 4px 0 0;
    color: var(--cbt-gray-500);
    font-size: 13px;
}

/* ==================== Balance Card ==================== */
.cbt-balance-card {
    background: linear-gradient(135deg, var(--cbt-primary) 0%, var(--cbt-dark) 100%);
    border-radius: var(--cbt-border-radius);
    padding: 24px;
    color: #fff;
    margin-bottom: 24px;
}

.cbt-balance-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.cbt-balance-label {
    font-size: 14px;
    opacity: 0.8;
    display: block;
}

.cbt-balance-value {
    font-size: 36px;
    font-weight: 700;
}

.cbt-balance-details {
    display: flex;
    gap: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.cbt-balance-item span {
    font-size: 12px;
    opacity: 0.8;
    display: block;
}

.cbt-balance-item strong {
    font-size: 18px;
}

/* ==================== Cards ==================== */
.cbt-card {
    background: #fff;
    border-radius: var(--cbt-border-radius);
    box-shadow: var(--cbt-shadow);
    margin-bottom: 24px;
}

.cbt-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--cbt-gray-200);
}

.cbt-card-header h3 {
    margin: 0;
    font-size: 16px;
    color: var(--cbt-gray-900);
}

.cbt-card-link {
    color: var(--cbt-primary);
    text-decoration: none;
    font-size: 14px;
}

.cbt-card-body {
    padding: 20px;
}

.cbt-card-body-table {
    padding: 0;
}

.cbt-card-chart {
    flex: 2;
}

.cbt-dashboard-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

/* ==================== Tables ==================== */
.cbt-data-table {
    width: 100%;
    border-collapse: collapse;
}

.cbt-data-table th,
.cbt-data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--cbt-gray-200);
}

.cbt-data-table th {
    background: var(--cbt-gray-50);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--cbt-gray-600);
}

.cbt-data-table td {
    font-size: 14px;
    color: var(--cbt-gray-700);
}

.cbt-data-table tr:hover td {
    background: var(--cbt-gray-50);
}

.cbt-data-table a {
    color: var(--cbt-primary);
    text-decoration: none;
}

/* ==================== Buttons ==================== */
.cbt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--cbt-border-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: var(--cbt-transition);
    text-decoration: none;
}

.cbt-btn-primary {
    background: var(--cbt-dark);
    color: #fff;
}

.cbt-btn-primary:hover {
    background: #333333;
    color: #fff;
}

.cbt-btn-secondary {
    background: var(--cbt-gray-200);
    color: var(--cbt-gray-700);
}

.cbt-btn-secondary:hover {
    background: var(--cbt-gray-300);
}

.cbt-btn-success {
    background: var(--cbt-success);
    color: #fff;
}

.cbt-btn-danger {
    background: var(--cbt-danger);
    color: #fff;
}

.cbt-btn-destructive {
    background: var(--cbt-primary);
    color: #fff;
}

.cbt-btn-destructive:hover {
    background: var(--cbt-primary-dark);
    color: #fff;
}

.cbt-btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.cbt-btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.cbt-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==================== Forms ==================== */
.cbt-form-group {
    margin-bottom: 20px;
}

.cbt-form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--cbt-gray-700);
}

.cbt-form-group label .required {
    color: var(--cbt-danger);
}

.cbt-input,
.cbt-select,
.cbt-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--cbt-gray-300);
    border-radius: var(--cbt-border-radius);
    font-size: 14px;
    transition: var(--cbt-transition);
}

.cbt-input:focus,
.cbt-select:focus,
.cbt-textarea:focus {
    outline: none;
    border-color: var(--cbt-primary);
    box-shadow: 0 0 0 3px rgba(139, 46, 46, 0.1);
}

.cbt-textarea {
    min-height: 100px;
    resize: vertical;
}

.cbt-checkbox-group,
.cbt-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.cbt-checkbox-label,
.cbt-radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.cbt-form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.cbt-form-row.cbt-four-col {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 16px;
}

/* Date inputs - constrain width and fix calendar icon alignment */
.cbt-four-col input[type="date"] {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 8px;
    font-size: 13px;
}

/* Ensure all form inputs in four-col are properly sized */
.cbt-four-col .cbt-form-group {
    min-width: 0;
    overflow: visible;
}

/* Time and timezone dropdowns in compact columns */
.cbt-four-col .cbt-time-dropdown-trigger,
.cbt-four-col .cbt-timezone-search-input,
.cbt-four-col .cbt-multiselect-trigger,
.cbt-four-col .cbt-location-input input {
    font-size: 13px;
}

.cbt-form-row-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* ==================== Status Badges ==================== */
.cbt-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: #fff;
}

/* ==================== Empty State ==================== */
.cbt-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--cbt-gray-500);
}

.cbt-empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.cbt-empty-state p {
    margin: 0 0 16px;
}

/* ==================== Top List ==================== */
.cbt-top-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cbt-top-list li {
    border-bottom: 1px solid var(--cbt-gray-200);
}

.cbt-top-list li:last-child {
    border-bottom: none;
}

.cbt-top-list li a {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    color: var(--cbt-gray-700);
    text-decoration: none;
    transition: var(--cbt-transition);
}

.cbt-top-list li a:hover {
    color: var(--cbt-primary);
}

.cbt-top-item-count {
    color: var(--cbt-gray-500);
    font-size: 13px;
}

/* ==================== Quick Actions ==================== */
.cbt-quick-actions {
    margin-bottom: 24px;
}

.cbt-quick-actions h3 {
    margin: 0 0 16px;
    font-size: 16px;
    color: var(--cbt-gray-700);
}

.cbt-quick-actions-grid {
    display: flex;
    gap: 16px;
}

.cbt-quick-action-card {
    flex: 1;
    background: #fff;
    border-radius: var(--cbt-border-radius);
    padding: 20px;
    text-align: center;
    text-decoration: none;
    color: var(--cbt-gray-700);
    box-shadow: var(--cbt-shadow);
    transition: var(--cbt-transition);
    border-left: 3px solid var(--cbt-warning);
}

.cbt-quick-action-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--cbt-shadow-md);
}

.cbt-quick-action-card i {
    font-size: 24px;
    color: var(--cbt-warning);
    margin-bottom: 8px;
}

.cbt-quick-action-count {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--cbt-gray-900);
}

.cbt-quick-action-label {
    font-size: 13px;
    color: var(--cbt-gray-500);
}

/* ==================== Toast Notifications ==================== */
#cbt-toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cbt-toast {
    background: #fff;
    padding: 14px 20px;
    border-radius: var(--cbt-border-radius);
    box-shadow: var(--cbt-shadow-lg);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    animation: slideIn 0.3s ease;
    max-width: 420px;
    position: relative;
}

.cbt-toast-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #6b7280;
    font-size: 16px;
    padding: 0 0 0 8px;
    margin-left: auto;
    flex-shrink: 0;
    line-height: 1;
    transition: color 0.15s;
}
.cbt-toast-close:hover { color: #374151; }

.cbt-toast-success {
    border-left: 4px solid var(--cbt-success);
}

.cbt-toast-success i {
    color: var(--cbt-success);
}

.cbt-toast-error {
    border-left: 4px solid var(--cbt-danger);
}

.cbt-toast-error i {
    color: var(--cbt-danger);
}

.cbt-toast-warning {
    border-left: 4px solid var(--cbt-secondary, #cfaf86);
}

.cbt-toast-warning i {
    color: var(--cbt-secondary, #cfaf86);
}

.cbt-toast-hide {
    animation: slideOut 0.3s ease forwards;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* ==================== Filters & Search ==================== */
.cbt-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.cbt-filters .cbt-input,
.cbt-filters .cbt-select {
    width: auto;
    min-width: 150px;
}

.cbt-search-box {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid var(--cbt-gray-300);
    border-radius: var(--cbt-border-radius);
    padding: 0 12px;
}

.cbt-search-box i {
    color: var(--cbt-gray-400);
}

.cbt-search-box input {
    border: none;
    outline: none;
    padding: 10px;
    width: 200px;
}

/* ==================== Tabs ==================== */
.cbt-tabs {
    display: flex;
    gap: 4px;
    padding: 6px;
    background: #f3f4f6;
    border-radius: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
    flex-wrap: nowrap;
    width: 100%;
    box-sizing: border-box;
}

.cbt-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 500;
    color: var(--cbt-gray-600);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all .15s;
    border: none;
    background: none;
}

.cbt-tab:hover,
.cbt-tab.active {
    color: var(--cbt-primary);
}

.cbt-tab.active {
    font-weight: 600;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.cbt-tab:hover:not(.active) {
    background: rgba(255,255,255,0.6);
}

.cbt-tab .cbt-tab-count {
    background: var(--cbt-gray-200);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    margin-left: 8px;
}

.cbt-tab.active .cbt-tab-count {
    background: #faf8f3;
    color: #92722a;
}

/* ==================== Bulk Actions ==================== */
.cbt-bulk-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--cbt-gray-50);
    border-radius: var(--cbt-border-radius);
    margin-bottom: 16px;
}

.cbt-bulk-actions.hidden {
    display: none;
}

.cbt-selected-count {
    font-weight: 500;
    color: var(--cbt-gray-700);
}

/* ==================== Dropdown Menu ==================== */
.cbt-dropdown {
    position: relative;
}

.cbt-dropdown-toggle {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: var(--cbt-border-radius);
}

.cbt-dropdown-toggle:hover {
    background: var(--cbt-gray-100);
}

/* Vendor dashboard action dropdowns (3-dot menus) - scoped to dashboard */
.cbt-dashboard-main .cbt-dropdown-menu,
.cbt-vendor-dashboard .cbt-dashboard-main .cbt-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border-radius: var(--cbt-border-radius);
    box-shadow: var(--cbt-shadow-lg);
    min-width: 160px;
    padding: 8px 0;
    z-index: 100;
    display: none;
}

.cbt-dashboard-main .cbt-dropdown-menu.show,
.cbt-vendor-dashboard .cbt-dashboard-main .cbt-dropdown-menu.show {
    display: block;
}

.cbt-dashboard-main .cbt-dropdown-menu a,
.cbt-dashboard-main .cbt-dropdown-menu button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--cbt-gray-700);
    text-decoration: none;
    font-size: 14px;
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
}

.cbt-dashboard-main .cbt-dropdown-menu a:hover,
.cbt-dashboard-main .cbt-dropdown-menu button:hover {
    background: var(--cbt-gray-100);
}

.cbt-dashboard-main .cbt-dropdown-menu .cbt-danger {
    color: var(--cbt-danger);
}

/* ==================== Pagination ==================== */
.cbt-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
}

.cbt-pagination-info {
    color: var(--cbt-gray-600);
    font-size: 14px;
}

.cbt-pagination-links {
    display: flex;
    gap: 4px;
}

.cbt-pagination-links a,
.cbt-pagination-links span {
    padding: 8px 12px;
    border-radius: var(--cbt-border-radius);
    color: var(--cbt-gray-700);
    text-decoration: none;
    font-size: 14px;
}

.cbt-pagination-links a:hover {
    background: var(--cbt-gray-100);
}

.cbt-pagination-links .current {
    background: var(--cbt-primary);
    color: #fff;
}

/* ==================== Modal ==================== */
.cbt-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: var(--cbt-transition);
}

.cbt-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.cbt-modal {
    background: #fff;
    border-radius: var(--cbt-border-radius);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    transform: translateY(-20px);
    transition: var(--cbt-transition);
}

.cbt-modal-overlay.show .cbt-modal {
    transform: translateY(0);
}

.cbt-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--cbt-gray-200);
}

.cbt-modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.cbt-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--cbt-gray-500);
}

.cbt-modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.cbt-modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--cbt-gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ==================== Settings Sections ==================== */
.cbt-settings-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--cbt-gray-200);
    padding-bottom: 0;
}

.cbt-settings-nav a {
    padding: 12px 20px;
    color: var(--cbt-gray-600);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.cbt-settings-nav a:hover,
.cbt-settings-nav a.active {
    color: var(--cbt-primary);
    border-bottom-color: var(--cbt-primary);
}

.cbt-settings-section {
    background: #fff;
    border-radius: var(--cbt-border-radius);
    padding: 24px;
    margin-bottom: 24px;
}

.cbt-settings-section h3 {
    margin: 0 0 20px;
    font-size: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--cbt-gray-200);
}

/* ==================== Loading State ==================== */
.cbt-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.cbt-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--cbt-gray-200);
    border-top-color: var(--cbt-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==================== Responsive ==================== */
@media (max-width: 1200px) {
    .cbt-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cbt-dashboard-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .cbt-form-row.cbt-four-col {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 992px) {
    /* Stack layout vertically on mobile so topbar sits above main */
    .cbt-vendor-dashboard,
    .cbt-dashboard-wrapper {
        flex-direction: column !important;
    }
    
    /* Show mobile topbar */
    .cbt-mobile-topbar {
        display: flex !important;
        width: 100% !important;
        flex-shrink: 0 !important;
    }
    
    .cbt-vendor-dashboard .cbt-dashboard-sidebar,
    .cbt-dashboard-wrapper .cbt-dashboard-sidebar,
    .cbt-dashboard-sidebar {
        display: none !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        width: 220px !important;
        height: auto !important;
        padding-top: 80px !important;
        padding-bottom: 0 !important;
        z-index: 1050 !important;
        overflow-y: auto !important;
        flex-direction: column !important;
        background: #000000 !important;
        color: #fff !important;
    }
    
    .cbt-vendor-dashboard.sidebar-open .cbt-dashboard-sidebar,
    .cbt-dashboard-wrapper.sidebar-open .cbt-dashboard-sidebar {
        display: flex !important;
    }
    
    .cbt-vendor-dashboard .cbt-dashboard-main,
    .cbt-dashboard-wrapper .cbt-dashboard-main,
    .cbt-dashboard-main {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        padding-top: 12px !important;
        overflow-x: hidden !important;
    }
    
    .cbt-sidebar-toggle {
        display: block;
    }
    
    .cbt-vendor-dashboard .cbt-header-search {
        display: none;
    }
    
    /* Hide page titles on mobile — topbar already shows the section name */
    .cbt-page-header > h1,
    .cbt-page-header > h2,
    .cbt-page-header .cbt-page-header-content h1,
    .cbt-page-header .cbt-page-header-content h2,
    .cbt-dashboard-home .cbt-page-header {
        display: none !important;
    }
    .el-header > div:first-child {
        display: none !important;
    }
    
    /* Ensure sidebar footer is visible above iPhone home indicator */
    .cbt-sidebar-footer {
        padding-bottom: 60px !important;
        flex-shrink: 0 !important;
    }
}

@media (max-width: 768px) {    
    .cbt-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .cbt-form-row {
        grid-template-columns: 1fr !important;
    }
    
    .cbt-form-row.cbt-four-col {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .cbt-balance-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .cbt-balance-details {
        flex-direction: column;
        gap: 16px;
    }
    
    .cbt-quick-actions-grid {
        flex-direction: column;
    }
    
    /* Tables: scrollable wrapper handles horizontal scroll */
    .cbt-data-table {
        min-width: 600px;
    }
    
    .cbt-data-table th,
    .cbt-data-table td {
        white-space: nowrap;
    }
    
    .cbt-page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .cbt-form-row.cbt-four-col {
        grid-template-columns: 1fr !important;
    }
}

/* ==================== MOBILE PWA — Global Fixes (v5.32.46) ==================== */
/* These rules catch common mobile overflow issues across ALL dashboard pages  */
/* without requiring individual template edits. Applied at ≤992px (mobile dashboard). */

@media (max-width: 992px) {
    /* ── Tables: force horizontal scroll on ALL tables inside dashboard content ── */
    .cbt-dashboard-content table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }
    .cbt-dashboard-content thead,
    .cbt-dashboard-content tbody {
        min-width: 600px;
    }
    
    /* ── Fixed-width containers: cap ALL inline widths ── */
    .cbt-dashboard-content [style*="width:"],
    .cbt-dashboard-content [style*="min-width:"] {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* ── Modals: always fit viewport ── */
    .cbt-modal-content,
    .cbt-modal-inner,
    [class*="modal-content"],
    [class*="modal-inner"],
    [id*="modal"] > div {
        max-width: calc(100vw - 32px) !important;
        max-height: calc(100vh - 60px) !important;
        overflow-y: auto !important;
        margin: 16px !important;
    }
    
    /* ── Grids: stack all 2+ column grids to single column ── */
    .cbt-dashboard-content [style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
    /* Customer Analytics grid — class-based, not inline (v5.35.61) */
    .cbt-ca-grid {
        grid-template-columns: 1fr !important;
    }
    .cbt-ca-grid .cbt-ca-card {
        grid-column: span 1 !important;
    }
    
    /* ── Flex rows: allow wrapping ── */
    .cbt-dashboard-content [style*="display:flex"],
    .cbt-dashboard-content [style*="display: flex"] {
        flex-wrap: wrap !important;
    }
    
    /* ── Images: never overflow container ── */
    .cbt-dashboard-content img {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* ── Inputs/selects: full width on mobile ── */
    .cbt-dashboard-content input[type="text"],
    .cbt-dashboard-content input[type="email"],
    .cbt-dashboard-content input[type="url"],
    .cbt-dashboard-content input[type="number"],
    .cbt-dashboard-content input[type="date"],
    .cbt-dashboard-content input[type="datetime-local"],
    .cbt-dashboard-content textarea,
    .cbt-dashboard-content select {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* ── Date inputs: constrain iOS native oversized rendering ── */
    .cbt-dashboard-content input[type="date"],
    .cbt-dashboard-content input[type="datetime-local"] {
        -webkit-appearance: none !important;
        appearance: none !important;
        font-size: 14px !important;
        padding: 10px 12px !important;
        min-height: 42px !important;
        height: auto !important;
        line-height: 1.4 !important;
    }
    
    /* ── Pre/code blocks: scroll instead of overflow ── */
    .cbt-dashboard-content pre,
    .cbt-dashboard-content code {
        max-width: 100% !important;
        overflow-x: auto !important;
        word-break: break-all !important;
    }
    
    /* ── Long URLs/text: break words ── */
    .cbt-dashboard-content td,
    .cbt-dashboard-content th,
    .cbt-dashboard-content a {
        word-break: break-word !important;
    }
    
    /* ── KPI stat cards: 2-column on tablet, 1 on phone ── */
    .cbt-dashboard-content .cbt-kpi-row,
    .cbt-dashboard-content [class*="stats-grid"],
    .cbt-dashboard-content [class*="stat-cards"],
    .cbt-dashboard-content [class*="kpi-grid"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    
    /* ── Action button rows: wrap on mobile ── */
    .cbt-dashboard-content [class*="header-actions"],
    .cbt-dashboard-content [class*="action-bar"],
    .cbt-dashboard-content [class*="btn-group"] {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
    
    /* ── Tabs: scrollable row ── */
    .cbt-dashboard-content [class*="tab-nav"],
    .cbt-dashboard-content [class*="tabs-row"],
    .cbt-dashboard-content .nav-tabs {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        flex-wrap: nowrap !important;
        scrollbar-width: none !important;
    }
    .cbt-dashboard-content [class*="tab-nav"]::-webkit-scrollbar,
    .cbt-dashboard-content [class*="tabs-row"]::-webkit-scrollbar {
        display: none !important;
    }
    
    /* ── Searchable select: fit mobile ── */
    .cbt-ss-wrap {
        max-width: 100% !important;
    }
    .cbt-ss-dropdown {
        max-width: 100% !important;
    }
}

@media (max-width: 480px) {
    /* ── KPI cards: single column on small phones ── */
    .cbt-dashboard-content .cbt-kpi-row,
    .cbt-dashboard-content [class*="stats-grid"],
    .cbt-dashboard-content [class*="stat-cards"] {
        grid-template-columns: 1fr !important;
    }
    
    /* ── Buttons: full width on small screens ── */
    .cbt-dashboard-content .cbt-btn,
    .cbt-dashboard-content [class*="btn-primary"],
    .cbt-dashboard-content button[type="submit"] {
        width: 100% !important;
        text-align: center !important;
    }
}

/* ==================== Login/Registration Pages ==================== */
.cbt-login-wrapper,
.cbt-pending-wrapper,
.cbt-suspended-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--cbt-dark) 0%, var(--cbt-primary) 100%);
    padding: 20px;
}

.cbt-login-box,
.cbt-pending-box,
.cbt-suspended-box {
    background: #fff;
    padding: 40px;
    border-radius: var(--cbt-border-radius);
    max-width: 400px;
    width: 100%;
    text-align: center;
}

.cbt-login-box h2,
.cbt-pending-box h2,
.cbt-suspended-box h2 {
    margin: 0 0 16px;
    color: var(--cbt-gray-900);
}

.cbt-login-box p,
.cbt-pending-box p,
.cbt-suspended-box p {
    color: var(--cbt-gray-600);
    margin-bottom: 24px;
}

.cbt-register-link {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--cbt-gray-200);
}

.cbt-register-link a {
    color: var(--cbt-primary);
    text-decoration: none;
    font-weight: 500;
}

#cbt-vendor-login input[type="text"],
#cbt-vendor-login input[type="password"] {
    width: 100%;
    padding: 12px;
    margin-bottom: 16px;
    border: 1px solid var(--cbt-gray-300);
    border-radius: var(--cbt-border-radius);
}

#cbt-vendor-login input[type="submit"] {
    width: 100%;
    padding: 12px;
    background: var(--cbt-primary);
    color: #fff;
    border: none;
    border-radius: var(--cbt-border-radius);
    font-size: 16px;
    cursor: pointer;
}

/* ─── CBT Media Picker - no additional CSS needed (all inline in JS) ─── */

/* ── Avatar dropdown ── */
.cbt-dash-topbar-avatar-wrap,
.wiz-topbar-avatar-wrap {
    position: relative;
}
.cbt-dash-avatar-dropdown,
.wiz-avatar-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    min-width: 200px;
    z-index: 9999;
    overflow: hidden;
}
.cbt-dash-avatar-dropdown.open,
.wiz-avatar-dropdown.open {
    display: block;
}
.cbt-dash-avatar-dropdown-header,
.wiz-avatar-dropdown-header {
    padding: 12px 16px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.cbt-dash-avatar-dropdown-header strong,
.wiz-avatar-dropdown-header strong {
    font-size: 14px;
    font-weight: 600;
    color: #111;
}
.cbt-dash-avatar-dropdown-header span,
.wiz-avatar-dropdown-header span {
    font-size: 13px;
    color: #6b7280;
}
.cbt-dash-avatar-dropdown-divider,
.wiz-avatar-dropdown-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 4px 0;
}
/* Bold divider between organizer and customer sections */
.cbt-dash-avatar-dropdown-divider.section-break,
.wiz-avatar-dropdown-divider.section-break {
    height: 1px;
    background: #d1d5db;
    margin: 6px 0;
}
.cbt-dash-avatar-dropdown-item,
.wiz-avatar-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    font-size: 14px;
    color: #374151;
    text-decoration: none;
    transition: background 0.1s;
}
.cbt-dash-avatar-dropdown-item:hover,
.wiz-avatar-dropdown-item:hover {
    background: #f3f4f6;
    color: #111;
    text-decoration: none;
}
.cbt-dash-avatar-dropdown-item.active,
.wiz-avatar-dropdown-item.active {
    background: #f3f4f6;
    color: #111;
    font-weight: 500;
}
.cbt-dash-avatar-dropdown-item.active i,
.wiz-avatar-dropdown-item.active i {
    color: #374151;
}
.cbt-dash-avatar-dropdown-item i,
.wiz-avatar-dropdown-item i {
    width: 14px;
    color: #6b7280;
    font-size: 13px;
}
.cbt-dash-avatar-dropdown-logout,
.wiz-avatar-dropdown-logout {
    color: #dc2626 !important;
}
.cbt-dash-avatar-dropdown-logout i,
.wiz-avatar-dropdown-logout i {
    color: #dc2626 !important;
}

/* Avatar trigger — button with avatar img + chevron as direct children */
.cbt-dash-avatar-trigger,
.wiz-avatar-trigger {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    background: rgba(255,255,255,0.06) !important;
    border: 1px solid rgba(255,255,255,0.18) !important;
    padding: 3px 10px 3px 3px !important;
    border-radius: 50px !important;
    cursor: pointer !important;
    transition: all 0.15s !important;
    outline: none !important;
    margin-right: 4px !important;
}
.cbt-dash-avatar-trigger:hover,
.wiz-avatar-trigger:hover {
    background: rgba(255,255,255,0.12) !important;
    border-color: rgba(255,255,255,0.3) !important;
}
.cbt-dash-avatar-img,
.wiz-avatar-img {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    flex-shrink: 0 !important;
}
.cbt-dash-avatar-initials,
.wiz-avatar-initials {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    border-radius: 50% !important;
    background: #cfaf86 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #111111 !important;
    flex-shrink: 0 !important;
}
.cbt-dash-avatar-chevron,
.wiz-avatar-chevron {
    font-size: 10px !important;
    color: rgba(255,255,255,0.9) !important;
    transition: transform 0.2s !important;
    pointer-events: none !important;
    flex-shrink: 0 !important;
}

/* ── Topbar bell + separator ── */
.cbt-dash-topbar-sep {
    width: 1px;
    height: 24px;
    background: rgba(255,255,255,0.2);
    flex-shrink: 0;
}
.cbt-dash-bell-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: rgba(255,255,255,0.75);
    font-size: 15px;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}
.cbt-dash-bell-btn:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
    text-decoration: none;
}
.cbt-dash-bell-btn.active-page {
    color: #cfaf86;
}
.cbt-dash-bell-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #ef4444;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    line-height: 1;
    pointer-events: none;
}

/* Mobile topbar bell button */
.cbt-mobile-topbar-btn {
    position: relative;
}

.cbt-mobile-ai-btn {
    color: #cfaf86 !important;
    background: rgba(207,175,134,0.12) !important;
    border: 1px solid rgba(207,175,134,0.25) !important;
}
.cbt-mobile-ai-btn:hover {
    background: rgba(207,175,134,0.22) !important;
}
