﻿        :root {
            /* Brand Accents - Modern Royal Blue (Same as User App) */
            --brand-primary: #2563eb;
            --brand-primary-dark: #1d4ed8;
            --brand-primary-light: #eff6ff;
            --brand-primary-subtle: #edf5ff;
            --brand-accent: #2563eb;
            
            /* Light Surfaces */
            --app-bg: #f8fafc;
            --app-surface: #ffffff;
            --app-card: #ffffff;
            --app-card-hover: #f1f5f9;
            --app-border: #e2e8f0;
            --app-border-subtle: #cbd5e1;
            
            /* Typography */
            --text-primary: #0f172a;
            --text-secondary: #475569;
            --text-muted: #64748b;
            
            /* KPI & Status Accents */
            --accent-fast: #10b981;
            --accent-fast-bg: #ecfdf5;
            --accent-fast-border: #a7f3d0;
            --accent-fast-text: #065f46;
            
            --accent-dead: #ef4444;
            --accent-dead-bg: #fee2e2;
            --accent-dead-border: #fca5a5;
            --accent-dead-text: #991b1b;
            
            --accent-slow: #f59e0b;
            --accent-slow-bg: #fef3c7;
            --accent-slow-border: #fde68a;
            --accent-slow-text: #92400e;
            
            --bottom-nav-height: 64px;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            -webkit-tap-highlight-color: transparent;
        }

        body {
            font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            background-color: #f1f5f9;
            color: var(--text-primary);
            min-height: 100vh;
            display: flex;
            justify-content: center;
            overflow-x: hidden;
        }

        [x-cloak] { display: none !important; }

        /* Mobile App Shell Container */
        .mobile-app-container {
            width: 100%;
            max-width: 480px;
            min-height: 100vh;
            background-color: var(--app-bg);
            display: flex;
            flex-direction: column;
            position: relative;
            box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
            border-left: 1px solid var(--app-border);
            border-right: 1px solid var(--app-border);
            padding-bottom: calc(var(--bottom-nav-height) + 20px);
        }

        /* ─── APP HEADER ─────────────────────────────────────────────────── */
        .app-header {
            position: sticky;
            top: 0;
            z-index: 50;
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(14px);
            -webkit-backdrop-filter: blur(14px);
            border-bottom: 1px solid var(--app-border);
            padding: 10px 14px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
        }

        .header-brand {
            display: flex;
            align-items: center;
            gap: 8px;
            flex: 1;
            min-width: 0;
        }

        .hamburger-btn {
            background: var(--app-card);
            border: 1px solid var(--app-border);
            color: var(--text-primary);
            width: 38px;
            height: 38px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            flex-shrink: 0;
            transition: all 0.2s;
        }
        .hamburger-btn:hover {
            border-color: var(--brand-primary);
            background: var(--brand-primary-light);
            color: var(--brand-primary);
        }

        .brand-title-wrap {
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .brand-title {
            font-family: 'Outfit', sans-serif;
            font-size: 15px;
            font-weight: 800;
            letter-spacing: 0.3px;
            color: var(--text-primary);
            line-height: 1.1;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .store-branch-badge {
            font-size: 10px;
            font-weight: 700;
            color: var(--brand-primary);
            letter-spacing: 0.4px;
            display: flex;
            align-items: center;
            gap: 4px;
            margin-top: 2px;
        }

        .live-dot {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background-color: var(--accent-fast);
            display: inline-block;
            box-shadow: 0 0 8px var(--accent-fast);
        }

        .header-actions {
            display: flex;
            align-items: center;
            gap: 6px;
            flex-shrink: 0;
        }

        .header-icon-btn {
            background: var(--app-card);
            border: 1px solid var(--app-border);
            color: var(--text-primary);
            width: 36px;
            height: 36px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s;
            position: relative;
        }
        .header-icon-btn:hover {
            border-color: var(--brand-primary);
            background: var(--brand-primary-light);
            color: var(--brand-primary);
        }

        .cart-badge-count {
            position: absolute;
            top: -4px;
            right: -4px;
            background: #ef4444;
            color: white;
            font-size: 10px;
            font-weight: 800;
            min-width: 18px;
            height: 18px;
            border-radius: 9px;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0 4px;
            border: 2px solid #ffffff;
            animation: bounceIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }

        @keyframes bounceIn {
            0% { transform: scale(0); }
            80% { transform: scale(1.2); }
            100% { transform: scale(1); }
        }

        /* ─── SLIDE-OUT SIDEBAR DRAWER ────────────────────────────────────── */
        .sidebar-overlay {
            position: fixed;
            inset: 0;
            background: rgba(15, 23, 42, 0.6);
            backdrop-filter: blur(6px);
            z-index: 100;
            display: flex;
        }

        .sidebar-panel {
            width: 82%;
            max-width: 330px;
            height: 100%;
            background: #ffffff;
            border-right: 1px solid var(--app-border);
            display: flex;
            flex-direction: column;
            overflow-y: auto;
            animation: slideInLeft 0.25s cubic-bezier(0.16, 1, 0.3, 1);
            box-shadow: 10px 0 30px rgba(0,0,0,0.15);
        }

        @keyframes slideInLeft {
            from { transform: translateX(-100%); }
            to { transform: translateX(0); }
        }

        .sidebar-header {
            padding: 20px 16px 16px;
            background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
            border-bottom: 1px solid var(--app-border);
        }

        .sidebar-user-card {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 14px;
        }

        .sidebar-avatar {
            width: 44px;
            height: 44px;
            background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
            font-weight: 800;
            color: white;
            box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
        }

        .sidebar-nav-section {
            padding: 12px 10px;
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .sidebar-section-title {
            font-size: 10px;
            font-weight: 800;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 1px;
            padding: 8px 10px 4px;
        }

        .sidebar-nav-btn {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 10px 12px;
            border-radius: 10px;
            background: transparent;
            border: 1px solid transparent;
            color: var(--text-secondary);
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            text-align: left;
            width: 100%;
        }

        .sidebar-nav-btn:hover {
            background: var(--brand-primary-light);
            color: var(--brand-primary);
        }

        .sidebar-nav-btn.active {
            background: var(--brand-primary-light);
            border-color: #bfdbfe;
            color: #1d4ed8;
            font-weight: 700;
        }

        .sidebar-nav-btn .left-content {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .nav-badge-pill {
            font-size: 10px;
            font-weight: 800;
            padding: 2px 7px;
            border-radius: 12px;
        }

        /* ─── SEARCH & TOP BARS ───────────────────────────────────────────── */
        .search-scan-bar {
            padding: 10px 14px;
            background-color: var(--app-surface);
            display: flex;
            gap: 8px;
            align-items: center;
            border-bottom: 1px solid var(--app-border);
        }

        .search-input-wrap {
            flex: 1;
            position: relative;
            display: flex;
            align-items: center;
        }

        .search-input-wrap svg {
            position: absolute;
            left: 12px;
            color: var(--text-muted);
            pointer-events: none;
        }

        .search-input {
            width: 100%;
            background: var(--app-bg);
            border: 1px solid var(--app-border);
            border-radius: 10px;
            padding: 9px 12px 9px 36px;
            color: var(--text-primary);
            font-size: 13px;
            font-family: inherit;
            outline: none;
            transition: border-color 0.2s, background-color 0.2s;
        }
        .search-input:focus {
            border-color: var(--brand-primary);
            background: #ffffff;
        }
        .search-input::placeholder {
            color: var(--text-muted);
        }

        .quick-scan-btn {
            background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
            color: white;
            border: none;
            padding: 9px 14px;
            border-radius: 10px;
            font-weight: 700;
            font-size: 12px;
            display: flex;
            align-items: center;
            gap: 6px;
            cursor: pointer;
            box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
            white-space: nowrap;
        }

        /* ─── VELOCITY / STATUS FILTER CHIPS ──────────────────────────────── */
        .status-chips-scroll {
            display: flex;
            gap: 6px;
            padding: 8px 14px;
            background: var(--app-surface);
            overflow-x: auto;
            border-bottom: 1px solid var(--app-border);
            scrollbar-width: none;
        }
        .status-chips-scroll::-webkit-scrollbar { display: none; }

        .chip-pill {
            padding: 6px 12px;
            border-radius: 20px;
            font-size: 11px;
            font-weight: 700;
            background: var(--app-surface);
            border: 1px solid var(--app-border);
            color: var(--text-secondary);
            cursor: pointer;
            white-space: nowrap;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            gap: 5px;
        }
        .chip-pill.active {
            background: #0f172a;
            border-color: #0f172a;
            color:var(--text-primary);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        }

        /* ─── MAIN LAYOUT: SIDEBAR + PRODUCT GRID ────────────────────────── */
        .pos-layout {
            display: flex;
            flex: 1;
            min-height: 0;
        }

        /* Category Vertical Bar */
        .category-vertical-sidebar {
            width: 72px;
            background: var(--app-surface);
            border-right: 1px solid var(--app-border);
            display: flex;
            flex-direction: column;
            overflow-y: auto;
            scrollbar-width: none;
            flex-shrink: 0;
        }
        .category-vertical-sidebar::-webkit-scrollbar { display: none; }

        .cat-item-btn {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 4px;
            padding: 10px 4px;
            border: none;
            background: transparent;
            color: var(--text-muted);
            cursor: pointer;
            border-bottom: 1px solid var(--app-border);
            transition: all 0.2s;
        }

        .cat-item-btn.active {
            background: var(--brand-primary-light);
            color: var(--brand-primary);
            border-left: 3px solid var(--brand-primary);
        }

        .cat-icon-circle {
            width: 32px;
            height: 32px;
            border-radius: 8px;
            background: #f1f5f9;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 15px;
        }

        .cat-item-btn.active .cat-icon-circle {
            background: #dbeafe;
        }

        .cat-name-label {
            font-size: 9.5px;
            font-weight: 700;
            text-align: center;
            line-height: 1.1;
        }

        /* Product Grid */
        .product-grid-scroll {
            flex: 1;
            padding: 10px;
            overflow-y: auto;
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 10px;
            align-content: start;
        }

        .pos-product-card {
            background: var(--app-card);
            border: 1px solid var(--app-border);
            border-radius: 12px;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            position: relative;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
            transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
        }
        .pos-product-card:hover {
            transform: translateY(-2px);
            border-color: #bfdbfe;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        }
        .pos-product-card:active {
            transform: scale(0.98);
        }

        .product-card-img-wrap {
            height: 110px;
            background: #f8fafc;
            position: relative;
            overflow: hidden;
        }

        .product-card-img-wrap img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.3s;
        }

        .velocity-badge-floating {
            position: absolute;
            top: 6px;
            left: 6px;
            font-size: 9px;
            font-weight: 800;
            padding: 2px 6px;
            border-radius: 6px;
            backdrop-filter: blur(6px);
            display: flex;
            align-items: center;
            gap: 3px;
        }
        .velocity-badge-floating.fast {
            background: #ecfdf5;
            color: #065f46;
            border: 1px solid #a7f3d0;
        }
        .velocity-badge-floating.dead {
            background: #fee2e2;
            color: #991b1b;
            border: 1px solid #fca5a5;
        }
        .velocity-badge-floating.normal {
            background: #f1f5f9;
            color: #475569;
            border: 1px solid #e2e8f0;
        }

        .stock-badge-floating {
            position: absolute;
            bottom: 6px;
            right: 6px;
            background: rgba(255, 255, 255, 0.94);
            backdrop-filter: blur(4px);
            font-size: 9.5px;
            font-weight: 700;
            padding: 2px 6px;
            border-radius: 6px;
            color: #0f172a;
            border: 1px solid #cbd5e1;
            box-shadow: 0 1px 3px rgba(0,0,0,0.08);
        }

        .product-card-content {
            padding: 8px;
            display: flex;
            flex-direction: column;
            gap: 4px;
            flex: 1;
        }

        .product-sku-tag {
            font-family: 'JetBrains Mono', monospace;
            font-size: 9px;
            font-weight: 700;
            color: var(--brand-primary);
        }

        .product-card-title {
            font-size: 12px;
            font-weight: 700;
            color: var(--text-primary);
            line-height: 1.25;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            min-height: 28px;
        }

        .product-fabric-text {
            font-size: 9.5px;
            color: var(--text-muted);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .product-price-row {
            display: flex;
            align-items: baseline;
            gap: 4px;
            margin-top: 2px;
        }

        .selling-price-text {
            font-family: 'Outfit', sans-serif;
            font-size: 15px;
            font-weight: 800;
            color: var(--text-primary);
        }

        .mrp-strike-text {
            font-size: 10px;
            color: var(--text-muted);
            text-decoration: line-through;
        }

        .add-cart-btn-row {
            margin-top: auto;
            padding-top: 6px;
        }

        /* Squircle Add Button - Exact Same Shape & Color as Image 2 */
        .add-cart-btn {
            width: 100%;
            background: #edf5ff;
            border: 1.5px solid #2563eb;
            color: #2563eb;
            border-radius: 8px;
            padding: 7px;
            font-size: 11.5px;
            font-weight: 800;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 5px;
            box-shadow: 0 1px 4px rgba(37, 99, 235, 0.12);
        }
        .add-cart-btn:hover {
            background: #2563eb;
            color:var(--text-primary);
        }

        /* ─── FLOATING BOTTOM BILL BAR ───────────────────────────────────── */
        .floating-cart-bar {
            position: fixed;
            bottom: calc(var(--bottom-nav-height) + 10px);
            left: 50%;
            transform: translateX(-50%);
            width: calc(100% - 24px);
            max-width: 456px;
            background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
            border: 1px solid rgba(255, 255, 255, 0.25);
            border-radius: 14px;
            padding: 10px 14px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
            z-index: 65;
            cursor: pointer;
            animation: slideUpFloat 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }

        @keyframes slideUpFloat {
            from { transform: translate(-50%, 40px); opacity: 0; }
            to { transform: translate(-50%, 0); opacity: 1; }
        }

        .cart-bar-left {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .cart-bar-count-badge {
            background: #ffffff;
            color: #1d4ed8;
            font-weight: 900;
            font-size: 12px;
            width: 26px;
            height: 26px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .cart-bar-pricing {
            display: flex;
            flex-direction: column;
        }

        .cart-bar-total {
            font-family: 'Outfit', sans-serif;
            font-size: 15px;
            font-weight: 800;
            color:var(--text-primary);
        }

        .cart-bar-tax-label {
            font-size: 9.5px;
            color: #dbeafe;
            font-weight: 600;
        }

        .cart-bar-action-btn {
            background: #10b981;
            color: white;
            border: none;
            padding: 8px 14px;
            border-radius: 10px;
            font-family: 'Outfit', sans-serif;
            font-weight: 800;
            font-size: 12px;
            display: flex;
            align-items: center;
            gap: 5px;
            box-shadow: 0 4px 10px rgba(16, 185, 129, 0.35);
        }

        /* ─── BOTTOM NAVIGATION BAR ──────────────────────────────────────── */
        .bottom-app-nav {
            position: fixed;
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 100%;
            max-width: 480px;
            height: var(--bottom-nav-height);
            background: #ffffff;
            border-top: 1px solid var(--app-border);
            display: flex;
            align-items: center;
            justify-content: space-around;
            z-index: 70;
            padding-bottom: env(safe-area-inset-bottom);
            box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.04);
        }

        .bottom-nav-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 3px;
            color: var(--text-muted);
            background: transparent;
            border: none;
            cursor: pointer;
            width: 20%;
            height: 100%;
            transition: color 0.2s;
        }

        .bottom-nav-item.active {
            color: var(--brand-primary);
        }

        .nav-tab-label {
            font-size: 9.5px;
            font-weight: 700;
        }

        /* ─── COMMON SCREEN STYLES ────────────────────────────────────────── */
        .screen-container {
            padding: 12px;
            display: flex;
            flex-direction: column;
            gap: 12px;
            flex: 1;
            overflow-y: auto;
        }

        .screen-header-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 2px;
        }

        .screen-heading {
            font-family: 'Outfit', sans-serif;
            font-size: 17px;
            font-weight: 800;
            color: var(--text-primary);
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .screen-subheading {
            font-size: 11px;
            color: var(--text-secondary);
        }

        .kpi-metric-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 10px;
        }

        .kpi-card {
            background: var(--app-card);
            border: 1px solid var(--app-border);
            border-radius: 12px;
            padding: 12px;
            display: flex;
            flex-direction: column;
            gap: 4px;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
        }

        .kpi-label {
            font-size: 10px;
            font-weight: 700;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .kpi-value {
            font-family: 'Outfit', sans-serif;
            font-size: 18px;
            font-weight: 800;
            color: var(--text-primary);
        }

        .kpi-sub {
            font-size: 9.5px;
            color: var(--text-secondary);
        }

        /* Tabs bar inside screens */
        .segmented-tabs {
            display: flex;
            background: #f1f5f9;
            border: 1px solid var(--app-border);
            border-radius: 12px;
            padding: 4px;
            gap: 6px;
        }

        .segmented-tab-btn {
            flex: 1;
            padding: 10px 14px;
            border-radius: 10px;
            border: none;
            background: transparent;
            color: var(--text-muted);
            font-size: 12.5px;
            font-weight: 800;
            cursor: pointer;
            transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
            text-align: center;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
        }

        .segmented-tab-btn.active {
            background: #0f172a;
            color:var(--text-primary);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        }

        /* ─── CONTACTS / KHATA CARDS ─────────────────────────────────────── */
        .contact-card {
            background: var(--app-card);
            border: 1px solid var(--app-border);
            border-radius: 12px;
            padding: 12px;
            display: flex;
            flex-direction: column;
            gap: 8px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.03);
            transition: border-color 0.2s, box-shadow 0.2s;
        }

        .contact-card:hover {
            border-color: #bfdbfe;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
        }

        .contact-top-row {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
        }

        .contact-avatar-box {
            width: 36px;
            height: 36px;
            border-radius: 10px;
            background: #edf5ff;
            color: #2563eb;
            font-weight: 800;
            font-size: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            border: 1px solid #bfdbfe;
        }

        .contact-info {
            flex: 1;
            margin-left: 10px;
        }

        .contact-name {
            font-size: 13px;
            font-weight: 800;
            color: var(--text-primary);
        }

        .contact-meta {
            font-size: 10.5px;
            color: var(--text-secondary);
            display: flex;
            gap: 8px;
            align-items: center;
            margin-top: 1px;
        }

        .udhar-badge {
            font-family: 'JetBrains Mono', monospace;
            font-size: 11px;
            font-weight: 800;
            padding: 4px 8px;
            border-radius: 8px;
            text-align: right;
        }

        .udhar-badge.due {
            background: #fee2e2;
            color: #991b1b;
            border: 1px solid #fca5a5;
        }

        .udhar-badge.clear {
            background: #ecfdf5;
            color: #065f46;
            border: 1px solid #a7f3d0;
        }

        .udhar-badge.advance {
            background: #fef3c7;
            color: #92400e;
            border: 1px solid #fde68a;
        }

        .contact-actions-row {
            display: flex;
            gap: 6px;
            padding-top: 6px;
            border-top: 1px solid var(--app-border);
        }

        .contact-action-btn {
            flex: 1;
            padding: 6px 8px;
            border-radius: 8px;
            font-size: 11px;
            font-weight: 700;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 4px;
            cursor: pointer;
            border: 1px solid var(--app-border);
            background: var(--app-bg);
            color: var(--text-secondary);
            transition: all 0.2s;
            text-decoration: none;
        }

        .contact-action-btn:hover {
            background: #f1f5f9;
            color: var(--text-primary);
        }

        .contact-action-btn.whatsapp {
            color: #059669;
            border-color: #a7f3d0;
            background: #ecfdf5;
        }

        .contact-action-btn.jama {
            color: #2563eb;
            border-color: #bfdbfe;
            background: #eff6ff;
        }

        /* ─── STOCK PRODUCT CARD CLICKABLE ───────────────────────────────── */
        .stock-product-card {
            cursor: pointer;
            transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
        }
        .stock-product-card:hover {
            border-color: var(--brand-primary);
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
        }

        /* ─── FULL-SCREEN MOBILE PRODUCT DETAIL MODAL ─────────────────────── */
        .full-screen-product-modal {
            position: fixed;
            inset: 0;
            background: var(--app-bg);
            z-index: 120;
            display: flex;
            flex-direction: column;
            overflow-y: auto;
            animation: slideInFull 0.28s cubic-bezier(0.16, 1, 0.3, 1);
        }

        @keyframes slideInFull {
            from { transform: translateY(100%); opacity: 0; }
            to { transform: translateY(0); opacity: 1; }
        }

        .detail-top-nav {
            position: sticky;
            top: 0;
            z-index: 20;
            background: rgba(255, 255, 255, 0.96);
            backdrop-filter: blur(14px);
            border-bottom: 1px solid var(--app-border);
            padding: 10px 14px;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .detail-back-btn {
            background: var(--app-card);
            border: 1px solid var(--app-border);
            color: var(--text-primary);
            padding: 7px 12px;
            border-radius: 10px;
            font-size: 12px;
            font-weight: 700;
            display: flex;
            align-items: center;
            gap: 6px;
            cursor: pointer;
            transition: all 0.2s;
        }
        .detail-back-btn:hover {
            border-color: var(--brand-primary);
            background: var(--brand-primary-light);
            color: var(--brand-primary);
        }

        .detail-content-scroll {
            padding: 14px;
            display: flex;
            flex-direction: column;
            gap: 14px;
            padding-bottom: 40px;
            max-width: 480px;
            margin: 0 auto;
            width: 100%;
        }

        .detail-hero-banner {
            position: relative;
            border-radius: 16px;
            overflow: hidden;
            height: 220px;
            background: #f8fafc;
            border: 1px solid var(--app-border);
            box-shadow: 0 4px 16px rgba(0,0,0,0.06);
        }

        .detail-hero-banner img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .hero-floating-pills {
            position: absolute;
            bottom: 12px;
            left: 12px;
            right: 12px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .detail-section-card {
            background: var(--app-card);
            border: 1px solid var(--app-border);
            border-radius: 14px;
            padding: 14px;
            display: flex;
            flex-direction: column;
            gap: 10px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.04);
        }

        .detail-card-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding-bottom: 8px;
            border-bottom: 1px solid var(--app-border);
        }

        .detail-card-title {
            font-family: 'Outfit', sans-serif;
            font-size: 13.5px;
            font-weight: 800;
            color: var(--text-primary);
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .info-data-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 10px;
        }

        .info-data-box {
            background: #f8fafc;
            border: 1px solid var(--app-border);
            border-radius: 10px;
            padding: 9px 11px;
            display: flex;
            flex-direction: column;
            gap: 3px;
        }

        .info-box-label {
            font-size: 9.5px;
            color: var(--text-muted);
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .info-box-val {
            font-size: 13px;
            font-weight: 800;
            color: var(--text-primary);
        }

        /* Profit IQ Card */
        .profit-iq-box {
            background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
            border: 1.5px solid #10b981;
            border-radius: 12px;
            padding: 12px 14px;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .profit-pct-badge {
            background: #10b981;
            color:var(--text-primary);
            font-family: 'Outfit', sans-serif;
            font-size: 15px;
            font-weight: 900;
            padding: 4px 10px;
            border-radius: 8px;
            box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
            display: flex;
            align-items: center;
            gap: 4px;
        }

        /* Mock Social Links Grid */
        .mock-links-grid {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .mock-link-item {
            background: var(--app-card);
            border: 1px solid var(--app-border);
            border-radius: 10px;
            padding: 10px 12px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            text-decoration: none;
            color: var(--text-primary);
            transition: all 0.2s;
            cursor: pointer;
        }

        .mock-link-item:hover {
            border-color: var(--brand-primary);
            background: var(--brand-primary-light);
        }

        .mock-link-left {
            display: flex;
            align-items: center;
            gap: 10px;
            min-width: 0;
            flex: 1;
        }

        .mock-platform-icon {
            width: 32px;
            height: 32px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            flex-shrink: 0;
        }

        .mock-link-texts {
            display: flex;
            flex-direction: column;
            min-width: 0;
            flex: 1;
        }

        .mock-platform-name {
            font-size: 12px;
            font-weight: 800;
            color: var(--text-primary);
        }

        .mock-url-preview {
            font-size: 10px;
            color: var(--brand-primary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            font-family: 'JetBrains Mono', monospace;
        }

        
        /* ─── PHONEPE STYLE TRANSACTION HISTORY (IMAGE 3) ────────────────── */
        .history-screen-wrap {
            background: #ffffff;
            min-height: 100%;
            padding: 4px 16px 85px 16px;
        }

        .history-top-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 12px 0 14px 0;
        }

        .history-main-title {
            font-size: 24px;
            font-weight: 800;
            color: #0f172a;
            letter-spacing: -0.4px;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
        }

        .history-help-btn {
            width: 26px;
            height: 26px;
            border-radius: 50%;
            border: 1.8px solid #0f172a;
            background: transparent;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #0f172a;
            font-size: 14px;
            font-weight: 800;
            cursor: pointer;
            transition: all 0.15s;
            line-height: 1;
            padding: 0;
        }
        .history-help-btn:active {
            transform: scale(0.9);
            background: #f1f5f9;
        }

        /* Search & Filter Pill Container */
        .history-search-container {
            background: #f1f3f9;
            border-radius: 28px;
            padding: 0 16px;
            height: 48px;
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 8px;
            border: 1px solid transparent;
            transition: all 0.2s;
        }
        .history-search-container:focus-within {
            background: #ffffff;
            border-color: #cbd5e1;
            box-shadow: 0 2px 10px rgba(0,0,0,0.06);
        }

        .history-search-input {
            flex: 1;
            border: none;
            background: transparent;
            font-size: 16px;
            font-weight: 500;
            color: #0f172a;
            font-family: inherit;
            outline: none;
        }
        .history-search-input::placeholder {
            color: #64748b;
            font-weight: 400;
        }

        .history-search-divider {
            width: 1px;
            height: 22px;
            background: #cbd5e1;
        }

        .history-filter-trigger {
            background: transparent;
            border: none;
            cursor: pointer;
            padding: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #0f172a;
        }

        /* Filter Chips Row */
        .history-chips-row {
            display: flex;
            gap: 8px;
            overflow-x: auto;
            padding: 6px 0 14px 0;
            scrollbar-width: none;
        }
        .history-chips-row::-webkit-scrollbar {
            display: none;
        }

        .history-chip {
            flex-shrink: 0;
            padding: 6px 14px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 700;
            border: 1px solid #e2e8f0;
            background: #ffffff;
            color: #475569;
            cursor: pointer;
            transition: all 0.15s;
        }
        .history-chip.active {
            background: #0f172a;
            color: #ffffff;
            border-color: #0f172a;
        }

        /* History List & Rows */
        .history-list-group {
            display: flex;
            flex-direction: column;
            background: #ffffff;
        }

        .history-tx-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 14px 4px;
            border-bottom: 1px solid #f1f5f9;
            cursor: pointer;
            user-select: none;
            transition: background 0.15s;
        }
        .history-tx-row:active {
            background: #f8fafc;
        }

        /* Circular Icon */
        .history-avatar-circle {
            width: 42px;
            height: 42px;
            border-radius: 50%;
            background: #f3f4f6;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            margin-right: 14px;
        }

        /* Text Content */
        .history-center-info {
            display: flex;
            flex-direction: column;
            gap: 2px;
            flex: 1;
            min-width: 0;
        }

        .history-prefix-label {
            font-size: 12px;
            font-weight: 500;
            color: #64748b;
            line-height: 1.2;
        }

        .history-party-title {
            font-size: 15px;
            font-weight: 700;
            color: #0f172a;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            line-height: 1.3;
        }

        .history-date-subtext {
            font-size: 12.5px;
            font-weight: 500;
            color: #64748b;
            line-height: 1.2;
        }

        /* Right Amount Column */
        .history-right-amount-col {
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            gap: 3px;
            flex-shrink: 0;
            margin-left: 10px;
        }

        .history-amount-val {
            font-size: 16.5px;
            font-weight: 800;
            font-family: 'Outfit', sans-serif;
            color: #0f172a;
            letter-spacing: -0.2px;
        }
        .history-amount-val.received {
            color: #16a34a;
        }

        .history-bank-badge-row {
            display: flex;
            align-items: center;
            gap: 4px;
            font-size: 11.5px;
            font-weight: 500;
            color: #64748b;
        }

        .history-bank-mini-icon {
            width: 14px;
            height: 14px;
            border-radius: 2.5px;
            background: #ffffff;
            border: 1px solid #cbd5e1;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
        }

        /* ─── BILLS & INVOICE HISTORY ────────────────────────────────────── */
        .bill-card {
            background: var(--app-card);
            border: 1px solid var(--app-border);
            border-radius: 12px;
            padding: 12px;
            display: flex;
            flex-direction: column;
            gap: 8px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.03);
        }

        .bill-header-line {
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .bill-number {
            font-family: 'JetBrains Mono', monospace;
            font-size: 12px;
            font-weight: 800;
            color: var(--brand-primary);
        }

        .bill-time {
            font-size: 10px;
            color: var(--text-muted);
        }

        .bill-customer {
            font-size: 12px;
            font-weight: 700;
            color: var(--text-primary);
        }

        .bill-items-desc {
            font-size: 10.5px;
            color: var(--text-secondary);
            line-height: 1.3;
        }

        .bill-footer-line {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding-top: 6px;
            border-top: 1px solid var(--app-border);
        }

        .pay-mode-pill {
            font-size: 9.5px;
            font-weight: 800;
            padding: 2px 7px;
            border-radius: 6px;
            text-transform: uppercase;
        }
        .pay-mode-pill.cash { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
        .pay-mode-pill.upi { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
        .pay-mode-pill.udhar { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

        .bill-total-price {
            font-family: 'Outfit', sans-serif;
            font-size: 15px;
            font-weight: 800;
            color: var(--text-primary);
        }

        /* ─── MODAL DRAWERS ──────────────────────────────────────────────── */
        .app-modal-overlay {
            position: fixed;
            inset: 0;
            background: rgba(15, 23, 42, 0.6);
            backdrop-filter: blur(6px);
            z-index: 100;
            display: flex;
            align-items: flex-end;
            justify-content: center;
        }

        .bottom-sheet-modal {
            background: #ffffff;
            border-top: 1px solid var(--app-border);
            border-radius: 24px 24px 0 0;
            width: 100%;
            max-width: 480px;
            max-height: 88vh;
            display: flex;
            flex-direction: column;
            padding: 16px 18px 24px;
            color: var(--text-primary);
            overflow-y: auto;
            animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
            box-shadow: 0 -10px 40px rgba(0,0,0,0.2);
        }

        @keyframes slideUp {
            from { transform: translateY(100%); }
            to { transform: translateY(0); }
        }

        .modal-drag-pill {
            width: 38px;
            height: 4px;
            background: #cbd5e1;
            border-radius: 2px;
            margin: 0 auto 12px;
        }

        /* Form Inputs */
        .form-group {
            display: flex;
            flex-direction: column;
            gap: 4px;
            margin-bottom: 12px;
        }

        .form-label {
            font-size: 11px;
            font-weight: 700;
            color: var(--text-secondary);
        }

        .form-input {
            width: 100%;
            background: var(--app-bg);
            border: 1px solid var(--app-border);
            border-radius: 10px;
            padding: 10px 12px;
            color: var(--text-primary);
            font-size: 13px;
            font-family: inherit;
            outline: none;
            transition: border-color 0.2s, background-color 0.2s;
        }
        .form-input:focus {
            border-color: var(--brand-primary);
            background: #ffffff;
        }

        .form-select {
            cursor: pointer;
        }

        /* Laser Scanner Viewport */
        .laser-scanner-viewport {
            height: 130px;
            background: #0f172a;
            border-radius: 12px;
            margin: 10px 0;
            position: relative;
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
            border: 1px solid var(--app-border);
        }

        .laser-sweep-line {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 2px;
            background: #ef4444;
            box-shadow: 0 0 12px 2px #ef4444;
            animation: sweep 1.4s ease-in-out infinite alternate;
        }

        @keyframes sweep {
            0% { top: 10%; }
            100% { top: 90%; }
        }


        /* ─── COLOR & STOCK VARIANTS (Options / Colors) ──────────────────── */
        .color-variants-section {
            background: var(--app-card);
            border: 1px solid var(--app-border);
            border-radius: 14px;
            padding: 12px;
            display: flex;
            flex-direction: column;
            gap: 10px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.04);
        }

        .color-variants-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .color-variants-title {
            font-family: 'Outfit', sans-serif;
            font-size: 13px;
            font-weight: 800;
            color: var(--text-primary);
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .color-variants-count {
            font-size: 10.5px;
            font-weight: 700;
            color: var(--brand-primary);
            background: #eff6ff;
            padding: 2px 8px;
            border-radius: 12px;
            border: 1px solid #bfdbfe;
        }

        .color-variants-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 8px;
        }

        .color-variant-card {
            background: var(--app-card);
            border: 1.5px solid var(--app-border);
            border-radius: 10px;
            overflow: hidden;
            cursor: pointer;
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
            display: flex;
            flex-direction: column;
            text-align: center;
            position: relative;
        }

        .color-variant-card:hover {
            border-color: #2563eb;
            transform: translateY(-2px);
        }

        .color-variant-card.active {
            border-color: #2563eb;
            background: #eff6ff;
            box-shadow: 0 0 0 2px #bfdbfe, 0 4px 12px rgba(37, 99, 235, 0.15);
        }

        .color-variant-img-wrap {
            height: 95px;
            width: 100%;
            position: relative;
            background: #f8fafc;
            overflow: hidden;
        }

        .color-variant-img-wrap img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.3s;
        }

        .color-variant-card:hover .color-variant-img-wrap img {
            transform: scale(1.05);
        }

        /* Numbering / Pieces in the bottom right corner of each color thumbnail */
        .color-stock-badge-corner {
            position: absolute;
            bottom: 4px;
            right: 4px;
            background: rgba(255, 255, 255, 0.94);
            backdrop-filter: blur(4px);
            color: #2563eb;
            font-size: 10px;
            font-weight: 800;
            font-family: 'JetBrains Mono', monospace;
            padding: 2px 6px;
            border-radius: 6px;
            border: 1px solid #bfdbfe;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
            display: flex;
            align-items: center;
            gap: 2px;
            line-height: 1.1;
        }

        .color-variant-card.active .color-stock-badge-corner {
            background: #2563eb;
            color:var(--text-primary);
            border-color: #1d4ed8;
            box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
        }

        .color-variant-name {
            padding: 6px 4px;
            font-size: 10.5px;
            font-weight: 700;
            color: var(--text-secondary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            line-height: 1.2;
        }

        .color-variant-card.active .color-variant-name {
            color: #2563eb;
            font-weight: 800;
        }

        /* Toast notification */
        .toast-bubble {
            position: fixed;
            top: 70px;
            left: 50%;
            transform: translateX(-50%);
            background: #0f172a;
            color:var(--text-primary);
            border: 1px solid #334155;
            padding: 10px 18px;
            border-radius: 25px;
            font-size: 12px;
            font-weight: 700;
            box-shadow: 0 8px 25px rgba(0,0,0,0.2);
            z-index: 200;
            animation: fadeInDown 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            display: flex;
            align-items: center;
            gap: 8px;
        }

        @keyframes fadeInDown {
            from { transform: translate(-50%, -20px); opacity: 0; }
            to { transform: translate(-50%, 0); opacity: 1; }
        }

        /* ─── CONTACTS & DIRECTORY UI (IMAGE 1 & 4 / SOFTWARE TEAM CRM) ────── */
        .contacts-screen-wrap {
            background: #ffffff;
            min-height: 100%;
            padding-bottom: 85px;
        }

        .contacts-search-header {
            padding: 10px 14px 10px 14px;
            background: rgba(255, 255, 255, 0.98);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border-bottom: 1px solid #e2e8f0;
            position: sticky;
            top: 0;
            z-index: 40;
        }

        .contacts-search-row {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .contacts-menu-btn {
            width: 38px;
            height: 38px;
            border-radius: 12px;
            background: #f1f5f9;
            border: 1px solid #e2e8f0;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #334155;
            cursor: pointer;
            flex-shrink: 0;
            transition: all 0.15s;
        }
        .contacts-menu-btn:hover {
            background: #e2e8f0;
        }
        .contacts-menu-btn:active {
            transform: scale(0.92);
        }

        .contacts-search-pill {
            flex: 1;
            position: relative;
            display: flex;
            align-items: center;
        }

        .contacts-search-input {
            width: 100%;
            height: 38px;
            padding: 0 30px 0 34px;
            border-radius: 12px;
            background: #f1f5f9;
            border: 1px solid transparent;
            font-size: 13px;
            font-weight: 500;
            color: #0f172a;
            outline: none;
            font-family: inherit;
            transition: all 0.2s;
        }
        .contacts-search-input:focus {
            background: #ffffff;
            border-color: #2563eb;
            box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
        }
        .contacts-search-input::placeholder {
            color: #94a3b8;
            font-weight: 400;
        }

        .contacts-search-icon {
            position: absolute;
            left: 10px;
            color: #94a3b8;
            pointer-events: none;
            display: flex;
            align-items: center;
        }

        .contacts-clear-btn {
            position: absolute;
            right: 8px;
            color: #94a3b8;
            background: none;
            border: none;
            cursor: pointer;
            font-size: 14px;
            padding: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .contacts-clear-btn:hover {
            color: #475569;
        }

        .contacts-filter-btn {
            width: 38px;
            height: 38px;
            border-radius: 12px;
            background: #2563eb;
            color: #ffffff;
            border: 1px solid #1d4ed8;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            flex-shrink: 0;
            box-shadow: 0 2px 8px rgba(37,99,235,0.25);
            transition: all 0.15s;
        }
        .contacts-filter-btn:active {
            transform: scale(0.92);
        }

        .contacts-theme-btn {
            width: 38px;
            height: 38px;
            border-radius: 12px;
            background: #f1f5f9;
            border: 1px solid #e2e8f0;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #475569;
            cursor: pointer;
            flex-shrink: 0;
            transition: all 0.15s;
        }
        .contacts-theme-btn:hover {
            background: #e2e8f0;
        }
        .contacts-theme-btn:active {
            transform: scale(0.92);
        }

        /* Filter Chips */
        .contacts-chips-scroll {
            display: flex;
            align-items: center;
            gap: 6px;
            overflow-x: auto;
            padding-top: 10px;
            scrollbar-width: none;
        }
        .contacts-chips-scroll::-webkit-scrollbar {
            display: none;
        }

        .contacts-chip-btn {
            flex-shrink: 0;
            padding: 6px 14px;
            border-radius: 20px;
            font-size: 11.5px;
            font-weight: 700;
            border: 1px solid #e2e8f0;
            background: #f1f5f9;
            color: #475569;
            cursor: pointer;
            transition: all 0.15s;
            white-space: nowrap;
        }
        .contacts-chip-btn:hover {
            background: #e2e8f0;
        }
        .contacts-chip-btn.active {
            background: #2563eb;
            color: #ffffff;
            border-color: #2563eb;
            box-shadow: 0 2px 8px rgba(37,99,235,0.25);
        }

        /* Subheader */
        .contacts-subheader-row {
            padding: 10px 14px;
            background: #f8fafc;
            border-bottom: 1px solid #f1f5f9;
            display: flex;
            align-items: center;
            justify-content: space-between;
            font-size: 12px;
            font-weight: 700;
            color: #64748b;
        }

        .contacts-quick-add-btn {
            color: #2563eb;
            font-weight: 800;
            background: none;
            border: none;
            cursor: pointer;
            font-size: 12px;
            display: flex;
            align-items: center;
            gap: 3px;
        }
        .contacts-quick-add-btn:hover {
            text-decoration: underline;
        }

        /* Contact Row */
        .crm-contact-item {
            background: #ffffff;
            border-bottom: 1px solid #f1f5f9;
            transition: background 0.15s;
        }

        .crm-contact-front {
            padding: 12px 14px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            cursor: pointer;
            user-select: none;
        }
        .crm-contact-front:active {
            background: #f8fafc;
        }

        .crm-avatar-box {
            width: 44px;
            height: 44px;
            border-radius: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            font-weight: 800;
            color: #ffffff;
            flex-shrink: 0;
            margin-right: 12px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.08);
        }

        .crm-contact-info-col {
            flex: 1;
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 1px;
        }

        .crm-name-line {
            display: flex;
            align-items: center;
            gap: 5px;
            font-size: 14px;
            font-weight: 800;
            color: #0f172a;
            line-height: 1.2;
        }

        .crm-phone-line {
            font-size: 12px;
            font-family: 'JetBrains Mono', monospace;
            font-weight: 700;
            color: #475569;
            line-height: 1.2;
            margin-top: 1px;
        }

        .crm-sub-line {
            font-size: 11px;
            color: #94a3b8;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            line-height: 1.2;
            margin-top: 1px;
        }

        .crm-badge-tag {
            padding: 3px 8px;
            border-radius: 6px;
            font-size: 9.5px;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            flex-shrink: 0;
            margin-left: 8px;
        }
        .crm-badge-tag.customer { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
        .crm-badge-tag.supplier { background: #f5f3ff; color: #6d28d9; border: 1px solid #ddd6fe; }
        .crm-badge-tag.due { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
        .crm-badge-tag.clear { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }

        /* Action Strip (Image 4) */
        .crm-action-strip {
            padding: 8px 14px 12px 14px;
            background: #f8fafc;
            border-top: 1px solid #f1f5f9;
            display: flex;
            align-items: center;
            justify-content: space-between;
            animation: fadeInStrip 0.15s ease-out;
        }

        @keyframes fadeInStrip {
            from { opacity: 0; transform: translateY(-4px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .crm-action-icons-group {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .crm-icon-btn {
            width: 36px;
            height: 36px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            border: 1px solid transparent;
            cursor: pointer;
            text-decoration: none;
            transition: all 0.15s;
        }
        .crm-icon-btn:active {
            transform: scale(0.9);
        }

        .crm-icon-btn.whatsapp { background: #ecfdf5; color: #10b981; border-color: #a7f3d0; }
        .crm-icon-btn.call { background: #eff6ff; color: #2563eb; border-color: #bfdbfe; }
        .crm-icon-btn.jama { background: #f0f9ff; color: #0284c7; border-color: #bae6fd; }
        .crm-icon-btn.ledger { background: #faf5ff; color: #9333ea; border-color: #e9d5ff; }
        .crm-icon-btn.share { background: #fff1f2; color: #e11d48; border-color: #fecdd3; }

        .crm-star-btn {
            width: 36px;
            height: 36px;
            border-radius: 12px;
            background: #ffffff;
            border: 1px solid #e2e8f0;
            color: #f59e0b;
            font-size: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.15s;
        }
        .crm-star-btn:active {
            transform: scale(0.9);
        }
    

        /* ─── FULL-SCREEN MOBILE CONTACT PROFILE MODAL (IMAGE 2) ─────── */
        .contact-profile-overlay {
            position: fixed;
            inset: 0;
            background: rgba(15, 23, 42, 0.45);
            backdrop-filter: blur(4px);
            -webkit-backdrop-filter: blur(4px);
            z-index: 350;
            display: flex;
            justify-content: center;
            align-items: stretch;
        }
        .contact-profile-container {
            width: 100%;
            max-width: 480px;
            height: 100%;
            background: #f8fafc;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
            animation: contactModalSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
        }
        @keyframes contactModalSlideUp {
            from { transform: translateY(100%); opacity: 0; }
            to { transform: translateY(0); opacity: 1; }
        }
        .contact-profile-top-header {
            background: rgba(255, 255, 255, 0.98);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border-bottom: 1px solid #e2e8f0;
            padding: 8px 14px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            flex-shrink: 0;
        }
        .contact-profile-nav-tabs-bar {
            background: #ffffff;
            border-bottom: 1px solid #f1f5f9;
            padding: 10px 14px;
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 6px;
            flex-shrink: 0;
        }
        .contact-nav-card-tab {
            border-radius: 14px;
            padding: 8px 4px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 4px;
            background: #f8fafc;
            color: #64748b;
            border: 1.5px solid transparent;
            cursor: pointer;
            font-size: 11px;
            font-weight: 700;
            transition: all 0.15s;
        }
        .contact-nav-card-tab.active {
            border-color: #2563eb;
            background: #ffffff;
            color: #2563eb;
            box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
        }
        .contact-profile-scroll-body {
            flex: 1;
            overflow-y: auto;
            padding: 16px 14px 40px 14px;
            background: #f8fafc;
            display: flex;
            flex-direction: column;
            gap: 14px;
        }
        .contact-profile-hero {
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
            padding: 10px 0 6px 0;
        }
        .contact-profile-squircle-avatar {
            width: 82px;
            height: 82px;
            border-radius: 26px;
            background: linear-gradient(135deg, #3b82f6, #1d4ed8);
            color: #ffffff;
            font-family: 'Outfit', sans-serif;
            font-size: 32px;
            font-weight: 800;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 10px 25px rgba(37, 99, 235, 0.25);
            margin-bottom: 12px;
        }
        .contact-profile-title-name {
            font-family: 'Outfit', sans-serif;
            font-size: 20px;
            font-weight: 800;
            color: #0f172a;
            line-height: 1.2;
        }
        .contact-profile-subtitle-phone {
            font-size: 13.5px;
            font-family: 'JetBrains Mono', monospace;
            color: #64748b;
            font-weight: 600;
            margin-top: 4px;
        }
        .contact-profile-pills-row {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            margin-top: 12px;
        }
        .contact-pill-btn-edit {
            padding: 7px 18px;
            border-radius: 9999px;
            background: #2563eb;
            color: #ffffff;
            font-size: 12.5px;
            font-weight: 700;
            border: none;
            display: flex;
            align-items: center;
            gap: 6px;
            cursor: pointer;
            box-shadow: 0 3px 10px rgba(37, 99, 235, 0.25);
            transition: transform 0.1s;
        }
        .contact-pill-btn-edit:active {
            transform: scale(0.95);
        }
        .contact-pill-btn-star {
            padding: 7px 16px;
            border-radius: 9999px;
            background: #ffffff;
            color: #475569;
            font-size: 12.5px;
            font-weight: 600;
            border: 1px solid #e2e8f0;
            display: flex;
            align-items: center;
            gap: 5px;
            cursor: pointer;
            box-shadow: 0 1px 4px rgba(0,0,0,0.03);
            transition: all 0.15s;
        }
        .contact-pill-btn-star.starred {
            background: #fef3c7;
            color: #b45309;
            border-color: #fde68a;
        }
        .contact-profile-round-actions-row {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
            margin-top: 18px;
        }
        .contact-round-action-btn {
            width: 44px;
            height: 44px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #ffffff;
            text-decoration: none;
            border: none;
            cursor: pointer;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
            transition: transform 0.15s, box-shadow 0.15s;
        }
        .contact-round-action-btn:hover {
            transform: translateY(-2px);
        }
        .contact-round-action-btn:active {
            transform: scale(0.92);
        }
        .contact-round-action-btn.whatsapp { background: #10b981; }
        .contact-round-action-btn.call { background: #3b82f6; }
        .contact-round-action-btn.email { background: #ef4444; }
        .contact-round-action-btn.ledger { background: #8b5cf6; }
        .contact-round-action-btn.share { background: #6366f1; }

        /* Card Styles */
        .contact-info-white-card {
            background: #ffffff;
            border-radius: 20px;
            padding: 16px 18px;
            border: 1px solid #e2e8f0;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
        }
        .contact-info-section-header {
            font-size: 10.5px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            color: #94a3b8;
            display: block;
        }
        .contact-info-section-value {
            font-size: 15px;
            font-weight: 800;
            color: #0f172a;
            margin-top: 2px;
        }
        .contact-quick-badge-btn {
            width: 38px;
            height: 38px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            text-decoration: none;
            border: none;
            cursor: pointer;
            transition: transform 0.15s;
        }
        .contact-quick-badge-btn:active {
            transform: scale(0.92);
        }
        .contact-quick-badge-btn.whatsapp {
            background: #e8f8f0;
            color: #10b981;
            border: 1px solid #a7f3d0;
        }
        .contact-quick-badge-btn.call {
            background: #edf5ff;
            color: #2563eb;
            border: 1px solid #bfdbfe;
        }
        .contact-quick-badge-btn.pin {
            background: #f8fafc;
            color: #64748b;
            border: 1px solid #e2e8f0;
        }
        .contact-purple-action-banner {
            background: linear-gradient(135deg, #6366f1, #4f46e5);
            border-radius: 20px;
            padding: 16px 18px;
            color: #ffffff;
            display: flex;
            align-items: center;
            justify-content: space-between;
            cursor: pointer;
            box-shadow: 0 4px 18px rgba(99, 102, 241, 0.3);
            transition: transform 0.15s;
        }
        .contact-purple-action-banner:active {
            transform: scale(0.98);
        }
        .crm-icon-btn.info { background: #f0f9ff; color: #0284c7; border-color: #bae6fd; }
    

        /* ─── COLOR OPTION PENCIL EDIT BUTTON & FULL SCREEN EDIT POPUP ─────── */
        .color-edit-pencil-btn {
            position: absolute;
            top: 4px;
            right: 4px;
            width: 22px;
            height: 22px;
            border-radius: 6px;
            background: rgba(255, 255, 255, 0.95);
            border: 1px solid #cbd5e1;
            color: #2563eb;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            box-shadow: 0 2px 6px rgba(0,0,0,0.12);
            transition: all 0.15s;
            z-index: 5;
        }
        .color-edit-pencil-btn:hover {
            background: #2563eb;
            color: #ffffff;
            border-color: #1d4ed8;
            transform: scale(1.1);
        }
        .color-edit-pencil-btn:active {
            transform: scale(0.92);
        }

        /* Editing Specs Table (Matching Image 3 & 4) */
        .edit-specs-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 12px;
            background: #ffffff;
            border-radius: 14px;
            overflow: hidden;
            border: 1px solid #e2e8f0;
        }
        .edit-specs-table tr {
            border-bottom: 1px solid #f1f5f9;
        }
        .edit-specs-table tr:last-child {
            border-bottom: none;
        }
        .edit-specs-table .label-col {
            padding: 10px 12px;
            font-weight: 700;
            color: #64748b;
            background: #f8fafc;
            width: 38%;
            vertical-align: middle;
            border-right: 1px solid #f1f5f9;
            font-size: 11.5px;
        }
        .edit-specs-table .value-col {
            padding: 6px 10px;
            vertical-align: middle;
        }
        .edit-table-input {
            width: 100%;
            padding: 6px 8px;
            border-radius: 8px;
            border: 1px solid #e2e8f0;
            font-size: 12px;
            font-weight: 700;
            color: #0f172a;
            font-family: inherit;
            background: #f8fafc;
            outline: none;
            transition: all 0.2s;
        }
        .edit-table-input:focus {
            background: #ffffff;
            border-color: #2563eb;
            box-shadow: 0 0 0 2px rgba(37,99,235,0.12);
        }
        .edit-table-select {
            width: 100%;
            padding: 6px 8px;
            border-radius: 8px;
            border: 1px solid #e2e8f0;
            font-size: 12px;
            font-weight: 700;
            color: #0f172a;
            font-family: inherit;
            background: #f8fafc;
            outline: none;
            cursor: pointer;
        }
    

        /* ─── REDESIGNED SQUARE IMAGE STOCK PRODUCT CARDS ─────────────────── */
        .stock-product-card-modern {
            background: #ffffff;
            border: 1px solid #e2e8f0;
            border-radius: 14px;
            overflow: hidden;
            display: flex;
            align-items: stretch;
            cursor: pointer;
            transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
            box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
            min-height: 105px;
            position: relative;
        }
        .stock-product-card-modern:hover {
            border-color: #2563eb;
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(37, 99, 235, 0.1);
        }
        .stock-product-card-modern:active {
            transform: scale(0.99);
        }

        .stock-card-img-square {
            width: 105px;
            min-width: 105px;
            max-width: 105px;
            position: relative;
            background: #f1f5f9;
            flex-shrink: 0;
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .stock-card-img-square img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
            transition: transform 0.3s;
        }
        .stock-product-card-modern:hover .stock-card-img-square img {
            transform: scale(1.05);
        }

        .stock-card-right-content {
            flex: 1;
            padding: 10px 12px;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            min-width: 0;
            gap: 4px;
        }

        .stock-card-header-line {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 6px;
        }

        .stock-card-title {
            font-size: 13.5px;
            font-weight: 800;
            color: #0f172a;
            line-height: 1.25;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .stock-card-price {
            font-family: 'Outfit', sans-serif;
            font-size: 15px;
            font-weight: 900;
            color: #0f172a;
            flex-shrink: 0;
        }

        .stock-card-sub-line {
            font-size: 11px;
            color: #2563eb;
            font-weight: 600;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .stock-card-footer-badges {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 6px;
            margin-top: 4px;
        }

        .stock-pill-badge {
            font-size: 10.5px;
            font-weight: 800;
            padding: 2px 7px;
            border-radius: 6px;
            display: inline-flex;
            align-items: center;
            gap: 3px;
        }
        .stock-pill-badge.instock { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
        .stock-pill-badge.lowstock { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
        .stock-pill-badge.margin { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }

        /* Prominent Color Option Pencil Button */
        .color-edit-pencil-btn {
            position: absolute;
            top: 5px;
            right: 5px;
            width: 26px;
            height: 26px;
            border-radius: 8px;
            background: #ffffff;
            border: 1.5px solid #2563eb;
            color: #2563eb;
            display: flex !important;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
            transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
            z-index: 10;
        }
        .color-edit-pencil-btn:hover {
            background: #2563eb;
            color: #ffffff;
            transform: scale(1.15);
        }
        .color-edit-pencil-btn:active {
            transform: scale(0.92);
        }
    