/**
 * Modern POS Enterprise Design System & OS-Level Environment Presets Engine
 * Windows 11 Fluent, macOS Ventura/Sonoma Glass, Linux GNOME/Ubuntu Yaru
 * Strict Contrast & Legibility Protection Architecture
 */

/* ==========================================================================
   1. CSS Variable Design Token Engine (:root Defaults - Windows 11 Fluent Base)
   ========================================================================== */
:root {
    /* OS Identity Default: Windows 11 Fluent */
    --font-sans: "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;
    
    /* Layout Dimensions */
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 72px;
    --navbar-height: 64px;

    /* Semantic Surfaces Tokens (Windows 11 Light Default) */
    --bg-app: #f3f3f3;
    --bg-surface: #ffffff;
    --bg-surface-secondary: #f9f9f9;
    --bg-surface-tertiary: #edebe9;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    --border-color: #e5e5e5;
    --card-shadow: 0 2px 4px rgba(0, 0, 0, 0.04), 0 8px 16px rgba(0, 0, 0, 0.04);
    
    /* Semantic Border Radii */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;

    /* Semantic Typography & Contrast Tokens (High-Contrast Slate) */
    --text-primary: #202020;
    --text-secondary: #5c5c5c;
    --text-muted: #767676;
    --text-disabled: #a0a0a0;
    --text-on-accent: #ffffff;
    --text-inverse: #ffffff;

    /* Semantic Accent Tokens (Windows Fluent Blue) */
    --accent-primary: #0f6cbd;
    --accent-hover: #005da6;
    --accent-subtle: rgba(15, 108, 189, 0.12);

    /* Backwards Compatibility Token Aliases */
    --canvas-bg: var(--bg-app);
    --card-bg: var(--bg-card);
    --card-border: var(--border-color);
    --bg-body: var(--bg-app);
    --primary: var(--accent-primary);
    --primary-hover: var(--accent-hover);
    --primary-active: var(--accent-hover);
    --primary-light: var(--accent-subtle);
    --primary-border: var(--accent-subtle);
    --primary-glow: var(--accent-subtle);
    --primary-gradient: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-hover) 100%);
    --navbar-bg: var(--bg-surface);
    --navbar-border: var(--border-color);
    --input-bg: var(--bg-surface);
    --input-border: var(--border-color);
    --input-focus-border: var(--accent-primary);
    --input-focus-ring: var(--accent-subtle);
    
    /* Sidebar Defaults */
    --sidebar-hover: var(--bg-surface-secondary);
    --sidebar-hover-bg: var(--bg-surface-secondary);
    --sidebar-hover-text: var(--text-primary);
    --sidebar-active: var(--accent-primary);
    --sidebar-active-bg: var(--accent-primary);
    --sidebar-active-text: #ffffff;
    --sidebar-text: var(--text-secondary);
    --sidebar-text-muted: var(--text-muted);
    --sidebar-border: var(--border-color);
    --sidebar-brand-text: var(--text-primary);
    --sidebar-section-title: var(--text-muted);

    /* Shadows Hierarchy */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
    --shadow-sm: var(--card-shadow);
    --shadow-md: 0 4px 12px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 24px -2px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 20px 30px -4px rgba(0, 0, 0, 0.12);

    /* Semantic Status Accents */
    --success: #107c41;
    --success-light: #e6f4ec;
    --success-border: #9fd8b6;
    --success-text: #0e6b37;

    --warning: #ca5010;
    --warning-light: #fef0e7;
    --warning-border: #f9cbb1;
    --warning-text: #a83f09;

    --danger: #c42b1c;
    --danger-light: #fdeae8;
    --danger-border: #f6b5af;
    --danger-text: #a82315;

    --info: #0078d4;
    --info-light: #eff6fc;
    --info-border: #99cbf2;
    --info-text: #005a9e;
}

/* ==========================================================================
   2. OS Environment Profiles Engine
   ========================================================================== */

/* --------------------------------------------------------------------------
   Profile A: [data-os-theme="macos"] (macOS Ventura / Sonoma Frosted Glass)
   -------------------------------------------------------------------------- */
[data-os-theme="macos"] {
    --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Arial, sans-serif;

    /* Surfaces */
    --bg-app: #f5f5f7;
    --bg-surface: rgba(255, 255, 255, 0.88);
    --bg-surface-secondary: rgba(240, 240, 243, 0.85);
    --bg-surface-tertiary: #e5e5ea;
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-sidebar: rgba(246, 246, 247, 0.92);
    --border-color: rgba(0, 0, 0, 0.08);
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);

    /* Smooth Curves */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;

    /* High-contrast Crisp Apple Typography */
    --text-primary: #1d1d1f;
    --text-secondary: #515154;
    --text-muted: #86868b;
    --text-disabled: #aeaeb2;
    --text-on-accent: #ffffff;
    --text-inverse: #ffffff;

    /* Apple System Blue Accent */
    --accent-primary: #0071e3;
    --accent-hover: #0077ed;
    --accent-subtle: rgba(0, 113, 227, 0.14);

    --primary: #0071e3;
    --primary-hover: #0077ed;
    --primary-active: #005bb5;
    --primary-light: rgba(0, 113, 227, 0.12);
    --primary-border: rgba(0, 113, 227, 0.25);
    --primary-glow: rgba(0, 113, 227, 0.2);
    --primary-gradient: linear-gradient(135deg, #0071e3 0%, #47a0ff 100%);

    --sidebar-text: #424245;
    --sidebar-brand-text: #1d1d1f;
    --sidebar-active: #0071e3;
    --sidebar-active-bg: #0071e3;
    --sidebar-active-text: #ffffff;
}

[data-os-theme="macos"][data-bs-theme="dark"] {
    --bg-app: #1e1e1f;
    --bg-surface: rgba(36, 36, 38, 0.88);
    --bg-surface-secondary: rgba(48, 48, 51, 0.85);
    --bg-surface-tertiary: #3a3a3c;
    --bg-card: rgba(30, 30, 32, 0.85);
    --bg-sidebar: rgba(26, 26, 28, 0.92);
    --border-color: rgba(255, 255, 255, 0.12);
    --card-shadow: 0 12px 36px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.3);

    --text-primary: #f5f5f7;
    --text-secondary: #a1a1a6;
    --text-muted: #86868b;
    --text-disabled: #636366;
    --text-on-accent: #ffffff;
    --text-inverse: #1d1d1f;

    --accent-primary: #2997ff;
    --accent-hover: #40a9ff;
    --accent-subtle: rgba(41, 151, 255, 0.22);

    --primary: #2997ff;
    --primary-hover: #40a9ff;
    --primary-active: #147ce5;
    --primary-light: rgba(41, 151, 255, 0.2);
    --primary-border: rgba(41, 151, 255, 0.35);
    --primary-glow: rgba(41, 151, 255, 0.3);
    --primary-gradient: linear-gradient(135deg, #147ce5 0%, #2997ff 100%);

    --sidebar-text: #a1a1a6;
    --sidebar-brand-text: #f5f5f7;
    --sidebar-active: #2997ff;
    --sidebar-active-bg: #2997ff;
    --sidebar-active-text: #ffffff;
}

/* macOS Frosted Glass Backdrop Filter Application */
[data-os-theme="macos"] .card,
[data-os-theme="macos"] .pos-card,
[data-os-theme="macos"] .modal-content,
[data-os-theme="macos"] .dropdown-menu,
[data-os-theme="macos"] .top-navbar {
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
}

