/**
 * ═══════════════════════════════════════════════════════════════════════════
 * DARAJAERP v8.2 - ENTERPRISE POS SYSTEM
 * Modern, Clean, Professional Point of Sale Interface
 * 
 * Design Philosophy: Clarity, Speed, Confidence
 * - High contrast for visibility
 * - Large touch targets
 * - Clear visual hierarchy
 * - Professional color palette
 * 
 * @author BlueBridge Group - Connect, Control, Grow
 * @version 8.2.0
 * ═══════════════════════════════════════════════════════════════════════════
 */

/* ============================================
   DESIGN TOKENS - Enterprise Color System
   ============================================ */
:root {
    /* Primary Accent (Sky) */
    --pos-primary-50: #E0F2FF;
    --pos-primary-100: #BAE6FD;
    --pos-primary-200: #7DD3FC;
    --pos-primary-500: #38BDF8;
    --pos-primary-600: #0EA5E9;
    --pos-primary-700: #0284C7;
    --pos-primary-800: #0369A1;
    --pos-primary-900: #0B4F7C;
    --pos-primary-950: #062C43;
    
    /* Success / Primary CTA (Mint) */
    --pos-success-50: #ECFDF3;
    --pos-success-100: #D1FAE3;
    --pos-success-500: #34D399;
    --pos-success-600: #10B981;
    --pos-success-700: #0F9A6B;
    
    /* Danger - Alert Red */
    --pos-danger-50: #FEF2F2;
    --pos-danger-100: #FEE2E2;
    --pos-danger-500: #F87171;
    --pos-danger-600: #EF4444;
    
    /* Warning - Caution Amber */
    --pos-warning-50: #FFFBEB;
    --pos-warning-500: #F59E0B;
    --pos-warning-600: #D97706;
    
    /* Neutral Slate (Dark Shell) */
    --pos-slate-50: #F8FAFC;
    --pos-slate-100: #E2E8F0;
    --pos-slate-200: #CBD5E1;
    --pos-slate-300: #94A3B8;
    --pos-slate-400: #8694AB;
    --pos-slate-500: #94A3B8;
    --pos-slate-600: #64748B;
    --pos-slate-700: #475569;
    --pos-slate-800: #1F2937;
    --pos-slate-900: #0F172A;
    
    /* Shell Surfaces */
    --pos-shell-bg: #f5f7fb;
    --pos-surface-1: #ffffff;
    --pos-surface-2: #f1f5f9;
    --pos-stroke: rgba(15, 23, 42, 0.08);
    --pos-divider: rgba(15, 23, 42, 0.06);
    --pos-glow: 0 12px 32px rgba(15, 23, 42, 0.12);
    --pos-soft-shadow: 0 6px 18px rgba(15, 23, 42, 0.14);
    
    /* Type */
    --pos-text-strong: #0f172a;
    --pos-text-muted: #475569;
    --pos-header-text: #ffffff;
    --pos-header-gradient: linear-gradient(145deg, rgba(17, 24, 39, 0.96) 0%, rgba(11, 18, 32, 0.96) 70%, rgba(11, 18, 32, 0.9) 100%);
    --pos-header-border: rgba(255, 255, 255, 0.08);
    --pos-header-accent: linear-gradient(135deg, #38BDF8 0%, #34D399 100%);
    --pos-header-accent-text: #ffffff;
    
    /* Border Radius */
    --pos-radius-sm: 8px;
    --pos-radius-md: 10px;
    --pos-radius-lg: 12px;
    --pos-radius-xl: 16px;
    --pos-radius-2xl: 20px;
}

/* Theme overrides: dark mode */
body.pos-theme-dark {
    --pos-shell-bg: #0f172a;
    --pos-surface-1: #111827;
    --pos-surface-2: #0b1220;
    --pos-stroke: rgba(255, 255, 255, 0.08);
    --pos-divider: rgba(255, 255, 255, 0.05);
    --pos-glow: 0 12px 40px rgba(0, 0, 0, 0.35);
    --pos-soft-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    --pos-text-strong: #e5e7eb;
    --pos-text-muted: #94a3b8;
    --pos-header-text: #ffffff;
}

/* Explicit light theme mapping */
body.pos-theme-light {
    --pos-shell-bg: #f5f7fb;
    --pos-surface-1: #ffffff;
    --pos-surface-2: #f1f5f9;
    --pos-stroke: rgba(15, 23, 42, 0.08);
    --pos-divider: rgba(15, 23, 42, 0.06);
    --pos-glow: 0 12px 32px rgba(15, 23, 42, 0.12);
    --pos-soft-shadow: 0 6px 18px rgba(15, 23, 42, 0.14);
    --pos-text-strong: #0f172a;
    --pos-text-muted: #475569;
    --pos-header-text: #0f172a;
    --pos-header-gradient: linear-gradient(135deg, #ffffff 0%, #eef2f8 100%);
    --pos-header-border: rgba(15, 23, 42, 0.12);
    --pos-header-accent: linear-gradient(135deg, #38BDF8 0%, #22D3EE 100%);
    --pos-header-accent-text: #0f172a;
}

/* POS Business Theme Skins */
body.pos-skin-retail {
    --pos-header-gradient: linear-gradient(135deg, #0f172a 0%, #1e3a8a 55%, #0ea5e9 100%);
    --pos-header-border: rgba(56, 189, 248, 0.35);
    --pos-header-accent: linear-gradient(135deg, #38BDF8 0%, #22D3EE 100%);
    --pos-header-accent-text: #0f172a;
}

body.pos-skin-health {
    --pos-primary-50: #ECFDF3;
    --pos-primary-100: #D1FAE3;
    --pos-primary-200: #A7F3D0;
    --pos-primary-500: #22C55E;
    --pos-primary-600: #16A34A;
    --pos-primary-700: #15803D;
    --pos-primary-800: #166534;
    --pos-primary-900: #14532D;
    --pos-primary-950: #052E16;
    --pos-header-gradient: linear-gradient(135deg, #052E16 0%, #14532D 55%, #22C55E 100%);
    --pos-header-border: rgba(34, 197, 94, 0.35);
    --pos-header-accent: linear-gradient(135deg, #22C55E 0%, #34D399 100%);
    --pos-header-accent-text: #052E16;
}

body.pos-skin-hospitality {
    --pos-primary-50: #FFF7ED;
    --pos-primary-100: #FFEDD5;
    --pos-primary-200: #FED7AA;
    --pos-primary-500: #F97316;
    --pos-primary-600: #EA580C;
    --pos-primary-700: #C2410C;
    --pos-primary-800: #9A3412;
    --pos-primary-900: #7C2D12;
    --pos-primary-950: #431407;
    --pos-header-gradient: linear-gradient(135deg, #431407 0%, #7C2D12 55%, #F97316 100%);
    --pos-header-border: rgba(249, 115, 22, 0.35);
    --pos-header-accent: linear-gradient(135deg, #F59E0B 0%, #F97316 100%);
    --pos-header-accent-text: #3B1B07;
}

body.pos-skin-industrial {
    --pos-primary-50: #EEF2FF;
    --pos-primary-100: #E0E7FF;
    --pos-primary-200: #C7D2FE;
    --pos-primary-500: #6366F1;
    --pos-primary-600: #4F46E5;
    --pos-primary-700: #4338CA;
    --pos-primary-800: #3730A3;
    --pos-primary-900: #312E81;
    --pos-primary-950: #1E1B4B;
    --pos-header-gradient: linear-gradient(135deg, #0F172A 0%, #312E81 55%, #6366F1 100%);
    --pos-header-border: rgba(99, 102, 241, 0.35);
    --pos-header-accent: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    --pos-header-accent-text: #0F172A;
}

/* ============================================
   GLOBAL SHELL - Theme-aware background
   ============================================ */
body.lockscreen,
body.hold-transition.lockscreen {
    color: var(--pos-text-strong) !important;
    overflow-x: hidden;
    font-family: 'Manrope', 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 15px;
}

body.lockscreen.pos-theme-light,
body.hold-transition.lockscreen.pos-theme-light {
    background: radial-gradient(circle at 10% 10%, rgba(var(--color-primary-rgb), 0.18), transparent 30%), radial-gradient(circle at 90% 12%, rgba(var(--color-secondary-rgb), 0.14), transparent 30%), linear-gradient(160deg, var(--pos-shell-bg) 0%, rgba(var(--color-surface-rgb), 0.96) 55%, var(--pos-shell-bg) 100%) !important;
    background-color: var(--pos-shell-bg) !important;
}

body.lockscreen.pos-theme-dark,
body.hold-transition.lockscreen.pos-theme-dark {
    background: radial-gradient(circle at 10% 10%, rgba(var(--color-primary-rgb), 0.12), transparent 26%), radial-gradient(circle at 90% 8%, rgba(var(--color-secondary-rgb), 0.12), transparent 26%), linear-gradient(160deg, #0f172a 0%, #111827 55%, #0f172a 100%) !important;
    background-color: var(--pos-shell-bg) !important;
}

/* Ensure light surfaces on light theme */
body.pos-theme-light .pos-header > .tw-flex,
body.pos-theme-light .pos-header > div {
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08) !important;
}

body.lockscreen main,
body.lockscreen .tw-flex.thetop main,
body.lockscreen main.tw-bg-gray-100,
.lockscreen main,
body.lockscreen #scrollable-container,
.lockscreen #scrollable-container,
body.lockscreen .thetop,
.lockscreen .thetop,
body.lockscreen .content,
.lockscreen .content-wrapper,
.pos-content,
.sale_pos .content.no-print,
section.content.no-print {
    background: transparent !important;
    color: var(--pos-text-strong) !important;
}

.sale_pos .content.no-print,
section.content.no-print {
    padding: 0 !important;
}

body.lockscreen .tw-bg-gray-100,
body.lockscreen [class*="tw-bg-gray"],
body.lockscreen [class*="tw-bg-blue"] {
    background: transparent !important;
}

/* ============================================
   BASE LAYOUT - Full Height POS Interface
   ============================================ */

/* Override ALL possible backgrounds on body */
body.lockscreen,
body.hold-transition.lockscreen {
    background: radial-gradient(circle at 10% 10%, rgba(var(--color-primary-rgb), 0.18), transparent 30%), radial-gradient(circle at 90% 12%, rgba(var(--color-secondary-rgb), 0.14), transparent 30%), linear-gradient(160deg, var(--pos-shell-bg) 0%, rgba(var(--color-surface-rgb), 0.96) 55%, var(--pos-shell-bg) 100%) !important;
    background-color: var(--pos-shell-bg) !important;
    overflow-x: hidden;
}

/* Override main tag backgrounds - CRITICAL for POS visibility */
body.lockscreen main,
body.lockscreen .tw-flex.thetop main,
body.lockscreen main.tw-bg-gray-100,
.lockscreen main {
    background: transparent !important;
    color: var(--pos-text-strong) !important;
}

/* Override scrollable container - main content area */
body.lockscreen #scrollable-container,
.lockscreen #scrollable-container {
    background: transparent !important;
}

/* Override thetop flex container */
body.lockscreen .thetop,
.lockscreen .thetop {
    background: transparent !important;
}

body.lockscreen .content,
.lockscreen .content-wrapper,
.pos-content {
    background: transparent !important;
    min-height: 100vh !important;
    padding-bottom: 120px !important;
}

/* Main POS Container */
.sale_pos .content.no-print,
section.content.no-print {
    background: transparent !important;
    padding: 0 !important;
}

/* Override any Tailwind gray backgrounds in POS */
body.lockscreen .tw-bg-gray-100,
body.lockscreen [class*="tw-bg-gray"],
body.lockscreen [class*="tw-bg-blue"] {
    background: transparent !important;
    background-color: transparent !important;
}

/* CRITICAL: Ensure drawer overlays don't block the interface by default */
.tw-dw-drawer-overlay,
.overlay-category,
.overlay-brand {
    pointer-events: none;
    opacity: 0;
    z-index: -1;
    background: rgba(15, 23, 42, 0.45) !important;
    transition: opacity 0.2s ease;
}

/* Only when checkbox is checked, show the overlay */
.tw-dw-drawer-toggle:checked ~ .tw-dw-drawer-side > .tw-dw-drawer-overlay {
    pointer-events: auto;
    opacity: 1;
    z-index: 3500;
}

/* ============================================
   POS HEADER - Professional Dark Header (Sticky)
   ============================================ */
.pos-header {
    margin: 0 !important;
    padding: 0 !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    background: transparent !important;
}

.pos-header > .tw-flex,
.pos-header > div {
    background: var(--pos-header-gradient) !important;
    border-radius: 14px !important;
    margin: 8px 10px 6px !important;
    padding: 10px 14px !important;
    box-shadow: var(--pos-glow) !important;
    border: 1px solid var(--pos-header-border) !important;
}

.pos-header-shell {
    gap: 8px !important;
}

.pos-header-main {
    min-width: 0;
}

.pos-header-toolbar {
    gap: 8px !important;
}

.pos-theme-light .pos-header > .tw-flex,
.pos-theme-light .pos-header > div {
    background: var(--pos-header-gradient) !important;
    color: var(--pos-text-strong) !important;
}

/* Location Badge */
.pos-header .location-badge,
.pos-header [class*="tw-bg-white/10"] {
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid var(--pos-stroke) !important;
    border-radius: 10px !important;
    padding: 8px 12px !important;
}

/* Business Type Badge */
.pos-business-badge {
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 10px !important;
    padding: 8px 12px !important;
    color: var(--pos-header-text) !important;
    backdrop-filter: blur(10px) !important;
    text-transform: none !important;
}

.pos-business-badge i {
    font-size: 14px !important;
    opacity: 0.9 !important;
}

.pos-business-branches {
    background: rgba(0, 0, 0, 0.2) !important;
    color: #ffffff !important;
    border-radius: 999px !important;
    padding: 2px 8px !important;
    font-weight: 600 !important;
}

.pos-logo-badge {
    background: rgba(255, 255, 255, 0.92) !important;
    border: 1px solid rgba(255, 255, 255, 0.65) !important;
    padding: 4px 8px !important;
    border-radius: 10px !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18) !important;
}

.pos-header-logo {
    height: 30px !important;
    width: auto !important;
    display: block !important;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.18)) !important;
}

/* Date Time Badge - Accent Color */
.pos-header .datetime-badge,
.curr_datetime {
    background: var(--pos-header-accent) !important;
    color: var(--pos-header-accent-text) !important;
    font-weight: 600 !important;
    padding: 8px 14px !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 14px rgba(var(--color-primary-rgb), 0.24) !important;
}

/* Header Text */
.pos-header,
.pos-header span,
.pos-header label,
.pos-header .tw-text-white {
    color: var(--pos-header-text) !important;
}

.pos-header select,
.pos-header .form-control {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid var(--pos-stroke) !important;
    color: var(--pos-header-text) !important;
    font-weight: 600 !important;
}

/* Location Selector - Full Width Display */
#select_location_id {
    background: transparent !important;
    border: none !important;
    color: #FFFFFF !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    min-width: 190px !important;
    max-width: none !important;
    width: 100% !important;
    padding: 6px 28px 6px 8px !important;
    cursor: pointer !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23FFFFFF' d='M6 8L1 3h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    background-size: 12px !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
    height: auto !important;
    line-height: 1.4 !important;
}

#select_location_id:focus {
    outline: none !important;
    box-shadow: none !important;
}

.pos-header select option,
#select_location_id option {
    background: #1E3A5F !important;
    color: #FFFFFF !important;
    padding: 12px !important;
    font-weight: 500 !important;
}

/* Location Selector Wrapper */
.location-selector-wrapper {
    min-width: 190px;
    max-width: 320px;
    width: auto;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.pos-header-location {
    min-height: 42px;
}

/* Header Action Buttons */
.pos-header-btn,
.pos-header .btn-action {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 10px !important;
    color: #FFFFFF !important;
    padding: 8px 12px !important;
    font-weight: 500 !important;
    font-size: 13px !important;
    min-height: 38px !important;
    transition: all 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    text-decoration: none !important;
}

.pos-header-btn:hover,
.pos-header .btn-action:hover {
    background: rgba(255, 255, 255, 0.18) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    transform: translateY(-1px) !important;
    color: #FFFFFF !important;
    text-decoration: none !important;
}

.pos-header-btn i {
    font-size: 14px !important;
    opacity: 0.9 !important;
}

.pos-header-actions {
    gap: 10px !important;
    align-items: center !important;
}

.pos-header-mobile-toggle {
    display: none !important;
}

.pos-header-action-group {
    display: inline-flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    padding: 4px !important;
    border-radius: 14px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.pos-header-action-group--primary {
    background: rgba(255, 255, 255, 0.12) !important;
}

.pos-header-btn--label {
    padding-inline: 14px !important;
}

/* Danger Button (Close Register) */
.pos-header .btn-danger-outline {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
}

.pos-header .btn-danger-outline:hover {
    background: rgba(239, 68, 68, 0.25) !important;
}

/* Success Button (Register Details) */
.pos-header .btn-success-outline {
    background: rgba(16, 185, 129, 0.15) !important;
    border-color: rgba(16, 185, 129, 0.4) !important;
}

/* ============================================
   MAIN POS CARD - Clean White Container
   ============================================ */
.sale_pos .tw-rounded-2xl.tw-bg-white,
.sale_pos .tw-rounded-2xl,
.sale_pos .tw-shadow-\[rgba\(17\,_17\,_26\,_0\.1\)_0px_0px_16px\],
.pos-main-card,
.lockscreen .tw-rounded-2xl.tw-bg-white,
.lockscreen .tw-rounded-2xl {
    background: var(--pos-surface-1) !important;
    background-color: var(--pos-surface-1) !important;
    border-radius: 20px !important;
    box-shadow: var(--pos-glow) !important;
    border: 1px solid var(--pos-stroke) !important;
    margin: 0 12px !important;
    padding: 20px !important;
    color: var(--pos-text-strong) !important;
}

/* Ensure box-body inside cards is dark surface */
.sale_pos .box-body,
.lockscreen .box-body {
    background: var(--pos-surface-1) !important;
    background-color: var(--pos-surface-1) !important;
    color: var(--pos-text-strong) !important;
}

/* Row containers should be transparent */
.sale_pos .row,
.lockscreen .row {
    background: transparent !important;
}

/* ============================================
   INPUT GROUPS - Modern Form Controls
   ============================================ */
.sale_pos .input-group,
.pos-form-container .input-group {
    background: var(--pos-surface-2) !important;
    border: 1px solid var(--pos-stroke) !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    transition: all 0.2s ease !important;
    box-shadow: var(--pos-soft-shadow) !important;
}

.daraja-pos-entry-row {
    margin-bottom: 8px !important;
}

.daraja-pos-search-group {
    margin-bottom: 10px !important;
}

.daraja-pos-field-label,
.daraja-pos-meta-label {
    display: block !important;
    margin-bottom: 8px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    letter-spacing: 0.01em !important;
    color: var(--pos-text-muted) !important;
}

.daraja-pos-meta-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
    gap: 12px !important;
    margin-top: 2px !important;
    margin-bottom: 14px !important;
}

.daraja-pos-meta-grid > [class*="col-"],
.daraja-pos-meta-slot,
#restaurant_module_span > [class*="col-"] {
    width: auto !important;
    float: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    min-width: 0 !important;
}

.daraja-pos-meta-item,
.daraja-pos-meta-slot {
    min-width: 0 !important;
}

.daraja-pos-meta-field,
.daraja-pos-meta-grid .form-group {
    margin-bottom: 0 !important;
}

.daraja-pos-meta-grid .input-group {
    min-height: 54px !important;
}

.daraja-pos-meta-grid .input-group .form-control,
.daraja-pos-meta-grid .form-control {
    min-height: 52px !important;
}

.daraja-pos-meta-grid .select2-container {
    width: 100% !important;
}

.daraja-pos-meta-grid .select2-container--default .select2-selection--single {
    min-height: 54px !important;
    height: auto !important;
    display: flex !important;
    align-items: center !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}

.daraja-pos-meta-grid .select2-container--default .select2-selection--single .select2-selection__rendered {
    white-space: normal !important;
    line-height: 1.35 !important;
    padding-right: 26px !important;
}

.daraja-pos-meta-slot {
    display: contents !important;
}

.daraja-pos-meta-grid label,
.daraja-pos-meta-grid .checkbox label {
    white-space: normal !important;
    overflow: visible !important;
}

.daraja-pos-toggle-card {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    min-height: 54px !important;
    padding: 12px 14px !important;
    border-radius: 14px !important;
    border: 1px solid var(--pos-stroke) !important;
    background: var(--pos-surface-2) !important;
    box-shadow: var(--pos-soft-shadow) !important;
}

.daraja-pos-toggle-main {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    min-width: 0 !important;
}

.daraja-pos-toggle-label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin: 0 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    color: var(--pos-text-strong) !important;
}

.daraja-pos-toggle-link {
    padding: 0 !important;
    min-width: auto !important;
    color: var(--color-primary) !important;
}

.sale_pos .input-group:focus-within,
.pos-form-container .input-group:focus-within {
    border-color: rgba(56, 189, 248, 0.6) !important;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.3), var(--pos-soft-shadow) !important;
}

.sale_pos .input-group-addon,
.pos-form-container .input-group-addon {
    background: rgba(255, 255, 255, 0.04) !important;
    border: none !important;
    color: var(--pos-text-muted) !important;
    padding: 14px 16px !important;
    font-size: 16px !important;
}

.sale_pos .input-group .form-control,
.pos-form-container .input-group .form-control {
    border: none !important;
    padding: 14px 16px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    color: var(--pos-text-strong) !important;
    background: transparent !important;
}

.sale_pos .input-group .form-control::placeholder {
    color: var(--pos-text-muted) !important;
    font-weight: 400 !important;
}

.sale_pos .input-group .form-control:focus {
    box-shadow: none !important;
    outline: none !important;
}

.sale_pos .input-group-btn .btn {
    border: none !important;
    background: transparent !important;
    padding: 14px !important;
    color: #3B82F6 !important;
    transition: all 0.2s ease !important;
}

.sale_pos .input-group-btn .btn:hover {
    background: #EFF6FF !important;
    color: #2563EB !important;
}

.sale_pos .input-group-btn .btn i {
    font-size: 18px !important;
}

/* ============================================
   PRODUCTS TABLE - Clean Data Grid
   ============================================ */
#pos_table_wrapper {
    border-radius: 12px !important;
    overflow: hidden !important;
}

#pos_table {
    margin-bottom: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

#pos_table thead th {
    background: rgba(255, 255, 255, 0.04) !important;
    color: var(--pos-text-muted) !important;
    font-weight: 700 !important;
    font-size: 11px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    padding: 14px 16px !important;
    border-bottom: 1px solid var(--pos-stroke) !important;
    border-top: none !important;
    white-space: nowrap !important;
}

#pos_table tbody tr {
    transition: background-color 0.15s ease !important;
}

#pos_table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02) !important;
}