[data-os-theme="macos"] .card,
[data-os-theme="macos"] .pos-card {
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
}
[data-os-theme="macos"][data-bs-theme="dark"] .card,
[data-os-theme="macos"][data-bs-theme="dark"] .pos-card {
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

/* macOS Traffic Light Badge Accents */
.mac-traffic-lights {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.mac-traffic-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    display: inline-block;
}
.mac-dot-close { background-color: #ff5f56; border: 1px solid #e0443e; }
.mac-dot-minimize { background-color: #ffbd2e; border: 1px solid #dea125; }
.mac-dot-maximize { background-color: #27c93f; border: 1px solid #1aab29; }


/* --------------------------------------------------------------------------
   Profile B: [data-os-theme="windows"] (Windows 11 Fluent / Mica Acrylic)
   -------------------------------------------------------------------------- */
[data-os-theme="windows"] {
    --font-sans: "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;

    /* Surfaces: Modern Neutral Backdrop & Flat Acrylic Panels */
    --bg-app: #f3f3f3;
    --bg-surface: #ffffff;
    --bg-surface-secondary: #f9f9f9;
    --bg-surface-tertiary: #edebe9;
    --bg-card: #ffffff;
    --bg-sidebar: #0f172a; /* Windows 11 Fluent Dark Slate-Blue Mica */
    --border-color: #e5e5e5;
    --card-shadow: 0 2px 4px rgba(0, 0, 0, 0.04), 0 8px 16px rgba(0, 0, 0, 0.04);

    /* Precision 8px Corners */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;

    /* High-contrast Slate Typography */
    --text-primary: #202020;
    --text-secondary: #5c5c5c;
    --text-muted: #767676;
    --text-disabled: #a0a0a0;
    --text-on-accent: #ffffff;
    --text-inverse: #ffffff;

    /* Windows Fluent Blue Accents */
    --accent-primary: #0067b8;
    --accent-hover: #005a9e;
    --accent-subtle: rgba(15, 108, 189, 0.12);

    --primary: #0067b8;
    --primary-hover: #005a9e;
    --primary-active: #004b87;
    --primary-light: rgba(15, 108, 189, 0.1);
    --primary-border: rgba(15, 108, 189, 0.25);
    --primary-glow: rgba(15, 108, 189, 0.2);
    --primary-gradient: linear-gradient(135deg, #0f6cbd 0%, #005a9e 100%);

    --sidebar-bg: #0f172a;
    --sidebar-border: rgba(255, 255, 255, 0.08);
    --sidebar-text: #cbd5e1;
    --sidebar-text-muted: #64748b;
    --sidebar-hover-bg: rgba(255, 255, 255, 0.06);
    --sidebar-hover-text: #ffffff;
    --sidebar-brand-text: #ffffff;
    --sidebar-active: #0067b8;
    --sidebar-active-bg: #0067b8;
    --sidebar-active-text: #ffffff;
}

[data-os-theme="windows"][data-bs-theme="dark"] {
    --bg-app: #202020;
    --bg-surface: #2b2b2b;
    --bg-surface-secondary: #323232;
    --bg-surface-tertiary: #3a3a3a;
    --bg-card: #272727;
    --bg-sidebar: #0f172a;
    --border-color: #383838;
    --card-shadow: 0 4px 8px rgba(0, 0, 0, 0.25), 0 12px 24px rgba(0, 0, 0, 0.35);

    --text-primary: #ffffff;
    --text-secondary: #d1d1d1;
    --text-muted: #a0a0a0;
    --text-disabled: #6e6e6e;
    --text-on-accent: #ffffff;
    --text-inverse: #202020;

    --accent-primary: #4cc2ff;
    --accent-hover: #70d2ff;
    --accent-subtle: rgba(76, 194, 255, 0.2);

    --primary: #4cc2ff;
    --primary-hover: #70d2ff;
    --primary-active: #28b0f5;
    --primary-light: rgba(76, 194, 255, 0.18);
    --primary-border: rgba(76, 194, 255, 0.35);
    --primary-glow: rgba(76, 194, 255, 0.3);
    --primary-gradient: linear-gradient(135deg, #0f6cbd 0%, #4cc2ff 100%);

    --sidebar-bg: #0f172a;
    --sidebar-border: rgba(255, 255, 255, 0.08);
    --sidebar-text: #cbd5e1;
    --sidebar-text-muted: #64748b;
    --sidebar-hover-bg: rgba(255, 255, 255, 0.06);
    --sidebar-hover-text: #ffffff;
    --sidebar-brand-text: #ffffff;
    --sidebar-active: #0067b8;
    --sidebar-active-bg: #0067b8;
    --sidebar-active-text: #ffffff;
}

/* ==========================================================================
   Windows 11 Fluent / Mica Dark Slate-Blue Sidebar Design System
   ========================================================================== */
[data-os-theme="windows"] #sidebar-wrapper,
[data-os-theme="windows"] .sidebar,
[data-os-theme="windows"] aside {
    background: #0f172a !important;
    border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
}

[data-os-theme="windows"] .sidebar-brand {
    background: #0f172a !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

[data-os-theme="windows"] .sidebar-brand-text {
    color: #ffffff !important;
}

[data-os-theme="windows"] .sidebar-search-box {
    background: #0f172a !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

[data-os-theme="windows"] .sidebar-search-box .input-group {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 6px !important;
}

[data-os-theme="windows"] .sidebar-search-box input {
    color: #f1f5f9 !important;
}

[data-os-theme="windows"] .sidebar-search-box input::placeholder {
    color: #94a3b8 !important;
}

[data-os-theme="windows"] .sidebar-footer {
    background: #0b1120 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

[data-os-theme="windows"] .sidebar-footer .text-truncate {
    color: #ffffff !important;
}

/* Section Headers ("OVERVIEW", "ADMINISTRATION", etc.) */
[data-os-theme="windows"] .nav-section-title,
[data-os-theme="windows"] .sidebar-section-title,
[data-os-theme="windows"] .sidebar-submenu-heading {
    color: #64748b !important;
    font-weight: 600 !important;
    font-size: 0.72rem !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
}

/* Non-active Menu Links & Labels */
[data-os-theme="windows"] .sidebar-accordion-toggle,
[data-os-theme="windows"] .sidebar-nav > .nav-link {
    color: #cbd5e1 !important;
    font-weight: 500 !important;
    border-radius: 6px !important;
}

[data-os-theme="windows"] .sidebar-accordion-toggle .group-title,
[data-os-theme="windows"] .sidebar-nav > .nav-link span {
    color: #cbd5e1 !important;
    font-weight: 500 !important;
}

/* Menu Icons: High contrast soft slate */
[data-os-theme="windows"] .sidebar-accordion-toggle .group-icon,
[data-os-theme="windows"] .sidebar-nav > .nav-link i,
[data-os-theme="windows"] .sidebar-submenu .sub-menu-icon {
    color: #94a3b8 !important;
    opacity: 1 !important;
}

[data-os-theme="windows"] .sidebar-accordion-toggle .accordion-arrow {
    color: #64748b !important;
}

/* Submenus & Nested Dropdowns */
[data-os-theme="windows"] .sidebar-submenu {
    background: #0b1120 !important;
    border-radius: 6px !important;
    padding: 0.25rem 0.35rem !important;
    margin: 0.2rem 0.4rem 0.4rem 0.4rem !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

[data-os-theme="windows"] .sidebar-nav .sidebar-submenu .nav-link {
    color: #e2e8f0 !important;
    font-weight: 500 !important;
    border-radius: 6px !important;
}

[data-os-theme="windows"] .sidebar-nav .sidebar-submenu .nav-link span {
    color: #e2e8f0 !important;
}

/* Hover States (Windows 11 Subtle Acrylic Glow) */
[data-os-theme="windows"] .sidebar-accordion-toggle:hover,
[data-os-theme="windows"] .sidebar-nav > .nav-link:hover,
[data-os-theme="windows"] .sidebar-nav .sidebar-submenu .nav-link:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #ffffff !important;
    border-radius: 6px !important;
}

[data-os-theme="windows"] .sidebar-accordion-toggle:hover .group-title,
[data-os-theme="windows"] .sidebar-nav > .nav-link:hover span,
[data-os-theme="windows"] .sidebar-nav .sidebar-submenu .nav-link:hover span {
    color: #ffffff !important;
}

[data-os-theme="windows"] .sidebar-accordion-toggle:hover .group-icon,
[data-os-theme="windows"] .sidebar-nav > .nav-link:hover i,
[data-os-theme="windows"] .sidebar-nav .sidebar-submenu .nav-link:hover .sub-menu-icon {
    color: #ffffff !important;
}

[data-os-theme="windows"] .sidebar-accordion-group.is-open > .sidebar-accordion-toggle {
    background: rgba(255, 255, 255, 0.04) !important;
    color: #ffffff !important;
}

/* Active Menu Item: Windows 11 Fluent Blue with 3px Left Indicator Pill */
[data-os-theme="windows"] .sidebar-nav .nav-link.active,
[data-os-theme="windows"] .sidebar-nav .sidebar-submenu .nav-link.active {
    background: linear-gradient(135deg, #0f6cbd 0%, #005a9e 100%) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 12px rgba(15, 108, 189, 0.35) !important;
    border-radius: 6px !important;
    border-left: 3px solid #ffffff !important;
}

[data-os-theme="windows"] .sidebar-nav .nav-link.active i,
[data-os-theme="windows"] .sidebar-nav .nav-link.active span,
[data-os-theme="windows"] .sidebar-nav .sidebar-submenu .nav-link.active .sub-menu-icon,
[data-os-theme="windows"] .sidebar-nav .sidebar-submenu .nav-link.active span {
    color: #ffffff !important;
}


/* --------------------------------------------------------------------------
   Profile C: [data-os-theme="linux"] (Ubuntu / GNOME Yaru Dark-Neutral)
   -------------------------------------------------------------------------- */
[data-os-theme="linux"] {
    --font-sans: "Ubuntu", "Cantarell", "Liberation Sans", -apple-system, BlinkMacSystemFont, sans-serif;

    /* Surfaces: Clean GNOME Modern Surface */
    --bg-app: #f6f6f6;
    --bg-surface: #ffffff;
    --bg-surface-secondary: #f0f0f0;
    --bg-surface-tertiary: #e4e4e4;
    --bg-card: #ffffff;
    --bg-sidebar: #1e1e1e; /* Deep Modern GNOME Dark Surface */
    --border-color: rgba(0, 0, 0, 0.12);
    --card-shadow: 0 2px 6px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);

    /* Balanced 10px-12px Curves */
    --radius-sm: 6px;
    --radius-md: 9px;
    --radius-lg: 12px;

    /* Bold Legibility Typography */
    --text-primary: #111111;
    --text-secondary: #3d3d3d;
    --text-muted: #666666;
    --text-disabled: #999999;
    --text-on-accent: #ffffff;
    --text-inverse: #ffffff;

    /* Canonical Orange & Aubergine Accents */
    --accent-primary: #e95420;
    --accent-hover: #d34516;
    --accent-subtle: rgba(233, 84, 32, 0.16);

    --primary: #e95420;
    --primary-hover: #d34516;
    --primary-active: #b7390f;
    --primary-light: rgba(233, 84, 32, 0.14);
    --primary-border: rgba(233, 84, 32, 0.3);
    --primary-glow: rgba(233, 84, 32, 0.25);
    --primary-gradient: linear-gradient(135deg, #e95420 0%, #77216f 100%);

    --sidebar-bg: #1e1e1e;
    --sidebar-border: #333333;
    --sidebar-text: #e5e7eb;
    --sidebar-text-muted: #9ca3af;
    --sidebar-hover-bg: rgba(255, 255, 255, 0.08);
    --sidebar-hover-text: #ffffff;
    --sidebar-brand-text: #ffffff;
    --sidebar-active: #e95420;
    --sidebar-active-bg: #e95420;
    --sidebar-active-text: #ffffff;
}

[data-os-theme="linux"][data-bs-theme="dark"] {
    --bg-app: #242424; /* Clean GNOME Shell Dark */
    --bg-surface: #2e2e2e;
    --bg-surface-secondary: #353535;
    --bg-surface-tertiary: #3e3e3e;
    --bg-card: #2e2e2e;
    --bg-sidebar: #1e1e1e;
    --border-color: rgba(255, 255, 255, 0.12);
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);

    --text-primary: #f6f6f6;
    --text-secondary: #dfdfdf;
    --text-muted: #a4a4a4;
    --text-disabled: #6c6c6c;
    --text-on-accent: #ffffff;
    --text-inverse: #111111;

    --accent-primary: #ff6e3b;
    --accent-hover: #ff8559;
    --accent-subtle: rgba(255, 110, 59, 0.22);

    --primary: #ff6e3b;
    --primary-hover: #ff8559;
    --primary-active: #e95420;
    --primary-light: rgba(255, 110, 59, 0.2);
    --primary-border: rgba(255, 110, 59, 0.35);
    --primary-glow: rgba(255, 110, 59, 0.3);
    --primary-gradient: linear-gradient(135deg, #77216f 0%, #ff6e3b 100%);

    --sidebar-bg: #1e1e1e;
    --sidebar-border: #333333;
    --sidebar-text: #e5e7eb;
    --sidebar-text-muted: #9ca3af;
    --sidebar-hover-bg: rgba(255, 255, 255, 0.08);
    --sidebar-hover-text: #ffffff;
    --sidebar-brand-text: #ffffff;
    --sidebar-active: #ff6e3b;
    --sidebar-active-bg: #ff6e3b;
    --sidebar-active-text: #ffffff;
}

/* ==========================================================================
   Linux GNOME / Ubuntu Dedicated Left Sidebar Design System (Ultra-High Contrast)
   ========================================================================== */
[data-os-theme="linux"] #sidebar-wrapper {
    background: #1e1e1e !important;
    border-right: 1px solid #333333 !important;
}

[data-os-theme="linux"] .sidebar-brand {
    background: #1e1e1e !important;
    border-bottom: 1px solid #333333 !important;
}

[data-os-theme="linux"] .sidebar-brand-text {
    color: #ffffff !important;
}

[data-os-theme="linux"] .sidebar-search-box {
    background: #1e1e1e !important;
    border-bottom: 1px solid #333333 !important;
}

[data-os-theme="linux"] .sidebar-search-box .input-group {
    background-color: #262626 !important;
    border: 1px solid #3d3d3d !important;
}

[data-os-theme="linux"] .sidebar-search-box input {
    color: #ffffff !important;
}

[data-os-theme="linux"] .sidebar-search-box input::placeholder {
    color: #9ca3af !important;
}

[data-os-theme="linux"] .sidebar-footer {
    background: #181818 !important;
    border-top: 1px solid #333333 !important;
}

[data-os-theme="linux"] .sidebar-footer .text-truncate {
    color: #ffffff !important;
}

/* Menu Headings (OVERVIEW, ADMINISTRATION, etc.) */
[data-os-theme="linux"] .nav-section-title,
[data-os-theme="linux"] .sidebar-section-title,
[data-os-theme="linux"] .sidebar-submenu-heading {
    color: #9ca3af !important;
    font-weight: 600 !important;
    font-size: 0.72rem !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
}

/* Non-active Menu items: high-contrast light text */
[data-os-theme="linux"] .sidebar-accordion-toggle,
[data-os-theme="linux"] .sidebar-nav > .nav-link {
    color: #e5e7eb !important;
    font-weight: 500 !important;
}

[data-os-theme="linux"] .sidebar-accordion-toggle .group-title,
[data-os-theme="linux"] .sidebar-nav > .nav-link span {
    color: #e5e7eb !important;
    font-weight: 500 !important;
}

/* Menu Icons: Crisp bright styling with 100% opacity */
[data-os-theme="linux"] .sidebar-accordion-toggle .group-icon,
[data-os-theme="linux"] .sidebar-nav > .nav-link i,
[data-os-theme="linux"] .sidebar-submenu .sub-menu-icon {
    color: #f97316 !important;
    opacity: 1 !important;
}

[data-os-theme="linux"] .sidebar-accordion-toggle .accordion-arrow {
    color: #9ca3af !important;
}

/* Submenu dropdown panels */
[data-os-theme="linux"] .sidebar-submenu {
    background: #262626 !important;
    border-radius: 8px !important;
    padding: 0.3rem 0.35rem !important;
    margin: 0.2rem 0.4rem 0.4rem 0.4rem !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
}

[data-os-theme="linux"] .sidebar-nav .sidebar-submenu .nav-link {
    color: #f3f4f6 !important;
    font-weight: 500 !important;
    border-radius: 6px !important;
}

[data-os-theme="linux"] .sidebar-nav .sidebar-submenu .nav-link span {
    color: #f3f4f6 !important;
}

/* Hover State: Clean dark-grey background with white text */
[data-os-theme="linux"] .sidebar-accordion-toggle:hover,
[data-os-theme="linux"] .sidebar-nav > .nav-link:hover,
[data-os-theme="linux"] .sidebar-nav .sidebar-submenu .nav-link:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    border-radius: 8px !important;
}

[data-os-theme="linux"] .sidebar-accordion-toggle:hover .group-title,
[data-os-theme="linux"] .sidebar-nav > .nav-link:hover span,
[data-os-theme="linux"] .sidebar-nav .sidebar-submenu .nav-link:hover span {
    color: #ffffff !important;
}

[data-os-theme="linux"] .sidebar-accordion-group.is-open > .sidebar-accordion-toggle {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #ffffff !important;
}

/* Active Menu Item: Bold Canonical Orange badge */
[data-os-theme="linux"] .sidebar-nav .nav-link.active,
[data-os-theme="linux"] .sidebar-nav .sidebar-submenu .nav-link.active {
    background: #e95420 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 12px rgba(233, 84, 32, 0.35) !important;
    border-radius: 8px !important;
}

[data-os-theme="linux"] .sidebar-nav .nav-link.active i,
[data-os-theme="linux"] .sidebar-nav .nav-link.active span,
[data-os-theme="linux"] .sidebar-nav .sidebar-submenu .nav-link.active .sub-menu-icon,
[data-os-theme="linux"] .sidebar-nav .sidebar-submenu .nav-link.active span {
    color: #ffffff !important;
}

/* ==========================================================================
   Color Palette Presets
   ========================================================================== */

/* 1. Corporate Navy / Slate */
[data-theme-color="navy"] {
    --primary: #1e3a8a;
    --primary-hover: #1e40af;
    --primary-active: #172554;
    --primary-light: #eff6ff;
    --primary-border: #bfdbfe;
    --primary-glow: rgba(30, 58, 138, 0.2);
    --primary-gradient: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    --accent: #0284c7;
}

/* 2. Modern Indigo / Violet (Default) */
[data-theme-color="indigo"] {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-active: #3730a3;
    --primary-light: #eef2ff;
    --primary-border: #c7d2fe;
    --primary-glow: rgba(79, 70, 229, 0.2);
    --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    --accent: #8b5cf6;
}

/* 3. Emerald / Retail Teal */
[data-theme-color="emerald"] {
    --primary: #059669;
    --primary-hover: #047857;
    --primary-active: #065f46;
    --primary-light: #ecfdf5;
    --primary-border: #a7f3d0;
    --primary-glow: rgba(5, 150, 105, 0.2);
    --primary-gradient: linear-gradient(135deg, #059669 0%, #10b981 100%);
    --accent: #0d9488;
}

/* 4. Royal Sapphire / Deep Tech Blue */
[data-theme-color="sapphire"] {
    --primary: #0284c7;
    --primary-hover: #0369a1;
    --primary-active: #075985;
    --primary-light: #f0f9ff;
    --primary-border: #bae6fd;
    --primary-glow: rgba(2, 132, 199, 0.2);
    --primary-gradient: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%);
    --accent: #06b6d4;
}

/* 5. Rose / Luxury Burgundy */
[data-theme-color="rose"] {
    --primary: #e11d48;
    --primary-hover: #be123c;
    --primary-active: #9f1239;
    --primary-light: #fff1f2;
    --primary-border: #fecdd3;
    --primary-glow: rgba(225, 29, 72, 0.2);
    --primary-gradient: linear-gradient(135deg, #e11d48 0%, #f43f5e 100%);
    --accent: #fb7185;
}

/* 6. Amber / Warm Bronze */
[data-theme-color="amber"] {
    --primary: #d97706;
    --primary-hover: #b45309;
    --primary-active: #92400e;
    --primary-light: #fffbeb;
    --primary-border: #fde68a;
    --primary-glow: rgba(217, 119, 6, 0.2);
    --primary-gradient: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
    --accent: #eab308;
}

/* ==========================================================================
   Sidebar Styles (Light vs Dark Sidebar)
   ========================================================================== */

/* Dark Sidebar variant (Available in Light Mode for users who prefer contrast) */
[data-sidebar-style="dark"] {
    --sidebar-bg: #0f172a;
    --sidebar-border: rgba(255, 255, 255, 0.08);
    --sidebar-text: #94a3b8;
    --sidebar-text-muted: #64748b;
    --sidebar-hover-bg: rgba(255, 255, 255, 0.06);
    --sidebar-hover-text: #f8fafc;
    --sidebar-active-bg: var(--primary);
    --sidebar-active-text: #ffffff;
    --sidebar-brand-text: #ffffff;
    --sidebar-section-title: #64748b;
}

/* ==========================================================================
   Dark Theme Overrides
   ========================================================================== */
[data-bs-theme="dark"] {
    --bg-body: #0b0f19;
    --bg-surface: #111827;
    --bg-surface-secondary: #1e293b;
    --bg-surface-tertiary: #334155;
    --bg-hover: rgba(255, 255, 255, 0.05);

    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-disabled: #64748b;
    --text-inverse: #0f172a;

    --border-color: #1f293d;
    --border-color-light: #182234;
    --border-color-strong: #334155;

    --sidebar-bg: #0f172a;
    --sidebar-border: #1e293b;
    --sidebar-text: #94a3b8;
    --sidebar-text-muted: #64748b;
    --sidebar-hover-bg: rgba(255, 255, 255, 0.06);
    --sidebar-hover-text: #f8fafc;
    --sidebar-active-bg: var(--primary);
    --sidebar-active-text: #ffffff;
    --sidebar-brand-text: #ffffff;
    --sidebar-section-title: #64748b;

    --navbar-bg: #111827;
    --navbar-border: #1f293d;

    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.35);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);

    --input-bg: #0f172a;
    --input-border: #334155;

    --primary-light: rgba(79, 70, 229, 0.18);
    --primary-border: rgba(99, 102, 241, 0.35);

    --success-light: rgba(16, 185, 129, 0.15);
    --success-border: rgba(16, 185, 129, 0.3);
    --success-text: #34d399;

    --warning-light: rgba(245, 158, 11, 0.15);
    --warning-border: rgba(245, 158, 11, 0.3);
    --warning-text: #fbbf24;

    --danger-light: rgba(239, 68, 68, 0.15);
    --danger-border: rgba(239, 68, 68, 0.3);
    --danger-text: #f87171;

    --info-light: rgba(14, 165, 233, 0.15);
    --info-border: rgba(14, 165, 233, 0.3);
    --info-text: #38bdf8;
}

[data-bs-theme="dark"][data-theme-color="navy"] {
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-active: #1d4ed8;
    --primary-light: rgba(59, 130, 246, 0.18);
    --primary-border: rgba(59, 130, 246, 0.35);
    --primary-glow: rgba(59, 130, 246, 0.3);
    --primary-gradient: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%);
}

[data-bs-theme="dark"][data-theme-color="emerald"] {
    --primary: #10b981;
    --primary-hover: #059669;
    --primary-active: #047857;
    --primary-light: rgba(16, 185, 129, 0.18);
    --primary-border: rgba(16, 185, 129, 0.35);
    --primary-glow: rgba(16, 185, 129, 0.3);
    --primary-gradient: linear-gradient(135deg, #059669 0%, #10b981 100%);
}

[data-bs-theme="dark"][data-theme-color="sapphire"] {
    --primary: #38bdf8;
    --primary-hover: #0ea5e9;
    --primary-active: #0284c7;
    --primary-light: rgba(56, 189, 248, 0.18);
    --primary-border: rgba(56, 189, 248, 0.35);
    --primary-glow: rgba(56, 189, 248, 0.3);
    --primary-gradient: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%);
}

[data-bs-theme="dark"][data-theme-color="rose"] {
    --primary: #fb7185;
    --primary-hover: #f43f5e;
    --primary-active: #e11d48;
    --primary-light: rgba(251, 113, 133, 0.18);
    --primary-border: rgba(251, 113, 133, 0.35);
    --primary-glow: rgba(251, 113, 133, 0.3);
    --primary-gradient: linear-gradient(135deg, #e11d48 0%, #fb7185 100%);
}

[data-bs-theme="dark"][data-theme-color="amber"] {
    --primary: #fbbf24;
    --primary-hover: #f59e0b;
    --primary-active: #d97706;
    --primary-light: rgba(251, 191, 36, 0.18);
    --primary-border: rgba(251, 191, 36, 0.35);
    --primary-glow: rgba(251, 191, 36, 0.3);
    --primary-gradient: linear-gradient(135deg, #d97706 0%, #fbbf24 100%);
}

/* ==========================================================================
   Core Layout Styling
   ========================================================================== */
/* Global Modern Scrollbars (Enterprise Standard) */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.35) transparent;
}
[data-bs-theme="dark"] * {
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}
::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background-color: rgba(148, 163, 184, 0.3);
    border-radius: 9999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
    background-color: rgba(100, 116, 139, 0.5);
}
[data-bs-theme="dark"] ::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.18);
}
[data-bs-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.32);
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-body);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    letter-spacing: -0.011em;
    transition: background-color 0.25s ease, color 0.25s ease;
}

/* Sidebar Styling */
#sidebar-wrapper {
    width: var(--sidebar-width);
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    transition: width 0.28s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.25s ease, border-color 0.25s ease, margin-left 0.28s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease;
    border-right: 1px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-submenu-heading { color: var(--sidebar-text); font-size: .7rem; font-weight: 700; padding: .7rem .75rem .25rem; }

.sidebar-brand {
    padding: 1.25rem 1.25rem;
    height: var(--navbar-height);
    display: flex;
    align-items: center;
    gap: 0.85rem;
    border-bottom: 1px solid var(--sidebar-border);
    flex-shrink: 0;
}

.sidebar-brand-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.15rem;
    box-shadow: 0 4px 12px var(--primary-glow);
    flex-shrink: 0;
}

.sidebar-brand-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--sidebar-brand-text);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.sidebar-brand-badge {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--sidebar-text-muted);
}

/* Sidebar Search Box */
.sidebar-search-box {
    padding: 0.75rem 0.85rem 0.4rem;
    border-bottom: 1px solid var(--sidebar-border);
    flex-shrink: 0;
    position: relative;
    z-index: 5;
    transition: box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-search-box.has-scroll-shadow {
    box-shadow: 0 4px 14px -2px rgba(15, 23, 42, 0.08);
}

[data-sidebar-style="dark"] .sidebar-search-box.has-scroll-shadow,
[data-bs-theme="dark"] .sidebar-search-box.has-scroll-shadow {
    box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.45);
}

.sidebar-search-box .input-group {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 9px;
    transition: all 0.2s ease;
}

.sidebar-search-box .input-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.sidebar-search-box .input-group-text {
    background: transparent;
    border: none;
    color: var(--sidebar-text-muted);
    padding-left: 0.65rem;
    padding-right: 0.4rem;
}

.sidebar-search-box input {
    background: transparent !important;
    border: none !important;
    font-size: 0.82rem;
    color: var(--sidebar-text);
    padding-left: 0.2rem;
    padding-right: 1.8rem;
}

.sidebar-search-box input:focus {
    box-shadow: none !important;
    color: var(--sidebar-text);
}