#pos_table tbody td {
    padding: 14px 16px !important;
    vertical-align: middle !important;
    font-size: 14px !important;
    color: var(--pos-text-strong) !important;
    border-bottom: 1px solid var(--pos-divider) !important;
    border-top: none !important;
}

/* Product Name Cell */
#pos_table .product-name,
#pos_table .product_name {
    font-weight: 700 !important;
    color: var(--pos-text-strong) !important;
    font-size: 14px !important;
}

/* Quantity Input */
#pos_table .pos_quantity,
#pos_table input[type="text"].pos_quantity {
    width: 70px !important;
    text-align: center !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    border: 1px solid var(--pos-stroke) !important;
    border-radius: 8px !important;
    padding: 8px !important;
    color: var(--pos-text-strong) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    transition: all 0.2s ease !important;
}

#pos_table .pos_quantity:focus {
    border-color: rgba(56, 189, 248, 0.6) !important;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2) !important;
    outline: none !important;
}

/* Price Display */
#pos_table .display_currency,
#pos_table .pos_line_total {
    font-weight: 800 !important;
    color: #38BDF8 !important;
    font-size: 15px !important;
}

/* Remove Button */
#pos_table .pos_remove_row,
#pos_table button.pos_remove_row,
#pos_table .remove_product_row {
    width: 36px !important;
    height: 36px !important;
    border-radius: 8px !important;
    background: #FEE2E2 !important;
    color: #DC2626 !important;
    border: 1px solid #FECACA !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
    padding: 0 !important;
    font-size: 14px !important;
}

#pos_table .pos_remove_row:hover,
#pos_table button.pos_remove_row:hover,
#pos_table .remove_product_row:hover {
    background: #DC2626 !important;
    color: #FFFFFF !important;
    transform: scale(1.08) !important;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3) !important;
}

/* ============================================
   TOTALS SECTION - Highlighted Summary
   ============================================ */
.pos_form_totals {
    background: var(--pos-surface-1) !important;
    border-radius: 16px !important;
    padding: 18px 24px !important;
    margin-top: 16px !important;
    border: 1px solid var(--pos-stroke) !important;
    box-shadow: var(--pos-soft-shadow) !important;
}

.pos_form_totals table {
    margin-bottom: 0 !important;
}

.pos_form_totals td {
    padding: 8px 16px !important;
    border: none !important;
}

.pos_form_totals b {
    color: var(--pos-text-muted) !important;
    font-weight: 600 !important;
    font-size: 14px !important;
}

.pos_form_totals .price_total,
.pos_form_totals .total_quantity,
.pos_form_totals span.tw-font-semibold {
    color: var(--pos-primary-600) !important;
    font-weight: 800 !important;
    font-size: 15px !important;
}

.pos_form_totals .fa-edit {
    color: #8B5CF6 !important;
    cursor: pointer !important;
    margin-left: 6px !important;
    transition: all 0.2s ease !important;
}

.pos_form_totals .fa-edit:hover {
    color: #7C3AED !important;
    transform: scale(1.1) !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   POS ACTION BAR - DarajaERP Branded Checkout Bar
   Clean, Modern, Professional Design
   ═══════════════════════════════════════════════════════════════════════════ */

/* Main Action Bar Container */
.pos-form-actions.pos-action-bar {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: var(--pos-surface-1) !important;
    border-radius: 24px 24px 0 0 !important;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.16) !important;
    padding: 0 !important;
    z-index: 1000 !important;
    border-top: 1px solid var(--pos-stroke) !important;
}

/* Action Container - Flex Layout */
.pos-action-container {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;
    padding: 16px 24px !important;
    max-width: 100% !important;
}

/* Quick Actions - Left Side */
.pos-quick-actions {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
}

/* Total Section - Center */
.pos-total-section {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 2px !important;
    padding: 8px 24px !important;
    background: linear-gradient(135deg, var(--pos-primary-500) 0%, var(--pos-success-500) 100%) !important;
    border-radius: 16px !important;
    min-width: 200px !important;
    box-shadow: 0 8px 22px rgba(var(--color-primary-rgb), 0.3) !important;
}

.pos-total-label {
    font-size: 10px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    color: rgba(255, 255, 255, 0.7) !important;
}

.pos-total-amount {
    font-size: 28px !important;
    font-weight: 900 !important;
    color: var(--color-primary-contrast) !important;
    letter-spacing: -0.02em !important;
    line-height: 1 !important;
}

/* Primary Actions - Right Side */
.pos-primary-actions {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

/* Base Button Styles */
.pos-action-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 12px 20px !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    border: none !important;
    white-space: nowrap !important;
}

.pos-action-btn i {
    font-size: 16px !important;
}

.pos-action-btn span {
    display: inline !important;
}

/* Secondary Buttons - Ghost Style */
.pos-action-secondary {
    background: rgba(var(--color-surface-rgb), 0.96) !important;
    color: var(--pos-text-strong) !important;
    border: 1px solid rgba(var(--color-primary-rgb), 0.16) !important;
    box-shadow: var(--pos-soft-shadow) !important;
}

.pos-action-secondary:hover {
    background: rgba(var(--color-primary-rgb), 0.08) !important;
    border-color: rgba(var(--color-primary-rgb), 0.42) !important;
    transform: translateY(-1px) !important;
}

/* Secondary Button Icon Colors */
#pos-draft i { color: var(--color-info) !important; }
#pos-quotation i { color: var(--color-accent) !important; }
.pos-action-secondary[data-pay_method="suspend"] i { color: #EF4444 !important; }
.pos-action-secondary[data-pay_method="credit_sale"] i { color: var(--color-secondary) !important; }
#recent-transactions i { color: var(--color-primary) !important; }

/* Primary Button - Navy/Blue Gradient */
.pos-action-primary {
    background: linear-gradient(135deg, var(--pos-primary-600) 0%, var(--pos-success-600) 100%) !important;
    color: #FFFFFF !important;
    box-shadow: 0 8px 22px rgba(var(--color-primary-rgb), 0.32) !important;
    min-width: 140px !important;
}

.pos-action-primary:hover {
    background: linear-gradient(135deg, var(--pos-primary-500) 0%, var(--pos-success-500) 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 26px rgba(var(--color-primary-rgb), 0.38) !important;
}

/* Cash Button - Green Gradient */
.pos-action-cash {
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-info) 100%) !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 16px rgba(var(--color-secondary-rgb), 0.32) !important;
    min-width: 120px !important;
}

.pos-action-cash:hover {
    background: linear-gradient(135deg, var(--color-info) 0%, var(--color-secondary) 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 24px rgba(var(--color-secondary-rgb), 0.38) !important;
}

/* Cancel Button - Red Gradient */
.pos-action-cancel {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%) !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3) !important;
}

.pos-action-cancel:hover {
    background: linear-gradient(135deg, #F87171 0%, #EF4444 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 24px rgba(239, 68, 68, 0.35) !important;
}

/* Button Disabled State */
.pos-action-btn:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .pos-action-container {
        flex-wrap: wrap !important;
        padding: 12px 16px !important;
        gap: 12px !important;
    }
    
    .pos-quick-actions {
        order: 2 !important;
        width: 100% !important;
        justify-content: center !important;
        padding-top: 8px !important;
        border-top: 1px solid var(--pos-stroke) !important;
    }
    
    .pos-total-section {
        order: 1 !important;
        flex: 1 !important;
        min-width: 150px !important;
    }
    
    .pos-primary-actions {
        order: 1 !important;
    }
    
    .pos-action-btn span {
        display: none !important;
    }
    
    .pos-action-btn {
        padding: 12px !important;
        min-width: auto !important;
    }
    
    .pos-action-primary,
    .pos-action-cash {
        min-width: auto !important;
    }
}

@media (max-width: 768px) {
    .pos-action-container {
        padding: 10px 12px !important;
        gap: 10px !important;
    }
    
    .pos-total-section {
        padding: 6px 16px !important;
        min-width: 120px !important;
    }
    
    .pos-total-amount {
        font-size: 22px !important;
    }
    
    .pos-total-label {
        font-size: 9px !important;
    }
    
    .pos-action-btn {
        padding: 10px !important;
    }
    
    .pos-action-btn i {
        font-size: 18px !important;
    }
    
    .pos-quick-actions {
        gap: 6px !important;
    }
    
    .pos-action-secondary {
        padding: 8px 10px !important;
    }

    /* Larger tap targets */
    .pos-header-btn,
    .pos-action-btn {
        min-height: 44px !important;
        gap: 8px !important;
    }

    .pos-quick-amount-btn {
        min-height: 44px !important;
    }

    .pos-qty-btn {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        font-size: 16px !important;
    }

    /* Keep content clear of fixed footer */
    #scrollable-container {
        padding-bottom: 180px !important;
    }

    /* Slightly wider product tiles for readability */
    .pos-product-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
        gap: 12px !important;
    }

    /* Solid drawers for legibility */
    .pos-drawer-panel {
        background: var(--pos-surface-1) !important;
    }

    .pos-drawer-search {
        padding: 12px 14px !important;
    }

    .pos-form-actions,
    .pos-form-actions.pos-action-bar {
        padding: 12px 16px !important;
    }
}

@media (max-width: 480px) {
    .pos-quick-actions {
        display: none !important;
    }
    
    .pos-total-section {
        flex: 1 !important;
    }
    
    .pos-primary-actions {
        gap: 8px !important;
    }
}

/* ============================================
   Legacy Support - Keep old selectors working
   ============================================ */
.pos-form-actions {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: linear-gradient(140deg, rgba(17, 24, 39, 0.96) 0%, rgba(11, 18, 32, 0.96) 80%) !important;
    border-radius: 20px 20px 0 0 !important;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.32) !important;
    padding: 16px 24px !important;
    z-index: 1000 !important;
    border-top: 1px solid var(--pos-stroke) !important;
}

/* Total Payable Display */
.pos-form-actions .pos-total,
.pos-form-actions .tw-pos-total {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.pos-form-actions #total_payable {
    font-size: 32px !important;
    font-weight: 900 !important;
    color: #059669 !important;
    letter-spacing: -0.02em !important;
}

.pos-form-actions .total-label {
    color: #475569 !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
}

/* Primary Action Buttons */
.pos-form-actions .btn,
.pos-form-actions button {
    border-radius: 12px !important;
    font-weight: 700 !important;
    padding: 14px 24px !important;
    font-size: 14px !important;
    transition: all 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    border: none !important;
    cursor: pointer !important;
}

/* Checkout Button - Primary Navy */
#pos-finalize {
    background: linear-gradient(135deg, #1E40AF 0%, #0F172A 100%) !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 14px rgba(30, 64, 175, 0.35) !important;
    min-width: 180px !important;
}

#pos-finalize:hover {
    background: linear-gradient(135deg, #1D4ED8 0%, #1E40AF 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(30, 64, 175, 0.4) !important;
}

/* Express Cash - Green */
.pos-express-finalize[data-pay_method="cash"] {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%) !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35) !important;
}

.pos-express-finalize[data-pay_method="cash"]:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    transform: translateY(-2px) !important;
}

/* Card Payment - Purple */
.pos-express-finalize[data-pay_method="card"] {
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%) !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35) !important;
}

/* Cancel Button - Red */
#pos-cancel {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%) !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3) !important;
}

#pos-cancel:hover {
    background: linear-gradient(135deg, #F87171 0%, #EF4444 100%) !important;
    transform: translateY(-2px) !important;
}

/* Secondary Buttons - Ghost Style */
#pos-draft,
#pos-quotation,
.pos-express-finalize[data-pay_method="suspend"],
.pos-express-finalize[data-pay_method="credit_sale"] {
    background: #1f2937 !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: var(--pos-soft-shadow) !important;
    padding: 12px 16px !important;
}

#pos-draft:hover,
#pos-quotation:hover,
.pos-express-finalize[data-pay_method="suspend"]:hover,
.pos-express-finalize[data-pay_method="credit_sale"]:hover {
    background: #111827 !important;
    border-color: rgba(56, 189, 248, 0.5) !important;
}

/* Secondary Button Icons */
#pos-draft i { color: #3B82F6 !important; }
#pos-quotation i { color: #F59E0B !important; }
.pos-express-finalize[data-pay_method="suspend"] i { color: #EF4444 !important; }
.pos-express-finalize[data-pay_method="credit_sale"] i { color: #8B5CF6 !important; }

/* Recent Transactions - Pill Button */
#recent-transactions {
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%) !important;
    color: #FFFFFF !important;
    border-radius: 50px !important;
    padding: 12px 24px !important;
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35) !important;
}

#recent-transactions:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4) !important;
}

/* ============================================
   PRODUCT SIDEBAR - Modern Cards
   ============================================ */
#product_category_div label,
#product_brand_div label {
    background: linear-gradient(135deg, #38BDF8 0%, #34D399 100%) !important;
    color: #FFFFFF !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 14px rgba(0, 166, 231, 0.32), 0 2px 6px rgba(124, 91, 163, 0.22) !important;
    border: none !important;
    transition: all 0.2s ease !important;
}

#product_category_div label:hover,
#product_brand_div label:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(0, 166, 231, 0.38), 0 3px 10px rgba(124, 91, 163, 0.24) !important;
}

/* Sidebar Drawer */
.tw-dw-drawer-side .tw-dw-menu {
    background: var(--pos-surface-1) !important;
    padding: 24px !important;
}

/* Category Cards */
.main-category-div .tw-dw-card,
.product_category .tw-dw-card,
.product_brand .tw-dw-card {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid var(--pos-stroke) !important;
    border-radius: 16px !important;
    transition: all 0.2s ease !important;
    box-shadow: var(--pos-soft-shadow) !important;
}

.main-category-div .tw-dw-card:hover,
.product_category .tw-dw-card:hover,
.product_brand .tw-dw-card:hover {
    border-color: rgba(56, 189, 248, 0.5) !important;
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.25), 0 0 0 2px rgba(56, 189, 248, 0.2) !important;
    transform: translateY(-3px) !important;
}

.main-category-div .tw-dw-card h4 {
    color: #334155 !important;
    font-weight: 700 !important;
}

.main-category-div .tw-dw-btn-accent {
    background: #7C5BA3 !important;
    border: none !important;
    color: #FFFFFF !important;
}

.main-category-div .tw-dw-btn-primary {
    background: #00A6E7 !important;
    border: none !important;
    color: #FFFFFF !important;
}

.category_heading {
    color: #0F1F3D !important;
    font-weight: 800 !important;
    font-size: 20px !important;
    background: none !important;
    -webkit-text-fill-color: #0F1F3D !important;
}

/* ============================================
   PRODUCT CARDS - Clean Product Grid
   ============================================ */
.product_box,
.product-card {
    background: rgba(255, 255, 255, 0.04) !important;
    border-radius: 16px !important;
    border: 1px solid var(--pos-stroke) !important;
    padding: 16px !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
    text-align: center !important;
    box-shadow: var(--pos-soft-shadow) !important;
}

.product_box:hover,
.product-card:hover {
    border-color: rgba(56, 189, 248, 0.5) !important;
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.25), 0 0 0 2px rgba(56, 189, 248, 0.2) !important;
    transform: translateY(-4px) !important;
}

.product_box img,
.product-card img {
    border-radius: 12px !important;
    margin-bottom: 12px !important;
    object-fit: cover !important;
}

.product_box .product-name,
.product-card .product-name {
    font-weight: 700 !important;
    color: #1E293B !important;
    font-size: 13px !important;
    margin-bottom: 6px !important;
    line-height: 1.3 !important;
}

.product_box .product-price,
.product-card .product-price {
    font-weight: 800 !important;
    color: #2563EB !important;
    font-size: 15px !important;
}

/* Featured Products */
#featured_products_box .product_box {
    background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%) !important;
    border-color: #FCD34D !important;
}

#featured_products_box .product_box:hover {
    border-color: #F59E0B !important;
}

/* ============================================
   MODALS - Professional Dialogs
   ============================================ */
.modal-content {
    border-radius: 20px !important;
    border: 1px solid var(--pos-stroke) !important;
    box-shadow: var(--pos-glow) !important;
    overflow: hidden !important;
}

.modal-header {
    background: linear-gradient(135deg, #38BDF8 0%, #34D399 100%) !important;
    color: #FFFFFF !important;
    padding: 20px 24px !important;
    border: none !important;
    position: relative !important;
}

.modal-title {
    color: #FFFFFF !important;
    font-weight: 800 !important;
    font-size: 18px !important;
    padding-right: 52px !important;
}

.modal-header .close {
    color: #FFFFFF !important;
    opacity: 0.8 !important;
    text-shadow: none !important;
    font-size: 24px !important;
    position: absolute !important;
    top: 50% !important;
    right: 18px !important;
    left: auto !important;
    inset-inline-end: 18px !important;
    inset-inline-start: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 36px !important;
    height: 36px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    float: none !important;
    line-height: 1 !important;
    border: none !important;
    border-radius: 999px !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: translateY(-50%) !important;
    transition: opacity 0.15s ease, background-color 0.15s ease, color 0.15s ease !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    outline: none !important;
}

.modal-header .close:hover,
.modal-header .close:focus {
    opacity: 1 !important;
    background: rgba(255, 255, 255, 0.14) !important;
    transform: translateY(-50%) !important;
    outline: none !important;
}

.modal-header .close span {
    display: block !important;
    line-height: 1 !important;
    pointer-events: none !important;
}

body.pos-layout-active.pos-modal-active .pos-header,
body.pos-layout-active.pos-modal-active .pos-form-actions,
body.pos-layout-active.pos-modal-active .pos-footer-line,
body.pos-layout-active.pos-modal-active .scrolltop,
body.pos-layout-active.pos-modal-active .pos-shortcuts-hint,
body.pos-layout-active.pos-modal-active .pos-theme-toggle {
    pointer-events: none !important;
}

body.pos-layout-active .modal-backdrop {
    z-index: 2000 !important;
}

body.pos-layout-active .modal {
    z-index: 2010 !important;
}

.modal-body {
    padding: 24px !important;
    background: var(--pos-surface-1) !important;
    color: var(--pos-text-strong) !important;
}

.modal-footer {
    background: var(--pos-surface-2) !important;
    border-top: 1px solid var(--pos-stroke) !important;
    padding: 16px 24px !important;
}

/* Payment Modal Specific */
.payment_modal .modal-content,
#add_payment_modal .modal-content {
    max-width: 600px !important;
}

.payment_modal input.payment-amount,
#add_payment_modal input.payment-amount {
    font-size: 36px !important;
    font-weight: 900 !important;
    text-align: center !important;
    border: 3px solid rgba(56, 189, 248, 0.6) !important;
    border-radius: 16px !important;
    padding: 20px !important;
    color: #1D4ED8 !important;
    background: #EFF6FF !important;
}

.payment_modal input.payment-amount:focus,
#add_payment_modal input.payment-amount:focus {
    border-color: rgba(56, 189, 248, 0.6) !important;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.3) !important;
    outline: none !important;
}

/* Recent Transactions Modal */
#recent_transactions_modal .modal-header {
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%) !important;
}

/* ============================================
   SELECT2 DROPDOWN - Styled Dropdowns
   ============================================ */
.sale_pos .select2-container--default .select2-selection--single {
    height: 48px !important;
    border: 1px solid var(--pos-stroke) !important;
    border-radius: 12px !important;
    padding: 10px 14px !important;
    background: var(--pos-surface-2) !important;
}

.sale_pos .select2-container--default .select2-selection--single:focus {
    border-color: rgba(56, 189, 248, 0.6) !important;
}

.sale_pos .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 26px !important;
    color: var(--pos-text-strong) !important;
    font-weight: 600 !important;
}

.select2-dropdown {
    border-radius: 12px !important;
    border: 1px solid var(--pos-stroke) !important;
    box-shadow: var(--pos-glow) !important;
    overflow: hidden !important;
    background: var(--pos-surface-1) !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: #38BDF8 !important;
    color: #FFFFFF !important;
}

/* ============================================
   ALERTS - Status Messages
   ============================================ */
.alert {
    border-radius: 12px !important;
    padding: 14px 18px !important;
    font-weight: 500 !important;
}

.alert-success {
    background: #ECFDF5 !important;
    border: 1px solid #10B981 !important;
    color: #065F46 !important;
}

.alert-warning {
    background: #FFFBEB !important;
    border: 1px solid #F59E0B !important;
    color: #92400E !important;
}

.alert-danger {
    background: #FEF2F2 !important;
    border: 1px solid #EF4444 !important;
    color: #991B1B !important;
}

/* ============================================
   GENERAL BUTTONS - Enterprise Style
   ============================================ */
.btn-primary {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%) !important;
    border: none !important;
    color: #FFFFFF !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25) !important;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%) !important;
    transform: translateY(-1px) !important;
}

.btn-success {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%) !important;
    border: none !important;
    color: #FFFFFF !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
}

.btn-danger {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%) !important;
    border: none !important;
    color: #FFFFFF !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
}

.btn-warning {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%) !important;
    border: none !important;
    color: #FFFFFF !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
}

.btn-info {
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%) !important;
    border: none !important;
    color: #FFFFFF !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
}

/* ============================================
   KEYBOARD SHORTCUTS POPOVER
   ============================================ */
.popover {
    border-radius: 16px !important;
    border: 1px solid #E2E8F0 !important;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1) !important;
}