.sidebar-search-box input::placeholder {
    color: var(--sidebar-text-muted);
    font-size: 0.78rem;
}

/* ==========================================================================
   Enterprise Floating Overlay Scrollbar (Linear / Stripe / Vercel Standard)
   ========================================================================== */
.sidebar-nav {
    padding: 0.75rem 0.85rem 1.5rem;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
    transition: scrollbar-color 0.25s ease-in-out;
}

/* Reveal Firefox scrollbar on hover, focus, or active scroll */
#sidebar-wrapper:hover .sidebar-nav,
.sidebar-nav:focus-within,
.sidebar-nav.is-scrolling {
    scrollbar-color: rgba(148, 163, 184, 0.45) transparent;
}

[data-sidebar-style="dark"] #sidebar-wrapper:hover .sidebar-nav,
[data-sidebar-style="dark"] .sidebar-nav.is-scrolling,
[data-bs-theme="dark"] #sidebar-wrapper:hover .sidebar-nav,
[data-bs-theme="dark"] .sidebar-nav.is-scrolling {
    scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

/* WebKit (Chrome, Edge, Safari, Opera) */
.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

/* Default state: subtle floating ghost thumb */
.sidebar-nav::-webkit-scrollbar-thumb {
    background-color: transparent;
    border-radius: 9999px;
    border: 1px solid transparent;
    background-clip: padding-box;
    transition: background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Smooth reveal on hover, focus, or active scroll */
#sidebar-wrapper:hover .sidebar-nav::-webkit-scrollbar-thumb,
.sidebar-nav:focus-within::-webkit-scrollbar-thumb,
.sidebar-nav.is-scrolling::-webkit-scrollbar-thumb {
    background-color: rgba(148, 163, 184, 0.4);
}

#sidebar-wrapper:hover .sidebar-nav::-webkit-scrollbar-thumb:hover,
.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background-color: var(--primary) !important;
}

/* Dark mode & Dark Sidebar variant */
[data-sidebar-style="dark"] .sidebar-search-box .input-group {
    background-color: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
}

[data-sidebar-style="dark"] .sidebar-search-box input {
    color: #f1f5f9;
}

[data-sidebar-style="dark"] .sidebar-search-box input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

[data-sidebar-style="dark"] #sidebar-wrapper:hover .sidebar-nav::-webkit-scrollbar-thumb,
[data-sidebar-style="dark"] .sidebar-nav:focus-within::-webkit-scrollbar-thumb,
[data-sidebar-style="dark"] .sidebar-nav.is-scrolling::-webkit-scrollbar-thumb,
[data-bs-theme="dark"] #sidebar-wrapper:hover .sidebar-nav::-webkit-scrollbar-thumb,
[data-bs-theme="dark"] .sidebar-nav:focus-within::-webkit-scrollbar-thumb,
[data-bs-theme="dark"] .sidebar-nav.is-scrolling::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.22);
}

[data-sidebar-style="dark"] #sidebar-wrapper:hover .sidebar-nav::-webkit-scrollbar-thumb:hover,
[data-sidebar-style="dark"] .sidebar-nav::-webkit-scrollbar-thumb:hover,
[data-bs-theme="dark"] #sidebar-wrapper:hover .sidebar-nav::-webkit-scrollbar-thumb:hover,
[data-bs-theme="dark"] .sidebar-nav::-webkit-scrollbar-thumb:hover {
    background-color: var(--primary) !important;
}

.nav-section-title {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--sidebar-section-title);
    font-weight: 700;
    padding: 0.85rem 0.75rem 0.35rem;
}

.sidebar-nav .nav-link {
    color: var(--sidebar-text);
    border-radius: 9px;
    padding: 0.65rem 0.85rem;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.15s ease-in-out;
}

.sidebar-nav .nav-link i {
    font-size: 1rem;
    width: 22px;
    text-align: center;
    color: var(--sidebar-text-muted);
    transition: transform 0.15s ease, color 0.15s ease;
}

.sidebar-nav .nav-link:hover {
    color: var(--sidebar-hover-text);
    background-color: var(--sidebar-hover-bg);
}

.sidebar-nav .nav-link:hover i {
    color: var(--primary);
    transform: scale(1.1);
}

.sidebar-nav .nav-link.active,
.sidebar-nav .sidebar-submenu .nav-link.active {
    background: var(--sidebar-active, #2563EB) !important;
    color: #ffffff !important;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.45), 0 0 24px rgba(37, 99, 235, 0.25) !important;
    border-radius: 9px;
}

.sidebar-nav .nav-link.active i,
.sidebar-nav .sidebar-submenu .nav-link.active .sub-menu-icon {
    color: #ffffff !important;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}

/* Fast POS Gradient Launch Button */
.btn-fast-pos {
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    color: #ffffff !important;
    border: none;
    border-radius: 9px;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.48rem 1rem;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none !important;
}
.btn-fast-pos:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #4338ca 100%);
    color: #ffffff !important;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.5);
    transform: translateY(-1px);
}
.btn-fast-pos:active {
    transform: translateY(0);
}

.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--sidebar-border);
    background-color: var(--sidebar-bg);
    flex-shrink: 0;
    position: relative;
    z-index: 5;
    transition: box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-footer.has-scroll-shadow {
    box-shadow: 0 -4px 14px -2px rgba(15, 23, 42, 0.08);
}

[data-sidebar-style="dark"] .sidebar-footer.has-scroll-shadow,
[data-bs-theme="dark"] .sidebar-footer.has-scroll-shadow {
    box-shadow: 0 -4px 16px -2px rgba(0, 0, 0, 0.45);
}

/* Main Content Area */
#page-content-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.top-navbar {
    background-color: var(--navbar-bg);
    border-bottom: 1px solid var(--navbar-border);
    padding: 0 1.5rem;
    height: 64px;
    min-height: 64px;
    max-height: 64px;
    position: sticky;
    top: 0;
    z-index: 900;
    box-shadow: var(--shadow-xs);
    transition: background-color 0.25s ease, border-color 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.main-container {
    padding: 1.75rem;
    flex: 1;
}

/* ==========================================================================
   UI Components & Card System
   ========================================================================== */
.pos-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.pos-card:hover {
    box-shadow: var(--shadow-md);
}

.pos-card-header {
    padding: 1.15rem 1.35rem;
    border-bottom: 1px solid var(--border-color);
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pos-card-body {
    padding: 1.35rem;
}

/* KPI / Stat Cards */
.kpi-card {
    position: relative;
    overflow: hidden;
}
.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: transparent;
    transition: background-color 0.2s ease;
}
.kpi-card.kpi-primary::before { background: var(--primary); }
.kpi-card.kpi-success::before { background: var(--success); }
.kpi-card.kpi-danger::before  { background: var(--danger); }
.kpi-card.kpi-info::before    { background: var(--info); }
.kpi-card.kpi-warning::before { background: var(--warning); }

.kpi-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* Custom Buttons */
.btn-pos-primary {
    background: var(--primary-gradient);
    color: #ffffff !important;
    border: 1px solid transparent;
    border-radius: 9px;
    padding: 0.55rem 1.15rem;
    font-weight: 600;
    font-size: 0.875rem;
    box-shadow: 0 2px 6px var(--primary-glow);
    transition: all 0.2s ease;
}

.btn-pos-primary:hover {
    background: var(--primary-hover);
    color: #ffffff !important;
    box-shadow: 0 4px 12px var(--primary-glow);
    transform: translateY(-1px);
}

.btn-pos-primary:active {
    transform: translateY(0);
}