.popover-title {
    background: linear-gradient(135deg, #1E40AF 0%, #0F172A 100%) !important;
    color: #FFFFFF !important;
    font-weight: 700 !important;
    border-radius: 15px 15px 0 0 !important;
    border-bottom: none !important;
    padding: 12px 16px !important;
}

.popover-content {
    padding: 16px !important;
}

kbd {
    background: #F1F5F9 !important;
    border: 1px solid #CBD5E1 !important;
    border-radius: 6px !important;
    padding: 4px 8px !important;
    font-family: monospace !important;
    font-weight: 700 !important;
    color: #475569 !important;
    box-shadow: 0 2px 0 #CBD5E1 !important;
}

/* ============================================
   SCROLLBAR - Subtle Custom Scrollbar
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.6);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.9);
}

/* ============================================
   FOOTER - Clean POS Footer
   ============================================ */
body.lockscreen footer,
.lockscreen .main-footer {
    background: var(--pos-surface-1) !important;
    border-top: 1px solid var(--pos-stroke) !important;
    padding: 12px 16px !important;
    text-align: center !important;
}

body.lockscreen footer small {
    color: var(--pos-text-muted) !important;
    font-size: 12px !important;
}

/* ============================================
   MOBILE RESPONSIVE - Enhanced Touch-Friendly
   ============================================ */

/* ---- TABLET (768px - 1024px) ---- */
@media (max-width: 1024px) {
    /* Reduce padding for more content space */
    .sale_pos .tw-rounded-2xl,
    .pos-main-card {
        padding: 14px !important;
        margin: 0 8px !important;
    }
    
    /* Optimize sidebar width */
    .tw-dw-drawer-side .tw-dw-menu {
        width: 60% !important;
    }
    
    /* Stack action buttons better */
    .pos-form-actions .tw-flex {
        gap: 8px !important;
    }
}

/* ---- MOBILE (max-width: 768px) ---- */
@media (max-width: 768px) {
    /* Header adjustments */
    .pos-header > .tw-flex,
    .pos-header > div {
        margin: 6px !important;
        padding: 10px 12px !important;
        border-radius: 12px !important;
        flex-wrap: wrap !important;
    }
    
    /* Logo smaller on mobile */
    .pos-header img[alt="DarajaERP"] {
        height: 28px !important;
    }
    
    /* Hide text logo on small screens, keep only image */
    .pos-header .tw-hidden.lg\\:tw-inline {
        display: none !important;
    }
    
    /* Location badge more compact */
    .pos-header .tw-rounded-xl {
        padding: 8px 10px !important;
    }
    
    /* Main content card */
    .sale_pos .tw-rounded-2xl,
    .pos-main-card {
        padding: 12px !important;
        margin: 0 6px !important;
        border-radius: 14px !important;
    }
    
    /* Input groups - larger touch targets */
    .sale_pos .input-group {
        border-radius: 10px !important;
    }
    
    .sale_pos .input-group .form-control {
        padding: 12px 14px !important;
        font-size: 16px !important; /* Prevents zoom on iOS */
    }
    
    .sale_pos .input-group-addon {
        padding: 12px 14px !important;
    }
    
    /* Table adjustments */
    #pos_table thead th {
        font-size: 10px !important;
        padding: 10px 6px !important;
        white-space: nowrap !important;
    }

    #pos_table tbody td {
        padding: 10px 6px !important;
        font-size: 13px !important;
    }
    
    /* Quantity input larger for touch */
    #pos_table .pos_quantity {
        width: 60px !important;
        padding: 10px 6px !important;
        font-size: 16px !important;
    }
    
    /* Remove button larger touch target */
    #pos_table .pos_remove_row,
    #pos_table .remove_product_row {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
    }
    
    /* Bottom action bar */
    .pos-form-actions {
        padding: 12px 10px !important;
        border-radius: 16px 16px 0 0 !important;
    }

    .pos-form-actions #total_payable {
        font-size: 22px !important;
    }
    
    .pos-form-actions .total-label {
        font-size: 11px !important;
    }

    .pos-form-actions .btn,
    .pos-form-actions button {
        padding: 10px 12px !important;
        font-size: 11px !important;
        border-radius: 10px !important;
        min-height: 44px !important; /* iOS touch target minimum */
    }
    
    /* Make checkout button full width on very small screens */
    #pos-finalize {
        min-width: 140px !important;
    }
    
    /* Stack secondary buttons */
    .pos-form-actions .tw-flex-col {
        gap: 6px !important;
    }

    /* Drawer/Sidebar full width on mobile */
    .tw-dw-drawer-side .tw-dw-menu {
        width: 90% !important;
        max-width: 320px !important;
    }
    
    /* Category/Brand cards */
    .product_category .tw-dw-card,
    .product_brand .tw-dw-card,
    .main-category-div .tw-dw-card {
        padding: 10px !important;
    }
    
    /* Product cards in grid */
    .product_box,
    .product-card {
        padding: 10px !important;
        border-radius: 12px !important;
    }
    
    .product_box .product-name,
    .product-card .product-name {
        font-size: 11px !important;
    }
    
    .product_box .product-price,
    .product-card .product-price {
        font-size: 13px !important;
    }
    
    /* Totals section */
    .pos_form_totals {
        padding: 12px 14px !important;
        border-radius: 12px !important;
    }
    
    .pos_form_totals b {
        font-size: 12px !important;
    }
    
    .pos_form_totals .price_total,
    .pos_form_totals .total_quantity {
        font-size: 14px !important;
    }
    
    /* Modals - full screen on mobile */
    .modal-dialog {
        margin: 0 !important;
        max-width: 100% !important;
        height: 100% !important;
    }
    
    .modal-content {
        border-radius: 0 !important;
        height: 100% !important;
        min-height: 100vh !important;
    }
    
    .modal-body {
        padding: 16px !important;
        overflow-y: auto !important;
    }
    
    /* Payment modal input */
    .payment_modal input.payment-amount,
    #add_payment_modal input.payment-amount {
        font-size: 28px !important;
        padding: 16px !important;
    }
}

/* ---- SMALL MOBILE (max-width: 480px) ---- */
@media (max-width: 480px) {
    /* Even more compact header */
    .pos-header > .tw-flex,
    .pos-header > div {
        padding: 8px 10px !important;
    }
    
    .pos-header img[alt="DarajaERP"] {
        height: 24px !important;
    }
    
    /* Hide location label on very small screens */
    .pos-header .tw-font-medium.tw-text-sm {
        display: none !important;
    }
    
    /* Content area */
    .sale_pos .tw-rounded-2xl,
    .pos-main-card {
        padding: 10px !important;
        margin: 0 4px !important;
        border-radius: 12px !important;
    }
    
    /* Table - single column optimization */
    #pos_table thead th {
        font-size: 9px !important;
        padding: 8px 4px !important;
    }
    
    #pos_table tbody td {
        padding: 8px 4px !important;
        font-size: 12px !important;
    }
    
    #pos_table .pos_quantity {
        width: 50px !important;
    }
    
    /* Bottom bar - vertical stack */
    .pos-form-actions .tw-flex {
        flex-direction: column !important;
        gap: 8px !important;
    }
    
    .pos-form-actions #total_payable {
        font-size: 20px !important;
    }
    
    .pos-form-actions .btn,
    .pos-form-actions button {
        width: 100% !important;
        justify-content: center !important;
    }
    
    /* Secondary action buttons as icon-only on very small screens */
    #pos-draft span,
    #pos-quotation span {
        display: none !important;
    }
    
    /* Product cards 2 columns */
    #product_list_body .product_box {
        width: calc(50% - 8px) !important;
    }
}

/* ============================================
   USER-FRIENDLY ENHANCEMENTS
   ============================================ */

/* Large, clear touch targets (minimum 44x44px) */
.pos-header-btn,
.pos-form-actions button,
.pos-express-finalize,
#pos-finalize,
#pos-cancel,
#pos-draft,
#pos-quotation {
    min-height: 44px !important;
    min-width: 44px !important;
}

/* Clear visual feedback on tap */
.pos-header-btn:active,
.pos-form-actions button:active,
#pos-finalize:active,
#pos-cancel:active {
    transform: scale(0.96) !important;
    opacity: 0.9 !important;
}

/* Smooth transitions for all interactive elements */
.pos-header-btn,
.pos-form-actions button,
.product_box,
.product-card,
.tw-dw-card,
.btn,
button {
    transition: all 0.15s ease !important;
    -webkit-tap-highlight-color: transparent !important;
}

/* Focus states for accessibility */
.pos-header-btn:focus,
.pos-form-actions button:focus,
#pos-finalize:focus,
.sale_pos .input-group:focus-within {
    outline: 2px solid #38BDF8 !important;
    outline-offset: 2px !important;
}

/* Disable hover effects on touch devices */
@media (hover: none) and (pointer: coarse) {
    .product_box:hover,
    .product-card:hover,
    .tw-dw-card:hover {
        transform: none !important;
        box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05) !important;
    }
    
    .pos-header-btn:hover {
        background: rgba(255, 255, 255, 0.1) !important;
        transform: none !important;
    }
}

/* Better text readability */
.sale_pos,
.lockscreen {
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

/* Prevent text selection on buttons */
.pos-header-btn,
.pos-form-actions button,
#pos-finalize,
#pos-cancel {
    user-select: none !important;
    -webkit-user-select: none !important;
}

/* ============================================
   POS SHELL STABILITY FIX
   Dedicated live POS layout class to avoid AdminLTE lockscreen reflow.
   ============================================ */
body.pos-layout-active,
body.hold-transition.pos-layout-active {
    color: var(--pos-text-strong) !important;
    overflow: hidden !important;
    overflow-x: hidden !important;
    min-height: 100vh;
    font-family: 'Manrope', 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 15px;
    scrollbar-gutter: stable both-edges;
}

body.pos-layout-active.pos-theme-light,
body.hold-transition.pos-layout-active.pos-theme-light {
    background: radial-gradient(circle at 10% 10%, rgba(var(--color-primary-rgb), 0.18), transparent 30%), radial-gradient(circle at 90% 12%, rgba(var(--color-secondary-rgb), 0.14), transparent 30%), linear-gradient(160deg, var(--pos-shell-bg) 0%, rgba(var(--color-surface-rgb), 0.96) 55%, var(--pos-shell-bg) 100%) !important;
    background-color: var(--pos-shell-bg) !important;
}

body.pos-layout-active.pos-theme-dark,
body.hold-transition.pos-layout-active.pos-theme-dark {
    background: radial-gradient(circle at 10% 10%, rgba(var(--color-primary-rgb), 0.12), transparent 26%), radial-gradient(circle at 90% 8%, rgba(var(--color-secondary-rgb), 0.12), transparent 26%), linear-gradient(160deg, #0f172a 0%, #111827 55%, #0f172a 100%) !important;
    background-color: var(--pos-shell-bg) !important;
}

body.pos-layout-active main,
body.pos-layout-active .tw-flex.thetop main,
body.pos-layout-active main.tw-bg-gray-100,
.pos-layout-active main,
body.pos-layout-active #scrollable-container,
.pos-layout-active #scrollable-container,
body.pos-layout-active .thetop,
.pos-layout-active .thetop,
body.pos-layout-active .content,
body.pos-layout-active .content-wrapper {
    background: transparent !important;
    color: var(--pos-text-strong) !important;
}

body.pos-layout-active #scrollable-container,
.pos-layout-active #scrollable-container {
    scrollbar-gutter: stable both-edges;
    overscroll-behavior: contain;
}

body.pos-layout-active .content,
.pos-layout-active .content-wrapper {
    min-height: 100vh !important;
    padding-bottom: 120px !important;
}

body.pos-layout-active .tw-bg-gray-100,
body.pos-layout-active [class*="tw-bg-gray"],
body.pos-layout-active [class*="tw-bg-blue"] {
    background: transparent !important;
    background-color: transparent !important;
}

.pos-layout-active .tw-rounded-2xl.tw-bg-white,
.pos-layout-active .tw-rounded-2xl {
    background: var(--pos-surface-1) !important;
    background-color: var(--pos-surface-1) !important;
    border-radius: 20px !important;
    box-shadow: var(--pos-glow) !important;
    border: 1px solid var(--pos-stroke) !important;
    margin: 0 12px !important;
    padding: 20px !important;
    color: var(--pos-text-strong) !important;
}

.pos-layout-active .box-body {
    background: var(--pos-surface-1) !important;
    background-color: var(--pos-surface-1) !important;
    color: var(--pos-text-strong) !important;
}

.pos-layout-active .row {
    background: transparent !important;
}

body.pos-layout-active footer,
.pos-layout-active .main-footer {
    background: var(--pos-surface-1) !important;
    border-top: 1px solid var(--pos-stroke) !important;
    padding: 12px 16px !important;
    text-align: center !important;
}

body.pos-layout-active footer small {
    color: var(--pos-text-muted) !important;
    font-size: 12px !important;
}

.sale_pos,
.pos-layout-active,
.lockscreen {
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

[data-pos-theme="dark"] body.pos-layout-active,
[data-pos-theme="dark"] .pos-layout-active,
.pos-theme-dark body.pos-layout-active {
    background: #0F172A !important;
}

[data-pos-theme="dark"] .pos-layout-active main,
[data-pos-theme="dark"] .pos-layout-active #scrollable-container,
[data-pos-theme="dark"] .pos-layout-active .thetop {
    background: #0F172A !important;
}

@media (prefers-color-scheme: dark) {
    [data-pos-theme="auto"] body.pos-layout-active,
    [data-pos-theme="auto"] .pos-layout-active {
        background: #0F172A !important;
    }

    [data-pos-theme="auto"] .pos-layout-active main,
    [data-pos-theme="auto"] .pos-layout-active #scrollable-container {
        background: #0F172A !important;
    }
}

/* Sticky totals bar for easy access */
.pos_form_totals {
    position: sticky !important;
    bottom: 120px !important;
    z-index: 10 !important;
}

/* Visual hierarchy - make important elements stand out */
#pos-finalize {
    font-size: 14px !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em !important;
}

.pos-form-actions #total_payable {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-variant-numeric: tabular-nums !important;
}

/* Ripple effect on buttons */
.pos-form-actions button::after,
#pos-finalize::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

/* Empty cart state */
#pos_table tbody:empty::after {
    content: 'Scan a product or search to add items';
    display: block;
    text-align: center;
    padding: 40px 20px;
    color: #94A3B8;
    font-size: 14px;
    font-weight: 500;
}

/* Loading state for products */
.product_box.loading,
.product-card.loading {
    pointer-events: none;
    opacity: 0.6;
}

/* Success feedback animation */
@keyframes successPulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.product-added {
    animation: successPulse 0.5s ease-out;
}

/* Quantity change animation */
@keyframes quantityBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.quantity-changed {
    animation: quantityBounce 0.2s ease;
}

/* Safe area insets for notched phones */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .pos-form-actions {
        padding-bottom: calc(16px + env(safe-area-inset-bottom)) !important;
    }
}

/* ============================================
   LANDSCAPE MODE OPTIMIZATIONS
   ============================================ */
@media (max-height: 500px) and (orientation: landscape) {
    .pos-header > .tw-flex,
    .pos-header > div {
        padding: 8px 12px !important;
    }
    
    .pos-form-actions {
        padding: 8px 12px !important;
    }
    
    .pos-form-actions #total_payable {
        font-size: 20px !important;
    }
    
    /* Reduce table row height */
    #pos_table tbody td {
        padding: 6px 8px !important;
    }
    
    /* Scroll content area */
    .sale_pos .tw-rounded-2xl,
    .pos-main-card {
        max-height: calc(100vh - 160px) !important;
        overflow-y: auto !important;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .pos-header,
    .pos-form-actions,
    .no-print {
        display: none !important;
    }

    .print_section {
        display: block !important;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.pos-main-card,
.sale_pos .tw-rounded-2xl {
    animation: fadeIn 0.3s ease-out;
}

/* ============================================
   LOADING STATE
   ============================================ */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.pos-loading {
    background: linear-gradient(90deg, #F1F5F9 25%, #E2E8F0 50%, #F1F5F9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* ============================================
   MOBILE FLOATING ACTION BUTTON (FAB)
   ============================================ */
.pos-fab {
    position: fixed !important;
    bottom: 140px !important;
    right: 20px !important;
    width: 56px !important;
    height: 56px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%) !important;
    color: #FFFFFF !important;
    border: none !important;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4), 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 24px !important;
    cursor: pointer !important;
    z-index: 999 !important;
    transition: all 0.2s ease !important;
    -webkit-tap-highlight-color: transparent !important;
}

.pos-fab:active {
    transform: scale(0.92) !important;
}

.pos-fab i {
    font-size: 22px !important;
}

/* Hide FAB on desktop */
@media (min-width: 769px) {
    .pos-fab {
        display: none !important;
    }
}

/* ============================================
   MOBILE-FRIENDLY MODALS
   ============================================ */
@media (max-width: 768px) {
    /* Full screen modals */
    #mobile_product_suggestion_modal .modal-dialog,
    #add_payment_modal .modal-dialog,
    .payment_modal .modal-dialog {
        margin: 0 !important;
        max-width: 100% !important;
        height: 100% !important;
    }
    
    #mobile_product_suggestion_modal .modal-content,
    #add_payment_modal .modal-content,
    .payment_modal .modal-content {
        border-radius: 0 !important;
        min-height: 100vh !important;
    }
    
    /* Modal headers */
    #mobile_product_suggestion_modal .modal-header,
    #add_payment_modal .modal-header,
    .payment_modal .modal-header {
        position: sticky !important;
        top: 0 !important;
        z-index: 10 !important;
    }
    
    /* Modal footers */
    #mobile_product_suggestion_modal .modal-footer,
    #add_payment_modal .modal-footer,
    .payment_modal .modal-footer {
        position: sticky !important;
        bottom: 0 !important;
        z-index: 10 !important;
    }
    
    /* Smooth scrolling in modals */
    .modal-body {
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior: contain !important;
    }
}

/* ============================================
   SWIPE-FRIENDLY TABLE ROWS (Disabled - was causing layout issues)
   ============================================ */
#pos_table tbody tr {
    touch-action: pan-y !important;
    /* position: relative removed to fix table layout */
}

/* Swipe indicator disabled to fix table layout
#pos_table tbody tr::before {
    content: '';
    position: absolute;
    left: -100%;
    top: 0;
    bottom: 0;
    width: 100%;
    background: linear-gradient(90deg, #EF4444 0%, #DC2626 100%);
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: -1;
}
*/

/* ============================================
   KEYBOARD/NUMPAD STYLING
   ============================================ */
.pos-numpad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 12px;
    background: var(--pos-surface-2);
    border-radius: 16px;
}

.pos-numpad button {
    height: 56px;
    font-size: 20px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--pos-text-strong);
    box-shadow: var(--pos-soft-shadow);
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.pos-numpad button:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.12);
}

.pos-numpad button.numpad-action {
    background: linear-gradient(135deg, #34D399 0%, #10B981 100%);
    color: #FFFFFF;
}

.pos-numpad button.numpad-clear {
    background: #FEE2E2;
    color: #DC2626;
}

/* ============================================
   TOUCH-FRIENDLY QUANTITY CONTROLS
   ============================================ */
.pos-qty-control {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pos-qty-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    border-radius: 8px !important;
    border: 1px solid var(--pos-stroke) !important;
    background: rgba(255, 255, 255, 0.06) !important;
    color: var(--pos-text-strong) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    -webkit-tap-highlight-color: transparent !important;
}

.pos-qty-btn:active {
    transform: scale(0.9) !important;
    background: rgba(255, 255, 255, 0.12) !important;
}

.pos-qty-btn.minus {
    color: #EF4444 !important;
    border-color: rgba(248, 113, 113, 0.5) !important;
}

.pos-qty-btn.plus {
    color: #10B981 !important;
    border-color: rgba(52, 211, 153, 0.6) !important;
}

/* ============================================
   PULL-TO-REFRESH INDICATOR
   ============================================ */
.pos-refresh-indicator {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    padding: 12px 24px;
    background: var(--pos-surface-1);
    border-radius: 0 0 16px 16px;
    box-shadow: var(--pos-soft-shadow);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 1000;
    transition: transform 0.2s ease;
}

.pos-refresh-indicator.visible {
    transform: translateX(-50%) translateY(0);
}

.pos-refresh-indicator i {
    color: #38BDF8;
    animation: spin 1s linear infinite;
}

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

/* ============================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================ */

/* High contrast mode support */
@media (prefers-contrast: high) {
    .pos-form-actions button,
    #pos-finalize,
    #pos-cancel {
        border: 2px solid currentColor !important;
    }
    
    #pos_table tbody td {
        border-bottom: 2px solid #1E293B !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible for keyboard navigation */
.pos-header-btn:focus-visible,
.pos-form-actions button:focus-visible,
#pos-finalize:focus-visible,
#pos-cancel:focus-visible,
.product_box:focus-visible,
.product-card:focus-visible {
    outline: 3px solid #38BDF8 !important;
    outline-offset: 2px !important;
}

/* Screen reader only class */
.pos-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
/* ═══════════════════════════════════════════════════════════════════════════
   ENHANCED THEME SYSTEM - Multiple Theme Support
   ═══════════════════════════════════════════════════════════════════════════ */

/* Theme Toggle Button */
.pos-theme-toggle {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%);
    color: #FFFFFF;
    border: none;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
    cursor: pointer;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s ease;
}

.pos-theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(139, 92, 246, 0.5);
}

/* Dark Theme */
[data-pos-theme="dark"] body.lockscreen,
[data-pos-theme="dark"] .lockscreen,
.pos-theme-dark body.lockscreen {
    background: #0F172A !important;
}

[data-pos-theme="dark"] .lockscreen main,
[data-pos-theme="dark"] #scrollable-container,
[data-pos-theme="dark"] .thetop {
    background: #0F172A !important;
}

[data-pos-theme="dark"] .sale_pos .tw-rounded-2xl,
[data-pos-theme="dark"] .pos-main-card,
[data-pos-theme="dark"] .sale_pos .box-body {
    background: #1E293B !important;
    border-color: #334155 !important;
}

[data-pos-theme="dark"] #pos_table thead th {
    background: #334155 !important;
    color: #E2E8F0 !important;
    border-color: #475569 !important;
}

[data-pos-theme="dark"] #pos_table tbody td {
    color: #CBD5E1 !important;
    border-color: #334155 !important;
}

[data-pos-theme="dark"] #pos_table tbody tr:hover {
    background: #334155 !important;
}

[data-pos-theme="dark"] .pos-form-actions {
    background: #1E293B !important;
    border-color: #334155 !important;
}

[data-pos-theme="dark"] .sale_pos .input-group {
    background: #334155 !important;
    border-color: #475569 !important;
}

[data-pos-theme="dark"] .sale_pos .input-group .form-control {
    background: #334155 !important;
    color: #F1F5F9 !important;
}

[data-pos-theme="dark"] .sale_pos .input-group-addon {
    background: #475569 !important;
    color: #94A3B8 !important;
}

[data-pos-theme="dark"] .product_box,
[data-pos-theme="dark"] .product-card {
    background: #1E293B !important;
    border-color: #334155 !important;
}

[data-pos-theme="dark"] .product_box:hover,
[data-pos-theme="dark"] .product-card:hover {
    border-color: #60A5FA !important;
}

[data-pos-theme="dark"] .product_box .product-name,
[data-pos-theme="dark"] .product-card .product-name {
    color: #F1F5F9 !important;
}

[data-pos-theme="dark"] .modal-content {
    background: #1E293B !important;
}

[data-pos-theme="dark"] .modal-body {
    background: #1E293B !important;
    color: #E2E8F0 !important;
}

[data-pos-theme="dark"] .modal-footer {
    background: #0F172A !important;
    border-color: #334155 !important;
}

/* Auto Theme (System Preference) */
@media (prefers-color-scheme: dark) {
    [data-pos-theme="auto"] body.lockscreen,
    [data-pos-theme="auto"] .lockscreen {
        background: #0F172A !important;
    }
    
    [data-pos-theme="auto"] .lockscreen main,
    [data-pos-theme="auto"] #scrollable-container {
        background: #0F172A !important;
    }
    
    [data-pos-theme="auto"] .sale_pos .tw-rounded-2xl,
    [data-pos-theme="auto"] .sale_pos .box-body {
        background: #1E293B !important;
        border-color: #334155 !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ENHANCED PAYMENT MODAL - Compact Premium Checkout Experience
   ═══════════════════════════════════════════════════════════════════════════ */

#modal_payment .modal-dialog {
    max-width: 850px !important;
}

#modal_payment .modal-content {
    border-radius: 20px !important;
    overflow: hidden !important;
    border: none !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
}

#modal_payment .modal-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%) !important;
    padding: 16px 24px !important;
    border-bottom: none !important;
}

#modal_payment .modal-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em !important;
}

#modal_payment .modal-body {
    padding: 20px 24px !important;
    background: var(--pos-surface-1) !important;
    max-height: 70vh !important;
    overflow-y: auto !important;
}

/* Payment Summary Card - Right Side (More Compact) */
#modal_payment .box.bg-orange,
#modal_payment .box-solid.bg-orange {
    background: linear-gradient(180deg, rgba(var(--color-text-rgb), 0.96) 0%, rgba(var(--color-primary-rgb), 0.96) 100%) !important;
    border-radius: 16px !important;
    border: none !important;
    box-shadow: 0 8px 24px rgba(var(--color-primary-rgb), 0.2) !important;
    overflow: hidden !important;
    position: sticky !important;
    top: 0 !important;
}

#modal_payment .box.bg-orange .box-body {
    padding: 16px !important;
    background: transparent !important;
}

#modal_payment .box.bg-orange .col-md-12 {
    padding: 0 8px !important;
}

#modal_payment .box.bg-orange strong {
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 10px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    display: block !important;
    margin-bottom: 2px !important;
}

#modal_payment .box.bg-orange .lead {
    font-size: 20px !important;
    font-weight: 800 !important;
    color: #FFFFFF !important;
    margin-bottom: 0 !important;
}

#modal_payment .box.bg-orange .total_payable_span {
    color: var(--color-accent) !important;
    font-size: 26px !important;
}

#modal_payment .box.bg-orange .total_paying {
    font-size: 18px !important;
}

#modal_payment .box.bg-orange .change_return_span {
    color: var(--color-info) !important;
    font-size: 18px !important;
}

#modal_payment .box.bg-orange .balance_due {
    color: var(--color-accent) !important;
    font-size: 18px !important;
}

#modal_payment .box.bg-orange .total_quantity {
    font-size: 16px !important;
}

#modal_payment .box.bg-orange hr {
    border-color: rgba(255, 255, 255, 0.1) !important;
    margin: 10px 0 !important;
}

/* Payment Row Styling - More Compact */
#modal_payment .payment_row {
    background: var(--pos-surface-2) !important;
    border-radius: 12px !important;
    padding: 14px 16px !important;
    margin-bottom: 12px !important;
    border: 1px solid var(--pos-stroke) !important;
    box-shadow: var(--pos-soft-shadow) !important;
}

#modal_payment .payment_row .box-body {
    padding: 0 !important;
}

#modal_payment .payment_row .col-md-4,
#modal_payment .payment_row .col-md-3,
#modal_payment .payment_row .col-md-6 {
    padding: 0 8px !important;
}

#modal_payment .payment_row .form-group {
    margin-bottom: 10px !important;
}

#modal_payment .payment_row .form-group label {
    font-weight: 600 !important;
    font-size: 11px !important;
    color: var(--pos-text-muted) !important;
    margin-bottom: 4px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
}

#modal_payment .payment_row .form-control {
    border: 1px solid var(--pos-stroke) !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    font-size: 13px !important;
    height: auto !important;
    transition: all 0.2s ease !important;
}

#modal_payment .payment_row .input-group-addon {
    padding: 8px 10px !important;
    font-size: 13px !important;
    border-radius: 8px 0 0 8px !important;
}

#modal_payment .payment_row .form-control:focus {
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 2px rgba(var(--color-primary-rgb), 0.12) !important;
}

/* Payment Amount Input - Clear but Compact */
#modal_payment .payment_row .payment-amount,
#modal_payment .payment_row input[name*="[amount]"] {
    font-size: 18px !important;
    font-weight: 700 !important;
    text-align: center !important;
    color: var(--color-secondary) !important;
    padding: 10px 12px !important;
    background: rgba(var(--color-secondary-rgb), 0.08) !important;
}

/* Add Payment Row Button - Smaller */
#add-payment-row {
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-primary) 100%) !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 10px 18px !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    box-shadow: 0 3px 10px rgba(var(--color-secondary-rgb), 0.24) !important;
    transition: all 0.2s ease !important;
}

#add-payment-row:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 14px rgba(var(--color-secondary-rgb), 0.32) !important;
}

/* Modal Footer - Compact */
#modal_payment .modal-footer {
    background: var(--pos-surface-2) !important;
    border-top: 1px solid var(--pos-stroke) !important;
    padding: 14px 24px !important;
    display: flex !important;
    gap: 10px !important;
    justify-content: flex-end !important;
}

#modal_payment #pos-save {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%) !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 12px 28px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 14px rgba(var(--color-primary-rgb), 0.3) !important;
    min-width: 180px !important;
}

#modal_payment #pos-save:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 20px rgba(var(--color-primary-rgb), 0.38) !important;
}

/* Sale/Staff Notes - Compact */
#modal_payment textarea.form-control {
    min-height: 60px !important;
    resize: none !important;
}

/* Change Return Section - Compact */
#modal_payment #change_return_payment_data .payment_row {
    background: rgba(var(--color-accent-rgb), 0.12) !important;
    border-color: rgba(var(--color-accent-rgb), 0.28) !important;
}

/* Advance Balance Display */
#modal_payment #advance_balance_text {
    font-weight: 700 !important;
    color: var(--color-info) !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   QUICK PAYMENT BUTTONS - Compact Fast Checkout
   ═══════════════════════════════════════════════════════════════════════════ */

.pos-quick-amounts {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.pos-quick-amount-btn {
    flex: 1;
    min-width: 70px;
    padding: 10px 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--pos-stroke);
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    color: var(--pos-text-strong);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.pos-quick-amount-btn:hover {
    border-color: rgba(var(--color-secondary-rgb), 0.6);
    background: rgba(var(--color-secondary-rgb), 0.08);
    color: var(--color-secondary);
}

.pos-quick-amount-btn.exact {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    border-color: transparent;
    color: #FFFFFF;
}

.pos-quick-amount-btn.exact:hover {
    box-shadow: 0 3px 12px rgba(var(--color-primary-rgb), 0.28);
}

/* Payment Method Cards - Compact Grid */
.pos-payment-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}

.pos-payment-method {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--pos-stroke);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pos-payment-method:hover {
    border-color: rgba(var(--color-primary-rgb), 0.6);
    box-shadow: 0 3px 10px rgba(var(--color-primary-rgb), 0.18);
    transform: translateY(-1px);
}

.pos-payment-method.active {
    border-color: rgba(var(--color-primary-rgb), 0.8);
    background: rgba(var(--color-primary-rgb), 0.12);
    border-width: 2px;
}

.pos-payment-method i {
    font-size: 20px;
    color: var(--pos-text-muted);
}

.pos-payment-method.active i {
    color: var(--color-primary);
}

.pos-payment-method span {
    font-size: 10px;
    font-weight: 600;
    color: var(--pos-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* Cash payment specific */
.pos-payment-method.cash i { color: var(--color-secondary); }
.pos-payment-method.card i { color: var(--color-primary); }
.pos-payment-method.bank i { color: var(--color-info); }
.pos-payment-method.mobile i { color: var(--color-accent); }
.pos-payment-method.cheque i { color: #64748B; }

/* ═══════════════════════════════════════════════════════════════════════════
   ENHANCED PRODUCT CARDS - Stock & Favorite Indicators
   ═══════════════════════════════════════════════════════════════════════════ */

/* Stock Level Indicator */
.product_box .stock-indicator,
.product-card .stock-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.stock-indicator.in-stock {
    background: #ECFDF5;
    color: #059669;
}

.stock-indicator.low-stock {
    background: #FFFBEB;
    color: #D97706;
}

.stock-indicator.out-of-stock {
    background: #FEF2F2;
    color: #DC2626;
}

/* Favorite Button */
.product_box .favorite-btn,
.product-card .favorite-btn {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.product_box .favorite-btn i,
.product-card .favorite-btn i {
    color: #CBD5E1;
    font-size: 14px;
    transition: all 0.2s ease;
}

.product_box .favorite-btn:hover i,
.product-card .favorite-btn:hover i {
    color: #EF4444;
    transform: scale(1.1);
}

.product_box .favorite-btn.active i,
.product-card .favorite-btn.active i {
    color: #EF4444;
}

/* Quick Add to Cart Animation */
.product_box.adding,
.product-card.adding {
    animation: pulse-add 0.3s ease;
}

@keyframes pulse-add {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); background: #ECFDF5; }
    100% { transform: scale(1); }
}

/* Quantity Badge on Product */
.product_box .cart-qty-badge,
.product-card .cart-qty-badge {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: #FFFFFF;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    display: none;
}

.product_box.in-cart .cart-qty-badge,
.product-card.in-cart .cart-qty-badge {
    display: block;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CHECKOUT SUMMARY PANEL - Sticky Cart Summary
   ═══════════════════════════════════════════════════════════════════════════ */

.pos-checkout-summary {
    position: sticky;
    top: 12px;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.98) 0%, rgba(11, 18, 32, 0.95) 100%);
    border-radius: 20px;
    border: 1px solid var(--pos-stroke);
    padding: 20px;
    box-shadow: var(--pos-glow);
}

.pos-checkout-summary .summary-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #E2E8F0;
}

.pos-checkout-summary .summary-header h3 {
    font-size: 16px;
    font-weight: 800;
    color: #1E293B;
    margin: 0;
}

.pos-checkout-summary .item-count {
    background: #3B82F6;
    color: #FFFFFF;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

/* Customer Info */
.pos-checkout-summary .customer-info {
    background: #EFF6FF;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 16px;
}

.pos-checkout-summary .customer-info .name {
    font-weight: 700;
    color: #1E40AF;
    margin-bottom: 4px;
}

.pos-checkout-summary .customer-info .balance {
    font-size: 13px;
    color: #64748B;
}

/* Summary Lines */
.pos-checkout-summary .summary-lines {
    margin-bottom: 16px;
}

.pos-checkout-summary .summary-line {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed #E2E8F0;
}

.pos-checkout-summary .summary-line:last-child {
    border-bottom: none;
}

.pos-checkout-summary .summary-line label {
    color: #64748B;
    font-weight: 500;
    font-size: 14px;
}

.pos-checkout-summary .summary-line span {
    color: #334155;
    font-weight: 600;
    font-size: 14px;
}

.pos-checkout-summary .summary-line.discount span {
    color: #EF4444;
}

.pos-checkout-summary .summary-line.tax span {
    color: #64748B;
}

/* Grand Total */
.pos-checkout-summary .grand-total {
    background: linear-gradient(135deg, #0F172A 0%, #1E3A5F 100%);
    margin: 0 -20px -20px -20px;
    padding: 20px;
    border-radius: 0 0 20px 20px;
}

.pos-checkout-summary .grand-total label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 4px;
}

.pos-checkout-summary .grand-total span {
    color: #10B981;
    font-size: 32px;
    font-weight: 900;
}

/* ═══════════════════════════════════════════════════════════════════════════
   NUMPAD FOR PAYMENT INPUT
   ═══════════════════════════════════════════════════════════════════════════ */

.pos-numpad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    max-width: 280px;
    margin: 0 auto;
}

.pos-numpad-btn {
    aspect-ratio: 1.5;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--pos-stroke);
    border-radius: 12px;
    font-size: 20px;
    font-weight: 700;
    color: var(--pos-text-strong);
    cursor: pointer;
    transition: all 0.15s ease;
}

.pos-numpad-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(56, 189, 248, 0.4);
}

.pos-numpad-btn:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.18);
}

.pos-numpad-btn.clear {
    background: #FEF2F2;
    border-color: #FECACA;
    color: #EF4444;
}

.pos-numpad-btn.backspace {
    background: #FFFBEB;
    border-color: #FDE68A;
    color: #D97706;
}

.pos-numpad-btn.enter {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    border-color: transparent;
    color: #FFFFFF;
    grid-column: span 3;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TRANSACTION SUCCESS ANIMATION
   ═══════════════════════════════════════════════════════════════════════════ */

.pos-success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(16, 185, 129, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.pos-success-overlay.show {
    opacity: 1;
    visibility: visible;
}

.pos-success-overlay .success-icon {
    width: 100px;
    height: 100px;
    background: rgba(52, 211, 153, 0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    animation: success-bounce 0.5s ease;
}

.pos-success-overlay .success-icon i {
    font-size: 48px;
    color: #10B981;
}

.pos-success-overlay h2 {
    color: #FFFFFF;
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
}

.pos-success-overlay .amount {
    color: #FFFFFF;
    font-size: 48px;
    font-weight: 900;
}

@keyframes success-bounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SPLIT SCREEN LAYOUT FOR LARGE DISPLAYS
   ═══════════════════════════════════════════════════════════════════════════ */

@media (min-width: 1440px) {
    .sale_pos .col-md-7 {
        width: 60% !important;
    }
    
    .sale_pos .col-md-5 {
        width: 40% !important;
    }
    
    .pos-checkout-summary {
        min-height: calc(100vh - 250px);
    }
}

/* Ultra-wide support */
@media (min-width: 1920px) {
    .pos-header > .tw-flex {
        max-width: 1800px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    .sale_pos .content.no-print {
        max-width: 1800px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   KEYBOARD SHORTCUTS HINT OVERLAY
   ═══════════════════════════════════════════════════════════════════════════ */

.pos-shortcuts-hint {
    position: fixed;
    bottom: 100px;
    left: 20px;
    background: var(--pos-surface-1);
    border-radius: 16px;
    padding: 16px 20px;
    box-shadow: var(--pos-glow);
    border: 1px solid var(--pos-stroke);
    z-index: 1000;
    display: none;
}

.pos-shortcuts-hint.show {
    display: block;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.pos-shortcuts-hint h4 {
    font-size: 12px;
    font-weight: 700;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.pos-shortcut-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.pos-shortcut-item kbd {
    background: #F1F5F9;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #334155;
    border: 1px solid #E2E8F0;
}

.pos-shortcut-item span {
    font-size: 13px;
    color: #64748B;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RECENT PRODUCTS SECTION
   ═══════════════════════════════════════════════════════════════════════════ */

.pos-recent-products {
    background: var(--pos-surface-1);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid var(--pos-stroke);
    box-shadow: var(--pos-soft-shadow);
}

.pos-recent-products h4 {
    font-size: 12px;
    font-weight: 700;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pos-recent-products h4 i {
    color: #8B5CF6;
}

.recent-products-grid {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
}

.recent-product-item {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--pos-stroke);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 80px;
    max-width: 100px;
}

.recent-product-item:hover {
    border-color: rgba(56, 189, 248, 0.5);
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.recent-product-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 8px;
}

.recent-product-item i {
    font-size: 24px;
    color: #94A3B8;
}

.recent-product-item .name {
    font-size: 11px;
    font-weight: 600;
    color: #334155;
    text-align: center;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

.recent-product-item .price {
    font-size: 11px;
    font-weight: 700;
    color: #059669;
}

.recent-empty {
    color: #94A3B8;
    font-size: 13px;
    text-align: center;
    padding: 16px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SALES DASHBOARD - Header Stats
   ═══════════════════════════════════════════════════════════════════════════ */

.pos-sales-dashboard {
    display: flex;
    gap: 12px;
    margin-left: 16px;
}

.dashboard-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.dashboard-stat i {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
}

.dashboard-stat .stat-content {
    display: flex;
    flex-direction: column;
}

.dashboard-stat .label {
    font-size: 10px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dashboard-stat .value {
    font-size: 14px;
    font-weight: 800;
    color: #FFFFFF;
}

.dashboard-stat.today-sales i { color: #10B981; }
.dashboard-stat.today-sales .value { color: #34D399; }

.dashboard-stat.transactions i { color: #38BDF8; }

.dashboard-stat.goal-progress.low i,
.dashboard-stat.goal-progress.low .value { color: #EF4444; }

.dashboard-stat.goal-progress.medium i,
.dashboard-stat.goal-progress.medium .value { color: #F59E0B; }

.dashboard-stat.goal-progress.high i,
.dashboard-stat.goal-progress.high .value { color: #10B981; }

/* ═══════════════════════════════════════════════════════════════════════════
   STOCK ALERTS
   ═══════════════════════════════════════════════════════════════════════════ */

.product_box.stock-low,
.product-card.stock-low {
    border-color: #F59E0B !important;
    background: linear-gradient(180deg, #FFFBEB 0%, #FEF3C7 100%) !important;
}

.product_box.stock-out,
.product-card.stock-out {
    border-color: #EF4444 !important;
    opacity: 0.7;
    position: relative;
}

.product_box.stock-out::after,
.product-card.stock-out::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.5);
    border-radius: inherit;
    pointer-events: none;
}

.stock-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    z-index: 10;
}

.stock-indicator.in-stock {
    background: #ECFDF5;
    color: #059669;
}

.stock-indicator.low-stock {
    background: #FEF3C7;
    color: #D97706;
    animation: pulse-warning 2s ease-in-out infinite;
}

.stock-indicator.out-of-stock {
    background: #FEE2E2;
    color: #DC2626;
}

@keyframes pulse-warning {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   DENOMINATION CALCULATOR
   ═══════════════════════════════════════════════════════════════════════════ */

.denomination-display {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed rgba(255, 255, 255, 0.2);
}

.denomination-display h5 {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.denomination-display h5 i {
    color: #F59E0B;
}

.denomination-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.denom-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 12px;
    color: #FFFFFF;
}

.denom-value {
    font-weight: 800;
    color: #F59E0B;
}

.denom-count {
    font-weight: 600;
    color: #38BDF8;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SWIPE TO DELETE
   ═══════════════════════════════════════════════════════════════════════════ */

#pos_table tbody tr {
    transition: transform 0.2s ease, background-color 0.15s ease;
}

#pos_table tbody tr.swiping {
    background: #FEE2E2 !important;
}

#pos_table tbody tr.swipe-delete {
    animation: swipeOut 0.3s ease forwards;
}

@keyframes swipeOut {
    to {
        transform: translateX(-100%);
        opacity: 0;
        height: 0;
    }
}

/* Swipe hint - Disabled to fix table layout
@media (max-width: 768px) {
    #pos_table tbody tr::after {
        content: '';
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 40px;
        height: 40px;
        background: #EF4444;
        border-radius: 50%;
        opacity: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: opacity 0.2s ease;
    }
    
    #pos_table tbody tr.swiping::after {
        opacity: 0.3;
    }
}
*/

/* ═══════════════════════════════════════════════════════════════════════════
   UNDO BUTTON
   ═══════════════════════════════════════════════════════════════════════════ */

.pos-undo-btn {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
    color: #FFFFFF;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
    cursor: pointer;
    z-index: 1001;
    animation: slideUp 0.3s ease;
    transition: all 0.2s ease;
}

.pos-undo-btn:hover {
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 6px 28px rgba(139, 92, 246, 0.5);
}

.pos-undo-btn i {
    font-size: 16px;
}

.pos-undo-btn .undo-timer {
    font-size: 12px;
    opacity: 0.8;
    font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CONNECTION STATUS
   ═══════════════════════════════════════════════════════════════════════════ */

.pos-connection-status {
    position: fixed;
    top: 12px;
    right: 12px;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 1002;
    transition: all 0.3s ease;
}

.pos-connection-status.online {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.pos-connection-status.offline {
    background: rgba(239, 68, 68, 0.15);
    color: #DC2626;
    border: 1px solid rgba(239, 68, 68, 0.3);
    animation: pulse-offline 2s ease-in-out infinite;
}

@keyframes pulse-offline {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.02); }
}

.pos-connection-status i {
    font-size: 14px;
}

.pos-connection-status .status-text {
    display: none;
}

@media (min-width: 768px) {
    .pos-connection-status .status-text {
        display: inline;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   COMPACT MODE
   ═══════════════════════════════════════════════════════════════════════════ */

.pos-compact-toggle {
    position: fixed;
    bottom: 156px;
    right: 20px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #64748B 0%, #475569 100%);
    color: #FFFFFF;
    border: none;
    box-shadow: 0 4px 14px rgba(100, 116, 139, 0.35);
    cursor: pointer;
    z-index: 9997;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s ease;
}

.pos-compact-toggle:hover {
    transform: scale(1.1);
}

/* Compact Mode Styles */
body.pos-compact .pos-header > .tw-flex {
    padding: 10px 16px !important;
    margin: 6px !important;
}

body.pos-compact #pos_table thead th {
    padding: 10px 12px !important;
    font-size: 10px !important;
}

body.pos-compact #pos_table tbody td {
    padding: 8px 12px !important;
    font-size: 13px !important;
}

body.pos-compact .product_box,
body.pos-compact .product-card {
    padding: 10px !important;
}

body.pos-compact .product_box img,
body.pos-compact .product-card img {
    height: 60px !important;
}

body.pos-compact .product_box .product-name,
body.pos-compact .product-card .product-name {
    font-size: 11px !important;
}

body.pos-compact .pos-form-actions {
    padding: 12px 16px !important;
}

body.pos-compact .pos-form-actions button {
    padding: 10px 16px !important;
    font-size: 12px !important;
}

body.pos-compact .sale_pos .tw-rounded-2xl {
    padding: 12px !important;
    margin: 0 8px !important;
}

body.pos-compact .sale_pos .input-group {
    border-radius: 8px !important;
}

body.pos-compact .sale_pos .input-group-addon,
body.pos-compact .sale_pos .input-group .form-control {
    padding: 10px 12px !important;
    font-size: 13px !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   INLINE QUANTITY EDIT
   ═══════════════════════════════════════════════════════════════════════════ */

#pos_table .pos_quantity {
    cursor: pointer;
    transition: all 0.2s ease;
}

#pos_table .pos_quantity:hover {
    border-color: rgba(56, 189, 248, 0.6) !important;
    background: rgba(56, 189, 248, 0.08) !important;
}

#pos_table .pos_quantity:focus {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(56, 189, 248, 0.6) !important;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25) !important;
}

/* Quick quantity buttons */
.qty-quick-btns {
    display: none;
    gap: 4px;
    margin-top: 6px;
}

#pos_table tbody tr:hover .qty-quick-btns {
    display: inline-flex;
}

.qty-quick-btn {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 1px solid var(--pos-stroke);
    background: rgba(255, 255, 255, 0.06);
    color: var(--pos-text-strong);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.qty-quick-btn:hover {
    background: #38BDF8;
    color: #FFFFFF;
    border-color: #38BDF8;
}

/* ═══════════════════════════════════════════════════════════════════════════
   OFFLINE QUEUE INDICATOR
   ═══════════════════════════════════════════════════════════════════════════ */

.pos-offline-queue {
    position: fixed;
    bottom: 180px;
    right: 20px;
    padding: 10px 16px;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.6);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: #FBBF24;
    display: none;
    align-items: center;
    gap: 8px;
    z-index: 1000;
}

.pos-offline-queue.show {
    display: flex;
    animation: slideUp 0.3s ease;
}

.pos-offline-queue .queue-count {
    background: #F59E0B;
    color: #FFFFFF;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE ADJUSTMENTS FOR NEW FEATURES
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .pos-sales-dashboard {
        display: none;
    }
    
    .pos-undo-btn {
        bottom: 160px;
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .pos-compact-toggle {
        bottom: 210px;
        width: 38px;
        height: 38px;
    }
    
    .pos-theme-toggle {
        bottom: 160px !important;
        width: 38px !important;
        height: 38px !important;
    }
    
    .pos-connection-status {
        top: auto;
        bottom: 260px;
        right: 20px;
        padding: 6px 10px;
    }
    
    .denomination-display {
        padding: 12px;
    }
    
    .denom-item {
        padding: 4px 8px;
        font-size: 11px;
    }
}

/* Hide dashboard on very small screens */
@media (max-width: 480px) {
    .recent-product-item {
        min-width: 70px;
        padding: 8px;
    }
    
    .recent-product-item img {
        width: 32px;
        height: 32px;
    }
}

/* Large screens - show more info */
@media (min-width: 1440px) {
    .dashboard-stat {
        padding: 10px 18px;
    }
    
    .dashboard-stat .value {
        font-size: 16px;
    }
    
    .pos-sales-dashboard {
        gap: 16px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   M-PESA STK PUSH STYLES - Compact Design
   ═══════════════════════════════════════════════════════════════════════════ */

/* M-Pesa Payment Method Button */
.pos-payment-method.mpesa {
    background: linear-gradient(135deg, #22C55E 0%, #16A34A 100%) !important;
    color: #FFFFFF !important;
    border: 1px solid #16A34A !important;
}

.pos-payment-method.mpesa:hover {
    background: linear-gradient(135deg, #16A34A 0%, #15803D 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35) !important;
}

.pos-payment-method.mpesa.active {
    background: linear-gradient(135deg, #15803D 0%, #166534 100%) !important;
    border-color: #166534 !important;
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.25), 0 4px 14px rgba(22, 163, 74, 0.35) !important;
}

.pos-payment-method.mpesa i {
    color: #FFFFFF !important;
    font-size: 18px !important;
}

.pos-payment-method.mpesa span {
    color: #FFFFFF !important;
    font-weight: 700 !important;
}

/* M-Pesa Section Styling */
#mpesa_stk_section {
    padding: 12px 0 !important;
}

#mpesa_stk_section .form-group {
    margin-bottom: 10px !important;
}

#mpesa_stk_section .form-group label {
    font-size: 11px !important;
    margin-bottom: 4px !important;
}

#mpesa_stk_section .form-control {
    border-radius: 8px;
    border: 1px solid #D1FAE5;
    padding: 8px 12px;
    font-size: 13px;
}

#mpesa_stk_section .form-control:focus {
    border-color: #22C55E;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.1);
}

#mpesa_stk_section .input-group-addon {
    border-radius: 8px 0 0 8px;
    border: 1px solid #D1FAE5;
    border-right: none;
    padding: 8px 10px;
    font-size: 13px;
}

/* STK Push Button - Compact */
#initiate_stk_push {
    background: linear-gradient(135deg, #22C55E 0%, #16A34A 100%) !important;
    border: none !important;
    border-radius: 10px !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    padding: 10px 18px !important;
    box-shadow: 0 3px 12px rgba(34, 197, 94, 0.3) !important;
    transition: all 0.2s ease !important;
}

#initiate_stk_push:hover:not(:disabled) {
    background: linear-gradient(135deg, #16A34A 0%, #15803D 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.4) !important;
}

#initiate_stk_push:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Pending M-Pesa Items - Compact */
#pending_mpesa_payments {
    margin-top: 10px !important;
}

#pending_mpesa_payments .list-group {
    max-height: 180px;
    overflow-y: auto;
}

.pending-mpesa-item {
    padding: 10px 12px !important;
    border-radius: 8px !important;
    margin-bottom: 6px !important;
    transition: all 0.2s ease;
}

.pending-mpesa-item:hover {
    transform: translateX(3px);
}

.pending-mpesa-item.selected {
    border-color: #22C55E !important;
    background: #F0FDF4 !important;
}

.pending-mpesa-item .tw-font-semibold {
    font-size: 13px !important;
}

.pending-mpesa-item .tw-text-xs {
    font-size: 10px !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   POS TABLE - DARAJA BRANDED DESIGN
   Professional cart table with BlueBridge Group styling
   Uses class-based column selectors for reliability with optional/hidden columns
   ═══════════════════════════════════════════════════════════════════════════ */

/* Table Container - Scrollable with sticky header */
.pos_product_div {
    background: var(--pos-surface-1) !important;
    border-radius: 16px !important;
    padding: 0 !important;
    overflow: hidden !important;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08) !important;
    border: 1px solid var(--pos-stroke) !important;
    margin-bottom: 10px !important;
    max-height: 400px !important;
    overflow-y: auto !important;
    position: relative !important;
}

/* Custom Scrollbar Styling */
.pos_product_div::-webkit-scrollbar {
    width: 8px !important;
}

.pos_product_div::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04) !important;
    border-radius: 4px !important;
}

.pos_product_div::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #3B82F6 0%, #1E3A5F 100%) !important;
    border-radius: 4px !important;
    border: 2px solid rgba(255, 255, 255, 0.08) !important;
}

.pos_product_div::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #2563EB 0%, #0F172A 100%) !important;
}

/* Table Base */
#pos_table {
    width: 100% !important;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    margin-bottom: 0 !important;
    border: none !important;
}

/* Table Header - Daraja Branding with Sticky Position */
#pos_table thead {
    background: linear-gradient(135deg, #0F172A 0%, #1E3A5F 100%) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
}

#pos_table thead tr {
    border: none !important;
}

#pos_table thead th {
    background: linear-gradient(135deg, #0F172A 0%, #1E3A5F 100%) !important;
    color: #FFFFFF !important;
    font-weight: 700 !important;
    font-size: 11px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    padding: 14px 12px !important;
    border: none !important;
    border-bottom: 2px solid #3B82F6 !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
}

#pos_table thead th i.fa-info-circle {
    color: #38BDF8 !important;
    margin-left: 4px !important;
}

#pos_table thead th i.fa-times {
    color: #F87171 !important;
    font-size: 14px !important;
}

/* Hide the Price column completely */
#pos_table thead th.hide,
#pos_table thead th.price-col.hide,
#pos_table tbody td.hide,
#pos_table tbody td.price-col.hide {
    display: none !important;
}