.btn-pos-outline {
    background-color: transparent;
    color: var(--primary);
    border: 1px solid var(--primary-border);
    border-radius: 9px;
    padding: 0.5rem 1rem;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.btn-pos-outline:hover {
    background-color: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

/* Custom Badges */
.badge-active {
    background-color: var(--success-light);
    color: var(--success-text);
    border: 1px solid var(--success-border);
    font-weight: 600;
    padding: 0.32rem 0.65rem;
    border-radius: 7px;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.badge-inactive {
    background-color: var(--danger-light);
    color: var(--danger-text);
    border: 1px solid var(--danger-border);
    font-weight: 600;
    padding: 0.32rem 0.65rem;
    border-radius: 7px;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.badge-role {
    background-color: var(--primary-light);
    color: var(--primary);
    border: 1px solid var(--primary-border);
    font-weight: 600;
    padding: 0.32rem 0.65rem;
    border-radius: 7px;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
}

/* ==========================================================================
   3. Strict Contrast & Legibility Protection Engine (Zero Unreadable Text)
   ========================================================================== */

/* Universal Surface & Text Enforcements */
body {
    background-color: var(--bg-app) !important;
    color: var(--text-primary) !important;
}

/* Card, Panel & Container Contrast & Radius */
.card,
.pos-card,
.kpi-card,
.billing-card,
.summary-card,
.modal-content {
    background-color: var(--bg-card) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--card-shadow) !important;
}

.card-header,
.pos-card-header,
.modal-header,
.modal-footer {
    background-color: var(--bg-surface) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

.card-body,
.pos-card-body,
.modal-body {
    background-color: transparent !important;
    color: var(--text-primary) !important;
}

/* Typography Hierarchy & Strict Contrast */
h1, h2, h3, h4, h5, h6,
.card-title,
.modal-title,
.pos-card-title,
.page-title {
    color: var(--text-primary) !important;
    font-weight: 700;
}

.card-subtitle,
.text-secondary,
.text-muted-contrast {
    color: var(--text-secondary) !important;
}

/* Eliminate dangerous hardcoded dark text in dark mode */
[data-bs-theme="dark"] .text-dark,
[data-bs-theme="dark"] .text-slate-800,
[data-bs-theme="dark"] .text-slate-900,
[data-bs-theme="dark"] .text-gray-800,
[data-bs-theme="dark"] .text-gray-900,
[data-bs-theme="dark"] .text-neutral-900 {
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .text-slate-500,
[data-bs-theme="dark"] .text-gray-500,
[data-bs-theme="dark"] .text-muted {
    color: var(--text-muted) !important;
}

[data-bs-theme="dark"] .bg-white {
    background-color: var(--bg-surface) !important;
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .bg-light {
    background-color: var(--bg-surface-secondary) !important;
    color: var(--text-primary) !important;
}

/* Form Controls & Select Inputs Protection */
.form-control,
.form-select,
.input-group-text {
    background-color: var(--bg-surface) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-sm) !important;
    padding: 0.55rem 0.85rem;
    font-size: 0.875rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control::placeholder,
.form-select::placeholder {
    color: var(--text-muted) !important;
    opacity: 0.8;
}

.form-control:focus,
.form-select:focus {
    background-color: var(--bg-surface) !important;
    border-color: var(--accent-primary) !important;
    color: var(--text-primary) !important;
    box-shadow: 0 0 0 3px var(--accent-subtle) !important;
    outline: none !important;
}

.form-label {
    color: var(--text-secondary) !important;
    font-size: 0.84rem;
    font-weight: 600;
}

/* Tables & DataGrids Strict Contrast */
.table {
    --bs-table-color: var(--text-primary) !important;
    --bs-table-bg: transparent !important;
    --bs-table-border-color: var(--border-color) !important;
    --bs-table-striped-color: var(--text-primary) !important;
    --bs-table-striped-bg: var(--bg-surface-secondary) !important;
    --bs-table-hover-color: var(--text-primary) !important;
    --bs-table-hover-bg: var(--accent-subtle) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

.table thead th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary) !important;
    font-weight: 700;
    background-color: var(--bg-surface) !important;
    border-bottom: 2px solid var(--border-color) !important;
    padding: 0.75rem 1rem;
}

.table tbody td {
    padding: 0.85rem 1rem;
    vertical-align: middle;
    color: var(--text-primary) !important;
    border-bottom: 1px solid var(--border-color) !important;
}

.table-hover tbody tr:hover td {
    color: var(--text-primary) !important;
    background-color: var(--accent-subtle) !important;
}

/* Dropdown Menus & Popovers */
.dropdown-menu {
    background-color: var(--bg-surface) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: var(--shadow-lg) !important;
    border-radius: var(--radius-md) !important;
    padding: 0.5rem;
    max-height: 85vh;
    overflow-y: auto;
    scrollbar-width: thin;
}

.dropdown-item {
    color: var(--text-primary) !important;
    border-radius: var(--radius-sm) !important;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: var(--accent-subtle) !important;
    color: var(--accent-primary) !important;
}

.dropdown-divider {
    border-color: var(--border-color) !important;
    opacity: 0.6;
}

/* Buttons Engine Contrast */
.btn-primary,
.btn-pos-primary {
    background: var(--primary-gradient) !important;
    border-color: var(--accent-primary) !important;
    color: var(--text-on-accent) !important;
    border-radius: var(--radius-sm) !important;
    box-shadow: 0 2px 6px var(--accent-subtle);
}

.btn-primary:hover,
.btn-pos-primary:hover {
    background: var(--accent-hover) !important;
    border-color: var(--accent-hover) !important;
    color: var(--text-on-accent) !important;
    box-shadow: 0 4px 12px var(--accent-subtle);
}

.btn-outline-primary {
    border-color: var(--accent-primary) !important;
    color: var(--accent-primary) !important;
    border-radius: var(--radius-sm) !important;
}

.btn-outline-primary:hover {
    background-color: var(--accent-primary) !important;
    border-color: var(--accent-primary) !important;
    color: var(--text-on-accent) !important;
}

/* ==========================================================================
   4. OS Environment Preset Switcher UI
   ========================================================================== */
.os-preset-card {
    border: 2px solid var(--border-color) !important;
    border-radius: var(--radius-md) !important;
    background-color: var(--bg-surface) !important;
    color: var(--text-primary) !important;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding: 0.85rem 0.5rem;
}

.os-preset-card:hover {
    border-color: var(--accent-primary) !important;
    background-color: var(--accent-subtle) !important;
    transform: translateY(-2px);
}

.os-preset-card.active {
    border-color: var(--accent-primary) !important;
    background-color: var(--accent-subtle) !important;
    box-shadow: 0 0 0 2px var(--accent-subtle) !important;
}

.os-preset-card.active .fw-semibold {
    color: var(--accent-primary) !important;
}

.theme-palette-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 1px var(--border-color);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.theme-palette-btn:hover {
    transform: scale(1.15);
}
.theme-palette-btn.active {
    box-shadow: 0 0 0 2px var(--accent-primary);
}
.theme-palette-btn.active::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.7rem;
    color: #ffffff;
}

.mode-toggle-group {
    display: inline-flex;
    background-color: var(--bg-surface-secondary);
    padding: 3px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}
.mode-toggle-btn {
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.15s ease;
}
.mode-toggle-btn.active {
    background-color: var(--bg-surface);
    color: var(--text-primary);
    box-shadow: var(--shadow-xs);
}

[data-set-sidebar].active,
[data-set-sidebar-fold].active {
    background-color: var(--accent-primary) !important;
    color: #ffffff !important;
    border-color: var(--accent-primary) !important;
    box-shadow: 0 2px 8px var(--accent-subtle) !important;
}

/* Mobile Responsive */
@media (max-width: 991.98px) {
    #sidebar-wrapper {
        margin-left: calc(-1 * var(--sidebar-width));
    }
    #sidebar-wrapper.toggled {
        margin-left: 0;
        box-shadow: var(--shadow-xl);
    }
    #page-content-wrapper {
        margin-left: 0;
    }
}

/* ==========================================================================
   Sidebar Fold / Collapsed State (Professional Mini Sidebar)
   ========================================================================== */
@media (min-width: 992px) {
    /* 1. Shell Transitions & Layout */
    html.sidebar-collapsed #sidebar-wrapper,
    body.sidebar-collapsed #sidebar-wrapper {
        width: var(--sidebar-collapsed-width);
    }

    html.sidebar-collapsed #page-content-wrapper,
    body.sidebar-collapsed #page-content-wrapper {
        margin-left: var(--sidebar-collapsed-width);
    }

    /* 2. Brand Section */
    .sidebar-brand {
        transition: padding 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .sidebar-brand > div:not(.sidebar-brand-icon) {
        transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), max-width 0.28s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s ease;
        white-space: nowrap;
        overflow: hidden;
        max-width: 200px;
    }
    html.sidebar-collapsed .sidebar-brand {
        padding: 1rem 0;
        justify-content: center;
        gap: 0;
    }
    html.sidebar-collapsed .sidebar-brand > div:not(.sidebar-brand-icon) {
        opacity: 0;
        visibility: hidden;
        max-width: 0;
        transform: translateX(-10px);
        pointer-events: none;
    }
    .sidebar-brand-icon {
        transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    }
    html.sidebar-collapsed .sidebar-brand:hover .sidebar-brand-icon {
        transform: scale(1.08);
    }

    /* 3. Search Box */
    .sidebar-search-box {
        transition: padding 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .sidebar-search-box .input-group {
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    }
    html.sidebar-collapsed .sidebar-search-box {
        padding: 0.5rem 0;
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    html.sidebar-collapsed .sidebar-search-box .input-group {
        width: 44px;
        height: 44px;
        margin: 0 auto;
        justify-content: center;
        align-items: center;
        cursor: pointer;
        border-radius: 10px;
        border: 1px solid var(--sidebar-border, rgba(255, 255, 255, 0.12));
        background: var(--sidebar-hover-bg, rgba(255, 255, 255, 0.05));
    }
    html.sidebar-collapsed .sidebar-search-box .input-group:hover {
        border-color: var(--primary);
        background: var(--sidebar-hover-bg);
        box-shadow: 0 0 0 3px var(--primary-glow);
    }
    html.sidebar-collapsed .sidebar-search-box .input-group-text {
        padding: 0;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent !important;
        border: none !important;
        color: var(--sidebar-text-muted, #94a3b8);
        font-size: 1.05rem;
    }
    html.sidebar-collapsed .sidebar-search-box .input-group:hover .input-group-text {
        color: var(--sidebar-hover-text, #ffffff);
    }
    html.sidebar-collapsed .sidebar-search-box input,
    html.sidebar-collapsed .sidebar-search-box #clearMenuSearch {
        display: none !important;
    }

    /* 4. Section Titles (Subtle elegant dividers) */
    .nav-section-title {
        transition: all 0.25s ease;
    }
    html.sidebar-collapsed .nav-section-title {
        font-size: 0;
        line-height: 0;
        height: 1px;
        padding: 0;
        margin: 0.5rem auto;
        width: 36px;
        background-color: var(--sidebar-border);
        opacity: 0.65;
        overflow: hidden;
        text-indent: -9999px;
    }

    /* 5. Nav Links & Accordion Toggles (Centered Icons Only) */
    html.sidebar-collapsed .sidebar-nav {
        padding: 0.6rem 0 1.5rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        scrollbar-width: none;
    }
    html.sidebar-collapsed .sidebar-nav::-webkit-scrollbar {
        display: none;
    }
    .sidebar-nav .nav-link {
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
    }
    .sidebar-nav .nav-link span,
    .sidebar-nav .nav-link .badge {
        transition: opacity 0.18s cubic-bezier(0.4, 0, 0.2, 1), transform 0.18s ease;
        white-space: nowrap;
    }
    html.sidebar-collapsed .sidebar-nav .nav-link {
        padding: 0;
        justify-content: center;
        align-items: center;
        gap: 0;
        width: 44px;
        height: 44px;
        margin: 0 auto 0.35rem auto;
        border-radius: 10px;
        display: flex;
    }
    html.sidebar-collapsed .sidebar-nav .nav-link i {
        font-size: 1.15rem;
        width: auto;
        margin: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.15s ease;
    }
    html.sidebar-collapsed .sidebar-nav .nav-link:hover i {
        transform: scale(1.2);
    }
    html.sidebar-collapsed .sidebar-nav .nav-link span,
    html.sidebar-collapsed .sidebar-nav .nav-link .badge {
        display: none !important;
        opacity: 0;
        visibility: hidden;
        width: 0;
        max-width: 0;
        overflow: hidden;
        margin: 0;
        padding: 0;
        position: absolute;
        pointer-events: none;
        transform: translateX(-10px);
    }

    /* Accordion Groups in Folded Mode */
    html.sidebar-collapsed .sidebar-accordion-group {
        width: 100%;
        margin-bottom: 0.35rem;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    html.sidebar-collapsed .sidebar-accordion-toggle {
        padding: 0;
        justify-content: center;
        align-items: center;
        width: 44px;
        height: 44px;
        margin: 0 auto;
        border-radius: 10px;
        position: relative;
        display: flex;
    }
    html.sidebar-collapsed .sidebar-accordion-toggle .d-flex {
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
        height: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        gap: 0 !important;
    }
    html.sidebar-collapsed .sidebar-accordion-toggle .group-icon {
        font-size: 1.15rem !important;
        width: auto !important;
        margin: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.15s ease;
    }
    html.sidebar-collapsed .sidebar-accordion-toggle:hover .group-icon {
        transform: scale(1.2);
    }
    html.sidebar-collapsed .sidebar-accordion-toggle .group-title,
    html.sidebar-collapsed .sidebar-accordion-toggle .accordion-arrow {
        display: none !important;
        opacity: 0;
        visibility: hidden;
        width: 0;
        height: 0;
        margin: 0;
        padding: 0;
        position: absolute;
        pointer-events: none;
    }
    html.sidebar-collapsed .sidebar-accordion-collapse,
    html.sidebar-collapsed .sidebar-submenu {
        display: none !important;
    }

    /* Active Indicator in Folded Mode */
    html.sidebar-collapsed .sidebar-nav .nav-link.active,
    html.sidebar-collapsed .sidebar-accordion-toggle.active-toggle,
    html.sidebar-collapsed .sidebar-accordion-group.has-active-child > .sidebar-accordion-toggle {
        background-color: var(--sidebar-active, #2563EB) !important;
        color: #ffffff !important;
        box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35) !important;
    }
    html.sidebar-collapsed .sidebar-nav .nav-link.active i,
    html.sidebar-collapsed .sidebar-accordion-toggle.active-toggle .group-icon,
    html.sidebar-collapsed .sidebar-accordion-group.has-active-child > .sidebar-accordion-toggle .group-icon {
        color: #ffffff !important;
    }

    /* 6. Sidebar Footer (Centered Avatar Only) */
    .sidebar-footer {
        transition: padding 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    }
    html.sidebar-collapsed .sidebar-footer {
        padding: 0.85rem 0.5rem;
    }
    html.sidebar-collapsed .sidebar-footer .d-flex {
        justify-content: center;
        gap: 0 !important;
    }
    html.sidebar-collapsed .sidebar-footer .flex-grow-1,
    html.sidebar-collapsed .sidebar-footer a[href*="logout"] {
        display: none !important;
        opacity: 0;
        visibility: hidden;
        width: 0;
        max-width: 0;
        overflow: hidden;
        margin: 0;
        padding: 0;
        position: absolute;
        pointer-events: none;
        transform: translateX(-10px);
        transition: opacity 0.18s ease;
    }
    html.sidebar-collapsed .sidebar-footer .rounded-circle {
        transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
        cursor: pointer;
    }
    html.sidebar-collapsed .sidebar-footer .rounded-circle:hover {
        transform: scale(1.12);
        box-shadow: 0 4px 14px var(--primary-glow);
    }
}

/* Sidebar Tooltip Styling (Executive Glass/Dark Pill) */
.sidebar-tooltip .tooltip-inner {
    background-color: var(--text-primary);
    color: var(--text-inverse);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.42rem 0.85rem;
    border-radius: 8px;
    box-shadow: 0 10px 25px -4px rgba(15, 23, 42, 0.18), 0 4px 8px -2px rgba(15, 23, 42, 0.08);
    letter-spacing: -0.01em;
}
.sidebar-tooltip.bs-tooltip-end .tooltip-arrow::before {
    border-right-color: var(--text-primary);
}
[data-bs-theme="dark"] .sidebar-tooltip .tooltip-inner {
    background-color: #1e293b;
    color: #f8fafc;
    border: 1px solid #334155;
    box-shadow: 0 10px 25px -4px rgba(0, 0, 0, 0.55);
}
[data-bs-theme="dark"] .sidebar-tooltip.bs-tooltip-end .tooltip-arrow::before {
    border-right-color: #1e293b;
}

/* Sidebar Toggle Button in Navbar */
.sidebar-toggle-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    padding: 0;
}
.sidebar-toggle-btn:hover {
    background-color: var(--bg-surface-secondary);
    color: var(--primary);
    border-color: var(--primary-border);
    transform: translateY(-1px);
    box-shadow: var(--shadow-xs);
}
.sidebar-toggle-btn:active {
    transform: translateY(0);
}
.sidebar-toggle-btn .sidebar-toggle-icon {
    font-size: 0.95rem;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
html.sidebar-collapsed .sidebar-toggle-btn .sidebar-toggle-icon {
    transform: rotate(180deg);
}

/* ==========================================================================
   Dynamic Top-Right User Block Utilities
   ========================================================================== */
.flex { display: flex !important; }
.flex-col { flex-direction: column !important; }
.items-center { align-items: center !important; }
.justify-center { justify-content: center !important; }
.gap-2\.5 { gap: 0.625rem !important; }
.select-none { user-select: none !important; }
.w-8 { width: 2rem !important; }
.h-8 { height: 2rem !important; }
.rounded-full { border-radius: 9999px !important; }
.bg-blue-100 { background-color: #dbeafe !important; }
.text-blue-700 { color: #1d4ed8 !important; }
.border-blue-200 { border-color: #bfdbfe !important; }
.shrink-0 { flex-shrink: 0 !important; }
.text-slate-800 { color: #1e293b !important; }
.text-slate-500 { color: #64748b !important; }
.leading-tight { line-height: 1.25 !important; }
.text-xs { font-size: 0.75rem !important; }
.text-\[10px\] { font-size: 10px !important; }
.font-bold { font-weight: 700 !important; }
.font-semibold { font-weight: 600 !important; }
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

[data-bs-theme="dark"] .bg-blue-100 { background-color: rgba(37, 99, 235, 0.22) !important; }
[data-bs-theme="dark"] .text-blue-700 { color: #93c5fd !important; }
[data-bs-theme="dark"] .border-blue-200 { border-color: rgba(59, 130, 246, 0.4) !important; }
[data-bs-theme="dark"] .text-slate-800 { color: #f1f5f9 !important; }
[data-bs-theme="dark"] .text-slate-500 { color: #94a3b8 !important; }

/* ==========================================================================
   POS High-Density Cart Table & Stepper Utilities
   ========================================================================== */
.billing-table {
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    table-layout: fixed;
}

.billing-table th {
    position: sticky;
    top: 0;
    background: var(--bg-surface-secondary);
    z-index: 2;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    color: var(--text-secondary);
    border-bottom: 1.5px solid var(--border-color) !important;
    padding: 0.45rem 0.5rem;
    white-space: nowrap;
}

.billing-table td {
    padding: 0.35rem 0.5rem;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
    line-height: 1.25;
    white-space: nowrap;
}

.billing-row {
    height: 38px;
    transition: background-color 0.1s ease;
}

.billing-table tbody tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.015);
}
[data-bs-theme="dark"] .billing-table tbody tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.02);
}

.billing-row:hover {
    background-color: var(--primary-light, rgba(79, 70, 229, 0.06)) !important;
}

.qty-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    border-radius: 6px;
    height: 26px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.qty-btn {
    background: transparent;
    border: none;
    width: 24px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.7rem;
    padding: 0;
    transition: all 0.12s ease;
}

.qty-btn:hover {
    background: var(--bg-hover, rgba(0, 0, 0, 0.05));
    color: var(--primary);
}

.qty-input {
    width: 44px;
    height: 26px;
    border: none;
    background: transparent;
    text-align: center;
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--text-primary);
    padding: 0 2px;
    -moz-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.qty-input:focus { outline: none; }

.btn-cart-remove {
    width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-muted, #94a3b8);
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: all 0.15s ease;
    cursor: pointer;
}
.btn-cart-remove:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626;
}
[data-bs-theme="dark"] .btn-cart-remove:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.35);
    color: #f87171;
}

/* ==========================================================================
   POS Counter Screen Rigid Layout & Viewport Lock
   Keeps Cart Footer (Total Box & Pay Button) Always Pinned & Touch-Responsive on ANY Screen
   ========================================================================== */
html.pos-screen,
body.pos-viewport-locked,
body:has(.pos-touch-container),
body:has(.pos-terminal-wrapper) {
    overflow: hidden !important;
    height: 100% !important;
    max-height: 100% !important;
    touch-action: manipulation;
    overscroll-behavior: none !important;
}

body.pos-viewport-locked #page-content-wrapper,
body:has(.pos-touch-container) #page-content-wrapper,
body:has(.pos-terminal-wrapper) #page-content-wrapper {
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
}

body.pos-viewport-locked .top-navbar,
body:has(.pos-touch-container) .top-navbar,
body:has(.pos-terminal-wrapper) .top-navbar {
    flex-shrink: 0 !important;
}

body.pos-viewport-locked .main-container,
body:has(.pos-touch-container) .main-container,
body:has(.pos-terminal-wrapper) .main-container {
    padding: 6px 12px 6px 12px !important;
    margin: 0 !important;
    flex: 1 1 0% !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
}

body.pos-viewport-locked footer,
body:has(.pos-touch-container) footer,
body:has(.pos-terminal-wrapper) footer {
    display: none !important;
}

/* 1. Main POS Viewport locked (Takes 100% of available height without overflow) */
.pos-touch-container,
.pos-terminal-wrapper {
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    flex: 1 1 0% !important;
    min-height: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px;
    box-sizing: border-box !important;
}

.touch-header-card,
.scanner-bar-card {
    flex-shrink: 0 !important;
}

/* 2. Main Work Row (Grid Left, Cart Right) - Flex 1 1 0% avoids overflow */
.pos-touch-container > .row,
.pos-touch-main-row,
.pos-terminal-wrapper > .row {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    height: auto !important;
    margin-bottom: 0 !important;
    overflow: hidden !important;
}

.pos-touch-container > .row > [class*="col-"],
.pos-terminal-wrapper > .row > [class*="col-"] {
    height: 100% !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

/* 3. Right Cart Panel as a Rigid Flex Column */
.touch-cart-panel,
.summary-card {
    background: var(--bg-surface, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 14px;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
    position: relative !important;
}

/* 3A. Cart Header (Title, items badge, table header) */
.cart-header-section,
.summary-card > .d-flex > h6,
.touch-cart-table thead {
    flex-shrink: 0 !important;
}
.touch-cart-table thead th {
    position: sticky;
    top: 0;
    background: var(--bg-surface, #ffffff);
    z-index: 5;
}
[data-bs-theme="dark"] .touch-cart-table thead th {
    background: #0f172a !important;
}

/* 3B. Cart Items Body (Scrolls independently within remaining height) */
.touch-cart-items-wrapper,
.billing-table-container {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    height: auto !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
}

/* 3C. Cart Bottom Footer (Total Box + Pay Button) - Permanently Pinned & Fixed */
.pos-cart-footer {
    display: flex !important;
    gap: 10px !important;
    align-items: center !important;
    flex-shrink: 0 !important;
    margin-top: auto !important;
    padding: 10px 0 0 0 !important;
    background: var(--bg-surface, #ffffff) !important;
    border-top: 2px solid var(--border-color, #e2e8f0) !important;
    z-index: 20 !important;
    position: sticky !important;
    bottom: 0 !important;
}
[data-bs-theme="dark"] .pos-cart-footer {
    background: #0f172a !important;
    border-top-color: #334155 !important;
}

#cartTotalBox {
    flex: 1 !important;
    min-width: 0 !important;
    min-height: 52px !important;
    background-color: var(--bg-surface, #ffffff) !important;
    border: 2px solid #2563eb !important;
    border-radius: 12px !important;
    padding: 6px 12px !important;
    display: flex !important;
    align-items: baseline !important;
    justify-content: center !important;
    gap: 6px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    margin: 0 !important;
    user-select: none;
}
[data-bs-theme="dark"] #cartTotalBox {
    background-color: #0f172a !important;
    border-color: #3b82f6 !important;
}

#btnPayCheckout {
    flex: 1.15 !important;
    min-width: 0 !important;
    min-height: 52px !important;
    background-color: #2563eb !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 10px 16px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35) !important;
    opacity: 1 !important;
    margin: 0 !important;
    white-space: nowrap !important;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    touch-action: manipulation;
}
#btnPayCheckout:hover {
    background-color: #1d4ed8 !important;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.45) !important;
    transform: translateY(-1px);
}
#btnPayCheckout:active {
    transform: scale(0.97);
}

/* 4. Left Products Section (Independent Scroll, Zero Viewport Overflow) */
.touch-grid-container,
.billing-card {
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
}

/* Touch Screen / Coarse Pointer Specific Enhancements (24" LCD & Tablets) */
@media (pointer: coarse) {
    .qty-btn {
        width: 36px !important;
        height: 36px !important;
        font-size: 1.05rem !important;
    }
    .btn-touch-category {
        padding: 0.45rem 1rem !important;
        font-size: 0.88rem !important;
    }
    #btnPayCheckout, #cartTotalBox {
        min-height: 54px !important;
    }
}

/* ==========================================================================
   Master Enterprise KPI & Summary Metric Card Design System
   Benchmark: Sales Vouchers Design Standard
   ========================================================================== */

.erp-kpi-card {
    background-color: var(--bg-surface, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    padding: 12px 16px;
    min-height: 92px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-primary, #0f172a);
    text-decoration: none !important;
}

.erp-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    border-color: var(--border-color-strong, #cbd5e1);
}

.erp-kpi-card.erp-kpi-stacked {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    gap: 0.35rem;
}

.erp-kpi-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 0.5rem;
}

.erp-kpi-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 0.5rem;
    margin-top: auto;
}

.erp-kpi-content {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.erp-kpi-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.erp-kpi-card:hover .erp-kpi-icon {
    transform: scale(1.05);
}

.erp-kpi-icon-sm {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    border-radius: 8px;
    font-size: 0.9rem;
}

.erp-kpi-title,
.erp-kpi-label {
    font-size: 0.74rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted, #64748b);
    line-height: 1.25;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.erp-kpi-value {
    font-size: 1.32rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text-primary, #0f172a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.erp-kpi-currency {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0;
    opacity: 0.85;
}

.erp-kpi-subtext {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-muted, #64748b);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.erp-kpi-badge {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 9999px;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
}

.erp-kpi-link {
    color: var(--accent-primary, #0f6cbd) !important;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.72rem;
    transition: opacity 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    line-height: 1.2;
}
.erp-kpi-link:hover {
    text-decoration: underline;
}

.metric-summary-card {
    background-color: var(--bg-surface, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    padding: 12px 16px;
    min-height: 92px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.metric-summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    border-color: var(--border-color-strong, #cbd5e1);
}

.metric-icon-box {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.metric-value {
    font-size: 1.32rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text-primary, #0f172a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.metric-label {
    font-size: 0.74rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted, #64748b);
    line-height: 1.25;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

[data-bs-theme="dark"] .erp-kpi-card,
[data-bs-theme="dark"] .metric-summary-card {
    background-color: var(--bg-surface, #1e293b);
    border-color: var(--border-color, rgba(255, 255, 255, 0.08));
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

[data-bs-theme="dark"] .erp-kpi-card:hover,
[data-bs-theme="dark"] .metric-summary-card:hover {
    border-color: var(--border-color-strong, rgba(255, 255, 255, 0.18));
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .erp-kpi-value,
[data-bs-theme="dark"] .metric-value {
    color: #f8fafc;
}

[data-bs-theme="dark"] .erp-kpi-title,
[data-bs-theme="dark"] .erp-kpi-label,
[data-bs-theme="dark"] .metric-label,
[data-bs-theme="dark"] .erp-kpi-subtext {
    color: #94a3b8;
}

/* ==========================================================================
   Ubuntu Theme System Architecture when Ubuntu Menu is Selected
   html[data-menu-style="ubuntu"]
   Clean GNOME / POS Terminal Neutral Slate & Canonical Orange Theme
   Background: #242424 (Standard POS Terminal Canvas)
   Surfaces: #2e2e2e (Standard POS Terminal Surface)
   ========================================================================== */
html[data-menu-style="ubuntu"],
html[data-menu-style="ubuntu"] body {
    background-color: #242424 !important;
    background: #242424 !important;
    color: #f6f6f6 !important;
    font-family: "Ubuntu", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;

    /* Semantic Token Overrides (Matched directly to POS Terminal) */
    --bg-app: #242424 !important;
    --bg-body: #242424 !important;
    --bg-surface: #2e2e2e !important;
    --bg-surface-secondary: #353535 !important;
    --bg-surface-tertiary: #3e3e3e !important;
    --bg-card: #2e2e2e !important;
    --card-bg: #2e2e2e !important;
    --navbar-bg: #1e1e1e !important;
    --navbar-border: #333333 !important;
    --border-color: rgba(255, 255, 255, 0.12) !important;
    --border-color-strong: rgba(255, 255, 255, 0.22) !important;

    /* Typography & Contrast */
    --text-primary: #f6f6f6 !important;
    --text-secondary: #dfdfdf !important;
    --text-muted: #a4a4a4 !important;
    --text-disabled: #6c6c6c !important;

    /* Canonical Orange Accents */
    --primary: #e95420 !important;
    --primary-hover: #d34516 !important;
    --primary-active: #b7390f !important;
    --primary-light: rgba(233, 84, 32, 0.16) !important;
    --primary-border: rgba(233, 84, 32, 0.35) !important;
    --primary-glow: rgba(233, 84, 32, 0.35) !important;
    --primary-gradient: linear-gradient(135deg, #e95420 0%, #77216f 100%) !important;

    --accent-primary: #e95420 !important;
    --accent-hover: #d34516 !important;
    --accent-subtle: rgba(233, 84, 32, 0.18) !important;
}

/* 1. Ubuntu Top Panel Navbar (Clean POS Terminal Header with Integrated Brand) */
html[data-menu-style="ubuntu"] .top-navbar {
    background: #1e1e1e !important;
    border-bottom: 1px solid #333333 !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
    color: #ffffff !important;
    padding: 0 1rem !important;
}
html[data-menu-style="ubuntu"] .top-navbar h5,
html[data-menu-style="ubuntu"] .top-navbar h6,
html[data-menu-style="ubuntu"] .top-navbar .text-dark {
    color: #ffffff !important;
}
html[data-menu-style="ubuntu"] .top-navbar .text-muted {
    color: #a4a4a4 !important;
}

/* Ubuntu Brand Header in Top Navbar */
.ubuntu-brand-header {
    user-select: none;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease;
}
.ubuntu-brand-header:hover {
    opacity: 0.95;
}
.ubuntu-brand-header:active {
    transform: scale(0.97);
}
.ubuntu-top-emblem {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: rgba(233, 84, 32, 0.2);
    border: 1.5px solid #e95420;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 0 10px rgba(233, 84, 32, 0.35);
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.ubuntu-brand-header:hover .ubuntu-top-emblem,
.ubuntu-top-emblem:hover {
    background: #e95420 !important;
    border-color: #ff7844 !important;
    box-shadow: 0 0 16px rgba(233, 84, 32, 0.75), 0 0 4px rgba(255, 255, 255, 0.5) !important;
    transform: scale(1.08);
}
.ubuntu-brand-header:hover .ubuntu-top-emblem i,
.ubuntu-top-emblem:hover i {
    color: #ffffff !important;
}
.ubuntu-brand-header:active .ubuntu-top-emblem,
.ubuntu-top-emblem:active {
    transform: scale(0.95);
}
.text-ubuntu-orange {
    color: #e95420 !important;
}
.badge-ubuntu-numbat {
    background: #e95420 !important;
    color: #ffffff !important;
    font-size: 0.65rem !important;
    padding: 0.15rem 0.45rem !important;
    border-radius: 6px !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em !important;
}

/* Maximize Workspace Width in Ubuntu Mode */
html[data-menu-style="ubuntu"] .main-container {
    padding: 0.75rem 1rem !important;
}

/* 2. Cards & Containers (Zero White Cards - Clean POS Terminal Surface #2e2e2e) */
html[data-menu-style="ubuntu"] .card,
html[data-menu-style="ubuntu"] .pos-card,
html[data-menu-style="ubuntu"] .modern-white-card,
html[data-menu-style="ubuntu"] .erp-kpi-card,
html[data-menu-style="ubuntu"] .metric-summary-card,
html[data-menu-style="ubuntu"] .vault-card,
html[data-menu-style="ubuntu"] .bg-white,
html[data-menu-style="ubuntu"] .bg-light,
html[data-menu-style="ubuntu"] .filter-card,
html[data-menu-style="ubuntu"] .data-card,
html[data-menu-style="ubuntu"] .table-card,
html[data-menu-style="ubuntu"] .card-custom,
html[data-menu-style="ubuntu"] [style*="background: #fff"],
html[data-menu-style="ubuntu"] [style*="background-color: #fff"],
html[data-menu-style="ubuntu"] [style*="background: #f8fafc"],
html[data-menu-style="ubuntu"] [style*="background-color: #f8fafc"],
html[data-menu-style="ubuntu"] [style*="background: #f1f5f9"],
html[data-menu-style="ubuntu"] [style*="background-color: #f1f5f9"],
html[data-menu-style="ubuntu"] [style*="background: #ffffff"],
html[data-menu-style="ubuntu"] [style*="background-color: #ffffff"] {
    background-color: #2e2e2e !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #f6f6f6 !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3) !important;
}
html[data-menu-style="ubuntu"] [style*="color: #0f172a"],
html[data-menu-style="ubuntu"] [style*="color: #1e293b"],
html[data-menu-style="ubuntu"] [style*="color: #334155"],
html[data-menu-style="ubuntu"] [style*="color: #000"] {
    color: #ffffff !important;
}
html[data-menu-style="ubuntu"] .card-header,
html[data-menu-style="ubuntu"] .card-footer,
html[data-menu-style="ubuntu"] .vault-header {
    background: #252525 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}
html[data-menu-style="ubuntu"] .card:hover,
html[data-menu-style="ubuntu"] .pos-card:hover,
html[data-menu-style="ubuntu"] .erp-kpi-card:hover,
html[data-menu-style="ubuntu"] .modern-white-card:hover {
    border-color: rgba(233, 84, 32, 0.5) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45) !important;
}

/* 3. Typography & Headings */
html[data-menu-style="ubuntu"] h1,
html[data-menu-style="ubuntu"] h2,
html[data-menu-style="ubuntu"] h3,
html[data-menu-style="ubuntu"] h4,
html[data-menu-style="ubuntu"] h5,
html[data-menu-style="ubuntu"] h6,
html[data-menu-style="ubuntu"] .text-dark,
html[data-menu-style="ubuntu"] .card-title,
html[data-menu-style="ubuntu"] .erp-kpi-value,
html[data-menu-style="ubuntu"] .erp-kpi-title,
html[data-menu-style="ubuntu"] .modal-title {
    color: #ffffff !important;
}
html[data-menu-style="ubuntu"] .text-muted,
html[data-menu-style="ubuntu"] .erp-kpi-subtext,
html[data-menu-style="ubuntu"] .erp-kpi-label,
html[data-menu-style="ubuntu"] .metric-label {
    color: #a4a4a4 !important;
}

/* 4. Tables (DataTables, Regular Tables, Recent Invoices) with Visible High-Contrast Hover */
html[data-menu-style="ubuntu"] .table,
html[data-menu-style="ubuntu"] table.dataTable,
html[data-menu-style="ubuntu"] .table-responsive {
    color: #f6f6f6 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    background-color: transparent !important;
}
html[data-menu-style="ubuntu"] .table thead th,
html[data-menu-style="ubuntu"] table.dataTable thead th {
    background: #1e1e1e !important;
    color: #ffffff !important;
    border-bottom: 2px solid #e95420 !important;
    border-top: none !important;
}
html[data-menu-style="ubuntu"] .table tbody tr,
html[data-menu-style="ubuntu"] table.dataTable tbody tr,
html[data-menu-style="ubuntu"] .table tbody tr td,
html[data-menu-style="ubuntu"] table.dataTable tbody tr td {
    background-color: #2e2e2e !important;
    color: #f6f6f6 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}
html[data-menu-style="ubuntu"] .table-striped > tbody > tr:nth-of-type(odd) > *,
html[data-menu-style="ubuntu"] table.dataTable.table-striped > tbody > tr.odd > * {
    background-color: #333333 !important;
    color: #ffffff !important;
}

/* ULTRA-VISIBLE HIGH CONTRAST HOVER FOR ALL TABLES & RECENT TRANSACTIONS */
html[data-menu-style="ubuntu"] .table tbody tr:hover,
html[data-menu-style="ubuntu"] .table tbody tr:hover td,
html[data-menu-style="ubuntu"] table.dataTable tbody tr:hover,
html[data-menu-style="ubuntu"] table.dataTable tbody tr:hover td,
html[data-menu-style="ubuntu"] .table-hover > tbody > tr:hover > * {
    background-color: #3d3d3d !important;
    background: #3d3d3d !important;
    color: #ffffff !important;
}
html[data-menu-style="ubuntu"] .table tbody tr:hover td a,
html[data-menu-style="ubuntu"] .table tbody tr:hover td .fw-bold,
html[data-menu-style="ubuntu"] .table tbody tr:hover td .text-dark,
html[data-menu-style="ubuntu"] table.dataTable tbody tr:hover td a {
    color: #ff8559 !important;
}
html[data-menu-style="ubuntu"] .table tbody tr:hover td .text-muted,
html[data-menu-style="ubuntu"] .table tbody tr:hover td span {
    color: #e5e5e5 !important;
}

html[data-menu-style="ubuntu"] .table-light,
html[data-menu-style="ubuntu"] .table-light > th,
html[data-menu-style="ubuntu"] .table-light > td {
    background-color: #353535 !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}
html[data-menu-style="ubuntu"] .dataTables_wrapper {
    color: #f6f6f6 !important;
}
html[data-menu-style="ubuntu"] .dataTables_info,
html[data-menu-style="ubuntu"] .dataTables_length,
html[data-menu-style="ubuntu"] .dataTables_filter {
    color: #a4a4a4 !important;
}

/* 5. Inputs, Selects & Search Fields */
html[data-menu-style="ubuntu"] .form-control,
html[data-menu-style="ubuntu"] .form-select,
html[data-menu-style="ubuntu"] .input-group-text,
html[data-menu-style="ubuntu"] input[type="text"],
html[data-menu-style="ubuntu"] input[type="number"],
html[data-menu-style="ubuntu"] input[type="search"],
html[data-menu-style="ubuntu"] input[type="date"],
html[data-menu-style="ubuntu"] input[type="password"],
html[data-menu-style="ubuntu"] select,
html[data-menu-style="ubuntu"] textarea {
    background-color: #1e1e1e !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    color: #ffffff !important;
}
html[data-menu-style="ubuntu"] .form-control:focus,
html[data-menu-style="ubuntu"] .form-select:focus,
html[data-menu-style="ubuntu"] input:focus,
html[data-menu-style="ubuntu"] select:focus,
html[data-menu-style="ubuntu"] textarea:focus,
html[data-menu-style="ubuntu"] input:focus-visible,
html[data-menu-style="ubuntu"] select:focus-visible {
    background-color: #181818 !important;
    border-color: #e95420 !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(233, 84, 32, 0.3) !important;
    outline: 2px solid #e95420 !important;
}
html[data-menu-style="ubuntu"] .form-control::placeholder,
html[data-menu-style="ubuntu"] input::placeholder {
    color: rgba(255, 255, 255, 0.4) !important;
}
html[data-menu-style="ubuntu"] .form-label {
    color: #dfdfdf !important;
    font-weight: 500;
}

/* 6. Buttons */
html[data-menu-style="ubuntu"] .btn-primary,
html[data-menu-style="ubuntu"] .btn-pos-primary,
html[data-menu-style="ubuntu"] .btn-save,
html[data-menu-style="ubuntu"] .btn-save-master {
    background: linear-gradient(135deg, #e95420 0%, #c33b0e 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(233, 84, 32, 0.4) !important;
}
html[data-menu-style="ubuntu"] .btn-primary:hover,
html[data-menu-style="ubuntu"] .btn-pos-primary:hover,
html[data-menu-style="ubuntu"] .btn-save:hover,
html[data-menu-style="ubuntu"] .btn-save-master:hover {
    background: linear-gradient(135deg, #f0612d 0%, #d34516 100%) !important;
    border-color: #b7390f !important;
    box-shadow: 0 6px 18px rgba(233, 84, 32, 0.55) !important;
    transform: translateY(-1px);
}
html[data-menu-style="ubuntu"] .btn-light,
html[data-menu-style="ubuntu"] .btn-outline-secondary,
html[data-menu-style="ubuntu"] .btn-secondary {
    background: #353535 !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
}
html[data-menu-style="ubuntu"] .btn-light:hover,
html[data-menu-style="ubuntu"] .btn-outline-secondary:hover,
html[data-menu-style="ubuntu"] .btn-secondary:hover {
    background: #424242 !important;
    border-color: #e95420 !important;
    color: #ffffff !important;
}

/* 7. Badges & Indicators */
html[data-menu-style="ubuntu"] .badge.bg-primary,
html[data-menu-style="ubuntu"] .badge-primary {
    background-color: #e95420 !important;
    color: #ffffff !important;
}
html[data-menu-style="ubuntu"] .bg-primary-subtle,
html[data-menu-style="ubuntu"] .badge.bg-primary-subtle {
    background-color: rgba(233, 84, 32, 0.18) !important;
    color: #ff8559 !important;
    border: 1px solid rgba(233, 84, 32, 0.35) !important;
}
html[data-menu-style="ubuntu"] .badge.bg-light {
    background: #353535 !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}
html[data-menu-style="ubuntu"] .text-primary {
    color: #ff8559 !important;
}

/* 8. Pagination */
html[data-menu-style="ubuntu"] .pagination .page-item.active .page-link {
    background: #e95420 !important;
    border-color: #e95420 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(233, 84, 32, 0.5) !important;
}
html[data-menu-style="ubuntu"] .pagination .page-link {
    background: #2e2e2e !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #ff8559 !important;
}
html[data-menu-style="ubuntu"] .pagination .page-link:hover {
    background: #3d3d3d !important;
    color: #ffffff !important;
}

/* 9. Modals, Offcanvas & Dropdowns */
html[data-menu-style="ubuntu"] .modal-content,
html[data-menu-style="ubuntu"] .dropdown-menu,
html[data-menu-style="ubuntu"] .offcanvas {
    background: #2e2e2e !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    color: #ffffff !important;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6) !important;
}
html[data-menu-style="ubuntu"] .dropdown-item {
    color: #f1f1f1 !important;
}
html[data-menu-style="ubuntu"] .dropdown-item:hover,
html[data-menu-style="ubuntu"] .dropdown-item:focus {
    background-color: #e95420 !important;
    color: #ffffff !important;
}
html[data-menu-style="ubuntu"] .dropdown-divider {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* 10. Nav Tabs & Breadcrumbs */
html[data-menu-style="ubuntu"] .nav-tabs {
    border-bottom-color: rgba(255, 255, 255, 0.15) !important;
}
html[data-menu-style="ubuntu"] .nav-tabs .nav-link.active,
html[data-menu-style="ubuntu"] .nav-pills .nav-link.active {
    background-color: #e95420 !important;
    border-color: #e95420 !important;
    color: #ffffff !important;
}
html[data-menu-style="ubuntu"] .nav-tabs .nav-link {
    color: #a4a4a4 !important;
}
html[data-menu-style="ubuntu"] .breadcrumb-item,
html[data-menu-style="ubuntu"] .breadcrumb-item a {
    color: #a4a4a4 !important;
}
html[data-menu-style="ubuntu"] .breadcrumb-item.active {
    color: #ff8559 !important;
}

/* 11. POS Terminal Components */
html[data-menu-style="ubuntu"] .pos-terminal-wrapper,
html[data-menu-style="ubuntu"] .pos-touch-container,
html[data-menu-style="ubuntu"] .pos-cart-panel,
html[data-menu-style="ubuntu"] .pos-products-panel,
html[data-menu-style="ubuntu"] .pos-numpad-panel,
html[data-menu-style="ubuntu"] .pos-summary-card {
    background: #2e2e2e !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
}

/* 12. Alert Boxes */
html[data-menu-style="ubuntu"] .alert-info {
    background: rgba(14, 116, 144, 0.3) !important;
    border-color: rgba(6, 182, 212, 0.4) !important;
    color: #cffafe !important;
}
html[data-menu-style="ubuntu"] .alert-success {
    background: rgba(21, 128, 61, 0.3) !important;
    border-color: rgba(34, 197, 94, 0.4) !important;
    color: #dcfce7 !important;
}
html[data-menu-style="ubuntu"] .alert-warning {
    background: rgba(180, 83, 9, 0.3) !important;
    border-color: rgba(245, 158, 11, 0.4) !important;
    color: #fef3c7 !important;
}
html[data-menu-style="ubuntu"] .alert-danger {
    background: rgba(185, 28, 28, 0.3) !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
    color: #fee2e2 !important;
}

/* ==========================================================================
   Ubuntu 24.04 (Noble Numbat) Global AI Integration & SweetAlert2 Theme Engine
   Theme Colors:
   - Primary Accent: #E95420 (Canonical Orange)
   - Secondary Accent: #77216F (Canonical Aubergine)
   - Dark Slate Surface: #242424 / #2e2e2e
   ========================================================================== */
body:has(.ubuntu-ai-page-container),
html:has(.ubuntu-ai-page-container),
body:has(.ai-stats-container),
html:has(.ai-stats-container) {
    background-color: #242424 !important;
    background: #242424 !important;
    color: #f6f6f6 !important;
    font-family: "Ubuntu", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

body:has(.ubuntu-ai-page-container) #page-content-wrapper,
body:has(.ai-stats-container) #page-content-wrapper,
body:has(.ubuntu-ai-page-container) .main-container,
body:has(.ai-stats-container) .main-container {
    background-color: #242424 !important;
    background: #242424 !important;
}

/* SweetAlert2 Ubuntu Theme Override */
.swal2-container.swal2-backdrop-show {
    background: rgba(15, 10, 15, 0.78) !important;
    backdrop-filter: blur(5px);
}
.swal2-popup,
.ubuntu-swal-popup {
    background: #242424 !important;
    background-color: #242424 !important;
    color: #f6f6f6 !important;
    border: 1.5px solid rgba(233, 84, 32, 0.45) !important;
    border-top: 4px solid #E95420 !important;
    border-radius: 16px !important;
    font-family: "Ubuntu", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.8), 0 0 25px rgba(233, 84, 32, 0.25) !important;
}
.swal2-title {
    color: #ffffff !important;
    font-family: "Ubuntu", sans-serif !important;
    font-weight: 700 !important;
}
.swal2-html-container {
    color: #e5e5e5 !important;
    font-family: "Ubuntu", sans-serif !important;
}
.swal2-icon.swal2-info {
    border-color: #E95420 !important;
    color: #E95420 !important;
}
.swal2-icon.swal2-warning {
    border-color: #E95420 !important;
    color: #ff8559 !important;
}
.swal2-icon.swal2-success {
    border-color: #10B981 !important;
    color: #10B981 !important;
}
.swal2-icon.swal2-error {
    border-color: #EF4444 !important;
    color: #EF4444 !important;
}
.swal2-styled.swal2-confirm {
    background: linear-gradient(135deg, #E95420 0%, #C33B0E 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 9px !important;
    font-family: "Ubuntu", sans-serif !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 14px rgba(233, 84, 32, 0.45) !important;
    padding: 0.6rem 1.6rem !important;
}
.swal2-styled.swal2-confirm:hover {
    background: linear-gradient(135deg, #FF6F3D 0%, #E95420 100%) !important;
    box-shadow: 0 6px 20px rgba(233, 84, 32, 0.65) !important;
}
.swal2-styled.swal2-cancel {
    background: #1e1e1e !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 9px !important;
    font-family: "Ubuntu", sans-serif !important;
}