/* Table Body Rows */
#pos_table tbody tr.product_row {
    background: rgba(255, 255, 255, 0.02) !important;
    transition: all 0.15s ease !important;
}

#pos_table tbody tr.product_row:hover {
    background: rgba(255, 255, 255, 0.06) !important;
}

#pos_table tbody tr.product_row:nth-child(even) {
    background: rgba(255, 255, 255, 0.03) !important;
}

#pos_table tbody td {
    padding: 10px 12px !important;
    vertical-align: middle !important;
    border: none !important;
    border-bottom: 1px solid var(--pos-divider) !important;
}

/* ===== PRODUCT COLUMN ===== */
#pos_table thead th.product-col,
#pos_table tbody td.product-col {
    min-width: 180px !important;
    text-align: left !important;
    padding-left: 16px !important;
}

#pos_table tbody td.product-col > div[title] {
    display: inline-block !important;
    vertical-align: middle !important;
}

#pos_table tbody td.product-col .text-link {
    color: #1E3A5F !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    text-decoration: none !important;
    line-height: 1.3 !important;
}

#pos_table tbody td.product-col .text-link:hover {
    color: #3B82F6 !important;
}

#pos_table tbody td.product-col .text-link i {
    color: #3B82F6 !important;
    font-size: 11px !important;
    margin-left: 4px !important;
}

/* Product Image */
#pos_table tbody td.product-col img {
    width: 44px !important;
    height: 44px !important;
    object-fit: cover !important;
    border-radius: 8px !important;
    border: 2px solid #E2E8F0 !important;
    margin-left: 8px !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06) !important;
    vertical-align: middle !important;
    display: inline-block !important;
}

/* Stock Info Badge */
#pos_table tbody td.product-col small.text-muted {
    display: block !important;
    margin-top: 6px !important;
    padding: 2px 8px !important;
    background: #ECFDF5 !important;
    color: #059669 !important;
    border-radius: 10px !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    width: fit-content !important;
}

/* ===== QUANTITY COLUMN ===== */
#pos_table thead th.quantity-col,
#pos_table tbody td.quantity-col {
    text-align: center !important;
    min-width: 160px !important;
    padding: 8px 10px !important;
}

/* Quantity Input Group Container */
#pos_table tbody td.quantity-col .input-group.input-number,
#pos_table tbody td .input-group.input-number {
    display: inline-flex !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    align-items: center !important;
    background: #F1F5F9 !important;
    border-radius: 10px !important;
    padding: 4px !important;
    border: 1px solid #E2E8F0 !important;
    width: auto !important;
    max-width: 140px !important;
}

/* Button containers */
#pos_table tbody td.quantity-col .input-group-btn,
#pos_table tbody td .input-group.input-number .input-group-btn {
    display: flex !important;
    width: auto !important;
    flex-shrink: 0 !important;
}

/* + and - Buttons */
#pos_table tbody td.quantity-col .input-group-btn .btn,
#pos_table tbody td .input-group.input-number .input-group-btn .btn {
    background: rgba(255, 255, 255, 0.06) !important;
    border: none !important;
    border-radius: 8px !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
    transition: all 0.15s ease !important;
    margin: 0 !important;
}

#pos_table tbody td.quantity-col .input-group-btn .btn:hover,
#pos_table tbody td .input-group.input-number .input-group-btn .btn:hover {
    transform: scale(1.08) !important;
    background: rgba(255, 255, 255, 0.12) !important;
}

/* Minus button icon */
#pos_table tbody td.quantity-col .quantity-down i,
#pos_table tbody td .input-group.input-number .quantity-down i,
#pos_table tbody td .btn-flat.quantity-down i {
    color: #EF4444 !important;
    font-size: 12px !important;
}

/* Plus button icon */
#pos_table tbody td.quantity-col .quantity-up i,
#pos_table tbody td .input-group.input-number .quantity-up i,
#pos_table tbody td .btn-flat.quantity-up i {
    color: #10B981 !important;
    font-size: 12px !important;
}

/* Quantity Input Field */
#pos_table tbody td.quantity-col .pos_quantity,
#pos_table tbody td .input-group.input-number .pos_quantity,
#pos_table tbody td .input-group.input-number .input_quantity {
    width: 55px !important;
    min-width: 50px !important;
    max-width: 60px !important;
    text-align: center !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    color: #1E3A5F !important;
    background: transparent !important;
    border: none !important;
    padding: 4px 2px !important;
    flex-shrink: 0 !important;
    -moz-appearance: textfield !important;
}

/* Remove spinner buttons from number inputs */
#pos_table tbody td .pos_quantity::-webkit-outer-spin-button,
#pos_table tbody td .pos_quantity::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

/* Sub Unit Selector */
#pos_table tbody td.quantity-col .sub_unit,
#pos_table tbody td .sub_unit {
    display: block !important;
    margin-top: 6px !important;
    font-size: 10px !important;
    padding: 4px 8px !important;
    border-radius: 6px !important;
    border: 1px solid var(--pos-stroke) !important;
    background: rgba(255, 255, 255, 0.06) !important;
    max-width: 100px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: auto !important;
}

/* ===== SUBTOTAL COLUMN ===== */
#pos_table thead th.subtotal-col,
#pos_table tbody td.subtotal-col {
    text-align: right !important;
    min-width: 100px !important;
    padding-right: 16px !important;
}

#pos_table tbody td.subtotal-col .pos_line_total_text {
    font-weight: 800 !important;
    font-size: 14px !important;
    color: #059669 !important;
}

#pos_table tbody td.subtotal-col .pos_line_total {
    text-align: right !important;
    font-weight: 700 !important;
    color: #059669 !important;
}

/* ===== DELETE/ACTION COLUMN ===== */
#pos_table thead th.delete-col,
#pos_table tbody td.delete-col {
    width: 70px !important;
    min-width: 70px !important;
    max-width: 80px !important;
    text-align: center !important;
    padding: 10px 8px !important;
}

/* Remove Button - Styled as a proper button */
#pos_table tbody td.delete-col .pos_remove_row,
#pos_table tbody td.delete-col button.pos_remove_row {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 34px !important;
    height: 34px !important;
    background: #FEE2E2 !important;
    color: #DC2626 !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    border: 1px solid #FECACA !important;
    padding: 0 !important;
}

#pos_table tbody td.delete-col .pos_remove_row:hover,
#pos_table tbody td.delete-col button.pos_remove_row:hover {
    background: #DC2626 !important;
    color: #FFFFFF !important;
    transform: scale(1.1) !important;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3) !important;
}

/* Empty Cart State */
#pos_table tbody:empty::after {
    content: 'No products added yet';
    display: block;
    text-align: center;
    padding: 40px 20px;
    color: #94A3B8;
    font-size: 14px;
    font-style: italic;
}

/* Validation Error Styling */
#pos_table tbody td .error {
    color: #EF4444 !important;
    font-size: 10px !important;
    margin-top: 4px !important;
    display: block !important;
}

#pos_table tbody td .pos_quantity.error {
    border: 2px solid #EF4444 !important;
    border-radius: 6px !important;
    background: #FEF2F2 !important;
}

/* Modal hidden in product cell */
#pos_table tbody td.product-col .modal {
    display: none;
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {
    #pos_table thead th {
        padding: 10px 8px !important;
        font-size: 9px !important;
    }
    
    #pos_table tbody td {
        padding: 8px 6px !important;
    }
    
    #pos_table thead th.product-col,
    #pos_table tbody td.product-col {
        min-width: 120px !important;
        padding-left: 8px !important;
    }
    
    #pos_table tbody td.product-col img {
        width: 36px !important;
        height: 36px !important;
    }
    
    #pos_table tbody td.product-col .text-link {
        font-size: 11px !important;
    }
    
    #pos_table tbody td.product-col small.text-muted {
        display: none !important;
    }
    
    #pos_table thead th.quantity-col,
    #pos_table tbody td.quantity-col {
        min-width: 100px !important;
    }
    
    #pos_table tbody td.quantity-col .pos_quantity {
        width: 40px !important;
        font-size: 12px !important;
    }
    
    #pos_table tbody td.quantity-col .input-group-btn .btn {
        width: 26px !important;
        height: 26px !important;
    }
    
    #pos_table tbody td.quantity-col .sub_unit {
        display: none !important;
    }
    
    #pos_table tbody td.subtotal-col .pos_line_total_text {
        font-size: 12px !important;
    }
    
    #pos_table tbody td.delete-col .pos_remove_row,
    #pos_table tbody td.delete-col button.pos_remove_row {
        width: 28px !important;
        height: 28px !important;
        font-size: 12px !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   HIDE SALES DASHBOARD (per user request)
   ═══════════════════════════════════════════════════════════════════════════ */

.pos-sales-dashboard {
    display: none !important;
}

/* Keep connection status visible */
.pos-connection-status {
    display: flex !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   POS SIDEBAR - MODERN FILTER & PRODUCT GRID
   Enhanced UI for Category, Brand filters and Product display
   ═══════════════════════════════════════════════════════════════════════════ */

/* Filter Buttons - Category & Brand */
.pos-filter-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    width: 100% !important;
    height: 52px !important;
    padding: 0 20px !important;
    border-radius: 14px !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    cursor: pointer !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: none !important;
    position: relative !important;
    overflow: hidden !important;
    background: linear-gradient(135deg, #00A6E7 0%, #0F1F3D 100%) !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 15px rgba(0, 166, 231, 0.32), 0 2px 6px rgba(15, 31, 61, 0.18) !important;
}

.pos-filter-btn::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent) !important;
    transition: left 0.5s ease !important;
}

.pos-filter-btn:hover::before {
    left: 100% !important;
}

.pos-filter-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(0, 166, 231, 0.38), 0 4px 12px rgba(15, 31, 61, 0.2) !important;
}

.pos-filter-btn:active {
    transform: translateY(0) scale(0.98) !important;
}

.pos-filter-btn-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 28px !important;
    height: 28px !important;
    background: rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px !important;
}

.pos-filter-btn-text {
    font-weight: 600 !important;
    letter-spacing: 0.02em !important;
}

.pos-filter-badge {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 22px !important;
    height: 22px !important;
    padding: 0 6px !important;
    background: rgba(255, 255, 255, 0.12) !important;
    color: #38BDF8 !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    border-radius: 11px !important;
}

/* Brand Button Variant */
.pos-filter-btn-brand {
    background: linear-gradient(135deg, #7C5BA3 0%, #00A6E7 100%) !important;
    box-shadow: 0 4px 15px rgba(124, 91, 163, 0.32), 0 2px 6px rgba(0, 166, 231, 0.22) !important;
}

.pos-filter-btn-brand:hover {
    box-shadow: 0 8px 25px rgba(124, 91, 163, 0.42), 0 4px 12px rgba(0, 166, 231, 0.28) !important;
}

/* Featured Products Toggle Button */
.pos-featured-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 12px 20px !important;
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%) !important;
    color: #FFFFFF !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    border-radius: 12px !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3) !important;
}

.pos-featured-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4) !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DRAWER PANEL - Slide-out Category/Brand Panels
   ═══════════════════════════════════════════════════════════════════════════ */

.pos-drawer-panel {
    width: 50vw !important;
    max-width: 600px !important;
    min-height: 100vh !important;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.98) 0%, rgba(11, 18, 32, 0.95) 100%) !important;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: -10px 0 50px rgba(0, 0, 0, 0.15) !important;
    position: relative !important;
    z-index: 3600 !important;
}

@media (max-width: 768px) {
    .pos-drawer-panel {
        width: 85vw !important;
    }
}

.pos-drawer-header {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 20px 24px !important;
    background: linear-gradient(135deg, #38BDF8 0%, #34D399 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.pos-drawer-title {
    flex: 1 !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    color: #FFFFFF !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    margin: 0 !important;
}

.pos-drawer-back-btn,
.pos-drawer-close-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 10px !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.pos-drawer-back-btn {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #FFFFFF !important;
}

.pos-drawer-back-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

.pos-drawer-close-btn {
    background: rgba(239, 68, 68, 0.2) !important;
    color: #FCA5A5 !important;
}

.pos-drawer-close-btn:hover {
    background: #EF4444 !important;
    color: #FFFFFF !important;
}

/* Drawer Search Box */
.pos-drawer-search {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin: 16px 24px !important;
    padding: 12px 16px !important;
    background: var(--pos-surface-2) !important;
    border: 1px solid var(--pos-stroke) !important;
    border-radius: 12px !important;
    transition: all 0.2s ease !important;
}

.pos-drawer-search:focus-within {
    border-color: rgba(56, 189, 248, 0.6) !important;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2) !important;
}

.pos-drawer-search-input {
    flex: 1 !important;
    border: none !important;
    outline: none !important;
    font-size: 15px !important;
    color: var(--pos-text-strong) !important;
    background: transparent !important;
}

.pos-drawer-search-input::placeholder {
    color: #94A3B8 !important;
}

/* Drawer Content Area */
.pos-drawer-content {
    flex: 1 !important;
    padding: 0 24px 24px !important;
    overflow-y: auto !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FILTER CARDS - Category & Brand Grid Items
   ═══════════════════════════════════════════════════════════════════════════ */

.pos-filter-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
    gap: 16px !important;
}

@media (max-width: 480px) {
    .pos-filter-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
}

.pos-filter-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 20px 16px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--pos-stroke) !important;
    border-radius: 16px !important;
    cursor: pointer !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    text-align: center !important;
    position: relative !important;
    overflow: hidden !important;
}

.pos-filter-card::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 4px !important;
    background: linear-gradient(90deg, #4F46E5, #7C3AED) !important;
    opacity: 0 !important;
    transition: opacity 0.2s ease !important;
}

.pos-filter-card:hover {
    border-color: #A5B4FC !important;
    transform: translateY(-4px) !important;
    box-shadow: 0 12px 24px rgba(79, 70, 229, 0.15), 0 4px 8px rgba(0, 0, 0, 0.08) !important;
}

.pos-filter-card:hover::before {
    opacity: 1 !important;
}

.pos-filter-card:active {
    transform: translateY(-2px) scale(0.98) !important;
}

/* All Categories/Brands Special Card */
.pos-filter-card-all {
    background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%) !important;
    border-color: #C7D2FE !important;
}

.pos-filter-card-all .pos-filter-card-icon {
    background: linear-gradient(135deg, #4F46E5 0%, #6366F1 100%) !important;
    color: #FFFFFF !important;
}

.pos-filter-card-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 56px !important;
    height: 56px !important;
    background: linear-gradient(135deg, #F1F5F9 0%, #E2E8F0 100%) !important;
    border-radius: 14px !important;
    color: #475569 !important;
    transition: all 0.2s ease !important;
}

.pos-filter-card:hover .pos-filter-card-icon {
    background: linear-gradient(135deg, #4F46E5 0%, #6366F1 100%) !important;
    color: #FFFFFF !important;
    transform: scale(1.1) !important;
}

.pos-filter-card-icon-sub {
    width: 48px !important;
    height: 48px !important;
    background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%) !important;
    color: #059669 !important;
}

.pos-filter-card-icon-brand {
    background: linear-gradient(135deg, #F5F3FF 0%, #EDE9FE 100%) !important;
    color: #7C3AED !important;
}

.pos-filter-card:hover .pos-filter-card-icon-brand {
    background: linear-gradient(135deg, #7C3AED 0%, #8B5CF6 100%) !important;
}

.pos-filter-card-name {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #1E293B !important;
    line-height: 1.3 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
}

/* Action Buttons on Cards */
.pos-filter-card-actions {
    display: flex !important;
    gap: 8px !important;
    margin-top: 4px !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
}

.pos-filter-action-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 6px 12px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    border: 1.5px solid var(--pos-stroke) !important;
    background: rgba(255, 255, 255, 0.06) !important;
    color: var(--pos-text-strong) !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.pos-filter-action-btn:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(56, 189, 248, 0.4) !important;
}

.pos-filter-action-btn-primary {
    background: linear-gradient(135deg, #4F46E5 0%, #6366F1 100%) !important;
    border-color: transparent !important;
    color: #FFFFFF !important;
}

.pos-filter-action-btn-primary:hover {
    background: linear-gradient(135deg, #4338CA 0%, #4F46E5 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3) !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PRODUCT GRID - Enhanced Product Display
   ═══════════════════════════════════════════════════════════════════════════ */

.pos-products-section {
    position: relative !important;
}

.pos-product-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important;
    gap: 12px !important;
}

@media (min-width: 768px) {
    .pos-product-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
        gap: 16px !important;
    }
}

@media (min-width: 1200px) {
    .pos-product-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* Product Card Enhancements */
.pos-product-grid .product_box,
#product_list_body .product_box {
    background: var(--pos-surface-1) !important;
    border: 1px solid var(--pos-stroke) !important;
    border-radius: 16px !important;
    padding: 12px !important;
    cursor: pointer !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    min-height: 160px !important;
}

.pos-product-grid .product_box:hover,
#product_list_body .product_box:hover {
    border-color: rgba(56, 189, 248, 0.6) !important;
    transform: translateY(-4px) !important;
    box-shadow: 0 12px 28px rgba(56, 189, 248, 0.2), 0 0 0 2px rgba(56, 189, 248, 0.2) !important;
}

.pos-product-grid .product_box:active,
#product_list_body .product_box:active {
    transform: translateY(-2px) scale(0.98) !important;
}

/* Stock Status Indicator */
.pos-product-grid .product_box.stock-ok::after,
#product_list_body .product_box.stock-ok::after {
    content: '' !important;
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    width: 10px !important;
    height: 10px !important;
    background: #10B981 !important;
    border-radius: 50% !important;
    border: 2px solid #FFFFFF !important;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3) !important;
}

.pos-product-grid .product_box.stock-low::after,
#product_list_body .product_box.stock-low::after {
    content: '' !important;
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    width: 10px !important;
    height: 10px !important;
    background: #F59E0B !important;
    border-radius: 50% !important;
    border: 2px solid #FFFFFF !important;
}

.pos-product-grid .product_box.stock-out::after,
#product_list_body .product_box.stock-out::after {
    content: '' !important;
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    width: 10px !important;
    height: 10px !important;
    background: #EF4444 !important;
    border-radius: 50% !important;
    border: 2px solid #FFFFFF !important;
}

/* Product Image Container */
.pos-product-grid .product_box .image-container,
#product_list_body .product_box .image-container {
    width: 100% !important;
    height: 80px !important;
    border-radius: 10px !important;
    background-color: rgba(255, 255, 255, 0.04) !important;
    margin-bottom: 10px !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}

/* Product Text */
.pos-product-grid .product_box .text_div,
#product_list_body .product_box .text_div {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    text-align: center !important;
}

.pos-product-grid .product_box .text_div .text,
#product_list_body .product_box .text_div .text {
    font-weight: 600 !important;
    color: #1E293B !important;
    font-size: 12px !important;
    line-height: 1.3 !important;
    margin-bottom: 4px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

.pos-product-grid .product_box .text_div small.text-muted,
#product_list_body .product_box .text_div small.text-muted {
    color: #64748B !important;
    font-size: 10px !important;
}

/* Products Loader */
.pos-products-loader {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    padding: 40px 20px !important;
}

.pos-loader-spinner {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Featured Products Enhancement */
#featured_products_box {
    background: linear-gradient(135deg, rgba(var(--color-accent-rgb), 0.1) 0%, rgba(var(--color-surface-rgb), 1) 100%) !important;
    border: 2px solid rgba(var(--color-accent-rgb), 0.28) !important;
    border-radius: 16px !important;
    padding: 16px !important;
}

#featured_products_box .product_box {
    border-color: #F59E0B !important;
    background: linear-gradient(135deg, #FFFFFF 0%, #FFFBEB 100%) !important;
}

#featured_products_box .product_box:hover {
    border-color: #D97706 !important;
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.2) !important;
}

/* No Products Message */
.pos-product-grid .col-md-12 h4,
#product_list_body .col-md-12 h4 {
    color: #64748B !important;
    font-weight: 500 !important;
    padding: 40px 20px !important;
}

/* Search in drawer functionality */
.pos-filter-card.hidden-by-search {
    display: none !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PRODUCT TILES - Modern DarajaERP Branded Product Grid
   ═══════════════════════════════════════════════════════════════════════════ */

/* Product Grid Container */
#product_list_body {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
    gap: 16px !important;
    padding: 8px !important;
}

@media (max-width: 576px) {
    #product_list_body {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
}

@media (min-width: 992px) {
    #product_list_body {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important;
    }
}

@media (min-width: 1400px) {
    #product_list_body {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* Product List Item Container */
.product_list {
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
}


/* Product Tile - Main Card (Branded) */
.product-tile {
    display: flex !important;
    flex-direction: column !important;
    background: linear-gradient(135deg, var(--pos-primary-50) 0%, #fff 100%) !important;
    border: 2px solid var(--pos-primary-200) !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    height: 100% !important;
    min-height: 180px !important;
    box-shadow: 0 2px 8px rgba(59,130,246,0.04) !important;
}

.product-tile:hover, .product-tile:focus-within {
    border-color: var(--pos-primary-500) !important;
    box-shadow: 0 8px 32px rgba(59,130,246,0.12), 0 0 0 3px var(--pos-primary-100), 0 8px 16px rgba(0,0,0,0.08) !important;
    transform: translateY(-6px) scale(1.02) !important;
}

.product-tile:active {
    transform: translateY(-2px) scale(0.98) !important;
    transition: all 0.1s ease !important;
}

/* Stock Status Visual Indicators */
.product-tile.stock-ok {
    border-color: #E2E8F0 !important;
}

.product-tile.stock-ok:hover {
    border-color: #86EFAC !important;
    box-shadow: 
        0 20px 40px rgba(16, 185, 129, 0.12),
        0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

.product-tile.stock-out {
    border-color: #FECACA !important;
    opacity: 0.85 !important;
}

.product-tile.stock-out:hover {
    border-color: #F87171 !important;
    opacity: 1 !important;
}

.product-tile.stock-out .product-tile-image::after {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(239, 68, 68, 0.08) !important;
    pointer-events: none !important;
}

.product-tile.stock-service {
    border-color: #C4B5FD !important;
}

.product-tile.stock-service:hover {
    border-color: #A78BFA !important;
    box-shadow: 
        0 20px 40px rgba(139, 92, 246, 0.12),
        0 0 0 3px rgba(139, 92, 246, 0.1) !important;
}

/* Image Container */
.product-tile-image {
    position: relative !important;
    width: 100% !important;
    height: 100px !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.03) 100%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    border-bottom: 1px solid var(--pos-stroke) !important;
}

@media (min-width: 768px) {
    .product-tile-image {
        height: 110px !important;
    }
}

.product-tile-image img {
    max-width: 85% !important;
    max-height: 85% !important;
    object-fit: contain !important;
    transition: transform 0.3s ease !important;
}

.product-tile:hover .product-tile-image img {
    transform: scale(1.08) !important;
}

/* Placeholder for products without images */
.product-tile-placeholder {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, #F5F5F7 0%, #E5E7EB 100%) !important;
}

.product-tile-placeholder img {
    width: 70px !important;
    height: 70px !important;
    opacity: 0.9 !important;
    filter: grayscale(100%) brightness(0.95) contrast(1.05) !important;
}

.product-placeholder-img {
    filter: grayscale(100%) brightness(0.95) contrast(1.05) !important;
}

@media (max-width: 576px) {
    .product-tile-placeholder img {
        width: 55px !important;
        height: 55px !important;
    }
}

/* Stock Badge */
.product-tile-stock-badge {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    min-width: 24px !important;
    height: 24px !important;
    padding: 0 8px !important;
    border-radius: 12px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
}

.product-tile-stock-badge.badge-ok {
    background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%) !important;
    color: #047857 !important;
    border: 1px solid #A7F3D0 !important;
}

.product-tile-stock-badge.badge-low {
    background: linear-gradient(135deg, rgba(var(--color-accent-rgb), 0.14) 0%, rgba(var(--color-accent-rgb), 0.22) 100%) !important;
    color: var(--color-accent) !important;
    border: 1px solid rgba(var(--color-accent-rgb), 0.28) !important;
}

.product-tile-stock-badge.badge-out {
    background: linear-gradient(135deg, #FEF2F2 0%, #FEE2E2 100%) !important;
    color: #DC2626 !important;
    border: 1px solid #FECACA !important;
    padding: 0 6px !important;
}

/* Product Info Section */
.product-tile-info {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 12px !important;
    gap: 6px !important;
    background: transparent !important;
}
/* Info Button - Branded */
.product-tile-info-btn {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    z-index: 2 !important;
    background: linear-gradient(135deg, var(--pos-primary-500) 0%, var(--pos-accent-500) 100%) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 50% !important;
    width: 34px !important;
    height: 34px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 8px rgba(var(--color-primary-rgb), 0.16) !important;
    font-size: 18px !important;
    transition: background 0.2s, box-shadow 0.2s, transform 0.15s !important;
    outline: none !important;
}
.product-tile-info-btn:hover, .product-tile-info-btn:focus {
    background: linear-gradient(135deg, var(--pos-accent-600) 0%, var(--pos-primary-600) 100%) !important;
    color: #fff !important;
    box-shadow: 0 4px 16px rgba(var(--color-accent-rgb), 0.2) !important;
    transform: scale(1.08);
}
.product-tile-info-btn:active {
    background: var(--pos-primary-700) !important;
    color: #fff !important;
    transform: scale(0.96);
}

@media (max-width: 576px) {
    .product-tile-info {
        padding: 10px !important;
    }
}

/* Product Name */
.product-tile-name {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--pos-text-strong) !important;
    line-height: 1.35 !important;
    margin: 0 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

@media (max-width: 576px) {
    .product-tile-name {
        font-size: 12px !important;
        -webkit-line-clamp: 2 !important;
    }
}

.product-tile-variant {
    display: block !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    color: var(--color-primary) !important;
    margin-top: 2px !important;
}

/* Product Meta (SKU & Unit) */
.product-tile-meta {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
    margin-top: auto !important;
}

.product-tile-sku {
    display: inline-flex !important;
    align-items: center !important;
    padding: 3px 8px !important;
    background: linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.08) 0%, rgba(var(--color-surface-rgb), 1) 100%) !important;
    color: var(--pos-text-muted) !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    letter-spacing: 0.02em !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.product-tile-unit {
    display: inline-flex !important;
    align-items: center !important;
    padding: 3px 8px !important;
    background: linear-gradient(135deg, rgba(var(--color-secondary-rgb), 0.12) 0%, rgba(var(--color-secondary-rgb), 0.2) 100%) !important;
    color: var(--color-secondary) !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
}

/* Empty State */
.product-list-empty {
    grid-column: 1 / -1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 60px 20px !important;
    text-align: center !important;
}

.product-list-empty-icon {
    width: 80px !important;
    height: 80px !important;
    background: linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.08) 0%, rgba(var(--color-surface-rgb), 1) 100%) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-bottom: 20px !important;
    color: rgba(var(--color-primary-rgb), 0.45) !important;
}

.product-list-empty h4 {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: var(--pos-text-strong) !important;
    margin: 0 0 8px 0 !important;
}

.product-list-empty p {
    font-size: 14px !important;
    color: var(--pos-text-muted) !important;
    margin: 0 !important;
}

/* Loading Animation for Product Tiles */
.product-tile.loading {
    pointer-events: none !important;
}

.product-tile.loading::after {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 100%
    ) !important;
    animation: tileShimmer 1.5s infinite !important;
}

@keyframes tileShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .product-tile:hover {
        transform: none !important;
        box-shadow: none !important;
    }
    
    .product-tile:active {
        transform: scale(0.97) !important;
        background: rgba(255, 255, 255, 0.08) !important;
    }
    
    .product-tile:hover .product-tile-image img {
        transform: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .product-tile {
        border-width: 3px !important;
    }
    
    .product-tile-name {
        font-weight: 700 !important;
    }
    
    .product-tile-stock-badge {
        border-width: 2px !important;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .product-tile,
    .product-tile-image img {
        transition: none !important;
    }
    
    .product-tile.loading::after {
        animation: none !important;
    }
}

/* ============================================
   CALCULATOR - Themed Popover
   ============================================ */
#calculator {
    background: var(--d-bg-card);
    border: 1px solid var(--d-border-light);
    border-radius: var(--d-radius-2xl);
    padding: 12px;
    width: 260px;
    box-shadow: var(--d-shadow-lg);
    color: var(--d-text-primary);
}

.popover {
    max-width: none !important;
    border: 0 !important;
    background: transparent !important;
}

.popover .popover-body {
    padding: 0 !important;
}

#calculator .pos-calculator-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

#calculator .pos-calculator-heading {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

#calculator .pos-calculator-title {
    font-weight: 800;
    font-size: 14px;
    color: var(--d-text-primary);
    letter-spacing: -0.01em;
}

#calculator .pos-calculator-sub {
    font-size: 11px;
    color: var(--d-text-tertiary);
}

#calculator .pos-calculator-close {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: 1px solid var(--d-border-light);
    background: var(--d-gray-100);
    color: var(--d-text-secondary);
    font-size: 20px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.1s ease, background 0.15s ease, box-shadow 0.15s ease;
}

#calculator .pos-calculator-close:hover {
    background: var(--d-gray-200);
    box-shadow: var(--d-shadow-sm);
    transform: translateY(-1px);
}

#calculator .pos-calculator-close:active {
    transform: translateY(0);
}

#calculator .pos-calculator-close:focus-visible {
    outline: 2px solid var(--brand-blue, var(--d-border-focus));
    outline-offset: 2px;
}

#calculator .pos-calculator-display {
    margin-bottom: 12px;
}

#calculator .screen {
    width: 100%;
    border: 1px solid var(--d-border-default);
    border-radius: var(--d-radius-xl);
    padding: 12px;
    background: var(--d-gray-50);
    color: var(--d-text-primary);
    font-weight: 800;
    font-size: 20px;
    box-shadow: var(--d-shadow-inner);
    text-align: right;
}

#calculator .pos-calculator-keys {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

#calculator button.btn {
    border: 1px solid var(--d-border-light);
    border-radius: var(--d-radius-xl);
    background: var(--d-gray-100);
    color: var(--d-text-primary);
    font-weight: 700;
    font-size: 16px;
    height: 44px;
    padding: 0;
    box-shadow: var(--d-shadow-sm);
    transition: transform 0.1s ease, box-shadow 0.15s ease, background 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#calculator button.btn:hover {
    transform: translateY(-1px);
    background: var(--d-gray-200);
    box-shadow: var(--d-shadow-md);
}

#calculator button.btn:active {
    transform: translateY(0);
}

#calculator button.btn:focus-visible {
    outline: 2px solid var(--brand-blue, var(--d-border-focus));
    outline-offset: 2px;
}

#calculator button.btn-success,
#calculator button.btn.btn-success {
    background: var(--d-teal-500);
    color: var(--d-text-inverse);
    border-color: var(--d-teal-600);
}

#calculator button.btn-warning,
#calculator button.btn.btn-warning {
    background: var(--d-accent-400);
    color: var(--d-text-primary);
    border-color: var(--d-accent-500);
}

#calculator button.btn-danger,
#calculator button.btn.btn-danger {
    background: var(--d-primary-700);
    color: var(--d-text-inverse);
    border-color: var(--d-primary-800);
}

#calculator .btn.operator {
    background: var(--brand-purple, var(--d-primary-500));
    color: var(--d-text-inverse);
    border-color: #754ea5;
}

#calculator .btn.operator:hover {
    background: #9a71d0;
}

#calculator .btn.utility {
    background: var(--d-gray-200);
    border-color: var(--d-border-default);
    color: var(--d-text-secondary);
}

#calculator .btn.utility.warning {
    background: var(--brand-lilac, var(--d-accent-400));
    border-color: #9e62a9;
    color: var(--d-text-inverse);
}

#calculator .btn.utility.danger {
    background: var(--brand-navy, var(--d-primary-700));
    border-color: var(--brand-ink, var(--d-primary-800));
    color: var(--d-text-inverse);
}

#calculator .btn.number {
    background: var(--d-bg-card);
}

#calculator .btn.zero {
    grid-column: span 2;
}

#calculator .btn.equals {
    grid-column: span 2;
    background: linear-gradient(135deg, var(--brand-blue, var(--d-teal-500)) 0%, var(--brand-blue-strong, var(--d-teal-600)) 100%);
    border-color: var(--brand-blue-strong, var(--d-teal-600));
    color: var(--d-text-inverse);
}

#calculator .btn.equals:hover {
    background: linear-gradient(135deg, var(--brand-blue-strong, var(--d-teal-600)) 0%, var(--brand-purple, var(--d-teal-600)) 100%);
}

.popover {
    max-width: none !important;
}

.popover #calculator {
    width: 260px;
    max-width: calc(100vw - 24px);
}

/* Featured Products with New Tiles */
#featured_products_box {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
    gap: 16px !important;
    padding: 16px !important;
    background: linear-gradient(135deg, rgba(var(--color-accent-rgb), 0.1) 0%, rgba(var(--color-surface-rgb), 1) 100%) !important;
    border: 2px solid rgba(var(--color-accent-rgb), 0.28) !important;
    border-radius: 16px !important;
    margin-bottom: 16px !important;
}

#featured_products_box .product-tile,
#featured_products_box .featured-tile {
    border-color: rgba(var(--color-accent-rgb), 0.24) !important;
    background: linear-gradient(135deg, rgba(var(--color-surface-rgb), 1) 0%, rgba(var(--color-accent-rgb), 0.08) 100%) !important;
}

#featured_products_box .product-tile:hover,
#featured_products_box .featured-tile:hover {
    border-color: var(--color-accent) !important;
    box-shadow: 0 20px 40px rgba(var(--color-accent-rgb), 0.18) !important;
}

#featured_products_box .product-tile-image {
    background: linear-gradient(135deg, rgba(var(--color-accent-rgb), 0.12) 0%, rgba(var(--color-surface-rgb), 1) 100%) !important;
}

/* Featured Badge */
.product-tile-featured-badge {
    position: absolute !important;
    top: 8px !important;
    left: 8px !important;
    width: 26px !important;
    height: 26px !important;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-primary) 100%) !important;
    color: #FFFFFF !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 8px rgba(var(--color-accent-rgb), 0.32) !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DARAJA POS MODERNIZATION LAYER
   Safe layout pass for create/edit POS without changing behavior
   ═══════════════════════════════════════════════════════════════════════════ */

.daraja-pos-shell {
    position: relative;
    padding: 0 0 220px !important;
    background: transparent !important;
}

.daraja-pos-shell .daraja-pos-stage {
    margin: 0 !important;
    padding: 0 8px !important;
}

.daraja-pos-shell .daraja-pos-stage > .col-md-12 {
    float: none !important;
    width: min(1760px, 100%) !important;
    margin: 0 auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.daraja-pos-shell .daraja-pos-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: stretch !important;
    gap: 18px !important;
    margin: 0 !important;
}

.daraja-pos-main,
.daraja-pos-column {
    position: relative;
    min-width: 0 !important;
}

.daraja-pos-column {
    display: flex;
    flex-direction: column;
}

.daraja-pos-column--cart {
    gap: 0;
}

.daraja-pos-column--products {
    gap: 0;
}

.daraja-pos-column--cart .daraja-pos-main-card,
.daraja-pos-column--products .daraja-pos-sidebar-shell {
    width: 100%;
}

.daraja-pos-main-card {
    margin: 0 !important;
    padding: 20px !important;
    border-radius: 24px !important;
    overflow: hidden !important;
    position: relative;
    background: linear-gradient(180deg, rgba(var(--color-surface-rgb), 0.98) 0%, rgba(var(--color-bg-rgb), 0.96) 100%) !important;
    box-shadow: 0 18px 40px rgba(var(--color-primary-rgb), 0.08), 0 6px 16px rgba(var(--color-text-rgb), 0.05) !important;
}

.daraja-pos-main-card::before {
    content: '';
    position: absolute;
    left: 24px;
    right: 24px;
    top: 0;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-secondary) 48%, var(--color-info) 100%);
    opacity: 0.92;
}

.daraja-pos-main-card-body {
    padding: 0 !important;
    background: transparent !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
}

.daraja-pos-sidebar-shell {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 0;
    height: auto;
    padding: 18px !important;
    background: linear-gradient(180deg, rgba(var(--color-surface-rgb), 0.98) 0%, rgba(var(--color-bg-rgb), 0.97) 100%) !important;
    border: 1px solid rgba(var(--color-primary-rgb), 0.12) !important;
    border-radius: 26px !important;
    box-shadow: 0 18px 38px rgba(var(--color-primary-rgb), 0.08), 0 8px 18px rgba(var(--color-text-rgb), 0.05) !important;
    overflow: hidden;
}

.daraja-pos-sidebar-shell::before {
    content: '';
    position: absolute;
    left: 18px;
    right: 18px;
    top: 0;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-secondary) 52%, var(--color-info) 100%);
    opacity: 0.9;
}

.pos-products-panel-head {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
    padding: 16px 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(var(--color-primary-rgb), 0.12);
    background: linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.1) 0%, rgba(var(--color-info-rgb), 0.05) 100%);
    box-shadow: inset 0 1px 0 rgba(var(--color-surface-rgb), 0.66);
}

.pos-products-panel-kicker {
    display: inline-block;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--pos-primary-700);
}

.pos-products-panel-title {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.15;
    color: var(--pos-text-strong);
}

.pos-products-browser {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 50px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(var(--color-primary-rgb), 0.12);
    background: var(--color-surface);
    color: var(--pos-text-muted);
}

.pos-products-browser input {
    flex: 1 1 auto;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    font-weight: 500;
    color: var(--pos-text-strong);
}

.pos-products-search-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.pos-products-add-shell {
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(var(--color-primary-rgb), 0.12);
    background: linear-gradient(180deg, rgba(var(--color-surface-rgb), 0.98) 0%, rgba(var(--color-bg-rgb), 0.96) 100%);
    box-shadow: 0 12px 30px rgba(var(--color-primary-rgb), 0.08);
}

.pos-products-add-copy {
    margin-bottom: 12px;
}

.pos-products-add-kicker {
    display: inline-block;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--pos-primary-700);
}

.pos-products-add-title {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.15;
    color: var(--pos-text-strong);
}

.pos-products-add-note {
    margin: 6px 0 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--pos-text-muted);
}

.pos-products-add-group {
    margin-bottom: 0 !important;
}

.pos-products-browser-filter {
    margin-bottom: 16px;
}

.pos-browser-hidden {
    display: none !important;
}

.pos-product-browser-empty {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 120px;
    padding: 18px;
    border: 1px dashed rgba(var(--color-border-rgb), 0.9);
    border-radius: 16px;
    background: rgba(var(--color-primary-rgb), 0.05);
    font-size: 14px;
    font-weight: 700;
    color: var(--pos-text-muted);
}

.daraja-pos-sidebar-shell .tw-flex.tw-gap-2.tw-mb-4 {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    margin-bottom: 0 !important;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(var(--color-border-rgb), 0.72);
}

.daraja-pos-sidebar-shell #feature_product_div {
    margin-bottom: 0 !important;
    padding-top: 2px;
}

.daraja-pos-sidebar-shell .pos-products-section {
    display: flex !important;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    padding-top: 16px;
    border-top: 1px solid rgba(var(--color-border-rgb), 0.68);
}

.daraja-pos-sidebar-shell #product_list_body {
    min-height: 320px;
    max-height: calc(100vh - 340px) !important;
    padding: 2px 4px 8px !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
}

.daraja-pos-sidebar-shell #suggestion_page_loader {
    margin-top: 12px;
}

.daraja-pos-shell .pos_form_totals {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
}

.daraja-pos-shell .pos_form_totals table {
    width: 100%;
}

.daraja-pos-shell .daraja-pos-entry-row,
.daraja-pos-shell .daraja-pos-meta-grid {
    margin-left: 0 !important;
    margin-right: 0 !important;
    border: 1px solid rgba(var(--color-primary-rgb), 0.1);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(var(--color-surface-rgb), 0.98) 0%, rgba(var(--color-bg-rgb), 0.92) 100%);
    box-shadow: 0 10px 26px rgba(var(--color-primary-rgb), 0.06);
}

.daraja-pos-shell .daraja-pos-entry-row {
    padding: 16px 18px 10px !important;
}

.daraja-pos-shell .pos-entry-shell {
    display: flex !important;
    align-items: stretch !important;
    width: 100% !important;
}

.daraja-pos-shell .pos-entry-shell .input-group-addon,
.daraja-pos-shell .pos-entry-shell .input-group-btn {
    display: flex !important;
    align-items: stretch !important;
    flex: 0 0 auto !important;
}

.daraja-pos-shell .pos-entry-shell > .form-control,
.daraja-pos-shell .pos-entry-shell > .select2-container,
.daraja-pos-shell .daraja-pos-meta-grid .input-group > .form-control,
.daraja-pos-shell .daraja-pos-meta-grid .input-group > .select2-container,
.daraja-pos-shell .daraja-pos-meta-grid .select2-container {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: 1% !important;
}

.daraja-pos-shell .pos-entry-shell .select2-container--default .select2-selection--single,
.daraja-pos-shell .daraja-pos-meta-grid .select2-container--default .select2-selection--single {
    min-height: 44px;
    display: flex;
    align-items: center;
}

.daraja-pos-shell .pos-entry-shell .select2-container--default .select2-selection__rendered,
.daraja-pos-shell .daraja-pos-meta-grid .select2-container--default .select2-selection__rendered {
    width: 100%;
    min-width: 0;
}

.daraja-pos-shell .daraja-pos-entry-row > [class*='col-'] {
    padding-left: 8px !important;
    padding-right: 8px !important;
}

.daraja-pos-shell .daraja-pos-entry-row > [class*='col-']:first-child {
    padding-left: 0 !important;
}

.daraja-pos-shell .daraja-pos-entry-row > [class*='col-']:last-child {
    padding-right: 0 !important;
}

.daraja-pos-shell .daraja-pos-meta-grid {
    padding: 16px !important;
}

.daraja-pos-shell .daraja-pos-meta-grid::before {
    content: 'Transaction Details';
    display: block;
    grid-column: 1 / -1;
    margin-bottom: 2px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--pos-primary-700);
}

.daraja-pos-shell .daraja-pos-meta-item {
    border: 1px solid rgba(var(--color-border-rgb), 0.72);
    border-radius: 16px;
    padding: 12px 12px 10px !important;
    background: rgba(var(--color-surface-rgb), 0.88);
    box-shadow: inset 0 1px 0 rgba(var(--color-surface-rgb), 0.9);
}

.daraja-pos-shell .daraja-pos-meta-item .input-group,
.daraja-pos-shell .daraja-pos-meta-item .daraja-pos-toggle-card {
    box-shadow: none !important;
}

.daraja-pos-cart-shell {
    margin-bottom: 14px;
    border: 1px solid var(--pos-stroke);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(var(--color-surface-rgb), 0.96) 0%, rgba(var(--color-bg-rgb), 0.96) 100%);
    box-shadow: 0 12px 28px rgba(var(--color-primary-rgb), 0.1);
    overflow: hidden;
}

.daraja-pos-cart-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(var(--color-border-rgb), 0.72);
    background: linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.08) 0%, rgba(var(--color-secondary-rgb), 0.08) 100%);
}

.daraja-pos-cart-heading {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.daraja-pos-cart-kicker {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--pos-primary-700);
}

.daraja-pos-cart-title {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.1;
    color: var(--pos-text-strong);
}

.daraja-pos-cart-note {
    margin: 2px 0 0;
    max-width: 360px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--pos-text-muted);
}

.daraja-pos-cart-table {
    margin-bottom: 0 !important;
    max-height: clamp(300px, 43vh, 520px) !important;
    overflow: auto !important;
    overscroll-behavior: contain;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}

.daraja-pos-cart-table #pos_table {
    min-width: 720px;
}

.daraja-pos-cart-table #pos_table thead th {
    background: linear-gradient(135deg, rgba(var(--color-text-rgb), 0.96) 0%, rgba(var(--color-primary-rgb), 0.92) 100%) !important;
}

.daraja-pos-cart-table #pos_table tbody td {
    background: transparent !important;
}

.daraja-pos-cart-table #pos_table tbody td.product-col {
    vertical-align: top !important;
}

.daraja-pos-cart-table #pos_table tbody td.product-col .text-link,
.daraja-pos-cart-table #pos_table tbody td.product-col > div[title],
.daraja-pos-cart-table #pos_table tbody td.product-col > span {
    max-width: 100%;
    word-break: break-word;
}

.daraja-pos-cart-table #pos_table tbody td.product-col img {
    margin-top: 8px !important;
}

.daraja-pos-shell .pos_form_totals {
    margin-top: 14px !important;
    border-radius: 18px !important;
    background: linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.08) 0%, rgba(var(--color-surface-rgb), 0.94) 45%, rgba(var(--color-secondary-rgb), 0.08) 100%) !important;
    border: 1px solid rgba(var(--color-primary-rgb), 0.12) !important;
    box-shadow: 0 12px 24px rgba(var(--color-primary-rgb), 0.08) !important;
}

.daraja-pos-shell .pos_form_totals td {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

body.pos-theme-dark .daraja-pos-cart-shell {
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.96) 0%, rgba(15, 23, 42, 0.98) 100%);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
}

body.pos-theme-dark .daraja-pos-cart-head {
    border-bottom-color: rgba(255, 255, 255, 0.12);
    background: linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.2) 0%, rgba(var(--color-secondary-rgb), 0.2) 100%);
}

body.pos-theme-dark .daraja-pos-cart-kicker {
    color: rgba(var(--color-info-rgb), 0.92);
}

body.pos-theme-dark .daraja-pos-cart-note {
    color: rgba(226, 232, 240, 0.7);
}

body.pos-theme-dark .daraja-pos-cart-table {
    background: transparent !important;
}

.pos-recent-products {
    margin-bottom: 18px !important;
    padding: 14px 16px !important;
    border-radius: 18px;
    border: 1px solid rgba(var(--color-border-rgb), 0.8);
    background: linear-gradient(180deg, rgba(var(--color-surface-rgb), 0.98) 0%, rgba(var(--color-bg-rgb), 0.95) 100%);
    box-shadow: 0 10px 24px rgba(var(--color-primary-rgb), 0.06);
}

.pos-recent-products-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.pos-recent-products h4 {
    margin-bottom: 0 !important;
}

.pos-recent-products-body {
    min-height: 48px;
}

.pos-recent-products-clear {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(var(--color-accent-rgb), 0.2);
    background: rgba(var(--color-accent-rgb), 0.1);
    color: var(--color-accent);
    font-size: 12px;
    font-weight: 700;
    transition: all 0.2s ease;
}

.pos-recent-products-clear:hover {
    background: rgba(var(--color-accent-rgb), 0.16);
    transform: translateY(-1px);
}

.recent-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 72px;
    border: 1px dashed rgba(var(--color-border-rgb), 0.8);
    border-radius: 14px;
    color: var(--pos-text-muted);
    font-weight: 600;
    background: rgba(var(--color-primary-rgb), 0.05);
}

#featured_products_box {
    display: none !important;
}

#featured_products_box[style*="display: block"],
#featured_products_box[style*="display:block"],
#featured_products_box[style*="display: inline"],
#featured_products_box[style*="display:inline"],
#featured_products_box[style*="display: flex"],
#featured_products_box[style*="display:flex"],
#featured_products_box[style*="display: grid"],
#featured_products_box[style*="display:grid"] {
    display: grid !important;
}

.daraja-pos-shell .pos-form-actions.pos-action-bar,
.daraja-pos-shell .pos-form-actions {
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: auto !important;
    border-radius: 24px 24px 0 0 !important;
}

.daraja-pos-shell .pos-action-container {
    gap: 14px !important;
}

.daraja-pos-shell .pos-total-section {
    min-width: 220px !important;
}

.daraja-pos-shell .pos-total-amount,
.daraja-pos-shell #total_payable {
    color: #FFFFFF !important;
}

.daraja-pos-shell .pos-header {
    z-index: 1004 !important;
}

.daraja-pos-checkout-dock {
    position: relative;
    width: 100%;
    margin-top: 22px;
    padding-top: 12px;
    min-height: var(--pos-checkout-dock-height, 148px);
}

.daraja-pos-checkout-dock::before {
    content: '';
    position: absolute;
    inset: 0 18px auto 18px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(var(--color-primary-rgb), 0.45) 0%, rgba(var(--color-secondary-rgb), 0.22) 55%, rgba(var(--color-info-rgb), 0.48) 100%);
    opacity: 0.9;
}

.daraja-pos-shell .daraja-pos-checkout-dock > .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.daraja-pos-shell .daraja-pos-checkout-dock .pos-form-actions,
.daraja-pos-shell .daraja-pos-checkout-dock .pos-form-actions.pos-action-bar {
    position: fixed !important;
    left: 22px !important;
    right: 22px !important;
    bottom: calc(var(--pos-footer-line-height) + var(--pos-footer-stack-gap)) !important;
    width: auto !important;
    border-radius: 26px !important;
    background: linear-gradient(135deg, rgba(var(--color-surface-rgb), 0.97) 0%, rgba(var(--color-bg-rgb), 0.98) 100%) !important;
    border: 1px solid rgba(var(--color-primary-rgb), 0.12) !important;
    box-shadow: 0 18px 36px rgba(var(--color-primary-rgb), 0.12), 0 6px 18px rgba(var(--color-text-rgb), 0.06) !important;
    z-index: 1015 !important;
    overflow: hidden !important;
}

.daraja-pos-shell .daraja-pos-checkout-dock .pos-form-actions.pos-action-bar::before,
.daraja-pos-shell .daraja-pos-checkout-dock .pos-form-actions::before {
    content: '';
    display: block;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-secondary) 55%, var(--color-info) 100%);
}

.daraja-pos-shell .daraja-pos-checkout-dock .pos-action-container {
    display: grid !important;
    grid-template-columns: minmax(0, 1.15fr) minmax(190px, 0.6fr) minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 16px !important;
    padding: 18px 20px 20px !important;
}

.daraja-pos-shell .daraja-pos-checkout-dock .pos-quick-actions {
    justify-content: flex-start !important;
}

.daraja-pos-shell .daraja-pos-checkout-dock .pos-total-section {
    min-width: 0 !important;
    width: 100% !important;
}

.daraja-pos-shell .daraja-pos-checkout-dock .pos-primary-actions {
    justify-content: flex-end !important;
    flex-wrap: wrap !important;
}

.daraja-pos-shell .pos-connection-status {
    top: 92px !important;
    right: 20px !important;
    background-clip: padding-box;
    backdrop-filter: blur(12px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

.daraja-pos-shell .pos-lock-btn {
    bottom: 112px !important;
    left: 20px !important;
}

.daraja-pos-shell .pos-compact-toggle {
    bottom: 112px !important;
    right: 20px !important;
}

.daraja-pos-shell .pos-theme-toggle {
    bottom: 164px !important;
    right: 20px !important;
}

.daraja-pos-shell .pos-undo-btn {
    bottom: 112px !important;
    right: 78px !important;
}

.daraja-pos-shell .daraja-pos-mobile-products-content {
    background: var(--pos-shell-bg) !important;
}

.daraja-pos-shell .daraja-pos-mobile-products-body,
.daraja-pos-mobile-products .daraja-pos-mobile-products-body {
    padding: 16px 16px 104px !important;
}

.daraja-pos-mobile-products .daraja-pos-mobile-sidebar-shell {
    position: static;
    height: auto;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    overflow: visible;
}

.daraja-pos-mobile-products .daraja-pos-mobile-products-footer {
    box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.12);
}

body.pos-compact .daraja-pos-sidebar-shell {
    top: 78px;
    height: calc(100vh - 168px);
}

body.daraja-pos-themed {
    --pos-footer-line-height: 44px;
    --pos-footer-stack-gap: 10px;
    --pos-checkout-dock-height: 148px;
    --pos-checkout-dock-height-mobile: 248px;
}

@media (min-width: 992px) {
    .daraja-pos-shell {
        padding-bottom: calc(var(--pos-checkout-dock-height) + var(--pos-footer-line-height) + 28px) !important;
    }

    .daraja-pos-shell .daraja-pos-grid {
        display: grid !important;
        grid-template-columns: minmax(0, 1.68fr) minmax(360px, 1fr) !important;
        gap: 32px !important;
        align-items: start !important;
        position: relative;
    }

    .daraja-pos-shell .daraja-pos-main,
    .daraja-pos-shell .daraja-pos-sidebar,
    .daraja-pos-shell .daraja-pos-column {
        width: auto !important;
        max-width: none !important;
        margin: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .daraja-pos-shell .daraja-pos-main,
    .daraja-pos-shell .daraja-pos-column--cart {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
        min-width: 0 !important;
    }

    .daraja-pos-shell .daraja-pos-main-card {
        min-height: 0 !important;
        height: auto !important;
        margin-bottom: 0 !important;
        flex: 0 0 auto;
    }

    .daraja-pos-shell .daraja-pos-sidebar,
    .daraja-pos-shell .daraja-pos-column--products {
        align-self: start;
        position: relative;
        padding-left: 30px !important;
        min-width: 0 !important;
    }

    .daraja-pos-shell .daraja-pos-sidebar::before,
    .daraja-pos-shell .daraja-pos-column--products::before {
        content: '';
        position: absolute;
        left: 8px;
        top: 10px;
        bottom: 10px;
        width: 2px;
        border-radius: 999px;
        background: linear-gradient(180deg, rgba(var(--color-primary-rgb), 0.52) 0%, rgba(var(--color-secondary-rgb), 0.18) 48%, rgba(var(--color-info-rgb), 0.5) 100%);
        box-shadow: 0 0 0 1px rgba(var(--color-primary-rgb), 0.08), 0 0 20px rgba(var(--color-primary-rgb), 0.16);
    }

    .daraja-pos-shell .daraja-pos-sidebar-shell {
        position: relative;
        top: auto;
        gap: 12px;
        max-height: none !important;
        min-height: 0 !important;
        height: auto !important;
        padding-bottom: 12px !important;
        overflow: visible;
    }

    .daraja-pos-shell .daraja-pos-sidebar-shell #feature_product_div,
    .daraja-pos-shell .daraja-pos-sidebar-shell > .tw-flex.tw-gap-2.tw-mb-4 {
        flex: 0 0 auto;
    }

    .daraja-pos-shell .daraja-pos-sidebar-shell .pos-products-section {
        min-height: 0;
        flex: 0 1 auto;
    }

    .daraja-pos-shell .daraja-pos-sidebar-shell #product_list_body {
        min-height: 0;
        height: auto !important;
        max-height: min(56vh, 640px) !important;
        overflow-y: auto !important;
        padding-bottom: 16px;
    }

    .daraja-pos-shell .daraja-pos-cart-table {
        max-height: clamp(260px, 38vh, 520px) !important;
    }

    .daraja-pos-shell .pos_form_totals {
        margin-top: 12px !important;
        margin-bottom: 14px !important;
    }

    .daraja-pos-shell .daraja-pos-checkout-dock {
        margin-top: 16px !important;
        margin-bottom: 4px !important;
        min-height: var(--pos-checkout-dock-height) !important;
    }

    .daraja-pos-shell .daraja-pos-entry-row {
        display: flex !important;
        align-items: stretch !important;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .daraja-pos-shell .daraja-pos-grid {
        grid-template-columns: minmax(0, 1.52fr) minmax(320px, 1fr) !important;
    }

    .daraja-pos-shell .daraja-pos-sidebar-shell {
        min-height: 0 !important;
        max-height: none !important;
    }

    .daraja-pos-shell .daraja-pos-checkout-dock .pos-action-container {
        grid-template-columns: 1fr !important;
        justify-items: stretch !important;
    }

    .daraja-pos-shell .daraja-pos-checkout-dock .pos-quick-actions,
    .daraja-pos-shell .daraja-pos-checkout-dock .pos-primary-actions {
        justify-content: center !important;
    }
}

@media (max-width: 1200px) {
    .daraja-pos-sidebar-shell #product_list_body {
        max-height: calc(100vh - 320px) !important;
    }
}

@media (max-width: 1024px) {
    .daraja-pos-shell .daraja-pos-grid {
        gap: 16px !important;
    }

    .daraja-pos-sidebar {
        margin-top: 0;
    }

    .daraja-pos-sidebar-shell {
        height: auto;
        max-height: none;
        overflow: visible;
    }

    .daraja-pos-sidebar-shell #product_list_body {
        min-height: 360px;
        max-height: 65vh !important;
    }
}

@media (max-width: 768px) {
    .daraja-pos-shell {
        padding-bottom: calc(var(--pos-checkout-dock-height-mobile) + var(--pos-footer-line-height) + 28px) !important;
    }

    .daraja-pos-main-card::before,
    .daraja-pos-sidebar-shell::before {
        left: 16px;
        right: 16px;
    }

    .daraja-pos-shell .daraja-pos-entry-row,
    .daraja-pos-shell .daraja-pos-meta-grid {
        padding: 14px !important;
        border-radius: 18px;
    }

    .daraja-pos-shell .daraja-pos-entry-row > [class*='col-'] {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .daraja-pos-sidebar-shell {
        padding: 16px !important;
        border-radius: 22px !important;
    }

    .daraja-pos-sidebar-shell .tw-flex.tw-gap-2.tw-mb-4 {
        grid-template-columns: 1fr !important;
        padding-bottom: 12px;
    }

    .daraja-pos-shell .daraja-pos-main,
    .daraja-pos-shell .daraja-pos-sidebar {
        width: 100% !important;
    }

    .daraja-pos-main-card {
        padding: 16px !important;
        border-radius: 20px !important;
    }

    .daraja-pos-shell .daraja-pos-checkout-dock {
        margin-top: 16px !important;
        min-height: var(--pos-checkout-dock-height-mobile) !important;
        padding-top: 10px !important;
    }

    .daraja-pos-shell .daraja-pos-checkout-dock::before {
        inset: 0 12px auto 12px;
    }

    .daraja-pos-shell .daraja-pos-checkout-dock .pos-form-actions.pos-action-bar,
    .daraja-pos-shell .daraja-pos-checkout-dock .pos-form-actions {
        left: 10px !important;
        right: 10px !important;
        bottom: calc(var(--pos-footer-line-height) + 6px) !important;
        border-radius: 22px !important;
        z-index: 1015 !important;
    }

    .daraja-pos-shell .daraja-pos-checkout-dock .pos-action-container {
        gap: 10px !important;
    }

    .daraja-pos-shell .daraja-pos-checkout-dock .pos-total-section {
        min-width: 0 !important;
        width: 100% !important;
    }

    .daraja-pos-shell .pos-fab {
        bottom: calc(var(--pos-footer-line-height) + 92px) !important;
        right: 14px !important;
    }

    .daraja-pos-shell .pos-lock-btn {
        bottom: calc(var(--pos-footer-line-height) + 94px) !important;
        left: 12px !important;
    }

    .daraja-pos-shell .pos-compact-toggle {
        bottom: 102px !important;
        right: 82px !important;
    }

    .daraja-pos-shell .pos-theme-toggle {
        bottom: 154px !important;
        right: 14px !important;
    }

    .daraja-pos-shell .pos-undo-btn {
        bottom: 154px !important;
        right: 14px !important;
    }

    .daraja-pos-shell .pos-connection-status {
        top: 82px !important;
        right: 12px !important;
    }

    .daraja-pos-shell .pos_form_totals table {
        min-width: 700px;
    }

    .daraja-pos-cart-head {
        flex-direction: column;
        align-items: flex-start;
        padding: 14px 14px 12px;
    }

    .daraja-pos-cart-title {
        font-size: 17px;
    }

    .daraja-pos-cart-note {
        max-width: none;
        font-size: 12px;
    }

    .daraja-pos-cart-table {
        max-height: 40vh !important;
    }

    .daraja-pos-cart-table #pos_table {
        min-width: 640px;
    }

    .pos-recent-products-header {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .daraja-pos-sidebar-shell #product_list_body {
        min-height: 320px;
        max-height: none !important;
    }

    .pos-header-actions {
        width: 100% !important;
        justify-content: flex-start !important;
    }

    .pos-header-mobile-toggle {
        display: inline-flex !important;
    }

    .pos-header-action-group {
        width: 100% !important;
    }

    .daraja-pos-meta-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 768px) {
    .pos-header-shell {
        align-items: stretch !important;
    }

    .pos-header-main {
        width: 100% !important;
        margin-bottom: 0 !important;
    }

    .pos-header-toolbar {
        gap: 8px !important;
    }

    .pos-header-location {
        flex: 1 1 100% !important;
        width: 100% !important;
    }

    .location-selector-wrapper {
        min-width: 0 !important;
        max-width: none !important;
        flex: 1 1 auto !important;
    }

    #select_location_id {
        min-width: 0 !important;
    }

    .pos-header-actions:not(.tw-hidden) {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100% !important;
        gap: 8px !important;
        margin-top: 6px !important;
    }

    .pos-header-actions .pos-header-btn {
        width: 100% !important;
        justify-content: center !important;
        padding: 9px !important;
        min-height: 40px !important;
    }

    .pos-header-actions .pos-header-btn span {
        display: none !important;
    }

    .pos-header-actions .tw-shadow-lg {
        box-shadow: none !important;
    }
}

@media (max-width: 480px) {
    .pos-header > .tw-flex,
    .pos-header > div {
        margin: 6px 6px 4px !important;
        padding: 8px 10px !important;
    }

    .pos-header-logo {
        height: 26px !important;
    }

    .pos-business-badge {
        padding: 7px 10px !important;
    }

    .pos-header-actions:not(.tw-hidden) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ==========================================================================
   POS MAIN AREA LAYOUT STABILIZATION
   Forces predictable two-column POS layout without touching header/footer
   ========================================================================== */

.daraja-pos-shell .daraja-pos-grid.daraja-pos-grid--single {
    grid-template-columns: minmax(0, 1fr) !important;
}

@media (min-width: 992px) {
    .daraja-pos-shell {
        padding-bottom: calc(var(--pos-footer-line-height) + 96px) !important;
    }

    .daraja-pos-shell .daraja-pos-grid.daraja-pos-grid--two {
        display: grid !important;
        grid-template-columns: minmax(0, 1.68fr) minmax(320px, 1fr) !important;
        gap: 22px !important;
        align-items: start !important;
    }

    .daraja-pos-shell .daraja-pos-grid.daraja-pos-grid--single {
        display: grid !important;
        gap: 18px !important;
    }

    .daraja-pos-shell .daraja-pos-main,
    .daraja-pos-shell .daraja-pos-sidebar,
    .daraja-pos-shell .daraja-pos-column {
        width: auto !important;
        max-width: none !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .daraja-pos-shell .daraja-pos-main-card,
    .daraja-pos-shell .daraja-pos-sidebar-shell {
        height: auto !important;
        min-height: 0 !important;
    }

    .daraja-pos-shell .daraja-pos-sidebar-shell {
        position: relative !important;
        top: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }

    .daraja-pos-shell .daraja-pos-sidebar-shell .pos-products-section {
        min-height: 0 !important;
        flex: 1 1 auto !important;
    }

    .daraja-pos-shell .daraja-pos-sidebar-shell #product_list_body {
        min-height: 300px !important;
        max-height: calc(100vh - 360px) !important;
        overflow-y: auto !important;
    }

    .daraja-pos-shell .daraja-pos-checkout-dock {
        margin-top: 18px !important;
        padding-top: 0 !important;
        min-height: 0 !important;
    }

    .daraja-pos-shell .daraja-pos-checkout-dock::before {
        display: none !important;
    }

    .daraja-pos-shell .daraja-pos-checkout-dock .pos-form-actions,
    .daraja-pos-shell .daraja-pos-checkout-dock .pos-form-actions.pos-action-bar {
        position: sticky !important;
        left: auto !important;
        right: auto !important;
        bottom: calc(var(--pos-footer-line-height) + 8px) !important;
        width: 100% !important;
        border-radius: 20px !important;
        z-index: 1008 !important;
    }
}

@media (max-width: 991px) {
    .daraja-pos-shell {
        padding-bottom: calc(var(--pos-footer-line-height) + 110px) !important;
    }

    .daraja-pos-shell .daraja-pos-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 14px !important;
    }

    .daraja-pos-shell .daraja-pos-checkout-dock {
        min-height: 0 !important;
        padding-top: 0 !important;
    }

    .daraja-pos-shell .daraja-pos-checkout-dock::before {
        display: none !important;
    }

    .daraja-pos-shell .daraja-pos-checkout-dock .pos-form-actions,
    .daraja-pos-shell .daraja-pos-checkout-dock .pos-form-actions.pos-action-bar {
        position: sticky !important;
        left: auto !important;
        right: auto !important;
        bottom: calc(var(--pos-footer-line-height) + 6px) !important;
        width: 100% !important;
    }
}

/* ==========================================================================
   POS CART + PRODUCTS LAYOUT (2:1)
   Scope: create/edit POS only via `.daraja-pos-layout-v2`
   ========================================================================== */

.daraja-pos-shell.daraja-pos-layout-v2 .daraja-pos-grid {
    margin-left: -8px !important;
    margin-right: -8px !important;
    row-gap: 18px !important;
}

.daraja-pos-shell.daraja-pos-layout-v2 .daraja-pos-main,
.daraja-pos-shell.daraja-pos-layout-v2 .daraja-pos-sidebar {
    padding-left: 8px !important;
    padding-right: 8px !important;
}

.daraja-pos-shell.daraja-pos-layout-v2 .daraja-pos-main-card {
    margin-bottom: 0 !important;
    padding: 18px !important;
}

.daraja-pos-shell.daraja-pos-layout-v2 {
    min-height: calc(100vh - 60px);
    padding-top: 8px !important;
    padding-bottom: 40px !important;
}

.daraja-pos-shell.daraja-pos-layout-v2 .daraja-pos-stage > .col-md-12 {
    max-width: 1780px !important;
    float: none;
    margin-left: auto;
    margin-right: auto;
}

.daraja-pos-shell.daraja-pos-layout-v2 .daraja-pos-main-card-body {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    overflow: visible !important;
}

.daraja-pos-shell.daraja-pos-layout-v2 .daraja-pos-grid.daraja-pos-grid--single {
    display: flex !important;
    flex-wrap: wrap !important;
}

.daraja-pos-shell.daraja-pos-layout-v2 .daraja-pos-column {
    min-width: 0 !important;
}

.daraja-pos-shell.daraja-pos-layout-v2 .daraja-pos-sidebar::before,
.daraja-pos-shell.daraja-pos-layout-v2 .daraja-pos-column--products::before {
    display: none !important;
}

.daraja-pos-shell.daraja-pos-layout-v2 .daraja-pos-cart-shell {
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(var(--color-border-rgb), 0.82);
    border-radius: 16px;
    background: var(--color-surface);
    overflow: visible;
    box-shadow: 0 16px 34px rgba(var(--color-primary-rgb), 0.08), 0 6px 16px rgba(var(--color-text-rgb), 0.04);
}

.daraja-pos-shell.daraja-pos-layout-v2 .daraja-pos-cart-head {
    position: sticky;
    top: 0;
    z-index: 9;
    background: var(--color-surface);
    border-bottom: 1px solid rgba(var(--color-border-rgb), 0.84);
    padding: 0 0 12px;
    padding-bottom: 12px;
}

.daraja-pos-shell.daraja-pos-layout-v2 .daraja-pos-cart-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.daraja-pos-shell.daraja-pos-layout-v2 .daraja-pos-cart-customer {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    max-width: 100%;
}

.daraja-pos-shell.daraja-pos-layout-v2 .daraja-pos-cart-customer-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--pos-text-muted);
}

.daraja-pos-shell.daraja-pos-layout-v2 .daraja-pos-cart-customer-name {
    display: inline-block;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 700;
    color: var(--pos-text-strong);
}

.daraja-pos-shell.daraja-pos-layout-v2 .daraja-pos-cart-toolbar-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.daraja-pos-shell.daraja-pos-layout-v2 .daraja-pos-cart-chip {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px;
    min-height: 36px !important;
    border-radius: 999px !important;
    border: 1px solid rgba(var(--color-border-rgb), 0.86) !important;
    background: #fff !important;
    color: var(--pos-text-strong) !important;
    padding: 7px 12px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
}

.daraja-pos-shell.daraja-pos-layout-v2 .daraja-pos-cart-chip--muted {
    opacity: 0.65;
}

.daraja-pos-shell.daraja-pos-layout-v2 .daraja-pos-cart-search {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    border: 1px solid rgba(var(--color-border-rgb), 0.84);
    border-radius: 10px;
    padding: 8px 10px;
    background: #fff;
    margin-top: 10px;
}

.daraja-pos-shell.daraja-pos-layout-v2 .daraja-pos-cart-search i {
    color: var(--pos-text-muted);
}

.daraja-pos-shell.daraja-pos-layout-v2 .daraja-pos-cart-search input {
    width: 100%;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font-size: 13px;
    color: var(--pos-text-strong);
}

.daraja-pos-shell.daraja-pos-layout-v2 .daraja-pos-cart-table {
    position: relative;
    overflow: auto !important;
    max-height: clamp(320px, 45vh, 620px) !important;
    min-height: 220px;
    border-radius: 0 0 16px 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 251, 255, 0.98) 100%);
    scrollbar-gutter: stable;
}

.daraja-pos-shell.daraja-pos-layout-v2 .daraja-pos-cart-table #pos_table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8fbff;
}

.daraja-pos-shell.daraja-pos-layout-v2 .pos-cart-empty-state {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 120px;
    margin: 12px;
    border: 1px dashed rgba(var(--color-border-rgb), 0.82);
    border-radius: 12px;
    color: var(--pos-text-muted);
    font-size: 13px;
    font-weight: 700;
    background: rgba(var(--color-primary-rgb), 0.04);
}

.daraja-pos-shell.daraja-pos-layout-v2 .pos-cart-row-hidden {
    display: none !important;
}

.daraja-pos-shell.daraja-pos-layout-v2 .pos_form_totals {
    position: sticky;
    bottom: calc(var(--pos-footer-line-height, 44px) + 12px);
    z-index: 15;
    margin-bottom: 6px !important;
    box-shadow: 0 8px 20px rgba(var(--color-primary-rgb), 0.12);
}

.daraja-pos-shell.daraja-pos-layout-v2 .pos-cart-footer-cta {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.daraja-pos-shell.daraja-pos-layout-v2 .pos-cart-checkout-btn {
    min-height: 44px !important;
    border-radius: 10px !important;
    padding: 10px 16px !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.daraja-pos-shell.daraja-pos-layout-v2 .daraja-pos-column--products {
    min-height: 0;
}

.daraja-pos-shell.daraja-pos-layout-v2 .daraja-pos-column--products .daraja-pos-sidebar-shell {
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 10px;
    max-height: calc(100vh - 170px);
    overflow: visible !important;
    padding: 16px !important;
    border: 1px solid rgba(var(--color-border-rgb), 0.78);
    border-radius: 18px !important;
    background: linear-gradient(180deg, rgba(var(--color-surface-rgb), 0.98) 0%, rgba(248, 251, 255, 0.98) 100%);
    box-shadow: 0 18px 38px rgba(var(--color-primary-rgb), 0.08), 0 8px 18px rgba(var(--color-text-rgb), 0.05) !important;
}

.daraja-pos-shell.daraja-pos-layout-v2 .pos-products-toprail {
    position: sticky;
    top: 0;
    z-index: 14;
    padding-bottom: 12px;
    margin-bottom: 12px;
    background: linear-gradient(180deg, rgba(var(--color-surface-rgb), 0.99) 0%, rgba(var(--color-surface-rgb), 0.97) 78%, rgba(var(--color-surface-rgb), 0) 100%);
}

.daraja-pos-shell.daraja-pos-layout-v2 .pos-products-toprail::after {
    content: '';
    display: block;
    height: 1px;
    margin-top: 12px;
    background: linear-gradient(90deg, rgba(var(--color-primary-rgb), 0.18) 0%, rgba(var(--color-border-rgb), 0.8) 50%, rgba(var(--color-primary-rgb), 0.08) 100%);
}

.daraja-pos-shell.daraja-pos-layout-v2 .daraja-pos-column--products .pos-products-section {
    display: flex !important;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    padding-top: 0 !important;
    border-top: none !important;
}

.daraja-pos-shell.daraja-pos-layout-v2 .daraja-pos-column--products #product_list_body {
    flex: 1 1 auto;
    min-height: 260px;
    max-height: calc(100vh - 420px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding-top: 4px !important;
    padding-right: 4px !important;
    scrollbar-gutter: stable;
}

.daraja-pos-shell.daraja-pos-layout-v2 .daraja-pos-column--products #product_list_body.is-loading {
    overflow: hidden !important;
}

.daraja-pos-shell.daraja-pos-layout-v2 .daraja-pos-sidebar-shell .tw-flex.tw-gap-2.tw-mb-4 {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin-bottom: 10px !important;
}

.daraja-pos-shell.daraja-pos-layout-v2 .pos-filter-btn {
    min-height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(var(--color-border-rgb), 0.86);
    padding: 8px 12px;
    background: #fff;
}

.daraja-pos-shell.daraja-pos-layout-v2 .product-tile-add-btn {
    position: absolute;
    right: 8px;
    bottom: 8px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 30px;
    border: none;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.92);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 9px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
    z-index: 4;
}

.daraja-pos-shell.daraja-pos-layout-v2 .product-tile-add-btn:hover {
    background: rgba(5, 150, 105, 0.95);
}

.daraja-pos-shell.daraja-pos-layout-v2 .product-tile-add-btn span {
    line-height: 1;
}

.daraja-pos-shell.daraja-pos-layout-v2 .product-list-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 180px;
    padding: 20px;
    border: 1px dashed rgba(var(--color-border-rgb), 0.82);
    border-radius: 16px;
    background: rgba(var(--color-primary-rgb), 0.04);
    color: var(--pos-text-muted);
    text-align: center;
}

.daraja-pos-shell.daraja-pos-layout-v2 .daraja-pos-checkout-dock {
    margin-top: 18px !important;
    min-height: 0 !important;
    padding-top: 0 !important;
}

.daraja-pos-shell.daraja-pos-layout-v2 .daraja-pos-checkout-dock::before {
    display: none !important;
}

.daraja-pos-shell.daraja-pos-layout-v2 .daraja-pos-checkout-dock .pos-form-actions,
.daraja-pos-shell.daraja-pos-layout-v2 .daraja-pos-checkout-dock .pos-form-actions.pos-action-bar {
    position: sticky !important;
    left: auto !important;
    right: auto !important;
    bottom: calc(var(--pos-footer-line-height, 44px) + 8px) !important;
    width: 100% !important;
    z-index: 4 !important;
    border-radius: 18px !important;
    overflow: visible !important;
}

.daraja-pos-shell.daraja-pos-layout-v2 .daraja-pos-checkout-dock .pos-action-container {
    gap: 14px !important;
}

.daraja-pos-shell.daraja-pos-layout-v2 .pos-product-skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    width: 100%;
}

.daraja-pos-shell.daraja-pos-layout-v2 .pos-product-skeleton-card {
    height: 176px;
    border-radius: 14px;
    background: linear-gradient(90deg, #eff3f9 25%, #f8fbff 50%, #eff3f9 75%);
    background-size: 220% 100%;
    animation: posSkeletonPulse 1.2s ease-in-out infinite;
}

@keyframes posSkeletonPulse {
    0% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0 50%;
    }
}

@media (max-width: 1199px) {
    .daraja-pos-shell.daraja-pos-layout-v2 .daraja-pos-cart-table {
        max-height: clamp(280px, 38vh, 520px) !important;
    }
}

@media (max-width: 767px) {
    .daraja-pos-shell.daraja-pos-layout-v2 .daraja-pos-grid,
    .daraja-pos-shell.daraja-pos-layout-v2 .daraja-pos-grid.daraja-pos-grid--two,
    .daraja-pos-shell.daraja-pos-layout-v2 .daraja-pos-grid.daraja-pos-grid--single {
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
    }

    .daraja-pos-shell.daraja-pos-layout-v2 .daraja-pos-sidebar,
    .daraja-pos-shell.daraja-pos-layout-v2 .daraja-pos-main {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .daraja-pos-shell.daraja-pos-layout-v2 .daraja-pos-column--products .daraja-pos-sidebar-shell {
        position: static;
        max-height: none;
    }

    .daraja-pos-shell.daraja-pos-layout-v2 .daraja-pos-column--products #product_list_body {
        min-height: 240px;
        max-height: none !important;
    }

    .daraja-pos-shell.daraja-pos-layout-v2 .pos_form_totals {
        position: sticky;
        bottom: calc(var(--pos-footer-line-height, 44px) + 10px);
    }

    .daraja-pos-shell.daraja-pos-layout-v2 .pos_form_totals table,
    .daraja-pos-shell.daraja-pos-layout-v2 .pos_form_totals tbody,
    .daraja-pos-shell.daraja-pos-layout-v2 .pos_form_totals tr,
    .daraja-pos-shell.daraja-pos-layout-v2 .pos_form_totals td {
        display: block;
        width: 100%;
    }

    .daraja-pos-shell.daraja-pos-layout-v2 .pos_form_totals table {
        min-width: 0 !important;
    }

    .daraja-pos-shell.daraja-pos-layout-v2 .pos_form_totals tr + tr {
        margin-top: 8px;
        padding-top: 8px;
        border-top: 1px solid rgba(var(--color-border-rgb), 0.7);
    }

    .daraja-pos-shell.daraja-pos-layout-v2 .pos_form_totals td {
        padding: 6px 0 !important;
        border: none !important;
    }

    .daraja-pos-shell.daraja-pos-layout-v2 .pos-cart-footer-cta {
        justify-content: stretch;
    }

    .daraja-pos-shell.daraja-pos-layout-v2 .pos-cart-checkout-btn {
        width: 100%;
        justify-content: center;
    }

    .daraja-pos-shell.daraja-pos-layout-v2 .daraja-pos-checkout-dock .pos-form-actions,
    .daraja-pos-shell.daraja-pos-layout-v2 .daraja-pos-checkout-dock .pos-form-actions.pos-action-bar {
        position: relative !important;
        bottom: auto !important;
    }

    .daraja-pos-shell.daraja-pos-layout-v2 .daraja-pos-checkout-dock .pos-action-container {
        grid-template-columns: 1fr !important;
    }
}

@media (min-width: 768px) {
    .daraja-pos-shell.daraja-pos-layout-v2 .daraja-pos-grid,
    .daraja-pos-shell.daraja-pos-layout-v2 .daraja-pos-grid.daraja-pos-grid--two,
    .daraja-pos-shell.daraja-pos-layout-v2 .daraja-pos-grid.daraja-pos-grid--single {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: flex-start !important;
    }

    .daraja-pos-shell.daraja-pos-layout-v2 .daraja-pos-grid.daraja-pos-grid--two > .daraja-pos-column--cart {
        flex: 0 0 66.666667% !important;
        max-width: 66.666667% !important;
        width: 66.666667% !important;
    }

    .daraja-pos-shell.daraja-pos-layout-v2 .daraja-pos-grid.daraja-pos-grid--two > .daraja-pos-column--products {
        flex: 0 0 33.333333% !important;
        max-width: 33.333333% !important;
        width: 33.333333% !important;
    }

    .daraja-pos-shell.daraja-pos-layout-v2 .daraja-pos-grid.daraja-pos-grid--single > .daraja-pos-column {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
}

/* Legacy live POS structure reset for sale_pos create/edit */
.pos-legacy-structure .pos_product_div {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin-bottom: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
    position: static !important;
}

.pos-legacy-structure #pos_table {
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    margin-bottom: 0 !important;
}

.pos-legacy-structure #pos_table thead,
.pos-legacy-structure #pos_table thead tr,
.pos-legacy-structure #pos_table thead th {
    background: transparent !important;
    color: inherit !important;
    letter-spacing: normal !important;
    position: static !important;
    text-transform: none !important;
    top: auto !important;
}

.pos-legacy-structure #pos_table thead th {
    border: 1px solid #f4f4f4 !important;
    border-bottom-width: 2px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    padding: 8px !important;
    white-space: normal !important;
}

.pos-legacy-structure #pos_table tbody tr,
.pos-legacy-structure #pos_table tbody tr.product_row,
.pos-legacy-structure #pos_table tbody tr.product_row:nth-child(even),
.pos-legacy-structure #pos_table tbody tr.product_row:hover {
    background: transparent !important;
    transform: none !important;
}

.pos-legacy-structure #pos_table tbody td {
    border: 1px solid #f4f4f4 !important;
    padding: 8px !important;
    vertical-align: middle !important;
}

.pos-legacy-structure #pos_table tbody td.product-col,
.pos-legacy-structure #pos_table thead th.product-col,
.pos-legacy-structure #pos_table tbody td.quantity-col,
.pos-legacy-structure #pos_table thead th.quantity-col,
.pos-legacy-structure #pos_table tbody td.subtotal-col,
.pos-legacy-structure #pos_table thead th.subtotal-col,
.pos-legacy-structure #pos_table tbody td.delete-col,
.pos-legacy-structure #pos_table thead th.delete-col {
    min-width: 0 !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
    width: auto !important;
}

.pos-legacy-structure #pos_table tbody td.product-col img {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    height: auto !important;
    margin-left: 0 !important;
    max-height: 32px !important;
    max-width: 32px !important;
    width: auto !important;
}

.pos-legacy-structure #pos_table tbody td.product-col .text-link,
.pos-legacy-structure #pos_table tbody td.product-col > div[title],
.pos-legacy-structure #pos_table tbody td.product-col > span {
    color: inherit !important;
    font-size: 12px !important;
    font-weight: 400 !important;
}

.pos-legacy-structure #pos_table tbody td.product-col small.text-muted {
    background: transparent !important;
    border-radius: 0 !important;
    color: #777 !important;
    display: inline !important;
    margin-top: 0 !important;
    padding: 0 !important;
    width: auto !important;
}

.pos-legacy-structure #pos_table tbody td .input-group.input-number,
.pos-legacy-structure #pos_table tbody td.quantity-col .input-group.input-number {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    display: table !important;
    max-width: none !important;
    padding: 0 !important;
    width: 100% !important;
}

.pos-legacy-structure #pos_table tbody td .input-group.input-number .input-group-btn,
.pos-legacy-structure #pos_table tbody td.quantity-col .input-group-btn {
    display: table-cell !important;
    width: 1% !important;
}

.pos-legacy-structure #pos_table tbody td .input-group.input-number .btn,
.pos-legacy-structure #pos_table tbody td.quantity-col .input-group-btn .btn,
.pos-legacy-structure #pos_table tbody td.delete-col .pos_remove_row,
.pos-legacy-structure #pos_table tbody td.delete-col button.pos_remove_row {
    background: #fff !important;
    border: 1px solid #d2d6de !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: inherit !important;
    height: auto !important;
    min-width: 0 !important;
    padding: 6px 10px !important;
    transform: none !important;
    width: auto !important;
}

.pos-legacy-structure #pos_table tbody td .input-group.input-number .pos_quantity,
.pos-legacy-structure #pos_table tbody td.quantity-col .pos_quantity,
.pos-legacy-structure #pos_table tbody td .input-group.input-number .input_quantity {
    background: #fff !important;
    border: 1px solid #d2d6de !important;
    color: inherit !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    max-width: none !important;
    min-width: 0 !important;
    padding: 6px 4px !important;
    text-align: center !important;
    width: 100% !important;
}

.pos-legacy-structure #pos_table tbody td .sub_unit,
.pos-legacy-structure #pos_table tbody td.quantity-col .sub_unit {
    background: #fff !important;
    border: 1px solid #d2d6de !important;
    border-radius: 0 !important;
    display: block !important;
    margin-top: 4px !important;
    max-width: none !important;
    width: 100% !important;
}

.pos-legacy-structure #pos_table tbody:empty::after {
    content: none !important;
}

.pos-legacy-structure #product_list_body {
    display: block !important;
    gap: 0 !important;
    padding: 0 !important;
}

.pos-legacy-structure #product_list_body .product_list {
    float: left !important;
}

.pos-legacy-structure #product_list_body .product_box {
    background: #fff !important;
    border: 1px solid #d2d6de !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    display: block !important;
    height: 110px !important;
    min-height: 110px !important;
    overflow: hidden !important;
    padding: 8px !important;
    transform: none !important;
}

.pos-legacy-structure #product_list_body .product_box::after {
    display: none !important;
}

.pos-legacy-structure #product_list_body .product_box:hover,
.pos-legacy-structure #product_list_body .product_box:active {
    box-shadow: none !important;
    transform: none !important;
}

.pos-legacy-structure #product_list_body .product_box .image-container {
    background-color: #f8f8f8 !important;
    border-radius: 0 !important;
    height: 52px !important;
    margin-bottom: 6px !important;
}

.pos-legacy-structure #product_list_body .product_box .text_div {
    display: block !important;
    text-align: center !important;
}

.pos-legacy-structure #product_list_body .product_box .text_div .text {
    color: #333 !important;
    display: block !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    margin-bottom: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.pos-legacy-structure #product_list_body .product_box .text_div small.text-muted {
    color: #777 !important;
    font-size: 10px !important;
}

.pos-legacy-structure #product_list_body .col-md-12 h4 {
    padding: 20px 0 !important;
}
